-
Notifications
You must be signed in to change notification settings - Fork 1
/
boot.cmd
27 lines (21 loc) · 963 Bytes
/
boot.cmd
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
# Hardcoded addresses to load vmlinuz and dtb copied from
# https://www.hardkernel.com/blog-2/upstream-u-boot-for-odroid-xu4/
# Expect all files to be on the first partition of the SD card (2:1)
# Load compressed kernel image
fatload mmc 2:1 0x40008000 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).
fatload mmc 2:1 0x42000000 cmdline.txt
setexpr cmdline_end 0x42000000 + ${filesize}
# Write 0 byte to the end of cmdline.txt (to terminate the string).
mw.w ${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 *0x42000000
echo "Boot args: ${bootargs}"
# Load dtb
fatload mmc 2:1 0x44000000 exynos5422-odroidhc1.dtb
# ... and set fdt addr to it.
fdt addr 0x44000000
# Boot with compressed kernel without initrd
bootz 0x40008000 - 0x44000000