summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2022-02-15 18:11:55 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2022-02-25 01:06:24 +0100
commitef120261910bfb46f25a168f26043ff380ab26b0 (patch)
tree01ba3b68302e466b5c9e7dd68d1a62269c477d50
parent81c178b82dd8bdef3df37c3a3dcd20c1956da308 (diff)
add support for raspberry pi4 64 bit
-rw-r--r--package/bcm28xx-bootloader/Makefile4
-rw-r--r--package/bcm28xx-vc/Makefile2
-rwxr-xr-xscripts/install.sh20
-rw-r--r--target/aarch64/kernel/raspberry-pi4-64 (renamed from target/aarch64/kernel/raspberry-pi3p-64)1
-rw-r--r--target/aarch64/systems/raspberry-pi4-64 (renamed from target/aarch64/systems/raspberry-pi3p-64)8
-rw-r--r--target/config/Config.in.cpu10
-rw-r--r--target/linux/Config.in.kernelcfg2
-rw-r--r--target/linux/config/Config.in.bluetooth2
-rw-r--r--target/linux/config/Config.in.ethernet8
-rw-r--r--target/linux/config/Config.in.wireless1
-rw-r--r--target/linux/patches/59aeb16c7f1254f1383476956dda0766d10c918a/localversion.patch18
11 files changed, 52 insertions, 24 deletions
diff --git a/package/bcm28xx-bootloader/Makefile b/package/bcm28xx-bootloader/Makefile
index a74935714..2a2b83b4f 100644
--- a/package/bcm28xx-bootloader/Makefile
+++ b/package/bcm28xx-bootloader/Makefile
@@ -12,7 +12,7 @@ PKG_SECTION:= base/boot
PKG_URL:= https://github.com/raspberrypi/firmware
PKG_SITES:= https://github.com/raspberrypi/firmware.git
-PKG_SYSTEM_DEPENDS:= raspberry-pi raspberry-pi0 raspberry-pi2 raspberry-pi3 raspberry-pi3-64 raspberry-pi4 raspberry-pi3p-64
+PKG_SYSTEM_DEPENDS:= raspberry-pi raspberry-pi0 raspberry-pi2 raspberry-pi3 raspberry-pi3-64 raspberry-pi4 raspberry-pi4-64
PKG_CHOICES_BCM28XX_BOOTLOADER:= DEFAULT EXTRA CUTDOWN
PKGCD_DEFAULT:= default bootloader
@@ -104,7 +104,7 @@ ifeq ($(ADK_TARGET_HARDWARE_RPI3_SERIAL),y)
printf "enable_uart=1\n" >> \
$(IDIR_BCM28XX_BOOTLOADER)/boot/config.txt
endif
-ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI3_64)$(ADK_TARGET_SYSTEM_RASPBERRY_PI3_64),y)
+ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI3_64)$(ADK_TARGET_SYSTEM_RASPBERRY_PI4_64),y)
printf "arm_control=0x200\n" >> \
$(IDIR_BCM28XX_BOOTLOADER)/boot/config.txt
printf "enable_uart=1\n" >> \
diff --git a/package/bcm28xx-vc/Makefile b/package/bcm28xx-vc/Makefile
index 07225cc24..e1ff14f13 100644
--- a/package/bcm28xx-vc/Makefile
+++ b/package/bcm28xx-vc/Makefile
@@ -26,7 +26,7 @@ PKGSC_BCM28XX_VC_GL_LIBS:=libs/video
PKGSS_BCM28XX_VC_GL_LIBS:=bcm28xx-vc-libs
PKGSD_BCM28XX_VC_GL_LIBS:=videocore gl library
-PKG_SYSTEM_DEPENDS:= raspberry-pi raspberry-pi0 raspberry-pi2 raspberry-pi3 raspberry-pi3-64 raspberry-pi4 raspberry-pi3p-64
+PKG_SYSTEM_DEPENDS:= raspberry-pi raspberry-pi0 raspberry-pi2 raspberry-pi3 raspberry-pi3-64 raspberry-pi4 raspberry-pi4-64
include $(ADK_TOPDIR)/mk/package.mk
diff --git a/scripts/install.sh b/scripts/install.sh
index cd03fdb38..60c2475a2 100755
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#-
-# Copyright © 2010-2019
+# Copyright © 2010-2022
# Waldemar Brodkorb <wbx@openadk.org>
# Thorsten Glaser <tg@mirbsd.org>
#
@@ -155,7 +155,7 @@ tgt=$2
src=$3
case $target {
-(banana-pro|orange-pi0|pcengines-apu|phytec-imx6|phytec-wega|raspberry-pi|raspberry-pi0|raspberry-pi2|raspberry-pi3|raspberry-pi3-64|raspberry-pi4|raspberry-pi3p-64|solidrun-imx6|solidrun-clearfog|default) ;;
+(banana-pro|orange-pi0|pcengines-apu|phytec-imx6|phytec-wega|raspberry-pi|raspberry-pi0|raspberry-pi2|raspberry-pi3|raspberry-pi3-64|raspberry-pi4|raspberry-pi4-64|solidrun-imx6|solidrun-clearfog|default) ;;
(*)
print -u2 "Unknown target '$target', exiting"
exit 1 ;;
@@ -178,7 +178,7 @@ case $ostype {
basedev=$tgt
rootpart=${basedev}s1
datapart=${basedev}s2
- if [[ $target = raspberry-pi || $target = raspberry-pi0 || $target = raspberry-pi2 || $target = raspberry-pi3 || $target = raspberry-pi3-64 || $target = raspberry-pi4 || $target = raspberry-pi3p-64 || $target = phytec-wega ]]; then
+ if [[ $target = raspberry-pi || $target = raspberry-pi0 || $target = raspberry-pi2 || $target = raspberry-pi3 || $target = raspberry-pi3-64 || $target = raspberry-pi4 || $target = raspberry-pi4-64 || $target = phytec-wega ]]; then
bootpart=${basedev}s1
rootpart=${basedev}s2
datapart=${basedev}s3
@@ -229,7 +229,7 @@ case $ostype {
rootpart=${basedev}${partitionsep}1
datapart=${basedev}${partitionsep}2
- if [[ $target = raspberry-pi || $target = raspberry-pi0 || $target = raspberry-pi2 || $target = raspberry-pi3 || $target = raspberry-pi3-64 || $target = raspberry-pi4 || $target = raspberry-pi3p-64 ]]; then
+ if [[ $target = raspberry-pi || $target = raspberry-pi0 || $target = raspberry-pi2 || $target = raspberry-pi3 || $target = raspberry-pi3-64 || $target = raspberry-pi4 || $target = raspberry-pi4-64 ]]; then
bootpart=${basedev}${partitionsep}1
rootpart=${basedev}${partitionsep}2
datapart=${basedev}${partitionsep}3
@@ -294,7 +294,7 @@ syspartno=0
# data - flexible (parameter)
# system - everything else
-if [[ $target = raspberry-pi || $target = raspberry-pi0 || $target = raspberry-pi2 || $target = raspberry-pi3 || $target = raspberry-pi3-64 || $target = raspberry-pi4 || $target = raspberry-pi3p-64 || $target = phytec-wega ]]; then
+if [[ $target = raspberry-pi || $target = raspberry-pi0 || $target = raspberry-pi2 || $target = raspberry-pi3 || $target = raspberry-pi3-64 || $target = raspberry-pi4 || $target = raspberry-pi4-64 || $target = phytec-wega ]]; then
syspartno=1
bootfssz=100
if (( grub )); then
@@ -351,7 +351,7 @@ fi
#(( partofs = ((coreendsec / secs) + 1) * secs ))
# we just use 2048 all the time, since some loaders are longer
partofs=2048
-if [[ $target = raspberry-pi || $target = raspberry-pi0 || $target = raspberry-pi2 || $target = raspberry-pi3 || $target = raspberry-pi3-64 || $target = raspberry-pi4 || $target = raspberry-pi3p-64 || $target = phytec-wega ]]; then
+if [[ $target = raspberry-pi || $target = raspberry-pi0 || $target = raspberry-pi2 || $target = raspberry-pi3 || $target = raspberry-pi3-64 || $target = raspberry-pi4 || $target = raspberry-pi4-64 || $target = phytec-wega ]]; then
(( spartofs = partofs + (100 * 2048) ))
else
spartofs=$partofs
@@ -462,7 +462,7 @@ if (( datafssz )); then
dd of="$T/firsttrack" conv=notrunc bs=1 seek=$((0x1CE)) 2>/dev/null
fi
-if [[ $target = raspberry-pi || $target = raspberry-pi0 || $target = raspberry-pi2 || $target = raspberry-pi3 || $target = raspberry-pi3-64 || $target = raspberry-pi4 || $target = raspberry-pi3p-64 || $target = phytec-wega ]]; then
+if [[ $target = raspberry-pi || $target = raspberry-pi0 || $target = raspberry-pi2 || $target = raspberry-pi3 || $target = raspberry-pi3-64 || $target = raspberry-pi4 || $target = raspberry-pi4-64 || $target = phytec-wega ]]; then
# move system and data partition from #0/#1 to #1/#2
dd if="$T/firsttrack" bs=1 skip=$((0x1BE)) count=32 of="$T/x" 2>/dev/null
dd of="$T/firsttrack" conv=notrunc bs=1 seek=$((0x1CE)) if="$T/x" 2>/dev/null
@@ -555,7 +555,7 @@ case $target {
dd if="$fwdir/SPL" of="$tgt" bs=1024 seek=1 > /dev/null 2>&1
dd if="$fwdir/u-boot.img" of="$tgt" bs=1024 seek=69 > /dev/null 2>&1
;;
-(raspberry-pi|raspberry-pi0|raspberry-pi2|raspberry-pi3|raspberry-pi3-64|raspberry-pi4|raspberry-pi3p-64)
+(raspberry-pi|raspberry-pi0|raspberry-pi2|raspberry-pi3|raspberry-pi3-64|raspberry-pi4|raspberry-pi4-64)
(( noformat )) || create_fs "$bootpart" ADKBOOT vfat
;;
(phytec-wega)
@@ -575,7 +575,7 @@ if (( datafssz )); then
((keep)) || create_fs "$datapart" ADKDATA ext4
((keep)) || tune_fs "$datapart"
case $target {
- (raspberry-pi|raspberry-pi0|raspberry-pi2|raspberry-pi3|raspberry-pi3-64|raspberry-pi4|raspberry-pi3p-64|phytec-wega)
+ (raspberry-pi|raspberry-pi0|raspberry-pi2|raspberry-pi3|raspberry-pi3-64|raspberry-pi4|raspberry-pi4-64|phytec-wega)
echo "/dev/mmcblk0p3 /data ext4 rw 0 0" >> "$R"/etc/fstab
;;
(banana-pro|orange-pi0|solidrun-clearfog)
@@ -597,7 +597,7 @@ fi
(( quiet )) || print Finishing up with bootloader and kernel ...
case $target {
-(raspberry-pi|raspberry-pi0|raspberry-pi2|raspberry-pi3|raspberry-pi3-64|raspberry-pi4|raspberry-pi3p-64)
+(raspberry-pi|raspberry-pi0|raspberry-pi2|raspberry-pi3|raspberry-pi3-64|raspberry-pi4|raspberry-pi4-64)
mount_fs "$bootpart" "$B" vfat
for x in "$R"/boot/*; do
[[ -e "$x" ]] && mv -f "$R"/boot/* "$B/"
diff --git a/target/aarch64/kernel/raspberry-pi3p-64 b/target/aarch64/kernel/raspberry-pi4-64
index 6d9ace351..bb71b29de 100644
--- a/target/aarch64/kernel/raspberry-pi3p-64
+++ b/target/aarch64/kernel/raspberry-pi4-64
@@ -8,3 +8,4 @@ CONFIG_MAILBOX=y
CONFIG_BCM2835_MBOX=y
CONFIG_RASPBERRYPI_POWER=y
CONFIG_RASPBERRYPI_FIRMWARE=y
+CONFIG_CLK_RASPBERRYPI=y
diff --git a/target/aarch64/systems/raspberry-pi3p-64 b/target/aarch64/systems/raspberry-pi4-64
index 3ac86b45b..e06ac6dbe 100644
--- a/target/aarch64/systems/raspberry-pi3p-64
+++ b/target/aarch64/systems/raspberry-pi4-64
@@ -1,7 +1,7 @@
-config ADK_TARGET_SYSTEM_RASPBERRY_PI3P_64
- bool "Raspberry PI 3 Model B+"
+config ADK_TARGET_SYSTEM_RASPBERRY_PI4_64
+ bool "Raspberry PI 4"
select ADK_TARGET_LITTLE_ENDIAN
- select ADK_TARGET_CPU_AARCH64_CORTEX_A53
+ select ADK_TARGET_CPU_AARCH64_CORTEX_A72
select ADK_TARGET_BOARD_BCM28XX
select ADK_TARGET_WITH_VGA
select ADK_TARGET_WITH_SERIAL
@@ -22,5 +22,5 @@ config ADK_TARGET_SYSTEM_RASPBERRY_PI3P_64
select ADK_TARGET_WITH_ROOT_RW
select ADK_TARGET_KERNEL_IMAGE
help
- Raspberry PI 3 Model B+ (AARCH64)
+ Raspberry PI 4 (AARCH64)
diff --git a/target/config/Config.in.cpu b/target/config/Config.in.cpu
index 3762ddf82..d3ec4a373 100644
--- a/target/config/Config.in.cpu
+++ b/target/config/Config.in.cpu
@@ -21,6 +21,16 @@ config ADK_TARGET_CPU_AARCH64_CORTEX_A57
select ADK_TARGET_WITH_MMU
depends on ADK_TARGET_ARCH_AARCH64
+config ADK_TARGET_CPU_AARCH64_CORTEX_A72
+ bool "cortex-a72"
+ select ADK_TARGET_SUPPORTS_THREADS
+ select ADK_TARGET_SUPPORTS_NPTL
+ select ADK_TARGET_SUPPORTS_LT
+ select ADK_TARGET_CPU_WITH_FPU_VFPV4
+ select ADK_TARGET_CPU_WITH_NEON
+ select ADK_TARGET_CPU_WITH_THUMB2
+ depends on ADK_TARGET_ARCH_AARCH64
+
# alpha
config ADK_TARGET_CPU_ALPHA_EV4
bool "ev4"
diff --git a/target/linux/Config.in.kernelcfg b/target/linux/Config.in.kernelcfg
index e1feb5e0e..c025a42e5 100644
--- a/target/linux/Config.in.kernelcfg
+++ b/target/linux/Config.in.kernelcfg
@@ -29,7 +29,7 @@ config ADK_TARGET_LINUX_KERNEL_DEFCONFIG
default "bcm2709_defconfig" if ADK_TARGET_SYSTEM_RASPBERRY_PI3
default "bcm2711_defconfig" if ADK_TARGET_SYSTEM_RASPBERRY_PI4
default "bcmrpi3_defconfig" if ADK_TARGET_SYSTEM_RASPBERRY_PI3_64
- default "bcmrpi3_defconfig" if ADK_TARGET_SYSTEM_RASPBERRY_PI3P_64
+ default "bcm2711_defconfig" if ADK_TARGET_SYSTEM_RASPBERRY_PI4_64
default "twr-k70f120m_defconfig" if ADK_TARGET_SYSTEM_KINETIS_K70
default "imx_v7_cbi_hb_defconfig" if ADK_TARGET_SYSTEM_SOLIDRUN_IMX6 && ADK_TARGET_LINUX_KERNEL_VERSION_GIT
default "imx_v6_v7_defconfig" if ADK_TARGET_SYSTEM_SOLIDRUN_IMX6
diff --git a/target/linux/config/Config.in.bluetooth b/target/linux/config/Config.in.bluetooth
index 49f0a1202..9c549620e 100644
--- a/target/linux/config/Config.in.bluetooth
+++ b/target/linux/config/Config.in.bluetooth
@@ -137,7 +137,7 @@ config ADK_LINUX_KERNEL_BT_HCIUART_BCM
select ADK_LINUX_KERNEL_BT_HCIUART
select ADK_LINUX_KERNEL_BT_HCIUART_3WIRE
select ADK_LINUX_KERNEL_BT_BCM
- depends on ADK_TARGET_SYSTEM_RASPBERRY_PI3 || ADK_TARGET_SYSTEM_RASPBERRY_PI3P
+ depends on ADK_TARGET_SYSTEM_RASPBERRY_PI3
default n
help
The Broadcom protocol support enables Bluetooth HCI over serial
diff --git a/target/linux/config/Config.in.ethernet b/target/linux/config/Config.in.ethernet
index 4fa9dc7c6..fbff94d54 100644
--- a/target/linux/config/Config.in.ethernet
+++ b/target/linux/config/Config.in.ethernet
@@ -233,10 +233,10 @@ config ADK_LINUX_KERNEL_USB_LAN78XX
tristate "Microchip LAN78XX"
select ADK_LINUX_KERNEL_USB_NET_DRIVERS
select ADK_LINUX_KERNEL_USB_USBNET
- depends on ADK_TARGET_SYSTEM_RASPBERRY_PI3P \
- || ADK_TARGET_SYSTEM_RASPBERRY_PI3P_64
- default y if ADK_TARGET_SYSTEM_RASPBERRY_PI3P
- default y if ADK_TARGET_SYSTEM_RASPBERRY_PI3P_64
+ depends on ADK_TARGET_SYSTEM_RASPBERRY_PI3 \
+ || ADK_TARGET_SYSTEM_RASPBERRY_PI3_64
+ default y if ADK_TARGET_SYSTEM_RASPBERRY_PI3
+ default y if ADK_TARGET_SYSTEM_RASPBERRY_PI3_64
default n
help
Microchip LAN78XX Based USB Ethernet Adapters.
diff --git a/target/linux/config/Config.in.wireless b/target/linux/config/Config.in.wireless
index 44d6fa401..382f412df 100644
--- a/target/linux/config/Config.in.wireless
+++ b/target/linux/config/Config.in.wireless
@@ -158,7 +158,6 @@ config ADK_LINUX_KERNEL_BRCMFMAC_SDIO
ADK_TARGET_SYSTEM_PHYTEC_IMX6
default y if ADK_TARGET_SYSTEM_RASPBERRY_PI0
default y if ADK_TARGET_SYSTEM_RASPBERRY_PI3
- default y if ADK_TARGET_SYSTEM_RASPBERRY_PI3P
default n
help
Driver for Broadcom FullMac wireless cards (SDIO).
diff --git a/target/linux/patches/59aeb16c7f1254f1383476956dda0766d10c918a/localversion.patch b/target/linux/patches/59aeb16c7f1254f1383476956dda0766d10c918a/localversion.patch
new file mode 100644
index 000000000..b4b4b95d7
--- /dev/null
+++ b/target/linux/patches/59aeb16c7f1254f1383476956dda0766d10c918a/localversion.patch
@@ -0,0 +1,18 @@
+diff -Nur linux-59aeb16c7f1254f1383476956dda0766d10c918a.orig/arch/arm/configs/bcm2711_defconfig linux-59aeb16c7f1254f1383476956dda0766d10c918a/arch/arm/configs/bcm2711_defconfig
+--- linux-59aeb16c7f1254f1383476956dda0766d10c918a.orig/arch/arm/configs/bcm2711_defconfig 2022-01-21 19:27:36.000000000 +0100
++++ linux-59aeb16c7f1254f1383476956dda0766d10c918a/arch/arm/configs/bcm2711_defconfig 2022-02-15 12:41:31.879194595 +0100
+@@ -1,4 +1,4 @@
+-CONFIG_LOCALVERSION="-v7l"
++CONFIG_LOCALVERSION=""
+ # CONFIG_LOCALVERSION_AUTO is not set
+ CONFIG_SYSVIPC=y
+ CONFIG_POSIX_MQUEUE=y
+diff -Nur linux-59aeb16c7f1254f1383476956dda0766d10c918a.orig/arch/arm64/configs/bcm2711_defconfig linux-59aeb16c7f1254f1383476956dda0766d10c918a/arch/arm64/configs/bcm2711_defconfig
+--- linux-59aeb16c7f1254f1383476956dda0766d10c918a.orig/arch/arm64/configs/bcm2711_defconfig 2022-01-21 19:27:37.000000000 +0100
++++ linux-59aeb16c7f1254f1383476956dda0766d10c918a/arch/arm64/configs/bcm2711_defconfig 2022-02-15 12:41:11.014686670 +0100
+@@ -1,4 +1,4 @@
+-CONFIG_LOCALVERSION="-v8"
++CONFIG_LOCALVERSION=""
+ # CONFIG_LOCALVERSION_AUTO is not set
+ CONFIG_SYSVIPC=y
+ CONFIG_POSIX_MQUEUE=y