build/patch/u-boot/legacy/u-boot-s5p6818/script-loading.patch

34 lines
1.3 KiB
Diff

diff --git a/include/configs/s5p6818_nanopim3.h b/include/configs/s5p6818_nanopim3.h
index 4175ecc..3bbe990 100644
--- a/include/configs/s5p6818_nanopim3.h
+++ b/include/configs/s5p6818_nanopim3.h
@@ -296,12 +296,23 @@
"stderr=serial,vga"
#define CONFIG_BOOTARGS \
- "console=ttySAC0,115200n8 initrd=0x49000000,0x2000000"
+ "rootdev=/dev/mmcblk2p1\0" \
+ "fdt_addr=0x48000000\0" \
+ "scriptaddr=0x40000000\0" \
+ "ramdisk_addr_r=0x49000000\0" \
+ "kernel_addr_r=0x4a000000\0" \
+ "console=ttySAC0,115200n8 root=${rootdev} console=tty1\0" \
+ "boot_a_script=mw ${scriptaddr} 0x100000; ext4load mmc ${devnum}:1 ${scriptaddr} ${prefix}boot.scr; source ${scriptaddr}\0" \
+ "boot_prefixes=/ /boot/\0" \
+ "boot_targets=1 0\0"\
+ "bootcmd=run distro_bootcmd;\0" \
+ "bootcmd_mmc0=setenv devnum 0; run scan_dev_for_boot;\0" \
+ "bootcmd_mmc1=setenv devnum 1; run scan_dev_for_boot;\0" \
+ "distro_bootcmd=for target in ${boot_targets}; do run bootcmd_mmc${target}; done;\0" \
+ "scan_dev_for_boot=for prefix in ${boot_prefixes}; do run boot_a_script; done;\0"
#define CONFIG_BOOTCOMMAND \
- "echo Waiting for environment...;" \
- "udown 0x48000000; " \
- "env import -t -r 0x48000000; " \
- "run bootcmd2"
+ "echo Booting Armbian...;" \
+ "run bootcmd;"
#endif /* __CONFIG_H__ */