diff options
author | Ryan Eatmon <reatmon@ti.com> | 2024-09-12 12:23:40 -0500 |
---|---|---|
committer | Ryan Eatmon <reatmon@ti.com> | 2024-09-12 12:24:42 -0500 |
commit | 2a1878a6b35ef8c88d1c348f74e196491174816c (patch) | |
tree | 37f5f6bc2e04ecb6b3bb3f0c4f18fc52bc21c9ff /meta-ti-bsp | |
parent | 1e536ba12ec955cb87d9836bcdff75acd8fbdb9f (diff) | |
download | meta-ti-2a1878a6b35ef8c88d1c348f74e196491174816c.tar.gz |
Revert "classes: Create uboot-fragments.bbclass"
This reverts commit f39943db864b1c881369282f59071d6fabc4059c.
Diffstat (limited to 'meta-ti-bsp')
-rw-r--r-- | meta-ti-bsp/classes/uboot-fragments.bbclass | 77 | ||||
-rw-r--r-- | meta-ti-bsp/recipes-bsp/u-boot/u-boot-mergeconfig.inc | 7 | ||||
-rw-r--r-- | meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc | 4 |
3 files changed, 8 insertions, 80 deletions
diff --git a/meta-ti-bsp/classes/uboot-fragments.bbclass b/meta-ti-bsp/classes/uboot-fragments.bbclass deleted file mode 100644 index 8db052fa..00000000 --- a/meta-ti-bsp/classes/uboot-fragments.bbclass +++ /dev/null | |||
@@ -1,77 +0,0 @@ | |||
1 | # Handle U-Boot config fragments for a machine | ||
2 | # | ||
3 | # This interacts with the UBOOT_CONFIG flow | ||
4 | # | ||
5 | # The format to specify it, in the machine, is: | ||
6 | # | ||
7 | # UBOOT_FRAGMENTS_CONFIG[foo] = "fragment[,fragment...]" | ||
8 | # | ||
9 | # or | ||
10 | # | ||
11 | # UBOOT_FRAGMENTS = "fragment[,fragment...]" | ||
12 | # | ||
13 | # Copyright 2024 (C) Texas Instruments, Inc. | ||
14 | # | ||
15 | # SPDX-License-Identifier: MIT | ||
16 | |||
17 | python () { | ||
18 | loUbootConfig = (d.getVar('UBOOT_CONFIG') or "").split() | ||
19 | loUbootFragments = d.getVar('UBOOT_FRAGMENTS') | ||
20 | loUbootFragmentsConfigFlags = d.getVarFlags('UBOOT_FRAGMENTS_CONFIG') | ||
21 | |||
22 | if loUbootFragmentsConfigFlags and loUbootFragments: | ||
23 | raise bb.parse.SkipRecipe("You cannot use UBOOT_FRAGMENTS and UBOOT_FRAGMENTS_CONFIG at the same time.") | ||
24 | |||
25 | if loUbootFragmentsConfigFlags is not None and len(loUbootConfig) > 0: | ||
26 | for lpConfig in loUbootConfig: | ||
27 | loFound = False | ||
28 | for lpFlag, lpValue in loUbootFragmentsConfigFlags.items(): | ||
29 | if lpConfig == lpFlag: | ||
30 | loFound = True | ||
31 | if lpValue == "": | ||
32 | d.appendVar('UBOOT_FRAGMENTS', ' none') | ||
33 | else: | ||
34 | d.appendVar('UBOOT_FRAGMENTS', ' ' + lpValue) | ||
35 | |||
36 | if not loFound: | ||
37 | raise bb.parse.SkipRecipe("The selected UBOOT_CONFIG key %s has no match in %s." % (loUbootConfig, loUbootFragmentsConfigFlags.keys())) | ||
38 | } | ||
39 | |||
40 | uboot_configure_config:append () { | ||
41 | if [ -n "${UBOOT_FRAGMENTS}" ] | ||
42 | then | ||
43 | unset loTypeIdx | ||
44 | for lpType in ${UBOOT_CONFIG}; do | ||
45 | loTypeIdx=$(expr $loTypeIdx + 1) | ||
46 | |||
47 | if [ "${lpType}" == "${type}" ]; then | ||
48 | break | ||
49 | fi | ||
50 | done | ||
51 | |||
52 | loApplyFragments="" | ||
53 | |||
54 | for lpFragment in ${UBOOT_FRAGMENTS}; do | ||
55 | lpFragmentIdx=$(expr $lpFragmentIdx + 1) | ||
56 | if [ $y -eq $x ]; then | ||
57 | if [ "${lpFragment}" != "none" ]; then | ||
58 | loApplyFragments=`echo ${lpFragment} | tr "," " "` | ||
59 | fi | ||
60 | break | ||
61 | fi | ||
62 | done | ||
63 | |||
64 | if [ -n "${loApplyFragments}" ]; then | ||
65 | oe_runmake -C ${S} O=${B}/${config} ${config} ${loApplyFragments} | ||
66 | oe_runmake -C ${S} O=${B}/${config} oldconfig | ||
67 | fi | ||
68 | fi | ||
69 | } | ||
70 | |||
71 | uboot_configure:append () { | ||
72 | if [ -n "${UBOOT_FRAGMENTS}" ] && [ -n "${UBOOT_MACHINE}" ] | ||
73 | then | ||
74 | oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE} `echo ${UBOOT_FRAGMENTS} | tr "," " "` | ||
75 | oe_runmake -C ${S} O=${B} oldconfig | ||
76 | fi | ||
77 | } | ||
diff --git a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-mergeconfig.inc b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-mergeconfig.inc new file mode 100644 index 00000000..c7ce5047 --- /dev/null +++ b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-mergeconfig.inc | |||
@@ -0,0 +1,7 @@ | |||
1 | do_configure:append () { | ||
2 | if [ -n "${UBOOT_CONFIG_FRAGMENTS}" ] && [ -n "${UBOOT_MACHINE}" ] | ||
3 | then | ||
4 | oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE} ${UBOOT_CONFIG_FRAGMENTS} | ||
5 | oe_runmake -C ${S} O=${B} olddefconfig | ||
6 | fi | ||
7 | } | ||
diff --git a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc index 5521ecee..bb50e1e9 100644 --- a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc +++ b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc | |||
@@ -1,4 +1,3 @@ | |||
1 | |||
2 | do_compile:prepend () { | 1 | do_compile:prepend () { |
3 | scm_version=$(printf '%s%s' -ti-g $(git -C ${S} rev-parse --verify HEAD 2>/dev/null | cut -c1-12)) | 2 | scm_version=$(printf '%s%s' -ti-g $(git -C ${S} rev-parse --verify HEAD 2>/dev/null | cut -c1-12)) |
4 | 3 | ||
@@ -11,8 +10,7 @@ SPL_BINARY ?= "MLO" | |||
11 | 10 | ||
12 | require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot-common.inc | 11 | require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot-common.inc |
13 | require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc | 12 | require ${COREBASE}/meta/recipes-bsp/u-boot/u-boot.inc |
14 | 13 | require u-boot-mergeconfig.inc | |
15 | inherit uboot-fragments | ||
16 | 14 | ||
17 | FILESEXTRAPATHS:prepend := "${THISDIR}/u-boot:" | 15 | FILESEXTRAPATHS:prepend := "${THISDIR}/u-boot:" |
18 | 16 | ||