summaryrefslogtreecommitdiffstats
path: root/meta-ti-bsp/classes
diff options
context:
space:
mode:
authorRyan Eatmon <reatmon@ti.com>2024-09-12 12:23:40 -0500
committerRyan Eatmon <reatmon@ti.com>2024-09-12 12:24:42 -0500
commit2a1878a6b35ef8c88d1c348f74e196491174816c (patch)
tree37f5f6bc2e04ecb6b3bb3f0c4f18fc52bc21c9ff /meta-ti-bsp/classes
parent1e536ba12ec955cb87d9836bcdff75acd8fbdb9f (diff)
downloadmeta-ti-2a1878a6b35ef8c88d1c348f74e196491174816c.tar.gz
Revert "classes: Create uboot-fragments.bbclass"
This reverts commit f39943db864b1c881369282f59071d6fabc4059c.
Diffstat (limited to 'meta-ti-bsp/classes')
-rw-r--r--meta-ti-bsp/classes/uboot-fragments.bbclass77
1 files changed, 0 insertions, 77 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
17python () {
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
40uboot_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
71uboot_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}