aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mvebu/image
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/mvebu/image')
-rw-r--r--target/linux/mvebu/image/cortexa9.mk3
-rw-r--r--target/linux/mvebu/image/turris-omnia.bootscript17
2 files changed, 19 insertions, 1 deletions
diff --git a/target/linux/mvebu/image/cortexa9.mk b/target/linux/mvebu/image/cortexa9.mk
index 7f746e553b..ea20a25a29 100644
--- a/target/linux/mvebu/image/cortexa9.mk
+++ b/target/linux/mvebu/image/cortexa9.mk
@@ -39,11 +39,12 @@ define Device/cznic_turris-omnia
wpad-basic-wolfssl kmod-ath9k kmod-ath10k-ct ath10k-firmware-qca988x-ct \
partx-utils kmod-i2c-mux-pca954x
IMAGES := $$(IMAGE_PREFIX)-sysupgrade.img.gz omnia-medkit-$$(IMAGE_PREFIX)-initramfs.tar.gz
- IMAGE/$$(IMAGE_PREFIX)-sysupgrade.img.gz := boot-img | sdcard-img | gzip | append-metadata
+ IMAGE/$$(IMAGE_PREFIX)-sysupgrade.img.gz := boot-scr | boot-img | sdcard-img | gzip | append-metadata
IMAGE/omnia-medkit-$$(IMAGE_PREFIX)-initramfs.tar.gz := omnia-medkit-initramfs | gzip
IMAGE_NAME = $$(2)
SOC := armada-385
SUPPORTED_DEVICES += armada-385-turris-omnia
+ BOOT_SCRIPT := turris-omnia
endef
TARGET_DEVICES += cznic_turris-omnia
diff --git a/target/linux/mvebu/image/turris-omnia.bootscript b/target/linux/mvebu/image/turris-omnia.bootscript
new file mode 100644
index 0000000000..fcec5fc1b8
--- /dev/null
+++ b/target/linux/mvebu/image/turris-omnia.bootscript
@@ -0,0 +1,17 @@
+# Determine root device
+setexpr rootpart ${distro_bootpart} + 1
+if test ${devtype} = mmc -a ${devnum} = 0; then
+ setenv rootdev /dev/mmcblk0p${rootpart}
+elif test ${devtype} = scsi -a ${devnum} = 0; then
+ setenv rootdev /dev/sda${rootpart}
+else
+ # New U-Boot only
+ part uuid ${devtype} ${devnum}:${rootpart} uuid
+ setenv rootdev PARTUUID=${uuid}
+fi
+setenv bootargs earlyprintk console=ttyS0,115200 root=${rootdev} rootfstype=auto rootwait
+
+# Load and boot
+load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} @DTB@.dtb
+load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} zImage
+bootz ${kernel_addr_r} - ${fdt_addr_r}