diff options
author | Adam Miartus <adam.miartus@gmail.com> | 2020-05-10 20:21:12 +0200 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2020-05-11 15:25:03 -0700 |
commit | b816ac8704b3a32eba82e7f2b12c439248ae2528 (patch) | |
tree | 05b4fb66be493b5200f2bc547fb7031d1c33eb9b | |
parent | 353b4d2f982d04d04e858eea6f3a6d06c62d5b12 (diff) | |
download | meta-openembedded-b816ac8704b3a32eba82e7f2b12c439248ae2528.tar.gz |
toybox: allow user to provide own defconfig
toybox provides similar scheme with defconfig as linux
and busybox, allow user to override the defconfig in
their own layer
copy paste from kernel.bbclass
Signed-off-by: Adam Miartus <adam.miartus@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-oe/recipes-core/toybox/toybox_0.7.5.bb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/meta-oe/recipes-core/toybox/toybox_0.7.5.bb b/meta-oe/recipes-core/toybox/toybox_0.7.5.bb index 069f0471c0..2f82978334 100644 --- a/meta-oe/recipes-core/toybox/toybox_0.7.5.bb +++ b/meta-oe/recipes-core/toybox/toybox_0.7.5.bb | |||
@@ -20,7 +20,18 @@ TOYBOX_BIN = "generated/unstripped/toybox" | |||
20 | EXTRA_OEMAKE = 'HOSTCC="${BUILD_CC}" CPUS=${@oe.utils.cpu_count()}' | 20 | EXTRA_OEMAKE = 'HOSTCC="${BUILD_CC}" CPUS=${@oe.utils.cpu_count()}' |
21 | 21 | ||
22 | do_configure() { | 22 | do_configure() { |
23 | oe_runmake defconfig | 23 | # allow user to define their own defconfig in bbappend, taken from kernel.bbclass |
24 | if [ "${S}" != "${B}" ] && [ -f "${S}/.config" ] && [ ! -f "${B}/.config" ]; then | ||
25 | mv "${S}/.config" "${B}/.config" | ||
26 | fi | ||
27 | |||
28 | # Copy defconfig to .config if .config does not exist. This allows | ||
29 | # recipes to manage the .config themselves in do_configure_prepend(). | ||
30 | if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${B}/.config" ]; then | ||
31 | cp "${WORKDIR}/defconfig" "${B}/.config" | ||
32 | fi | ||
33 | |||
34 | oe_runmake oldconfig || oe_runmake defconfig | ||
24 | 35 | ||
25 | # Disable killall5 as it isn't managed by update-alternatives | 36 | # Disable killall5 as it isn't managed by update-alternatives |
26 | sed -e 's/CONFIG_KILLALL5=y/# CONFIG_KILLALL5 is not set/' -i .config | 37 | sed -e 's/CONFIG_KILLALL5=y/# CONFIG_KILLALL5 is not set/' -i .config |