Merge branch 'dey-4.0/master' into dey-4.0/maint

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
This commit is contained in:
Hector Palacios 2023-05-11 13:19:32 +02:00
commit e600597024
125 changed files with 2240 additions and 932 deletions

View File

@ -1,5 +1,5 @@
# Digi Embedded Yocto (DEY) 4.0
## Release 4.0-r2
## Release 4.0-r3
This document provides information about Digi Embedded Yocto,
Digi International's professional embedded Yocto development environment.

View File

@ -207,7 +207,14 @@ trustence_sign_cpio() {
[ -n "${TRUSTFENCE_DEK_PATH}" ] && [ "${TRUSTFENCE_DEK_PATH}" != "0" ] && export CONFIG_DEK_PATH="${TRUSTFENCE_DEK_PATH}"
# Sign/encrypt the ramdisk
trustfence-sign-artifact.sh -p "${DIGI_FAMILY}" -i "${1}" "${1}.tf"
if [ "${DEY_SOC_VENDOR}" = "NXP" ]; then
trustfence-sign-artifact.sh -p "${DIGI_SOM}" -i "${1}" "${1}.tf"
elif [ "${DEY_SOC_VENDOR}" = "STM" ]; then
# TODO: sign the ramdisk for ST platforms
# (fall-back) Copy the image with no changes
cp "${1}" "${1}.tf"
fi
else
# Copy the image with no changes
cp "${1}" "${1}.tf"
@ -231,7 +238,7 @@ rootfs_sign() {
ROOTFS_IMAGE="${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.squashfs"
TMP_ROOTFS_IMAGE_SIGNED="$(mktemp ${ROOTFS_IMAGE}-signed.XXXXXX)"
# Sign rootfs read-only image
trustfence-sign-artifact.sh -p "${DIGI_FAMILY}" -r "${ROOTFS_IMAGE}" "${TMP_ROOTFS_IMAGE_SIGNED}"
trustfence-sign-artifact.sh -p "${DIGI_SOM}" -r "${ROOTFS_IMAGE}" "${TMP_ROOTFS_IMAGE_SIGNED}"
mv "${TMP_ROOTFS_IMAGE_SIGNED}" "${ROOTFS_IMAGE}"
}

View File

@ -1,2 +1,7 @@
pkg_postinst_ontarget:${PN}() {
python __anonymous() {
RPN = d.getVar("REMOVE_POSTINST_RPN")
if RPN is None:
RPN = d.getVar("PN")
if RPN:
d.setVar('pkg_postinst_ontarget:%s' % RPN, "")
}

View File

@ -19,8 +19,8 @@ BBFILES_DYNAMIC += " \
"
LAYERDEPENDS_digi-arm = "core"
LAYERDEPENDS_digi-arm += "${@oe.utils.conditional('DEY_BUILD_PLATFORM', 'NXP', 'freescale-layer', '', d)}"
LAYERDEPENDS_digi-arm += "${@oe.utils.conditional('DEY_BUILD_PLATFORM', 'STM', 'stm-st-stm32mp', '', d)}"
LAYERDEPENDS_digi-arm += "${@oe.utils.conditional('DEY_SOC_VENDOR', 'NXP', 'freescale-layer', '', d)}"
LAYERDEPENDS_digi-arm += "${@oe.utils.conditional('DEY_SOC_VENDOR', 'STM', 'stm-st-stm32mp', '', d)}"
LAYERSERIES_COMPAT_digi-arm = "kirkstone"
@ -36,6 +36,13 @@ BBMASK += " \
meta-st-stm32mp/recipes-core/systemd/systemd-conf_%.bbappend \
"
# Tweak stm32mpu-ai dependencies to use ST's machine learning packages
LAYERDEPENDS_stm32mpu-ai:remove = "st-openstlinux"
BBMASK += " \
meta-st-stm32mpu-ai/recipes-st/images/st-image-ai-userfs.bb \
meta-st-stm32mpu-ai/recipes-st/images/st-image-ai.bb \
"
# Digi's General and Open Source license agreements
DIGI_EULA_FILE = "${LAYERDIR}/DIGI_EULA"
DIGI_OPEN_EULA_FILE = "${LAYERDIR}/DIGI_OPEN_EULA"

View File

@ -2,6 +2,8 @@
#@NAME: ConnectCore 6 QuadPlus Single Board Computer.
#@DESCRIPTION: Machine configuration for Digi's ConnectCore 6 QuadPlus SBC.
DIGI_SOM = "ccimx6qp"
# Include the machine configuration for Digi's ConnectCore 6 module.
include conf/machine/include/ccimx6.inc

View File

@ -2,6 +2,8 @@
#@NAME: ConnectCore 6 Single Board Computer.
#@DESCRIPTION: Machine configuration for Digi's ConnectCore 6 SBC.
DIGI_SOM = "ccimx6"
# Contains the ConnectCore 6 module.
include conf/machine/include/ccimx6.inc

View File

@ -2,8 +2,8 @@
#@NAME: ConnectCore 8M Mini Development Kit.
#@DESCRIPTION: Machine configuration for Digi's ConnectCore 8M Mini DVK.
DIGI_FAMILY = "ccimx8mm"
MACHINEOVERRIDES =. "mx8:mx8m:mx8mm:ccimx8m:${DIGI_FAMILY}:"
DIGI_SOM = "ccimx8mm"
MACHINEOVERRIDES =. "mx8:mx8m:mx8mm:${DIGI_FAMILY}:${DIGI_SOM}:"
# Include the machine configuration for Digi's ConnectCore 8M module.
include conf/machine/include/ccimx8m.inc

View File

@ -2,8 +2,8 @@
#@NAME: ConnectCore 8M Nano Development Kit.
#@DESCRIPTION: Machine configuration for Digi's ConnectCore 8M Nano DVK.
DIGI_FAMILY = "ccimx8mn"
MACHINEOVERRIDES =. "mx8:mx8m:mx8mn:ccimx8m:${DIGI_FAMILY}:"
DIGI_SOM = "ccimx8mn"
MACHINEOVERRIDES =. "mx8:mx8m:mx8mm:${DIGI_FAMILY}:${DIGI_SOM}:"
# Include the machine configuration for Digi's ConnectCore 8M module.
include conf/machine/include/ccimx8m.inc

View File

@ -2,8 +2,13 @@
#@NAME: ConnectCore 93 Development Kit
#@DESCRIPTION: Machine configuration for Digi's ConnectCore 93 DVK
DIGI_SOM = "ccimx93"
require include/ccimx93.inc
MACHINEOVERRIDES =. "${DIGI_FAMILY}:${DIGI_SOM}:"
MACHINEOVERRIDES =. "mx93:"
# U-Boot configurations
UBOOT_CONFIG ??= "ccimx93-dvk"
UBOOT_CONFIG[ccimx93-dvk] = "ccimx93-dvk_defconfig"
@ -11,14 +16,26 @@ UBOOT_DTB_NAME = "ccimx93-dvk.dtb"
KERNEL_DEVICETREE ?= " \
digi/ccimx93-dvk.dtb \
digi/_ov_board_dsi_display_ccimx93-dvk.dtbo \
digi/_ov_board_enet2_ccimx93-dvk.dtbo \
digi/_ov_board_lvds_ccimx93-dvk.dtbo \
digi/_ov_board_mikroe-accel2-click_ccimx93-dvk.dtbo \
digi/_ov_board_mikroe-gyro-click_ccimx93-dvk.dtbo \
digi/_ov_som_bt_ccimx93.dtbo \
digi/_ov_som_mca_ccimx93.dtbo \
digi/_ov_som_npu_ccimx93.dtbo \
digi/_ov_som_wifi_ccimx93.dtbo \
"
# Remove additional bluetooth packages
MACHINE_BLUETOOTH_EXTRA_INSTALL = ""
# Wireless external module
WIRELESS_MODULE ?= ""
WIRELESS_MODULE:append = " ${@oe.utils.conditional('HAVE_WIFI', '1', 'kernel-module-nxp-wlan', '', d)}"
HAS_WIFI_VIRTWLANS = "true"
# Machine firmware
MACHINE_FIRMWARE:append = " ${@oe.utils.conditional('HAVE_WIFI', '1', 'firmware-nxp-wifi-nxpiw612', '', d)}"
MACHINE_EXTRA_RRECOMMENDS += "${WIRELESS_MODULE}"
IMAGE_BOOT_FILES:append:use-nxp-bsp = " \
imx93_m33_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin \

View File

@ -6,11 +6,13 @@
# Include the machine configuration for Digi's ConnectCore MP1.
include conf/machine/include/ccmp1.inc
DIGI_SOM = "ccmp13"
# =========================================================================
# Chip architecture
# =========================================================================
DEFAULTTUNE = "cortexa7thf-neon-vfpv4"
MACHINEOVERRIDES = "arm:armv7ve:stcommon:stm32mpcommon:stm32mp1common:${DIGI_FAMILY}:ccmp13:ccmp13-dvk"
MACHINEOVERRIDES = "arm:armv7ve:stcommon:stm32mpcommon:stm32mp1common:${DIGI_FAMILY}:${DIGI_SOM}:ccmp13-dvk"
# =========================================================================
# boot device
@ -41,6 +43,7 @@ STM32MP_KERNEL_DEVICETREE:ccmp13-dvk += " \
_ov_board_mikroe-i2c-to-spi-click_ccmp13-dvk.dtbo \
_ov_board_pwm8_ccmp13-dvk.dtbo \
_ov_som_bt_ccmp13.dtbo \
_ov_som_bt_test_ccmp13.dtbo \
_ov_som_wifi_ccmp13.dtbo \
"
@ -144,29 +147,9 @@ XBEE_TTY ?= "ttySTM2"
# =========================================================================
ALSA_LIST = ""
# =========================================================================
# DISTRO features
# =========================================================================
DISTRO_FEATURES:remove = " opengl "
DISTRO_FEATURES:remove = " x11 "
# add support of optee
DISTRO_FEATURES:append = " optee "
# add support of splashscreen
#DISTRO_FEATURES:append = " splashscreen "
# add support of systemd
DISTRO_FEATURES:append = " systemd "
# add support of efi
DISTRO_FEATURES:append = " efi "
# add support of InitRD installation package
DISTRO_FEATURES:append = " initrd "
# add support to pulseaudio
DISTRO_FEATURES:append = "pulseaudio"
# Per-machine DISTRO_FEATURES customization
MACHINE_DISTRO_FEATURES_ADD = "efi optee"
MACHINE_DISTRO_FEATURES_REMOVE = "gstreamer opengl vulkan wayland x11"
# Disable use of vendorfs partition
ST_VENDORFS = "0"
@ -176,3 +159,7 @@ BOOTABLE_ARTIFACTS = " \
arm-trusted-firmware/tf-a-ccmp13-dvk-nand.stm32 \
fip/fip-ccmp13-dvk-optee.bin \
"
# TRUSTFENCE basic support
# Alternatively, uncommment to enable the console with the specified GPIO
# TRUSTFENCE_CONSOLE_GPIO_ENABLE_NAME ?= "GPIOB6"

View File

@ -6,11 +6,13 @@
# Include the machine configuration for Digi's ConnectCore MP1.
include conf/machine/include/ccmp1.inc
DIGI_SOM = "ccmp15"
# =========================================================================
# Chip architecture
# =========================================================================
DEFAULTTUNE = "cortexa7thf-neon-vfpv4"
MACHINEOVERRIDES = "arm:armv7ve:stcommon:stm32mpcommon:stm32mp1common:${DIGI_FAMILY}:ccmp15:ccmp15-dvk"
MACHINEOVERRIDES = "arm:armv7ve:stcommon:stm32mpcommon:stm32mp1common:${DIGI_FAMILY}:${DIGI_SOM}:ccmp15-dvk"
# =========================================================================
# boot device
@ -47,6 +49,7 @@ STM32MP_KERNEL_DEVICETREE:ccmp15-dvk += " \
_ov_board_mikroe-i2c-to-spi-click_ccmp15-dvk.dtbo \
_ov_board_v1_ccmp15-dvk.dtbo \
_ov_som_bt_ccmp15.dtbo \
_ov_som_bt_test_ccmp15.dtbo \
_ov_som_wifi_ccmp15.dtbo \
"
@ -148,36 +151,9 @@ XBEE_TTY ?= "ttySTM2"
# =========================================================================
ALSA_LIST = ""
# =========================================================================
# DISTRO features
# =========================================================================
DISTRO_FEATURES:append = " opengl"
DISTRO_FEATURES:remove = " x11 "
DISTRO_FEATURES:append = " gplv3 "
# add support of gstreamer
DISTRO_FEATURES:append = " gstreamer "
# add support of optee
DISTRO_FEATURES:append = " optee "
# add support of splashscreen
DISTRO_FEATURES:append = " splashscreen "
# add support of wayland
DISTRO_FEATURES:append = " wayland pam "
# add support of systemd
DISTRO_FEATURES:append = " systemd "
# add support of efi
DISTRO_FEATURES:append = " efi "
# add support of InitRD installation package
DISTRO_FEATURES:append = " initrd "
# add support to pulseaudio
DISTRO_FEATURES:append = "pulseaudio"
# Per-machine DISTRO_FEATURES customization
MACHINE_DISTRO_FEATURES_ADD = "efi optee"
MACHINE_DISTRO_FEATURES_REMOVE = "vulkan x11"
# Disable use of vendorfs partition
ST_VENDORFS = "0"
@ -188,12 +164,6 @@ BOOTABLE_ARTIFACTS = " \
fip/fip-ccmp15-dvk-optee.bin \
"
# SWUpdate sw-description configuration
BOOTFS_EXT ?= ".boot.ubifs"
ROOTFS_EXT ?= ".ubifs"
BOOT_DEV_NAME ?= "linux"
ROOTFS_DEV_NAME ?= "rootfs"
ROOTFS_ENC_DEV = "${ROOTFS_DEV_NAME}"
ROOTFS_DEV_NAME_FINAL = "${@oe.utils.ifelse(d.getVar('TRUSTFENCE_ENCRYPT_ROOTFS') == '1', '${ROOTFS_ENC_DEV}', '${ROOTFS_DEV_NAME}')}"
# TRUSTFENCE basic support
# Alternatively, uncommment to enable the console with the specified GPIO
# TRUSTFENCE_CONSOLE_GPIO_ENABLE_NAME ?= "GPIOA5"

View File

@ -3,7 +3,7 @@
#@DESCRIPTION: Machine configuration for Digi's ConnectCore 6 module.
DIGI_FAMILY = "ccimx6"
MACHINEOVERRIDES =. "mx6:mx6dl:mx6q:${DIGI_FAMILY}:"
MACHINEOVERRIDES =. "mx6:mx6dl:mx6q:${DIGI_FAMILY}:${DIGI_SOM}:"
include conf/machine/include/imx-digi-base.inc
include conf/machine/include/arm/armv7a/tune-cortexa9.inc
@ -33,9 +33,8 @@ MACHINE_FEATURES += "accel-graphics wifi bluetooth pci"
# TrustFence
TRUSTFENCE_SIGN_MODE = "HAB"
# Adding 'wayland' along with 'x11' enables the xwayland backend
# Adding pam is required for SELinux functionality
DISTRO_FEATURES:append = " wayland pam"
# Per-machine DISTRO_FEATURES customization
MACHINE_DISTRO_FEATURES_REMOVE = "vulkan"
# SWUpdate sw-description configuration
BOOTFS_EXT ?= ".boot.vfat"

View File

@ -2,8 +2,9 @@
#@NAME: ConnectCore for i.MX6UL.
#@DESCRIPTION: Machine configuration for Digi's ConnectCore 6UL.
DIGI_SOM = "ccimx6ul"
DIGI_FAMILY = "ccimx6ul"
MACHINEOVERRIDES =. "mx6:mx6ul:${DIGI_FAMILY}:"
MACHINEOVERRIDES =. "mx6:mx6ul:${DIGI_FAMILY}:${DIGI_SOM}:"
include conf/machine/include/imx-digi-base.inc
include conf/machine/include/arm/armv7a/tune-cortexa7.inc
@ -47,6 +48,9 @@ MKUBIFS_ARGS ?= "-m 2048 -e 126976 -c 8191"
# TrustFence
TRUSTFENCE_SIGN_MODE = "HAB"
# Per-machine DISTRO_FEATURES customization
MACHINE_DISTRO_FEATURES_REMOVE = "vulkan wayland"
# SWUpdate sw-description configuration
BOOTFS_EXT ?= ".boot.ubifs"
ROOTFS_EXT ?= '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", ".squashfs", ".ubifs", d)}'

View File

@ -5,6 +5,8 @@
include conf/machine/include/imx-digi-base.inc
require conf/machine/include/arm/armv8a/tune-cortexa53.inc
DIGI_FAMILY = "ccimx8m"
# Platform u-boot settings
UBOOT_PREFIX = "imx-boot"
UBOOT_SUFFIX = "bin"
@ -52,10 +54,6 @@ MACHINE_FEATURES += "accel-graphics wifi bluetooth cryptochip mca optee"
# TrustFence
TRUSTFENCE_SIGN_MODE = "HAB"
# Adding 'wayland' along with 'x11' enables the xwayland backend
# Vulkan is necessary for wayland to build
DISTRO_FEATURES:append = " wayland vulkan systemd pam"
# SWUpdate sw-description configuration
BOOTFS_EXT ?= ".boot.vfat"
ROOTFS_EXT ?= ".ext4.gz"

View File

@ -2,8 +2,9 @@
#@NAME: ConnectCore 8X module.
#@DESCRIPTION: Machine configuration for Digi's ConnectCore 8X module.
DIGI_SOM = "ccimx8x"
DIGI_FAMILY = "ccimx8x"
MACHINEOVERRIDES =. "mx8:mx8x:mx8qxp:${DIGI_FAMILY}:"
MACHINEOVERRIDES =. "mx8:mx8x:mx8qxp:${DIGI_FAMILY}:${DIGI_SOM}:"
include conf/machine/include/imx-digi-base.inc
include conf/machine/include/arm/armv8a/tune-cortexa35.inc
@ -69,10 +70,6 @@ MACHINE_FEATURES += "accel-graphics wifi bluetooth cryptochip pci mca"
# TrustFence
TRUSTFENCE_SIGN_MODE = "AHAB"
# Adding 'wayland' along with 'x11' enables the xwayland backend
# Vulkan is necessary for wayland to build
DISTRO_FEATURES:append = " wayland vulkan systemd pam"
# SWUpdate sw-description configuration
BOOTFS_EXT ?= ".boot.vfat"
ROOTFS_EXT ?= ".ext4.gz"

View File

@ -3,8 +3,6 @@
#@DESCRIPTION: Machine configuration for Digi's ConnectCore 93 family of SOMs
DIGI_FAMILY = "ccimx93"
MACHINEOVERRIDES =. "${DIGI_FAMILY}:"
MACHINEOVERRIDES =. "mx93:"
require conf/machine/include/imx-digi-base.inc
require conf/machine/include/arm/armv8-2a/tune-cortexa55.inc
@ -30,6 +28,7 @@ MACHINE_FEATURES += "pci wifi bluetooth"
MACHINE_FEATURES:append:use-nxp-bsp = " optee jailhouse"
STORAGE_MEDIA = "mmc"
WLAN_P2P_INTERFACE = "wfd0"
# Linux kernel configuration
KERNEL_DEFCONFIG ?= "arch/arm64/configs/ccimx93_defconfig"
@ -62,8 +61,8 @@ BT_TTY ?= "ttyLP0"
# Add additional firmware
MACHINE_FIRMWARE:append = " ethos-u-firmware"
# Adding 'wayland' along with 'x11' enables the xwayland backend
DISTRO_FEATURES:append = " wayland pam"
# Per-machine DISTRO_FEATURES customization
MACHINE_DISTRO_FEATURES_REMOVE = "vulkan"
# SWUpdate sw-description configuration
BOOTFS_EXT ?= ".boot.vfat"

View File

@ -17,7 +17,7 @@ FIP_UBOOT_DTB = "u-boot"
STORAGE_MEDIA = "mtd"
# Enable STM specific features
DEY_BUILD_PLATFORM = "STM"
DEY_SOC_VENDOR = "STM"
# SWUpdate sw-description configuration
BOOTFS_EXT ?= ".boot.ubifs"
@ -42,11 +42,14 @@ MACHINE_EXTRA_RDEPENDS += " \
mtd-utils-ubifs \
"
# Extra udev rules
MACHINE_EXTRA_RRECOMMENDS += "udev-extraconf"
# Image FS types
IMAGE_FSTYPES:remove = "ext4 tar.xz"
# List of supported boot devices
BOOTDEVICE_LABELS ?= "sdcard"
# Default secure console configuration
TRUSTFENCE_CONSOLE_DISABLE ?= "0"
# Alternatively, uncommment to enable the console autoboot stop passphrase
# TRUSTFENCE_CONSOLE_PASSPHRASE_ENABLE = ""

View File

@ -50,8 +50,8 @@ WLAN1_STATIC_NETMASK ?= "255.255.255.0"
P2P0_STATIC_IP ?= "192.168.45.30"
P2P0_STATIC_NETMASK ?= "255.255.255.0"
WLAN_P2P_INTERFACE ?= "p2p0"
WLAN_P2P_DEVICE_NAME ??= "${DIGI_FAMILY}-p2p"
BT_DEVICE_NAME ??= "${DIGI_FAMILY}"
WLAN_P2P_DEVICE_NAME ??= "${DIGI_SOM}-p2p"
BT_DEVICE_NAME ??= "${DIGI_SOM}"
# Digi BSP default settings
IMAGE_CLASSES = "image_types_digi"
@ -59,19 +59,21 @@ IMAGE_CLASSES = "image_types_digi"
# Do not enable console on VT (see sysvinit-inittab recipe)
USE_VT ?= "0"
# Add the machine variant to the valid machine override
MACHINE_VARIANT ?= ""
MACHINEOVERRIDES .= "${@['', ':${MACHINE_VARIANT}']['${MACHINE_VARIANT}' != '']}"
# Extra RDEPENDS
OPTEE_PKGS ??= ""
MACHINE_EXTRA_RDEPENDS += " \
${@bb.utils.contains("MACHINE_FEATURES", "mca", "mca-tool", "", d)} \
${@bb.utils.contains('MACHINE_FEATURES', 'optee', '${OPTEE_PKGS}', '', d)} \
"
# Extra RRECOMMENDS
MACHINE_EXTRA_RRECOMMENDS += " \
${@bb.utils.contains("MACHINE_FEATURES", "cryptochip", "cryptoauthlib", "", d)} \
"
# Extra rules when device manager is systemd or udev
UDEV_EXTRA_RULES = "udev-extraconf"
MACHINE_EXTRA_RRECOMMENDS += "${@bb.utils.contains_any('VIRTUAL-RUNTIME_dev_manager', 'systemd udev', '${UDEV_EXTRA_RULES}', '', d)}"
# Default image name (for install scripts)
DEFAULT_IMAGE_NAME ??= "dey-image-qt"
@ -87,3 +89,6 @@ BOOT_SCRIPTS += "boot.scr:boot.scr altboot.scr:altboot.scr"
# This can be used to enable U-Boot update through swupdate
SWUPDATE_UBOOTIMG ?= "false"
# Cloud Connector package to install
CLOUDCONNECTOR_PKG ?= "cloudconnector"

View File

@ -208,9 +208,6 @@ IMX_ALSA_EXTRA:imx-nxp-bsp = "imx-alsa-plugins"
MACHINE_EXTRA_RRECOMMENDS:append:mx6-nxp-bsp = " ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', '${IMX_ALSA_EXTRA}', '', d)}"
MACHINE_EXTRA_RRECOMMENDS:append:mx8-nxp-bsp = " ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', '${IMX_ALSA_EXTRA}', '', d)}"
# Extra udev rules
MACHINE_EXTRA_RRECOMMENDS += "udev-extraconf udev-rules-imx"
# GStreamer 1.0 plugins
MACHINE_GSTREAMER_1_0_PLUGIN ?= ""
MACHINE_GSTREAMER_1_0_PLUGIN:mx6dl-nxp-bsp ?= "imx-gst1.0-plugin"
@ -281,6 +278,9 @@ PREFERRED_VERSION_optee-client:mx9-nxp-bsp ??= "3.19.0.imx"
PREFERRED_VERSION_optee-test:mx8-nxp-bsp ??= "3.19.0.imx"
PREFERRED_VERSION_optee-test:mx9-nxp-bsp ??= "3.19.0.imx"
# Optee runtime packages to install
OPTEE_PKGS ??= "optee-client optee-os"
# Use i.MX opencv Version
PREFERRED_VERSION_opencv:mx8-nxp-bsp ??= "4.6.0.imx"
PREFERRED_VERSION_opencv:mx9-nxp-bsp ??= "4.6.0.imx"
@ -292,11 +292,11 @@ KERNEL_IMAGETYPE:aarch64 = "Image.gz"
MACHINE_FEATURES = "usbgadget usbhost vfat alsa touchscreen"
# Add a generic gstreamer distro feature for all IMX platforms
DISTRO_FEATURES:append = " gstreamer"
# IMX specific udev extra rules added when device manager is systemd/udev
UDEV_EXTRA_RULES:append = " udev-rules-imx"
# U-Boot 2017.X requires a specific dtc version.
PREFERRED_VERSION_dtc-native:ccimx6 ?= "1.4.5"
PREFERRED_VERSION_nativesdk-dtc:ccimx6 ?= "1.4.5"
DEY_BUILD_PLATFORM = "NXP"
DEY_SOC_VENDOR = "NXP"

View File

@ -0,0 +1,16 @@
# Copyright (C) 2023 Digi International.
LIC_FILES_CHKSUM:ccimx93 = "file://EULA.txt;md5=add2d392714d3096ed7e0f7e2190724b"
SRCBRANCH:ccimx93 = "lf-6.1.1_1.0.0"
SRCREV:ccimx93 = "bacbeb4789c1b13d13aab12ada29217ce8c3e905"
do_install:append:ccimx93() {
install -m 444 ${S}/nxp/FwImage_IW612_SD/sduart_nw61x_v1.bin.se ${D}${base_libdir}/firmware/nxp
}
PACKAGES:prepend:ccimx93 = "${PN}-nxpiw612 "
FILES:${PN}-nxpiw612 = " \
${base_libdir}/firmware/nxp/sduart_nw61x_v1.bin.se \
"

View File

@ -15,3 +15,57 @@ SRC_URI = " \
"
TF_A_CONFIG[nand] = "${DEVICE_BOARD_ENABLE:NAND},STM32MP_RAW_NAND=1 ${@'STM32MP_FORCE_MTD_START_OFFSET=${TF_A_MTD_START_OFFSET_NAND}' if ${TF_A_MTD_START_OFFSET_NAND} else ''} STM32MP_USB_PROGRAMMER=1"
DEPENDS += " \
${@oe.utils.conditional('TRUSTFENCE_SIGN', '1', 'trustfence-sign-tools-native trustfence-genpki-native', '', d)} \
"
# This dependency is required so that the PKI generation completes before
# proceeding with set_fip_sign_key() where we extract the password that
# is later used on the do_deploy of the fip-utils-stm32mp.bbclass.
do_install[depends] = " \
trustfence-sign-tools-native:do_populate_sysroot \
openssl-native:do_populate_sysroot \
"
# Obtain password to use in FIP generation
# Get password from file using the given key index
do_deploy[prefuncs] += "${@oe.utils.conditional('TRUSTFENCE_SIGN', '1', 'set_fip_sign_key', '', d)}"
python set_fip_sign_key() {
passfile = d.getVar('TRUSTFENCE_PASSWORD_FILE')
if (os.path.isfile(passfile)):
with open(passfile, "r") as file:
p = file.read().split()
i = int(d.getVar('TRUSTFENCE_KEY_INDEX'))
if (i > 7):
i = 0
if (p):
d.setVar('FIP_SIGN_KEY_PASS', p[i])
}
# Sign TF-A image
do_deploy[postfuncs] += "${@oe.utils.conditional('TRUSTFENCE_SIGN', '1', 'tfa_sign', '', d)}"
tfa_sign() {
export CONFIG_SIGN_KEYS_PATH="${TRUSTFENCE_SIGN_KEYS_PATH}"
export CONFIG_KEY_INDEX="${TRUSTFENCE_KEY_INDEX}"
unset i
for config in ${TF_A_CONFIG}; do
i=$(expr $i + 1)
# Initialize devicetree list and tf-a basename
dt_config=$(echo ${TF_A_DEVICETREE} | cut -d',' -f${i})
tfa_basename=$(echo ${TF_A_BINARIES} | cut -d',' -f${i})
tfa_file_type=$(echo ${TF_A_FILES} | cut -d',' -f${i})
for dt in ${dt_config}; do
for file_type in ${tfa_file_type}; do
case "${file_type}" in
bl2)
TF_A_FILENAME="${tfa_basename}-${dt}-${config}.${TF_A_SUFFIX}"
if [ -f "${DEPLOYDIR}/arm-trusted-firmware/${TF_A_FILENAME}" ]; then
trustfence-sign-artifact.sh -p "${DIGI_SOM}" -t "${DEPLOYDIR}/arm-trusted-firmware/${TF_A_FILENAME}" "${DEPLOYDIR}/arm-trusted-firmware/${TF_A_FILENAME}_signed"
fi
esac
done # for file_type in ${tfa_file_type}
done # for dt in ${dt_config}
done # for config in ${TF_A_CONFIG}
}

View File

@ -16,7 +16,7 @@ SRC_URI[sha256sum] = "36a02b956c288dad6ce6ecb2b13a4e6fb2983fd5c39cab5028ae9a7daf
S = "${WORKDIR}/${PN}-${PV}"
SC_FIRMWARE_NAME ?= "mx8x-${DIGI_FAMILY}-scfw-tcm.bin"
SC_FIRMWARE_NAME ?= "mx8x-${DIGI_SOM}-scfw-tcm.bin"
symlink_name = "scfw_tcm.bin"
SYSROOT_DIRS += "/boot"

View File

@ -5,7 +5,7 @@ HOMEPAGE = "https://www.tensorflow.org/lite/"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${S}/tflite_runtime-2.5.0.dist-info/METADATA;md5=8c4b9e107a64b0121980a8705094014b"
PYTHON_PACKAGE = "tflite_runtime-2.5.0-cp38-cp38-linux:aarch64.whl"
PYTHON_PACKAGE = "tflite_runtime-2.5.0-cp38-cp38-linux_aarch64.whl"
SRC_URI = "https://github.com/google-coral/pycoral/releases/download/v1.0.1/${PYTHON_PACKAGE};downloadfilename=${PYTHON_PACKAGE};subdir=${BP}"
SRC_URI[md5sum] = "9c47617e1fa0bdca673a78b8b6688d64"

View File

@ -0,0 +1,9 @@
# Copyright (C) 2023 Digi International.
require trustfence-stm-signtools.inc
inherit nativesdk
# STM signing tools binaries depend on libQt5Core.so.5
RDEPENDS:${PN} += " \
nativesdk-qtbase \
"

View File

@ -0,0 +1,4 @@
# Copyright (C) 2023 Digi International.
require trustfence-stm-signtools.inc
inherit native

View File

@ -0,0 +1,27 @@
# Copyright (C) 2023 Digi International.
SUMMARY = "STM key generation and signing tools"
SECTION = "console/tools"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://en.SLA0048.txt;md5=108361d167deef887d204830aba9cf94"
PKGNAME = "trustfence-stm-signtools"
# tarball
SRC_URI = "${DIGI_PKG_SRC}/${PKGNAME}-${PV}.tar.gz"
SRC_URI[md5sum] = "5621d99156b75e69eecbae721475463b"
SRC_URI[sha256sum] = "5c04b16934aa316d2586980f93680e90af1968bcb9b76c18b9cecddbcf5d6a1b"
S = "${WORKDIR}/${PKGNAME}-${PV}"
inherit bin_package
INSANE_SKIP:${PN} = "already-stripped"
do_install() {
install -d ${D}${bindir}
install -m 0755 bin/* ${D}${bindir}
install -d ${D}${base_libdir}
install -m 0644 lib/* ${D}${base_libdir}
}

View File

@ -1,4 +1,4 @@
# Copyright (C) 2018-2022 Digi International
# Copyright (C) 2018-2023 Digi International
require recipes-bsp/u-boot/u-boot.inc
@ -38,7 +38,7 @@ BUILD_UBOOT_SCRIPTS ?= "true"
BOOTLOADER_IMAGE_RECIPE ?= "u-boot"
LOCALVERSION ?= ""
inherit ${@oe.utils.conditional('DEY_BUILD_PLATFORM', 'NXP', 'fsl-u-boot-localversion', '', d)}
inherit ${@oe.utils.conditional('DEY_SOC_VENDOR', 'NXP', 'fsl-u-boot-localversion', '', d)}
# Disable u-boot environment artifacts
UBOOT_INITIAL_ENV = ""
@ -63,6 +63,16 @@ def tf_bootscript_sedfilter(d):
tf_initramfs = d.getVar('TRUSTFENCE_INITRAMFS_IMAGE') or ""
return "s,\(^[[:blank:]]*\)true.*,\\1setenv boot_initrd true\\n\\1setenv initrd_file %s-${MACHINE}.cpio.gz.u-boot.tf,g" % tf_initramfs if tf_initramfs else ""
SIGN_UBOOT ?= ""
SIGN_UBOOT:ccimx6 = "sign_uboot"
SIGN_UBOOT:ccimx6ul = "sign_uboot"
do_deploy[postfuncs] += " \
adapt_uboot_filenames \
${@oe.utils.ifelse('BUILD_UBOOT_SCRIPTS', 'build_uboot_scripts', '')} \
${@oe.utils.conditional('TRUSTFENCE_SIGN', '1', '${SIGN_UBOOT}', '', d)} \
"
build_uboot_scripts() {
for f in $(echo ${INSTALL_FW_UBOOT_SCRIPTS} | sed -e 's,file\:\/\/,,g'); do
f_ext="${f##*.}"
@ -89,25 +99,25 @@ build_uboot_scripts() {
# Alternate boot script for dualboot
mkimage -T script -n "Alternate bootscript" -C none -d ${WORKDIR}/altboot.txt ${DEPLOYDIR}/altboot.scr
# Sign the scripts
if [ "${TRUSTFENCE_SIGN}" = "1" ]; then
# Sign the scripts (TODO signing of artifacts for STM-based platforms)
if [ [ "${TRUSTFENCE_SIGN}" = "1" ] && [ "${DEY_SOC_VENDOR}" != "STM" ] ]; then
export CONFIG_SIGN_KEYS_PATH="${TRUSTFENCE_SIGN_KEYS_PATH}"
[ -n "${TRUSTFENCE_KEY_INDEX}" ] && export CONFIG_KEY_INDEX="${TRUSTFENCE_KEY_INDEX}"
[ -n "${TRUSTFENCE_DEK_PATH}" ] && [ "${TRUSTFENCE_DEK_PATH}" != "0" ] && export CONFIG_DEK_PATH="${TRUSTFENCE_DEK_PATH}"
# Sign boot script
TMP_SIGNED_BOOTSCR="$(mktemp ${WORKDIR}/bootscr-signed.XXXXXX)"
trustfence-sign-artifact.sh -p "${DIGI_FAMILY}" -b "${DEPLOYDIR}/boot.scr" "${TMP_SIGNED_BOOTSCR}"
trustfence-sign-artifact.sh -p "${DIGI_SOM}" -b "${DEPLOYDIR}/boot.scr" "${TMP_SIGNED_BOOTSCR}"
mv "${TMP_SIGNED_BOOTSCR}" "${DEPLOYDIR}/boot.scr"
# Sign altboot script
TMP_SIGNED_BOOTSCR="$(mktemp ${WORKDIR}/altboot-signed.XXXXXX)"
trustfence-sign-artifact.sh -p "${DIGI_FAMILY}" -b "${DEPLOYDIR}/altboot.scr" "${TMP_SIGNED_BOOTSCR}"
trustfence-sign-artifact.sh -p "${DIGI_SOM}" -b "${DEPLOYDIR}/altboot.scr" "${TMP_SIGNED_BOOTSCR}"
mv "${TMP_SIGNED_BOOTSCR}" "${DEPLOYDIR}/altboot.scr"
fi
}
do_deploy:append() {
adapt_uboot_filenames() {
# Remove canonical U-Boot symlinks for ${UBOOT_CONFIG} currently in the form:
# u-boot-<platform>.<ext>-<type>
# u-boot-<type>
@ -124,7 +134,26 @@ do_deploy:append() {
cd ${DEPLOYDIR}
rm -r ${UBOOT_BINARY}-${type}
ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX}
if [ "${TRUSTFENCE_SIGN}" = "1" ] && [ "${BOOTLOADER_IMAGE_RECIPE}" = "u-boot" ]; then
fi
done
unset j
done
unset i
fi
}
sign_uboot() {
# This function only applies to CC6, CC6Plus and CC6UL
if [ -n "${UBOOT_CONFIG}" ]
then
for config in ${UBOOT_MACHINE}; do
i=$(expr $i + 1);
for type in ${UBOOT_CONFIG}; do
j=$(expr $j + 1);
if [ $j -eq $i ]
then
cd ${DEPLOYDIR}
if [ "${BOOTLOADER_IMAGE_RECIPE}" = "u-boot" ]; then
install ${B}/${config}/SRK_efuses.bin SRK_efuses-${PV}-${PR}.bin
ln -sf SRK_efuses-${PV}-${PR}.bin SRK_efuses.bin
@ -146,10 +175,6 @@ do_deploy:append() {
done
unset i
fi
if [ "${BUILD_UBOOT_SCRIPTS}" = "true" ]; then
build_uboot_scripts
fi
}
BOOT_TOOLS = "imx-boot-tools"

View File

@ -79,9 +79,13 @@ echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
if test "${dualboot}" = "yes"; then
echo " linux_a ${INSTALL_LINUX_FILENAME}"
if test "${install_dualboot}" = "yes"; then
echo " linux_b ${INSTALL_LINUX_FILENAME}"
fi
echo " rootfs_a ${INSTALL_ROOTFS_FILENAME}"
if test "${install_dualboot}" = "yes"; then
echo " rootfs_b ${INSTALL_ROOTFS_FILENAME}"
fi
else
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
@ -136,6 +140,7 @@ fi
setenv bootcmd "
env default -a;
setenv dualboot ${dualboot};
setenv install_dualboot ${install_dualboot};
saveenv;
echo \"\";
echo \"\";
@ -162,6 +167,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
if test \"\$\{install_dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
@ -174,6 +180,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_a\";
@ -186,6 +193,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
if test \"\$\{install_dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_b\";
@ -198,6 +206,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
fi;
else
echo \"\";
echo \"\";

View File

@ -79,9 +79,13 @@ echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
if test "${dualboot}" = "yes"; then
echo " linux_a ${INSTALL_LINUX_FILENAME}"
if test "${install_dualboot}" = "yes"; then
echo " linux_b ${INSTALL_LINUX_FILENAME}"
fi
echo " rootfs_a ${INSTALL_ROOTFS_FILENAME}"
if test "${install_dualboot}" = "yes"; then
echo " rootfs_b ${INSTALL_ROOTFS_FILENAME}"
fi
else
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
@ -137,6 +141,7 @@ fi
setenv bootcmd "
env default -a;
setenv dualboot ${dualboot};
setenv install_dualboot ${install_dualboot};
saveenv;
echo \"\";
echo \"\";
@ -164,6 +169,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
if test \"\$\{install_dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
@ -176,6 +182,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
fi;
usb reset;
echo \"\";
echo \"\";
@ -189,6 +196,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
if test \"\$\{install_dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_b\";
@ -201,6 +209,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
fi;
else
echo \"\";
echo \"\";

View File

@ -1,7 +1,7 @@
#!/bin/sh
#===============================================================================
#
# Copyright (C) 2021 by Digi International Inc.
# Copyright (C) 2021-2023 by Digi International Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
@ -39,6 +39,7 @@ show_usage()
echo " -n No wait. Skips 10 seconds delay to stop script."
echo " -u <u-boot-filename> U-Boot filename."
echo " Auto-determined by variant if not provided."
echo " -d Install firmware on dualboot partitions (system A and system B)."
exit 2
}
@ -69,9 +70,10 @@ echo "############################################################"
# Command line admits the following parameters:
# -u <u-boot-filename>
# -i <image-name>
while getopts 'hi:nu:' c
while getopts 'dhi:nu:' c
do
case $c in
d) INSTALL_DUALBOOT=true ;;
h) show_usage ;;
i) IMAGE_NAME=${OPTARG} ;;
n) NOWAIT=true ;;
@ -192,9 +194,13 @@ if [ "${NOWAIT}" != true ]; then
printf " bootloader\t${INSTALL_UBOOT_FILENAME}\n"
if [ "${DUALBOOT}" = true ]; then
printf " ${LINUX_NAME}_a\t${INSTALL_LINUX_FILENAME}\n"
if [ "${INSTALL_DUALBOOT}" = true ]; then
printf " ${LINUX_NAME}_b\t${INSTALL_LINUX_FILENAME}\n"
fi
printf " ${ROOTFS_NAME}_a\t${INSTALL_ROOTFS_FILENAME}\n"
if [ "${INSTALL_DUALBOOT}" = true ]; then
printf " ${ROOTFS_NAME}_b\t${INSTALL_ROOTFS_FILENAME}\n"
fi
else
printf " ${LINUX_NAME}\t${INSTALL_LINUX_FILENAME}\n"
printf " ${RECOVERY_NAME}\t${INSTALL_RECOVERY_FILENAME}\n"
@ -270,11 +276,15 @@ if [ "${DUALBOOT}" = true ]; then
# Update Linux A
part_update "${LINUX_NAME}_a" "${INSTALL_LINUX_FILENAME}"
# Update Linux B
if [ "${INSTALL_DUALBOOT}" = true ]; then
part_update "${LINUX_NAME}_b" "${INSTALL_LINUX_FILENAME}"
fi
# Update Rootfs A
part_update "${ROOTFS_NAME}_a" "${INSTALL_ROOTFS_FILENAME}"
# Update Rootfs B
if [ "${INSTALL_DUALBOOT}" = true ]; then
part_update "${ROOTFS_NAME}_b" "${INSTALL_ROOTFS_FILENAME}"
fi
else
# Update Linux
part_update "${LINUX_NAME}" "${INSTALL_LINUX_FILENAME}"

View File

@ -90,9 +90,13 @@ echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
if test "${dualboot}" = "yes"; then
echo " linux_a ${INSTALL_LINUX_FILENAME}"
if test "${install_dualboot}" = "yes"; then
echo " linux_b ${INSTALL_LINUX_FILENAME}"
fi
echo " rootfs_a ${INSTALL_ROOTFS_FILENAME}"
if test "${install_dualboot}" = "yes"; then
echo " rootfs_b ${INSTALL_ROOTFS_FILENAME}"
fi
else
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
@ -147,6 +151,7 @@ fi
setenv bootcmd "
env default -a;
setenv dualboot ${dualboot};
setenv install_dualboot ${install_dualboot};
saveenv;
echo \"\";
echo \"\";
@ -173,6 +178,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
if test \"\$\{install_dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
@ -185,6 +191,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_a\";
@ -197,6 +204,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
if test \"\$\{install_dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_b\";
@ -209,6 +217,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
fi;
else
echo \"\";
echo \"\";

View File

@ -90,9 +90,13 @@ echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
if test "${dualboot}" = "yes"; then
echo " linux_a ${INSTALL_LINUX_FILENAME}"
if test "${install_dualboot}" = "yes"; then
echo " linux_b ${INSTALL_LINUX_FILENAME}"
fi
echo " rootfs_a ${INSTALL_ROOTFS_FILENAME}"
if test "${install_dualboot}" = "yes"; then
echo " rootfs_b ${INSTALL_ROOTFS_FILENAME}"
fi
else
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
@ -148,6 +152,7 @@ fi
setenv bootcmd "
env default -a;
setenv dualboot ${dualboot};
setenv install_dualboot ${install_dualboot};
saveenv;
echo \"\";
echo \"\";
@ -175,6 +180,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
if test \"\$\{install_dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
@ -187,6 +193,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
fi;
usb reset;
echo \"\";
echo \"\";
@ -200,6 +207,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
if test \"\$\{install_dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_b\";
@ -212,6 +220,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
fi;
else
echo \"\";
echo \"\";

View File

@ -1,7 +1,7 @@
#!/bin/sh
#===============================================================================
#
# Copyright (C) 2021 by Digi International Inc.
# Copyright (C) 2021-2023 by Digi International Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
@ -39,6 +39,7 @@ show_usage()
echo " -n No wait. Skips 10 seconds delay to stop script."
echo " -u <u-boot-filename> U-Boot filename."
echo " Auto-determined by variant if not provided."
echo " -d Install firmware on dualboot partitions (system A and system B)."
exit 2
}
@ -69,9 +70,10 @@ echo "############################################################"
# Command line admits the following parameters:
# -u <u-boot-filename>
# -i <image-name>
while getopts 'hi:nu:' c
while getopts 'dhi:nu:' c
do
case $c in
d) INSTALL_DUALBOOT=true ;;
h) show_usage ;;
i) IMAGE_NAME=${OPTARG} ;;
n) NOWAIT=true ;;
@ -210,9 +212,13 @@ if [ "${NOWAIT}" != true ]; then
printf " bootloader\t${INSTALL_UBOOT_FILENAME}\n"
if [ "${DUALBOOT}" = true ]; then
printf " ${LINUX_NAME}_a\t${INSTALL_LINUX_FILENAME}\n"
if [ "${INSTALL_DUALBOOT}" = true ]; then
printf " ${LINUX_NAME}_b\t${INSTALL_LINUX_FILENAME}\n"
fi
printf " ${ROOTFS_NAME}_a\t${INSTALL_ROOTFS_FILENAME}\n"
if [ "${INSTALL_DUALBOOT}" = true ]; then
printf " ${ROOTFS_NAME}_b\t${INSTALL_ROOTFS_FILENAME}\n"
fi
else
printf " ${LINUX_NAME}\t${INSTALL_LINUX_FILENAME}\n"
printf " ${RECOVERY_NAME}\t${INSTALL_RECOVERY_FILENAME}\n"
@ -288,11 +294,15 @@ if [ "${DUALBOOT}" = true ]; then
# Update Linux A
part_update "${LINUX_NAME}_a" "${INSTALL_LINUX_FILENAME}"
# Update Linux B
if [ "${INSTALL_DUALBOOT}" = true ]; then
part_update "${LINUX_NAME}_b" "${INSTALL_LINUX_FILENAME}"
fi
# Update Rootfs A
part_update "${ROOTFS_NAME}_a" "${INSTALL_ROOTFS_FILENAME}"
# Update Rootfs B
if [ "${INSTALL_DUALBOOT}" = true ]; then
part_update "${ROOTFS_NAME}_b" "${INSTALL_ROOTFS_FILENAME}"
fi
else
# Update Linux
part_update "${LINUX_NAME}" "${INSTALL_LINUX_FILENAME}"

View File

@ -83,9 +83,13 @@ echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
if test "${dualboot}" = "yes"; then
echo " linux_a ${INSTALL_LINUX_FILENAME}"
if test "${install_dualboot}" = "yes"; then
echo " linux_b ${INSTALL_LINUX_FILENAME}"
fi
echo " rootfs_a ${INSTALL_ROOTFS_FILENAME}"
if test "${install_dualboot}" = "yes"; then
echo " rootfs_b ${INSTALL_ROOTFS_FILENAME}"
fi
else
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
@ -142,6 +146,7 @@ setenv bootcmd "
env default -a;
setenv singlemtdsys ${singlemtdsys};
setenv dualboot ${dualboot};
setenv install_dualboot ${install_dualboot};
run partition_nand_linux;
saveenv;
if test \"\$\{singlemtdsys\}\" = yes; then
@ -162,6 +167,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
if test \"\$\{install_dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
@ -174,6 +180,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_a\";
@ -186,6 +193,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
if test \"\$\{install_dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_b\";
@ -198,6 +206,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
fi;
else
echo \"\";
echo \"\";

View File

@ -83,9 +83,13 @@ echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
if test "${dualboot}" = "yes"; then
echo " linux_a ${INSTALL_LINUX_FILENAME}"
if test "${install_dualboot}" = "yes"; then
echo " linux_b ${INSTALL_LINUX_FILENAME}"
fi
echo " rootfs_a ${INSTALL_ROOTFS_FILENAME}"
if test "${install_dualboot}" = "yes"; then
echo " rootfs_b ${INSTALL_ROOTFS_FILENAME}"
fi
else
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
@ -142,6 +146,7 @@ setenv bootcmd "
env default -a;
setenv singlemtdsys ${singlemtdsys};
setenv dualboot ${dualboot};
setenv install_dualboot ${install_dualboot};
run partition_nand_linux;
saveenv;
if test \"\$\{singlemtdsys\}\" = yes; then
@ -163,6 +168,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
if test \"\$\{install_dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
@ -175,6 +181,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_a\";
@ -187,6 +194,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
if test \"\$\{install_dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_b\";
@ -199,6 +207,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
fi;
else
echo \"\";
echo \"\";

View File

@ -1,7 +1,7 @@
#!/bin/sh
#===============================================================================
#
# Copyright (C) 2020-2021 by Digi International Inc.
# Copyright (C) 2020-2023 by Digi International Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
@ -39,6 +39,7 @@ show_usage()
echo " -n No wait. Skips 10 seconds delay to stop script."
echo " -u <u-boot-filename> U-Boot filename."
echo " Auto-determined by variant if not provided."
echo " -d Install firmware on dualboot partitions (system A and system B)."
exit 2
}
@ -78,9 +79,10 @@ echo "############################################################"
# Command line admits the following parameters:
# -u <u-boot-filename>
# -i <image-name>
while getopts 'hi:nu:' c
while getopts 'dhi:nu:' c
do
case $c in
d) INSTALL_DUALBOOT=true ;;
h) show_usage ;;
i) IMAGE_NAME=${OPTARG} ;;
n) NOWAIT=true ;;
@ -199,9 +201,13 @@ if [ "${NOWAIT}" != true ]; then
printf " bootloader\t${INSTALL_UBOOT_FILENAME}\n"
if [ "${DUALBOOT}" = true ]; then
printf " ${LINUX_NAME}_a\t${INSTALL_LINUX_FILENAME}\n"
if [ "${INSTALL_DUALBOOT}" = true ]; then
printf " ${LINUX_NAME}_b\t${INSTALL_LINUX_FILENAME}\n"
fi
printf " ${ROOTFS_NAME}_a\t${INSTALL_ROOTFS_FILENAME}\n"
if [ "${INSTALL_DUALBOOT}" = true ]; then
printf " ${ROOTFS_NAME}_b\t${INSTALL_ROOTFS_FILENAME}\n"
fi
else
printf " ${LINUX_NAME}\t${INSTALL_LINUX_FILENAME}\n"
printf " ${RECOVERY_NAME}\t${INSTALL_RECOVERY_FILENAME}\n"
@ -269,11 +275,15 @@ if [ "${DUALBOOT}" = true ]; then
# Update Linux A
part_update "${LINUX_NAME}_a" "${INSTALL_LINUX_FILENAME}" 15000
# Update Linux B
if [ "${INSTALL_DUALBOOT}" = true ]; then
part_update "${LINUX_NAME}_b" "${INSTALL_LINUX_FILENAME}" 15000
fi
# Update Rootfs A
part_update "${ROOTFS_NAME}_a" "${INSTALL_ROOTFS_FILENAME}" 90000
# Update Rootfs B
if [ "${INSTALL_DUALBOOT}" = true ]; then
part_update "${ROOTFS_NAME}_b" "${INSTALL_ROOTFS_FILENAME}" 90000
fi
else
# Update Linux
part_update "${LINUX_NAME}" "${INSTALL_LINUX_FILENAME}" 15000

View File

@ -50,9 +50,13 @@ echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
if test "${dualboot}" = "yes"; then
echo " linux_a ${INSTALL_LINUX_FILENAME}"
if test "${install_dualboot}" = "yes"; then
echo " linux_b ${INSTALL_LINUX_FILENAME}"
fi
echo " rootfs_a ${INSTALL_ROOTFS_FILENAME}"
if test "${install_dualboot}" = "yes"; then
echo " rootfs_b ${INSTALL_ROOTFS_FILENAME}"
fi
else
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
@ -112,6 +116,7 @@ fi
setenv bootcmd "
env default -a;
setenv dualboot ${dualboot};
setenv install_dualboot ${install_dualboot};
saveenv;
setenv otf-update yes;
echo \"\";
@ -139,6 +144,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
if test \"\$\{install_dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
@ -151,6 +157,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_a\";
@ -163,6 +170,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
if test \"\$\{install_dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_b\";
@ -175,6 +183,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
fi;
else
echo \"\";
echo \"\";

View File

@ -50,9 +50,13 @@ echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
if test "${dualboot}" = "yes"; then
echo " linux_a ${INSTALL_LINUX_FILENAME}"
if test "${install_dualboot}" = "yes"; then
echo " linux_b ${INSTALL_LINUX_FILENAME}"
fi
echo " rootfs_a ${INSTALL_ROOTFS_FILENAME}"
if test "${install_dualboot}" = "yes"; then
echo " rootfs_b ${INSTALL_ROOTFS_FILENAME}"
fi
else
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
@ -112,6 +116,7 @@ fi
setenv bootcmd "
env default -a;
setenv dualboot ${dualboot};
setenv install_dualboot ${install_dualboot};
saveenv;
setenv otf-update yes;
echo \"\";
@ -140,6 +145,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
if test \"\$\{install_dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
@ -152,6 +158,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_a\";
@ -164,6 +171,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
if test \"\$\{install_dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_b\";
@ -176,6 +184,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
fi;
else
echo \"\";
echo \"\";

View File

@ -1,7 +1,7 @@
#!/bin/sh
#===============================================================================
#
# Copyright (C) 2020-2021 by Digi International Inc.
# Copyright (C) 2020-2023 by Digi International Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
@ -39,6 +39,7 @@ show_usage()
echo " -n No wait. Skips 10 seconds delay to stop script."
echo " -u <u-boot-filename> U-Boot filename."
echo " Auto-determined by variant if not provided."
echo " -d Install firmware on dualboot partitions (system A and system B)."
exit 2
}
@ -69,9 +70,10 @@ echo "############################################################"
# Command line admits the following parameters:
# -u <u-boot-filename>
# -i <image-name>
while getopts 'hi:nu:' c
while getopts 'dhi:nu:' c
do
case $c in
d) INSTALL_DUALBOOT=true ;;
h) show_usage ;;
i) IMAGE_NAME=${OPTARG} ;;
n) NOWAIT=true ;;
@ -158,9 +160,13 @@ if [ "${NOWAIT}" != true ]; then
printf " bootloader\t${INSTALL_UBOOT_FILENAME}\n"
if [ "${DUALBOOT}" = true ]; then
printf " ${LINUX_NAME}_a\t${INSTALL_LINUX_FILENAME}\n"
if [ "${INSTALL_DUALBOOT}" = true ]; then
printf " ${LINUX_NAME}_b\t${INSTALL_LINUX_FILENAME}\n"
fi
printf " ${ROOTFS_NAME}_a\t${INSTALL_ROOTFS_FILENAME}\n"
if [ "${INSTALL_DUALBOOT}" = true ]; then
printf " ${ROOTFS_NAME}_b\t${INSTALL_ROOTFS_FILENAME}\n"
fi
else
printf " ${LINUX_NAME}\t${INSTALL_LINUX_FILENAME}\n"
printf " ${RECOVERY_NAME}\t${INSTALL_RECOVERY_FILENAME}\n"
@ -239,11 +245,15 @@ if [ "${DUALBOOT}" = true ]; then
# Update Linux A
part_update "${LINUX_NAME}_a" "${INSTALL_LINUX_FILENAME}"
# Update Linux B
if [ "${INSTALL_DUALBOOT}" = true ]; then
part_update "${LINUX_NAME}_b" "${INSTALL_LINUX_FILENAME}"
fi
# Update Rootfs A
part_update "${ROOTFS_NAME}_a" "${INSTALL_ROOTFS_FILENAME}"
# Update Rootfs B
if [ "${INSTALL_DUALBOOT}" = true ]; then
part_update "${ROOTFS_NAME}_b" "${INSTALL_ROOTFS_FILENAME}"
fi
else
# Update Linux
part_update "${LINUX_NAME}" "${INSTALL_LINUX_FILENAME}"

View File

@ -121,9 +121,13 @@ echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
if test "${dualboot}" = "yes"; then
echo " linux_a ${INSTALL_LINUX_FILENAME}"
if test "${install_dualboot}" = "yes"; then
echo " linux_b ${INSTALL_LINUX_FILENAME}"
fi
echo " rootfs_a ${INSTALL_ROOTFS_FILENAME}"
if test "${install_dualboot}" = "yes"; then
echo " rootfs_b ${INSTALL_ROOTFS_FILENAME}"
fi
else
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
@ -183,6 +187,7 @@ fi
setenv bootcmd "
env default -a;
setenv dualboot ${dualboot};
setenv install_dualboot ${install_dualboot};
saveenv;
setenv otf-update yes;
echo \"\";
@ -210,6 +215,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
if test \"\$\{install_dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
@ -222,6 +228,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_a\";
@ -234,6 +241,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
if test \"\$\{install_dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_b\";
@ -246,6 +254,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
fi;
else
echo \"\";
echo \"\";

View File

@ -121,9 +121,13 @@ echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
if test "${dualboot}" = "yes"; then
echo " linux_a ${INSTALL_LINUX_FILENAME}"
if test "${install_dualboot}" = "yes"; then
echo " linux_b ${INSTALL_LINUX_FILENAME}"
fi
echo " rootfs_a ${INSTALL_ROOTFS_FILENAME}"
if test "${install_dualboot}" = "yes"; then
echo " rootfs_b ${INSTALL_ROOTFS_FILENAME}"
fi
else
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
@ -184,6 +188,7 @@ fi
setenv bootcmd "
env default -a;
setenv dualboot ${dualboot};
setenv install_dualboot ${install_dualboot};
saveenv;
setenv otf-update yes;
echo \"\";
@ -212,6 +217,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
if test \"\$\{install_dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
@ -224,6 +230,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
fi;
usb reset;
echo \"\";
echo \"\";
@ -237,6 +244,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
if test \"\$\{install_dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_b\";
@ -249,6 +257,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
fi;
else
echo \"\";
echo \"\";

View File

@ -1,7 +1,7 @@
#!/bin/sh
#===============================================================================
#
# Copyright (C) 2020-2021 by Digi International Inc.
# Copyright (C) 2020-2023 by Digi International Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
@ -39,6 +39,7 @@ show_usage()
echo " -n No wait. Skips 10 seconds delay to stop script."
echo " -u <u-boot-filename> U-Boot filename."
echo " Auto-determined by variant if not provided."
echo " -d Install firmware on dualboot partitions (system A and system B)."
exit 2
}
@ -69,9 +70,10 @@ echo "############################################################"
# Command line admits the following parameters:
# -u <u-boot-filename>
# -i <image-name>
while getopts 'hi:nu:' c
while getopts 'dhi:nu:' c
do
case $c in
d) INSTALL_DUALBOOT=true ;;
h) show_usage ;;
i) IMAGE_NAME=${OPTARG} ;;
n) NOWAIT=true ;;
@ -217,9 +219,13 @@ if [ "${NOWAIT}" != true ]; then
printf " bootloader\t${INSTALL_UBOOT_FILENAME}\n"
if [ "${DUALBOOT}" = true ]; then
printf " ${LINUX_NAME}_a\t${INSTALL_LINUX_FILENAME}\n"
if [ "${INSTALL_DUALBOOT}" = true ]; then
printf " ${LINUX_NAME}_b\t${INSTALL_LINUX_FILENAME}\n"
fi
printf " ${ROOTFS_NAME}_a\t${INSTALL_ROOTFS_FILENAME}\n"
if [ "${INSTALL_DUALBOOT}" = true ]; then
printf " ${ROOTFS_NAME}_b\t${INSTALL_ROOTFS_FILENAME}\n"
fi
else
printf " ${LINUX_NAME}\t${INSTALL_LINUX_FILENAME}\n"
printf " ${RECOVERY_NAME}\t${INSTALL_RECOVERY_FILENAME}\n"
@ -295,11 +301,15 @@ if [ "${DUALBOOT}" = true ]; then
# Update Linux A
part_update "${LINUX_NAME}_a" "${INSTALL_LINUX_FILENAME}"
# Update Linux B
if [ "${INSTALL_DUALBOOT}" = true ]; then
part_update "${LINUX_NAME}_b" "${INSTALL_LINUX_FILENAME}"
fi
# Update Rootfs A
part_update "${ROOTFS_NAME}_a" "${INSTALL_ROOTFS_FILENAME}"
# Update Rootfs B
if [ "${INSTALL_DUALBOOT}" = true ]; then
part_update "${ROOTFS_NAME}_b" "${INSTALL_ROOTFS_FILENAME}"
fi
else
# Update Linux
part_update "${LINUX_NAME}" "${INSTALL_LINUX_FILENAME}"

View File

@ -50,9 +50,13 @@ echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
if test "${dualboot}" = "yes"; then
echo " linux_a ${INSTALL_LINUX_FILENAME}"
if test "${install_dualboot}" = "yes"; then
echo " linux_b ${INSTALL_LINUX_FILENAME}"
fi
echo " rootfs_a ${INSTALL_ROOTFS_FILENAME}"
if test "${install_dualboot}" = "yes"; then
echo " rootfs_b ${INSTALL_ROOTFS_FILENAME}"
fi
else
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
@ -112,6 +116,7 @@ fi
setenv bootcmd "
env default -a;
setenv dualboot ${dualboot};
setenv install_dualboot ${install_dualboot};
saveenv;
setenv otf-update yes;
echo \"\";
@ -139,6 +144,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
if test \"\$\{install_dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
@ -151,6 +157,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_a\";
@ -163,6 +170,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
if test \"\$\{install_dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_b\";
@ -175,6 +183,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
fi;
else
echo \"\";
echo \"\";

View File

@ -50,9 +50,13 @@ echo " --------- --------"
echo " bootloader ${INSTALL_UBOOT_FILENAME}"
if test "${dualboot}" = "yes"; then
echo " linux_a ${INSTALL_LINUX_FILENAME}"
if test "${install_dualboot}" = "yes"; then
echo " linux_b ${INSTALL_LINUX_FILENAME}"
fi
echo " rootfs_a ${INSTALL_ROOTFS_FILENAME}"
if test "${install_dualboot}" = "yes"; then
echo " rootfs_b ${INSTALL_ROOTFS_FILENAME}"
fi
else
echo " linux ${INSTALL_LINUX_FILENAME}"
echo " recovery ${INSTALL_RECOVERY_FILENAME}"
@ -112,6 +116,7 @@ fi
setenv bootcmd "
env default -a;
setenv dualboot ${dualboot};
setenv install_dualboot ${install_dualboot};
saveenv;
setenv otf-update yes;
echo \"\";
@ -140,6 +145,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
if test \"\$\{install_dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_LINUX_FILENAME} on linux_b\";
@ -152,6 +158,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
fi;
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_a\";
@ -164,6 +171,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
if test \"\$\{install_dualboot\}\" = yes; then
echo \"\";
echo \"\";
echo \">> Installing file ${INSTALL_ROOTFS_FILENAME} on rootfs_b\";
@ -176,6 +184,7 @@ setenv bootcmd "
echo \"Aborted.\";
exit;
fi;
fi;
else
echo \"\";
echo \"\";

View File

@ -1,7 +1,7 @@
#!/bin/sh
#===============================================================================
#
# Copyright (C) 2020-2021 by Digi International Inc.
# Copyright (C) 2020-2023 by Digi International Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
@ -39,6 +39,7 @@ show_usage()
echo " -n No wait. Skips 10 seconds delay to stop script."
echo " -u <u-boot-filename> U-Boot filename."
echo " Auto-determined by variant if not provided."
echo " -d Install firmware on dualboot partitions (system A and system B)."
exit 2
}
@ -69,9 +70,10 @@ echo "############################################################"
# Command line admits the following parameters:
# -u <u-boot-filename>
# -i <image-name>
while getopts 'hi:nu:' c
while getopts 'dhi:nu:' c
do
case $c in
d) INSTALL_DUALBOOT=true ;;
h) show_usage ;;
i) IMAGE_NAME=${OPTARG} ;;
n) NOWAIT=true ;;
@ -158,9 +160,13 @@ if [ "${NOWAIT}" != true ]; then
printf " bootloader\t${INSTALL_UBOOT_FILENAME}\n"
if [ "${DUALBOOT}" = true ]; then
printf " ${LINUX_NAME}_a\t${INSTALL_LINUX_FILENAME}\n"
if [ "${INSTALL_DUALBOOT}" = true ]; then
printf " ${LINUX_NAME}_b\t${INSTALL_LINUX_FILENAME}\n"
fi
printf " ${ROOTFS_NAME}_a\t${INSTALL_ROOTFS_FILENAME}\n"
if [ "${INSTALL_DUALBOOT}" = true ]; then
printf " ${ROOTFS_NAME}_b\t${INSTALL_ROOTFS_FILENAME}\n"
fi
else
printf " ${LINUX_NAME}\t${INSTALL_LINUX_FILENAME}\n"
printf " ${RECOVERY_NAME}\t${INSTALL_RECOVERY_FILENAME}\n"
@ -239,11 +245,15 @@ if [ "${DUALBOOT}" = true ]; then
# Update Linux A
part_update "${LINUX_NAME}_a" "${INSTALL_LINUX_FILENAME}"
# Update Linux B
if [ "${INSTALL_DUALBOOT}" = true ]; then
part_update "${LINUX_NAME}_b" "${INSTALL_LINUX_FILENAME}"
fi
# Update Rootfs A
part_update "${ROOTFS_NAME}_a" "${INSTALL_ROOTFS_FILENAME}"
# Update Rootfs B
if [ "${INSTALL_DUALBOOT}" = true ]; then
part_update "${ROOTFS_NAME}_b" "${INSTALL_ROOTFS_FILENAME}"
fi
else
# Update Linux
part_update "${LINUX_NAME}" "${INSTALL_LINUX_FILENAME}"

View File

@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://Licenses/README;md5=5a7450c57ffe5ae63fd732446b988025"
DEPENDS += "flex-native bison-native"
SRCBRANCH = "v2022.04/maint"
SRCBRANCH = "v2022.04/master"
SRCREV = "${AUTOREV}"
COMPATIBLE_MACHINE = "(ccimx93)"

View File

@ -0,0 +1,21 @@
require iw612-sdk_git.inc
SUMMARY = "NXP Wi-Fi SDK for IW612"
inherit module-base
TARGET_CC_ARCH += "${LDFLAGS}"
do_compile () {
oe_runmake appsbuild
}
do_install () {
install -d ${D}${datadir}/nxp_wireless
cp -r bin_sdw61x/* ${D}${datadir}/nxp_wireless
}
FILES:${PN} = "${datadir}/nxp_wireless"
COMPATIBLE_MACHINE = "(mx93-nxp-bsp)"

View File

@ -0,0 +1,3 @@
# Copyright (C) 2023 Digi International.
RRECOMMENDS:${PN}:remove = "wireless-tools"

View File

@ -0,0 +1,14 @@
SUMMARY = "NXP Wi-Fi SDK for IW612"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://gpl-2.0.txt;md5=ab04ac0f249af12befccb94447c08b77"
SRCBRANCH = "lf-5.15.71_2.2.0"
IW612_SRC ?= "git://github.com/nxp-imx/mwifiex-iw612.git;protocol=https"
SRC_URI = "${IW612_SRC};branch=${SRCBRANCH}"
SRCREV = "4cc2c8831f27c8eceece6b66fc2de8b73360f520"
S = "${WORKDIR}/git"
EXTRA_OEMAKE = "KERNELDIR=${STAGING_KERNEL_BUILDDIR}"
RRECOMMENDS:${PN} = "wireless-tools"

View File

@ -0,0 +1,15 @@
SUMMARY = "NXP Wi-Fi SDK for module 88w8801/8987/8997/9098 and IW416/612"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=ab04ac0f249af12befccb94447c08b77"
# For Kernel 5.4 and later
SRCBRANCH = "lf-6.1.1_1.0.0"
MRVL_SRC ?= "git://github.com/nxp-imx/mwifiex.git;protocol=https"
SRC_URI = "${MRVL_SRC};branch=${SRCBRANCH}"
SRCREV = "98e5b28b1a7afea9dbded4067e93bfd584531a79"
S = "${WORKDIR}/git/mxm_wifiex/wlan_src"
EXTRA_OEMAKE = "KERNELDIR=${STAGING_KERNEL_BUILDDIR}"
RDEPENDS:${PN} = "wireless-tools"

View File

@ -1,11 +1,16 @@
# Copyright (C) 2016-2022 Digi International.
# Copyright (C) 2016-2023 Digi International.
IMX_OPTEE_SDK_RDEPENDS ?= " \
nativesdk-python3-cryptography \
nativesdk-python3-pyelftools \
"
IMX_TRUSTFENCE_SDK_TOOLS ?= " \
nativesdk-trustfence-sign-tools \
nativesdk-trustfence-cst \
${@oe.utils.conditional('TRUSTFENCE_SIGN_MODE', 'AHAB', 'nativesdk-imx-mkimage', '', d)} \
"
RDEPENDS:${PN} += " \
${@oe.utils.conditional('DEY_BUILD_PLATFORM', 'NXP', '${IMX_TRUSTFENCE_SDK_TOOLS}', '', d)} \
nativesdk-trustfence-sign-tools \
${@oe.utils.conditional('DEY_SOC_VENDOR', 'NXP', '${IMX_OPTEE_SDK_RDEPENDS} ${IMX_TRUSTFENCE_SDK_TOOLS}', '', d)} \
"

View File

@ -0,0 +1,2 @@
# Disable all SD devices
SUBSYSTEMS=="mmc", ATTRS{type}=="SD", RUN:="/bin/true"

View File

@ -53,6 +53,16 @@ fi
if [ "x$BASE_INIT" = "x$INIT_SYSTEMD" ];then
# systemd as init uses systemd-mount to mount block devices
# Verify if unit is already launched, if so just restart it.
if systemctl | grep -q "mnt-${PARTNAME}.mount"; then
if ! systemctl restart "mnt-${PARTNAME}.mount"; then
logger -t udev "ERROR: Could not mount '${DEVNAME}'"
exit 1
fi
exit 0
fi
MOUNT="/usr/bin/systemd-mount"
MOUNT_PARAMS="${MOUNT_PARAMS} --no-block"

View File

@ -9,6 +9,7 @@ SRC_URI += " \
"
SRC_URI:append:ccmp1 = " \
file://99-ext-rtc-wakeup.rules \
file://00-disable-sd.rules \
"
do_install:append() {
@ -59,6 +60,9 @@ do_install:append() {
do_install:append:ccmp1() {
install -m 0644 ${WORKDIR}/99-ext-rtc-wakeup.rules ${D}${sysconfdir}/udev/rules.d/
# Disables all SD device but keeps on mounting other external memory devices like USB.
# This is currently needed for the CCMP1 platform as a workaround to fix a boot issue.
install -m 0644 ${WORKDIR}/00-disable-sd.rules ${D}${sysconfdir}/udev/rules.d/
}
FILES:${PN}:append = " \

View File

@ -0,0 +1,9 @@
# Copyright (C) 2023, Digi International Inc.
require trustfence-sign-tools.inc
inherit nativesdk
RDEPENDS:${PN} = " \
${@oe.utils.conditional('DEY_SOC_VENDOR', 'NXP', 'nativesdk-trustfence-cst', '', d)} \
${@oe.utils.conditional('DEY_SOC_VENDOR', 'STM', 'nativesdk-trustfence-stm-signtools', '', d)} \
"

View File

@ -0,0 +1,62 @@
# Copyright (C) 2023, Digi International Inc.
SUMMARY = "TrustFence generation of Public Key Infrastructure (PKI)"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
inherit native
RDEPENDS:${PN} = " \
trustfence-sign-tools-native \
openssl-native \
"
S = "${WORKDIR}"
do_fetch[noexec] = "1"
do_configure[noexec] = "1"
do_compile[noexec] = "1"
# Function to generate a PKI tree (with lock dir protection)
GENPKI_LOCK_DIR = "${TRUSTFENCE_SIGN_KEYS_PATH}/.genpki.lock"
gen_pki_tree() {
if mkdir -p ${GENPKI_LOCK_DIR}; then
if [ "${DEY_SOC_VENDOR}" = "NXP" ]; then
trustfence-gen-pki.sh ${TRUSTFENCE_SIGN_KEYS_PATH}
elif [ "${DEY_SOC_VENDOR}" = "STM" ]; then
# Call sign script with no artifact arguments to just
# generate the keys
export CONFIG_SIGN_KEYS_PATH="${TRUSTFENCE_SIGN_KEYS_PATH}"
export CONFIG_KEY_INDEX="${TRUSTFENCE_KEY_INDEX}"
trustfence-sign-artifact.sh -p ${DIGI_SOM}
fi
rm -rf ${GENPKI_LOCK_DIR}
else
bbfatal "Could not get lock to generate PKI tree"
fi
}
# Function that generates a PKI tree if there isn't one
check_gen_pki_tree() {
if [ "${DEY_SOC_VENDOR}" = "NXP" ]; then
SRK_KEYS="$(echo ${TRUSTFENCE_SIGN_KEYS_PATH}/crts/SRK*crt.pem | sed s/\ /\,/g)"
n_commas="$(echo ${SRK_KEYS} | grep -o "," | wc -l)"
if [ "${n_commas}" -eq 0 ]; then
gen_pki_tree
elif [ "${n_commas}" -ne 3 ]; then
bbfatal "Inconsistent PKI tree"
fi
elif [ "${DEY_SOC_VENDOR}" = "STM" ]; then
# The script that generates the PKI tree already checks if
# there isn't one, so there's nothing to do here but calling it.
gen_pki_tree
fi
}
do_install[depends] = "trustfence-sign-tools-native:do_populate_sysroot \
openssl-native:do_populate_sysroot"
do_install() {
check_gen_pki_tree
}
FILES:${PN} = "${bindir}"

View File

@ -0,0 +1,12 @@
# Copyright (C) 2023, Digi International Inc.
require trustfence-sign-tools.inc
inherit native
RDEPENDS:${PN} = " \
${@oe.utils.conditional('DEY_SOC_VENDOR', 'NXP', 'trustfence-cst-native', '', d)} \
${@oe.utils.conditional('DEY_SOC_VENDOR', 'STM', 'trustfence-stm-signtools-native', '', d)} \
coreutils-native \
util-linux-native \
${@oe.utils.conditional('TRUSTFENCE_SIGN_MODE', 'AHAB', 'imx-mkimage-native', '', d)} \
"

View File

@ -0,0 +1,59 @@
# Copyright (C) 2017-2023, Digi International Inc.
SUMMARY = "TrustFence signing and encryption scripts"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
SRCBRANCH = "v2020.04/master"
SRCREV = "${AUTOREV}"
S = "${WORKDIR}"
# Select internal or Github U-Boot repo
UBOOT_URI_STASH = "${DIGI_MTK_GIT}/uboot/u-boot-denx.git;protocol=ssh"
UBOOT_URI_GITHUB = "${DIGI_GITHUB_GIT}/u-boot.git;protocol=https"
UBOOT_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${UBOOT_URI_STASH}', '${UBOOT_URI_GITHUB}', d)}"
SRC_URI = " \
${UBOOT_GIT_URI};branch=${SRCBRANCH} \
file://trustfence-sign-artifact-nxp.sh \
file://trustfence-sign-artifact-stm.sh \
file://sign_hab;name=artifact-hab-sign \
file://encrypt_hab;name=artifact-hab-encrypt \
file://sign_ahab;name=artifact-ahab-sign \
file://encrypt_ahab;name=artifact-ahab-encrypt \
"
do_configure[noexec] = "1"
do_compile[noexec] = "1"
do_install() {
if [ "${DEY_SOC_VENDOR}" = "NXP" ]; then
install -d ${D}${bindir}/csf_templates
if [ "${TRUSTFENCE_SIGN_MODE}" = "AHAB" ]; then
install -m 0755 sign_ahab ${D}${bindir}/csf_templates/
install -m 0755 encrypt_ahab ${D}${bindir}/csf_templates/
elif [ "${TRUSTFENCE_SIGN_MODE}" = "HAB" ]; then
install -m 0755 sign_hab ${D}${bindir}/csf_templates/
install -m 0755 encrypt_hab ${D}${bindir}/csf_templates/
else
bberror "Unkown TRUSTFENCE_SIGN_MODE value"
exit 1
fi
install -m 0755 git/scripts/csf_templates/* ${D}${bindir}/csf_templates
install -m 0755 trustfence-sign-artifact-nxp.sh ${D}${bindir}/trustfence-sign-artifact.sh
# Select U-Boot sign script depending on U-Boot including an SPL image
if [ -n "${SPL_BINARY}" ]; then
install -m 0755 git/scripts/sign_spl_fit.sh ${D}${bindir}/trustfence-sign-uboot.sh
else
install -m 0755 git/scripts/sign.sh ${D}${bindir}/trustfence-sign-uboot.sh
fi
elif [ "${DEY_SOC_VENDOR}" = "STM" ]; then
install -d ${D}${bindir}
install -m 0755 trustfence-sign-artifact-stm.sh ${D}${bindir}/trustfence-sign-artifact.sh
fi
}
FILES:${PN} = "${bindir}"

View File

@ -0,0 +1,134 @@
#!/bin/sh
#===============================================================================
#
# trustfence-sign-artifact.sh
#
# Copyright (C) 2023 by Digi International Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 as published by
# the Free Software Foundation.
#
#
# Description:
# Script for building signed and encrypted artifacts using STM sign tools.
#
# The following environment variables define the script behaviour:
#
#===============================================================================
# Avoid parallel execution of this script
SINGLE_PROCESS_LOCK="/tmp/sign_script.lock.d"
trap 'rm -rf "${SINGLE_PROCESS_LOCK}"' INT TERM EXIT
while ! mkdir "${SINGLE_PROCESS_LOCK}" > /dev/null 2>&1; do
sleep 1
done
SCRIPT_NAME="$(basename "${0}")"
SUPPORTED_PLATFORMS="ccmp15, ccmp13"
while getopts "p:t" c; do
case "${c}" in
p) PLATFORM="${OPTARG}";;
t) ARTIFACT_TFA="y";;
esac
done
shift "$((OPTIND - 1))"
usage() {
cat <<EOF
Usage: ${SCRIPT_NAME} <OPTIONS> [<input-unsigned-image> <output-signed-image>]
Options:
-p <platform> platform
-t sign/encrypt TF-A artifact
Supported platforms: ${SUPPORTED_PLATFORMS}
When called without filename parameters, it generates random keys if they
do not exist.
EOF
}
if [ -z "${CONFIG_SIGN_KEYS_PATH}" ]; then
echo "Undefined CONFIG_SIGN_KEYS_PATH";
exit 1
fi
[ -d "${CONFIG_SIGN_KEYS_PATH}" ] || mkdir "${CONFIG_SIGN_KEYS_PATH}"
# Default values
[ -z "${CONFIG_KEY_INDEX}" ] && CONFIG_KEY_INDEX="0"
KEY_PASS_FILE="${CONFIG_SIGN_KEYS_PATH}/keys/key_pass.txt"
# Generate random keys if they don't exist
if [ "${PLATFORM}" = "ccmp15" ]; then
PUBLIC_KEY="${CONFIG_SIGN_KEYS_PATH}/keys/publicKey00.pem"
PRIVATE_KEY="${CONFIG_SIGN_KEYS_PATH}/keys/privateKey00.pem"
if [ ! -f "${PRIVATE_KEY}" ] && [ ! -f "${PUBLIC_KEY}" ] && [ ! -f "${KEY_PASS_FILE}" ]; then
install -d "${CONFIG_SIGN_KEYS_PATH}/keys/"
# Random password
password="$(openssl rand -base64 32)"
echo "Generating random key"
STM32MP_KeyGen_CLI -abs "${CONFIG_SIGN_KEYS_PATH}/keys/" -pwd ${password} -n 1
echo "${password}" > "${KEY_PASS_FILE}"
fi
elif [ "${PLATFORM}" = "ccmp13" ]; then
N_PUBK="$(ls -l ${CONFIG_SIGN_KEYS_PATH}/keys/publicKey0* 2>/dev/null | wc -l)"
N_PRVK="$(ls -l ${CONFIG_SIGN_KEYS_PATH}/keys/privateKey0* 2>/dev/null | wc -l)"
PUBLIC_KEY="${CONFIG_SIGN_KEYS_PATH}/keys/publicKey0*.pem"
PRIVATE_KEY="${CONFIG_SIGN_KEYS_PATH}/keys/privateKey0${CONFIG_KEY_INDEX}.pem"
if [ "${N_PUBK}" != "8" ] && [ "${N_PRVK}" != 8 ] && [ ! -f "${KEY_PASS_FILE}" ]; then
install -d "${CONFIG_SIGN_KEYS_PATH}/keys/"
# 8 random passwords (separated by whitespaces)
passwords="$(openssl rand -base64 32)"
for i in $(seq 1 7); do
passwords="${passwords} $(openssl rand -base64 32)"
done
echo "Generating random keys"
STM32MP_KeyGen_CLI -abs "${CONFIG_SIGN_KEYS_PATH}/keys/" -pwd ${passwords} -n 8
echo "${passwords}" > "${KEY_PASS_FILE}"
fi
else
echo "Undefined platform"
exit 1
fi
if [ "${#}" = "0" ]; then
exit 0
elif [ "${#}" != "2" ]; then
usage
exit 1
fi
if [ "${ARTIFACT_TFA}" != "y" ]; then
echo "Specify the type of image to process (-t)"
usage
exit 1
fi
INPUT_FILE="$(readlink -e "${1}")"
OUTPUT_FILE="$(readlink -m "${2}")"
# Obtain password from key pass file
INDEX=$((CONFIG_KEY_INDEX + 1))
PASS=$(cat "${KEY_PASS_FILE}" | cut -f "${INDEX}" -d " ")
# Sign TF-A artifact
if [ "${ARTIFACT_TFA}" = "y" ]; then
if [ "${PLATFORM}" = "ccmp15" ]; then
SOC_OPTIONS="-hv 1"
elif [ "${PLATFORM}" = "ccmp13" ]; then
SOC_OPTIONS="-hv 2 -of 0x00000001"
fi
STM32MP_SigningTool_CLI -bin ${INPUT_FILE} \
--public-key ${PUBLIC_KEY} \
--private-key ${PRIVATE_KEY} \
-t fsbl \
-s \
${SOC_OPTIONS} \
--password ${PASS} \
-o ${OUTPUT_FILE}
fi

View File

@ -1,56 +0,0 @@
# Copyright (C) 2017-2022, Digi International Inc.
SUMMARY = "TrustFence signing and encryption scripts"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
DEPENDS = "trustfence-cst coreutils util-linux"
DEPENDS += "${@oe.utils.conditional('TRUSTFENCE_SIGN_MODE', 'AHAB', 'imx-mkimage', '', d)}"
SRCBRANCH = "v2020.04/maint"
SRCREV = "${AUTOREV}"
S = "${WORKDIR}"
# Select internal or Github U-Boot repo
UBOOT_URI_STASH = "${DIGI_MTK_GIT}/uboot/u-boot-denx.git;protocol=ssh"
UBOOT_URI_GITHUB = "${DIGI_GITHUB_GIT}/u-boot.git;protocol=https"
UBOOT_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${UBOOT_URI_STASH}', '${UBOOT_URI_GITHUB}', d)}"
SRC_URI = " \
${UBOOT_GIT_URI};branch=${SRCBRANCH} \
file://trustfence-sign-artifact.sh;name=artifact-sign-script \
file://sign_hab;name=artifact-hab-sign \
file://encrypt_hab;name=artifact-hab-encrypt \
file://sign_ahab;name=artifact-ahab-sign \
file://encrypt_ahab;name=artifact-ahab-encrypt \
"
do_configure[noexec] = "1"
do_compile[noexec] = "1"
do_install() {
install -d ${D}${bindir}/csf_templates
if [ "${TRUSTFENCE_SIGN_MODE}" = "AHAB" ]; then
install -m 0755 sign_ahab ${D}${bindir}/csf_templates/
install -m 0755 encrypt_ahab ${D}${bindir}/csf_templates/
elif [ "${TRUSTFENCE_SIGN_MODE}" = "HAB" ]; then
install -m 0755 sign_hab ${D}${bindir}/csf_templates/
install -m 0755 encrypt_hab ${D}${bindir}/csf_templates/
else
bberror "Unkown TRUSTFENCE_SIGN_MODE value"
exit 1
fi
install -m 0755 trustfence-sign-artifact.sh ${D}${bindir}/
install -m 0755 git/scripts/csf_templates/* ${D}${bindir}/csf_templates
# Select U-Boot sign script depending on U-Boot including an SPL image
if [ -n "${SPL_BINARY}" ]; then
install -m 0755 git/scripts/sign_spl_fit.sh ${D}${bindir}/trustfence-sign-uboot.sh
else
install -m 0755 git/scripts/sign.sh ${D}${bindir}/trustfence-sign-uboot.sh
fi
}
FILES:${PN} = "${bindir}"
BBCLASSEXTEND = "native nativesdk"

View File

@ -1,4 +1,4 @@
# Copyright (C) 2016-2022 Digi International.
# Copyright (C) 2016-2023 Digi International.
SUMMARY = "Qualcomm's wireless driver for qca65xx"
DESCRIPTION = "qcacld-2.0 module"
@ -32,6 +32,7 @@ FILES_SDIO_CCX = " \
FILES_SDIO = " \
file://modprobe-qualcomm.conf \
file://qualcomm.sh \
${@oe.utils.vartrue('QUALCOMM_FW_CCX_TAGS', '${FILES_SDIO_CCX}', '', d)} \
"
@ -63,10 +64,17 @@ do_compile:prepend() {
export BUILD_VER=${PV}
}
MMC_NODE ?= "30b40000.mmc"
MMC_NODE:ccimx6ul = "2190000.mmc"
do_install:append() {
if [ "${QUALCOMM_WIFI_INTERFACE}" = "sdio" ]; then
install -d ${D}${sysconfdir}/modprobe.d
install -m 0644 ${WORKDIR}/modprobe-qualcomm.conf ${D}${sysconfdir}/modprobe.d/qualcomm.conf
install -d ${D}${sysconfdir}/udev/scripts
install -m 0755 ${WORKDIR}/qualcomm.sh ${D}${sysconfdir}/udev/scripts/
sed -i -e "s/##NODE##/${MMC_NODE}/g" ${D}${sysconfdir}/udev/scripts/qualcomm.sh
fi
install -d ${D}${base_libdir}/firmware/wlan/

View File

@ -1,4 +1,4 @@
# Load Qualcomm wireless module (sdio)
SUBSYSTEM=="sdio", ACTION=="add", ENV{MODALIAS}=="sdio:c00v0271d050A", RUN="/sbin/modprobe wlan"
SUBSYSTEM=="sdio", ACTION=="add", ENV{MODALIAS}=="sdio:c00v0271d050A", RUN="/etc/udev/scripts/qualcomm.sh"
# Load Qualcomm wireless module (pci)
SUBSYSTEM=="pci", ACTION=="add", ENV{MODALIAS}=="pci:v0000168Cd0000003Esv*sd*bc*sc*i*", RUN="/sbin/modprobe wlan"

View File

@ -0,0 +1,55 @@
#!/bin/sh
#
# Copyright (c) 2023 Digi International Inc.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at http://mozilla.org/MPL/2.0/.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
MMC_NODE="##NODE##"
# At this point of the boot (udev script), the system log (syslog) is not
# available yet, so use the kernel log buffer from userspace.
log() {
printf "<$1>qca65x4: $2\n" >/dev/kmsg
}
# Force re-detection of the mmc node
rebind_mmc_node() {
DRIVER_NODE=$(find /sys/bus/platform/drivers -name ${MMC_NODE} | xargs dirname 2> /dev/null) || return 1
echo ${MMC_NODE} > ${DRIVER_NODE}/unbind
# Give some time to the mmc driver to re-detect the MMC node in order to re-initialize it.
sleep 2
echo ${MMC_NODE} > ${DRIVER_NODE}/bind
}
load_and_check() {
modprobe wlan
[ -d "/sys/class/net/wlan0" ] && return 0 || return 1
}
# Do nothing if the wireless node does not exist on the device tree
[ -d "/proc/device-tree/wireless" ] || exit 0
# Do nothing if the module is already loaded
grep -qws 'wlan' /proc/modules && exit 0
load_and_check && log "3" "[INFO] wlan module loaded" && exit 0
# If we are here, the load has failed. Retry.
log "3" "[WARN] Loading wlan module failed, retrying..."
# Try by re-binding the mmc node.
rebind_mmc_node && load_and_check && log "3" "[INFO] wlan module loaded" && exit 0
log "3" "[ERROR] Loading wlan module"
exit 1

View File

@ -0,0 +1,7 @@
require recipes-connectivity/nxp-wlan-sdk/nxp-wlan-sdk_git.inc
SUMMARY = "Kernel loadable module for NXP Wi-Fi module 88w8801/8987/8997/9098 IW416/612"
inherit module
EXTRA_OEMAKE += "-C ${STAGING_KERNEL_BUILDDIR} M=${S}"

View File

@ -0,0 +1,22 @@
# Copyright (C) 2023 Digi International.
FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"
SRC_URI:append = " \
file://81-iw612-wifi.rules \
file://load_iw612.sh \
"
do_install:append () {
install -d ${D}${sysconfdir}/udev/rules.d
install -m 0644 ${WORKDIR}/81-iw612-wifi.rules ${D}${sysconfdir}/udev/rules.d/
install -d ${D}${sysconfdir}/udev/scripts
install -m 0777 ${WORKDIR}/load_iw612.sh ${D}${sysconfdir}/udev/scripts/
}
FILES:${PN}:append = " \
${sysconfdir}/udev/rules.d \
${sysconfdir}/udev/scripts \
"
RDEPENDS:${PN}:remove = "wireless-tools"

View File

@ -0,0 +1,2 @@
# Load IW612 wireless module (sdio)
SUBSYSTEM=="sdio", ACTION=="add", ENV{MODALIAS}=="sdio:c00v0471d0205", RUN="/etc/udev/scripts/load_iw612.sh"

View File

@ -0,0 +1,41 @@
#!/bin/sh
# The bit settings of drv_mode are:
# Bit 0 : STA
# Bit 1 : uAP
# Bit 2 : WIFIDIRECT
# eg, for STA + uAP + WIFIDIRECT, set 7 (b'111)
DRIVER_MODE=1 # Only STA
# MREG_D(00000200), MERROR(00000004),MFATAL(00000002)
DRIVER_DEBUG="0x206"
MOAL_PARAMS=" \
cfg80211_wext=0xf \
max_vir_bss=1 \
cal_data_cfg=none \
ps_mode=1 \
auto_ds=1 \
host_mlme=1 \
drv_mode=${DRIVER_MODE} \
drvdbg=${DRIVER_DEBUG} \
sta_name=wlan \
fw_name=nxp/sduart_nw61x_v1.bin.se\
"
log() {
printf "<3>iw612-wifi: $1\n" >/dev/kmsg
}
if ! [ -e "/proc/device-tree/wireless/mac-address" ]; then
log "[ERROR] wireless mac-address not found"
exit 1
fi
WLANADDR=$(hexdump -ve '1/1 "%02X" ":"' /proc/device-tree/wireless/mac-address 2>/dev/null | sed 's/:$//g')
modprobe mlan && \
modprobe moal ${MOAL_PARAMS} mac_addr=${WLANADDR} && \
log "Wi-Fi activated" && exit 0
log "[ERROR] cannot load Wi-Fi driver"
exit 1

View File

@ -1,21 +1,21 @@
# Copyright (C) 2022 Digi International
# Copyright (C) 2022,2023 Digi International
SUMMARY = "Linux kernel for Digi boards"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
# CONFIG_KERNEL_LZO in defconfig
DEPENDS += "${@oe.utils.conditional('DEY_BUILD_PLATFORM', 'NXP', 'lzop-native', '', d)}"
DEPENDS += "${@oe.utils.conditional('DEY_SOC_VENDOR', 'NXP', 'lzop-native', '', d)}"
inherit kernel
inherit ${@oe.utils.conditional('DEY_BUILD_PLATFORM', 'NXP', 'fsl-kernel-localversion', '', d)}
inherit ${@oe.utils.conditional('DEY_SOC_VENDOR', 'NXP', 'fsl-kernel-localversion', '', d)}
SRCBRANCH = "v5.15/nxp/dey-4.0/maint"
SRCBRANCH:stm32mpcommon = "v5.15/stm/dey-4.0/maint"
SRCREV = "${AUTOREV}"
SRCREV:stm32mpcommon = "${AUTOREV}"
require ${@oe.utils.conditional('DEY_BUILD_PLATFORM', 'STM', 'recipes-kernel/linux/linux-stm32mp.inc', '', d)}
require ${@oe.utils.conditional('DEY_SOC_VENDOR', 'STM', 'recipes-kernel/linux/linux-stm32mp.inc', '', d)}
# Don't create custom folder for kernel artifacts
do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}"

View File

@ -5,6 +5,9 @@ DEPENDS += "${@oe.utils.conditional('TRUSTFENCE_SIGN', '1', 'trustfence-sign-too
do_deploy[postfuncs] += "${@oe.utils.conditional('TRUSTFENCE_SIGN', '1', 'trustfence_sign', '', d)}"
trustfence_sign() {
# TODO: signing of artifacts for STM-based platforms
[ "${DEY_SOC_VENDOR}" = "STM" ] && return
# Set environment variables for trustfence configuration
export CONFIG_SIGN_KEYS_PATH="${TRUSTFENCE_SIGN_KEYS_PATH}"
[ -n "${TRUSTFENCE_KEY_INDEX}" ] && export CONFIG_KEY_INDEX="${TRUSTFENCE_KEY_INDEX}"
@ -20,7 +23,7 @@ trustfence_sign() {
fi
TMP_KERNEL_IMAGE_SIGNED="$(mktemp ${KERNEL_IMAGE}-signed.XXXXXX)"
trustfence-sign-artifact.sh -p "${DIGI_FAMILY}" -l "${KERNEL_IMAGE}" "${TMP_KERNEL_IMAGE_SIGNED}"
trustfence-sign-artifact.sh -p "${DIGI_SOM}" -l "${KERNEL_IMAGE}" "${TMP_KERNEL_IMAGE_SIGNED}"
if [ "${type}" = "Image.gz" ]; then
# Compress the signed Image and restore the original filename
@ -41,9 +44,9 @@ trustfence_sign() {
TMP_DTB_IMAGE_SIGNED="$(mktemp ${DTB_IMAGE}-signed.XXXXXX)"
if [ "${DTB_EXT}" = "dtbo" ]; then
trustfence-sign-artifact.sh -p "${DIGI_FAMILY}" -o "${DTB_IMAGE}" "${TMP_DTB_IMAGE_SIGNED}"
trustfence-sign-artifact.sh -p "${DIGI_SOM}" -o "${DTB_IMAGE}" "${TMP_DTB_IMAGE_SIGNED}"
else
trustfence-sign-artifact.sh -p "${DIGI_FAMILY}" -d "${DTB_IMAGE}" "${TMP_DTB_IMAGE_SIGNED}"
trustfence-sign-artifact.sh -p "${DIGI_SOM}" -d "${DTB_IMAGE}" "${TMP_DTB_IMAGE_SIGNED}"
fi
mv "${TMP_DTB_IMAGE_SIGNED}" "${DTB_IMAGE}"
done

View File

@ -25,6 +25,7 @@ FSTYPES_WHITELIST:ccmp1 = " \
HAS_USB_DRIVER = "false"
HAS_USB_DRIVER:ccimx8m = "true"
HAS_USB_DRIVER:ccimx93 = "true"
HAS_USB_DRIVER:ccmp1 = "true"
generate_installer_zip () {

View File

@ -22,8 +22,11 @@ TRUSTFENCE_CONSOLE_DISABLE ?= "0"
TRUSTFENCE_SIGN ?= "1"
TRUSTFENCE_SIGN_KEYS_PATH ?= "default"
TRUSTFENCE_DEK_PATH ?= "default"
TRUSTFENCE_DEK_PATH:ccmp1 ?= "0"
TRUSTFENCE_ENCRYPT_ENVIRONMENT ?= "1"
TRUSTFENCE_ENCRYPT_ENVIRONMENT:ccmp1 ?= "0"
TRUSTFENCE_SRK_REVOKE_MASK ?= "0x0"
TRUSTFENCE_KEY_INDEX ?= "0"
# Partition encryption configuration
TRUSTFENCE_ENCRYPT_PARTITIONS ?= "1"
@ -44,19 +47,42 @@ python () {
d.appendVar("UBOOT_TF_CONF", "CONFIG_CONSOLE_DISABLE=y ")
if d.getVar("TRUSTFENCE_CONSOLE_PASSPHRASE_ENABLE"):
passphrase_hash = hashlib.sha256(d.getVar("TRUSTFENCE_CONSOLE_PASSPHRASE_ENABLE").encode()).hexdigest()
if (d.getVar("DEY_SOC_VENDOR") == "NXP"):
d.appendVar("UBOOT_TF_CONF", 'CONFIG_CONSOLE_ENABLE_PASSPHRASE=y CONFIG_CONSOLE_ENABLE_PASSPHRASE_KEY="%s" ' % passphrase_hash)
elif (d.getVar("DEY_SOC_VENDOR") == "STM"):
d.appendVar("UBOOT_TF_CONF", 'CONFIG_AUTOBOOT_KEYED=y CONFIG_AUTOBOOT_ENCRYPTION=y CONFIG_AUTOBOOT_STOP_STR_ENABLE=y CONFIG_AUTOBOOT_STOP_STR_SHA256="%s" ' % passphrase_hash)
elif d.getVar("TRUSTFENCE_CONSOLE_GPIO_ENABLE"):
if (d.getVar("DEY_SOC_VENDOR") == "NXP"):
d.appendVar("UBOOT_TF_CONF", "CONFIG_CONSOLE_ENABLE_GPIO=y CONFIG_CONSOLE_ENABLE_GPIO_NR=%s " % d.getVar("TRUSTFENCE_CONSOLE_GPIO_ENABLE"))
elif (d.getVar("DEY_SOC_VENDOR") == "STM"):
d.appendVar("UBOOT_TF_CONF", "CONFIG_CONSOLE_ENABLE_GPIO=y CONFIG_CONSOLE_ENABLE_GPIO_NAME=%s " % d.getVar("TRUSTFENCE_CONSOLE_GPIO_ENABLE_NAME"))
# Secure boot configuration
if (d.getVar("TRUSTFENCE_SIGN_KEYS_PATH") == "default"):
d.setVar("TRUSTFENCE_SIGN_KEYS_PATH", d.getVar("TOPDIR") + "/trustfence");
if (d.getVar("DEY_SOC_VENDOR") == "NXP"):
if (d.getVar("TRUSTFENCE_DEK_PATH") == "default"):
d.setVar("TRUSTFENCE_DEK_PATH", d.getVar("TRUSTFENCE_SIGN_KEYS_PATH") + "/dek.bin");
elif (d.getVar("DEY_SOC_VENDOR") == "STM"):
# Enable authentication capabilities on TF-A independently
# of whether the images are going to be signed by DEY or externally
d.setVar("TF_A_SIGN_ENABLE", "1")
if (d.getVar("TRUSTFENCE_SIGN") == "0"):
d.setVar("FIP_SIGN_ENABLE", "0")
if (d.getVar("TRUSTFENCE_SIGN") == "1"):
d.appendVar("UBOOT_TF_CONF", "CONFIG_SIGN_IMAGE=y CONFIG_AUTH_ARTIFACTS=y ")
# Set STM-specific variables for signing images
if (d.getVar("DEY_SOC_VENDOR") == "STM"):
d.setVar("FIP_SIGN_ENABLE", "1")
d.setVar("FIP_SIGN_KEY_EXTERNAL", "1")
if (d.getVar("DIGI_SOM") == "ccmp15" ):
d.setVar("FIP_SIGN_KEY", d.getVar("TRUSTFENCE_SIGN_KEYS_PATH") + "/keys/privateKey00.pem");
elif (d.getVar("DIGI_SOM") == "ccmp13" ):
d.setVar("FIP_SIGN_KEY", d.getVar("TRUSTFENCE_SIGN_KEYS_PATH") + "/keys/privateKey0%s.pem" % d.getVar("TRUSTFENCE_KEY_INDEX"));
d.setVar("TRUSTFENCE_PASSWORD_FILE", d.getVar("TRUSTFENCE_SIGN_KEYS_PATH") + "/keys/key_pass.txt")
d.appendVar("UBOOT_TF_CONF", "CONFIG_SIGN_IMAGE=y ")
if (d.getVar("TRUSTFENCE_READ_ONLY_ROOTFS") == "1"):
d.appendVar("UBOOT_TF_CONF", "CONFIG_AUTHENTICATE_SQUASHFS_ROOTFS=y ")
if d.getVar("TRUSTFENCE_SIGN_KEYS_PATH"):
@ -65,11 +91,14 @@ python () {
d.appendVar("UBOOT_TF_CONF", "CONFIG_UNLOCK_SRK_REVOKE=y ")
if d.getVar("TRUSTFENCE_KEY_INDEX"):
d.appendVar("UBOOT_TF_CONF", "CONFIG_KEY_INDEX=%s " % d.getVar("TRUSTFENCE_KEY_INDEX"))
if (d.getVar("DEY_SOC_VENDOR") == "NXP"):
d.appendVar("UBOOT_TF_CONF", "CONFIG_AUTH_ARTIFACTS=y ")
if (d.getVar("TRUSTFENCE_DEK_PATH") not in [None, "0"]):
d.appendVar("UBOOT_TF_CONF", 'CONFIG_DEK_PATH="%s" ' % d.getVar("TRUSTFENCE_DEK_PATH"))
if d.getVar("TRUSTFENCE_SIGN_MODE"):
d.appendVar("UBOOT_TF_CONF", 'CONFIG_SIGN_MODE="%s" ' % d.getVar("TRUSTFENCE_SIGN_MODE"))
if (d.getVar("TRUSTFENCE_ENCRYPT_ENVIRONMENT") == "1"):
if (d.getVar("DEY_SOC_VENDOR") == "NXP"):
d.appendVar("UBOOT_TF_CONF", "CONFIG_ENV_AES=y CONFIG_ENV_AES_CAAM_KEY=y ")
# Provide sane default values for SWUPDATE class in case Trustfence is enabled
@ -87,6 +116,7 @@ python () {
key_index_1 = key_index + 1
# Set the private key template, it will be expanded later in 'swu' recipes once keys are generated.
if (d.getVar("DEY_SOC_VENDOR") == "NXP"):
if (d.getVar("TRUSTFENCE_SIGN_MODE", "") == "AHAB"):
d.setVar("SWUPDATE_PRIVATE_KEY_TEMPLATE", keys_path + "/keys/SRK" + str(key_index_1) + "*key.pem")
d.setVar("CONFIG_SIGN_MODE", "AHAB")

View File

@ -2,7 +2,7 @@ require conf/distro/poky.conf
DISTRO = "dey"
DISTRO_NAME = "Digi Embedded Yocto"
DISTRO_VERSION = "4.0-r2"
DISTRO_VERSION = "4.0-r3"
SDK_VENDOR = "-deysdk"
@ -10,15 +10,16 @@ MAINTAINER = "Digi Support <tech.support@digi.com>"
TARGET_VENDOR = "-dey"
POKY_DEFAULT_DISTRO_FEATURES = "largefile opengl ptest multiarch wayland bluez5 cellular"
POKY_DEFAULT_EXTRA_RDEPENDS = "packagegroup-dey-core"
POKY_DEFAULT_EXTRA_RRECOMMENDS = ""
# Removed DISTRO_FEATURES
# 'wayland' -> only supported on the i.MX8 QXP
# 'ptest' -> fails to build QT5 toolchain
DISTRO_FEATURES_DEFAULT:remove = "3g nfc nfs zeroconf"
POKY_DEFAULT_DISTRO_FEATURES:remove = "ptest wayland"
#
# Rework distro features for DEY distribution
#
MACHINE_DISTRO_FEATURES_ADD ?= ""
MACHINE_DISTRO_FEATURES_REMOVE ?= ""
DISTRO_FEATURES:append = " cellular gstreamer pam ${MACHINE_DISTRO_FEATURES_ADD}"
DISTRO_FEATURES:remove = "3g nfc nfs ptest zeroconf ${MACHINE_DISTRO_FEATURES_REMOVE}"
GRAPHICAL_BACKEND = "${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', \
bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', \

View File

@ -12,16 +12,20 @@ BBFILES_DYNAMIC += " \
selinux:${LAYERDIR}/dynamic-layers/selinux/*/*/*.bbappend \
freescale-layer:${LAYERDIR}/dynamic-layers/freescale-layer/*/*/*.bb \
freescale-layer:${LAYERDIR}/dynamic-layers/freescale-layer/*/*/*.bbappend \
meta-ml:${LAYERDIR}/dynamic-layers/meta-ml/*/*/*.bb \
meta-ml:${LAYERDIR}/dynamic-layers/meta-ml/*/*/*.bbappend \
stm-st-stm32mp:${LAYERDIR}/dynamic-layers/stm-st-stm32mp/*/*/*.bb \
stm-st-stm32mp:${LAYERDIR}/dynamic-layers/stm-st-stm32mp/*/*/*.bbappend \
stm32mpu-ai:${LAYERDIR}/dynamic-layers/stm32mpu-ai/*/*/*.bb \
stm32mpu-ai:${LAYERDIR}/dynamic-layers/stm32mpu-ai/*/*/*.bbappend \
qt5-layer:${LAYERDIR}/dynamic-layers/qt5-layer/*/*/*.bb \
qt5-layer:${LAYERDIR}/dynamic-layers/qt5-layer/*/*/*.bbappend \
qt5-layer:${LAYERDIR}/dynamic-layers/qt5-layer/${DEY_BUILD_PLATFORM}/*/*/*.bb \
qt5-layer:${LAYERDIR}/dynamic-layers/qt5-layer/${DEY_BUILD_PLATFORM}/*/*/*.bbappend \
qt5-layer:${LAYERDIR}/dynamic-layers/qt5-layer/${DEY_SOC_VENDOR}/*/*/*.bb \
qt5-layer:${LAYERDIR}/dynamic-layers/qt5-layer/${DEY_SOC_VENDOR}/*/*/*.bbappend \
qt6-layer:${LAYERDIR}/dynamic-layers/qt6-layer/*/*/*.bb \
qt6-layer:${LAYERDIR}/dynamic-layers/qt6-layer/*/*/*.bbappend \
qt6-layer:${LAYERDIR}/dynamic-layers/qt6-layer/${DEY_BUILD_PLATFORM}/*/*/*.bb \
qt6-layer:${LAYERDIR}/dynamic-layers/qt6-layer/${DEY_BUILD_PLATFORM}/*/*/*.bbappend \
qt6-layer:${LAYERDIR}/dynamic-layers/qt6-layer/${DEY_SOC_VENDOR}/*/*/*.bb \
qt6-layer:${LAYERDIR}/dynamic-layers/qt6-layer/${DEY_SOC_VENDOR}/*/*/*.bbappend \
"
BBFILE_COLLECTIONS += "digi-dey"

View File

@ -5,7 +5,7 @@ HOMEPAGE = "https://coral.ai/software/#pycoral-api"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${S}/pycoral-1.0.1.dist-info/LICENSE;md5=d8927f3331d2b3e321b7dd1925166d25"
PYTHON_PACKAGE = "pycoral-1.0.1-cp38-cp38-linux:aarch64.whl"
PYTHON_PACKAGE = "pycoral-1.0.1-cp38-cp38-linux_aarch64.whl"
SRC_URI = "git://github.com/google-coral/pycoral.git;protocol=https;branch=master"
SRCREV = "d4b9f572fa3baef9d854483a171e02a6b3f9dbd0"

View File

@ -0,0 +1,5 @@
# Copyright 2023 Digi International Inc.
# The package's SConscript doesn't recognize the MAXLINELENGTH variable
# injected by scons.bbclass, so remove it
EXTRA_OESCONS:remove = "${SCONS_MAXLINELENGTH}"

View File

@ -0,0 +1,45 @@
# Copyright 2023 Digi International Inc.
do_install() {
# Install onnxruntime dynamic library
install -d ${D}${libdir}
install -d ${D}${prefix}/local/bin/${PN}-${PVB}/tools
install -m 0644 ${B}/libonnxruntime.so ${D}${libdir}/libonnxruntime.so.${PVB}
# This shared lib is used by onnxruntime_shared_lib_test and onnxruntime_test_python.py
install -m 644 ${B}/libcustom_op_library.so ${D}${libdir}
# And this one only by onnxruntime_test_python.py
install -m 644 ${B}/libtest_execution_provider.so ${D}${libdir}
install -m 644 ${B}/libonnxruntime_providers_shared.so ${D}${libdir}/libonnxruntime_providers_shared.so
install -m 644 ${B}/onnxruntime_pybind11_state.so ${D}${libdir}/onnxruntime_pybind11_state.so
# Install the symlinks.
ln -sf libonnxruntime.so.${PVB} ${D}${libdir}/libonnxruntime.so.${MAJOR}
ln -sf libonnxruntime.so.${PVB} ${D}${libdir}/libonnxruntime.so
# Digi: copy instead of moving to avoid QA errors
# Copy the onnx_test_runner executable that was installed in /usr instead of /usr/local.
cp ${B}/onnx_test_runner ${D}${prefix}/local/bin/${PN}-${PVB}/tools
# These are not included in the base installation, so we install them manually.
install -m 755 ${B}/onnxruntime_perf_test ${D}${prefix}/local/bin/${PN}-${PVB}/tools
install -m 755 ${B}/onnxruntime_test_all ${D}${prefix}/local/bin/${PN}-${PVB}/tools
install -m 755 ${B}/onnxruntime_shared_lib_test ${D}${prefix}/local/bin/${PN}-${PVB}/tools
install -m 755 ${B}/onnxruntime_api_tests_without_env ${D}${prefix}/local/bin/${PN}-${PVB}/tools
install -m 755 ${B}/onnxruntime_global_thread_pools_test ${D}${prefix}/local/bin/${PN}-${PVB}/tools
install -m 755 ${B}/onnxruntime_test_python.py ${D}${prefix}/local/bin/${PN}-${PVB}/tools
install -m 755 ${B}/helper.py ${D}${prefix}/local/bin/${PN}-${PVB}/tools
cp -r ${B}/testdata ${D}${prefix}/local/bin/${PN}-${PVB}/tools
# We have to change some of the RPATH as well.
chrpath -r '$ORIGIN' ${D}${prefix}/local/bin/${PN}-${PVB}/tools/onnxruntime_perf_test
chrpath -r '$ORIGIN' ${D}${prefix}/local/bin/${PN}-${PVB}/tools/onnxruntime_shared_lib_test
chrpath -r '$ORIGIN' ${D}${prefix}/local/bin/${PN}-${PVB}/tools/onnxruntime_api_tests_without_env
chrpath -r '$ORIGIN' ${D}${prefix}/local/bin/${PN}-${PVB}/tools/onnxruntime_global_thread_pools_test
chrpath -r '$ORIGIN' ${D}${libdir}/libtest_execution_provider.so
# Install the Python package.
mkdir -p ${D}${PYTHON_SITEPACKAGES_DIR}/onnxruntime
cp -r ${B}/onnxruntime ${D}${PYTHON_SITEPACKAGES_DIR}
}

View File

@ -0,0 +1,11 @@
# Copyright 2023 Digi International Inc.
RDEPENDS:packagegroup-x-linux-ai-tflite:remove:ccmp13 = " \
tflite-cv-apps-image-classification-c++ \
tflite-cv-apps-object-detection-c++ \
"
RDEPENDS:packagegroup-x-linux-ai-tflite-edgetpu:remove:ccmp13 = " \
tflite-cv-apps-edgetpu-image-classification-c++ \
tflite-cv-apps-edgetpu-object-detection-c++ \
"

View File

@ -1,4 +1,4 @@
# Copyright (C) 2022, Digi International Inc.
# Copyright (C) 2022-2023, Digi International Inc.
SUMMARY = "Bluetooth init scripts"
LICENSE = "GPL-2.0-only"
@ -58,5 +58,8 @@ SYSTEMD_SERVICE:${PN} = "bluetooth-init.service"
# 'bluetooth-init' script uses '/etc/init.d/functions'
RDEPENDS:${PN} = "initscripts-functions"
# IW61x Bluetooth support requires the WiFi FW support
RDEPENDS:${PN}:append:ccimx93 = " firmware-nxp-wifi-nxpiw612"
PACKAGE_ARCH = "${MACHINE_ARCH}"
COMPATIBLE_MACHINE = "(ccimx6$|ccimx6ul|ccimx8x|ccimx8mn|ccimx8mm)"
COMPATIBLE_MACHINE = "(ccimx6$|ccimx6ul|ccimx8x|ccimx8mn|ccimx8mm|ccimx93)"

View File

@ -0,0 +1,81 @@
#!/bin/sh
#===============================================================================
#
# Copyright (C) 2023 by Digi International Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 as published by
# the Free Software Foundation.
#
#
# !Description: Initialize bluetooth hardware
#
#===============================================================================
HCI_IFACE="hci0"
log() {
printf "<3>iw612-bluetooth: %s\n" "${1}" >/dev/kmsg
}
set_btaddr() {
bt_addr=$(echo $(fw_printenv -n btaddr) | awk -F ":" '{ for(i=NF;i>=1;i--) printf "0x%s ", $i }')
hcitool -i ${HCI_IFACE} cmd 0x3f 0x0022 0xfe 0x06 ${bt_addr}
}
bluetooth_start() {
if ! [ -e "/proc/device-tree/bluetooth/mac-address" ]; then
log "[ERROR] Bluetooth mac-address not found"
return
fi
# If there is a hciattach process running, just do nothing
pidof hciattach > /dev/null && log "Bluetooth already activated" && return
# If port speed is 3M, assume that FW has been modified to run at that speed
if [ "$(stty -F /dev/ttyBt speed)" != "3000000" ]; then
hciattach -t5 /dev/ttyBt any 115200 flow nosleep && \
hciconfig ${HCI_IFACE} up && \
sleep 0.2 && \
set_btaddr && \
# Change rate to 3M using a custom vendor command
hcitool -i ${HCI_IFACE} cmd 0x3f 0x0009 0xc0 0xc6 0x2d 0x00 && \
sleep 0.2 && \
killall hciattach && \
sleep 0.2
fi
hciattach -t5 /dev/ttyBt any -s 3000000 3000000 flow && \
log "Bluetooth activated" && return
log "[ERROR] Cannot initialize Bluetooth"
return 1
}
bluetooth_stop() {
if [ -e "/sys/class/bluetooth/${HCI_IFACE}" ]; then
killall hciattach > /dev/null
sleep 1
# send a raw hci reset to set the chip in a good state
echo -e -n \\x01\\x03\\x0c\\x00 > /dev/ttyBt
fi
}
case "$1" in
start)
bluetooth_start
;;
stop)
bluetooth_stop
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac

View File

@ -0,0 +1,13 @@
[Unit]
Description=Initialization of the IW612 bluetooth chip
ConditionPathIsDirectory=/proc/device-tree/bluetooth
Before=bluetooth.service
After=systemd-modules-load.service
[Service]
Type=forking
ExecStart=/etc/bluetooth-init start
ExecStop=/etc/bluetooth-init stop
[Install]
WantedBy=bluetooth.service

View File

@ -18,6 +18,9 @@ CONFIG_DRIVER_HOSTAP=y
# Driver interface for drivers using the nl80211 kernel interface
CONFIG_DRIVER_NL80211=y
# QCA vendor extensions to nl80211
#CONFIG_DRIVER_NL80211_QCA=y
# driver_nl80211.c requires libnl. If you are compiling it yourself
# you may need to point hostapd to your version of libnl.
#
@ -41,17 +44,11 @@ CONFIG_LIBNL32=y
# Driver interface for no driver (e.g., RADIUS server only)
#CONFIG_DRIVER_NONE=y
# IEEE 802.11F/IAPP
CONFIG_IAPP=y
# WPA2/IEEE 802.11i RSN pre-authentication
CONFIG_RSN_PREAUTH=y
# PeerKey handshake for Station to Station Link (IEEE 802.11e DLS)
CONFIG_PEERKEY=y
# IEEE 802.11w (management frame protection)
CONFIG_IEEE80211W=y
# Support Operating Channel Validation
#CONFIG_OCV=y
# Integrated EAP server
CONFIG_EAP=y
@ -105,11 +102,18 @@ CONFIG_EAP_PWD=y
#CONFIG_EAP_GPSK_SHA256=y
# EAP-FAST for the integrated EAP server
# Note: If OpenSSL is used as the TLS library, OpenSSL 1.0 or newer is needed
# for EAP-FAST support. Older OpenSSL releases would need to be patched, e.g.,
# with openssl-0.9.8x-tls-extensions.patch, to add the needed functions.
#CONFIG_EAP_FAST=y
# EAP-TEAP for the integrated EAP server
# Note: The current EAP-TEAP implementation is experimental and should not be
# enabled for production use. The IETF RFC 7170 that defines EAP-TEAP has number
# of conflicting statements and missing details and the implementation has
# vendor specific workarounds for those and as such, may not interoperate with
# any other implementation. This should not be used for anything else than
# experimentation and interoperability testing until those issues has been
# resolved.
#CONFIG_EAP_TEAP=y
# Wi-Fi Protected Setup (WPS)
CONFIG_WPS=y
# Enable UPnP support for external WPS Registrars
@ -138,15 +142,12 @@ CONFIG_RADIUS_SERVER=y
CONFIG_IPV6=y
# IEEE Std 802.11r-2008 (Fast BSS Transition)
#CONFIG_IEEE80211R=y
CONFIG_IEEE80211R=y
# Use the hostapd's IEEE 802.11 authentication (ACL), but without
# the IEEE 802.11 Management capability (e.g., FreeBSD/net80211)
#CONFIG_DRIVER_RADIUS_ACL=y
# IEEE 802.11n (High Throughput) support
CONFIG_IEEE80211N=y
# Wireless Network Management (IEEE Std 802.11v-2011)
# Note: This is experimental and not complete implementation.
#CONFIG_WNM=y
@ -154,6 +155,12 @@ CONFIG_IEEE80211N=y
# IEEE 802.11ac (Very High Throughput) support
CONFIG_IEEE80211AC=y
# IEEE 802.11ax HE support
# Note: This is experimental and work in progress. The definitions are still
# subject to change and this should not be expected to interoperate with the
# final IEEE 802.11ax version.
CONFIG_IEEE80211AX=y
# Remove debugging code that is printing out debug messages to stdout.
# This can be used to reduce the size of the hostapd considerably if debugging
# code is not needed.
@ -163,6 +170,9 @@ CONFIG_IEEE80211AC=y
# Disabled by default.
CONFIG_DEBUG_FILE=y
# Send debug messages to syslog instead of stdout
#CONFIG_DEBUG_SYSLOG=y
# Add support for sending all debug messages (regardless of debug verbosity)
# to the Linux kernel tracing facility. This helps debug the entire stack by
# making it easy to record everything happening from the driver up into the
@ -240,10 +250,25 @@ CONFIG_DEBUG_FILE=y
# requirements described above.
#CONFIG_NO_RANDOM_POOL=y
# Should we attempt to use the getrandom(2) call that provides more reliable
# yet secure randomness source than /dev/random on Linux 3.17 and newer.
# Requires glibc 2.25 to build, falls back to /dev/random if unavailable.
#CONFIG_GETRANDOM=y
# Should we use poll instead of select? Select is used by default.
#CONFIG_ELOOP_POLL=y
# Should we use epoll instead of select? Select is used by default.
#CONFIG_ELOOP_EPOLL=y
# Should we use kqueue instead of select? Select is used by default.
#CONFIG_ELOOP_KQUEUE=y
# Select TLS implementation
# openssl = OpenSSL (default)
# gnutls = GnuTLS
# internal = Internal TLSv1 implementation (experimental)
# linux = Linux kernel AF_ALG and internal TLSv1 implementation (experimental)
# none = Empty template
#CONFIG_TLS=openssl
@ -256,6 +281,10 @@ CONFIG_DEBUG_FILE=y
# can be enabled to enable use of stronger crypto algorithms.
#CONFIG_TLSV12=y
# Select which ciphers to use by default with OpenSSL if the user does not
# specify them.
#CONFIG_TLS_DEFAULT_CIPHERS="DEFAULT:!EXP:!LOW"
# If CONFIG_TLS=internal is used, additional library and include paths are
# needed for LibTomMath. Alternatively, an integrated, minimal version of
# LibTomMath can be used. See beginning of libtommath.c for details on benefits
@ -283,6 +312,12 @@ CONFIG_DEBUG_FILE=y
# Enable SQLite database support in hlr_auc_gw, EAP-SIM DB, and eap_user_file
#CONFIG_SQLITE=y
# Enable Fast Session Transfer (FST)
#CONFIG_FST=y
# Enable CLI commands for FST testing
#CONFIG_FST_TEST=y
# Testing options
# This can be used to enable some testing options (see also the example
# configuration file) that are really useful only for testing clients that
@ -311,6 +346,74 @@ CONFIG_DEBUG_FILE=y
# * ath10k
#
# For more details refer to:
# http://wireless.kernel.org/en/users/Documentation/acs
# https://wireless.wiki.kernel.org/en/users/documentation/acs
#
#CONFIG_ACS=y
CONFIG_ACS=y
# Multiband Operation support
# These extensions facilitate efficient use of multiple frequency bands
# available to the AP and the devices that may associate with it.
#CONFIG_MBO=y
# Client Taxonomy
# Has the AP retain the Probe Request and (Re)Association Request frames from
# a client, from which a signature can be produced which can identify the model
# of client device like "Nexus 6P" or "iPhone 5s".
#CONFIG_TAXONOMY=y
# Fast Initial Link Setup (FILS) (IEEE 802.11ai)
#CONFIG_FILS=y
# FILS shared key authentication with PFS
#CONFIG_FILS_SK_PFS=y
# Include internal line edit mode in hostapd_cli. This can be used to provide
# limited command line editing and history support.
#CONFIG_WPA_CLI_EDIT=y
# Opportunistic Wireless Encryption (OWE)
# Experimental implementation of draft-harkins-owe-07.txt
#CONFIG_OWE=y
# Airtime policy support
#CONFIG_AIRTIME_POLICY=y
# Override default value for the wpa_disable_eapol_key_retries configuration
# parameter. See that parameter in hostapd.conf for more details.
#CFLAGS += -DDEFAULT_WPA_DISABLE_EAPOL_KEY_RETRIES=1
# Wired equivalent privacy (WEP)
# WEP is an obsolete cryptographic data confidentiality algorithm that is not
# considered secure. It should not be used for anything anymore. The
# functionality needed to use WEP is available in the current hostapd
# release under this optional build parameter. This functionality is subject to
# be completely removed in a future release.
#CONFIG_WEP=y
# Remove all TKIP functionality
# TKIP is an old cryptographic data confidentiality algorithm that is not
# considered secure. It should not be used anymore. For now, the default hostapd
# build includes this to allow mixed mode WPA+WPA2 networks to be enabled, but
# that functionality is subject to be removed in the future.
#CONFIG_NO_TKIP=y
# Pre-Association Security Negotiation (PASN)
# Experimental implementation based on IEEE P802.11z/D2.6 and the protocol
# design is still subject to change. As such, this should not yet be enabled in
# production use.
# This requires CONFIG_IEEE80211W=y to be enabled, too.
#CONFIG_PASN=y
# Device Provisioning Protocol (DPP) (also known as Wi-Fi Easy Connect)
CONFIG_DPP=y
# DPP version 2 support
CONFIG_DPP2=y
# DPP version 3 support (experimental and still changing; do not enable for
# production use)
#CONFIG_DPP3=y
# CUSTOM CONFIG
CONFIG_SAE=y
CONFIG_SAE_PK=y
CONFIG_SUITEB=y
CONFIG_SUITEB192=y

View File

@ -0,0 +1,42 @@
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
interface=uap0
driver=nl80211
# SSID to identify the network
ssid=ap-uap0-##MAC##
# 802.11a (5 GHz) mode
hw_mode=a
# Set the channel to use. If 0 (ACS), channel will be automatically selected
channel=44
# IEEE 802.11i, WPA2 encryption with PSK authentication
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
wpa_passphrase=password-wpa2aes
# Uncomment to enable WPA3-SAE authentication
# wpa_key_mgmt=WPA-PSK SAE
# sae_password=password-wpa3sae
# IEEE 802.11n (Wi-Fi 4) features
ieee80211n=1
ht_capab=[HT20][HT40+][HT40-][SHORT-GI-20][SHORT-GI-40]
# IEEE 802.11ac (Wi-Fi 5) features
ieee80211ac=1
vht_oper_chwidth=0
vht_capab=[SHORT-GI-80]
# IEEE 802.11ax (Wi-Fi 6) features
ieee80211ax=1
he_su_beamformer=1
he_su_beamformee=1
# IEEE 802.11d (country information)
ieee80211d=1
country_code=US

View File

@ -8,6 +8,10 @@ SRC_URI:append = " \
${@oe.utils.conditional('HAS_WIFI_VIRTWLANS', 'true', 'file://hostapd_wlan1.conf', '', d)} \
"
SRC_URI:append:ccimx93 = " \
file://hostapd_uap0.conf \
"
# Patch series from Murata release
MURATA_COMMON_PATCHES = " \
file://murata/0003-nl80211-Report-connection-authorized-in-EVENT_ASSOC.patch \
@ -53,23 +57,33 @@ SYSTEMD_SERVICE:${PN}:append = " hostapd@.service"
do_install:append() {
# Remove the default hostapd.conf
rm -f ${WORKDIR}/hostapd.conf
# Install custom hostapd_IFACE.conf file
install -m 0644 ${WORKDIR}/hostapd_wlan0.conf ${D}${sysconfdir}
rm -f ${D}${sysconfdir}/hostapd.conf
# Install custom hostapd_IFACE.conf files
add_hostapd_files
# Install interface-specific systemd service
install -m 0644 ${WORKDIR}/hostapd@.service ${D}${systemd_unitdir}/system/
sed -i -e 's,@SBINDIR@,${sbindir},g' -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/hostapd@.service
# Read-only rootfs: actions that substitute postinst script
# - append the ${DIGI_SOM} string to SSID
if [ -n "${@bb.utils.contains('IMAGE_FEATURES', 'read-only-rootfs', '1', '', d)}" ]; then
sed -i -e "s,##MAC##,${DIGI_SOM},g" ${D}${sysconfdir}/hostapd_*.conf
fi
}
add_hostapd_files() {
install -m 0644 ${WORKDIR}/hostapd_wlan0.conf ${D}${sysconfdir}
if ${HAS_WIFI_VIRTWLANS}; then
# Install custom hostapd_IFACE.conf file
install -m 0644 ${WORKDIR}/hostapd_wlan1.conf ${D}${sysconfdir}
fi
}
# Read-only rootfs: actions that substitute postinst script
# - append the ${DIGI_FAMILY} string to SSID
if [ -n "${@bb.utils.contains('IMAGE_FEATURES', 'read-only-rootfs', '1', '', d)}" ]; then
sed -i -e "s,##MAC##,${DIGI_FAMILY},g" ${D}${sysconfdir}/hostapd_wlan?.conf
fi
add_hostapd_files:ccimx93() {
install -m 0644 ${WORKDIR}/hostapd_uap0.conf ${D}${sysconfdir}
}
pkg_postinst_ontarget:${PN}() {
@ -84,7 +98,7 @@ pkg_postinst_ontarget:${PN}() {
# Get the last two bytes of the wlan0 MAC address
MAC="$(dd conv=swab if=/proc/device-tree/wireless/mac-address 2>/dev/null | hexdump | head -n 1 | cut -d ' ' -f 4)"
find "${sysconfdir}" -type f -name 'hostapd_wlan?.conf' -exec \
find "${sysconfdir}" -type f -name 'hostapd_*.conf' -exec \
sed -i -e "s,##MAC##,${MAC},g" {} \;
# Do not autostart hostapd daemon, it will conflict with wpa-supplicant.

View File

@ -8,7 +8,7 @@ rc-manager=file
managed=false
[keyfile]
unmanaged-devices=interface-name:p2p*;interface-name:wlan1
unmanaged-devices=##UNMANAGED_DEVICES##
[device]
wifi.scan-rand-mac-address=no

View File

@ -1,4 +1,4 @@
# Copyright (C) 2017-2019, Digi International Inc.
# Copyright (C) 2017-2023, Digi International Inc.
FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:"
@ -41,6 +41,9 @@ ETH0_STATIC_CIDR = "${@ipaddr_to_cidr('eth0', d)}"
ETH1_STATIC_CIDR = "${@ipaddr_to_cidr('eth1', d)}"
WLAN0_STATIC_CIDR = "${@ipaddr_to_cidr('wlan0', d)}"
UNMANAGED_DEVICES = "interface-name:p2p*;interface-name:wlan1"
UNMANAGED_DEVICES:ccimx93 = "interface-name:p2p-wfd0-0;interface-name:wfd0;interface-name:uap0"
inherit update-rc.d
do_install:append() {
@ -48,6 +51,11 @@ do_install:append() {
install -m 0644 ${WORKDIR}/NetworkManager.conf ${D}${sysconfdir}/NetworkManager/
install -m 0755 ${WORKDIR}/networkmanager-init ${D}${sysconfdir}/init.d/networkmanager
#
# Customize NetworkManager
#
sed -i -e "s,##UNMANAGED_DEVICES##,${UNMANAGED_DEVICES},g" ${D}${sysconfdir}/NetworkManager/NetworkManager.conf
#
# Connections config files
#

View File

@ -0,0 +1,4 @@
ctrl_interface=/var/run/wpa_supplicant
device_name=##WLAN_P2P_DEVICE_NAME##
config_methods=display keypad push_button
persistent_reconnect=1

View File

@ -476,7 +476,7 @@ CONFIG_IEEE80211R=y
#CONFIG_GETRANDOM=y
# IEEE 802.11ac (Very High Throughput) support (mainly for AP mode)
#CONFIG_IEEE80211AC=y
CONFIG_IEEE80211AC=y
# Wireless Network Management (IEEE Std 802.11v-2011)
# Note: This is experimental and not complete implementation.
@ -489,7 +489,7 @@ CONFIG_IEEE80211R=y
#CONFIG_INTERWORKING=y
# Hotspot 2.0
#CONFIG_HS20=y
CONFIG_HS20=y
# Enable interface matching in wpa_supplicant
#CONFIG_MATCH_IFACE=y

View File

@ -0,0 +1,60 @@
#!/bin/sh
#===============================================================================
#
# standby-actions
#
# Copyright (C) 2023 by Digi International Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 as published by
# the Free Software Foundation.
#
#
# !Description: manage interfaces before suspending and after resuming from
# suspend
#
#===============================================================================
RESUME_ACTIONS="/tmp/resume_actions"
actions_needed() {
[ -d "/proc/device-tree/wireless" ] && [ ! -e "/sys/firmware/devicetree/base/soc@0/bus@42800000/mmc@428b0000/keep-power-in-suspend" ]
}
if [ "${1}" = "pre" ]; then
# Stop NetworkManager before suspend
systemctl stop NetworkManager
if actions_needed; then
rm -f "${RESUME_ACTIONS}"
for iface in wlan0 uap0 wfd0; do
if grep -qs ${iface} /var/run/ifstate; then
ifdown ${iface} && echo "ifup ${iface}" >> "${RESUME_ACTIONS}"
fi
done
rmmod moal
rmmod mlan
if systemctl is-active bluetooth-init; then
#
# bluetooth service relies on bluetooth-init service, so stop/start it unconditionally
echo "systemctl start bluetooth-init" >> "${RESUME_ACTIONS}"
echo "systemctl start bluetooth" >> "${RESUME_ACTIONS}"
systemctl stop bluetooth-init
systemctl stop bluetooth
stty -F /dev/ttyBt 115200
fi
fi
elif [ "${1}" = "post" ]; then
if actions_needed; then
/etc/udev/scripts/load_iw612.sh
sleep 0.5
sh "${RESUME_ACTIONS}"
rm -f "${RESUME_ACTIONS}"
fi
# Resume NetworkManager after suspend
systemctl start NetworkManager
fi

View File

@ -27,6 +27,3 @@ SDKIMAGE_FEATURES ?= "dev-pkgs dbg-pkgs staticdev-pkgs"
# Add our dey-image tweaks to the final image (like /etc/build info)
inherit dey-image
# Do not install udev-cache
BAD_RECOMMENDATIONS += "udev-cache"

View File

@ -27,6 +27,3 @@ inherit core-image
inherit dey-image
IMAGE_ROOTFS_SIZE = "8192"
# Do not install udev-cache
BAD_RECOMMENDATIONS += "udev-cache"

View File

@ -42,8 +42,6 @@ CONFLICT_DISTRO_FEATURES = "directfb"
IMAGE_ROOTFS_SIZE = "8192"
# Do not install udev-cache
BAD_RECOMMENDATIONS += "udev-cache"
BAD_RECOMMENDATIONS += "eudev-hwdb"
export IMAGE_BASENAME = "dey-image-${GRAPHICAL_CORE}-${GRAPHICAL_BACKEND}"

View File

@ -0,0 +1,8 @@
## Example bridge between eth0 and uap0 (NXP IW612)
#auto br0
#iface br0 inet static
# bridge_ports eth0 uap0
# address 192.168.42.50
# netmask 255.255.255.0
# pre-up [ -d /proc/device-tree/wireless ]

View File

@ -0,0 +1,8 @@
# Wi-Fi AP interface (NXP IW612)
#auto uap0
iface uap0 inet dhcp
udhcpc_opts -S -b >/dev/null &
pre-up [ -d /proc/device-tree/wireless ]
post-up ##WLAN1_POST_UP_ACTION##
pre-down ##WLAN1_PRE_DOWN_ACTION##

View File

@ -0,0 +1,11 @@
# Wi-Fi AP interface (NXP IW612)
#auto uap0
iface uap0 inet static
address ##WLAN1_STATIC_IP##
netmask ##WLAN1_STATIC_NETMASK##
gateway ##WLAN1_STATIC_GATEWAY##
dns-nameservers ##WLAN1_STATIC_DNS##
pre-up [ -d /proc/device-tree/wireless ]
post-up ##WLAN1_POST_UP_ACTION##
pre-down ##WLAN1_PRE_DOWN_ACTION##

View File

@ -1,5 +1,5 @@
## Example bridge between eth0 and wlan1 (Qualcomm QCA65x4)
## Example bridge between eth0 and wlan1
#auto br0
#iface br0 inet static
# bridge_ports eth0 wlan1

View File

@ -1,5 +1,5 @@
# Wi-Fi AP interface (Qualcomm QCA65x4)
# Wi-Fi AP interface
#auto wlan1
iface wlan1 inet dhcp
udhcpc_opts -S -b >/dev/null &

View File

@ -1,5 +1,5 @@
# Wi-Fi AP interface (Qualcomm QCA65x4)
# Wi-Fi AP interface
#auto wlan1
iface wlan1 inet static
address ##WLAN1_STATIC_IP##

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# Copyright (c) 2017-2019, Digi International Inc.
# Copyright (c) 2017-2023, Digi International Inc.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
@ -17,7 +17,7 @@
[ "$IFACE" = "wlan1" ] || exit 0
if [ "$MODE" = "start" ]; then
check_virtual_wlan_macs() {
# Check for default MAC addresses
if [ -s "/proc/device-tree/wireless/mac-address1" ] &&
[ -s "/proc/device-tree/wireless/mac-address2" ] &&
@ -26,6 +26,13 @@ if [ "$MODE" = "start" ]; then
else
echo "[WARN] Using default MAC addresses for virtual interfaces, please program them referring to the Digi U-Boot Documentation"
fi
}
if [ "$MODE" = "start" ]; then
# On ccmp1, there are not virtual wireless MACs, so skip the verification.
if ! grep -qs '\<digi,ccmp1\>' /proc/device-tree/compatible; then
check_virtual_wlan_macs
fi
if [ ! -d "/sys/class/net/wlan1" ]; then
# This will create a second wireless network device

Some files were not shown because too many files have changed in this diff Show More