]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
u-boot: enable boot from additional mmc device
authorArne Fitzenreiter <arne_f@ipfire.org>
Sun, 4 Aug 2019 08:54:50 +0000 (08:54 +0000)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sun, 4 Aug 2019 13:43:44 +0000 (13:43 +0000)
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
config/u-boot/boot.cmd
config/u-boot/boot.scr
config/u-boot/uEnv.txt
lfs/flash-images

index 5cb4b8971cdb3d310a43dfc5093b1fa70e25a0a7..b86b6809ae6944561815f67c5bf439606849cb85 100644 (file)
@@ -3,8 +3,12 @@ if test ${boot_dev} = ""; then
        setenv root_dev /dev/mmcblk0p3;
 fi;
 
        setenv root_dev /dev/mmcblk0p3;
 fi;
 
+if test ${dev_num} = ""; then
+       setenv dev_num 0;
+fi;
+
 if test ${boot_part} = ""; then
 if test ${boot_part} = ""; then
-       setenv boot_part 0:1;
+       setenv boot_part ${dev_num}:1;
 fi;
 
 if test ${soc} = "kirkwood"; then
 fi;
 
 if test ${soc} = "kirkwood"; then
index 5143b051bd2f669e651e924ebdf856a319536a3a..b3c6bc2c82bb15888fdd866d4016b93ec0e5d0ed 100644 (file)
Binary files a/config/u-boot/boot.scr and b/config/u-boot/boot.scr differ
index 6edc9771522519a9d660c2d137d458c335ea46cf..21780a971d671a1df65236b17595c02c0bb46930 100644 (file)
@@ -1,3 +1,4 @@
 KVER=xxxKVERxxx
 DTBSUNXI=sun8i-h3-nanopi-r1.dtb
 KVER=xxxKVERxxx
 DTBSUNXI=sun8i-h3-nanopi-r1.dtb
+root_dev=UUID=xxxROOT-UUIDxxx
 SERIAL-CONSOLE=ON
 SERIAL-CONSOLE=ON
index dcad81ab38b9b140166b913628d88e5973a05b4a..e9bd0434b514a3e78699cc41a098c3a1fca78867 100644 (file)
@@ -215,6 +215,12 @@ endif
        rm -f $(MNThdd)/etc/grub.d/11_linux_scon
 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
 
        # Set ramdisk mode to automatic
        echo RAMDISK_MODE=2 > $(MNThdd)/etc/sysconfig/ramdisk