-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathboot.cmd
More file actions
27 lines (21 loc) · 935 Bytes
/
boot.cmd
File metadata and controls
27 lines (21 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
echo "Loading kernel ..."
# Load compressed kernel image
load ${devtype} ${devnum}:${bootpart} ${kernel_addr_r} vmlinuz
# Emulate cmdline.txt behavior from Raspberry Pi devices.
# Load cmdline.txt into memory (exact location doesn't matter, it shouldn't conflict with any other loads).
load ${devtype} ${devnum}:${bootpart} ${ramdisk_addr_r} cmdline.txt
setexpr cmdline_end ${ramdisk_addr_r} + ${filesize}
# Write 0 byte to the end of cmdline.txt (to terminate the string).
mw.b ${cmdline_end} 0 1
# ... and set string value of var bootargs to it.
# Requires CONFIG_CMD_SETEXPR=y while building u-boot.
setexpr.s bootargs *${ramdisk_addr_r}
echo "Boot args: ${bootargs}"
# Load dtb
setenv fdtfile cv1800b-milkv-duo.dtb
load ${devtype} ${devnum}:${bootpart} ${fdt_addr_r} ${fdtfile}
# ... and set fdt addr to it.
fdt addr ${fdt_addr_r}
echo "Booting kernel ..."
# Boot kernel without initrd
booti ${kernel_addr_r} - ${fdt_addr_r}