Merge branch 'master' into kirkstone-next

This commit is contained in:
Patrick Vogelaar 2024-02-29 16:45:32 +01:00
commit 1141ac2a97
25 changed files with 302 additions and 21 deletions

6
.gitmodules vendored
View File

@ -24,5 +24,9 @@
branch = kirkstone
[submodule "meta-arm"]
path = external-layers/meta-arm
url = git://git.yoctoproject.org/meta-arm
url = ssh://git@bitbucket.gad.local:7999/ico/meta-arm.git
branch = kirkstone
[submodule "meta-ti"]
path = external-layers/meta-ti
url = ssh://git@bitbucket.gad.local:7999/ico/meta-ti.git
branch = kirkstone

@ -0,0 +1 @@
Subproject commit 2e3ffb73630f4ff78227822bdb4c23e75a720223

View File

@ -6,9 +6,9 @@
require conf/machine/qemu-generic-arm64.conf
MACHINEOVERRIDES =. "qemu-generic-arm64:"
IMAGE_FSTYPES += "wic.xz wic.bmap"
COREOS_IMAGE_GENERATE_INSTALLER = "0"
WKS_FILE = "qemu-efi-coreos-generic.wks.in"
QB_DRIVE_TYPE = "/dev/sd"
EFIBOOTGUARD_TIMEOUT ?= "0"
require conf/machine/include/coreos-generic-features/efi.inc

View File

@ -0,0 +1,4 @@
CONFIG_BLK_DEV_DM=y
CONFIG_KEYS=y
CONFIG_ENCRYPTED_KEYS=y
CONFIG_DM_CRYPT=y

View File

@ -0,0 +1,2 @@
# Set kernel config needed by secure-storage
SRC_URI += "file://secure-storage.cfg"

View File

@ -1,11 +1,10 @@
# 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_USERDATA} --ondisk sda --size ${WKS_PART_USERDATA_SIZE} --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
${WKS_PART_USERDATA} --size ${WKS_PART_USERDATA_SIZE} --extra-space 0 --overhead-factor 1
part swap --ondisk sda --size 44 --label swap1 --fstype=swap
bootloader --ptable gpt

View File

@ -2,11 +2,11 @@
# long-description: Creates a partitioned EFI disk image that the user
# can directly dd to boot media.
part --source efibootguard-efi --label efi --part-type=EF00 --ondisk mmcblk1 --offset 20480S --size 64M --extra-space 0 --overhead-factor 1
part / --source rootfs --fstype=ext4 --label rootfs0 --ondisk mmcblk1 --size ${WKS_PART_ROOT_SIZE} --extra-space 0 --overhead-factor 1
part --fstype=ext4 --label rootfs1 --ondisk mmcblk1 --size ${WKS_PART_ROOT_SIZE} --extra-space 0 --overhead-factor 1
part --source efibootguard-boot --label ebg0 --part-type=0700 --sourceparams "args=coreos.root=rootfs0,watchdog=${EFIBOOTGUARD_TIMEOUT},revision=2,kernel=${COREOS_KERNEL_FILENAME};KERNEL.EFI" --ondisk mmcblk1 --align 1024 --size 128M --extra-space 0 --overhead-factor 1
part --source efibootguard-boot --label ebg1 --part-type=0700 --sourceparams "args=coreos.root=rootfs1,watchdog=${EFIBOOTGUARD_TIMEOUT},revision=1,kernel=${COREOS_KERNEL_FILENAME};KERNEL.EFI" --ondisk mmcblk1 --align 1024 --size 128M --extra-space 0 --overhead-factor 1
${WKS_PART_USERDATA} --ondisk mmcblk1 --size ${WKS_PART_USERDATA_SIZE} --extra-space 0 --overhead-factor 1
part --source efibootguard-efi --label efi --part-type=EF00 --use-uuid --offset 20480S --size 64M --extra-space 0 --overhead-factor 1
part / --source rootfs --fstype=ext4 --label rootfs0 --use-uuid --size ${WKS_PART_ROOT_SIZE} --extra-space 0 --overhead-factor 1
part --fstype=ext4 --label rootfs1 --use-uuid --size ${WKS_PART_ROOT_SIZE} --extra-space 0 --overhead-factor 1
part --source efibootguard-boot --label ebg0 --part-type=0700 --sourceparams "args=coreos.root=rootfs0,watchdog=${EFIBOOTGUARD_TIMEOUT},revision=2,kernel=${COREOS_KERNEL_FILENAME};KERNEL.EFI" --use-uuid --align 1024 --size 128M --extra-space 0 --overhead-factor 1
part --source efibootguard-boot --label ebg1 --part-type=0700 --sourceparams "args=coreos.root=rootfs1,watchdog=${EFIBOOTGUARD_TIMEOUT},revision=1,kernel=${COREOS_KERNEL_FILENAME};KERNEL.EFI" --use-uuid --align 1024 --size 128M --extra-space 0 --overhead-factor 1
${WKS_PART_USERDATA} --use-uuid --size ${WKS_PART_USERDATA_SIZE} --extra-space 0 --overhead-factor 1
bootloader --ptable gpt

View File

@ -3,6 +3,7 @@
# > COREOS_IMAGE_EXTRACLASSES += "coreos-image-ci"
# in auto.conf (or local.conf)
inherit kernel-artifact-names
def get_coreos_ci_artifacts(d):
artifacts = []
@ -29,6 +30,10 @@ def get_coreos_ci_artifacts(d):
if bb.utils.contains('IMAGE_FSTYPES', 'wic.bmap', True, False, d):
artifacts.append(d.getVar('IMAGE_LINK_NAME') + '.wic.bmap')
# This is used for qemu-coreos-arm64
if bb.utils.contains('IMAGE_FSTYPES', 'wic.qcow2', True, False, d):
artifacts.append(d.getVar('IMAGE_LINK_NAME') + '.wic.qcow2')
if d.getVar('COREOS_IMAGE_GENERATE_SWU') == '1':
artifacts.append(d.getVar('IMAGE_LINK_NAME') + '.swu')

View File

@ -48,3 +48,4 @@ umount /mnt/ebg1
umount /mnt/efi
SWUPDATE_ARGS="${SWUPDATE_ARGS} -e stable,copy0"
SWUPDATE_ARGS="${SWUPDATE_ARGS} -k /usr/lib/swupdate/swupdate.crt"

View File

@ -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"

View File

@ -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.

View File

@ -0,0 +1,46 @@
SWUPDATE_IMAGES += "tiboot3-am64x-gemini-b"
SWUPDATE_IMAGES += "tispl"
SWUPDATE_IMAGES += "u-boot-${MACHINE}"
SWUPDATE_IMAGES_FSTYPES[tiboot3-am64x-gemini-b] = ".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-am64x-gemini-b.bin",
"installed-directly" : "true",
"device" : "/dev/mmcblk0boot0",
"offset": str(OFFSET[0]),
"type" : "raw",
"sha256" : swupdate_get_sha256(d, s, "tiboot3-am64x-gemini-b.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),
}
]

View File

@ -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"

View File

@ -0,0 +1,6 @@
# 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)
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti-coreos"
PREFERRED_PROVIDER_u-boot = "u-boot-ti-coreos"

View File

@ -0,0 +1,49 @@
# 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 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-ti-coreos"
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

View File

@ -0,0 +1,13 @@
# This file contains the part of the configuration that is common to all
# board based on the Gemini platform and that are the Cortex-R5 core.
require conf/machine/include/k3r5.inc
require netmodule-am64xx-common.inc
# A variant
#SPL_BINARY = "tiboot3-am64x-gemini.${SPL_SUFFIX}"
# B variant
SPL_BINARY = "tiboot3-am64x-gemini-b.${SPL_SUFFIX}"
# Sanity checks don't apply for real time cores
INHERIT:remove = "coreos-sanity"

View File

@ -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"

View File

@ -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"

View File

@ -0,0 +1,20 @@
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.04"
SRC_URI = "git://bitbucket.gad.local:7999/nm-nsp/netmodule-u-boot.git;protocol=ssh;user=git;branch=gemini/ti/ti-u-boot-2023.04 \
"
SRCREV = "34cf1e583eb263dd6644d0ebf3468b3846fc0925"
PACKAGECONFIG[atf] = "BL31=${STAGING_DIR_HOST}/firmware/bl31.bin,,trusted-firmware-a"
# 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}

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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}/
}

View File

@ -0,0 +1,26 @@
DESCRIPTION = "Linux kernel for various NetModule hardware"
COMPATIBLE_MACHINE = "k3"
inherit kernel
SRC_URI = "git://bitbucket.gad.local:7999/ico/ti-linux-kernel.git;protocol=ssh;user=git;branch=coreos/5.10 \
"
SRCREV = "1debdf5926e98255e7c97e3c160a91f3aa094ffc"
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

View File

@ -12,6 +12,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 \
@ -22,4 +23,5 @@ BBLAYERS ?= " \
##COREOS_EXTLAYERSDIR##/meta-swupdate \
##COREOS_EXTLAYERSDIR##/meta-arm/meta-arm \
##COREOS_EXTLAYERSDIR##/meta-arm/meta-arm-toolchain \
##COREOS_EXTLAYERSDIR##/meta-ti/meta-ti-bsp \
"