diff options
author | Mark Hatle <mark.hatle@amd.com> | 2023-01-10 09:28:30 -0800 |
---|---|---|
committer | Mark Hatle <mark.hatle@amd.com> | 2023-04-10 09:03:22 -0700 |
commit | 12fb5052aab5e352299c044f367b7f47af84ff84 (patch) | |
tree | dd5c8e9a175726b903703c0dda49edbe3048cc81 /meta-xilinx-core | |
parent | 34e7fcb94226e430dea3d00d5e262084b06fa113 (diff) | |
download | meta-xilinx-12fb5052aab5e352299c044f367b7f47af84ff84.tar.gz |
u-boot-xlnx: Add u-boot-tools-xlnx
Update the PREFERRED VERSION to select the new u-boot version, add preferred
provider for u-boot-tools to be u-boot-tools-xlnx.
Split the microblaze configs to support older and newer versions as well.
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Diffstat (limited to 'meta-xilinx-core')
14 files changed, 123 insertions, 55 deletions
diff --git a/meta-xilinx-core/conf/layer.conf b/meta-xilinx-core/conf/layer.conf index 616530d9..2da26edd 100644 --- a/meta-xilinx-core/conf/layer.conf +++ b/meta-xilinx-core/conf/layer.conf | |||
@@ -63,6 +63,7 @@ XILINX_UBOOT_VERSION[v2022.1] = "v2021.01-xilinx-v2022.1%" | |||
63 | XILINX_UBOOT_VERSION[v2022.2] = "v2021.01-xilinx-v2022.2%" | 63 | XILINX_UBOOT_VERSION[v2022.2] = "v2021.01-xilinx-v2022.2%" |
64 | 64 | ||
65 | PREFERRED_VERSION_u-boot-xlnx ?= "${@d.getVarFlag('XILINX_UBOOT_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | 65 | PREFERRED_VERSION_u-boot-xlnx ?= "${@d.getVarFlag('XILINX_UBOOT_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" |
66 | PREFERRED_VERSION_u-boot-tools-xlnx ?= "${@d.getVarFlag('XILINX_UBOOT_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | ||
66 | 67 | ||
67 | XILINX_LINUX_VERSION[v2022.1] = "5.15.19-xilinx-v2022.1%" | 68 | XILINX_LINUX_VERSION[v2022.1] = "5.15.19-xilinx-v2022.1%" |
68 | XILINX_LINUX_VERSION[v2022.2] = "5.15.36-xilinx-v2022.2%" | 69 | XILINX_LINUX_VERSION[v2022.2] = "5.15.36-xilinx-v2022.2%" |
diff --git a/meta-xilinx-core/conf/machine/include/machine-xilinx-default.inc b/meta-xilinx-core/conf/machine/include/machine-xilinx-default.inc index dc6ab05c..0cbd4249 100644 --- a/meta-xilinx-core/conf/machine/include/machine-xilinx-default.inc +++ b/meta-xilinx-core/conf/machine/include/machine-xilinx-default.inc | |||
@@ -16,6 +16,9 @@ PREFERRED_PROVIDER_virtual/kernel ??= "linux-xlnx" | |||
16 | # U-Boot Configuration | 16 | # U-Boot Configuration |
17 | PREFERRED_PROVIDER_virtual/bootloader ??= "u-boot-xlnx" | 17 | PREFERRED_PROVIDER_virtual/bootloader ??= "u-boot-xlnx" |
18 | PREFERRED_PROVIDER_virtual/boot-bin ??= "xilinx-bootbin" | 18 | PREFERRED_PROVIDER_virtual/boot-bin ??= "xilinx-bootbin" |
19 | PREFERRED_PROVIDER_u-boot-tools ??= "u-boot-tools-xlnx" | ||
20 | PREFERRED_PROVIDER_u-boot-tools-native ??= "u-boot-tools-xlnx-native" | ||
21 | PREFERRED_PROVIDER_nativesdk-u-boot-tools ??= "nativesdk-u-boot-tools-xlnx" | ||
19 | 22 | ||
20 | do_image_wic[depends] += "${@' '.join('%s:do_deploy' % r for r in (d.getVar('WIC_DEPENDS') or "").split())}" | 23 | do_image_wic[depends] += "${@' '.join('%s:do_deploy' % r for r in (d.getVar('WIC_DEPENDS') or "").split())}" |
21 | 24 | ||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools%.bbappend b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools%.bbappend new file mode 100644 index 00000000..65b6ad9d --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools%.bbappend | |||
@@ -0,0 +1,23 @@ | |||
1 | # Skip processing of this recipe if it is not explicitly specified as the | ||
2 | # PREFERRED_PROVIDER for libmetal. This avoids network access required by | ||
3 | # the use of AUTOREV SRCREVs, which may be the default for some recipes. | ||
4 | python () { | ||
5 | if bb.data.inherits_class('native', d): | ||
6 | if (not d.getVar("PREFERRED_PROVIDER_u-boot-tools-native") and "u-boot-tools-native" != d.getVar("PN")) or \ | ||
7 | (d.getVar("PREFERRED_PROVIDER_u-boot-tools-native") and d.getVar("PREFERRED_PROVIDER_u-boot-tools-native") != d.getVar("PN")): | ||
8 | d.delVar("BB_DONT_CACHE") | ||
9 | raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_u-boot-tools-native to %s to enable it" % (d.getVar("PN"))) | ||
10 | |||
11 | elif bb.data.inherits_class('nativesdk', d): | ||
12 | if (not d.getVar("PREFERRED_PROVIDER_nativesdk-u-boot-tools") and "nativesdk-u-boot-tools" != d.getVar("PN")) or \ | ||
13 | (d.getVar("PREFERRED_PROVIDER_nativesdk-u-boot-tools") and d.getVar("PREFERRED_PROVIDER_nativesdk-u-boot-tools") != d.getVar("PN")): | ||
14 | d.delVar("BB_DONT_CACHE") | ||
15 | raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_nativesdk-u-boot-tools to %s to enable it" % (d.getVar("PN"))) | ||
16 | |||
17 | else: | ||
18 | if (not d.getVar("PREFERRED_PROVIDER_u-boot-tools") and "u-boot-tools" != d.getVar("PN")) or \ | ||
19 | (d.getVar("PREFERRED_PROVIDER_u-boot-tools") and d.getVar("PREFERRED_PROVIDER_u-boot-tools") != d.getVar("PN")): | ||
20 | d.delVar("BB_DONT_CACHE") | ||
21 | raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_u-boot-tools to %s to enable it" % (d.getVar("PN"))) | ||
22 | } | ||
23 | |||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx.inc b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx.inc new file mode 100644 index 00000000..af26594c --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx.inc | |||
@@ -0,0 +1,7 @@ | |||
1 | require recipes-bsp/u-boot/u-boot-common.inc | ||
2 | require recipes-bsp/u-boot/u-boot-tools.inc | ||
3 | |||
4 | require u-boot-xlnx-common.inc | ||
5 | |||
6 | PROVIDES:append = " u-boot-tools" | ||
7 | RPROVIDES:${PN}:append = " u-boot-tools" | ||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2022.1.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2022.1.bb new file mode 100644 index 00000000..eaf8d4ce --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2022.1.bb | |||
@@ -0,0 +1,21 @@ | |||
1 | require u-boot-tools-xlnx.inc | ||
2 | require u-boot-xlnx-2022.1.inc | ||
3 | |||
4 | # MUST clear CONFIG_VIDEO to avoid a compilation failure trying to construct | ||
5 | # bmp_logo.h | ||
6 | SED_CONFIG_EFI:append = ' -e "s/CONFIG_VIDEO=.*/# CONFIG_VIDEO is not set/"' | ||
7 | |||
8 | # Default do_compile fails with: | ||
9 | # | error: object directory ../downloads/git2/github.com.Xilinx.u-boot-xlnx.git/objects does not exist; check .git/objects/info/alternates. | ||
10 | # The regular workaround of calling 'git diff' seems to be problematic. | ||
11 | do_compile () { | ||
12 | oe_runmake -C ${S} tools-only_defconfig O=${B} | ||
13 | |||
14 | # Disable CONFIG_CMD_LICENSE, license.h is not used by tools and | ||
15 | # generating it requires bin2header tool, which for target build | ||
16 | # is built with target tools and thus cannot be executed on host. | ||
17 | sed -i -e "s/CONFIG_CMD_LICENSE=.*/# CONFIG_CMD_LICENSE is not set/" ${SED_CONFIG_EFI} ${B}/.config | ||
18 | |||
19 | oe_runmake -C ${S} cross_tools NO_SDL=1 O=${B} | ||
20 | } | ||
21 | |||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2022.2.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2022.2.bb new file mode 100644 index 00000000..e4a2403a --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2022.2.bb | |||
@@ -0,0 +1,6 @@ | |||
1 | require u-boot-tools-xlnx.inc | ||
2 | require u-boot-xlnx-2022.2.inc | ||
3 | |||
4 | # MUST clear CONFIG_VIDEO to avoid a compilation failure trying to construct | ||
5 | # bmp_logo.h | ||
6 | SED_CONFIG_EFI:append = ' -e "s/CONFIG_VIDEO=.*/# CONFIG_VIDEO is not set/"' | ||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot/microblaze-generic-top.h b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-v2021.01/microblaze-generic-top.h index 08c1c16c..08c1c16c 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot/microblaze-generic-top.h +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-v2021.01/microblaze-generic-top.h | |||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot/microblaze-generic.cfg b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-v2021.01/microblaze-generic.cfg index 0f784f73..0f784f73 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot/microblaze-generic.cfg +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-v2021.01/microblaze-generic.cfg | |||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2022.1.inc b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2022.1.inc new file mode 100644 index 00000000..a0c0b50d --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2022.1.inc | |||
@@ -0,0 +1,17 @@ | |||
1 | UBOOT_VERSION = "v2021.01" | ||
2 | |||
3 | UBRANCH ?= "xlnx_rebase_v2022.01_2022.1_update" | ||
4 | |||
5 | SRCREV = "91ad7924e7f59584d597353e1bb86794341e0a7e" | ||
6 | |||
7 | LICENSE = "GPL-2.0-or-later" | ||
8 | LIC_FILES_CHKSUM = "file://README;beginline=1;endline=4;md5=744e7e3bb0c94b4b9f6b3db3bf893897" | ||
9 | |||
10 | # u-boot-xlnx has support for these | ||
11 | HAS_PLATFORM_INIT ?= " \ | ||
12 | xilinx_zynqmp_virt_config \ | ||
13 | xilinx_zynq_virt_defconfig \ | ||
14 | xilinx_versal_vc_p_a2197_revA_x_prc_01_revA \ | ||
15 | " | ||
16 | |||
17 | DEPENDS += "bc-native dtc-native python3-setuptools-native gnutls-native" | ||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2022.2.inc b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2022.2.inc new file mode 100644 index 00000000..6415861d --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2022.2.inc | |||
@@ -0,0 +1,17 @@ | |||
1 | UBOOT_VERSION = "v2021.01" | ||
2 | |||
3 | UBRANCH ?= "xlnx_rebase_v2022.01" | ||
4 | |||
5 | SRCREV = "b31476685debf5512ed0d4e8000fa5167a22f530" | ||
6 | |||
7 | LICENSE = "GPL-2.0-or-later" | ||
8 | LIC_FILES_CHKSUM = "file://README;beginline=1;endline=4;md5=744e7e3bb0c94b4b9f6b3db3bf893897" | ||
9 | |||
10 | # u-boot-xlnx has support for these | ||
11 | HAS_PLATFORM_INIT ?= " \ | ||
12 | xilinx_zynqmp_virt_config \ | ||
13 | xilinx_zynq_virt_defconfig \ | ||
14 | xilinx_versal_vc_p_a2197_revA_x_prc_01_revA \ | ||
15 | " | ||
16 | |||
17 | DEPENDS += "bc-native dtc-native python3-setuptools-native gnutls-native" | ||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-common.inc b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-common.inc new file mode 100644 index 00000000..b447c92a --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-common.inc | |||
@@ -0,0 +1,19 @@ | |||
1 | # Use the name of the .bb for the extension | ||
2 | UBOOT_VERSION_EXTENSION ?= "-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}" | ||
3 | PV = "${UBOOT_VERSION}${UBOOT_VERSION_EXTENSION}+git${SRCPV}" | ||
4 | |||
5 | UBOOTURI ?= "git://github.com/Xilinx/u-boot-xlnx.git;protocol=https" | ||
6 | UBRANCH ?= "" | ||
7 | UBRANCHARG = "${@['nobranch=1', 'branch=${UBRANCH}'][d.getVar('UBRANCH', True) != '']}" | ||
8 | |||
9 | SRC_URI = "${UBOOTURI};${UBRANCHARG}" | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | B = "${WORKDIR}/build" | ||
13 | |||
14 | FILESEXTRAPATHS:prepend := "${THISDIR}/u-boot-${UBOOT_VERSION}:" | ||
15 | |||
16 | UBOOT_MB_INC = "" | ||
17 | UBOOT_MB_INC:microblaze = "u-boot-xlnx-microblaze.inc" | ||
18 | require ${UBOOT_MB_INC} | ||
19 | |||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx.inc b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx.inc index 183ebe31..38d8e492 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx.inc +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx.inc | |||
@@ -1,25 +1,9 @@ | |||
1 | require recipes-bsp/u-boot/u-boot-common.inc | ||
1 | require recipes-bsp/u-boot/u-boot.inc | 2 | require recipes-bsp/u-boot/u-boot.inc |
2 | 3 | ||
3 | DEPENDS += "bc-native dtc-native bison-native xxd-native" | 4 | DEPENDS += "bc-native dtc-native python3-setuptools-native bison-native xxd-native" |
4 | 5 | ||
5 | # Use the name of the .bb for the extension | 6 | require u-boot-xlnx-common.inc |
6 | UBOOT_VERSION_EXTENSION ?= "-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}" | ||
7 | PV = "${UBOOT_VERSION}${UBOOT_VERSION_EXTENSION}+git${SRCPV}" | ||
8 | |||
9 | UBOOTURI ?= "git://github.com/Xilinx/u-boot-xlnx.git;protocol=https" | ||
10 | UBRANCH ?= "" | ||
11 | UBRANCHARG = "${@['nobranch=1', 'branch=${UBRANCH}'][d.getVar('UBRANCH', True) != '']}" | ||
12 | |||
13 | SRC_URI = "${UBOOTURI};${UBRANCHARG}" | ||
14 | |||
15 | S = "${WORKDIR}/git" | ||
16 | B = "${WORKDIR}/build" | ||
17 | |||
18 | FILESEXTRAPATHS:prepend := "${THISDIR}/u-boot:" | ||
19 | |||
20 | UBOOT_MB_INC = "" | ||
21 | UBOOT_MB_INC:microblaze = "u-boot-xlnx-microblaze.inc" | ||
22 | require ${UBOOT_MB_INC} | ||
23 | 7 | ||
24 | SYSROOT_DIRS += "/boot" | 8 | SYSROOT_DIRS += "/boot" |
25 | 9 | ||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2022.1.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2022.1.bb index 7b109f50..c1c45e56 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2022.1.bb +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2022.1.bb | |||
@@ -1,19 +1,4 @@ | |||
1 | UBOOT_VERSION = "v2021.01" | ||
2 | |||
3 | UBRANCH ?= "xlnx_rebase_v2022.01_2022.1_update" | ||
4 | |||
5 | SRCREV = "91ad7924e7f59584d597353e1bb86794341e0a7e" | ||
6 | |||
7 | include u-boot-xlnx.inc | ||
8 | include u-boot-spl-zynq-init.inc | ||
9 | |||
10 | LICENSE = "GPL-2.0-or-later" | ||
11 | LIC_FILES_CHKSUM = "file://README;beginline=1;endline=4;md5=744e7e3bb0c94b4b9f6b3db3bf893897" | ||
12 | |||
13 | # u-boot-xlnx has support for these | ||
14 | HAS_PLATFORM_INIT ?= " \ | ||
15 | xilinx_zynqmp_virt_config \ | ||
16 | xilinx_zynq_virt_defconfig \ | ||
17 | xilinx_versal_vc_p_a2197_revA_x_prc_01_revA \ | ||
18 | " | ||
19 | 1 | ||
2 | require u-boot-xlnx.inc | ||
3 | require u-boot-spl-zynq-init.inc | ||
4 | require u-boot-xlnx-2022.1.inc | ||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2022.2.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2022.2.bb index 3fdc3840..b10f321b 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2022.2.bb +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2022.2.bb | |||
@@ -1,19 +1,4 @@ | |||
1 | UBOOT_VERSION = "v2021.01" | ||
2 | |||
3 | UBRANCH ?= "xlnx_rebase_v2022.01" | ||
4 | |||
5 | SRCREV = "b31476685debf5512ed0d4e8000fa5167a22f530" | ||
6 | |||
7 | include u-boot-xlnx.inc | ||
8 | include u-boot-spl-zynq-init.inc | ||
9 | |||
10 | LICENSE = "GPL-2.0-or-later" | ||
11 | LIC_FILES_CHKSUM = "file://README;beginline=1;endline=4;md5=744e7e3bb0c94b4b9f6b3db3bf893897" | ||
12 | |||
13 | # u-boot-xlnx has support for these | ||
14 | HAS_PLATFORM_INIT ?= " \ | ||
15 | xilinx_zynqmp_virt_config \ | ||
16 | xilinx_zynq_virt_defconfig \ | ||
17 | xilinx_versal_vc_p_a2197_revA_x_prc_01_revA \ | ||
18 | " | ||
19 | 1 | ||
2 | require u-boot-xlnx.inc | ||
3 | require u-boot-spl-zynq-init.inc | ||
4 | require u-boot-xlnx-2022.2.inc | ||