From 963f6e973ab186d54506f6a522d291a8f332fa77 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Thu, 21 Jun 2018 06:11:25 +0100 Subject: [PATCH] u-boot: add config for aarch64 Signed-off-by: Arne Fitzenreiter --- config/rootfiles/common/aarch64/u-boot | 9 +++++++ .../rootfiles/common/aarch64/u-boot-mkimage | 1 + .../core/122/filelists/aarch64/u-boot | 1 + .../core/122/filelists/aarch64/u-boot-mkimage | 1 + config/u-boot/boot.cmd | 1 + config/u-boot/boot.scr | Bin 1927 -> 1981 bytes lfs/u-boot | 25 +++++++++++++++--- 7 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 config/rootfiles/common/aarch64/u-boot create mode 100644 config/rootfiles/common/aarch64/u-boot-mkimage create mode 120000 config/rootfiles/core/122/filelists/aarch64/u-boot create mode 120000 config/rootfiles/core/122/filelists/aarch64/u-boot-mkimage diff --git a/config/rootfiles/common/aarch64/u-boot b/config/rootfiles/common/aarch64/u-boot new file mode 100644 index 0000000000..4a4d9088e7 --- /dev/null +++ b/config/rootfiles/common/aarch64/u-boot @@ -0,0 +1,9 @@ +boot/boot.cmd +boot/boot.mk +boot/boot.scr +boot/kernel8.img +boot/uEnv.txt +boot/uboot.env +#usr/share/u-boot +#usr/share/u-boot/rpi3 +usr/share/u-boot/rpi3/kernel8.img diff --git a/config/rootfiles/common/aarch64/u-boot-mkimage b/config/rootfiles/common/aarch64/u-boot-mkimage new file mode 100644 index 0000000000..80864b79c0 --- /dev/null +++ b/config/rootfiles/common/aarch64/u-boot-mkimage @@ -0,0 +1 @@ +usr/bin/mkimage diff --git a/config/rootfiles/core/122/filelists/aarch64/u-boot b/config/rootfiles/core/122/filelists/aarch64/u-boot new file mode 120000 index 0000000000..2a16bdbfe2 --- /dev/null +++ b/config/rootfiles/core/122/filelists/aarch64/u-boot @@ -0,0 +1 @@ +../../../../common/aarch64/u-boot \ No newline at end of file diff --git a/config/rootfiles/core/122/filelists/aarch64/u-boot-mkimage b/config/rootfiles/core/122/filelists/aarch64/u-boot-mkimage new file mode 120000 index 0000000000..8606a8983b --- /dev/null +++ b/config/rootfiles/core/122/filelists/aarch64/u-boot-mkimage @@ -0,0 +1 @@ +../../../../common/aarch64/u-boot-mkimage \ No newline at end of file diff --git a/config/u-boot/boot.cmd b/config/u-boot/boot.cmd index c6411def1c..6679d679ab 100644 --- a/config/u-boot/boot.cmd +++ b/config/u-boot/boot.cmd @@ -65,6 +65,7 @@ else setenv ramdisk_addr -; fi ; bootz ${kernel_addr_r} ${ramdisk_addr} ${fdt_addr_r}; +booti ${kernel_addr_r} ${ramdisk_addr} ${fdt_addr_r}; # Recompile with: # mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr diff --git a/config/u-boot/boot.scr b/config/u-boot/boot.scr index 3226685857e74fafb9c8ce92721e4347fbf72cbe..188d54456da43c74e5428aa94b20b9d6c6730532 100644 GIT binary patch delta 58 zc-m{{-^(wr&MF!9Pfu=Rw8BFp1_t(81}MlePdm)Y#5Pe;kp(DRy3yq|8*5U2eo5x! He{7uqqGS(# delta 52 zc-q^`-_9?u&MFzUlxGV^)bG<<7#P^y8K6L({nc7lCbo%+iY!23`;9KI*(Rs5M*sj^ CdkoM3 diff --git a/lfs/u-boot b/lfs/u-boot index 55ecea9e35..ffd558bddd 100644 --- a/lfs/u-boot +++ b/lfs/u-boot @@ -31,7 +31,7 @@ DL_FILE = $(THISAPP).tar.bz2 DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP)-$(MKIMAGE) -SUP_ARCH = armv5tel +SUP_ARCH = armv5tel aarch64 ############################################################################### # Top-level Rules @@ -76,6 +76,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE) ifneq "$(MKIMAGE)" "1" +ifeq "${BUILD_ARCH}" "armv5tel" # Pandaboard -mkdir -pv /usr/share/u-boot/pandaboard cd $(DIR_APP) && make CROSS_COMPILE="" omap4_panda_config @@ -121,7 +122,7 @@ ifneq "$(MKIMAGE)" "1" cd $(DIR_APP) && install u-boot.bin /boot/kernel7.img cd $(DIR_APP) && make distclean - # Raspberry Pi 3 + # Raspberry Pi 3 32bit -mkdir -pv /usr/share/u-boot/rpi3 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/u-boot/rpi/u-boot-2018.03_add_rpi3-b-plus.patch cd $(DIR_APP) && make CROSS_COMPILE="" rpi_3_32b_config @@ -129,7 +130,7 @@ ifneq "$(MKIMAGE)" "1" cd $(DIR_APP) && make CROSS_COMPILE="" HOSTCC="gcc $(CFLAGS)" cd $(DIR_APP) && install -v -m 644 u-boot.bin \ /usr/share/u-boot/rpi3/kernel8-32.img - # Install rpi2 u-boot as default rpi kernel8-32 + # Install rpi3 32bit u-boot as default rpi kernel8-32 cd $(DIR_APP) && install u-boot.bin /boot/kernel8-32.img cd $(DIR_APP) && make distclean @@ -161,6 +162,20 @@ ifneq "$(MKIMAGE)" "1" /usr/share/u-boot/banana_pi cd $(DIR_APP) && make distclean +else + # Raspberry Pi 3 + -mkdir -pv /usr/share/u-boot/rpi3 + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/u-boot/rpi/u-boot-2018.03_add_rpi3-b-plus.patch + cd $(DIR_APP) && make CROSS_COMPILE="" rpi_3_config + cd $(DIR_APP) && sed -i -e 's!^CONFIG_IDENT_STRING=.*!CONFIG_IDENT_STRING=" RPi3 - IPFire.org"!' .config + cd $(DIR_APP) && make CROSS_COMPILE="" HOSTCC="gcc $(CFLAGS)" + cd $(DIR_APP) && install -v -m 644 u-boot.bin \ + /usr/share/u-boot/rpi3/kernel8.img + # Install rpi3 u-boot as default rpi kernel8 + cd $(DIR_APP) && install u-boot.bin /boot/kernel8.img + cd $(DIR_APP) && make distclean + +endif # create an empty 128 KB File for the u-boot env dd if=/dev/zero of=/boot/uboot.env bs=1K count=128 @@ -171,7 +186,11 @@ ifneq "$(MKIMAGE)" "1" else # mkimage +ifeq "${BUILD_ARCH}" "armv5tel" cd $(DIR_APP) && make CROSS_COMPILE="" omap4_panda_config +else + cd $(DIR_APP) && make CROSS_COMPILE="" rpi_3_config +endif cd $(DIR_APP) && make CROSS_COMPILE="" HOSTCC="gcc $(CFLAGS)" tools cd $(DIR_APP) && install -v -m 755 tools/mkimage /usr/bin endif -- 2.39.2