imx: add Gateworks Venice support
Add support for Gateworks Venice imx8m family of boards:
- required kernel modules for on-board devices
- image generation
- initial network config
- sysupgrade support
The resulting compressed disk image
(bin/targets/imx/cortexa53/openwrt-imx-cortexa53-gateworks_venice-squashfs-img.gz)
can be installed on a Gateworks venice board via U-Boot:
u-boot=> tftpboot $loadaddr openwrt-imx-cortexa53-gateworks_venice-squashfs-img.gz && \
gzwrite mmc $dev $loadaddr $filesize
WARNING: this will overwrite any boot firmware on the eMMC user hardware
partition which if being used will brick your board requiring JTAG to
re-program boot firmware and recover
The compressed disk image contains the partition table and filesystems only
and that it is expected that boot firmware is installed properly on the
eMMC boot0 hardware partition. The easiest way to ensure this is to
use the Gateworks JTAG adapter/process to install the latest boot firmware
as follows from a Linux host:
wget http://dev.gateworks.com/jtag/jtag_usbv4
chmod +x jtag_usbv4
wget http://dev.gateworks.com/venice/images/firmware-venice-imx8mm.bin
sudo ./jtag_usbv4 -p firmware-venice-imx8mm.bin
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
This commit is contained in:
27
target/linux/imx/cortexa53/base-files/etc/board.d/02_network
Normal file
27
target/linux/imx/cortexa53/base-files/etc/board.d/02_network
Normal file
@@ -0,0 +1,27 @@
|
||||
. /lib/functions/uci-defaults.sh
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
board_config_update
|
||||
|
||||
case "$board" in
|
||||
gw,imx8mm-gw72xx-0x|\
|
||||
gw,imx8mp-gw72xx-2x|\
|
||||
gw,imx8mm-gw73xx-0x|\
|
||||
gw,imx8mp-gw73xx-2x|\
|
||||
gw,imx8mm-gw7902-0x)
|
||||
ucidef_set_interfaces_lan_wan 'eth1' 'eth0'
|
||||
;;
|
||||
gw,imx8mm-gw7901)
|
||||
ucidef_set_interfaces_lan_wan 'lan2 lan3 lan4' 'lan1'
|
||||
;;
|
||||
gateworks,imx8mp-gw74xx)
|
||||
ucidef_set_network_device_path "eth0" "platform/soc@0/30800000.bus/30bf0000.ethernet"
|
||||
ucidef_set_network_device_path "eth1" "platform/soc@0/30800000.bus/30be0000.ethernet"
|
||||
ucidef_set_interfaces_lan_wan 'lan1 lan2 lan3 lan4' 'eth1'
|
||||
;;
|
||||
esac
|
||||
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,17 @@
|
||||
. /lib/functions.sh
|
||||
. /lib/upgrade/common.sh
|
||||
|
||||
move_config() {
|
||||
local board=$(board_name)
|
||||
local partdev
|
||||
|
||||
export_bootdevice && export_partdevice partdev 1 && {
|
||||
mount -o rw,noatime "/dev/$partdev" /mnt
|
||||
[ -f "/mnt/$BACKUP_FILE" ] && {
|
||||
mv -f "/mnt/$BACKUP_FILE" /
|
||||
}
|
||||
umount /mnt
|
||||
}
|
||||
}
|
||||
|
||||
boot_hook_add preinit_mount_root move_config
|
||||
53
target/linux/imx/cortexa53/base-files/lib/upgrade/platform.sh
Executable file
53
target/linux/imx/cortexa53/base-files/lib/upgrade/platform.sh
Executable file
@@ -0,0 +1,53 @@
|
||||
|
||||
enable_image_metadata_check() {
|
||||
case "$(board_name)" in
|
||||
gw,imx8m*)
|
||||
REQUIRE_IMAGE_METADATA=1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
enable_image_metadata_check
|
||||
|
||||
platform_check_image() {
|
||||
local board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
gw,imx8m*)
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Sysupgrade is not yet supported on $board."
|
||||
return 1
|
||||
}
|
||||
|
||||
platform_do_upgrade() {
|
||||
local board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
gw,imx8m*)
|
||||
export_bootdevice && export_partdevice diskdev 0 || {
|
||||
echo "Unable to find root device."
|
||||
return 1
|
||||
}
|
||||
v "Updating /dev/$diskdev..."
|
||||
get_image "$@" | dd of="/dev/$diskdev" bs=4096 conv=fsync
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
platform_copy_config() {
|
||||
local board=$(board_name)
|
||||
local partdev
|
||||
|
||||
case "$board" in
|
||||
gw,imx8m*)
|
||||
export_partdevice partdev 1 && {
|
||||
v "Storing $UPGRADE_BACKUP on /dev/$partdev..."
|
||||
mount -o rw,noatime "/dev/$partdev" /mnt
|
||||
cp -af "$UPGRADE_BACKUP" "/mnt/$BACKUP_FILE"
|
||||
umount /mnt
|
||||
}
|
||||
;;
|
||||
esac
|
||||
}
|
||||
@@ -45,6 +45,7 @@ CONFIG_CMA_AREAS=7
|
||||
# CONFIG_CMA_DEBUG is not set
|
||||
# CONFIG_CMA_DEBUGFS is not set
|
||||
# CONFIG_CMA_SYSFS is not set
|
||||
# CONFIG_COMMON_CLK_BD718XX is not set
|
||||
CONFIG_CONSOLE_TRANSLATIONS=y
|
||||
CONFIG_CONTIG_ALLOC=y
|
||||
CONFIG_CRYPTO_AES_ARM64=y
|
||||
@@ -96,9 +97,16 @@ CONFIG_INTERCONNECT_IMX8MN=y
|
||||
CONFIG_INTERCONNECT_IMX8MP=y
|
||||
CONFIG_INTERCONNECT_IMX8MQ=y
|
||||
CONFIG_MEMORY_ISOLATION=y
|
||||
CONFIG_MFD_CORE=y
|
||||
CONFIG_MFD_ROHM_BD718XX=y
|
||||
# CONFIG_MMC_SDHCI_PCI is not set
|
||||
CONFIG_MODULES_USE_ELF_RELA=y
|
||||
CONFIG_NEED_SG_DMA_LENGTH=y
|
||||
# CONFIG_NET_DSA_MICROCHIP_KSZ8863_SMI is not set
|
||||
CONFIG_NET_DSA_MICROCHIP_KSZ9477_I2C=y
|
||||
CONFIG_NET_DSA_MICROCHIP_KSZ_COMMON=y
|
||||
# CONFIG_NET_DSA_MICROCHIP_KSZ_SPI is not set
|
||||
CONFIG_NET_DSA_TAG_KSZ=y
|
||||
CONFIG_NOP_USB_XCEIV=y
|
||||
CONFIG_PARTITION_PERCPU=y
|
||||
CONFIG_PCI=y
|
||||
@@ -133,8 +141,11 @@ CONFIG_POWER_RESET=y
|
||||
CONFIG_POWER_SUPPLY=y
|
||||
CONFIG_QUEUED_RWLOCKS=y
|
||||
CONFIG_QUEUED_SPINLOCKS=y
|
||||
CONFIG_REGMAP_IRQ=y
|
||||
CONFIG_REGULATOR_BD718XX=y
|
||||
CONFIG_REGULATOR_MP5416=y
|
||||
CONFIG_REGULATOR_PCA9450=y
|
||||
CONFIG_REGULATOR_ROHM=y
|
||||
CONFIG_RESET_IMX7=y
|
||||
CONFIG_RODATA_FULL_DEFAULT_ENABLED=y
|
||||
CONFIG_SOC_IMX8M=y
|
||||
|
||||
Reference in New Issue
Block a user