Compare commits
1 Commits
HEAD
...
feat/netmo
| Author | SHA1 | Date |
|---|---|---|
|
|
0bcf269c5d |
|
|
@ -22,3 +22,11 @@
|
|||
path = external-layers/meta-swupdate
|
||||
url = ssh://git@bitbucket.gad.local:7999/ico/meta-swupdate.git
|
||||
branch = kirkstone
|
||||
[submodule "external-layers/meta-arm"]
|
||||
path = external-layers/meta-arm
|
||||
url = git://git.yoctoproject.org/meta-arm
|
||||
branch = kirkstone
|
||||
[submodule "external-layers/meta-ti"]
|
||||
path = external-layers/meta-ti
|
||||
url = git://git.yoctoproject.org/meta-ti
|
||||
branch = kirkstone
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 96aad3b29aa7a5ee4df5cf617a6336e5218fa9bd
|
||||
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 51ce439263e9de02a800c0285f2d9c3c6d259676
|
||||
|
|
@ -1,10 +1,9 @@
|
|||
# short-description: Create an EFI disk image for genericx86*
|
||||
# long-description: Creates a partitioned EFI disk image for genericx86* machines
|
||||
${WKS_PART_EFI} --ondisk sda --align 1024 --size 64M --extra-space 0 --overhead-factor 1
|
||||
${WKS_PART_ROOT_A} --ondisk sda --size ${WKS_PART_ROOT_SIZE} --extra-space 0 --overhead-factor 1
|
||||
${WKS_PART_ROOT_B} --ondisk sda --size ${WKS_PART_ROOT_SIZE} --extra-space 0 --overhead-factor 1
|
||||
${WKS_PART_EFIBOOTGUARD_A} --ondisk sda --align 1024 --size 128M --extra-space 0 --overhead-factor 1
|
||||
${WKS_PART_EFIBOOTGUARD_B} --ondisk sda --align 1024 --size 128M --extra-space 0 --overhead-factor 1
|
||||
${WKS_PART_EFI} --align 1024 --size 64M --extra-space 0 --overhead-factor 1
|
||||
${WKS_PART_ROOT_A} --size ${WKS_PART_ROOT_SIZE} --extra-space 0 --overhead-factor 1
|
||||
${WKS_PART_ROOT_B} --size ${WKS_PART_ROOT_SIZE} --extra-space 0 --overhead-factor 1
|
||||
${WKS_PART_EFIBOOTGUARD_A} --align 1024 --size 128M --extra-space 0 --overhead-factor 1
|
||||
${WKS_PART_EFIBOOTGUARD_B} --align 1024 --size 128M --extra-space 0 --overhead-factor 1
|
||||
|
||||
part swap --ondisk sda --size 44 --label swap1 --fstype=swap
|
||||
bootloader --ptable gpt
|
||||
|
|
|
|||
|
|
@ -1,244 +0,0 @@
|
|||
DESCRIPTION = "Trusted Firmware-A"
|
||||
LICENSE = "BSD-3-Clause & MIT"
|
||||
|
||||
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
||||
|
||||
inherit deploy
|
||||
|
||||
SRC_URI = "git://git.trustedfirmware.org/TF-A/trusted-firmware-a.git;protocol=https;name=tfa;branch=master"
|
||||
|
||||
UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>\d+(\.\d+)+)$"
|
||||
|
||||
SRCREV_FORMAT = "tfa"
|
||||
|
||||
COMPATIBLE_MACHINE ?= "invalid"
|
||||
|
||||
# Platform must be set for each machine
|
||||
TFA_PLATFORM ?= "invalid"
|
||||
|
||||
# Some platforms can have multiple board configurations
|
||||
# Leave empty for default behavior
|
||||
TFA_BOARD ?= ""
|
||||
|
||||
# Some platforms use SPD (Secure Payload Dispatcher) services
|
||||
# Few options are "opteed", "tlkd", "trusty", "tspd", "spmd"...
|
||||
# Leave empty to not use SPD
|
||||
TFA_SPD ?= ""
|
||||
|
||||
# Variable used when TFA_SPD=spmd
|
||||
TFA_SPMD_SPM_AT_SEL2 ?= "1"
|
||||
|
||||
# SP layout file location. Used when TFA_SPD=spmd and TFA_SPMD_SPM_AT_SEL2=1
|
||||
TFA_SP_LAYOUT_FILE ?= ""
|
||||
|
||||
# SPMC manifest file location. Used when TFA_SPD=spmd and TFA_SPMD_SPM_AT_SEL2=1
|
||||
TFA_ARM_SPMC_MANIFEST_DTS ?= ""
|
||||
|
||||
# Build for debug (set TFA_DEBUG to 1 to activate)
|
||||
TFA_DEBUG ?= "0"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
B = "${WORKDIR}/build"
|
||||
|
||||
# mbed TLS support (set TFA_MBEDTLS to 1 to activate)
|
||||
TFA_MBEDTLS ?= "0"
|
||||
# sub-directory in which mbedtls will be downloaded
|
||||
TFA_MBEDTLS_DIR ?= "mbedtls"
|
||||
# This should be set to MBEDTLS download URL if MBEDTLS is needed
|
||||
SRC_URI_MBEDTLS ??= ""
|
||||
# This should be set to MBEDTLS LIC FILES checksum
|
||||
LIC_FILES_CHKSUM_MBEDTLS ??= ""
|
||||
# add MBEDTLS to our sources if activated
|
||||
SRC_URI:append = " ${@bb.utils.contains('TFA_MBEDTLS', '1', '${SRC_URI_MBEDTLS}', '', d)}"
|
||||
# Update license variables
|
||||
LICENSE:append = "${@bb.utils.contains('TFA_MBEDTLS', '1', ' & Apache-2.0', '', d)}"
|
||||
LIC_FILES_CHKSUM:append = "${@bb.utils.contains('TFA_MBEDTLS', '1', ' ${LIC_FILES_CHKSUM_MBEDTLS}', '', d)}"
|
||||
# add mbed TLS to version
|
||||
SRCREV_FORMAT:append = "${@bb.utils.contains('TFA_MBEDTLS', '1', '_mbedtls', '', d)}"
|
||||
|
||||
# U-boot support (set TFA_UBOOT to 1 to activate)
|
||||
# When U-Boot support is activated BL33 is activated with u-boot.bin file
|
||||
TFA_UBOOT ??= "0"
|
||||
|
||||
# UEFI support (set TFA_UEFI to 1 to activate)
|
||||
# When UEFI support is activated BL33 is activated with uefi.bin file
|
||||
TFA_UEFI ??= "0"
|
||||
|
||||
# What to build
|
||||
# By default we only build bl1, do_deploy will copy
|
||||
# everything listed in this variable (by default bl1.bin)
|
||||
TFA_BUILD_TARGET ?= "bl1"
|
||||
|
||||
# What to install
|
||||
# do_install and do_deploy will install everything listed in this
|
||||
# variable. It is set by default to TFA_BUILD_TARGET
|
||||
TFA_INSTALL_TARGET ?= "${TFA_BUILD_TARGET}"
|
||||
|
||||
# Requires CROSS_COMPILE set by hand as there is no configure script
|
||||
export CROSS_COMPILE="${TARGET_PREFIX}"
|
||||
|
||||
# Let the Makefile handle setting up the CFLAGS and LDFLAGS as it is a standalone application
|
||||
CFLAGS[unexport] = "1"
|
||||
LDFLAGS[unexport] = "1"
|
||||
AS[unexport] = "1"
|
||||
LD[unexport] = "1"
|
||||
|
||||
# No configure
|
||||
do_configure[noexec] = "1"
|
||||
|
||||
# Baremetal, just need a compiler
|
||||
DEPENDS:remove = "virtual/${TARGET_PREFIX}compilerlibs virtual/libc"
|
||||
|
||||
# We need dtc for dtbs compilation
|
||||
# We need openssl for fiptool
|
||||
DEPENDS = "dtc-native openssl-native"
|
||||
DEPENDS:append:toolchain-clang = " compiler-rt"
|
||||
|
||||
# CC and LD introduce arguments which conflict with those otherwise provided by
|
||||
# this recipe. The heads of these variables excluding those arguments
|
||||
# are therefore used instead.
|
||||
def remove_options_tail (in_string):
|
||||
from itertools import takewhile
|
||||
return ' '.join(takewhile(lambda x: not x.startswith('-'), in_string.split(' ')))
|
||||
|
||||
EXTRA_OEMAKE += "LD=${@remove_options_tail(d.getVar('LD'))}"
|
||||
|
||||
EXTRA_OEMAKE += "CC=${@remove_options_tail(d.getVar('CC'))}"
|
||||
|
||||
# Verbose builds, no -Werror
|
||||
EXTRA_OEMAKE += "V=1 E=0"
|
||||
|
||||
# Add platform parameter
|
||||
EXTRA_OEMAKE += "BUILD_BASE=${B} PLAT=${TFA_PLATFORM}"
|
||||
|
||||
# Handle TFA_BOARD parameter
|
||||
EXTRA_OEMAKE += "${@'TARGET_BOARD=${TFA_BOARD}' if d.getVar('TFA_BOARD') else ''}"
|
||||
|
||||
# Handle TFA_SPD parameter
|
||||
EXTRA_OEMAKE += "${@'SPD=${TFA_SPD}' if d.getVar('TFA_SPD') else ''}"
|
||||
|
||||
# If TFA_SPD is spmd, set SPMD_SPM_AT_SEL2
|
||||
EXTRA_OEMAKE += "${@'SPMD_SPM_AT_SEL2=${TFA_SPMD_SPM_AT_SEL2}' if d.getVar('TFA_SPD', True) == 'spmd' else ''}"
|
||||
|
||||
# Handle TFA_DEBUG parameter
|
||||
EXTRA_OEMAKE += "${@bb.utils.contains('TFA_DEBUG', '1', 'DEBUG=${TFA_DEBUG}', '', d)}"
|
||||
|
||||
# Handle MBEDTLS
|
||||
EXTRA_OEMAKE += "${@bb.utils.contains('TFA_MBEDTLS', '1', 'MBEDTLS_DIR=${TFA_MBEDTLS_DIR}', '', d)}"
|
||||
|
||||
# Uboot support
|
||||
DEPENDS += " ${@bb.utils.contains('TFA_UBOOT', '1', 'u-boot', '', d)}"
|
||||
do_compile[depends] += " ${@bb.utils.contains('TFA_UBOOT', '1', 'u-boot:do_deploy', '', d)}"
|
||||
EXTRA_OEMAKE += "${@bb.utils.contains('TFA_UBOOT', '1', 'BL33=${DEPLOY_DIR_IMAGE}/u-boot.bin', '', d)}"
|
||||
|
||||
# UEFI support
|
||||
DEPENDS += " ${@bb.utils.contains('TFA_UEFI', '1', 'edk2-firmware', '', d)}"
|
||||
EXTRA_OEMAKE += "${@bb.utils.contains('TFA_UEFI', '1', 'BL33=${RECIPE_SYSROOT}/firmware/uefi.bin', '', d)}"
|
||||
|
||||
# TFTF test support
|
||||
DEPENDS += " ${@bb.utils.contains('TFTF_TESTS', '1', 'tf-a-tests', '', d)}"
|
||||
EXTRA_OEMAKE += "${@bb.utils.contains('TFTF_TESTS', '1', 'BL33=${RECIPE_SYSROOT}/firmware/tftf.bin', '',d)}"
|
||||
|
||||
# Hafnium support
|
||||
SEL2_SPMC = "${@'${TFA_SPMD_SPM_AT_SEL2}' if d.getVar('TFA_SPD', True) == 'spmd' else ''}"
|
||||
|
||||
DEPENDS += " ${@bb.utils.contains('SEL2_SPMC', '1', 'hafnium', '', d)}"
|
||||
|
||||
EXTRA_OEMAKE += "${@bb.utils.contains('SEL2_SPMC', '1', 'CTX_INCLUDE_EL2_REGS=1 ARM_ARCH_MINOR=4 BL32=${RECIPE_SYSROOT}/firmware/hafnium.bin', '', d)}"
|
||||
|
||||
# Add SP layout file and spmc manifest for hafnium
|
||||
EXTRA_OEMAKE += "${@bb.utils.contains('SEL2_SPMC', '1', 'SP_LAYOUT_FILE=${TFA_SP_LAYOUT_FILE}' if d.getVar('TFA_SP_LAYOUT_FILE') else '', '', d)}"
|
||||
|
||||
EXTRA_OEMAKE += "${@bb.utils.contains('SEL2_SPMC', '1', 'ARM_SPMC_MANIFEST_DTS=${TFA_ARM_SPMC_MANIFEST_DTS}' if d.getVar('TFA_ARM_SPMC_MANIFEST_DTS') else '', '', d)}"
|
||||
|
||||
# Tell the tools where the native OpenSSL is located
|
||||
EXTRA_OEMAKE += "OPENSSL_DIR=${STAGING_DIR_NATIVE}/${prefix_native}"
|
||||
# Use the correct native compiler
|
||||
EXTRA_OEMAKE += "HOSTCC='${BUILD_CC}'"
|
||||
|
||||
# Runtime variables
|
||||
EXTRA_OEMAKE += "RUNTIME_SYSROOT=${STAGING_DIR_HOST}"
|
||||
|
||||
BUILD_DIR = "${B}/${TFA_PLATFORM}"
|
||||
BUILD_DIR .= "${@'/${TFA_BOARD}' if d.getVar('TFA_BOARD') else ''}"
|
||||
BUILD_DIR .= "/${@'debug' if d.getVar("TFA_DEBUG") == '1' else 'release'}"
|
||||
|
||||
do_compile() {
|
||||
# This is still needed to have the native tools executing properly by
|
||||
# setting the RPATH
|
||||
sed -i '/^LDLIBS/ s,$, \$\{BUILD_LDFLAGS},' ${S}/tools/fiptool/Makefile
|
||||
sed -i '/^INCLUDE_PATHS/ s,$, \$\{BUILD_CFLAGS},' ${S}/tools/fiptool/Makefile
|
||||
sed -i '/^LIB/ s,$, \$\{BUILD_LDFLAGS},' ${S}/tools/cert_create/Makefile
|
||||
|
||||
# Currently there are races if you build all the targets at once in parallel
|
||||
for T in ${TFA_BUILD_TARGET}; do
|
||||
oe_runmake -C ${S} $T
|
||||
done
|
||||
}
|
||||
do_compile[cleandirs] = "${B}"
|
||||
|
||||
do_install() {
|
||||
install -d -m 755 ${D}/firmware
|
||||
for atfbin in ${TFA_INSTALL_TARGET}; do
|
||||
processed="0"
|
||||
if [ "$atfbin" = "all" ]; then
|
||||
# Target all is not handled by default
|
||||
bberror "all as TFA_INSTALL_TARGET is not handled by do_install"
|
||||
bberror "Please specify valid targets in TFA_INSTALL_TARGET or"
|
||||
bberror "rewrite or turn off do_install"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f ${BUILD_DIR}/$atfbin.bin ]; then
|
||||
echo "Install $atfbin.bin"
|
||||
install -m 0644 ${BUILD_DIR}/$atfbin.bin \
|
||||
${D}/firmware/$atfbin-${TFA_PLATFORM}.bin
|
||||
ln -sf $atfbin-${TFA_PLATFORM}.bin ${D}/firmware/$atfbin.bin
|
||||
processed="1"
|
||||
fi
|
||||
if [ -f ${BUILD_DIR}/$atfbin/$atfbin.elf ]; then
|
||||
echo "Install $atfbin.elf"
|
||||
install -m 0644 ${BUILD_DIR}/$atfbin/$atfbin.elf \
|
||||
${D}/firmware/$atfbin-${TFA_PLATFORM}.elf
|
||||
ln -sf $atfbin-${TFA_PLATFORM}.elf ${D}/firmware/$atfbin.elf
|
||||
processed="1"
|
||||
fi
|
||||
if [ -f ${BUILD_DIR}/$atfbin ]; then
|
||||
echo "Install $atfbin"
|
||||
install -m 0644 ${BUILD_DIR}/$atfbin \
|
||||
${D}/firmware/$atfbin-${TFA_PLATFORM}
|
||||
ln -sf $atfbin-${TFA_PLATFORM} ${D}/firmware/$atfbin
|
||||
processed="1"
|
||||
fi
|
||||
if [ -f ${BUILD_DIR}/fdts/$atfbin.dtb ]; then
|
||||
echo "Install $atfbin.dtb"
|
||||
install -m 0644 "${BUILD_DIR}/fdts/$atfbin.dtb" \
|
||||
"${D}/firmware/$atfbin.dtb"
|
||||
processed="1"
|
||||
elif [ "$atfbin" = "dtbs" ]; then
|
||||
echo "dtbs install, skipped: set dtbs in TFA_INSTALL_TARGET"
|
||||
elif [ -f ${B}/tools/$atfbin/$atfbin ]; then
|
||||
echo "Tools $atfbin install, skipped"
|
||||
elif [ "$processed" = "0" ]; then
|
||||
bberror "Unsupported TFA_INSTALL_TARGET target $atfbin"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
FILES:${PN} = "/firmware"
|
||||
SYSROOT_DIRS += "/firmware"
|
||||
|
||||
FILES:${PN}-dbg = "/firmware/*.elf"
|
||||
# Skip QA check for relocations in .text of elf binaries
|
||||
INSANE_SKIP:${PN}-dbg = "textrel"
|
||||
|
||||
do_deploy() {
|
||||
cp -rf ${D}/firmware/* ${DEPLOYDIR}/
|
||||
}
|
||||
addtask deploy after do_install
|
||||
|
||||
CVE_PRODUCT = "arm:arm-trusted-firmware \
|
||||
arm:trusted_firmware-a \
|
||||
arm:arm_trusted_firmware \
|
||||
arm_trusted_firmware_project:arm_trusted_firmware"
|
||||
|
|
@ -9,5 +9,5 @@ BBFILE_COLLECTIONS += "meta-belden-marvell-bsp"
|
|||
BBFILE_PATTERN_meta-belden-marvell-bsp = "^${LAYERDIR}/"
|
||||
BBFILE_PRIORITY_meta-belden-marvell-bsp = "6"
|
||||
|
||||
LAYERDEPENDS_meta-belden-marvell-bsp = "core meta-belden-coreos"
|
||||
LAYERDEPENDS_meta-belden-marvell-bsp = "core meta-belden-coreos meta-arm"
|
||||
LAYERSERIES_COMPAT_meta-belden-marvell-bsp = "kirkstone"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
COMPATIBLE_MACHINE = "cn913x"
|
||||
require recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc
|
||||
|
||||
PV = "2.3+git${SRCPV}"
|
||||
|
|
@ -11,8 +12,6 @@ SRC_URI += " \
|
|||
file://mrvl_scp_bl2.img \
|
||||
"
|
||||
|
||||
COMPATIBLE_MACHINE = "cn913x"
|
||||
|
||||
DEPENDS += "mv-ddr-marvell coreutils-native"
|
||||
|
||||
CP_NUM:cn9131-bldn-mbv = "2"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
# meta-netmodule-coreos-bsp
|
||||
|
||||
BSP layer for NetModule board
|
||||
|
||||
This layer depends on:
|
||||
|
||||
- meta-ti-bsp
|
||||
- meta-arm
|
||||
|
||||
## SoC Family
|
||||
|
||||
This layer contains all CoreOS supported board manufactured by NetModule
|
||||
|
||||
## Availables Machines
|
||||
|
||||
This layer contains the following machine configuration:
|
||||
|
||||
### Based on the Gemini platform
|
||||
|
||||
- netmodule-hw34 (Codename for XG900)
|
||||
|
||||
**remarks**: Gemini based board use a TI am64xx (k3) family has a separate
|
||||
R5 core that use another architecture as the main core, so for each machine you
|
||||
will find a companion machine name `${MACHINE}-k3r5`. This config should not be
|
||||
used as is, but will be automatically used for some recipes under the hood when
|
||||
using `${MACHINE}` using Bitbake multiconfig feature.
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
|
||||
SWUPDATE_IMAGES += "tiboot3"
|
||||
SWUPDATE_IMAGES += "tispl"
|
||||
SWUPDATE_IMAGES += "u-boot-${MACHINE}"
|
||||
SWUPDATE_IMAGES_FSTYPES[tiboot3] = ".bin"
|
||||
SWUPDATE_IMAGES_FSTYPES[tispl] = ".bin"
|
||||
|
||||
python () {
|
||||
machine = d.getVar('MACHINE')
|
||||
d.setVarFlag("SWUPDATE_IMAGES_FSTYPES", "u-boot-" + machine, ".img")
|
||||
}
|
||||
COREOS_SWUPDATE_EXTENDS_FOR:append = "am64xx"
|
||||
|
||||
def coreos_swupdate_extends_images_for_am64xx(d,s):
|
||||
machine = d.getVar('MACHINE')
|
||||
uboot_filename = "u-boot-" + machine + ".img"
|
||||
|
||||
SECTOR_SIZE = 512
|
||||
OFFSET = [0x0*SECTOR_SIZE, 0x600*SECTOR_SIZE, 0x1600*SECTOR_SIZE]
|
||||
|
||||
return [
|
||||
{
|
||||
"filename" : "tiboot3.bin",
|
||||
"installed-directly" : "true",
|
||||
"device" : "/dev/mmcblk0boot0",
|
||||
"offset": str(OFFSET[0]),
|
||||
"type" : "raw",
|
||||
"sha256" : swupdate_get_sha256(d, s, "tiboot3.bin"),
|
||||
},
|
||||
{
|
||||
"filename" : "tispl.bin",
|
||||
"installed-directly" : "true",
|
||||
"device" : "/dev/mmcblk0boot0",
|
||||
"offset": str(OFFSET[1]),
|
||||
"type" : "raw",
|
||||
"sha256" : swupdate_get_sha256(d, s, "tispl.bin"),
|
||||
},
|
||||
{
|
||||
"filename" : uboot_filename,
|
||||
"installed-directly" : "true",
|
||||
"device" : "/dev/mmcblk0boot0",
|
||||
"offset": str(OFFSET[2]),
|
||||
"type" : "raw",
|
||||
"sha256" : swupdate_get_sha256(d, s, uboot_filename),
|
||||
}
|
||||
]
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
# Add layer directory to bbpath
|
||||
BBPATH .= ":${LAYERDIR}"
|
||||
|
||||
# Add recipe directories
|
||||
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
|
||||
${LAYERDIR}/recipes-*/*/*.bbappend"
|
||||
|
||||
BBFILE_COLLECTIONS += "netmodule-coreos-bsp-layer"
|
||||
BBFILE_PATTERN_netmodule-coreos-bsp-layer = "^${LAYERDIR}/"
|
||||
BBFILE_PRIORITY_netmodule-coreos-bsp-layer = "8"
|
||||
|
||||
LAYERSERIES_COMPAT_netmodule-coreos-bsp-layer = "kirkstone"
|
||||
LAYERDEPENDS_netmodule-coreos-bsp-layer = "meta-arm meta-ti-bsp"
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
# This file contains the part of the configuration that is common to all
|
||||
# board based on the Gemini platform and that are the same for both
|
||||
# the Cortex-A53 and Cortex-R5 core (Gemini use a multi-arch SOC)
|
||||
TI_LINUX_FW_SRCREV = "0f4905088d24e474063f33777559149e11538be5"
|
||||
K3_IMAGE_GEN_SRCREV ?= "2308bfb01e7bd3e03514cb33f06180dd9bb79121"
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
# This file contains the part of the configuration that is common to all
|
||||
# board based on the Gemini platform and that are the Cortex-A53 core.
|
||||
|
||||
# k3.inc from meta-ti set a default WKS_FILE and add wic to IMAGE_FSTYPE.
|
||||
# But we don't need a wic image
|
||||
WKS_FILE ?= ""
|
||||
|
||||
require conf/machine/include/k3.inc
|
||||
require conf/machine/include/netmodule-am64xx-common.inc
|
||||
|
||||
# Workarround to remove wic related settings added to IMAGE_FSTYPE in k3.inc
|
||||
# without too much risk of breaking a distro or local config (as remove)
|
||||
# are final
|
||||
IMAGE_FSTYPES:remove = "${@'wic.xz wic.bmap' if not d.getVar('WKS_FILE') else ''}"
|
||||
|
||||
# meta-ti-bsp use the machine override in a lot of recipes, so by adding the
|
||||
# name of the machine in meta-ti-bsp to SOC_FAMILY, we ensure that we the
|
||||
# device override apply.
|
||||
#
|
||||
# We don't modify MACHINEOVERRIDES directly as this will not place the string
|
||||
# in the same place
|
||||
SOC_FAMILY:append = ":am64xx"
|
||||
|
||||
# Install u-boot script
|
||||
MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-devicetree"
|
||||
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-netmodule"
|
||||
PREFERRED_VERSION_linux-netmodule = "git-5.10-ti"
|
||||
PREFERRED_VERSION_trusted-firmware-a = "2.7+gitAUTOINC+0c9c984a0d"
|
||||
|
||||
KERNEL_DEFCONFIG ?= "gemini_defconfig"
|
||||
KERNEL_IMAGETYPE = "Image"
|
||||
|
||||
UBOOT_ENTRYPOINT = "0x82000000"
|
||||
UBOOT_LOADADDRESS = "0x82000000"
|
||||
UBOOT_DTB_LOADADDRESS = "0x88000000"
|
||||
UBOOT_RD_LOADADDRESS = "0x88080000"
|
||||
UBOOT_RD_ENTRYPOINT = "0x88080000"
|
||||
|
||||
|
||||
TFA_BOARD = "lite"
|
||||
OPTEEMACHINE = "k3"
|
||||
|
||||
|
||||
|
||||
# No watchdog available yet
|
||||
EFIBOOTGUARD_TIMEOUT ?= "0"
|
||||
|
||||
COREOS_IMAGE_SWUPDATE_EXTRACLASSES += "coreos-image-swupdate-am64xx"
|
||||
|
||||
require conf/machine/include/coreos-generic-features/efi.inc
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
# This file contains the part of the configuration that is common to all
|
||||
# board based on the Gemini platform and that are the Cortex-A53 core.
|
||||
|
||||
require conf/machine/include/k3r5.inc
|
||||
require conf/machine/include/netmodule-am64xx-common.inc
|
||||
|
||||
SYSFW_SOC = "am64x"
|
||||
SYSFW_CONFIG = "evm"
|
||||
SYSFW_SUFFIX = "gp"
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
#@TYPE: Machine
|
||||
#@NAME: AM64xx EVM (R5F)
|
||||
#@DESCRIPTION: Machine configuration for the TI AM64xx EVM (R5F core)
|
||||
|
||||
|
||||
require conf/machine/include/netmodule-am64xx-k3r5.inc
|
||||
UBOOT_MACHINE = "am64x_netmodule_hw34_r5_defconfig"
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
require conf/machine/include/netmodule-am64xx-k3.inc
|
||||
|
||||
KERNEL_DEVICETREE = " \
|
||||
ti/k3-am642-netmodule-hw34.dtb \
|
||||
"
|
||||
|
||||
UBOOT_MACHINE = "am64x_netmodule_hw34_a53_defconfig"
|
||||
|
||||
LINUX_CONSOLE ?= "ttyS2,115200n8"
|
||||
|
||||
APPEND += "console=ttyS2,115200"
|
||||
|
||||
MACHINE_ESSENTIAL_EXTRA_RDEPENDS:append = " udev-gemini"
|
||||
MACHINE_EXTRA_RDEPENDS:append = " prueth-fw-am65x-sr2 linux-firmware-ath10k linux-firmware-ath11k linux-firmware-qca kernel-modules"
|
||||
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
From 8bd97ab74792c211ea6550c1696bf5f902016c1e Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Dolt <samuel.dolt@netmodule.com>
|
||||
Date: Wed, 31 May 2023 10:45:10 +0200
|
||||
Subject: [PATCH] rename genimi to hw34
|
||||
|
||||
---
|
||||
arch/arm/dts/Makefile | 4 ++--
|
||||
arch/arm/dts/k3-am642-gemini-binman.dtsi | 4 ++--
|
||||
.../{k3-am642-gemini-v1.dts => k3-am642-netmodule-hw34.dts} | 2 +-
|
||||
...-am642-r5-gemini-v1.dts => k3-am642-r5-netmodule-hw34.dts} | 0
|
||||
...emini_a53_defconfig => am64x_netmodule_hw34_a53_defconfig} | 2 +-
|
||||
..._gemini_r5_defconfig => am64x_netmodule_hw34_r5_defconfig} | 2 +-
|
||||
6 files changed, 7 insertions(+), 7 deletions(-)
|
||||
rename arch/arm/dts/{k3-am642-gemini-v1.dts => k3-am642-netmodule-hw34.dts} (99%)
|
||||
rename arch/arm/dts/{k3-am642-r5-gemini-v1.dts => k3-am642-r5-netmodule-hw34.dts} (100%)
|
||||
rename configs/{am64x_gemini_a53_defconfig => am64x_netmodule_hw34_a53_defconfig} (98%)
|
||||
rename configs/{am64x_gemini_r5_defconfig => am64x_netmodule_hw34_r5_defconfig} (98%)
|
||||
|
||||
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
|
||||
index b4a4b0982d..2f6f09a4f4 100644
|
||||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -1255,8 +1255,8 @@ dtb-$(CONFIG_SOC_K3_AM642) += k3-am642-evm.dtb \
|
||||
k3-am642-r5-evm.dtb \
|
||||
k3-am642-sk.dtb \
|
||||
k3-am642-r5-sk.dtb \
|
||||
- k3-am642-gemini-v1.dtb \
|
||||
- k3-am642-r5-gemini-v1.dtb
|
||||
+ k3-am642-netmodule-hw34.dtb \
|
||||
+ k3-am642-r5-netmodule-hw34.dtb
|
||||
|
||||
dtb-$(CONFIG_SOC_K3_AM625) += k3-am625-sk.dtb \
|
||||
k3-am625-r5-sk.dtb
|
||||
diff --git a/arch/arm/dts/k3-am642-gemini-binman.dtsi b/arch/arm/dts/k3-am642-gemini-binman.dtsi
|
||||
index 38627882ea..a06dc706b3 100644
|
||||
--- a/arch/arm/dts/k3-am642-gemini-binman.dtsi
|
||||
+++ b/arch/arm/dts/k3-am642-gemini-binman.dtsi
|
||||
@@ -13,10 +13,10 @@
|
||||
#define UBOOT_IMG "u-boot.img"
|
||||
|
||||
#define SPL_NODTB "spl/u-boot-spl-nodtb.bin"
|
||||
-#define SPL_AM642_GEMINI_DTB "spl/dts/k3-am642-gemini-v1.dtb"
|
||||
+#define SPL_AM642_GEMINI_DTB "spl/dts/k3-am642-netmodule-hw34.dtb"
|
||||
|
||||
#define UBOOT_NODTB "u-boot-nodtb.bin"
|
||||
-#define AM642_GEMINI_DTB "arch/arm/dts/k3-am642-gemini-v1.dtb"
|
||||
+#define AM642_GEMINI_DTB "arch/arm/dts/k3-am642-netmodule-hw34.dtb"
|
||||
|
||||
&binman {
|
||||
ti-spl {
|
||||
diff --git a/arch/arm/dts/k3-am642-gemini-v1.dts b/arch/arm/dts/k3-am642-netmodule-hw34.dts
|
||||
similarity index 99%
|
||||
rename from arch/arm/dts/k3-am642-gemini-v1.dts
|
||||
rename to arch/arm/dts/k3-am642-netmodule-hw34.dts
|
||||
index d134e3a712..1608c3bf9d 100644
|
||||
--- a/arch/arm/dts/k3-am642-gemini-v1.dts
|
||||
+++ b/arch/arm/dts/k3-am642-netmodule-hw34.dts
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "k3-am642.dtsi"
|
||||
|
||||
/ {
|
||||
- compatible = "ti,am642-gemini", "ti,am642";
|
||||
+ compatible = "netmodule,hw34", "ti,am642";
|
||||
model = "NetModule AM642 based Gemini";
|
||||
|
||||
aliases {
|
||||
diff --git a/arch/arm/dts/k3-am642-r5-gemini-v1.dts b/arch/arm/dts/k3-am642-r5-netmodule-hw34.dts
|
||||
similarity index 100%
|
||||
rename from arch/arm/dts/k3-am642-r5-gemini-v1.dts
|
||||
rename to arch/arm/dts/k3-am642-r5-netmodule-hw34.dts
|
||||
diff --git a/configs/am64x_gemini_a53_defconfig b/configs/am64x_netmodule_hw34_a53_defconfig
|
||||
similarity index 98%
|
||||
rename from configs/am64x_gemini_a53_defconfig
|
||||
rename to configs/am64x_netmodule_hw34_a53_defconfig
|
||||
index 900f29d7c1..acf5a340dc 100644
|
||||
--- a/configs/am64x_gemini_a53_defconfig
|
||||
+++ b/configs/am64x_netmodule_hw34_a53_defconfig
|
||||
@@ -14,7 +14,7 @@ CONFIG_ENV_SIZE=0x20000
|
||||
CONFIG_ENV_OFFSET=0x3e0000
|
||||
CONFIG_DM_GPIO=y
|
||||
CONFIG_SPL_DM_SPI=y
|
||||
-CONFIG_DEFAULT_DEVICE_TREE="k3-am642-gemini-v1"
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="k3-am642-netmodule-hw34"
|
||||
CONFIG_SPL_TEXT_BASE=0x80080000
|
||||
CONFIG_SPL_MMC=y
|
||||
CONFIG_SPL_SERIAL=y
|
||||
diff --git a/configs/am64x_gemini_r5_defconfig b/configs/am64x_netmodule_hw34_r5_defconfig
|
||||
similarity index 98%
|
||||
rename from configs/am64x_gemini_r5_defconfig
|
||||
rename to configs/am64x_netmodule_hw34_r5_defconfig
|
||||
index 44c0364eef..c7e66a18e8 100644
|
||||
--- a/configs/am64x_gemini_r5_defconfig
|
||||
+++ b/configs/am64x_netmodule_hw34_r5_defconfig
|
||||
@@ -11,7 +11,7 @@ CONFIG_TARGET_AM642_R5_GEMINI=y
|
||||
CONFIG_DM_GPIO=y
|
||||
CONFIG_SPL_DM_SPI=y
|
||||
CONFIG_SYS_SPI_U_BOOT_OFFS=0x100000
|
||||
-CONFIG_DEFAULT_DEVICE_TREE="k3-am642-r5-gemini-v1"
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="k3-am642-r5-netmodule-hw34"
|
||||
CONFIG_SPL_TEXT_BASE=0x70000000
|
||||
CONFIG_SPL_MMC=y
|
||||
CONFIG_SPL_SERIAL=y
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
require recipes-bsp/u-boot/u-boot-ti.inc
|
||||
|
||||
SPL_UART_BINARY = "u-boot-spl.bin"
|
||||
SPL_UART_BINARY:netmodule-hw34-k3r5 = "u-boot-spl.bin"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://Licenses/README;md5=2ca5f2c35c8cc335f0a19756634782f1"
|
||||
|
||||
PV = "2023.01"
|
||||
|
||||
SRC_URI = "git://git.netmodule.intranet/nmrouter/u-boot.git;protocol=ssh;user=gitea;branch=2023.01/ti/base \
|
||||
file://0001-rename-genimi-to-hw34.patch \
|
||||
"
|
||||
SRCREV = "72a21cd71968af4e043510b9ae1ce331a6cca289"
|
||||
|
||||
PACKAGECONFIG[atf] = "BL31=${STAGING_DIR_HOST}/firmware/bl31.bin,,trusted-firmware-a"
|
||||
|
||||
do_deploy:append:netmodule-hw34-k3r5 () {
|
||||
mv ${DEPLOYDIR}/tiboot3.bin ${DEPLOYDIR}/tiboot3-r5spl.bin || true
|
||||
mv ${DEPLOYDIR}/u-boot-spl.bin ${DEPLOYDIR}/u-boot-spl-r5spl.bin || true
|
||||
}
|
||||
|
||||
# Only require coreos include file for the aarch64 build of u-boot
|
||||
UBOOT_REQUIRE ?= ""
|
||||
UBOOT_REQUIRE:netmodule-hw34 = "recipes-bsp/u-boot/u-boot-coreos.inc"
|
||||
require ${UBOOT_REQUIRE}
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
DESCRIPTION = "Image used to test Gemini Performances"
|
||||
|
||||
inherit coreos-image
|
||||
|
||||
IMAGE_FEATURES += "ssh-server dev-tools cockpit networkmanager swupdate"
|
||||
IMAGE_FEATURES += "${@bb.utils.contains("MACHINE_FEATURES", "efi", "swupdate", "", d)}"
|
||||
|
||||
IMAGE_INSTALL:append = " packagegroup-core-full-cmdline swupdate-www"
|
||||
|
||||
# Perfs tools
|
||||
# openssl-bin need for "openssl speed"
|
||||
IMAGE_INSTALL:append = " canutils can-utils iperf2 iperf3 strongswan stress-ng openssl-bin"
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
# CAN renaming
|
||||
SUBSYSTEM=="net", ACTION=="add", KERNEL=="can*", ENV{ID_PATH}=="platform-20701000.can", NAME="canfd0"
|
||||
SUBSYSTEM=="net", ACTION=="add", KERNEL=="can*", ENV{ID_PATH}=="platform-20711000.can", NAME="canfd1"
|
||||
SUBSYSTEM=="net", ACTION=="add", KERNEL=="can*", ENV{ID_PATH}=="platform-20110000.spi-cs-0", NAME="canstd0"
|
||||
SUBSYSTEM=="net", ACTION=="add", KERNEL=="can*", ENV{ID_PATH}=="platform-20110000.spi-cs-1", NAME="canstd1"
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
SUMMARY = "Extra Gemini specific configuration files"
|
||||
DESCRIPTION = "Extra machine specific configuration files for udev that are Gemini related."
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
|
||||
|
||||
SRC_URI = " \
|
||||
file://gemini-can.rules \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}"
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${sysconfdir}/udev/rules.d
|
||||
|
||||
install -m 0644 ${WORKDIR}/gemini-can.rules ${D}${sysconfdir}/udev/rules.d/gemini-can.rules
|
||||
}
|
||||
|
||||
RDEPENDS:${PN} = "udev"
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
label: gpt
|
||||
device: /dev/mmcblk0
|
||||
unit: sectors
|
||||
first-lba: 34
|
||||
last-lba: 15273566
|
||||
sector-size: 512
|
||||
|
||||
/dev/mmcblk0p1 : start= 34, size= 131072, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, name="efi"
|
||||
/dev/mmcblk0p2 : start= 131106, size= 262144, type=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7, name="ebg0"
|
||||
/dev/mmcblk0p3 : start= 393250, size= 262144, type=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7, name="ebg1"
|
||||
/dev/mmcblk0p4 : start= 655394, size= 7309086, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, name="rootfs0"
|
||||
/dev/mmcblk0p5 : start= 7964480, size= 7309086, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, name="rootfs1"
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
FILESEXTRAPATHS:prepend := "${THISDIR}/coreos-installer-config:"
|
||||
|
||||
SRC_URI:append:netmodule-hw34 = " file://netmodule-hw34_1.0.sfdisk"
|
||||
|
||||
do_install:append:netmodule-hw34() {
|
||||
install -m 755 ${WORKDIR}/netmodule-hw34_1.0.sfdisk ${D}${sysconfdir}/
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
From 04d19014f019b6e5b3236b0f0d31d1df18ffeeca Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Dolt <samuel.dolt@netmodule.com>
|
||||
Date: Wed, 24 May 2023 15:59:34 +0200
|
||||
Subject: [PATCH] rename k3-am642-gemini-v1.dts to k3-am642-netmodule-hw34.dts
|
||||
|
||||
---
|
||||
.../ti/{k3-am642-gemini-v1.dts => k3-am642-netmodule-hw34.dts} | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
rename arch/arm64/boot/dts/ti/{k3-am642-gemini-v1.dts => k3-am642-netmodule-hw34.dts} (99%)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/ti/k3-am642-gemini-v1.dts b/arch/arm64/boot/dts/ti/k3-am642-netmodule-hw34.dts
|
||||
similarity index 99%
|
||||
rename from arch/arm64/boot/dts/ti/k3-am642-gemini-v1.dts
|
||||
rename to arch/arm64/boot/dts/ti/k3-am642-netmodule-hw34.dts
|
||||
index bc34523f7006..bca213661615 100644
|
||||
--- a/arch/arm64/boot/dts/ti/k3-am642-gemini-v1.dts
|
||||
+++ b/arch/arm64/boot/dts/ti/k3-am642-netmodule-hw34.dts
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "k3-am642.dtsi"
|
||||
|
||||
/ {
|
||||
- compatible = "ti,am642-gemini-v1", "ti,am642";
|
||||
+ compatible = "netmodule,hw34", "ti,am642";
|
||||
model = "NetModule AM642 based GEMINI V1";
|
||||
|
||||
chosen {
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
DESCRIPTION = "Linux kernel for various NetModule hardware"
|
||||
COMPATIBLE_MACHINE = "k3"
|
||||
|
||||
inherit kernel
|
||||
|
||||
SRC_URI = "git://gitlab.netmodule.intranet/oem-linux/linux-netmodule.git;protocol=ssh;user=git;branch=5.10/ti/base \
|
||||
file://0001-rename-k3-am642-gemini-v1.dts-to-k3-am642-netmodule-.patch \
|
||||
"
|
||||
SRCREV = "0417c6736055dcd90c7fc33b7bec5b77b647ab05"
|
||||
|
||||
LICENSE = "GPLv2"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
#If a KERNEL_DEFCONFIG is specified, the defconfig specified in SRC_URI will be overwritten!
|
||||
do_configure:append(){
|
||||
if [ "${KERNEL_DEFCONFIG}" != "" ]; then
|
||||
oe_runmake ${KERNEL_DEFCONFIG}
|
||||
fi
|
||||
configs="${@" ".join(find_cfgs(d))}"
|
||||
if [ ! -z "${configs}" ]; then
|
||||
${S}/scripts/kconfig/merge_config.sh -m -O ${WORKDIR}/build ${WORKDIR}/build/.config ${WORKDIR}/*.cfg
|
||||
fi
|
||||
}
|
||||
|
||||
require recipes-kernel/linux/linux-yocto-coreos-efi.inc
|
||||
|
|
@ -11,6 +11,7 @@ BBLAYERS ?= " \
|
|||
##COREOS_LAYERSDIR##/meta-belden-coreos-bsp \
|
||||
##COREOS_LAYERSDIR##/meta-belden-coreos-demo \
|
||||
##COREOS_LAYERSDIR##/meta-belden-marvell-bsp \
|
||||
##COREOS_LAYERSDIR##/meta-netmodule-coreos-bsp \
|
||||
##COREOS_EXTLAYERSDIR##/meta-openembedded/meta-oe \
|
||||
##COREOS_EXTLAYERSDIR##/meta-openembedded/meta-networking \
|
||||
##COREOS_EXTLAYERSDIR##/meta-openembedded/meta-filesystems \
|
||||
|
|
@ -19,4 +20,7 @@ BBLAYERS ?= " \
|
|||
##COREOS_EXTLAYERSDIR##/meta-virtualization \
|
||||
##COREOS_EXTLAYERSDIR##/meta-efibootguard \
|
||||
##COREOS_EXTLAYERSDIR##/meta-swupdate \
|
||||
##COREOS_EXTLAYERSDIR##/meta-arm/meta-arm-toolchain \
|
||||
##COREOS_EXTLAYERSDIR##/meta-arm/meta-arm \
|
||||
##COREOS_EXTLAYERSDIR##/meta-ti/meta-ti-bsp \
|
||||
"
|
||||
|
|
|
|||
Loading…
Reference in New Issue