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

Signed-off-by: Hector Palacios <hector.palacios@digi.com>

https://jira.digi.com/browse/DEL-6640
This commit is contained in:
Hector Palacios 2019-09-03 13:17:34 +02:00
commit e09c58f85b
214 changed files with 3121 additions and 2364 deletions

View File

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

View File

@ -0,0 +1,50 @@
# Class for the generation of boot artifacts
# This function returns a list with the RAM_CONFIGS that match the RAM size
# in the list of UBOOT_CONFIG
def get_uboot_ram_combinations(d):
import re
types = d.getVar('UBOOT_CONFIG', True) or ""
ram_configs = d.getVar('RAM_CONFIGS', True) or ""
# Convert to arrays
types = types.split(" ")
ram_configs = ram_configs.split(" ")
# Obtain the list of RAM_CONFIGS for whose RAM size there is a match
# in UBOOT_CONFIG
matches = []
for type in types:
ramsize = re.search("([0-9]*[G|M]B)", type).group(1)
for ramc in ram_configs:
if ramsize in ramc:
matches.append(ramc)
return " ".join(matches)
UBOOT_RAM_COMBINATIONS = "${@get_uboot_ram_combinations(d)}"
# This function returns a list with the bootable artifacts
def get_bootable_artifacts(d):
import re
types = d.getVar('UBOOT_CONFIG', True) or ""
ram_configs = d.getVar('RAM_CONFIGS', True) or ""
uboot_prefix = d.getVar('UBOOT_PREFIX', True) or ""
uboot_suffix = d.getVar('UBOOT_SUFFIX', True) or ""
artifacts = []
# For platforms without RAM_CONFIGS, build the artifacts from UBOOT_CONFIG
if ram_configs == "":
for t in types.split(" "):
artifacts.append("%s-%s.%s" % (uboot_prefix, t, uboot_suffix))
return " ".join(artifacts)
else:
machine = d.getVar('MACHINE', True) or ""
ram_combinations = get_uboot_ram_combinations(d)
for ramc in ram_combinations.split(" "):
artifacts.append("%s-%s-%s.%s" % (uboot_prefix, machine, ramc, uboot_suffix))
return " ".join(artifacts)
BOOTABLE_ARTIFACTS = "${@get_bootable_artifacts(d)}"

View File

@ -0,0 +1,9 @@
# fsl-eula-graphics.bbclass extends the naming scheme in fsl-eula.bbclass
# to allow for graphics-backend-specific archives.
IMX_PACKAGE_NAME_APPEND = ""
IMX_PACKAGE_NAME_APPEND_class-target = \
"${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '-wayland', \
bb.utils.contains('DISTRO_FEATURES', 'x11', '-x11', \
'-fb', d), d)}"
IMX_PACKAGE_NAME_append_class-target = "${IMX_PACKAGE_NAME_APPEND}"
SRC_URI_NAME_append_class-target = "${IMX_PACKAGE_NAME_APPEND}"

View File

@ -0,0 +1,68 @@
# fsl-eula-unpack.bbclass provides the mechanism used for unpacking
# the .bin file downloaded by HTTP and handle the EULA acceptance.
#
# To use it, the 'fsl-eula' parameter needs to be added to the
# SRC_URI entry, e.g:
#
# SRC_URI = "${FSL_MIRROR}/firmware-imx-${PV};fsl-eula=true"
LIC_FILES_CHKSUM_append = " file://${FSL_EULA_FILE};md5=72c0f70181bb6e83eee6aab8de12a9f3"
LIC_FILES_CHKSUM[vardepsexclude] += "FSL_EULA_FILE"
python fsl_bin_do_unpack() {
src_uri = (d.getVar('SRC_URI', True) or "").split()
if len(src_uri) == 0:
return
localdata = bb.data.createCopy(d)
bb.data.update_data(localdata)
rootdir = localdata.getVar('WORKDIR', True)
fetcher = bb.fetch2.Fetch(src_uri, localdata)
for url in fetcher.ud.values():
save_cwd = os.getcwd()
# Check for supported fetchers
if url.type in ['http', 'https', 'ftp', 'file']:
if url.parm.get('fsl-eula', False):
# If download has failed, do nothing
if not os.path.exists(url.localpath):
bb.debug(1, "Exiting as '%s' cannot be found" % url.basename)
return
# Change to the working directory
bb.note("Handling file '%s' as a Freescale's EULA binary." % url.basename)
save_cwd = os.getcwd()
os.chdir(rootdir)
cmd = "sh %s --auto-accept --force" % (url.localpath)
bb.fetch2.runfetchcmd(cmd, d, quiet=True)
# Return to the previous directory
os.chdir(save_cwd)
}
python do_unpack() {
eula = d.getVar('ACCEPT_FSL_EULA', True)
eula_file = d.getVar('FSL_EULA_FILE', True)
pkg = d.getVar('PN', True)
if eula == None:
bb.fatal("To use '%s' you need to accept the Freescale EULA at '%s'. "
"Please read it and in case you accept it, write: "
"ACCEPT_FSL_EULA = \"1\" in your local.conf." % (pkg, eula_file))
elif eula == '0':
bb.fatal("To use '%s' you need to accept the Freescale EULA." % pkg)
else:
bb.note("Freescale EULA has been accepted for '%s'" % pkg)
# The binary unpack needs to be done first so 'S' is valid
bb.build.exec_func('fsl_bin_do_unpack', d)
try:
bb.build.exec_func('base_do_unpack', d)
except:
raise
}
do_unpack[vardepsexclude] += "FSL_EULA_FILE"

View File

@ -1,33 +1 @@
# fsl-eula-unpack2.bbclass provides a mechanism for a) unpacking certain
# EULA-licensed archives downloaded by HTTP and b) handling the EULA
# acceptance.
inherit fsl-eula-unpack fsl-eula
IMX_PACKAGE_VERSION = "${PV}"
SRC_URI = "${FSL_MIRROR}${IMX_PACKAGE_NAME}.bin;name=${SRC_URI_NAME};fsl-eula=true"
S = "${WORKDIR}/${IMX_PACKAGE_NAME}"
# For native apps, insert the user-local sysroot path
# For nativesdk apps, insert the correct distro folder
D_SUBDIR = ""
D_SUBDIR_class-native = "${STAGING_DIR_NATIVE}"
D_SUBDIR_class-nativesdk = "/opt/${DISTRO}"
# SCR is the location and name of the Software Content Register file
# relative to ${D}${D_SUBDIR}.
SCR = "SCR.txt"
do_install () {
install -d ${D}${D_SUBDIR}
cp -r ${S}/* ${D}${D_SUBDIR}
rm ${D}${D_SUBDIR}/COPYING
if [ ! -f ${D}${D_SUBDIR}/${SCR} ]; then
bbfatal "Missing Software Content Register \"${D}${D_SUBDIR}/${SCR}\""
fi
rm ${D}${D_SUBDIR}/${SCR}
}
FILES_${PN} = "/"
inherit fsl-eula2-unpack2 fsl-eula2-package-arch

View File

@ -1,29 +1 @@
# fsl-eula.bbclass defines a common naming scheme used by the
# packing and unpacking mechanisms defined in fsl-eula-pack.bbclass
# and fsl-eula-unpack2.bbclass.
#
# Note that it is not necessary to inherit this class directly. It is
# already inherited from fsl-eula-pack.bbclass and fsl-eula-unpack2.bbclass.
#
# The naming scheme takes into account the fact that a single software
# package can create many archives based on the combinations of a) target
# versus native/nativesdk components, and b) the target or native architecture.
# The naming scheme can be extended through regular bitbake means to allow
# configuration-specific archives, as can be seen in fsl-eula-graphics.bbclass.
# The variable IMX_PACKAGE_NAME gives a unique name for every possible
# archive. The variable is built from a combination of the package name ${PN},
# the version ${IMX_PACKAGE_VERSION} and the target or native architecture,
# ${TARGET_ARCH} or ${BUILD_ARCH}.
IMX_PACKAGE_NAME = "${PN}-${IMX_PACKAGE_VERSION}-${TARGET_ARCH}"
IMX_PACKAGE_NAME_class-native = "${PN}-${IMX_PACKAGE_VERSION}-${BUILD_ARCH}"
IMX_PACKAGE_NAME_class-nativesdk = "${PN}-${IMX_PACKAGE_VERSION}-${BUILD_ARCH}"
# The variable SRC_URI_NAME gives a unique SRC_URI name option for use in
# unpacking recipes derived from fsl-eula-unpack2.bbclass. With this name,
# a single unpacking recipe can handle all possible archives. The name is
# built from with a combination of target or native architecture,
# ${TARGET_ARCH} or ${BUILD_ARCH}, and a native or nativesdk designation.
SRC_URI_NAME = "${TARGET_ARCH}"
SRC_URI_NAME_class-native = "${BUILD_ARCH}-native"
SRC_URI_NAME_class-nativesdk = "${BUILD_ARCH}-nativesdk"
inherit fsl-eula2 fsl-eula2-package-arch

View File

@ -0,0 +1,16 @@
# fsl-eula-package_arch.bbclass extends the package naming scheme to allow
# a single software package to create multiple archives based on the
# combinations of a) target versus native/nativesdk components, and b) the
# target or native architecture.
IMX_PACKAGE_NAME_append = "-${TARGET_ARCH}"
IMX_PACKAGE_NAME_class-native_append = "-${BUILD_ARCH}"
IMX_PACKAGE_NAME_class-nativesdk_append = "-${BUILD_ARCH}"
SRC_URI_append = ";name=${SRC_URI_NAME}"
SRC_URI_NAME = "${TARGET_ARCH}"
SRC_URI_NAME_class-native = "${BUILD_ARCH}-native"
SRC_URI_NAME_class-nativesdk = "${BUILD_ARCH}-nativesdk"
INSANE_SKIP_${PN}_remove = "arch"
INSANE_SKIP_${PN}-dbg_remove = "arch"

View File

@ -0,0 +1,36 @@
# fsl-eula-unpack2.bbclass provides a mechanism for a) unpacking certain
# EULA-licensed archives downloaded by HTTP and b) handling the EULA
# acceptance.
inherit fsl-eula-unpack fsl-eula2
IMX_PACKAGE_VERSION = "${PV}"
SRC_URI = "${FSL_MIRROR}${IMX_PACKAGE_NAME}.bin;fsl-eula=true"
S = "${WORKDIR}/${IMX_PACKAGE_NAME}"
# For native apps, insert the user-local sysroot path
# For nativesdk apps, insert the correct distro folder
D_SUBDIR = ""
D_SUBDIR_class-native = "${STAGING_DIR_NATIVE}"
D_SUBDIR_class-nativesdk = "/opt/${DISTRO}"
# SCR is the location and name of the Software Content Register file
# relative to ${D}${D_SUBDIR}.
SCR = "SCR.txt"
do_install () {
install -d ${D}${D_SUBDIR}
cp -r ${S}/* ${D}${D_SUBDIR}
if [ -d "${D}/usr/lib" ] && [ "${D}/usr/lib" != "${D}${libdir}" ]; then
mv ${D}/usr/lib ${D}${libdir}
fi
rm ${D}${D_SUBDIR}/COPYING
if [ ! -f ${D}${D_SUBDIR}/${SCR} ]; then
bbfatal "Missing Software Content Register \"${D}${D_SUBDIR}/${SCR}\""
fi
rm ${D}${D_SUBDIR}/${SCR}
}
FILES_${PN} = "/"

View File

@ -0,0 +1,16 @@
# fsl-eula2.bbclass defines a common naming scheme used by the
# packing and unpacking mechanisms defined in fsl-eula-pack.bbclass
# and fsl-eula2-unpack2.bbclass.
#
# Note that it is not necessary to inherit this class directly. It is
# already inherited from fsl-eula-pack.bbclass and fsl-eula2-unpack2.bbclass.
#
# The naming scheme can be extended through regular bitbake means to allow
# configuration-specific archives, as can be seen in fsl-eula-graphics.bbclass
# and fsl-eula2-package-arch.bbclass.
IMX_PACKAGE_NAME = "${BPN}-${IMX_PACKAGE_VERSION}"
IMX_PACKAGE_NAME_class-native = "${PN}-${IMX_PACKAGE_VERSION}"
IMX_PACKAGE_NAME_class-nativesdk = "${PN}-${IMX_PACKAGE_VERSION}"
INSANE_SKIP_${PN} += "arch"
INSANE_SKIP_${PN}-dbg += "arch"

View File

@ -3,6 +3,8 @@ inherit image_types
################################################################################
# BOOT IMAGES #
################################################################################
BOOTLOADER_IMAGE_RECIPE ?= "u-boot"
def TRUSTFENCE_BOOTIMAGE_DEPENDS(d):
tf_initramfs = d.getVar('TRUSTFENCE_INITRAMFS_IMAGE',True) or ""
return "%s:do_image_complete" % tf_initramfs if tf_initramfs else ""
@ -11,7 +13,7 @@ do_image_boot_vfat[depends] += " \
coreutils-native:do_populate_sysroot \
dosfstools-native:do_populate_sysroot \
mtools-native:do_populate_sysroot \
u-boot:do_deploy \
${BOOTLOADER_IMAGE_RECIPE}:do_deploy \
virtual/kernel:do_deploy \
${@TRUSTFENCE_BOOTIMAGE_DEPENDS(d)} \
"
@ -74,7 +76,7 @@ do_image_boot_vfat[imgsuffix] = "."
do_image_boot_ubifs[depends] += " \
mtd-utils-native:do_populate_sysroot \
u-boot:do_deploy \
${BOOTLOADER_IMAGE_RECIPE}:do_deploy \
virtual/kernel:do_deploy \
${@TRUSTFENCE_BOOTIMAGE_DEPENDS(d)} \
"
@ -144,7 +146,7 @@ IMAGE_TYPEDEP_recovery.vfat = "boot.vfat"
do_image_recovery_ubifs[depends] += " \
mtd-utils-native:do_populate_sysroot \
u-boot:do_deploy \
${BOOTLOADER_IMAGE_RECIPE}:do_deploy \
virtual/kernel:do_deploy \
${RECOVERY_INITRAMFS_IMAGE}:do_image_complete \
"
@ -228,7 +230,6 @@ BOARD_BOOTIMAGE_PARTITION_SIZE ??= "65536"
# SD card image name
SDIMG = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.sdcard"
IMAGE_BOOTLOADER ?= "u-boot"
BOOTLOADER_SEEK ?= "1"
SDIMG_BOOTLOADER ?= "${DEPLOY_DIR_IMAGE}/${UBOOT_SYMLINK}"
@ -241,7 +242,7 @@ do_image_sdcard[depends] = " \
dosfstools-native:do_populate_sysroot \
mtools-native:do_populate_sysroot \
parted-native:do_populate_sysroot \
${IMAGE_BOOTLOADER}:do_deploy \
${BOOTLOADER_IMAGE_RECIPE}:do_deploy \
virtual/kernel:do_deploy \
"

View File

@ -22,9 +22,9 @@ UBOOT_CONFIG[ccimx8x_sbc_express2GB] = "ccimx8x_sbc_express2GB_defconfig,,u-boot
UBOOT_CONFIG[ccimx8x_sbc_express1GB] = "ccimx8x_sbc_express1GB_defconfig,,u-boot-dtb.${UBOOT_SUFFIX}"
KERNEL_DEVICETREE ?= " \
digi/ccimx8x-sbc-express-id129.dtb \
digi/ccimx8x-sbc-express-wb.dtb \
digi/ccimx8x-sbc-express.dtb \
digi/ccimx8qxp-sbc-express-id129.dtb \
digi/ccimx8qxp-sbc-express-wb.dtb \
digi/ccimx8qxp-sbc-express.dtb \
"
SERIAL_CONSOLES ?= "115200;ttyLP2"

View File

@ -17,14 +17,17 @@ MACHINE_FIRMWARE_append = " ${@oe.utils.conditional('HAVE_WIFI', '1', 'firmware-
# U-Boot configurations
# Last one is the default (the one the symlinks point at)
UBOOT_CONFIG ??= "ccimx8x_sbc_pro1GB ccimx8x_sbc_pro2GB"
UBOOT_CONFIG ??= "ccimx8x_sbc_pro512MB ccimx8x_sbc_pro1GB ccimx8x_sbc_pro2GB"
UBOOT_CONFIG[ccimx8x_sbc_pro2GB] = "ccimx8x_sbc_pro2GB_defconfig,,u-boot-dtb.${UBOOT_SUFFIX}"
UBOOT_CONFIG[ccimx8x_sbc_pro1GB] = "ccimx8x_sbc_pro1GB_defconfig,,u-boot-dtb.${UBOOT_SUFFIX}"
UBOOT_CONFIG[ccimx8x_sbc_pro512MB] = "ccimx8x_sbc_pro512MB_defconfig,,u-boot-dtb.${UBOOT_SUFFIX}"
KERNEL_DEVICETREE ?= " \
digi/ccimx8x-sbc-pro-id135.dtb \
digi/ccimx8x-sbc-pro-wb.dtb \
digi/ccimx8x-sbc-pro.dtb \
digi/ccimx8dx-sbc-pro-wb.dtb \
digi/ccimx8dx-sbc-pro.dtb \
digi/ccimx8qxp-sbc-pro-id135.dtb \
digi/ccimx8qxp-sbc-pro-wb.dtb \
digi/ccimx8qxp-sbc-pro.dtb \
"
SERIAL_CONSOLES ?= "115200;ttyLP2"

View File

@ -9,8 +9,8 @@ include conf/machine/include/imx-digi-base.inc
include conf/machine/include/tune-cortexa9.inc
# Platform u-boot settings
UBOOT_PREFIX = "u-boot"
UBOOT_SUFFIX = "imx"
UBOOT_SYMLINK = "u-boot-${MACHINE}.${UBOOT_SUFFIX}"
# Linux kernel configuration
KERNEL_DEFCONFIG ?= "arch/arm/configs/ccimx6sbc_defconfig"
@ -18,6 +18,9 @@ KERNEL_DEFCONFIG ?= "arch/arm/configs/ccimx6sbc_defconfig"
# Wireless external module
WIRELESS_MODULE ?= ""
# Use our recipe of linux-imx-headers instead of the meta-freescale one
PREFERRED_VERSION_linux-imx-headers ?= "4.9"
# Firmware
MACHINE_FIRMWARE ?= "firmware-imx-sdma"
MACHINE_FIRMWARE_append_mx6q = " firmware-imx-vpu-imx6q"
@ -37,4 +40,4 @@ MACHINE_EXTRA_RRECOMMENDS += " \
cryptodev-module \
"
MACHINE_FEATURES += "accel-graphics accel-video wifi bluetooth"
MACHINE_FEATURES += "accel-graphics accel-video wifi bluetooth pci"

View File

@ -9,8 +9,8 @@ include conf/machine/include/imx-digi-base.inc
include conf/machine/include/tune-cortexa7.inc
# Platform u-boot settings
UBOOT_PREFIX = "u-boot"
UBOOT_SUFFIX = "imx"
UBOOT_SYMLINK = "u-boot-${MACHINE}.${UBOOT_SUFFIX}"
# Wireless external module
WIRELESS_MODULE ?= ""

View File

@ -9,15 +9,22 @@ include conf/machine/include/imx-digi-base.inc
include conf/machine/include/arm/arch-arm64.inc
# Platform u-boot settings
UBOOT_PREFIX = "imx-boot"
UBOOT_SUFFIX = "bin"
UBOOT_SYMLINK = "u-boot-${MACHINE}.${UBOOT_SUFFIX}"
# The bootloader image that gets flashed consists of U-Boot and several fw binaries
EXTRA_IMAGEDEPENDS = "imx-boot"
IMAGE_BOOTLOADER = "imx-boot"
BOOTLOADER_IMAGE_RECIPE = "imx-boot"
# BOOTLOADER_SEEK is 33 for step A of the silicon and 32 for step B
BOOTLOADER_SEEK = "32"
SDIMG_BOOTLOADER = "${DEPLOY_DIR_IMAGE}/imx-boot-${MACHINE}.bin"
BOOTABLE_FILENAME = "${UBOOT_PREFIX}-${MACHINE}.bin"
SDIMG_BOOTLOADER = "${DEPLOY_DIR_IMAGE}/${BOOTABLE_FILENAME}"
# RAM variants
# This determines the number of different DCD files, and thus the number of
# different U-Boot binaries required.
# Last one is the default (the one the symlinks point at)
RAM_CONFIGS = "1.2GHz_512MB_16bit 1.2GHz_1GB_16bit 1.2GHz_1GB_32bit 1.2GHz_2GB_32bit"
# Linux kernel configuration
KERNEL_DEFCONFIG ?= "arch/arm64/configs/ccimx8x_defconfig"
@ -44,7 +51,7 @@ MACHINE_EXTRA_RRECOMMENDS += " \
cryptoauthlib \
"
MACHINE_FEATURES += "accel-graphics accel-video wifi bluetooth cryptochip"
MACHINE_FEATURES += "accel-graphics accel-video wifi bluetooth cryptochip pci"
# AARCH64 doesn't support self-extracting zImage
KERNEL_IMAGETYPE = "Image.gz"

View File

@ -50,3 +50,7 @@ USE_VT ?= "0"
# Add the machine variant to the valid machine override
MACHINE_VARIANT ?= ""
MACHINEOVERRIDES .= "${@['', ':${MACHINE_VARIANT}']['${MACHINE_VARIANT}' != '']}"
# U-Boot symlink
UBOOT_SYMLINK ?= "${UBOOT_PREFIX}-${MACHINE}.${UBOOT_SUFFIX}"
BOOTABLE_ARTIFACTS ?= ""

View File

@ -1,54 +0,0 @@
# Copyright (C) 2016 Freescale Semiconductor
# Copyright 2017-2018 NXP
# Copyright (C) 2018-2019 Digi International.
DESCRIPTION = "i.MX System Controller Firmware, customized for Digi platforms"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=6dfb32a488e5fd6bae52fbf6c7ebb086"
SECTION = "BSP"
inherit pkgconfig deploy
SRC_URI = "${DIGI_PKG_SRC}/${PN}-${PV}.tar.gz"
SRC_URI[md5sum] = "bc8b696ea4f75747bed9fabd352f9596"
SRC_URI[sha256sum] = "e3cf8163a02d71e06bbf64ea50e3a661dbecf60a57ff890d3dc1ee9ffdcda9ee"
S = "${WORKDIR}/${PN}-${PV}"
SC_FIRMWARE_NAME ?= "mx8qx-${DIGI_FAMILY}-scfw-tcm.bin"
symlink_name = "scfw_tcm.bin"
SYSROOT_DIRS += "/boot"
do_install () {
install -d ${D}/boot
for type in ${UBOOT_CONFIG}; do
RAM_SIZE="$(echo ${type} | sed -e 's,.*\([0-9]\+GB\),\1,g')"
install -m 0644 ${S}/${SC_FIRMWARE_NAME}-${RAM_SIZE} ${D}/boot/
done
}
BOOT_TOOLS = "imx-boot-tools"
do_deploy () {
install -d ${DEPLOYDIR}/${BOOT_TOOLS}
for type in ${UBOOT_CONFIG}; do
RAM_SIZE="$(echo ${type} | sed -e 's,.*\([0-9]\+GB\),\1,g')"
install -m 0644 ${S}/${SC_FIRMWARE_NAME}-${RAM_SIZE} ${DEPLOYDIR}/${BOOT_TOOLS}/
cd ${DEPLOYDIR}/${BOOT_TOOLS}/
rm -f ${symlink_name}-${RAM_SIZE}
ln -sf ${SC_FIRMWARE_NAME}-${RAM_SIZE} ${symlink_name}-${RAM_SIZE}
cd -
done
}
addtask deploy after do_install
INHIBIT_PACKAGE_STRIP = "1"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
PACKAGE_ARCH = "${MACHINE_ARCH}"
FILES_${PN} = "/boot"
COMPATIBLE_MACHINE = "(ccimx8x)"

View File

@ -0,0 +1,52 @@
# Copyright (C) 2016 Freescale Semiconductor
# Copyright 2017-2018 NXP
# Copyright (C) 2018-2019 Digi International.
DESCRIPTION = "i.MX System Controller Firmware, customized for Digi platforms"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://COPYING;md5=fb0303e4ee8b0e71c094171e2272bd44"
SECTION = "BSP"
inherit pkgconfig deploy
SRC_URI = "${DIGI_PKG_SRC}/${PN}-${PV}.tar.gz"
SRC_URI[md5sum] = "3cf34f428d9a0e98ffc7f0cd326d5dc8"
SRC_URI[sha256sum] = "5b0022857fdcbbd4c641f3753d99b8afa8f605b798be3dfd8433696657911f86"
S = "${WORKDIR}/${PN}-${PV}"
SC_FIRMWARE_NAME ?= "mx8x-${DIGI_FAMILY}-scfw-tcm.bin"
symlink_name = "scfw_tcm.bin"
SYSROOT_DIRS += "/boot"
do_install () {
install -d ${D}/boot
for ramc in ${RAM_CONFIGS}; do
install -m 0644 ${S}/${SC_FIRMWARE_NAME}-${ramc} ${D}/boot/
done
}
BOOT_TOOLS = "imx-boot-tools"
do_deploy () {
install -d ${DEPLOYDIR}/${BOOT_TOOLS}
for ramc in ${RAM_CONFIGS}; do
install -m 0644 ${S}/${SC_FIRMWARE_NAME}-${ramc} ${DEPLOYDIR}/${BOOT_TOOLS}/
cd ${DEPLOYDIR}/${BOOT_TOOLS}/
rm -f ${symlink_name}-${ramc}
ln -sf ${SC_FIRMWARE_NAME}-${ramc} ${symlink_name}-${ramc}
cd -
done
}
addtask deploy after do_install
INHIBIT_PACKAGE_STRIP = "1"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
PACKAGE_ARCH = "${MACHINE_ARCH}"
FILES_${PN} = "/boot"
COMPATIBLE_MACHINE = "(ccimx8x)"

View File

@ -1,71 +1,28 @@
# Copyright (C) 2012-2016 Freescale Semiconductor
# Copyright (C) 2018 O.S. Systems Software LTDA.
# Copyright 2017-2018 NXP
# Copyright 2017-2019 NXP
SUMMARY = "Freescale IMX firmware"
DESCRIPTION = "Freescale IMX firmware such as for the VPU"
SECTION = "base"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://COPYING;md5=6dfb32a488e5fd6bae52fbf6c7ebb086"
LIC_FILES_CHKSUM = "file://COPYING;md5=72c0f70181bb6e83eee6aab8de12a9f3"
PE = "1"
SRCBRANCH ?= "master"
SRC_URI = "${FSL_MIRROR}/firmware-imx-${PV}.bin;fsl-eula=true "
#BRCM firmware v1.141.100.6
IMX_FIRMWARE_SRC ?= "git://github.com/NXP/imx-firmware.git;protocol=https"
SRC_URI = "${FSL_MIRROR}/firmware-imx-${PV}.bin;fsl-eula=true \
${IMX_FIRMWARE_SRC};branch=${SRCBRANCH};destsuffix=${S}/git "
SRC_URI[md5sum] = "b8ae7cdd2a648168f1c90471ca87f6ba"
SRC_URI[sha256sum] = "63ec62f5d229cbed00918c8449173933f1c9d594c59396b8dd217e94f47138b0"
#BRCM firmware git
SRCREV = "8ce9046f5058fdd2c5271f86ccfc61bc5a248ae3"
SRC_URI[md5sum] = "776c7fa64a6e96d9f0d9cd50bbf79ffc"
SRC_URI[sha256sum] = "48e4b9e4064930e2b6cd7f20f39177c8f4c5ef1a296f2ebc6ed422412ab56681"
inherit fsl-eula-unpack allarch
do_install() {
install -d ${D}${base_libdir}/firmware/imx
install -d ${D}${base_libdir}/firmware/bcm
install -d ${D}${sysconfdir}/firmware
cp -rfv firmware/* ${D}${base_libdir}/firmware/
#1BW_BCM43340
install -d ${D}${base_libdir}/firmware/bcm/1BW_BCM43340
cp -rfv git/brcm/1BW_BCM43340/*.bin ${D}${base_libdir}/firmware/bcm/1BW_BCM43340
cp -rfv git/brcm/1BW_BCM43340/*.cal ${D}${base_libdir}/firmware/bcm/1BW_BCM43340
cp -rfv git/brcm/1BW_BCM43340/*.hcd ${D}${sysconfdir}/firmware/
#1DX_BCM4343W
install -d ${D}${base_libdir}/firmware/bcm/1DX_BCM4343W
cp -rfv git/brcm/1DX_BCM4343W/*.bin ${D}${base_libdir}/firmware/bcm/1DX_BCM4343W
cp -rfv git/brcm/1DX_BCM4343W/*.cal ${D}${base_libdir}/firmware/bcm/1DX_BCM4343W
cp -rfv git/brcm/1DX_BCM4343W/*.hcd ${D}${sysconfdir}/firmware/
#SN8000_BCM43362
install -d ${D}${base_libdir}/firmware/bcm/SN8000_BCM43362
cp -rfv git/brcm/SN8000_BCM43362/*.bin ${D}${base_libdir}/firmware/bcm/SN8000_BCM43362
cp -rfv git/brcm/SN8000_BCM43362/*.cal ${D}${base_libdir}/firmware/bcm/SN8000_BCM43362
cp -rfv git/brcm/1DX_BCM4343W/*.hcd ${D}${sysconfdir}/firmware/
#ZP_BCM4339
install -d ${D}${base_libdir}/firmware/bcm/ZP_BCM4339
cp -rfv git/brcm/ZP_BCM4339/*.bin ${D}${base_libdir}/firmware/bcm/ZP_BCM4339
cp -rfv git/brcm/ZP_BCM4339/*.cal ${D}${base_libdir}/firmware/bcm/ZP_BCM4339
cp -rfv git/brcm/ZP_BCM4339/*.hcd ${D}${sysconfdir}/firmware/
#1FD_BCM89359
install -d ${D}${base_libdir}/firmware/bcm/1FD_BCM89359
cp -rfv git/brcm/1FD_BCM89359/*.bin ${D}${base_libdir}/firmware/bcm/1FD_BCM89359
cp -rfv git/brcm/1FD_BCM89359/*.hcd ${D}${sysconfdir}/firmware/
#1CX_BCM4356
install -d ${D}${base_libdir}/firmware/bcm/1CX_BCM4356
cp -rfv git/brcm/1CX_BCM4356/fw_bcmdhd.bin ${D}${base_libdir}/firmware/bcm/1CX_BCM4356
# Install SDMA Firmware: sdma-imx6q.bin & sdma-imx7d.bin into lib/firmware/imx/sdma
install -d ${D}${base_libdir}/firmware/imx/sdma
mv ${D}${base_libdir}/firmware/sdma/sdma-imx6q.bin ${D}${base_libdir}/firmware/imx/sdma
@ -87,6 +44,8 @@ do_install() {
mv ${D}${base_libdir}/firmware/epdc/ ${D}${base_libdir}/firmware/imx/epdc/
mv ${D}${base_libdir}/firmware/imx/epdc/epdc_ED060XH2C1.fw.nonrestricted ${D}${base_libdir}/firmware/imx/epdc/epdc_ED060XH2C1.fw
mv ${D}${base_libdir}/firmware/easrc/ ${D}${base_libdir}/firmware/imx/easrc/
find ${D}${base_libdir}/firmware -type f -exec chmod 644 '{}' ';'
find ${D}${base_libdir}/firmware -type f -exec chown root:root '{}' ';'
@ -144,9 +103,9 @@ ALLOW_EMPTY_${PN} = "1"
PACKAGES_DYNAMIC = "${PN}-vpu-* ${PN}-sdma-*"
PACKAGES =+ "${PN}-epdc ${PN}-brcm ${PN}-scfw ${PN}-sdma"
PACKAGES =+ "${PN}-epdc ${PN}-scfw ${PN}-sdma ${PN}-easrc"
FILES_${PN}-epdc = "${base_libdir}/firmware/imx/epdc/"
FILES_${PN}-brcm = "${base_libdir}/firmware/bcm/*/*.bin ${base_libdir}/firmware/bcm/*/*.cal ${sysconfdir}/firmware/"
FILES_${PN}-scfw = "${base_libdir}/firmware/scfw/"
FILES_${PN}-sdma = " ${base_libdir}/firmware/imx/sdma"
FILES_${PN}-easrc = "${base_libdir}/firmware/imx/easrc/"

View File

@ -18,9 +18,9 @@ FW_QUALCOMM_BT = " \
FW_QCA6564_WIFI_PROPRIETARY = " \
file://bdwlan30_US.bin \
file://LICENCE.atheros_firmware \
file://otp30.bin \
file://qwlan30.bin \
file://utf30.bin \
file://qca6564_proprietary/otp30.bin \
file://qca6564_proprietary/qwlan30.bin \
file://qca6564_proprietary/utf30.bin \
"
# Firmware files for QCA6574 (Qualcomm proprietary driver)

View File

@ -1,5 +0,0 @@
# Copyright (C) 2019 Digi International.
# Use the v4.14 ga BSP branch
SRCBRANCH = "imx_4.14.78_1.0.0_ga"
SRCREV = "d6451cc1e162eff89b03dd63e86d55b9baa8885b"

View File

@ -0,0 +1,83 @@
# Copyright 2017-2018 NXP
DESCRIPTION = "i.MX ARM Trusted Firmware"
SECTION = "BSP"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9"
inherit fsl-eula-unpack pkgconfig deploy
PV = "2.0+git${SRCPV}"
ATF_SRC ?= "git://source.codeaurora.org/external/imx/imx-atf.git;protocol=https"
SRCBRANCH = "imx_4.14.98_2.1.0"
SRC_URI = "${ATF_SRC};branch=${SRCBRANCH}"
SRCREV = "727cf896a4c79d152dae4537e28400c747bf39b9"
S = "${WORKDIR}/git"
BOOT_TOOLS = "imx-boot-tools"
SOC_ATF ?= "imx8qm"
SOC_ATF_mx8qm = "imx8qm"
SOC_ATF_mx8qxp = "imx8qx"
SOC_ATF_mx8mq = "imx8mq"
SOC_ATF_mx8mm = "imx8mm"
SOC_ATF_mx8mn = "imx8mn"
SYSROOT_DIRS += "/boot"
BUILD_OPTEE = "${@bb.utils.contains('COMBINED_FEATURES', 'optee', 'true', 'false', d)}"
do_compile () {
export CROSS_COMPILE="${TARGET_PREFIX}"
cd ${S}
# Clear LDFLAGS to avoid the option -Wl recognize issue
unset LDFLAGS
echo "-> Build ${SOC_ATF} bl31.bin"
# Set BUIL_STRING with the revision info
BUILD_STRING=""
if [ -e ${S}/.revision ]; then
cur_rev=`cat ${S}/.revision`
echo " Current revision is ${cur_rev} ."
BUILD_STRING="BUILD_STRING=${cur_rev}"
else
echo " No .revision found! "
fi
oe_runmake clean PLAT=${SOC_ATF}
oe_runmake ${BUILD_STRING} PLAT=${SOC_ATF} bl31
# Build opteee version
if [ "${BUILD_OPTEE}" = "true" ]; then
oe_runmake clean PLAT=${SOC_ATF} BUILD_BASE=build-optee
oe_runmake ${BUILD_STRING} PLAT=${SOC_ATF} BUILD_BASE=build-optee SPD=opteed bl31
fi
unset CROSS_COMPILE
}
do_install () {
install -d ${D}/boot
install -m 0644 ${S}/build/${SOC_ATF}/release/bl31.bin ${D}/boot/bl31-${SOC_ATF}.bin
# Install opteee version
if [ "${BUILD_OPTEE}" = "true" ]; then
install -m 0644 ${S}/build-optee/${SOC_ATF}/release/bl31.bin ${D}/boot/bl31-${SOC_ATF}.bin-optee
fi
}
do_deploy () {
install -d ${DEPLOYDIR}/${BOOT_TOOLS}
install -m 0644 ${S}/build/${SOC_ATF}/release/bl31.bin ${DEPLOYDIR}/${BOOT_TOOLS}/bl31-${SOC_ATF}.bin
# Deploy opteee version
if [ "${BUILD_OPTEE}" = "true" ]; then
install -m 0644 ${S}/build-optee/${SOC_ATF}/release/bl31.bin ${DEPLOYDIR}/${BOOT_TOOLS}/bl31-${SOC_ATF}.bin-optee
fi
}
addtask deploy before do_install after do_compile
FILES_${PN} = "/boot"
PACKAGE_ARCH = "${MACHINE_ARCH}"
COMPATIBLE_MACHINE = "(mx8)"

View File

@ -0,0 +1,31 @@
From: Gabriel Valcazar <gabriel.valcazar@digi.com>
Date: Fri, 19 Jul 2019 10:42:35 +0200
Subject: [PATCH] iMX8QX: remove SC_BD_FLAGS_ALT_CONFIG flag in
flash_regression_linux_m4 target
This flag breaks the ccimx8x U-Boot due to the code that is executed in the
SCFW when it's set. Make the build command the same as the "flash_all" target
in the rel_imx_4.14.78_1.0.0_ga tag, since the M4 demos still seem to work as
expected when the flag is removed. The "-p3" parameter also needs to be removed
for the images to boot properly.
https://jira.digi.com/browse/DEL-6677
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
---
iMX8QX/soc.mak | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/iMX8QX/soc.mak b/iMX8QX/soc.mak
index 3c8e7b1..f06ece8 100755
--- a/iMX8QX/soc.mak
+++ b/iMX8QX/soc.mak
@@ -114,7 +114,7 @@ flash_linux_m4_xip: $(MKIMG) mx8qx-ahab-container.img scfw_tcm.bin u-boot-atf-co
./$(QSPI_PACKER) $(QSPI_HEADER)
flash_regression_linux_m4: $(MKIMG) mx8qx-ahab-container.img scfw_tcm.bin u-boot-atf.bin m4_image.bin
- ./$(MKIMG) -soc QX -rev B0 -append mx8qx-ahab-container.img -c -flags 0x00200000 -scfw scfw_tcm.bin -ap u-boot-atf.bin a35 0x80000000 -p3 -m4 m4_image.bin 0 0x34FE0000 -out flash.bin
+ ./$(MKIMG) -soc QX -rev B0 -append mx8qx-ahab-container.img -c -scfw scfw_tcm.bin -ap u-boot-atf.bin a35 0x80000000 -m4 m4_image.bin 0 0x34FE0000 -out flash.bin
flash_regression_linux_m4_ddr: $(MKIMG) mx8qx-ahab-container.img scfw_tcm.bin u-boot-atf.bin m4_image.bin
./$(MKIMG) -soc QX -rev B0 -append mx8qx-ahab-container.img -c -flags 0x00200000 -scfw scfw_tcm.bin -ap u-boot-atf.bin a35 0x80000000 -p3 -m4 m4_image.bin 0 0x88000000 -out flash.bin

View File

@ -1,4 +1,12 @@
# Copyright 2019 Digi International, Inc.
inherit boot-artifacts
# Use the v4.14 ga BSP branch
SRCBRANCH = "imx_4.14.98_2.0.0_ga"
SRCREV = "dd0234001713623c79be92b60fa88bc07b07f24f"
FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
SRC_URI_append_ccimx8x = " file://0001-iMX8QX-remove-SC_BD_FLAGS_ALT_CONFIG-flag-in-flash_r.patch"
IMX_EXTRA_FIRMWARE_ccimx8x = "digi-sc-firmware"
@ -26,53 +34,62 @@ do_populate_lic[depends] += " \
${@' '.join('%s:do_populate_lic' % r for r in '${IMX_M4_DEMOS}'.split() )} \
firmware-imx:do_populate_lic \
"
UBOOT_NAME = "u-boot-${MACHINE}.bin"
BOOT_CONFIG_MACHINE = "${BOOT_NAME}"
ATF_MACHINE_NAME_mx8qxp = "bl31-imx8qx.bin"
IMXBOOT_TARGETS_ccimx8x = "${@bb.utils.contains('UBOOT_CONFIG', 'fspi', 'flash_flexspi', \
bb.utils.contains('UBOOT_CONFIG', 'nand', 'flash_nand', \
'flash flash_all', d), d)}"
'flash flash_regression_linux_m4', d)}"
do_compile () {
bbnote 8QX boot binary build
cp ${DEPLOY_DIR_IMAGE}/imx8qx_m4_TCM_srtm_demo.bin ${BOOT_STAGING}/m40_tcm.bin
cp ${DEPLOY_DIR_IMAGE}/imx8qx_m4_TCM_srtm_demo.bin ${BOOT_STAGING}/CM4.bin
cp ${DEPLOY_DIR_IMAGE}/imx8qx_m4_TCM_srtm_demo.bin ${BOOT_STAGING}/m4_image.bin
cp ${DEPLOY_DIR_IMAGE}/mx8qx-ahab-container.img ${BOOT_STAGING}/
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin
for type in ${UBOOT_CONFIG}; do
RAM_SIZE="$(echo ${type} | sed -e 's,.*\([0-9]\+GB\),\1,g')"
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${UBOOT_NAME}-${type} ${BOOT_STAGING}/u-boot.bin-${type}
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME}-${RAM_SIZE} ${BOOT_STAGING}/scfw_tcm.bin-${RAM_SIZE}
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/u-boot-${type}.bin ${BOOT_STAGING}/
done
for ramc in ${RAM_CONFIGS}; do
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME}-${ramc} ${BOOT_STAGING}/
done
# mkimage for i.MX8
for type in ${UBOOT_CONFIG}; do
cd ${BOOT_STAGING}
ln -sf u-boot.bin-${type} u-boot.bin
RAM_SIZE="$(echo ${type} | sed -e 's,.*\([0-9]\+GB\),\1,g')"
ln -sf scfw_tcm.bin-${RAM_SIZE} scfw_tcm.bin
cd -
for target in ${IMXBOOT_TARGETS}; do
bbnote "building ${SOC_TARGET} - ${type} - ${target}"
make SOC=${SOC_TARGET} ${target}
if [ -e "${BOOT_STAGING}/flash.bin" ]; then
cp ${BOOT_STAGING}/flash.bin ${S}/${BOOT_CONFIG_MACHINE}-${type}.bin-${target}
RAM_SIZE="$(echo ${type} | sed -e 's,.*[a-z]\+\([0-9]\+[M|G]B\)$,\1,g')"
for ramc in ${RAM_CONFIGS}; do
if echo "${ramc}" | grep -qs "${RAM_SIZE}"; then
# Match U-Boot memory size and and SCFW memory configuration
cd ${BOOT_STAGING}
ln -sf u-boot-${type}.bin u-boot.bin
ln -sf ${SC_FIRMWARE_NAME}-${ramc} scfw_tcm.bin
cd -
for target in ${IMXBOOT_TARGETS}; do
bbnote "building ${SOC_TARGET} - ${ramc} - ${target}"
make SOC=${SOC_TARGET} ${target}
if [ -e "${BOOT_STAGING}/flash.bin" ]; then
cp ${BOOT_STAGING}/flash.bin ${S}/${UBOOT_PREFIX}-${MACHINE}-${ramc}.bin-${target}
fi
SCFWBUILT="yes"
done
rm ${BOOT_STAGING}/scfw_tcm.bin
rm ${BOOT_STAGING}/u-boot.bin
# Remove u-boot-atf.bin and u-boot-hash.bin so they get generated with the next iteration's U-Boot
rm ${BOOT_STAGING}/u-boot-atf.bin
rm ${BOOT_STAGING}/u-boot-hash.bin
fi
done
rm ${BOOT_STAGING}/scfw_tcm.bin
rm ${BOOT_STAGING}/u-boot.bin
# Remove u-boot-atf.bin and u-boot-hash.bin so they get generated with the next iteration's U-Boot
rm ${BOOT_STAGING}/u-boot-atf.bin
rm ${BOOT_STAGING}/u-boot-hash.bin
done
# Check that SCFW was built at least once
if [ "${SCFWBUILT}" != "yes" ]; then
bbfatal "SCFW was not built!"
fi
}
do_install () {
install -d ${D}/boot
for type in ${UBOOT_CONFIG}; do
for ramc in ${UBOOT_RAM_COMBINATIONS}; do
for target in ${IMXBOOT_TARGETS}; do
install -m 0644 ${S}/${BOOT_CONFIG_MACHINE}-${type}.bin-${target} ${D}/boot/
install -m 0644 ${S}/${UBOOT_PREFIX}-${MACHINE}-${ramc}.bin-${target} ${D}/boot/
done
done
}
@ -83,14 +100,17 @@ do_deploy () {
# copy the tool mkimage to deploy path and sc fw, dcd and uboot
install -m 0644 ${BOOT_STAGING}/mx8qx-ahab-container.img ${DEPLOYDIR}/${BOOT_TOOLS}
install -m 0644 ${BOOT_STAGING}/m40_tcm.bin ${DEPLOYDIR}/${BOOT_TOOLS}
install -m 0644 ${BOOT_STAGING}/CM4.bin ${DEPLOYDIR}/${BOOT_TOOLS}
install -m 0644 ${BOOT_STAGING}/m4_image.bin ${DEPLOYDIR}/${BOOT_TOOLS}
install -m 0755 ${S}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}
# copy makefile (soc.mak) for reference
install -m 0644 ${BOOT_STAGING}/soc.mak ${DEPLOYDIR}/${BOOT_TOOLS}
# Move all M4 demo artifacts to the imx-boot-tools folder
mv ${DEPLOY_DIR_IMAGE}/imx8qx_m4_* ${DEPLOYDIR}/${BOOT_TOOLS}/
# copy the generated boot image to deploy path
for type in ${UBOOT_CONFIG}; do
for ramc in ${UBOOT_RAM_COMBINATIONS}; do
IMAGE_IMXBOOT_TARGET=""
for target in ${IMXBOOT_TARGETS}; do
# Use first "target" as IMAGE_IMXBOOT_TARGET
@ -98,12 +118,14 @@ do_deploy () {
IMAGE_IMXBOOT_TARGET="$target"
echo "Set boot target as $IMAGE_IMXBOOT_TARGET"
fi
install -m 0644 ${S}/${BOOT_CONFIG_MACHINE}-${type}.bin-${target} ${DEPLOYDIR}
install -m 0644 ${S}/${UBOOT_PREFIX}-${MACHINE}-${ramc}.bin-${target} ${DEPLOYDIR}
done
cd ${DEPLOYDIR}
ln -sf ${BOOT_CONFIG_MACHINE}-${type}.bin-${IMAGE_IMXBOOT_TARGET} ${BOOT_CONFIG_MACHINE}-${type}.bin
ln -sf ${BOOT_CONFIG_MACHINE}-${type}.bin-${IMAGE_IMXBOOT_TARGET} ${BOOT_CONFIG_MACHINE}-${MACHINE}.bin
cd -
cd ${DEPLOYDIR}
ln -sf ${UBOOT_PREFIX}-${MACHINE}-${ramc}.bin-${IMAGE_IMXBOOT_TARGET} ${UBOOT_PREFIX}-${MACHINE}-${ramc}.bin
# Link to default bootable U-Boot filename. It gets overwritten
# on every loop so the only last RAM_CONFIG will survive.
ln -sf ${UBOOT_PREFIX}-${MACHINE}-${ramc}.bin-${IMAGE_IMXBOOT_TARGET} ${BOOTABLE_FILENAME}
cd -
done
}

View File

@ -1,5 +1,5 @@
# Copyright (C) 2018,2019 Digi International, Inc.
# Use the v4.14 ga BSP branch
SRCBRANCH = "imx_4.14.78_1.0.0_ga"
SRCREV = "2cf091c075ea1950afa22a56e224dc4e448db542"
SRCBRANCH = "imx_4.14.98_2.1.0"
SRCREV = "abd6ce551a7b81fc6953d32d92b24a4a1d4b214e"

View File

@ -1,3 +0,0 @@
PLATFORM_mx8 = "IMX8"
COMPATIBLE_MACHINE = "(mx6|mx8x)"

View File

@ -0,0 +1,33 @@
# Copyright (C) 2013-2018 O.S. Systems Software LTDA.
# Copyright (C) 2013-2016 Freescale Semiconductor
# Copyright 2017-2018 NXP
DESCRIPTION = "Freescale VPU library"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://COPYING;md5=72c0f70181bb6e83eee6aab8de12a9f3"
PROVIDES = "virtual/imxvpu"
RPROVIDES_${PN} = "virtual/imxvpu"
PE = "1"
SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true"
SRC_URI[md5sum] = "12d42949b342b50365d24d148e67cf28"
SRC_URI[sha256sum] = "8b9fd257a2dd79dae1e208f08e56a4a47550b892a6f4e3b8fee0d6cbeb09ec12"
inherit fsl-eula-unpack use-imx-headers
PLATFORM = "IMX6Q"
do_compile() {
INCLUDE_DIR="-I${STAGING_INCDIR_IMX}"
oe_runmake CROSS_COMPILE="${HOST_PREFIX}" PLATFORM="${PLATFORM}" INCLUDE="${INCLUDE_DIR}" all
}
do_install() {
oe_runmake PLATFORM="${PLATFORM}" DEST_DIR="${D}" install
}
# Compatible only for i.MX with Chips&Media VPU
COMPATIBLE_MACHINE = "(^$)"
COMPATIBLE_MACHINE_imxvpucnm = "${MACHINE}"

View File

@ -15,7 +15,7 @@ PROVIDES += "u-boot"
S = "${WORKDIR}/git"
# Select internal or Github U-Boot repo
UBOOT_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git', d)}"
UBOOT_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git;protocol=https', d)}"
SRC_URI = " \
${UBOOT_GIT_URI};branch=${SRCBRANCH} \
@ -100,9 +100,7 @@ do_compile () {
fi
}
TF_BOOTSCRIPT_SEDFILTER = ""
TF_BOOTSCRIPT_SEDFILTER_ccimx6 = "${@tf_bootscript_sedfilter(d)}"
TF_BOOTSCRIPT_SEDFILTER_ccimx6ul = "${@tf_bootscript_sedfilter(d)}"
TF_BOOTSCRIPT_SEDFILTER = "${@tf_bootscript_sedfilter(d)}"
def tf_bootscript_sedfilter(d):
tf_initramfs = d.getVar('TRUSTFENCE_INITRAMFS_IMAGE',True) or ""
@ -179,4 +177,5 @@ do_deploy_append_ccimx8x() {
# U-Boot images are not bootable on the i.MX8X
install -d ${DEPLOYDIR}/${BOOT_TOOLS}
mv ${DEPLOYDIR}/u-boot* ${DEPLOYDIR}/${BOOT_TOOLS}/
mv ${DEPLOYDIR}/${UBOOT_SYMLINK}-* ${DEPLOYDIR}/${BOOT_TOOLS}/
}

View File

@ -2,27 +2,46 @@
# U-Boot bootscript for EMMC/SD images created by Yocto.
#
# Set SOC type to "imx8qxp" if not already defined by U-Boot
if test ! -n "${soc_type}"; then
setenv soc_type "imx8qxp"
fi
#
# Set device tree filename depending on the board ID (if defined)
#
if test -n "${board_id}"; then
setenv fdt_file ccimx8x-sbc-express-id${board_id}.dtb
setenv fdt_file cc${soc_type}-sbc-express-id${board_id}.dtb
else
#
# Set device tree filename depending on the hardware variant
# Set device tree filename depending on the hardware capabilities
#
if test "${module_variant}" = "0x01"; then
setenv fdt_file ccimx8x-sbc-express-wb.dtb
elif test "${module_variant}" = "0x02"; then
setenv fdt_file ccimx8x-sbc-express-wb.dtb
elif test "${module_variant}" = "0x03"; then
setenv fdt_file ccimx8x-sbc-express.dtb
elif test "${module_variant}" = "0x04"; then
setenv fdt_file ccimx8x-sbc-express-wb.dtb
elif test "${module_variant}" = "0x05"; then
setenv fdt_file ccimx8x-sbc-express.dtb
if test -n "${module_ram}"; then
setexpr module_has_wifi ${hwid_3} \& 1
setexpr module_has_bt ${hwid_3} \& 2
setexpr module_has_bt ${module_has_bt} / 2
if test "${module_has_wifi}" = "1" &&
test "${module_has_bt}" = "1"; then
setenv fdt_file cc${soc_type}-sbc-express-wb.dtb
else
setenv fdt_file cc${soc_type}-sbc-express.dtb
fi
else
setenv fdt_file ccimx8x-sbc-express-wb.dtb
#
# Set device tree filename depending on the hardware variant
#
if test "${module_variant}" = "0x01" ||
test "${module_variant}" = "0x02" ||
test "${module_variant}" = "0x04"; then
setenv fdt_file cc${soc_type}-sbc-express-wb.dtb
elif test "${module_variant}" = "0x03" ||
test "${module_variant}" = "0x05" ||
test "${module_variant}" = "0x06"; then
setenv fdt_file cc${soc_type}-sbc-express.dtb
else
setenv fdt_file cc${soc_type}-sbc-express-wb.dtb
fi
fi
fi

View File

@ -19,14 +19,29 @@ if test $? -eq 1; then
exit;
fi
# Determine U-Boot file to program basing on module variant
if test -n "${module_variant}"; then
if test "${module_variant}" = "0x01" || test "${module_variant}" = "0x04" || test "${module_variant}" = "0x05"; then
setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_express1GB.bin;
elif test "${module_variant}" = "0x02" || test "${module_variant}" = "0x03"; then
setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_express2GB.bin;
# Determine U-Boot file to program basing on SOM's RAM size and SOC type (linked to bus width)
ram_freq="1.2GHz"
bus_width="32bit"
if test -n "${module_ram}" && test -n "${soc_type}"; then
if test "${soc_type}" = "imx8dx"; then
bus_width="16bit"
fi
setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-express-${ram_freq}_${module_ram}_${bus_width}.bin;
else
# Determine U-Boot file to program basing on SOM's variant
if test -n "${module_variant}"; then
if test "${module_variant}" = "0x01"; then
setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-express-1.2GHz_1GB_32bit.bin;
elif test "${module_variant}" = "0x02" ||
test "${module_variant}" = "0x03"; then
setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-express-1.2GHz_2GB_32bit.bin;
elif test "${module_variant}" = "0x04" ||
test "${module_variant}" = "0x05"; then
setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-express-1.2GHz_1GB_16bit.bin;
fi
fi
fi
# Use 'test -n ...' because 'test -z ...' does not work well on old versions of
# u-boot when the checked value is empty.
if test -n "${INSTALL_UBOOT_FILENAME}"; then
@ -36,10 +51,12 @@ else
echo "[ERROR] Cannot determine U-Boot file for this module!";
echo "";
echo "1. Set variable 'INSTALL_UBOOT_FILENAME' depending on your ConnectCore 8X variant:";
echo " - For a QuadXPlus CPU with 1GB DDR3, run:";
echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_express1GB.bin";
echo " - For a QuadXPlus CPU with 2GB DDR3, run:";
echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_express2GB.bin";
echo " - For a QuadXPlus CPU with 1GB LPDDR4, run:";
echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-express-1.2GHz_1GB_32bit.bin";
echo " - For a QuadXPlus CPU with 2GB LPDDR4, run:";
echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-express-1.2GHz_2GB_32bit.bin";
echo " - For a DualX CPU with 1GB LPDDR4, run:";
echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-express-1.2GHz_1GB_16bit.bin";
echo "";
echo "2. Run the install script again.";
echo "";

View File

@ -2,21 +2,46 @@
# U-Boot bootscript for EMMC/SD images created by Yocto.
#
# Set SOC type to "imx8qxp" if not already defined by U-Boot
if test ! -n "${soc_type}"; then
setenv soc_type "imx8qxp"
fi
#
# Set device tree filename depending on the board ID (if defined)
#
if test -n "${board_id}"; then
setenv fdt_file ccimx8x-sbc-pro-id${board_id}.dtb
setenv fdt_file cc${soc_type}-sbc-pro-id${board_id}.dtb
else
#
# Set device tree filename depending on the hardware variant
# Set device tree filename depending on the hardware capabilities
#
if test "${module_variant}" = "0x01" || test "${module_variant}" = "0x02" || test "${module_variant}" = "0x04"; then
setenv fdt_file ccimx8x-sbc-pro-wb.dtb
elif test "${module_variant}" = "0x03" || test "${module_variant}" = "0x05"; then
setenv fdt_file ccimx8x-sbc-pro.dtb
if test -n "${module_ram}"; then
setexpr module_has_wifi ${hwid_3} \& 1
setexpr module_has_bt ${hwid_3} \& 2
setexpr module_has_bt ${module_has_bt} / 2
if test "${module_has_wifi}" = "1" &&
test "${module_has_bt}" = "1"; then
setenv fdt_file cc${soc_type}-sbc-pro-wb.dtb
else
setenv fdt_file cc${soc_type}-sbc-pro.dtb
fi
else
setenv fdt_file ccimx8x-sbc-pro-wb.dtb
#
# Set device tree filename depending on the hardware variant
#
if test "${module_variant}" = "0x01" ||
test "${module_variant}" = "0x02" ||
test "${module_variant}" = "0x04"; then
setenv fdt_file cc${soc_type}-sbc-pro-wb.dtb
elif test "${module_variant}" = "0x03" ||
test "${module_variant}" = "0x05" ||
test "${module_variant}" = "0x06"; then
setenv fdt_file cc${soc_type}-sbc-pro.dtb
else
setenv fdt_file cc${soc_type}-sbc-pro-wb.dtb
fi
fi
fi

View File

@ -19,14 +19,31 @@ if test $? -eq 1; then
exit;
fi
# Determine U-Boot file to program basing on module variant
if test -n "${module_variant}"; then
if test "${module_variant}" = "0x01" || test "${module_variant}" = "0x04" || test "${module_variant}" = "0x05"; then
setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_pro1GB.bin;
elif test "${module_variant}" = "0x02" || test "${module_variant}" = "0x03"; then
setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_pro2GB.bin;
# Determine U-Boot file to program basing on SOM's RAM size and SOC type (linked to bus width)
ram_freq="1.2GHz"
bus_width="32bit"
if test -n "${module_ram}" && test -n "${soc_type}"; then
if test "${soc_type}" = "imx8dx"; then
bus_width="16bit"
fi
setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-pro-${ram_freq}_${module_ram}_${bus_width}.bin;
else
# Determine U-Boot file to program basing on SOM's variant
if test -n "${module_variant}"; then
if test "${module_variant}" = "0x01"; then
setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-pro-1.2GHz_1GB_32bit.bin;
elif test "${module_variant}" = "0x02" ||
test "${module_variant}" = "0x03"; then
setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-pro-1.2GHz_2GB_32bit.bin;
elif test "${module_variant}" = "0x04" ||
test "${module_variant}" = "0x05"; then
setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-pro-1.2GHz_1GB_16bit.bin;
elif test "${module_variant}" = "0x06"; then
setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-pro-1.2GHz_512GB_16bit.bin;
fi
fi
fi
# Use 'test -n ...' because 'test -z ...' does not work well on old versions of
# u-boot when the checked value is empty.
if test -n "${INSTALL_UBOOT_FILENAME}"; then
@ -36,10 +53,14 @@ else
echo "[ERROR] Cannot determine U-Boot file for this module!";
echo "";
echo "1. Set variable 'INSTALL_UBOOT_FILENAME' depending on your ConnectCore 8X variant:";
echo " - For a QuadXPlus CPU with 1GB DDR3, run:";
echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_pro1GB.bin";
echo " - For a QuadXPlus CPU with 2GB DDR3, run:";
echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x_sbc_pro2GB.bin";
echo " - For a QuadXPlus CPU with 1GB LPDDR4, run:";
echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-pro-1.2GHz_1GB_32bit.bin";
echo " - For a QuadXPlus CPU with 2GB LPDDR4, run:";
echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-pro-1.2GHz_2GB_32bit.bin";
echo " - For a DualX CPU with 1GB LPDDR4, run:";
echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-pro-1.2GHz_1GB_16bit.bin";
echo " - For a DualX CPU with 512MB LPDDR4, run:";
echo " => setenv INSTALL_UBOOT_FILENAME imx-boot-ccimx8x-sbc-pro-1.2GHz_512MB_16bit.bin";
echo "";
echo "2. Run the install script again.";
echo "";

View File

@ -0,0 +1,28 @@
# Copyright 2017-2018 NXP
# Released under the MIT license (see COPYING.MIT for the terms)
SUMMARY = "i.MX M4 core Demo images"
SECTION = "app"
LICENSE = "Proprietary"
inherit deploy fsl-eula2-unpack2
SOC ?= "INVALID"
SOC_mx7ulp = "imx7ulp"
SOC_mx8mm = "imx8mm"
SOC_mx8mq = "imx8mq"
SOC_mx8qm = "imx8qm"
SOC_mx8qxp = "imx8qx"
IMX_PACKAGE_NAME = "${SOC}-m4-demo-${PV}"
SRC_URI_append = ";name=${SOC}"
SCR = "SCR-${SOC}-m4-demo.txt"
do_deploy () {
# Install the demo binaries
cp ${D}/* ${DEPLOYDIR}/
}
addtask deploy after do_install
PACKAGE_ARCH = "${MACHINE_SOCARCH}"

View File

@ -1,37 +0,0 @@
# Copyright 2017-2018 NXP
# Released under the MIT license (see COPYING.MIT for the terms)
SUMMARY = "i.MX M4 core Demo images"
SECTION = "app"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://COPYING;md5=6dfb32a488e5fd6bae52fbf6c7ebb086"
inherit deploy fsl-eula-unpack2
SOC ?= "imx8qm"
SOC_mx7ulp= "imx7ulp"
SOC_mx8mm= "imx8mm"
SOC_mx8mq= "imx8mq"
SOC_mx8qm= "imx8qm"
SOC_mx8qxp= "imx8qx"
IMX_PACKAGE_NAME = "${SOC}-m4-demo-${PV}"
SRC_URI_NAME = "${SOC}"
SRC_URI[imx8qm.md5sum] = "d4b63215497b61fda8eff89a820aa0d4"
SRC_URI[imx8qm.sha256sum] = "79d34ba2abcbaf02a8d01f5eb8c71e125aad34319bcc702815cf14d89a3d4e1f"
SRC_URI[imx8qx.md5sum] = "c0201a442eaac19f9b929261d69f8d9b"
SRC_URI[imx8qx.sha256sum] = "724676c9de95ca25beab1ce793fe170623b4b6d967ca07ddbf8cb4dbcbd15c8d"
SCR = "SCR-${SOC}-m4-demo.txt"
do_deploy () {
# Install the demo binaries
cp ${D}/* ${DEPLOYDIR}/
}
addtask deploy before do_build after do_install
PACKAGE_ARCH = "${MACHINE_ARCH}"
COMPATIBLE_MACHINE = "(mx8qm|mx8qxp)"

View File

@ -0,0 +1,14 @@
# Copyright 2017-2019 NXP
# Released under the MIT license (see COPYING.MIT for the terms)
require imx-m4-demos-2.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=80c0478f4339af024519b3723023fe28"
SRC_URI[imx8qm.md5sum] = "6423c4c60412b509b6d7537ce1a3fd44"
SRC_URI[imx8qm.sha256sum] = "cf430d4a111370c021435e864666d34fae4c4242907c195aad0c46c48073f78f"
SRC_URI[imx8qx.md5sum] = "fe2e5c9513faac946d29e5904bf792d9"
SRC_URI[imx8qx.sha256sum] = "151c6a578f6ae5a09b378015116061875047e4f3b6264e4becc80276621893b1"
COMPATIBLE_MACHINE = "(mx8qm|mx8qxp)"

View File

@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://license.txt;endline=19;md5=5bcd26c644867b127c2cce8296
SRCBRANCH = "master"
SRCREV = "c6da3358a102c10d954372598c6efef8ad84c9ee"
GIT_URI ?= "git://github.com/MicrochipTech/cryptoauthlib.git;protocol=git"
GIT_URI ?= "git://github.com/MicrochipTech/cryptoauthlib.git;protocol=https"
SRC_URI = " \
${GIT_URI};nobranch=1 \

View File

@ -8,13 +8,13 @@ PKGNAME = "mca_tool"
# ARM tarball
SRC_URI_arm = "${DIGI_PKG_SRC}/${PKGNAME}-${PV}-${TUNE_ARCH}.tar.gz;name=arm"
SRC_URI[arm.md5sum] = "d6043cd754a8ea0449a4b1afc80b9775"
SRC_URI[arm.sha256sum] = "4219efae7d3b327bac7940b992a446cdbf4cd3ed25d3234e1ef63ed32b6db595"
SRC_URI[arm.md5sum] = "c1eefe3113c4915b92fadebc7f769d21"
SRC_URI[arm.sha256sum] = "9a9d962e549fdb0f22fc1037f74ca21c7356dded7033c28a1b4b325a44b579aa"
# AARCH64 tarball
SRC_URI_aarch64 = "${DIGI_PKG_SRC}/${PKGNAME}-${PV}-${TUNE_ARCH}.tar.gz;name=aarch64"
SRC_URI[aarch64.md5sum] = "937f910b33aa9f6fe0d24317836fd620"
SRC_URI[aarch64.sha256sum] = "225c64e07c7158e0849cdd730d3c073cc87089a60b42d4e86a82c882761adb6c"
SRC_URI[aarch64.md5sum] = "92a3d3d3a63c749efc4761cdb5efe77e"
SRC_URI[aarch64.sha256sum] = "6b3cd2e9aa879ebd5aba628731855112db69ab01cedc5e203c10917e51f93a08"
S = "${WORKDIR}/${PKGNAME}-${PV}"

View File

@ -11,7 +11,7 @@ SRCREV = "${AUTOREV}"
S = "${WORKDIR}"
# Select internal or Github U-Boot repo
UBOOT_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git', d)}"
UBOOT_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}u-boot-denx.git', '${DIGI_GITHUB_GIT}/u-boot.git;protocol=https', d)}"
SRC_URI = " \
${UBOOT_GIT_URI};branch=${SRCBRANCH} \

View File

@ -13,7 +13,7 @@ SRCBRANCH = "qca6564/dey-2.6/maint"
SRCBRANCH_ccimx8x = "qca6574/dey-2.6/maint"
SRCREV = "${AUTOREV}"
QCOM_GIT_URI = "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_MTK_GIT}linux/qcacld-2.0.git;protocol=ssh', '${DIGI_GITHUB_GIT}/qcacld-2.0.git', d)}"
QCOM_GIT_URI = "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_MTK_GIT}linux/qcacld-2.0.git;protocol=ssh', '${DIGI_GITHUB_GIT}/qcacld-2.0.git;protocol=https', d)}"
SRC_URI = " \
${QCOM_GIT_URI};branch=${SRCBRANCH} \

View File

@ -18,9 +18,12 @@
# 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>qca6564: $2\n" >/dev/kmsg
printf "<$1>qca65x4: $2\n" >/dev/kmsg
}
# 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
@ -44,7 +47,13 @@ done
# Override the MAC firmware file only if the MAC file has changed.
if ! cmp -s ${TMP_MACFILE} ${MACFILE}; then
cp ${TMP_MACFILE} ${MACFILE}
if [ ! -w ${MACFILE} ]; then
mount_point="$(df $(dirname "${MACFILE}") | awk '!/^Filesystem/{ print $6 }')"
log "6" "[INFO] ${MACFILE} is not writable, remounting '${mount_point}' as rw"
mount -o remount,rw ${mount_point}
fi
cp ${TMP_MACFILE} ${MACFILE} || log "3" "[ERROR] Could not create ${MACFILE}"
fi
rm -f "${TMP_MACFILE}"
@ -106,4 +115,4 @@ LOGLEVEL="$(sed -ne 's,^kernel.printk[^=]*=[[:blank:]]*\(.*\)$,\1,g;T;p' /etc/sy
modprobe wlan
# Verify the interface is present
[ -d "/sys/class/net/wlan0" ] || log "3" "[ERROR] Loading qca6564 module"
[ -d "/sys/class/net/wlan0" ] || log "3" "[ERROR] Loading wlan module"

View File

@ -5,10 +5,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
LOCALVERSION = "-dey"
SRCBRANCH = "v4.14/dey-2.6/maint"
SRCBRANCH_ccimx6 = "v4.9/dey-2.6/maint"
SRCREV = "${AUTOREV}"
# Select internal or Github Linux repo
LINUX_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}linux-2.6.git', '${DIGI_GITHUB_GIT}/linux.git', d)}"
LINUX_GIT_URI ?= "${@oe.utils.conditional('DIGI_INTERNAL_GIT', '1' , '${DIGI_GIT}linux-2.6.git', '${DIGI_GITHUB_GIT}/linux.git;protocol=https', d)}"
SRC_URI = "${LINUX_GIT_URI};branch=${SRCBRANCH}"
S = "${WORKDIR}/git"

View File

@ -10,6 +10,7 @@ DEPENDS += "${@oe.utils.conditional('TRUSTFENCE_SIGN', '1', 'trustfence-sign-too
inherit kernel fsl-kernel-localversion
require recipes-kernel/linux/linux-dey-src.inc
require ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', 'linux-virtualization.inc', '', d)}
# Use custom provided 'defconfig' if variable KERNEL_DEFCONFIG is cleared
SRC_URI += "${@oe.utils.conditional('KERNEL_DEFCONFIG', '', 'file://defconfig', '', d)}"

View File

@ -2,4 +2,4 @@
require recipes-kernel/linux/linux-dey.inc
COMPATIBLE_MACHINE = "(ccimx6|ccimx6ul|ccimx8x)"
COMPATIBLE_MACHINE = "(ccimx6ul|ccimx8x)"

View File

@ -0,0 +1,5 @@
# Copyright (C) 2019 Digi International
require recipes-kernel/linux/linux-dey.inc
COMPATIBLE_MACHINE = "(ccimx6)"

View File

@ -0,0 +1,52 @@
# Copyright 2017-2018 NXP
# Released under the MIT license (see COPYING.MIT for the terms)
SUMMARY = "Installs i.MX-specific kernel headers"
DESCRIPTION = "Installs i.MX-specific kernel headers to userspace. \
New headers are installed in ${includedir}/imx."
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
require recipes-kernel/linux/linux-dey-src.inc
S = "${WORKDIR}/git"
do_compile[noexec] = "1"
IMX_UAPI_HEADERS = " \
dma-buf.h \
hantrodec.h \
hx280enc.h \
ion.h \
ipu.h \
isl29023.h \
mxc_asrc.h \
mxc_dcic.h \
mxc_mlb.h \
mxc_sim_interface.h \
mxc_v4l2.h \
mxcfb.h \
pxp_device.h \
pxp_dma.h \
videodev2.h \
"
do_install() {
# We install all headers inside of B so we can copy only the
# whitelisted ones, and there is no risk of a new header to be
# installed by mistake.
oe_runmake headers_install INSTALL_HDR_PATH=${B}${exec_prefix}
# FIXME: The ion.h is still on staging so "promote" it for now
cp ${S}/drivers/staging/android/uapi/ion.h ${B}${includedir}/linux
# Install whitelisted headers only
for h in ${IMX_UAPI_HEADERS}; do
install -D -m 0644 ${B}${includedir}/linux/$h \
${D}${includedir}/imx/linux/$h
done
}
ALLOW_EMPTY_${PN} = "1"
PACKAGE_ARCH = "${MACHINE_SOCARCH}"

View File

@ -0,0 +1,5 @@
# Copyright (C) 2019 Digi International
require recipes-kernel/linux/linux-imx-headers.inc
COMPATIBLE_MACHINE = "(ccimx6ul|ccimx8x)"

View File

@ -0,0 +1,5 @@
# Copyright (C) 2019 Digi International
require recipes-kernel/linux/linux-imx-headers.inc
COMPATIBLE_MACHINE = "(ccimx6)"

View File

@ -0,0 +1,50 @@
# Copyright (C) 2019 Digi International
# Apply kernel configuration required for Docker
do_configure_prepend() {
mkdir -p ${B}
kernel_conf_variable NAMESPACES y
kernel_conf_variable MULTIUSER y
kernel_conf_variable NET_NS y
kernel_conf_variable NET y
kernel_conf_variable PID_NS y
kernel_conf_variable IPC_NS y
kernel_conf_variable POSIX_MQUEUE y
kernel_conf_variable UTS_NS y
kernel_conf_variable CGROUPS y
kernel_conf_variable CGROUP_CPUACCT y
kernel_conf_variable CGROUP_DEVICE y
kernel_conf_variable CGROUP_FREEZER y
kernel_conf_variable CGROUP_SCHED y
kernel_conf_variable CPUSETS y
kernel_conf_variable SMP y
kernel_conf_variable MEMCG y
kernel_conf_variable KEYS y
kernel_conf_variable VETH y
kernel_conf_variable NETDEVICES y
kernel_conf_variable NET_CORE y
kernel_conf_variable BRIDGE y
kernel_conf_variable BRIDGE_NETFILTER y
kernel_conf_variable NETFILTER y
kernel_conf_variable INET y
kernel_conf_variable NETFILTER_ADVANCED y
kernel_conf_variable NF_NAT_IPV4 y
kernel_conf_variable NF_CONNTRACK_IPV4 y
kernel_conf_variable NF_CONNTRACK y
kernel_conf_variable IP_NF_FILTER y
kernel_conf_variable IP_NF_IPTABLES y
kernel_conf_variable IP_NF_TARGET_MASQUERADE y
kernel_conf_variable IP_NF_NAT y
kernel_conf_variable NETFILTER_XT_MATCH_ADDRTYPE y
kernel_conf_variable NETFILTER_XT_MATCH_CONNTRACK y
kernel_conf_variable NETFILTER_XT_MATCH_IPVS y
kernel_conf_variable IP_VS y
kernel_conf_variable IP_NF_NAT y
kernel_conf_variable POSIX_MQUEUE y
kernel_conf_variable OVERLAY_FS y
sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${B}/.config'
}
KERNEL_MODULE_AUTOLOAD += "nf_conntrack_ipv6 openvswitch"

View File

@ -3,6 +3,7 @@
#
# Copyright 2017, Digi International Inc.
#
inherit boot-artifacts
DEPENDS += "zip-native"
@ -26,9 +27,9 @@ generate_installer_zip () {
INSTALLER_FILELIST="${INSTALLER_FILELIST} ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${ext}"
fi
done
for ubconf in ${UBOOT_CONFIG}; do
if readlink -e "${DEPLOY_DIR_IMAGE}/${IMAGE_BOOTLOADER}-${ubconf}.${UBOOT_SUFFIX}" >/dev/null; then
INSTALLER_FILELIST="${INSTALLER_FILELIST} ${DEPLOY_DIR_IMAGE}/${IMAGE_BOOTLOADER}-${ubconf}.${UBOOT_SUFFIX}"
for artifact in ${BOOTABLE_ARTIFACTS}; do
if readlink -e "${DEPLOY_DIR_IMAGE}/${artifact}" >/dev/null; then
INSTALLER_FILELIST="${INSTALLER_FILELIST} ${DEPLOY_DIR_IMAGE}/${artifact}"
fi
done

View File

@ -10,8 +10,8 @@ inherit image-buildinfo
#
# Set root password using 'extrausers' class if 'debug-tweaks' is NOT enabled
#
# To get the encrypted password (with escaped '$' char: '\$') run following
# command in your development computer:
# To get the hash of the password (with escaped '$' char: '\$') run
# the following command in your development computer:
#
# echo -n 'root' | mkpasswd -5 -s | sed -e 's,\$,\\$,g'
#

View File

@ -36,10 +36,6 @@ python () {
import hashlib
import os
if ("ccimx8x" in d.getVar("MACHINE", True)):
bb.fatal("Trustfence is not currently supported on the ccimx8x SOM")
return
# Secure console configuration
if (d.getVar("TRUSTFENCE_CONSOLE_DISABLE", True) == "1"):
d.appendVar("UBOOT_EXTRA_CONF", "CONFIG_CONSOLE_DISABLE=y ")

View File

@ -1,6 +1,6 @@
DISTRO = "dey"
DISTRO_NAME = "Digi Embedded Yocto"
DISTRO_VERSION = "2.6-r1"
DISTRO_VERSION = "2.6-r2"
DISTRO_CODENAME = "thud"
SDK_VENDOR = "-deysdk"
SDK_VERSION := "${@'${DISTRO_VERSION}'}"
@ -44,10 +44,6 @@ FEATURE_PACKAGES_dey-qt = "packagegroup-dey-qt"
FEATURE_PACKAGES_dey-trustfence = "packagegroup-dey-trustfence"
FEATURE_PACKAGES_dey-wireless = "packagegroup-dey-wireless"
# Use GCC compiler version 7.x to maintain compatibility with
# several packages without support yet like gstreamer-imx plugins
GCCVERSION ?= "7.%"
# Our layer only provides version 5.41, which we want to keep because
# it was used for Bluetooth certification. However by default the newer
# 5.50 version should be used, which is provided by the poky layer.
@ -68,8 +64,10 @@ PREFERRED_PROVIDER_u-boot-fw-utils ?= "u-boot-fw-utils"
# Use git recipe for libsoc
PREFERRED_VERSION_libsoc = "git"
# Gstreamer 1.14.0 requires a specific vulkan version.
PREFERRED_VERSION_vulkan ?= "1.0.65%"
# There's a generic opencl-headers recipe in the thud branch of
# meta-openembedded, but we should use the package provided by the imx-gpu-viv
# recipe in case there are NXP-specific changes in it
PREFERRED_PROVIDER_opencl-headers ?= "imx-gpu-viv"
SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}"
SDKPATH = "/opt/${DISTRO}/${SDK_VERSION}"

View File

@ -0,0 +1,29 @@
# Copyright (C) 2019, Digi International Inc.
require greengrass.inc
#
# The Amazon Greengrass Core Product includes the following third-party software/licensing:
# github.com/aws/aws-sdk-go/; version 1.15.65 -- https://github.com/aws/aws-sdk-go/
# github.com/coreos/go-systemd/; version 10 -- https://github.com/coreos/go-systemd/
# github.com/docker/docker; version 1.12.0-rc4 -- https://github.com/docker/docker
# github.com/docker/go-units; version 0.3.1 -- https://github.com/docker/go-units
# github.com/go-ini/ini; version 1.32.0 -- https://github.com/go-ini/ini
# github.com/jmespath/go-jmespath; version 0.2.2 -- https://github.com/jmespath/go-jmespath
# github.com/mwitkow/go-http-dialer; version 0.1 -- https://github.com/mwitkow/go-http-dialer
# github.com/opencontainers/runc; version 1.0.0-rc3 -- https://github.com/opencontainers/runc
# github.com/opencontainers/runtime-spec; version 1.0.0-rc5 -- https://github.com/opencontainers/runtime-spec
# github.com/pquerna/ffjson; version 1.0 -- https://github.com/pquerna/ffjson
# github.com/vishvananda/netlink; version 0.1 -- https://github.com/vishvananda/netlink
#
# And the following Licenses:
LIC_FILES_CHKSUM = " \
file://ggc/core/THIRD-PARTY-LICENSES;md5=53b6a4caa097863bc3971d5e0ac6d1db \
"
SRC_URI[arm.md5sum] = "57e408134eccbbda40f08dbbf52101c2"
SRC_URI[arm.sha256sum] ="ded5d88a3ec1479d79c842b16fef11f91ee331bd4b79dbba1ca639b3e51922a3"
# For ARCH64 we use another tarball.
SRC_URI[aarch64.md5sum] = "c8e5488e302905583829f95d55d7a912"
SRC_URI[aarch64.sha256sum] ="9cd00902090e8fc34de18bf1ff21dca5e90af12ced886e6ac46e1f6899b059e1"

View File

@ -1,93 +0,0 @@
#!/bin/sh
#===============================================================================
#
# Copyright (C) 2012-2017 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
#
#===============================================================================
# Bluetooth power GPIO
BT_EN_QCA_GPIO_NR="244"
# set_gpio_value <gpio_nr> <value>
set_gpio_value() {
local SG_GPIONR="${1}"
local SG_GPIOVAL="${2}"
local SG_GPIOPATH="/sys/class/gpio/gpio${SG_GPIONR}"
[ -d "${SG_GPIOPATH}" ] || printf "%s" "${SG_GPIONR}" > /sys/class/gpio/export
printf out > "${SG_GPIOPATH}/direction" && sleep .2
printf "${SG_GPIOVAL}" > "${SG_GPIOPATH}/value" && sleep .2
[ -d "${SG_GPIOPATH}" ] && printf "%s" "${SG_GPIONR}" > /sys/class/gpio/unexport
}
# powercycle_gpio <gpio_nr>
powercycle_gpio() {
set_gpio_value "${1}" 0
set_gpio_value "${1}" 1
}
error() {
echo ${1}
exit 1
}
bluetooth_init() {
# Get MAC address from the device tree. Use a default value if it has not been set.
BT_MACADDR="$(hexdump -ve '1/1 "%02X" ":"' /proc/device-tree/bluetooth/mac-address 2>/dev/null | sed 's/:$//g')"
if [ -z "${BT_MACADDR}" ] || [ "${BT_MACADDR}" = "00:00:00:00:00:00" ]; then
BT_MACADDR="00:04:F3:FF:FF:BB"
fi
# Start the Bluetooth driver and bring up the interface
HCIATTACH_LOG="/var/log/hciattach.log"
for RETRY in $(seq 1 5)
do
killproc hciattach
powercycle_gpio "${BT_EN_QCA_GPIO_NR}"
if hciattach ttyBt qca ${BT_RATE:-3000000} -t30 ${BT_FLOW:-flow} unused ${BT_MACADDR} >${HCIATTACH_LOG} 2>&1; then
return
fi
sleep 1
done
BT_ERROR="FAIL (hciattach)"
}
# Source function library
. /etc/init.d/functions
case "$1" in
start)
if [ -d "/proc/device-tree/bluetooth" ]; then
echo -n "Starting bluetooth hardware: "
bluetooth_init
echo "${BT_ERROR:-done.}"
fi
;;
stop)
if [ -d "/sys/class/bluetooth/hci0" ]; then
echo -n "Stopping bluetooth hardware: "
killproc hciattach
# Power down bluetooth
set_gpio_value "${BT_EN_QCA_GPIO_NR}" 0
echo "done."
fi
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac

View File

@ -1,138 +0,0 @@
#!/bin/sh
#===============================================================================
#
# Copyright (C) 2012-2018 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
#
#===============================================================================
# Bluetooth power GPIO
BT_PWR_GPIO_NR="244"
# set_gpio_value <gpio_nr> <value>
set_gpio_value() {
local SG_GPIONR="${1}"
local SG_GPIOVAL="${2}"
local SG_GPIOPATH="/sys/class/gpio/gpio${SG_GPIONR}"
[ -d "${SG_GPIOPATH}" ] || printf "%s" "${SG_GPIONR}" > /sys/class/gpio/export
printf out > "${SG_GPIOPATH}/direction" && sleep .2
printf "${SG_GPIOVAL}" > "${SG_GPIOPATH}/value" && sleep .2
[ -d "${SG_GPIOPATH}" ] && printf "%s" "${SG_GPIONR}" > /sys/class/gpio/unexport
}
# powercycle_gpio <gpio_nr>
powercycle_gpio() {
set_gpio_value "${1}" 0
set_gpio_value "${1}" 1
}
error() {
echo ${1}
exit 1
}
bluetooth_init() {
# Get MAC address from the device tree. Use a default value if it has not been set.
BT_MACADDR="$(hexdump -ve '1/1 "%02X" ":"' /proc/device-tree/bluetooth/mac-address 2>/dev/null | sed 's/:$//g')"
if [ -z "${BT_MACADDR}" ] || [ "${BT_MACADDR}" = "00:00:00:00:00:00" ]; then
BT_MACADDR="00:04:F3:FF:FF:BB"
fi
# Use a sub-shell here to change to firmware directory
(
cd /lib/firmware/ar3k/1020200
# Update the MAC address file only if it has changed.
FW_MAC="ar3kbdaddr.pst"
[ -f "${FW_MAC}" ] && [ "$(cat ${FW_MAC})" = "${BT_MACADDR}" ] || echo ${BT_MACADDR} > ${FW_MAC}
# Symlink the correct firmware file depending on region code
JPN_REGCODE="0x2"
REGCODE="$(cat /proc/device-tree/digi,hwid,cert 2>/dev/null | tr -d '\0')"
BT_CLASS_LINK="PS_ASIC.pst"
BT_CLASS_FILE="PS_ASIC_class_1.pst"
if [ -n "${REGCODE}" ] && [ "${JPN_REGCODE}" = "${REGCODE}" ]; then
BT_CLASS_FILE="PS_ASIC_class_2.pst"
fi
if ! cmp -s ${BT_CLASS_FILE} ${BT_CLASS_LINK}; then
ln -sf ${BT_CLASS_FILE} ${BT_CLASS_LINK}
fi
# Remove not used configuration and readme files
# -- Do not quote the subcommand to avoid leading/trailing whitespace
# -- being part of the file name.
rm -f $(echo PS_ASIC_class_?.pst | sed -e "s,${BT_CLASS_FILE},,g") readme.txt
)
# Start the Bluetooth driver and bring up the interface
HCIATTACH_LOG="/var/log/hciattach.log"
BT_CMD="HCIATTACH"
RETRIES="5"
while [ "${RETRIES}" -gt "0" ]; do
case "${BT_CMD}" in
HCIATTACH)
# Reset BT
killproc hciattach
powercycle_gpio "${BT_PWR_GPIO_NR}"
if hciattach ttyBt ath3k 4000000 >${HCIATTACH_LOG} 2>&1; then
BT_CMD="HCICONFIG_UP"
else
BT_ERROR="FAILED (hciattach)"
BT_CMD="BT_INIT_FAIL"
fi
;;
HCICONFIG_UP)
if hciconfig hci0 up; then
break
else
BT_ERROR="FAILED (hciconfig up)"
BT_CMD="BT_INIT_FAIL"
fi
;;
BT_INIT_FAIL)
RETRIES="$((RETRIES - 1))"
BT_CMD="HCIATTACH"
;;
esac
done
[ "${RETRIES}" = "0" ] && error "${BT_ERROR}"
}
# Source function library
. /etc/init.d/functions
case "$1" in
start)
if [ -d "/proc/device-tree/bluetooth" ]; then
echo -n "Starting bluetooth hardware: "
bluetooth_init
echo "done."
fi
;;
stop)
if [ -d "/sys/class/bluetooth/hci0" ]; then
echo -n "Stopping bluetooth hardware: "
hciconfig hci0 down || BT_ERROR="FAILED (hciconfig down)"
killproc hciattach
# Power down bluetooth
set_gpio_value "${BT_PWR_GPIO_NR}" 0
echo "${BT_ERROR:-done.}"
fi
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac

View File

@ -1,119 +0,0 @@
#!/bin/sh
#===============================================================================
#
# Copyright (C) 2012-2018 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
#
#===============================================================================
# Bluetooth power GPIO
BT_EN_QCA_GPIO_NR="137"
# set_gpio_value <gpio_nr> <value>
set_gpio_value() {
local SG_GPIONR="${1}"
local SG_GPIOVAL="${2}"
local SG_GPIOPATH="/sys/class/gpio/gpio${SG_GPIONR}"
[ -d "${SG_GPIOPATH}" ] || printf "%s" "${SG_GPIONR}" > /sys/class/gpio/export
printf out > "${SG_GPIOPATH}/direction" && sleep .2
printf "${SG_GPIOVAL}" > "${SG_GPIOPATH}/value" && sleep .2
[ -d "${SG_GPIOPATH}" ] && printf "%s" "${SG_GPIONR}" > /sys/class/gpio/unexport
}
# powercycle_gpio <gpio_nr>
powercycle_gpio() {
set_gpio_value "${1}" 0
set_gpio_value "${1}" 1
}
error() {
echo ${1}
exit 1
}
bluetooth_init() {
# Get MAC address from the device tree. Use a default value if it has not been set.
BT_MACADDR="$(hexdump -ve '1/1 "%02X" ":"' /proc/device-tree/bluetooth/mac-address 2>/dev/null | sed 's/:$//g')"
if [ -z "${BT_MACADDR}" ] || [ "${BT_MACADDR}" = "00:00:00:00:00:00" ]; then
BT_MACADDR="00:04:F3:FF:FF:BB"
fi
# Module version older than revision 4 has swapped TX and RX lines
MOD_VERSION="$(($(cat /proc/device-tree/digi,hwid,hv 2>/dev/null | tr -d '\0' || true)))"
if [ "${MOD_VERSION}" -lt "4" ]; then
# Ignore the CTS flow control
BT_CTS_QCA_GPIO_NR="18"
set_gpio_value "${BT_CTS_QCA_GPIO_NR}" 0
# Reduce the rate to avoid the need for HW flow control
BT_RATE="115200"
BT_RATE_CODE="00" # 115200 bps
BT_FLOW="noflow"
# Modify the baudrate in the firmware file
BT_FW_FILE="/lib/firmware/qca/nvm_tlv_3.2.bin"
if [ "$(hexdump -s 56 -n 1 -ve '1/1 "%.2x"' ${BT_FW_FILE})" != "${BT_RATE_CODE}" ]; then
printf "\x${BT_RATE_CODE}" | dd of="${BT_FW_FILE}" bs=1 seek=56 count=1 conv=notrunc,fsync 2>/dev/null
fi
fi
# Start the Bluetooth driver and bring up the interface
HCIATTACH_LOG="/var/log/hciattach.log"
for RETRY in $(seq 1 5)
do
killproc hciattach
powercycle_gpio "${BT_EN_QCA_GPIO_NR}"
if hciattach ttyBt qca ${BT_RATE:-3000000} -t30 ${BT_FLOW:-flow} unused ${BT_MACADDR} >${HCIATTACH_LOG} 2>&1; then
# hciattach performs a reset to load the new firmware and needs some time to be ready
sleep 1
return
fi
sleep 1
if [ $RETRY -ge 3 ]; then
# Retry at default firmware baudrate
BT_RATE="115200"
fi
done
BT_ERROR="FAIL (hciattach)"
}
# Source function library
. /etc/init.d/functions
case "$1" in
start)
if [ -d "/proc/device-tree/bluetooth" ]; then
echo -n "Starting bluetooth hardware: "
bluetooth_init
echo "${BT_ERROR:-done.}"
fi
;;
stop)
if [ -d "/sys/class/bluetooth/hci0" ]; then
echo -n "Stopping bluetooth hardware: "
killproc hciattach
# Power down bluetooth
set_gpio_value "${BT_EN_QCA_GPIO_NR}" 0
echo "done."
fi
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac

View File

@ -1,22 +0,0 @@
From: Isaac Hermida <isaac.hermida@digi.com>
Date: Fri, 8 Jul 2016 12:19:33 +0200
Subject: [PATCH] hcitool: do not show unsupported refresh option
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
---
tools/hcitool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/hcitool.c b/tools/hcitool.c
index 02c4ebe1b71b..229c22c49909 100644
--- a/tools/hcitool.c
+++ b/tools/hcitool.c
@@ -568,7 +568,7 @@ static struct option scan_options[] = {
static const char *scan_help =
"Usage:\n"
- "\tscan [--length=N] [--numrsp=N] [--iac=lap] [--flush] [--class] [--info] [--oui] [--refresh]\n";
+ "\tscan [--length=N] [--numrsp=N] [--iac=lap] [--flush] [--class] [--info] [--oui]\n";
static void cmd_scan(int dev_id, int argc, char **argv)
{

View File

@ -1,57 +0,0 @@
From: Isaac Hermida <isaac.hermida@digi.com>
Date: Fri, 8 Jul 2016 10:42:57 +0200
Subject: [PATCH] hcitool: increase the shown connection limit to 20
Created a variable to set the number of connections to shown and increase that
value so we can list more current LE connections.
https://jira.digi.com/browse/DEL-2735
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
---
tools/hcitool.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/tools/hcitool.c b/tools/hcitool.c
index 229c22c49909..ae70c9c0d3b4 100644
--- a/tools/hcitool.c
+++ b/tools/hcitool.c
@@ -69,6 +69,8 @@
#define EIR_TX_POWER 0x0A /* transmit power level */
#define EIR_DEVICE_ID 0x10 /* device ID */
+#define MAX_CONNECTIONS_SHOWN 20 /* Max number of "hcitool conn" items to shown */
+
#define for_each_opt(opt, long, short) while ((opt=getopt_long(argc, argv, short ? short:"+", long, NULL)) != -1)
static volatile int signal_received = 0;
@@ -156,12 +158,12 @@ static int conn_list(int s, int dev_id, long arg)
if (id != -1 && dev_id != id)
return 0;
- if (!(cl = malloc(10 * sizeof(*ci) + sizeof(*cl)))) {
+ if (!(cl = malloc(MAX_CONNECTIONS_SHOWN * sizeof(*ci) + sizeof(*cl)))) {
perror("Can't allocate memory");
exit(1);
}
cl->dev_id = dev_id;
- cl->conn_num = 10;
+ cl->conn_num = MAX_CONNECTIONS_SHOWN;
ci = cl->conn_info;
if (ioctl(s, HCIGETCONNLIST, (void *) cl)) {
@@ -190,12 +192,12 @@ static int find_conn(int s, int dev_id, long arg)
struct hci_conn_info *ci;
int i;
- if (!(cl = malloc(10 * sizeof(*ci) + sizeof(*cl)))) {
+ if (!(cl = malloc(MAX_CONNECTIONS_SHOWN * sizeof(*ci) + sizeof(*cl)))) {
perror("Can't allocate memory");
exit(1);
}
cl->dev_id = dev_id;
- cl->conn_num = 10;
+ cl->conn_num = MAX_CONNECTIONS_SHOWN;
ci = cl->conn_info;
if (ioctl(s, HCIGETCONNLIST, (void *) cl)) {

View File

@ -1,12 +0,0 @@
[Unit]
Description=Initialization of the bluetooth chip
ConditionPathIsDirectory=/proc/device-tree/bluetooth
Before=bluetooth.service
[Service]
Type=forking
ExecStart=/etc/bluetooth-init start
ExecStop=/etc/bluetooth-init stop
[Install]
WantedBy=multi-user.target

View File

@ -1,33 +0,0 @@
From: Gabriel Valcazar <gabriel.valcazar@digi.com>
Date: Thu, 7 Feb 2019 13:15:43 +0100
Subject: [PATCH] bluetooth.service: add Digi customizations
These changes include:
* Adding the bluetooth-init service as a soft dependency.
* Having the bluetooth stack start automatically on boot.
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
---
src/bluetooth.service.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bluetooth.service.in b/src/bluetooth.service.in
index f799f65..d8b150c 100644
--- a/src/bluetooth.service.in
+++ b/src/bluetooth.service.in
@@ -2,6 +2,7 @@
Description=Bluetooth service
Documentation=man:bluetoothd(8)
ConditionPathIsDirectory=/sys/class/bluetooth
+Wants=bluetooth-init.service
[Service]
Type=dbus
@@ -16,5 +17,5 @@ ProtectHome=true
ProtectSystem=full
[Install]
-WantedBy=bluetooth.target
+WantedBy=multi-user.target
Alias=dbus-org.bluez.service

View File

@ -1,12 +0,0 @@
[General]
# Default adapter name
# Defaults to 'BlueZ X.YZ'
Name = cc6qp
[Policy]
# AutoEnable defines option to enable all controllers when they are found.
# This includes adapters present on start as well as adapters that are plugged
# in later on. Defaults to 'false'.
AutoEnable=true

View File

@ -1,12 +0,0 @@
[General]
# Default adapter name
# Defaults to 'BlueZ X.YZ'
Name = cc6
#[Policy]
# AutoEnable defines option to enable all controllers when they are found.
# This includes adapters present on start as well as adapters that are plugged
# in later on. Defaults to 'false'.
#AutoEnable=true

View File

@ -1,12 +0,0 @@
[General]
# Default adapter name
# Defaults to 'BlueZ X.YZ'
Name = cc6ul
[Policy]
# AutoEnable defines option to enable all controllers when they are found.
# This includes adapters present on start as well as adapters that are plugged
# in later on. Defaults to 'false'.
AutoEnable=true

View File

@ -1,7 +1,7 @@
#!/bin/sh
#===============================================================================
#
# Copyright (C) 2018 by Digi International Inc.
# Copyright (C) 2018,2019 by Digi International Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
@ -13,32 +13,6 @@
#
#===============================================================================
# Bluetooth power GPIO
BT_EN_QCA_GPIO_NR="394"
# set_gpio_value <gpio_nr> <value>
set_gpio_value() {
local SG_GPIONR="${1}"
local SG_GPIOVAL="${2}"
local SG_GPIOPATH="/sys/class/gpio/gpio${SG_GPIONR}"
[ -d "${SG_GPIOPATH}" ] || printf "%s" "${SG_GPIONR}" > /sys/class/gpio/export
printf out > "${SG_GPIOPATH}/direction" && sleep .2
printf "${SG_GPIOVAL}" > "${SG_GPIOPATH}/value" && sleep .2
[ -d "${SG_GPIOPATH}" ] && printf "%s" "${SG_GPIONR}" > /sys/class/gpio/unexport
}
# powercycle_gpio <gpio_nr>
powercycle_gpio() {
set_gpio_value "${1}" 0
set_gpio_value "${1}" 1
}
error() {
echo ${1}
exit 1
}
bluetooth_init() {
# Get MAC address from the device tree. Use a default value if it has not been set.
BT_MACADDR="$(hexdump -ve '1/1 "%02X" ":"' /proc/device-tree/bluetooth/mac-address 2>/dev/null | sed 's/:$//g')"
@ -52,10 +26,11 @@ bluetooth_init() {
for RETRY in $(seq 1 5)
do
killproc hciattach
powercycle_gpio "${BT_EN_QCA_GPIO_NR}"
modprobe btdigi
if hciattach ttyBt qca ${BT_RATE:-3000000} -t30 ${BT_FLOW:-flow} unused ${BT_MACADDR} >${HCIATTACH_LOG} 2>&1; then
return
fi
rmmod btdigi
sleep 1
done
BT_ERROR="FAIL (hciattach)"
@ -67,17 +42,18 @@ bluetooth_init() {
case "$1" in
start)
if [ -d "/proc/device-tree/bluetooth" ]; then
echo -n "Starting bluetooth hardware: "
bluetooth_init
echo "${BT_ERROR:-done.}"
if [ "$(tr -d '\0' 2>/dev/null </proc/device-tree/bluetooth/status)" != "disabled" ]; then
echo -n "Starting bluetooth hardware: "
bluetooth_init
echo "${BT_ERROR:-done.}"
fi
fi
;;
stop)
if [ -d "/sys/class/bluetooth/hci0" ]; then
echo -n "Stopping bluetooth hardware: "
killproc hciattach
# Power down bluetooth
set_gpio_value "${BT_EN_QCA_GPIO_NR}" 0
rmmod btdigi
echo "done."
fi
;;

View File

@ -67,9 +67,11 @@ bluetooth_init() {
case "$1" in
start)
if [ -d "/proc/device-tree/bluetooth" ]; then
echo -n "Starting bluetooth hardware: "
bluetooth_init
echo "${BT_ERROR:-done.}"
if [ "$(tr -d '\0' 2>/dev/null </proc/device-tree/bluetooth/status)" != "disabled" ]; then
echo -n "Starting bluetooth hardware: "
bluetooth_init
echo "${BT_ERROR:-done.}"
fi
fi
;;
stop)

View File

@ -111,9 +111,11 @@ bluetooth_init() {
case "$1" in
start)
if [ -d "/proc/device-tree/bluetooth" ]; then
echo -n "Starting bluetooth hardware: "
bluetooth_init
echo "done."
if [ "$(tr -d '\0' 2>/dev/null </proc/device-tree/bluetooth/status)" != "disabled" ]; then
echo -n "Starting bluetooth hardware: "
bluetooth_init
echo "${BT_ERROR:-done.}"
fi
fi
;;
stop)

View File

@ -93,9 +93,11 @@ bluetooth_init() {
case "$1" in
start)
if [ -d "/proc/device-tree/bluetooth" ]; then
echo -n "Starting bluetooth hardware: "
bluetooth_init
echo "${BT_ERROR:-done.}"
if [ "$(tr -d '\0' 2>/dev/null </proc/device-tree/bluetooth/status)" != "disabled" ]; then
echo -n "Starting bluetooth hardware: "
bluetooth_init
echo "${BT_ERROR:-done.}"
fi
fi
;;
stop)

View File

@ -1,6 +1,4 @@
# Copyright (C) 2015-2018 Digi International.
FILESEXTRAPATHS_prepend := "${THISDIR}/${BP}:"
# Copyright (C) 2015-2019 Digi International.
SRC_URI += " \
file://bluetooth-init \

View File

@ -1,6 +1,6 @@
# Copyright (C) 2015-2018 Digi International.
# Copyright (C) 2015-2019 Digi International.
FILESEXTRAPATHS_prepend := "${THISDIR}/${BP}:"
FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:${THISDIR}/${BP}:"
SRC_URI += " \
file://bluetooth-init \
@ -32,6 +32,16 @@ do_install_append() {
install -d ${D}${systemd_unitdir}/system/
install -m 0644 ${WORKDIR}/bluetooth-init.service ${D}${systemd_unitdir}/system/bluetooth-init.service
install -m 0644 ${WORKDIR}/main.conf ${D}${sysconfdir}/bluetooth/
# Staging bluetooth internal headers and libs to allow other recipes
# to link against them
install -d ${D}${includedir}/bluetooth-internal/
install -m 0644 ${WORKDIR}/bluez-${PV}/src/shared/*.h ${D}${includedir}/bluetooth-internal/
install -m 0644 ${WORKDIR}/bluez-${PV}/lib/uuid.h ${D}${includedir}/bluetooth-internal/
install -m 0644 ${B}/lib/.libs/libbluetooth-internal.a ${D}${libdir}/
install -m 0644 ${B}/src/.libs/libshared-mainloop.a ${D}${libdir}/
# Fix include path for att-types.h
sed -i -e '/#include/{s,src/shared/,,g}' ${D}${includedir}/bluetooth-internal/att.h
}
PACKAGES =+ "${PN}-init"

View File

@ -1,82 +0,0 @@
From 8333cf300f6010243117aae6da4b823d9d7f30b2 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 20 Oct 2016 04:42:26 +0000
Subject: [PATCH] Detect clang
Check for clang compiler since we need to disable
unused-function warning for clang, at same time
pass werror when checking for compiler options if
werror is enabled so spurious options do not get
enabled. Only the ones that are supported by given
compiler are accepted.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending
---
m4/compiler-warnings.m4 | 29 +++++++++++++++++++++++++----
1 file changed, 25 insertions(+), 4 deletions(-)
diff --git a/m4/compiler-warnings.m4 b/m4/compiler-warnings.m4
index 5ba490c884dc..92022746487f 100644
--- a/m4/compiler-warnings.m4
+++ b/m4/compiler-warnings.m4
@@ -2,10 +2,30 @@ AC_DEFUN([LIBQMI_COMPILER_WARNINGS],
[AC_ARG_ENABLE(more-warnings,
AS_HELP_STRING([--enable-more-warnings], [Possible values: no/yes/error]),
set_more_warnings="$enableval",set_more_warnings=error)
+
+# Clang throws a lot of warnings when it does not understand a flag. Disable
+# this warning for now so other warnings are visible.
+AC_MSG_CHECKING([if compiling with clang])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[
+#ifndef __clang__
+ not clang
+#endif
+ ]])],
+ [CLANG=yes],
+ [CLANG=no]
+)
+AC_MSG_RESULT([$CLANG])
+AS_IF([test "x$CLANG" = "xyes"], [CLANG_FLAGS=-Wno-error=unused-function])
+CFLAGS="$CFLAGS $CLANG_FLAGS"
+LDFLAGS="$LDFLAGS $CLANG_FLAGS"
+
AC_MSG_CHECKING(for more warnings)
if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
AC_MSG_RESULT(yes)
CFLAGS="-Wall -std=gnu89 $CFLAGS"
+ if test "x$set_more_warnings" = xerror; then
+ WERROR="-Werror"
+ fi
for option in -Wmissing-declarations -Wmissing-prototypes \
-Wdeclaration-after-statement -Wstrict-prototypes \
@@ -17,22 +37,23 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
-Wmissing-include-dirs -Waggregate-return \
-Wformat-security -Wtype-limits; do
SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $option"
+ CFLAGS="$CFLAGS $option $WERROR"
AC_MSG_CHECKING([whether gcc understands $option])
AC_TRY_COMPILE([], [],
has_option=yes,
has_option=no,)
if test $has_option = no; then
CFLAGS="$SAVE_CFLAGS"
+ else
+ CFLAGS="$SAVE_CFLAGS $option"
fi
AC_MSG_RESULT($has_option)
unset has_option
unset SAVE_CFLAGS
done
+ CFLAGS="$CFLAGS $WERROR"
unset option
- if test "x$set_more_warnings" = xerror; then
- CFLAGS="$CFLAGS -Werror"
- fi
+ unset WERROR
else
AC_MSG_RESULT(no)
fi

View File

@ -1,20 +0,0 @@
SUMMARY = "libqmi is a library for talking to WWAN devices by QMI protocol"
DESCRIPTION = "libqmi is a glib-based library for talking to WWAN modems \
and devices which speak the Qualcomm MSM Interface (QMI) protocol"
HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libqmi"
LICENSE = "GPLv2 & LGPLv2.1"
LIC_FILES_CHKSUM = " \
file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
"
DEPENDS = "glib-2.0 glib-2.0-native libgudev libmbim"
inherit autotools pkgconfig bash-completion
SRC_URI = " \
http://www.freedesktop.org/software/${BPN}/${BPN}-${PV}.tar.xz \
file://0001-Detect-clang.patch \
"
SRC_URI[md5sum] = "25bae4e383ad77f491ad49b49e04fdcf"
SRC_URI[sha256sum] = "a0a42c55935e75a630208e2f70840bd4407f56fe1c5258f5b0f6c0aaedf88cec"

View File

@ -0,0 +1,16 @@
ACTION!="add|change|move|bind", GOTO="mm_net_device_blacklist_end"
# ModemManager documentation states that the best practice is to use the DEVPATH
# this way rather than other rules such as KERNEL, so be careful when modifying
# Remove CAN interfaces from ModemManager probing
SUBSYSTEM=="net", DEVPATH=="/devices/soc0/soc/2000000.aips-bus/2090000.flexcan*", ENV{ID_MM_CANDIDATE}="0", ENV{ID_MM_DEVICE_IGNORE}="1"
SUBSYSTEM=="net", DEVPATH=="/devices/soc0/soc/2000000.aips-bus/2094000.flexcan*", ENV{ID_MM_CANDIDATE}="0", ENV{ID_MM_DEVICE_IGNORE}="1"
# Remove Ethernet interfaces from ModemManager probing
SUBSYSTEM=="net", DEVPATH=="/devices/soc0/soc/2100000.aips-bus/2188000.ethernet*", ENV{ID_MM_CANDIDATE}="0", ENV{ID_MM_DEVICE_IGNORE}="1"
# Remove MMC interfaces from ModemManager probing
SUBSYSTEM=="net", DEVPATH=="/devices/soc0/soc/2100000.aips-bus/2190000.usdhc/mmc_host*", ENV{ID_MM_CANDIDATE}="0", ENV{ID_MM_DEVICE_IGNORE}="1"
LABEL="mm_net_device_blacklist_end"

View File

@ -1,4 +1,4 @@
# Copyright (C) 2016-2018 Digi International.
# Copyright (C) 2016-2019 Digi International.
FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
@ -14,3 +14,6 @@ SRC_URI_remove = " \
SRC_URI += " \
${@bb.utils.contains("MACHINE_FEATURES", "cryptochip", "${CRYPTOCHIP_COMMON_PATCHES}", "", d)} \
"
# Add the openssl binary whenever the base package is pulled in via a dependency
RRECOMMENDS_libcrypto += "openssl-bin"

View File

@ -1,4 +1,4 @@
# Copyright (C) 2013-2018 Digi International.
# Copyright (C) 2013-2019 Digi International.
FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
@ -34,6 +34,22 @@ pkg_postinst_ontarget_${PN}() {
fi
done
fi
# Disable file system check when rootfs is encrypted
if [ -n "${TRUSTFENCE_INITRAMFS_IMAGE}" ]; then
for arg in $(cat /proc/cmdline); do
case "${arg}" in
root=*) eval ${arg};;
esac
done
# Are we running from NAND
if echo "${root}" | grep -qs ubi; then
root="/dev/${root}"
else
root="$(findfs ${root})"
fi
echo "${root} / auto defaults 0 0" >> /etc/fstab
fi
}
CONFFILES_${PN} += "${sysconfdir}/sysctl.conf"

View File

@ -3,7 +3,7 @@
#
# standby
#
# Copyright (C) 2017,2018 by Digi International Inc.
# Copyright (C) 2017-2019 by Digi International Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
@ -64,9 +64,6 @@ resume_interfaces() {
done
fi
# Resume NetworkManager after suspend
${NM_DAEMON} start
# Resume bluetooth interface
if [ -d "/proc/device-tree/bluetooth" ]; then
if [ -n "${up_bt_on_resume}" ]; then
@ -74,6 +71,9 @@ resume_interfaces() {
${BT_DAEMON} start >/dev/null
fi
fi
# Resume NetworkManager after suspend
${NM_DAEMON} start
}
enter_critical_section() {

View File

@ -0,0 +1,64 @@
#!/bin/sh
#===============================================================================
#
# standby-actions
#
# Copyright (C) 2019 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
#
#===============================================================================
if [ "${1}" == "pre" ]; then
# Stop NetworkManager before suspend
systemctl stop NetworkManager
# Suspend wireless interfaces
if [ -d "/proc/device-tree/wireless" ]; then
for i in $(sed -ne 's,^\(wlan[0-9]\)=.*,\1,g;T;p' /var/run/ifstate | sort -r); do
ifdown "${i}" && RESUME_IFACES="${RESUME_IFACES:+${RESUME_IFACES} }${i}"
done
echo ${RESUME_IFACES} > /tmp/suspend_wlan_ifaces
grep -qs '^wlan' /proc/modules && rmmod wlan
fi
# Suspend bluetooth interface
if [ -d "/proc/device-tree/bluetooth" ]; then
hciconfig hci0 2>&1 | grep -qs UP && touch /tmp/up_bt_on_resume
systemctl stop bluetooth
systemctl stop bluetooth-init
fi
elif [ "${1}" == "post" ]; then
# Resume wireless interfaces
if [ -d "/proc/device-tree/wireless" ]; then
# Trigger wireless module loading event, and wait until the interface exists
udevadm trigger --action=add --attr-match="modalias=sdio:c00v0271d050A"
timeout -t 5 sh -c "while [ ! -d /sys/class/net/wlan0 ]; do sleep .2; done" 2>/dev/null
# Bring up the interfaces that were brought down on suspend
for i in $(cat /tmp/suspend_wlan_ifaces | tr ' ' '\n' | sort); do
grep -qs "^${i}" /var/run/ifstate || ifup "${i}"
done
rm -f /tmp/suspend_wlan_ifaces
fi
# Resume NetworkManager after suspend
systemctl start NetworkManager
# Resume bluetooth interface
if [ -d "/proc/device-tree/bluetooth" ]; then
if [ -e "/tmp/up_bt_on_resume" ]; then
systemctl start bluetooth-init
systemctl start bluetooth
rm -f /tmp/up_bt_on_resume
fi
fi
fi

View File

@ -3,7 +3,7 @@
#
# standby
#
# Copyright (C) 2009-2018 by Digi International Inc.
# Copyright (C) 2009-2019 by Digi International Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
@ -106,7 +106,6 @@ if [ -f "${syspower}" ]; then
# Suspend the device
printf "mem" > ${syspower}
sleep .5
# Post-resume actions
resume_interfaces

View File

@ -0,0 +1,64 @@
#!/bin/sh
#===============================================================================
#
# standby-actions
#
# Copyright (C) 2019 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
#
#===============================================================================
if [ "${1}" == "pre" ]; then
# Stop NetworkManager before suspend
systemctl stop NetworkManager
# Suspend wireless interfaces
if [ -d "/proc/device-tree/wireless" ]; then
for i in $(sed -ne 's,^\(wlan[0-9]\)=.*,\1,g;T;p' /var/run/ifstate | sort -r); do
ifdown "${i}" && RESUME_IFACES="${RESUME_IFACES:+${RESUME_IFACES} }${i}"
done
echo ${RESUME_IFACES} > /tmp/suspend_wlan_ifaces
grep -qs '^ath6kl_sdio' /proc/modules && rmmod ath6kl_sdio ath6kl_core
fi
# Suspend bluetooth interface
if [ -d "/proc/device-tree/bluetooth" ]; then
hciconfig hci0 2>&1 | grep -qs UP && touch /tmp/up_bt_on_resume
systemctl stop bluetooth
systemctl stop bluetooth-init
fi
elif [ "${1}" == "post" ]; then
# Resume wireless interfaces
if [ -d "/proc/device-tree/wireless" ]; then
# Trigger wireless module loading event, and wait until the interface exists
udevadm trigger --action=add --attr-match="modalias=sdio:c00v0271d0301"
timeout -t 5 sh -c "while [ ! -d /sys/class/net/wlan0 ]; do sleep .2; done" 2>/dev/null
# Bring up the interfaces that were brought down on suspend
for i in $(cat /tmp/suspend_wlan_ifaces | tr ' ' '\n' | sort); do
grep -qs "^${i}" /var/run/ifstate || ifup "${i}"
done
rm -f /tmp/suspend_wlan_ifaces
fi
# Resume NetworkManager after suspend
systemctl start NetworkManager
# Resume bluetooth interface
if [ -d "/proc/device-tree/bluetooth" ]; then
if [ -e "/tmp/up_bt_on_resume" ]; then
systemctl start bluetooth-init
systemctl start bluetooth
rm -f /tmp/up_bt_on_resume
fi
fi
fi

View File

@ -3,7 +3,7 @@
#
# standby
#
# Copyright (C) 2018 by Digi International Inc.
# Copyright (C) 2018,2019 by Digi International Inc.
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
@ -64,9 +64,6 @@ resume_interfaces() {
done
fi
# Resume NetworkManager after suspend
${NM_DAEMON} start
# Resume bluetooth interface
if [ -d "/proc/device-tree/bluetooth" ]; then
if [ -n "${up_bt_on_resume}" ]; then
@ -74,6 +71,9 @@ resume_interfaces() {
${BT_DAEMON} start >/dev/null
fi
fi
# Resume NetworkManager after suspend
${NM_DAEMON} start
}
enter_critical_section() {

View File

@ -43,6 +43,7 @@ RDEPENDS_${PN} = "\
netbase \
networkmanager \
os-release \
${@bb.utils.contains('MACHINE_FEATURES', 'pci', 'pciutils', '',d)} \
recovery-utils \
sysinfo \
system-monitor \

View File

@ -53,8 +53,6 @@ PACKAGES = "${PN}"
FILES_${PN} = "/"
RDEPENDS_${PN}_append_ccimx6sbc = " \
cryptsetup \
"
RDEPENDS_${PN}_append_ccimx6sbc = " cryptsetup"
RDEPENDS_${PN}_append_ccimx6qpsbc = " cryptsetup"
RDEPENDS_${PN}_append_ccimx8x = " cryptsetup"

View File

@ -9,6 +9,9 @@ SRC_URI += " \
EXTRA_OEMESON_remove = "-Dfirmware-path=${nonarch_base_libdir}/firmware "
EXTRA_OEMESON += "-Dfirmware-path=${nonarch_base_libdir}/firmware/ "
# Remove systemd-networkd from our images, since we already use NetworkManager
PACKAGECONFIG_remove = "networkd"
do_install_append () {
# Disable the assignment of the fixed network interface name
install -d ${D}${sysconfdir}/systemd/network

View File

@ -35,5 +35,9 @@ RDEPENDS_${PN}_append_ccimx6ul = " \
mtd-utils-ubifs \
"
RDEPENDS_${PN}_append_ccimx8x = " \
cryptsetup \
"
PACKAGE_ARCH = "${MACHINE_ARCH}"
COMPATIBLE_MACHINE = "(ccimx6|ccimx6ul)"
COMPATIBLE_MACHINE = "(ccimx6|ccimx6ul|ccimx8x)"

View File

@ -0,0 +1,81 @@
#!/bin/sh
#===============================================================================
#
# trustfence-initramfs-init
#
# Copyright (C) 2019 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: Init script for Trustfence initramfs
#
#===============================================================================
POWEROFF_TIME="10"
error() {
[ "${#}" != "0" ] && printf "\n[ERROR]: %s\n\n" "${1}"
echo "The system will poweroff in ${POWEROFF_TIME} seconds"
sleep "${POWEROFF_TIME}"
sync && poweroff -f
}
# Main
#------------------------------------------------------------------------------
# Setup the environment.
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
mkdir -p /proc /sys /dev
mount -t proc proc /proc
mount -t sysfs sysfs /sys
mount -t devtmpfs devtmpfs /dev
# Set kernel console loglevel
LOGLEVEL="$(sysctl -n kernel.printk)"
sysctl -q -w kernel.printk=4
for arg in $(cat /proc/cmdline); do
case "${arg}" in
init=*|rescue=1|root=*) eval ${arg};;
esac
done
# Translate "PARTUUID=..." to real device
root="$(findfs ${root})"
# Jump to a rescue shell if requested
if [ -n "${rescue}" ]; then
# Expand console and respawn if exited
while true; do
setsid cttyhack sh -l
sleep 1
done
fi
# Open LUKS encrypted device
if trustfence-tool ${root} cryptroot; then
# Reset root variable to the decrypted mapped device
root="/dev/mapper/cryptroot"
else
error "unable to open encrypted partition."
fi
# Mount mapped device
mkdir -p /newroot
FSTYPE="$(blkid ${root} | sed -e 's,.*TYPE="\([^"]\+\)".*,\1,g')"
mount ${FSTYPE:+-t ${FSTYPE}} ${root} /newroot
#
# Clean-up and do the switch_root to the final rootfs
#
# - restore previous kernel console loglevel
# - umount virtual filesystems
#
[ -n "${LOGLEVEL}" ] && sysctl -q -w kernel.printk="${LOGLEVEL}"
mount --move /dev /newroot/dev
umount /sys /proc
exec switch_root /newroot ${init:-/sbin/init}

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