-
Notifications
You must be signed in to change notification settings - Fork 6
/
uboot-script.cmd
28 lines (21 loc) · 945 Bytes
/
uboot-script.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
28
# Custom U-Boot startup script for Nerves
echo "Running Nerves U-Boot script"
# Kernel arguments and arguments to erlinit are passed here
# The erlinit arguments can just be tacked on to the end.
# For example, add "-v" to the end to put erlinit into verbose
# mode.
# Determine the boot arguments
#
# Note the root filesystem specification. In Linux, /dev/mmcblk0 is always
# the boot device. In uboot, mmc 0 is the SDCard.
# Therefore, we hardcode root=/dev/mmcblk0p2 since we always want to mount
# the root partition off the same device that ran u-boot and supplied
# zImage.
setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 maxcpus=1 monitor_onoff=false rootfstype=squashfs ro rootwait
# Load the kernel
load mmc 0:1 ${kernel_addr_r} zImage
# Load the DT. On the BBB, fdtfile=sun8i-h3-nanopi-neo.dtb
load mmc 0:1 ${fdt_addr_r} ${fdtfile}
# Boot!!
bootz ${kernel_addr_r} - ${fdt_addr_r}
echo "Nerves boot failed!"