diff options
Diffstat (limited to 'target/linux/mvebu/image')
-rw-r--r-- | target/linux/mvebu/image/Makefile | 9 | ||||
-rw-r--r-- | target/linux/mvebu/image/cortex-a53.mk | 10 | ||||
-rw-r--r-- | target/linux/mvebu/image/udpu.bootscript | 38 |
3 files changed, 54 insertions, 3 deletions
diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile index 57e5a30491..b4b77b70b4 100644 --- a/target/linux/mvebu/image/Makefile +++ b/target/linux/mvebu/image/Makefile @@ -68,6 +68,15 @@ define Build/omnia-medkit-initramfs --file=$@ -C $(dir $(IMAGE_KERNEL))boot/ . endef +define Build/uDPU-firmware + (rm -fR $@-fw; mkdir -p $@-fw) + $(CP) $(BIN_DIR)/$(IMAGE_PREFIX)-initramfs.itb $@-fw/recovery.itb + $(CP) $@-boot.scr $@-fw/boot.scr + (cd $(TARGET_DIR); $(TAR) -cvzf $@-fw/rootfs.tgz .) + (cd $@.boot; $(TAR) -cvzf $@-fw/boot.tgz .) + (cd $@-fw; $(TAR) -cvzf $(KDIR_TMP)/$(IMAGE_PREFIX)-firmware.tgz .) +endef + define Device/Default PROFILES := Default BOARD_NAME = $$(DEVICE_DTS) diff --git a/target/linux/mvebu/image/cortex-a53.mk b/target/linux/mvebu/image/cortex-a53.mk index 228155ec11..e0b2b5e186 100644 --- a/target/linux/mvebu/image/cortex-a53.mk +++ b/target/linux/mvebu/image/cortex-a53.mk @@ -35,7 +35,7 @@ define Device/marvell_armada-3720-db endef TARGET_DEVICES += marvell_armada-3720-db -define Device/methode_uDPU +define Device/methode_udpu $(call Device/Default-arm64) DEVICE_TITLE := Methode micro-DPU (uDPU) DEVICE_DTS := armada-3720-uDPU @@ -44,8 +44,12 @@ define Device/methode_uDPU KERNEL_INITRAMFS_SUFFIX := .itb DEVICE_PACKAGES := f2fs-tools e2fsprogs fdisk ethtool kmod-usb2 kmod-usb3 \ kmod-e100 kmod-e1000 kmod-e1000e kmod-igb kmod-ixgbevf \ - kmod-mdio-gpio kmod-switch-mvsw61xx + kmod-mdio-gpio kmod-switch-mvsw61xx kmod-i2c-pxa + IMAGE_NAME = $$(IMAGE_PREFIX)-$$(2) + IMAGES := firmware.tgz + IMAGE/firmware.tgz := boot-scr | boot-img-ext4 | uDPU-firmware | append-metadata + BOOT_SCRIPT := udpu endef -TARGET_DEVICES += methode_uDPU +TARGET_DEVICES += methode_udpu endif diff --git a/target/linux/mvebu/image/udpu.bootscript b/target/linux/mvebu/image/udpu.bootscript new file mode 100644 index 0000000000..1da35a793e --- /dev/null +++ b/target/linux/mvebu/image/udpu.bootscript @@ -0,0 +1,38 @@ +# Bootscript for Methode uDPU device +# Device and variables may vary between different revisions +# of device, so we need to make sure everything is set correctly. + +# Set the LED's correctly +gpio clear 12; gpio clear 40; gpio clear 45; + +# Find eMMC device, +if mmc dev 0; then + setenv mmcdev 0 + setenv rootdev 'root=/dev/mmcblk0p3' +elif mmc dev 1; then + setenv mmcdev 1 + setenv rootdev 'root=/dev/mmcblk1p3' +fi + +# Set the variables if necessary +if test ${kernel_addr_r}; then + setenv kernel_addr_r 0x5000000 +fi + +if test ${fdt_add_r}; then + setenv fdt_addr_r 0x4f00000 +fi + +setenv console 'console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000' +setenv bootargs ${console} $rootdev rw rootwait + +load mmc ${mmcdev}:1 ${fdt_addr_r} @DTB@.dtb +load mmc ${mmcdev}:1 ${kernel_addr_r} Image + +booti ${kernel_addr_r} - ${fdt_addr_r} + +# If the boot command fails, fallback to recovery image +echo '-- Boot failed, falling back to the recovery image --' +setenv bootargs $console +load mmc ${mmcdev}:2 ${kernel_addr_r} recovery.itb +bootm ${kernel_addr_r} |