Skip to content

Commit c400827

Browse files
committed
WiP: Update bootscript to support bootconfig
1 parent 7be76e4 commit c400827

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

config/bootscripts/boot-onecloud.cmd

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,18 @@ setenv bootargs "${bootargs} root=${rootdev} rootwait rw"
5656
setenv bootargs "${bootargs} ${consoleargs}"
5757
setenv bootargs "${bootargs} ${extraargs}"
5858

59+
# Read bootconfig
60+
fatload ${bootdev} 0x20800000 /bootconfig || exit 1
61+
env import -t 0x20800000 ${filesize}
62+
63+
# Use default bootconfig
64+
test -n "${ARMBIAN_BOOTMENU_TITLE[0]}" || exit 1
65+
run "ARMBIAN_BOOTMENU_COMMAND[0]"
66+
5967
# Booting
60-
fatload ${bootdev} 0x20800000 /uImage || exit 1
61-
fatload ${bootdev} 0x22000000 /uInitrd || exit 1
62-
fatload ${bootdev} 0x21800000 /dtb/meson8b-onecloud.dtb || exit 1
68+
fatload ${bootdev} 0x20800000 "/${KERNEL_NAME}" || exit 1
69+
fatload ${bootdev} 0x22000000 "/${INITRD_NAME}" || exit 1
70+
fatload ${bootdev} 0x21800000 "/${DTB_NAME}/meson8b-onecloud.dtb" || exit 1
6371

6472
bootm 0x20800000 0x22000000 0x21800000
6573

0 commit comments

Comments
 (0)