diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-05-01 21:34:02 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-05-02 15:15:51 +0100 |
commit | 808f700efcb98f5344c18db6c91b83a9e4bd15e8 (patch) | |
tree | 0e817ed83944ae935d3e5123dea39dbbf70f51ba /meta/classes-recipe/kernel-yocto.bbclass | |
parent | 812dafbec1918fbbf89e8466988da602bf5edee0 (diff) | |
download | poky-808f700efcb98f5344c18db6c91b83a9e4bd15e8.tar.gz |
classes/lib/scripts: Initial WORKDIR -> UNPACKDIR updates
Work through the initial issues I found where we need to change WORKDIR
to UNPACKDIR.
(From OE-Core rev: 86fec41b1e809d1a2fa2feadc26d29020df53d39)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe/kernel-yocto.bbclass')
-rw-r--r-- | meta/classes-recipe/kernel-yocto.bbclass | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/meta/classes-recipe/kernel-yocto.bbclass b/meta/classes-recipe/kernel-yocto.bbclass index 9a86616dad..6468e8aa90 100644 --- a/meta/classes-recipe/kernel-yocto.bbclass +++ b/meta/classes-recipe/kernel-yocto.bbclass | |||
@@ -63,7 +63,7 @@ def find_sccs(d): | |||
63 | return sources_list | 63 | return sources_list |
64 | 64 | ||
65 | # check the SRC_URI for "kmeta" type'd git repositories. Return the name of | 65 | # check the SRC_URI for "kmeta" type'd git repositories. Return the name of |
66 | # the repository as it will be found in WORKDIR | 66 | # the repository as it will be found in UNPACKDIR |
67 | def find_kernel_feature_dirs(d): | 67 | def find_kernel_feature_dirs(d): |
68 | feature_dirs=[] | 68 | feature_dirs=[] |
69 | fetch = bb.fetch2.Fetch([], d) | 69 | fetch = bb.fetch2.Fetch([], d) |
@@ -147,24 +147,24 @@ do_kernel_metadata() { | |||
147 | # from the source tree, into a common location and normalized "defconfig" name, | 147 | # from the source tree, into a common location and normalized "defconfig" name, |
148 | # where the rest of the process will include and incoroporate it into the build | 148 | # where the rest of the process will include and incoroporate it into the build |
149 | # | 149 | # |
150 | # If the fetcher has already placed a defconfig in WORKDIR (from the SRC_URI), | 150 | # If the fetcher has already placed a defconfig in UNPACKDIR (from the SRC_URI), |
151 | # we don't overwrite it, but instead warn the user that SRC_URI defconfigs take | 151 | # we don't overwrite it, but instead warn the user that SRC_URI defconfigs take |
152 | # precendence. | 152 | # precendence. |
153 | # | 153 | # |
154 | if [ -n "${KBUILD_DEFCONFIG}" ]; then | 154 | if [ -n "${KBUILD_DEFCONFIG}" ]; then |
155 | if [ -f "${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG}" ]; then | 155 | if [ -f "${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG}" ]; then |
156 | if [ -f "${WORKDIR}/defconfig" ]; then | 156 | if [ -f "${UNPACKDIR}/defconfig" ]; then |
157 | # If the two defconfig's are different, warn that we overwrote the | 157 | # If the two defconfig's are different, warn that we overwrote the |
158 | # one already placed in WORKDIR | 158 | # one already placed in UNPACKDIR |
159 | cmp "${WORKDIR}/defconfig" "${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG}" | 159 | cmp "${UNPACKDIR}/defconfig" "${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG}" |
160 | if [ $? -ne 0 ]; then | 160 | if [ $? -ne 0 ]; then |
161 | bbdebug 1 "detected SRC_URI or unpatched defconfig in WORKDIR. ${KBUILD_DEFCONFIG} copied over it" | 161 | bbdebug 1 "detected SRC_URI or unpatched defconfig in UNPACKDIR. ${KBUILD_DEFCONFIG} copied over it" |
162 | fi | 162 | fi |
163 | cp -f ${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG} ${WORKDIR}/defconfig | 163 | cp -f ${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG} ${UNPACKDIR}/defconfig |
164 | else | 164 | else |
165 | cp -f ${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG} ${WORKDIR}/defconfig | 165 | cp -f ${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG} ${UNPACKDIR}/defconfig |
166 | fi | 166 | fi |
167 | in_tree_defconfig="${WORKDIR}/defconfig" | 167 | in_tree_defconfig="${UNPACKDIR}/defconfig" |
168 | else | 168 | else |
169 | bbfatal "A KBUILD_DEFCONFIG '${KBUILD_DEFCONFIG}' was specified, but not present in the source tree (${S}/arch/${ARCH}/configs/)" | 169 | bbfatal "A KBUILD_DEFCONFIG '${KBUILD_DEFCONFIG}' was specified, but not present in the source tree (${S}/arch/${ARCH}/configs/)" |
170 | fi | 170 | fi |
@@ -178,7 +178,7 @@ do_kernel_metadata() { | |||
178 | patches="${@" ".join(find_patches(d,'kernel-meta'))}" | 178 | patches="${@" ".join(find_patches(d,'kernel-meta'))}" |
179 | if [ -n "$patches" ]; then | 179 | if [ -n "$patches" ]; then |
180 | ( | 180 | ( |
181 | cd ${WORKDIR}/kernel-meta | 181 | cd ${UNPACKDIR}/kernel-meta |
182 | 182 | ||
183 | # take the SRC_URI patches, and create a series file | 183 | # take the SRC_URI patches, and create a series file |
184 | # this is required to support some better processing | 184 | # this is required to support some better processing |
@@ -193,11 +193,11 @@ do_kernel_metadata() { | |||
193 | # handling the rest of the kernel. This allows us | 193 | # handling the rest of the kernel. This allows us |
194 | # more flexibility for handling failures or advanced | 194 | # more flexibility for handling failures or advanced |
195 | # mergeing functinoality | 195 | # mergeing functinoality |
196 | message=$(kgit-s2q --gen -v --patches ${WORKDIR}/kernel-meta 2>&1) | 196 | message=$(kgit-s2q --gen -v --patches ${UNPACKDIR}/kernel-meta 2>&1) |
197 | if [ $? -ne 0 ]; then | 197 | if [ $? -ne 0 ]; then |
198 | # setup to try the patch again | 198 | # setup to try the patch again |
199 | kgit-s2q --prev | 199 | kgit-s2q --prev |
200 | bberror "Problem applying patches to: ${WORKDIR}/kernel-meta" | 200 | bberror "Problem applying patches to: ${UNPACKDIR}/kernel-meta" |
201 | bbfatal_log "\n($message)" | 201 | bbfatal_log "\n($message)" |
202 | fi | 202 | fi |
203 | ) | 203 | ) |
@@ -232,12 +232,12 @@ do_kernel_metadata() { | |||
232 | # SRC_URI. If they were supplied, we convert them into include directives | 232 | # SRC_URI. If they were supplied, we convert them into include directives |
233 | # for the update part of the process | 233 | # for the update part of the process |
234 | for f in ${feat_dirs}; do | 234 | for f in ${feat_dirs}; do |
235 | if [ -d "${WORKDIR}/$f/kernel-meta" ]; then | 235 | if [ -d "${UNPACKDIR}/$f/kernel-meta" ]; then |
236 | includes="$includes -I${WORKDIR}/$f/kernel-meta" | 236 | includes="$includes -I${UNPACKDIR}/$f/kernel-meta" |
237 | elif [ -d "${WORKDIR}/../oe-local-files/$f" ]; then | 237 | elif [ -d "${UNPACKDIR}/../oe-local-files/$f" ]; then |
238 | includes="$includes -I${WORKDIR}/../oe-local-files/$f" | 238 | includes="$includes -I${UNPACKDIR}/../oe-local-files/$f" |
239 | elif [ -d "${WORKDIR}/$f" ]; then | 239 | elif [ -d "${UNPACKDIR}/$f" ]; then |
240 | includes="$includes -I${WORKDIR}/$f" | 240 | includes="$includes -I${UNPACKDIR}/$f" |
241 | fi | 241 | fi |
242 | done | 242 | done |
243 | for s in ${sccs} ${patches}; do | 243 | for s in ${sccs} ${patches}; do |
@@ -460,7 +460,7 @@ do_kernel_configme() { | |||
460 | config_flags="" | 460 | config_flags="" |
461 | ;; | 461 | ;; |
462 | *) | 462 | *) |
463 | if [ -f ${WORKDIR}/defconfig ]; then | 463 | if [ -f ${UNPACKDIR}/defconfig ]; then |
464 | config_flags="-n" | 464 | config_flags="-n" |
465 | fi | 465 | fi |
466 | ;; | 466 | ;; |