3 kerneldir=${D}${KERNEL_SRC_PATH}
6 install -d ${D}${KERNEL_BUILD_ROOT}${KERNEL_VERSION}
8 cd ${D}${KERNEL_BUILD_ROOT}${KERNEL_VERSION}
10 ln -s ${KERNEL_SRC_PATH} source
11 ln -s ${KERNEL_SRC_PATH} build
15 # Copy the staging dir source (and module build support) into the devsrc structure.
16 # We can keep this copy simple and take everything, since a we'll clean up any build
17 # artifacts afterwards, and the extra i/o is not significant
20 find . -type d -name '.git*' -prune -o -path '.debug' -prune -o -type f -print0 | cpio --null -pdlu $kerneldir
22 find . -type d -name '.git*' -prune -o -type d -name '.kernel-meta' -prune -o -type f -print0 | cpio --null -pdlu $kerneldir
24 # Explicitly set KBUILD_OUTPUT to ensure that the image directory is cleaned and not
25 # The main build artifacts. We clean the directory to avoid QA errors on mismatched
26 # architecture (since scripts and helpers are native format).
27 KBUILD_OUTPUT="$kerneldir"
28 oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}" clean _mrproper_scripts
30 # make clean generates an absolute path symlink called "source"
31 # in $kerneldir points to $kerneldir, which doesn't make any
32 # sense, so remove it.
33 if [ -L $kerneldir/source ]; then
34 bbnote "Removing $kerneldir/source symlink"
35 rm -f $kerneldir/source
38 # As of Linux kernel version 3.0.1, the clean target removes
39 # arch/powerpc/lib/crtsavres.o which is present in
40 # KBUILD_LDFLAGS_MODULE, making it required to build external modules.
41 if [ ${ARCH} = "powerpc" ]; then
42 mkdir -p $kerneldir/arch/powerpc/lib/
43 cp ${B}/arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o
46 chown -R root:root ${D}
49 INSANE_SKIP_${PN} = "arch"