From: Arne Fitzenreiter Date: Sun, 4 Aug 2019 08:54:50 +0000 (+0000) Subject: u-boot: enable boot from additional mmc device X-Git-Tag: v2.23-core135^2~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e47e01f60c379922d11ea8a9352f163d4e034ff0;p=ipfire-2.x.git u-boot: enable boot from additional mmc device Signed-off-by: Arne Fitzenreiter --- diff --git a/config/u-boot/boot.cmd b/config/u-boot/boot.cmd index 5cb4b8971c..b86b6809ae 100644 --- a/config/u-boot/boot.cmd +++ b/config/u-boot/boot.cmd @@ -3,8 +3,12 @@ if test ${boot_dev} = ""; then setenv root_dev /dev/mmcblk0p3; fi; +if test ${dev_num} = ""; then + setenv dev_num 0; +fi; + if test ${boot_part} = ""; then - setenv boot_part 0:1; + setenv boot_part ${dev_num}:1; fi; if test ${soc} = "kirkwood"; then diff --git a/config/u-boot/boot.scr b/config/u-boot/boot.scr index 5143b051bd..b3c6bc2c82 100644 Binary files a/config/u-boot/boot.scr and b/config/u-boot/boot.scr differ diff --git a/config/u-boot/uEnv.txt b/config/u-boot/uEnv.txt index 6edc977152..21780a971d 100644 --- a/config/u-boot/uEnv.txt +++ b/config/u-boot/uEnv.txt @@ -1,3 +1,4 @@ KVER=xxxKVERxxx DTBSUNXI=sun8i-h3-nanopi-r1.dtb +root_dev=UUID=xxxROOT-UUIDxxx SERIAL-CONSOLE=ON diff --git a/lfs/flash-images b/lfs/flash-images index dcad81ab38..e9bd0434b5 100644 --- a/lfs/flash-images +++ b/lfs/flash-images @@ -215,6 +215,12 @@ endif rm -f $(MNThdd)/etc/grub.d/11_linux_scon endif +ifeq "$(BUILD_ARCH)" "armv5tel" + # Insert the UUID to uENV.txt + sed -i $(MNThdd)/boot/uENV.txt \ + -e "s/^root_dev=.*/root_dev=UUID=$$(blkid -o value -s UUID $(PART_ROOT))/g" +endif + # Set ramdisk mode to automatic echo RAMDISK_MODE=2 > $(MNThdd)/etc/sysconfig/ramdisk