am64xx: Add combined boot build support
PATCH 1/1 am64xx: Add combined boot build support
Add combined boot flow support for the AM64XX device.
From: Dan Murphy <[email protected]>
--- conf/machine/am64xx-evm-k3r5.conf | 4 +++- conf/machine/am64xx-evm.conf | 4 ++++ recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb | 16 ++++++++++++++++ recipes-bsp/u-boot/u-boot-ti.inc | 6 ++++++ 4 files changed, 29 insertions(+), 1 deletion(-)
conf/machine/am64xx-evm-k3r5.conf +3 -1
@@ -7,6 +7,8 @@ require conf/machine/include/k3r5.inc SYSFW_SOC = "am64x" SYSFW_CONFIG = "evm" SYSFW_SUFFIX = "gp" -SYSFW_SYMLINK = "sysfw.itb" UBOOT_MACHINE = "am64x_evm_r5_defconfig" +UBOOT_BINARY = "tiboot3.${UBOOT_SUFFIX}" +UBOOT_IMAGE = "tiboot3-${MAINMACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}" +UBOOT_SYMLINK = "tiboot3-${MAINMACHINE}.${UBOOT_SUFFIX}"
conf/machine/am64xx-evm.conf +4 -0
@@ -4,4 +4,8 @@ require conf/machine/include/am64xx.inc +IMAGE_BOOT_FILES = "tispl.bin u-boot.img" + UBOOT_MACHINE = "am64x_evm_a53_defconfig" +do_image_wic[mcdepends] = "mc::k3r5:ti-sci-fw:do_deploy" +do_image_tar[mcdepends] = "mc::k3r5:ti-sci-fw:do_deploy"
recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb +16 -0
@@ -2,6 +2,7 @@ require recipes-bsp/ti-sci-fw/ti-sci-fw.inc DEPENDS = "openssl-native u-boot-mkimage-native dtc-native" DEPENDS_append_j7200-evm-k3r5 = " virtual/bootloader" +DEPENDS_append_am64xx-evm-k3r5 = " virtual/bootloader" CLEANBROKEN = "1" PR = "r1"
@@ -52,6 +53,7 @@ EXTRA_OEMAKE_HS = " \ EXTRA_OEMAKE_append = "${@['',' ${EXTRA_OEMAKE_HS}']['${SYSFW_SUFFIX}' == 'hs']}" EXTRA_OEMAKE_append_j7200-evm-k3r5 = " SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin"" +EXTRA_OEMAKE_append_am64xx-evm-k3r5 = " SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin"" do_compile() { cd ${WORKDIR}/imggen/
@@ -98,4 +100,18 @@ do_deploy_j7200-evm-k3r5() { ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY} } +do_install_am64xx-evm-k3r5() { + install -d ${D}/boot + install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE} + ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_SYMLINK} + ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY} +} + +do_deploy_am64xx-evm-k3r5() { + install -d ${DEPLOYDIR} + install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE} + ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_SYMLINK} + ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY} +} + addtask deploy before do_build after do_compile
recipes-bsp/u-boot/u-boot-ti.inc +6 -0
@@ -41,6 +41,7 @@ PACKAGECONFIG[dm] = "DM=${STAGING_DIR_HOST}${nonarch_base_libdir}/firmware/pdk-i PACKAGECONFIG_append_aarch64 = " atf optee" PACKAGECONFIG_append_j7 = " dm" +PACKAGECONFIG_append_am64xx = " dm" COMPATIBLE_MACHINE = "(ti-soc)"
@@ -65,6 +66,7 @@ SPL_UART_BINARY_keystone = "" SPL_UART_BINARY_k3r5 = "" SPL_UART_BINARY_lego-ev3 = "" SPL_UART_BINARY_j7200-evm-k3r5 = "u-boot-spl.bin" +SPL_UART_BINARY_am64xx-evm-k3r5 = "u-boot-spl.bin" SPL_UART_IMAGE ?= "${SPL_UART_BINARY}-${MACHINE}-${PV}-${PR}" SPL_UART_SYMLINK ?= "${SPL_UART_BINARY}-${MACHINE}"
@@ -395,4 +397,8 @@ do_deploy_append_j7200-evm-k3r5 () { mv ${DEPLOYDIR}/u-boot-spl.bin ${DEPLOYDIR}/u-boot-spl-r5spl.bin || true } +do_deploy_append_am64xx-evm-k3r5 () { + mv ${DEPLOYDIR}/tiboot3.bin ${DEPLOYDIR}/tiboot3-r5spl.bin || true + mv ${DEPLOYDIR}/u-boot-spl.bin ${DEPLOYDIR}/u-boot-spl-r5spl.bin || true +} TOOLCHAIN = "gcc"
Signature · 1 line
2.29.2
Hi Dan,
Quoted 30 lines · Dan Murphy via lists.yoctoproject.org
Add combined boot flow support for the AM64XX device.
From: Dan Murphy <[email protected]>
Signed-off-by Dan Murphy <[email protected]>--- conf/machine/am64xx-evm-k3r5.conf | 4 +++- conf/machine/am64xx-evm.conf | 4 ++++ recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb | 16 ++++++++++++++++ recipes-bsp/u-boot/u-boot-ti.inc | 6 ++++++ 4 files changed, 29 insertions(+), 1 deletion(-)conf/machine/am64xx-evm-k3r5.conf +3
-1@@ -7,6 +7,8 @@ require conf/machine/include/k3r5.inc SYSFW_SOC = "am64x" SYSFW_CONFIG = "evm" SYSFW_SUFFIX = "gp" -SYSFW_SYMLINK = "sysfw.itb" UBOOT_MACHINE = "am64x_evm_r5_defconfig" +UBOOT_BINARY = "tiboot3.${UBOOT_SUFFIX}" +UBOOT_IMAGE = "tiboot3-${MAINMACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}" +UBOOT_SYMLINK = "tiboot3-${MAINMACHINE}.${UBOOT_SUFFIX}"conf/machine/am64xx-evm.conf +0
-0
conf/machine/am64xx-evm.conf line 11
Quoted 8 lines
conf/machine/am64xx-evm.conf +4
-0@@ -4,4 +4,8 @@ require conf/machine/include/am64xx.inc +IMAGE_BOOT_FILES = "tispl.bin u-boot.img" + UBOOT_MACHINE = "am64x_evm_a53_defconfig" +do_image_wic[mcdepends] = "mc::k3r5:ti-sci-fw:do_deploy" +do_image_tar[mcdepends] = "mc::k3r5:ti-sci-fw:do_deploy"
I see J7200 has two additional lines w.r.t trusted-firmware-a:do_deploy, do we not need those lines for AM64xx or are they in error even on J7200?
Quoted 44 lines
recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb +16
-0@@ -2,6 +2,7 @@ require recipes-bsp/ti-sci-fw/ti-sci-fw.inc DEPENDS = "openssl-native u-boot-mkimage-native dtc-native" DEPENDS_append_j7200-evm-k3r5 = " virtual/bootloader" +DEPENDS_append_am64xx-evm-k3r5 = " virtual/bootloader" CLEANBROKEN = "1" PR = "r1"@@ -52,6 +53,7 @@ EXTRA_OEMAKE_HS = " \ EXTRA_OEMAKE_append = "${@['',' ${EXTRA_OEMAKE_HS}']['${SYSFW_SUFFIX}' == 'hs']}" EXTRA_OEMAKE_append_j7200-evm-k3r5 = " SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin"" +EXTRA_OEMAKE_append_am64xx-evm-k3r5 = " SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin"" do_compile() { cd ${WORKDIR}/imggen/@@ -98,4 +100,18 @@ do_deploy_j7200-evm-k3r5() { ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY} } +do_install_am64xx-evm-k3r5() { + install -d ${D}/boot + install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE} + ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_SYMLINK} + ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY} +} + +do_deploy_am64xx-evm-k3r5() { + install -d ${DEPLOYDIR} + install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE} + ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_SYMLINK} + ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY} +} + addtask deploy before do_build after do_compilerecipes-bsp/u-boot/u-boot-ti.inc +0
-0
recipes-bsp/u-boot/u-boot-ti.inc PACKAGECONFIG[dm] = "DM=${STAGING_DIR_HOST}${nonarch_base_libdir}/firmware/pdk-i · line 44
Quoted 4 lines
recipes-bsp/u-boot/u-boot-ti.inc +1
-0@@ -41,6 +41,7 @@ PACKAGECONFIG[dm] = "DM=${STAGING_DIR_HOST}${nonarch_base_libdir}/firmware/pdk-i PACKAGECONFIG_append_aarch64 = " atf optee" PACKAGECONFIG_append_j7 = " dm" +PACKAGECONFIG_append_am64xx = " dm"
This looks wrong, AM64xx doesn't have Split SYSFW architecture, and there is no DM firmware.
Quoted 12 lines
recipes-bsp/u-boot/u-boot-ti.inc +1
-0COMPATIBLE_MACHINE = "(ti-soc)"@@ -65,6 +66,7 @@ SPL_UART_BINARY_keystone = "" SPL_UART_BINARY_k3r5 = "" SPL_UART_BINARY_lego-ev3 = "" SPL_UART_BINARY_j7200-evm-k3r5 = "u-boot-spl.bin" +SPL_UART_BINARY_am64xx-evm-k3r5 = "u-boot-spl.bin" SPL_UART_IMAGE ?= "${SPL_UART_BINARY}-${MACHINE}-${PV}-${PR}" SPL_UART_SYMLINK ?= "${SPL_UART_BINARY}-${MACHINE}"
recipes-bsp/u-boot/u-boot-ti.inc do_deploy_append_j7200-evm-k3r5 () { · line 403
Quoted 7 lines
recipes-bsp/u-boot/u-boot-ti.inc +4
-0@@ -395,4 +397,8 @@ do_deploy_append_j7200-evm-k3r5 () { mv ${DEPLOYDIR}/u-boot-spl.bin ${DEPLOYDIR}/u-boot-spl-r5spl.bin || true } +do_deploy_append_am64xx-evm-k3r5 () { + mv ${DEPLOYDIR}/tiboot3.bin ${DEPLOYDIR}/tiboot3-r5spl.bin || true + mv ${DEPLOYDIR}/u-boot-spl.bin ${DEPLOYDIR}/u-boot-spl-r5spl.bin || true +}
nit, please add a blank line after this blob.
regards
Suman
Quoted 6 lines
recipes-bsp/u-boot/u-boot-ti.inc +0
-0TOOLCHAIN = "gcc"
Suman
Quoted 36 lines · Suman Anna
Hi Dan,
Quoted 33 lines · Dan Murphy via lists.yoctoproject.org
Add combined boot flow support for the AM64XX device.
From: Dan Murphy <[email protected]>
Signed-off-by Dan Murphy <[email protected]>--- conf/machine/am64xx-evm-k3r5.conf | 4 +++- conf/machine/am64xx-evm.conf | 4 ++++ recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb | 16 ++++++++++++++++ recipes-bsp/u-boot/u-boot-ti.inc | 6 ++++++ 4 files changed, 29 insertions(+), 1 deletion(-)conf/machine/am64xx-evm-k3r5.conf +3
-1@@ -7,6 +7,8 @@ require conf/machine/include/k3r5.inc SYSFW_SOC = "am64x" SYSFW_CONFIG = "evm" SYSFW_SUFFIX = "gp" -SYSFW_SYMLINK = "sysfw.itb" UBOOT_MACHINE = "am64x_evm_r5_defconfig" +UBOOT_BINARY = "tiboot3.${UBOOT_SUFFIX}" +UBOOT_IMAGE = "tiboot3-${MAINMACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}" +UBOOT_SYMLINK = "tiboot3-${MAINMACHINE}.${UBOOT_SUFFIX}"conf/machine/am64xx-evm.conf +0
-0@@ -4,4 +4,8 @@ require conf/machine/include/am64xx.inc
Quoted 7 lines
conf/machine/am64xx-evm.conf line 11
Quoted 5 lines
conf/machine/am64xx-evm.conf +4
-0+IMAGE_BOOT_FILES = "tispl.bin u-boot.img" + UBOOT_MACHINE = "am64x_evm_a53_defconfig" +do_image_wic[mcdepends] = "mc::k3r5:ti-sci-fw:do_deploy" +do_image_tar[mcdepends] = "mc::k3r5:ti-sci-fw:do_deploy"I see J7200 has two additional lines w.r.t trusted-firmware-a:do_deploy, do we not need those lines for AM64xx or are they in error even on J7200?
Do we need the ATF in the WIC and tar?
If so then yes we probably need to add those 2 lines as well
Quoted 45 lines
Quoted 45 lines
recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb +16
-0@@ -2,6 +2,7 @@ require recipes-bsp/ti-sci-fw/ti-sci-fw.inc DEPENDS = "openssl-native u-boot-mkimage-native dtc-native" DEPENDS_append_j7200-evm-k3r5 = " virtual/bootloader" +DEPENDS_append_am64xx-evm-k3r5 = " virtual/bootloader" CLEANBROKEN = "1" PR = "r1"@@ -52,6 +53,7 @@ EXTRA_OEMAKE_HS = " \ EXTRA_OEMAKE_append = "${@['',' ${EXTRA_OEMAKE_HS}']['${SYSFW_SUFFIX}' == 'hs']}" EXTRA_OEMAKE_append_j7200-evm-k3r5 = " SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin"" +EXTRA_OEMAKE_append_am64xx-evm-k3r5 = " SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin"" do_compile() { cd ${WORKDIR}/imggen/@@ -98,4 +100,18 @@ do_deploy_j7200-evm-k3r5() { ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY} } +do_install_am64xx-evm-k3r5() { + install -d ${D}/boot + install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE} + ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_SYMLINK} + ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY} +} + +do_deploy_am64xx-evm-k3r5() { + install -d ${DEPLOYDIR} + install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE} + ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_SYMLINK} + ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY} +} + addtask deploy before do_build after do_compilerecipes-bsp/u-boot/u-boot-ti.inc +0
-0@@ -41,6 +41,7 @@ PACKAGECONFIG[dm] = "DM=${STAGING_DIR_HOST}${nonarch_base_libdir}/firmware/pdk-i
Quoted 5 lines
recipes-bsp/u-boot/u-boot-ti.inc PACKAGECONFIG[dm] = "DM=${STAGING_DIR_HOST}${nonarch_base_libdir}/firmware/pdk-i · line 44
Quoted 3 lines
recipes-bsp/u-boot/u-boot-ti.inc +1
-0PACKAGECONFIG_append_aarch64 = " atf optee" PACKAGECONFIG_append_j7 = " dm" +PACKAGECONFIG_append_am64xx = " dm"This looks wrong, AM64xx doesn't have Split SYSFW architecture, and there is no DM firmware.
OK I will remove this
Quoted 15 lines
Quoted 15 lines
recipes-bsp/u-boot/u-boot-ti.inc +1
-0COMPATIBLE_MACHINE = "(ti-soc)"@@ -65,6 +66,7 @@ SPL_UART_BINARY_keystone = "" SPL_UART_BINARY_k3r5 = "" SPL_UART_BINARY_lego-ev3 = "" SPL_UART_BINARY_j7200-evm-k3r5 = "u-boot-spl.bin" +SPL_UART_BINARY_am64xx-evm-k3r5 = "u-boot-spl.bin" SPL_UART_IMAGE ?= "${SPL_UART_BINARY}-${MACHINE}-${PV}-${PR}" SPL_UART_SYMLINK ?= "${SPL_UART_BINARY}-${MACHINE}"@@ -395,4 +397,8 @@ do_deploy_append_j7200-evm-k3r5 () { mv ${DEPLOYDIR}/u-boot-spl.bin ${DEPLOYDIR}/u-boot-spl-r5spl.bin || true }
Quoted 5 lines
recipes-bsp/u-boot/u-boot-ti.inc do_deploy_append_j7200-evm-k3r5 () { · line 403
Quoted 4 lines
recipes-bsp/u-boot/u-boot-ti.inc +4
-0+do_deploy_append_am64xx-evm-k3r5 () { + mv ${DEPLOYDIR}/tiboot3.bin ${DEPLOYDIR}/tiboot3-r5spl.bin || true + mv ${DEPLOYDIR}/u-boot-spl.bin ${DEPLOYDIR}/u-boot-spl-r5spl.bin || true +}nit, please add a blank line after this blob.
Meh but OK
Dan