aboutsummaryrefslogtreecommitdiff
path: root/96boards-b2260
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2017-01-16 16:21:17 +0000
committerFathi Boudra <fathi.boudra@linaro.org>2017-01-16 17:11:21 +0000
commit835d7983a05fe2bb136af5234629d1f3bf8149f2 (patch)
tree41770acd7c94ba34840bbc53b77a87e17f2fa37b /96boards-b2260
parent571fe3465df5525bbd385fc98de0a973ec7033c4 (diff)
96boards-b2260: Provide u-boot environment
This file is used as a template on first boot to build primary env file referenced by u-boot on subsequent boots. Change-Id: Ib62045f5d8a59f4bee550189f003fcf90a12d040 Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to '96boards-b2260')
-rw-r--r--96boards-b2260/boot/b2260/uEnv_sd.txt31
1 files changed, 31 insertions, 0 deletions
diff --git a/96boards-b2260/boot/b2260/uEnv_sd.txt b/96boards-b2260/boot/b2260/uEnv_sd.txt
new file mode 100644
index 00000000..498e9f52
--- /dev/null
+++ b/96boards-b2260/boot/b2260/uEnv_sd.txt
@@ -0,0 +1,31 @@
+# Init kernel and fdt config
+fdt_high=0xFFFFFFFF
+fdt_file=stih410-b2260.dtb
+fdt_load_addr=0x47000000
+kernel_file=uImage
+kernel_load_addr=0x60000000
+
+# Init device settings
+device_part=0:1
+
+# Init error message when filesystem load or read fails
+read_error_message=echo <ERROR> Unable to read \${part} filesystem on mmc at ${device_part} partition
+load_error_message=echo <ERROR> ${file} not available on mmc at ${device_part} partition
+
+# Check device interface availability and run load action if ok
+read_from_device=if \${part}ls mmc ${device_part}; then run load_kernel; else run read_error_message; fi
+
+# Load kernel and fdt, then launch boot action if ok
+load_kernel=if \${part}load mmc ${device_part} ${kernel_load_addr} ${kernel_file}; then run load_fdt ; else setenv file ${kernel_file}; run load_error_message; fi
+load_fdt=if \${part}load mmc ${device_part} ${fdt_load_addr} ${fdt_file}; then run run_boot; else setenv file ${fdt_file}; run load_error_message; fi
+
+# Check ethaddr and set it for kernel
+check_ethaddr=if test "x$ethaddr" = "x"; then echo <INFO> Set ethaddr...; readmac; if test "x$ethaddr" = "x"; then askenv ethaddr; fi; fi
+
+# Set bootargs and then boot
+run_boot=setenv bootargs console=ttyAS1,115200 CONSOLE=/dev/ttyAS1 consoleblank=0 root=/dev/mmcblk0p2 rootfstype=ext4 rw rootwait mem=992M@0x40000000 vmalloc=256m ; bootm ${kernel_load_addr} - ${fdt_load_addr}
+
+# Set boot command
+bootcmd=run check_ethaddr; echo <INFO> Load kernel and fdt to RAM...; run read_from_device
+
+boot