From e47e01f60c379922d11ea8a9352f163d4e034ff0 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Sun, 4 Aug 2019 08:54:50 +0000 Subject: [PATCH] u-boot: enable boot from additional mmc device Signed-off-by: Arne Fitzenreiter --- config/u-boot/boot.cmd | 6 +++++- config/u-boot/boot.scr | Bin 2544 -> 2607 bytes config/u-boot/uEnv.txt | 1 + lfs/flash-images | 6 ++++++ 4 files changed, 12 insertions(+), 1 deletion(-) 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 5143b051bd2f669e651e924ebdf856a319536a3a..b3c6bc2c82bb15888fdd866d4016b93ec0e5d0ed 100644 GIT binary patch delta 103 zc-s3Qyk10JomDc-YJOcptlREP1_sXe3{bF0ne{R&6Wc^ZMHZm&^NB8*swt^u@p+}W qwFF33Q#!(gNbu2xm2oQN;h7U;sgN5JRd6n delta 57 zc-mVp@#YC6PiH|iH4K|B1 HN^t@Jv>^@u 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 -- 2.47.3