From 0ef28ea3875809ec4bebee29d908f31dd7c42b86 Mon Sep 17 00:00:00 2001 From: Tomasz Maciej Nowak Date: Wed, 14 Feb 2018 17:34:38 +0100 Subject: mvebu: unify boot.scr creation Unify boot.scr generation so Makefile for device image generation won't grow without a reason. Also make boot-scr step optional. Signed-off-by: Tomasz Maciej Nowak --- .../image/armada-388-clearfog-base.bootscript | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 target/linux/mvebu/image/armada-388-clearfog-base.bootscript (limited to 'target/linux/mvebu/image/armada-388-clearfog-base.bootscript') diff --git a/target/linux/mvebu/image/armada-388-clearfog-base.bootscript b/target/linux/mvebu/image/armada-388-clearfog-base.bootscript new file mode 100644 index 0000000..1755203 --- /dev/null +++ b/target/linux/mvebu/image/armada-388-clearfog-base.bootscript @@ -0,0 +1,27 @@ +# Standard Boot-Script +# use only well-known variable names provided by U-Boot Distro boot +# This script assumes that there is a boot partition, +# and that the root partition is always the next one. + +# Override DeviceTree for Clearfog Base +# removed once U-Boot is able to detect the board variant. +setenv fdtfile armada-388-clearfog-base.dtb + +# rootfs is always on the next partition +setexpr openwrt_rootpart ${distro_bootpart} + 1 + +# figure out partition uuid to pass to the kernel as root= +part uuid ${devtype} ${devnum}:${openwrt_rootpart} uuid + +# generate bootargs (rootfs) +setenv bootargs ${bootargs} root=PARTUUID=${uuid} rootfstype=auto rootwait + +# add console= option to bootargs, if any +if test -n "${console}"; then + setenv bootargs ${bootargs} console=${console} +fi + +echo "Booting Linux with ${bootargs}" +load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${fdtfile} +load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} zImage +bootz ${kernel_addr_r} - ${fdt_addr_r} -- cgit v1.1