Skip to content
Snippets Groups Projects
Commit f6fef9aa authored by Frieder Schrempf's avatar Frieder Schrempf
Browse files

Merge branch 'feature/include-recipes' into 'main'

Add recipes and configuration

See merge request !3
parents 523eccd3 7cfe2c17
No related branches found
No related tags found
1 merge request!3Add recipes and configuration
Pipeline #20799 passed
Showing
with 493 additions and 24 deletions
......@@ -31,7 +31,9 @@ docs:trigger:
# Build Bootloader Images
.build-matrix: &build-matrix
- PLATFORM: mx6ul
- PLATFORM: mx8mm
- PLATFORM: mx8mp
.common-vars: &common-vars
KAS_CONFIG: "kas/ked-${PLATFORM}.yml"
......@@ -68,6 +70,14 @@ bootloader:build:release:
BUILD_NAME: mx8mm
TARGETS: "u-boot spl licenses"
DESCRIPTION: "KED Bootloader for i.MX8MM Hardware"
- NAME: bootloader-ked-mx8mp
BUILD_NAME: mx8mp
TARGETS: "u-boot spl licenses"
DESCRIPTION: "KED Bootloader for i.MX8MP Hardware"
- NAME: bootloader-ked-mx6ul
BUILD_NAME: mx6ul
TARGETS: "u-boot spl licenses"
DESCRIPTION: "KED Bootloader for i.MX6UL/ULL Hardware"
bootloader:package:
extends: .create-package
......
......@@ -2,7 +2,7 @@
# SPDX-License-Identifier: MIT
header:
version: 12
version: 14
includes:
- repo: meta-ked-bsp
file: kas/dev/shared-cache.yml
header:
version: 14
overrides:
repos:
meta-ked-bsp:
commit: 8b5f96675a97464cdc7cf125c054b558ba403ad2
poky:
commit: 3e73216a32a2b01916eb8c555a41579bd69a47aa
......@@ -2,31 +2,33 @@
# SPDX-License-Identifier: MIT
header:
version: 12
version: 14
includes:
- repo: meta-ked-bsp
file: kas/series/kirkstone.yml
- kas/inc/versions.yml
distro: ked
local_conf_header:
codename:
KED_DISTRO_CODENAME = "ked-bootloader"
env:
SEMVER: 0.0.0-dev
repos:
meta-ked-bsp:
url: https://git.kontron-electronics.de/sw/ked/meta-ked-bsp.git
refspec: 6.1.0
branch: main
path: layers/meta-ked-bsp
layers:
layers/meta-ked:
meta-ked-bootloader:
layers:
layers/meta-ked-bootloader:
meta-openembedded:
layers:
.: excluded
meta-qt5:
layers:
.: excluded
meta-python2:
layers:
.: excluded
meta-swupdate:
layers:
.: excluded
meta-arm:
poky:
url: "https://git.yoctoproject.org/git/poky"
branch: kirkstone
path: layers/poky
layers:
.: excluded
meta:
meta-poky:
header:
version: 14
overrides:
repos:
meta-freescale:
commit: 457465ca5c2063c49a4c230dcc2634d6c7e5bc63
# Copyright (C) 2022 Kontron Electronics GmbH
# SPDX-License-Identifier: MIT
header:
version: 14
includes:
- kas/inc/common.yml
repos:
meta-ked-bsp:
layers:
layers/meta-ked-imx:
meta-freescale:
url: https://git.yoctoproject.org/git/meta-freescale
branch: kirkstone
path: layers/meta-freescale
local_conf_header:
accept_eula:
ACCEPT_FSL_EULA = "1"
# Copyright (C) 2022 Kontron Electronics GmbH
# SPDX-License-Identifier: MIT
header:
version: 14
local_conf_header:
bootloader_versions: |
PREFERRED_PROVIDER_u-boot ?= "u-boot-ktn"
PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ktn"
PREFERRED_PROVIDER_virtual/trusted-firmware-a ?= "imx-atf"
PREFERRED_VERSION_u-boot-ktn ?= "2023.04"
IMX_DEFAULT_BOOTLOADER = "u-boot-ktn"
# Copyright (C) 2023 Kontron Electronics GmbH
# SPDX-License-Identifier: MIT
header:
version: 14
includes:
- kas/inc/imx.yml
machine: kontron-mx6ul
target:
- virtual/bootloader
......@@ -2,11 +2,9 @@
# SPDX-License-Identifier: MIT
header:
version: 12
version: 14
includes:
- inc/common.yml
- repo: meta-ked-bsp
file: kas/inc/imx.yml
- kas/inc/imx.yml
machine: kontron-mx8mm
target:
......
# Copyright (C) 2023 Kontron Electronics GmbH
# SPDX-License-Identifier: MIT
header:
version: 14
includes:
- kas/inc/imx.yml
machine: kontron-mx8mp
target:
- virtual/bootloader
......@@ -29,4 +29,4 @@ BBFILES += "${LAYERDIR}/series-compat/${BASE_SERIES}/recipes*/*/*.bb"
LAYERVERSION_ked-bl = "1"
LAYERSERIES_COMPAT_ked-bl = "dunfell kirkstone"
LAYERDEPENDS_ked-bl = "ked freescale-layer"
LAYERDEPENDS_ked-bl = "freescale-layer"
DDR_FIRMWARE_NAME:mx8mm-generic-bsp ?= " \
lpddr4_pmu_train_1d_imem.bin \
lpddr4_pmu_train_1d_dmem.bin \
lpddr4_pmu_train_2d_imem.bin \
lpddr4_pmu_train_2d_dmem.bin \
"
DDR_FIRMWARE_NAME:mx8mp-generic-bsp ?= " \
lpddr4_pmu_train_1d_imem_202006.bin \
lpddr4_pmu_train_1d_dmem_202006.bin \
lpddr4_pmu_train_2d_imem_202006.bin \
lpddr4_pmu_train_2d_dmem_202006.bin \
"
require recipes-bsp/firmware-imx/firmware-imx-8m.inc
From 80397ca1435af8f7081a1951e6f2390954ba0b8c Mon Sep 17 00:00:00 2001
From: Frieder Schrempf <frieder.schrempf@kontron.de>
Date: Thu, 17 Feb 2022 16:19:24 +0100
Subject: [PATCH] imx8mm_bl31_setup.c: Assign UART4 to A53 instead of M4 domain
by default
Otherwise we can't access UART4 from the Linux system.
---
plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
index 8702d5160..c5bb66040 100644
--- a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
+++ b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
@@ -61,7 +61,7 @@ static const struct imx_rdc_cfg rdc[] = {
RDC_MDAn(RDC_MDA_M4, DID1),
/* peripherals domain permission */
- RDC_PDAPn(RDC_PDAP_UART4, D1R | D1W),
+ RDC_PDAPn(RDC_PDAP_UART4, D0R | D0W),
RDC_PDAPn(RDC_PDAP_UART2, D0R | D0W),
RDC_PDAPn(RDC_PDAP_UART1, D0R | D0W),
@@ -108,7 +108,7 @@ static const struct imx_rdc_cfg rdc[] = {
RDC_MDAn(RDC_MDA_M4, DID1),
/* peripherals domain permission */
- RDC_PDAPn(RDC_PDAP_UART4, D1R | D1W),
+ RDC_PDAPn(RDC_PDAP_UART4, D0R | D0W),
RDC_PDAPn(RDC_PDAP_UART2, D0R | D0W),
RDC_PDAPn(RDC_PDAP_UART1, D0R | D0W),
--
2.42.0
TFA_BINARY:mx8mp-generic-bsp ?= "bl31-imx8mp.bin"
TFA_BINARY:mx8mm-generic-bsp ?= "bl31-imx8mm.bin"
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
require imx-atf.inc
# Change deployment paths to match that of the mainline TF-A
do_deploy() {
install -Dm 0644 ${S}/build/${TFA_PLATFORM}/release/bl31.bin ${DEPLOYDIR}/${TFA_BINARY}
if ${BUILD_OPTEE}; then
install -m 0644 ${S}/build-optee/${TFA_PLATFORM}/release/bl31.bin ${DEPLOYDIR}/${TFA_BINARY}-optee
fi
}
PROVIDES = "virtual/trusted-firmware-a"
#
# The BSP layer we use for building (meta-ked-imx) is not aligned to use the
# meta-ked-bootloader layer yet. In order to prevent bitbake from applying
# the patch twice, let's comment this out for now. As soon as the BSP layer
# has been modified, we can fix this.
#
#SRC_URI:append:ked-mx8mm = " \
# file://0001-imx8mm_bl31_setup.c-Assign-UART4-to-A53-instead-of-M.patch \
#"
TFA_BUILD_TARGET ?= "bl31"
ATF_BOOT_UART_BASE ?= "0x30880000"
TFA_PLATFORM:mx8mp-generic-bsp ?= "imx8mp"
TFA_PLATFORM:mx8mm-generic-bsp ?= "imx8mm"
ATF_PLATFORM = "${TFA_PLATFORM}"
# Dunfell compat
PLATFORM = "${TFA_PLATFORM}"
COMPATIBLE_MACHINE = "(ked-imx|imx-mainline-bsp)"
require u-boot-ktn-common.inc
require recipes-bsp/u-boot/u-boot.inc
LIC_FILES_CHKSUM = "file://Licenses/README;md5=2ca5f2c35c8cc335f0a19756634782f1"
DEPENDS += "bc-native dtc-native gnutls-native"
# v2023.04 + KED Patches
SRCREV = "a15acbb0b04a30ced011c330838e2b7d058912c5"
SRCBRANCH = "develop-v2023.04-ktn-imx"
SRC_URI[md5sum] = "d86276b74616cc9945e38fc1412772c9"
SRC_URI[sha256sum] = "7a986967fd3a79432a9a0a6a3ff27edb67c6e96583cb4abeb886fdd7f74f0824"
# Overwrite the default environment
SRC_URI:append = " \
file://osm-s-mx8mp.env;subdir=git/board/kontron/osm-s-mx8mp/ \
file://sl-mx6ul.env;subdir=git/board/kontron/sl-mx6ul/ \
file://sl-mx8mm.env;subdir=git/board/kontron/sl-mx8mm/ \
"
inherit fsl-u-boot-localversion
# backported upstream changes
inherit python3native
DEPENDS:remove = "python-native"
EXTRA_OEMAKE += 'STAGING_INCDIR=${STAGING_INCDIR_NATIVE} STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE}'
SCMVERSION = "y"
LOCALVERSION = "_${DISTRO_CODENAME}_${DISTRO_VERSION}"
require recipes-bsp/u-boot/u-boot-common.inc
require recipes-bsp/firmware-imx/firmware-imx-8m.inc
require recipes-bsp/imx-atf/imx-atf.inc
DEPENDS += "bc-native dtc-native python3-setuptools-native"
inherit fsl-u-boot-localversion
SCMVERSION = "y"
LOCALVERSION = "_${DISTRO_CODENAME}_${DISTRO_VERSION}"
SRC_URI = "git://${KED_GIT_SERVER}/sw/misc/u-boot.git;protocol=https;branch=${SRCBRANCH}"
# For i.MX8M, depend on ATF and DDR firmware and copy binaries to U-Boot build,
# so it can be included in the SPL/FIT image.
UBOOT_IMAGE_DEPS = ""
UBOOT_IMAGE_DEPS:mx8m-generic-bsp = "virtual/trusted-firmware-a:do_deploy firmware-imx-8m:do_deploy"
do_configure[depends] = "${UBOOT_IMAGE_DEPS}"
do_compile:prepend:mx8m-generic-bsp() {
for config in ${UBOOT_MACHINE}; do
install -D -m 0644 ${DEPLOY_DIR_IMAGE}/${TFA_BINARY} ${B}/${config}/bl31.bin
done
for ddr_firmware in ${DDR_FIRMWARE_NAME}; do
install -D -m 0644 ${DEPLOY_DIR_IMAGE}/${ddr_firmware} ${B}/${config}/${ddr_firmware}
done
}
# For i.MX8M, we need to pass the correct load address for the ATF to the
# mkimage_fit_atf.sh script, by setting the ATF_LOAD_ADDR environment variable.
EXTRA_OEMAKE:append:mx8m-generic-bsp = " 'ATF_LOAD_ADDR=0x00920000'"
# Code snippet from poky linux-yocto.inc to fix menuconfig presentation
do_devshell:prepend() {
# setup native pkg-config variables (kconfig scripts call pkg-config directly, cannot generically be overriden to pkg-config-native)
d.setVar("PKG_CONFIG_DIR", "${STAGING_DIR_NATIVE}${libdir_native}/pkgconfig")
d.setVar("PKG_CONFIG_PATH", "${PKG_CONFIG_DIR}:${STAGING_DATADIR_NATIVE}/pkgconfig")
d.setVar("PKG_CONFIG_LIBDIR", "${PKG_CONFIG_DIR}")
d.setVarFlag("PKG_CONFIG_SYSROOT_DIR", "unexport", "1")
d.appendVar("OE_TERMINAL_EXPORTS", " PKG_CONFIG_DIR PKG_CONFIG_PATH PKG_CONFIG_LIBDIR PKG_CONFIG_SYSROOT_DIR")
}
UBOOT_BINARY ?= "flash.bin"
UBOOT_MAKE_TARGET ?= "flash.bin"
UBOOT_SUFFIX:pn-${PN} ?= "bin"
UBOOT_CONFIG ?= "${MACHINE}"
UBOOT_CONFIG[kontron-mx6ul] = "kontron-sl-mx6ul_defconfig"
UBOOT_CONFIG[kontron-mx8mm] = "kontron-sl-mx8mm_defconfig"
UBOOT_CONFIG[kontron-mx8mp] = "kontron-osm-s-mx8mp_defconfig"
active_part_file=sys_active
active_part=a
bootargs_base=rootwait
bootcfg=auto
bootcmd=run vendor_bootcmd;
extension_board=0
fallback_active=0
fdt_addr_r=0x48000000
fdtoverlay_addr_r=0x49000000
image_base=fitImage
ipaddr=192.168.1.11
kernel_addr_r=0x42000000
netargs=setenv bootargs root=/dev/nfs ip=${ipaddr}:${serverip}:::${hostname}:eth0:any nfsroot=${serverip}:/nfsroot,v3,tcp
pxefile_addr_r=0x40100000
ramdisk_addr_r=0x48080000
scriptaddr=0x40000000
serverip=192.168.1.10
touch_rst_gpio=7
upgrade_available=0
vendor_boot_targets=mmc1 mmc0
vendor_bootcmd_mmc0=devnum=0; devpart=1; run vendor_boot
vendor_bootcmd_mmc1=devnum=1; devpart=1; run vendor_boot
altbootcmd=
setenv fallback_active 1;
setenv bootargs_base ${bootargs_base} fallback;
run vendor_bootcmd;
vendor_bootcmd=
if test $bootcfg = 'auto'; then
run vendor_detect_config;
fi;
for target in ${vendor_boot_targets}; do
run vendor_bootcmd_${target};
done;
reset;
vendor_bootcmd_net=
run netargs;
setenv bootargs ${bootargs} ${bootargs_base};
tftp ${loadaddr} ${image_base};
bootm ${loadaddr}#${bootcfg};
vendor_detect_config=
regulator dev VCC_PANEL
regulator enable
gpio clear ${touch_rst_gpio};
sleep 0.02;
gpio set ${touch_rst_gpio};
sleep 0.02;
i2c dev 0;
setenv bootcfg_ext conf-freescale_imx8mp-kontron-bl-extension.dtbo;
setenv bootcfg conf-freescale_imx8mp-kontron-bl-osm-s.dtb;
if i2c probe 0x5d; then
echo 'LVDS Panel detected';
setenv bootcfg ${bootcfg}#conf-freescale_imx8mp-kontron-dl.dtbo;
fi;
if test ${extension_board} = 1; then
setenv bootcfg ${bootcfg}#${bootcfg_ext};
else
setenv bootcfg ${bootcfg};
fi;
vendor_ab_boot=
if ext4load mmc ${devnum}:${devpart} ${loadaddr} ${active_part_file}; then
run vendor_set_ab_bootargs;
else
echo ------------------------ ;
echo No partition file found. ;
echo Aborting boot and reset! ;
echo ------------------------ ;
reset;
fi;
if ext4load mmc ${devnum}:${devpart} ${loadaddr} ${image}; then
if test ${upgrade_available} = 1; then
wdt dev watchdog@30280000;
wdt start 15000;
fi;
bootm ${loadaddr}#${bootcfg};
else
echo ------------------------ ;
echo $image not found. ;
echo Aborting boot and reset! ;
echo ------------------------ ;
reset;
fi;
vendor_boot=
setenv bootargs root=/dev/mmcblk${devnum}p2 ${bootargs_base};
if fatload mmc ${devnum}:${devpart} ${loadaddr} ${image_base}; then
bootm ${loadaddr}#${bootcfg};
fi;
vendor_set_ab_bootargs=
if test $fallback_active = 0; then
echo Normal boot to active system;
setenv image ${image_base}_active;
if itest.b *${loadaddr} == 41; then
setenv active_part a;
else
setenv active_part b;
fi;
else
echo Fallback boot to inactive system;
setenv image ${image_base}_inactive;
if itest.w *${loadaddr} == 0x4242 || itest.w *${loadaddr} == 0x4241; then
setenv active_part b;
elif itest.w *${loadaddr} == 0x4141 || itest.w *${loadaddr} == 0x4142; then
setenv active_part a;
fi;
fi;
if test $active_part = a; then
setenv bootargs root=/dev/mmcblk${devnum}p2 ${bootargs_base};
echo Using rootfs partition A: /dev/mmcblk${devnum}p2;
elif test $active_part = b; then
setenv bootargs root=/dev/mmcblk${devnum}p3 ${bootargs_base};
echo Using rootfs partition B: /dev/mmcblk${devnum}p3;
fi;
active_part_file=sys_active
active_part=a
bootargs_base=rootwait console=ttymxc3,115200 earlycon
bootcfg=conf-imx6ull-kontron-dl.dtb
bootcmd=run vendor_bootcmd;
bootubipart=spi-nand0
bootubivol=boot
fallback_active=0
fdt_addr_r=0x83000000
image_base=fitImage
ipaddr=192.168.1.11
kernel_addr_r=0x82000000
netargs=setenv bootargs root=/dev/nfs ip=${ipaddr}:${serverip}:::${hostname}:eth0:any: nfsroot=${serverip}:/nfsroot,v3,tcp
pxefile_addr_r=0x80100000
ramdisk_addr_r=0x88080000
scriptaddr=0x80100000
serverip=192.168.1.10
upgrade_available=0
vendor_boot_targets=mmc0 ubifs mmc1
vendor_bootcmd_mmc0= setenv devnum 0;setenv devpart 1;run vendor_boot
vendor_bootcmd_mmc1= setenv devnum 1;setenv devpart 1;run vendor_ab_boot
altbootcmd=
setenv fallback_active 1;
setenv bootargs_base ${bootargs_base} fallback;
run vendor_bootcmd;
vendor_bootcmd=
for target in ${vendor_boot_targets}; do
run vendor_bootcmd_${target};
done;
reset;
vendor_bootcmd_net=
run netargs;
setenv bootargs ${bootargs} ${bootargs_base};
tftp ${loadaddr} ${image_base};
run vendor_bootm;
vendor_ab_boot=
if ubi part ubi || ubi part UBI; then
ubifsmount ubi0:boot;
if ubifsload $loadaddr ${active_part_file} 2; then
run vendor_set_ab_bootargs;
else
echo ------------------------ ;
echo No partition file found. ;
echo Aborting boot and reset! ;
echo ------------------------ ;
reset;
fi;
if ubifsload $loadaddr ${image}; then
if test ${upgrade_available} = 1; then
wdt dev watchdog@20bc000;
wdt start 15000;
fi;
run vendor_bootm;
else
echo ------------------------ ;
echo $image not found. ;
echo Aborting boot and reset! ;
echo ------------------------ ;
reset;
fi;
fi;
vendor_boot=
setenv bootargs root=/dev/mmcblk${devnum}p2 ${bootargs_base};
if load mmc ${devnum}:${devpart} ${loadaddr} ${image_base}; then
run vendor_bootm;
fi;
vendor_bootm=
if test -n "${bootcfg}"; then
bootm ${loadaddr}#${bootcfg};
else
bootm ${loadaddr};
fi;
vendor_set_ab_bootargs=
if test $fallback_active = 0; then
echo Normal boot to active system;
if itest.b *${loadaddr} == 41; then
setenv active_part a;
else
setenv active_part b;
fi;
else
echo Fallback boot to inactive system;
if itest.w *${loadaddr} == 0x4242 || itest.w *${loadaddr} == 0x4241; then
setenv active_part b;
elif itest.w *${loadaddr} == 0x4141 || itest.w *${loadaddr} == 0x4142; then
setenv active_part a;
fi;
fi;
if test $active_part = a; then
setenv image ${image_base}_A;
setenv bootargs ubi.mtd=0 rootfstype=ubifs root=ubi0:root_A ${bootargs_base};
echo Using rootfs partition A: ubi0:root_A;
elif test $active_part = b; then
setenv image ${image_base}_B;
setenv bootargs ubi.mtd=0 rootfstype=ubifs root=ubi0:root_B ${bootargs_base};
echo Using rootfs partition B: ubi0:root_B;
fi;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment