diff options
18 files changed, 154 insertions, 83 deletions
diff --git a/conf/machine/aquila-am69-k3r5.conf b/conf/machine/aquila-am69-k3r5.conf new file mode 100644 index 0000000..1936224 --- /dev/null +++ b/conf/machine/aquila-am69-k3r5.conf @@ -0,0 +1,26 @@ +#@TYPE: Machine +#@NAME: Toradex Aquila AM69 (R5F) +#@DESCRIPTION: Machine configuration for Toradex Aquila AM69 SoM (R5F core) +#@MAINTAINER: Max Krummenacher <max.krummenacher@toradex.com> + +MACHINE_NAME = "Aquila-AM69" + +require conf/machine/include/k3r5.inc + +PREFERRED_PROVIDER_virtual/bootloader = "u-boot-toradex-ti" +PREFERRED_PROVIDER_u-boot = "u-boot-toradex-ti" +PREFERRED_PROVIDER_virtual/bootloader:upstream = "u-boot-toradex" +PREFERRED_PROVIDER_u-boot:upstream = "u-boot-toradex" +PREFERRED_VERSION_u-boot-toradex:upstream = "mainline" + +SYSFW_SOC = "am69" +SYSFW_CONFIG = "aquila" +SYSFW_SUFFIX = "hs-fs" + +UBOOT_DFU_CONFIG = "dfu-r5" +# The DFU config does not (yet) exist in upstream. It is needed only +# if booting from DFU/USB. +UBOOT_DFU_CONFIG:upstream = "" +UBOOT_CONFIG ??= "${UBOOT_DFU_CONFIG} sd-r5" +UBOOT_CONFIG[dfu-r5] = "aquila-am69_r5_usbdfu_defconfig,dfu,spl/u-boot-spl.bin" +UBOOT_CONFIG[sd-r5] = "aquila-am69_r5_defconfig,sdcard,spl/u-boot-spl.bin" diff --git a/conf/machine/aquila-am69.conf b/conf/machine/aquila-am69.conf new file mode 100644 index 0000000..9488870 --- /dev/null +++ b/conf/machine/aquila-am69.conf @@ -0,0 +1,79 @@ +#@TYPE: Machine +#@NAME: Toradex Aquila AM69 +#@DESCRIPTION: Machine configuration for Toradex Aquila AM69 SoM +#@MAINTAINER: Max Krummenacher <max.krummenacher@toradex.com> + +MACHINE_NAME = "Aquila-AM69" +MACHINE_FEATURES:remove = "efi" +MACHINE_FEATURES:append = " tpm2" + +require conf/machine/tdx-utilities.inc +require conf/machine/include/j784s4.inc + +TFA_K3_USART = "0x8" +OPTEE_K3_USART = "0x8" + +do_image[mcdepends] = "mc::k3r5:virtual/bootloader:do_deploy" + +# cope with our changed tiboot3 file names vs. the hardcoded TI AM69 SK-EVM ones +IMAGE_BOOT_FILES:remove = "\ + tiboot3-j784s4-gp-evm.bin \ + tiboot3-j784s4-hs-evm.bin \ + tiboot3-j784s4-hs-fs-evm.bin \ +" + +# Don't include kernels in standard images +RRECOMMENDS:${KERNEL_PACKAGE_NAME}-base = "" +# Install kernel modules by default +MACHINE_EXTRA_RRECOMMENDS:append:j784s4 = " kernel-modules" + +PREFERRED_PROVIDER_virtual/kernel = "linux-toradex-ti" +PREFERRED_PROVIDER_virtual/kernel:preempt-rt = "linux-toradex-ti" +PREFERRED_PROVIDER_virtual/dtb = "device-tree-overlays-ti" +PREFERRED_PROVIDER_virtual/bootloader = "u-boot-toradex-ti" +PREFERRED_PROVIDER_u-boot = "u-boot-toradex-ti" + +KERNEL_DTB_PREFIX = "ti/" +# TODO remove am69-sk dtb +KERNEL_DEVICETREE = " \ + ${KERNEL_DTB_PREFIX}k3-am69-aquila-dev.dtb \ + ${KERNEL_DTB_PREFIX}k3-am69-sk.dtb \ +" + +KERNEL_IMAGETYPE = "Image.gz" +KERNEL_IMAGETYPES = "fitImage Image Image.gz" + +# overlays applied by generated overlays.txt +TEZI_EXTERNAL_KERNEL_DEVICETREE_BOOT = "" + +UBOOT_CONFIG ??= "sd" +UBOOT_CONFIG[sd] = "aquila-am69_a72_defconfig,sdcard" +UBOOT_ENTRYPOINT = "0x80200000" +UBOOT_LOADADDRESS = "0x80200000" + +IMAGE_BOOT_FILES = " \ + boot.scr-${MACHINE};boot.scr \ + ${KERNEL_IMAGETYPE} \ + ${@make_dtb_boot_files(d)} \ +" + +# meta-ti-bsp/conf/machine/include/k3.inc +# With "sdimage-2part-efi.wks" my builds do not boot, no serial output at +# all +WKS_FILE:k3 = "sdimage-2part.wks" +WKS_FILE_DEPENDS:append = " u-boot-distro-boot" +WIC_CREATE_EXTRA_ARGS:append = " --no-fstab-update" + +IMAGE_CLASSES:append = " image_type_tezi" +IMAGE_FSTYPES:append = " teziimg" +# The payload offsets are given in number of 512 byte blocks. +# tiboot3.bin +OFFSET_BOOTROM_PAYLOAD = "0" +FIRMWARE_BINARY[0088] = "tiboot3-am69-hs-fs-aquila.bin" +# tispl.bin +OFFSET_FW_PAYLOAD = "2048" +# u-boot.img +OFFSET_SPL_PAYLOAD = "6144" +UBOOT_BINARY = "u-boot.img" + +TORADEX_PRODUCT_IDS = "0088" diff --git a/conf/machine/verdin-am62-k3r5.conf b/conf/machine/verdin-am62-k3r5.conf index 0c24a57..700968e 100644 --- a/conf/machine/verdin-am62-k3r5.conf +++ b/conf/machine/verdin-am62-k3r5.conf @@ -14,12 +14,12 @@ PREFERRED_PROVIDER_u-boot:upstream:use-head-next = "u-boot-toradex" SYSFW_SOC = "am62x" SYSFW_CONFIG = "verdin" -SYSFW_SUFFIX = "gp" +SYSFW_SUFFIX = "hs-fs" -UBOOT_DFU_CONFIG = "dfu-gp" +UBOOT_DFU_CONFIG = "dfu-r5" # The DFU config does not (yet) exist in upstream. It is needed only # if booting from DFU/USB. UBOOT_DFU_CONFIG:upstream = "" -UBOOT_CONFIG ??= "${UBOOT_DFU_CONFIG} sd-gp" -UBOOT_CONFIG[dfu-gp] = "verdin-am62_r5_usbdfu_defconfig,dfu,spl/u-boot-spl.bin" -UBOOT_CONFIG[sd-gp] = "verdin-am62_r5_defconfig,sdcard,spl/u-boot-spl.bin" +UBOOT_CONFIG ??= "${UBOOT_DFU_CONFIG} sd-r5" +UBOOT_CONFIG[dfu-r5] = "verdin-am62_r5_usbdfu_defconfig,dfu,spl/u-boot-spl.bin" +UBOOT_CONFIG[sd-r5] = "verdin-am62_r5_defconfig,sdcard,spl/u-boot-spl.bin" diff --git a/conf/machine/verdin-am62.conf b/conf/machine/verdin-am62.conf index 01a1e00..8ab607e 100644 --- a/conf/machine/verdin-am62.conf +++ b/conf/machine/verdin-am62.conf @@ -95,10 +95,3 @@ OFFSET_SPL_PAYLOAD = "5120" UBOOT_BINARY = "u-boot.img" TORADEX_PRODUCT_IDS = "0069 0071 0072 0073 0074 0075 0076" -TORADEX_PRODUCT_IDS[0069] = "k3-am625-verdin-wifi-dev.dtb" -TORADEX_PRODUCT_IDS[0071] = "k3-am625-verdin-nonwifi-dev.dtb" -TORADEX_PRODUCT_IDS[0072] = "k3-am625-verdin-wifi-dev.dtb" -TORADEX_PRODUCT_IDS[0073] = "k3-am625-verdin-nonwifi-dev.dtb" -TORADEX_PRODUCT_IDS[0074] = "k3-am625-verdin-nonwifi-dev.dtb" -TORADEX_PRODUCT_IDS[0075] = "k3-am625-verdin-wifi-dev.dtb" -TORADEX_PRODUCT_IDS[0076] = "k3-am625-verdin-wifi-dev.dtb" diff --git a/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend b/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend index 426640e..72bc506 100644 --- a/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend +++ b/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend @@ -1,13 +1,13 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" -# am62xx extra gles2 packageconfig flags -GLES_EXTRA_DEPS:am62xx = "libdrm wayland" -# rename from gles2 to gles2extra to preserve the original one for non am62xx machines +# TI k3 extra gles2 packageconfig flags +GLES_EXTRA_DEPS:k3 = "libdrm wayland" +# rename from gles2 to gles2extra to preserve the original one for non k3 machines PACKAGECONFIG[gles2extra] = "-opengl es2 -eglfs,,virtual/libgles2 virtual/egl ${GLES_EXTRA_DEPS}" -PR:append:am62xx = ".arago17" +PR:append:k3 = ".arago17" -QT_CONFIG_FLAGS:append:am62xx = " -qpa ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', 'eglfs', d)}" +QT_CONFIG_FLAGS:append:k3 = " -qpa ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', 'eglfs', d)}" QT_EGLFS_PATCHES = "\ file://0001-calculator-Add-exit-button-for-non-window-environmen.patch \ @@ -17,14 +17,14 @@ QT_EGLFS_PATCHES = "\ # file://0002-deform-disable-opengl-button.patch -SRC_URI:append:am62xx = "\ +SRC_URI:append:k3 = "\ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '', "${QT_EGLFS_PATCHES}", d)}\ file://0001-deform-Fix-how-controls-are-shown.patch \ file://0001-qtbase-plugins-platforms-eglfs_kms-fix-compiler-erro.patch \ file://0001-eglfs-Force-888-format-only-on-env-flag.patch \ " -python do_patch:append:am62xx () { +python do_patch:append:k3 () { import shutil work_dir = d.getVar("WORKDIR") @@ -35,30 +35,30 @@ python do_patch:append:am62xx () { } # Add symbolic link qt5/examples for backward compatibility -do_install:append:am62xx () { +do_install:append:k3 () { install -d ${D}${datadir}/qt5 ln -sf ../examples ${D}${datadir}/qt5/examples } -FILES:${PN}-examples:append:am62xx = " ${datadir}/qt5/*" +FILES:${PN}-examples:append:k3 = " ${datadir}/qt5/*" -RDEPENDS:${PN}:am62xx += "${PN}-conf" +RDEPENDS:${PN}:k3 += "${PN}-conf" -PACKAGE_ARCH:am62xx = "${MACHINE_ARCH}" +PACKAGE_ARCH:k3 = "${MACHINE_ARCH}" ############################### TDX added # from meta-arago/conf/layer.conf -PACKAGECONFIG_GL:am62xx = "gles2extra linuxfb" -PACKAGECONFIG_DISTRO:am62xx = "icu examples accessibility gif gbm kms libinput" -PACKAGECONFIG_FONTS:am62xx = "fontconfig" +PACKAGECONFIG_GL:k3 = "gles2extra linuxfb" +PACKAGECONFIG_DISTRO:k3 = "icu examples accessibility gif gbm kms libinput" +PACKAGECONFIG_FONTS:k3 = "fontconfig" -PACKAGECONFIG:remove:am62xx = "kms" -PACKAGECONFIG:remove:am62xx = "vulkan" -PACKAGECONFIG:remove:am62xx = "glib xcb" +PACKAGECONFIG:remove:k3 = "kms" +PACKAGECONFIG:remove:k3 = "vulkan" +PACKAGECONFIG:remove:k3 = "glib xcb" # they don't apply without changes, drop them for now SRC_URI:remove = " \ file://0002-deform-disable-opengl-button.patch \ diff --git a/qt5-layer/recipes-qt/qt5/qtwayland_%.bbappend b/qt5-layer/recipes-qt/qt5/qtwayland_%.bbappend index 7f3fa8f..1e5029c 100644 --- a/qt5-layer/recipes-qt/qt5/qtwayland_%.bbappend +++ b/qt5-layer/recipes-qt/qt5/qtwayland_%.bbappend @@ -1,2 +1,2 @@ -PACKAGECONFIG:remove:am62xx = "wayland-vulkan-server-buffer xcomposite-egl xcomposite-glx" -PACKAGE_ARCH:am62xx = "${MACHINE_ARCH}" +PACKAGECONFIG:remove:k3 = "wayland-vulkan-server-buffer xcomposite-egl xcomposite-glx" +PACKAGE_ARCH:k3 = "${MACHINE_ARCH}" diff --git a/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bbappend b/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bbappend deleted file mode 100644 index 8d00cce..0000000 --- a/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bbappend +++ /dev/null @@ -1,23 +0,0 @@ -# build the k3r5 tiboot also for DFU -EXTRA_OEMAKE_DFU = "\ - CROSS_COMPILE=${TARGET_PREFIX} SOC=${SYSFW_SOC} SOC_TYPE=${SYSFW_SUFFIX} \ - CONFIG=${SYSFW_CONFIG} SYSFW_DIR="${S}/ti-sysfw" \ - SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin-${UBOOT_DFU_CONFIG}" \ -" - -do_compile:prepend:k3r5 () { - if [ -e "${STAGING_DIR_HOST}/boot/u-boot-spl.bin-${UBOOT_DFU_CONFIG}" ]; then - cd ${WORKDIR}/imggen/ - make ${EXTRA_OEMAKE_DFU} $@ - if [ -f "${WORKDIR}/imggen/${SYSFW_TIBOOT3}" ]; then - mv "${WORKDIR}/imggen/${SYSFW_TIBOOT3}" "${WORKDIR}/imggen/${SYSFW_TIBOOT3}"-dfu - fi - make clean - fi -} - -do_deploy:append:k3r5 () { - if [ -f "${WORKDIR}/imggen/${SYSFW_TIBOOT3}-dfu" ]; then - install -m 644 ${WORKDIR}/imggen/${SYSFW_TIBOOT3}-dfu ${DEPLOYDIR}/ - fi -} diff --git a/recipes-bsp/u-boot/u-boot-toradex-ti_2023.04.bb b/recipes-bsp/u-boot/u-boot-toradex-ti_2023.04.bb index 5c50898..bb5a5c1 100644 --- a/recipes-bsp/u-boot/u-boot-toradex-ti_2023.04.bb +++ b/recipes-bsp/u-boot/u-boot-toradex-ti_2023.04.bb @@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://Licenses/README;md5=2ca5f2c35c8cc335f0a19756634782f1" SRC_URI = "git://git.toradex.com/u-boot-toradex.git;protocol=https;branch=${SRCBRANCH}" -SRCREV = "ca551722e0b5341282a2dd346ddd1897db47cb5b" +SRCREV = "896eec92715d7062963d92bedd7dc61d643df1ea" SRCREV:use-head-next = "${AUTOREV}" SRCBRANCH = "toradex_ti-u-boot-2023.04" @@ -23,28 +23,24 @@ UBOOT_INITIAL_ENV = "u-boot-initial-env" COMPATIBLE_MACHINE = "(ti-soc)" PACKAGE_ARCH = "${MACHINE_ARCH}" -# preserve and deploy u-boot-initial-env if building for the Cortex-A53 core -# even if u-boot-ti.inc do_deploy() tries to delete it. -DEPLOY_INITIAL_ENV = "install -D -m 644 ${B}/sd/u-boot-initial-env ${DEPLOYDIR}/ || true" -DEPLOY_INITIAL_ENV:k3r5 = ":" -do_deploy:append () { - ${DEPLOY_INITIAL_ENV} -} do_deploy:append:k3r5 () { + # remove any u-boot-initial-env* file not already removed by the + # u-boot-ti.inc + rm -f ${DEPLOYDIR}/u-boot-initial-env* + if [ -n "${UBOOT_CONFIG}" ] then for config in ${UBOOT_MACHINE}; do - if [ x${config} = "xverdin-am62_r5_usbdfu_defconfig" ] - then - TARGETSUFFIX="-dfu" - else - TARGETSUFFIX="" - fi i=$(expr $i + 1); for type in ${UBOOT_CONFIG}; do j=$(expr $j + 1); if [ $j -eq $i ] then + if [ "${type}" = "${UBOOT_DFU_CONFIG}" ]; then + TARGETSUFFIX="-dfu" + else + TARGETSUFFIX="" + fi for f in ${B}/${config}/tiboot3-*.bin; do if [ -f "$f" ]; then TARGET=$(basename $f)${TARGETSUFFIX} diff --git a/recipes-graphics/cairo/cairo_%.bbappend b/recipes-graphics/cairo/cairo_%.bbappend index 4adffc0..b19b00a 100644 --- a/recipes-graphics/cairo/cairo_%.bbappend +++ b/recipes-graphics/cairo/cairo_%.bbappend @@ -1 +1 @@ -PACKAGE_ARCH:am62xx = "${MACHINE_ARCH}" +PACKAGE_ARCH:k3 = "${MACHINE_ARCH}" diff --git a/recipes-graphics/libepoxy/libepoxy_1.5.%.bbappend b/recipes-graphics/libepoxy/libepoxy_1.5.%.bbappend index 755654b..bb9cb44 100644 --- a/recipes-graphics/libepoxy/libepoxy_1.5.%.bbappend +++ b/recipes-graphics/libepoxy/libepoxy_1.5.%.bbappend @@ -1,6 +1,6 @@ # Append EGL_CFLAGS to CFLAGS -CFLAGS:append:am62xx = " \ +CFLAGS:append:k3 = " \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_API_FB', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '-DWL_EGL_PLATFORM', '', d)} \ " -PACKAGE_ARCH:am62xx = "${MACHINE_ARCH}" +PACKAGE_ARCH:k3 = "${MACHINE_ARCH}" diff --git a/recipes-graphics/wayland/wayland-protocols_%.bbappend b/recipes-graphics/wayland/wayland-protocols_%.bbappend index ef635ca..a497bdb 100644 --- a/recipes-graphics/wayland/wayland-protocols_%.bbappend +++ b/recipes-graphics/wayland/wayland-protocols_%.bbappend @@ -1,13 +1,13 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -PR:append:am62xx = ".arago2" +PR:append:k3 = ".arago2" -SRC_URI:append:am62xx = " \ +SRC_URI:append:k3 = " \ file://0001-wayland-drm-Add-wayland-drm-protocol-to-stable.patch \ file://0002-wayland-drm-Update-to-version-2.patch \ " -do_install:append:am62xx () { +do_install:append:k3 () { install -d ${D}${datadir}/wayland-protocols/stable/wayland-drm cp ${S}/stable/wayland-drm/wayland-drm.xml ${D}${datadir}/wayland-protocols/stable/wayland-drm/ } diff --git a/recipes-graphics/wayland/weston-init.bbappend b/recipes-graphics/wayland/weston-init.bbappend index 05a45eb..a280e6e 100644 --- a/recipes-graphics/wayland/weston-init.bbappend +++ b/recipes-graphics/wayland/weston-init.bbappend @@ -1,20 +1,20 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -PR:append:am62xx = ".arago12" +PR:append:k3 = ".arago12" -PACKAGECONFIG:append:am62xx:tdx = " \ +PACKAGECONFIG:append:k3:tdx = " \ no-idle-timeout \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland','', d)} \ " PACKAGECONFIG[xwayland] = ",," -SRC_URI:append:am62xx = " \ +SRC_URI:append:k3 = " \ file://runWeston \ file://wayland_env.sh \ file://weston.ini \ " -do_install:append:am62xx () { +do_install:append:k3 () { install -d ${D}${bindir} install -m 755 ${WORKDIR}/runWeston ${D}${bindir} @@ -27,4 +27,4 @@ do_install:append:am62xx () { fi } -FILES:${PN}:append:am62xx = "${sysconfdir}/profile.d/* ${sysconfdir}/weston.ini" +FILES:${PN}:append:k3 = "${sysconfdir}/profile.d/* ${sysconfdir}/weston.ini" diff --git a/recipes-graphics/wayland/weston-init/am62xx/init b/recipes-graphics/wayland/weston-init/k3/init index fa3f037..fa3f037 100644 --- a/recipes-graphics/wayland/weston-init/am62xx/init +++ b/recipes-graphics/wayland/weston-init/k3/init diff --git a/recipes-graphics/wayland/weston-init/am62xx/runWeston b/recipes-graphics/wayland/weston-init/k3/runWeston index 2751352..2751352 100644 --- a/recipes-graphics/wayland/weston-init/am62xx/runWeston +++ b/recipes-graphics/wayland/weston-init/k3/runWeston diff --git a/recipes-graphics/wayland/weston-init/am62xx/wayland_env.sh b/recipes-graphics/wayland/weston-init/k3/wayland_env.sh index 50979b3..50979b3 100644 --- a/recipes-graphics/wayland/weston-init/am62xx/wayland_env.sh +++ b/recipes-graphics/wayland/weston-init/k3/wayland_env.sh diff --git a/recipes-graphics/wayland/weston-init/am62xx/weston.ini b/recipes-graphics/wayland/weston-init/k3/weston.ini index 1b52125..1b52125 100644 --- a/recipes-graphics/wayland/weston-init/am62xx/weston.ini +++ b/recipes-graphics/wayland/weston-init/k3/weston.ini diff --git a/recipes-graphics/xwayland/xwayland_%.bbappend b/recipes-graphics/xwayland/xwayland_%.bbappend index 137b263..5e05c0a 100644 --- a/recipes-graphics/xwayland/xwayland_%.bbappend +++ b/recipes-graphics/xwayland/xwayland_%.bbappend @@ -1,2 +1,2 @@ -PACKAGECONFIG:remove:am62xx = "glamor glx" -PACKAGE_ARCH:am62xx = "${MACHINE_ARCH}" +PACKAGECONFIG:remove:k3 = "glamor glx" +PACKAGE_ARCH:k3 = "${MACHINE_ARCH}" diff --git a/recipes-kernel/linux/linux-toradex-ti_6.1.bb b/recipes-kernel/linux/linux-toradex-ti_6.1.bb index 6554602..a647953 100644 --- a/recipes-kernel/linux/linux-toradex-ti_6.1.bb +++ b/recipes-kernel/linux/linux-toradex-ti_6.1.bb @@ -20,13 +20,13 @@ KERNEL_VERSION_SANITY_SKIP = "1" SCMVERSION ?= "y" SRCBRANCH = "toradex_ti-linux-6.1.y" -SRCREV_machine = "0d9f1748ac170ee6cfcce8f99fb65a9f157a9f29" +SRCREV_machine = "603f75dc931d81221f3d70f2a2fa08739add00d5" SRCREV_machine:use-head-next = "${AUTOREV}" PV = "${LINUX_VERSION}+git${SRCPV}" DEPENDS += "bc-native" -COMPATIBLE_MACHINE = "am62xx" +COMPATIBLE_MACHINE = "k3" export DTC_FLAGS = "-@" |