aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/imx
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/imx')
-rw-r--r--target/linux/imx/cortexa7/base-files/etc/board.d/02_network3
-rw-r--r--target/linux/imx/cortexa7/base-files/lib/preinit/79_move_config15
-rw-r--r--target/linux/imx/cortexa7/base-files/lib/upgrade/platform.sh49
-rw-r--r--target/linux/imx/image/bootscript-technexion_imx7d-pico-pi18
-rw-r--r--target/linux/imx/image/cortexa7.mk18
5 files changed, 98 insertions, 5 deletions
diff --git a/target/linux/imx/cortexa7/base-files/etc/board.d/02_network b/target/linux/imx/cortexa7/base-files/etc/board.d/02_network
index 75d1c7d1d8..8ada58e6c1 100644
--- a/target/linux/imx/cortexa7/base-files/etc/board.d/02_network
+++ b/target/linux/imx/cortexa7/base-files/etc/board.d/02_network
@@ -5,6 +5,9 @@ board=$(board_name)
board_config_update
case "$board" in
+technexion,imx7d-pico-pi)
+ ucidef_set_interface_lan "eth0"
+ ;;
*)
ucidef_set_interfaces_lan_wan "eth0" "eth1"
;;
diff --git a/target/linux/imx/cortexa7/base-files/lib/preinit/79_move_config b/target/linux/imx/cortexa7/base-files/lib/preinit/79_move_config
new file mode 100644
index 0000000000..7bdb2d5499
--- /dev/null
+++ b/target/linux/imx/cortexa7/base-files/lib/preinit/79_move_config
@@ -0,0 +1,15 @@
+. /lib/imx.sh
+. /lib/functions.sh
+. /lib/upgrade/common.sh
+
+move_config() {
+ local board=$(board_name)
+
+ case "$board" in
+ technexion,imx7d-pico-pi)
+ imx_sdcard_move_config
+ ;;
+ esac
+}
+
+boot_hook_add preinit_mount_root move_config
diff --git a/target/linux/imx/cortexa7/base-files/lib/upgrade/platform.sh b/target/linux/imx/cortexa7/base-files/lib/upgrade/platform.sh
index 9a613c43b1..1bdc2aa4b9 100644
--- a/target/linux/imx/cortexa7/base-files/lib/upgrade/platform.sh
+++ b/target/linux/imx/cortexa7/base-files/lib/upgrade/platform.sh
@@ -1,16 +1,55 @@
-PART_NAME=firmware
-REQUIRE_IMAGE_METADATA=1
+. /lib/imx.sh
+
+RAMFS_COPY_BIN='blkid jffs2reset'
+
+enable_image_metadata_check() {
+ case "$(board_name)" in
+ technexion,imx7d-pico-pi)
+ REQUIRE_IMAGE_METADATA=1
+ ;;
+ esac
+}
+enable_image_metadata_check
platform_check_image() {
- return 0
+ local board=$(board_name)
+
+ case "$board" in
+ technexion,imx7d-pico-pi)
+ return 0
+ ;;
+ esac
+
+ echo "Sysupgrade is not yet supported on $board."
+ return 1
}
platform_do_upgrade() {
local board=$(board_name)
case "$board" in
- *)
- default_do_upgrade "$1"
+ technexion,imx7d-pico-pi)
+ imx_sdcard_do_upgrade "$1"
+ ;;
+ esac
+}
+
+platform_copy_config() {
+ local board=$(board_name)
+
+ case "$board" in
+ technexion,imx7d-pico-pi)
+ imx_sdcard_copy_config
+ ;;
+ esac
+}
+
+platform_pre_upgrade() {
+ local board=$(board_name)
+
+ case "$board" in
+ technexion,imx7d-pico-pi)
+ imx_sdcard_pre_upgrade
;;
esac
}
diff --git a/target/linux/imx/image/bootscript-technexion_imx7d-pico-pi b/target/linux/imx/image/bootscript-technexion_imx7d-pico-pi
new file mode 100644
index 0000000000..7521cce7f1
--- /dev/null
+++ b/target/linux/imx/image/bootscript-technexion_imx7d-pico-pi
@@ -0,0 +1,18 @@
+echo "PICO-PI-IMX7 OpenWrt boot script"
+
+# Initial setup, avoid overwriting environment every boot
+if test ${bootm_boot_mode} != nonsec; then setenv bootm_boot_mode nonsec; setenv bootcmd run bootcmd_mmc0; saveenv; fi
+
+# Set console variable for both UART and HDMI
+setenv console "console=ttymxc4,115200 console=tty0 video=DPI-1:800x480-32"
+setenv fdt_name imx7d-pico-pi.dtb
+setenv mmcdev 0
+setenv mmcrootpart 2
+part uuid mmc ${mmcdev}:${mmcrootpart} uuid
+
+# Boot from eMMC is the only supported option
+setenv bootargs "${console} root=PARTUUID=${uuid} rw rootwait"
+mmc dev ${mmcdev}
+load ${devtype} ${mmcdev}:${devplist} ${kernel_addr_r} /uImage
+load ${devtype} ${mmcdev}:${devplist} ${fdt_addr_r} /${fdt_name}
+bootm ${kernel_addr_r} - ${fdt_addr_r}
diff --git a/target/linux/imx/image/cortexa7.mk b/target/linux/imx/image/cortexa7.mk
index 9b2159c540..b4ac1b6904 100644
--- a/target/linux/imx/image/cortexa7.mk
+++ b/target/linux/imx/image/cortexa7.mk
@@ -1,3 +1,5 @@
+DEVICE_VARS += UBOOT
+
include common.mk
define Device/Default
@@ -10,3 +12,19 @@ define Device/Default
KERNEL_LOADADDR := 0x80008000
IMAGES :=
endef
+
+define Device/technexion_imx7d-pico-pi
+ DEVICE_VENDOR := TechNexion
+ DEVICE_MODEL := PICO-PI-IMX7D
+ UBOOT := pico-pi-imx7d
+ DEVICE_DTS := imx7d-pico-pi
+ DEVICE_PACKAGES := kmod-sound-core kmod-sound-soc-imx kmod-sound-soc-imx-sgtl5000 \
+ kmod-can kmod-can-flexcan kmod-can-raw kmod-leds-gpio \
+ kmod-input-touchscreen-edt-ft5x06 kmod-usb-hid kmod-btsdio \
+ kmod-brcmfmac cypress-firmware-4339-sdio cypress-nvram-4339-pico-pi-imx7d
+ FILESYSTEMS := squashfs
+ IMAGES := combined.bin sysupgrade.bin
+ IMAGE/combined.bin := append-rootfs | pad-extra 128k | imx-sdcard-raw-uboot
+ IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
+endef
+TARGET_DEVICES += technexion_imx7d-pico-pi