diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2016-03-06 17:44:25 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2016-03-08 17:31:50 +0900 |
commit | 3fcb6f530e4f436027414c74525dfa747735c651 (patch) | |
tree | b313c8019734ac098d20b63f53dbb02b2bf93307 | |
parent | b62609519cecd300693445df242a29d2dd741b89 (diff) | |
download | definitions-3fcb6f530e4f436027414c74525dfa747735c651.tar.gz |
Adding busybox to new build-essential
-rw-r--r-- | strata/build-essential.morph | 14 | ||||
-rw-r--r-- | strata/build-essential/busybox.morph | 89 |
2 files changed, 103 insertions, 0 deletions
diff --git a/strata/build-essential.morph b/strata/build-essential.morph index 28722b20..08101b83 100644 --- a/strata/build-essential.morph +++ b/strata/build-essential.morph @@ -6,6 +6,7 @@ description: | products: - artifact: build-essential-minimal include: + - busybox-.* - glibc-nss chunks: @@ -80,3 +81,16 @@ chunks: - gcc-runtime artifacts: zlib-libs: build-essential-minimal + +- name: busybox + morph: strata/build-essential/busybox.morph + repo: upstream:busybox + ref: 1ecfe811fe2f70380170ef7d820e8150054e88ca + unpetrify-ref: '1_23_1' + build-depends: + - static-sed + - static-gawk + - static-bash + - linux-api-headers + - glibc + - gcc-runtime diff --git a/strata/build-essential/busybox.morph b/strata/build-essential/busybox.morph new file mode 100644 index 00000000..1bbd97a6 --- /dev/null +++ b/strata/build-essential/busybox.morph @@ -0,0 +1,89 @@ +name: busybox +kind: chunk + +configure-commands: +# Busybox's default config has everything enabled. +- make defconfig KCONFIG_NOTIMESTAMP=1 + +- sed -e 's|.*UDHCPC_DEFAULT_SCRIPT.*|CONFIG_UDHCPC_DEFAULT_SCRIPT="'"$PREFIX"/share/udhcpc/default.script'"|' + -i .config +- sed -e 's|.*IFUPDOWN_IFSTATE_PATH.*|CONFIG_IFUPDOWN_IFSTATE_PATH="/run/ifstate"|' + -i .config + +# Avoid dividing applets between $PREFIX/[s]bin and $PREFIX/usr/[s]bin. +- '[ "$PREFIX" = /usr ] || sed -e ''s/.*INSTALL_NO_USR.*/CONFIG_INSTALL_NO_USR=y/'' + -i .config' +# We have GAWK, but in GENIVI baseline we want to get rid of it +# - sed -e 's/CONFIG_AWK=y.*/# CONFIG_AWK is not set/' -i .config + +# Depends on stuff that was removed since eglibc 2.14. +- sed -e 's/CONFIG_INETD=y.*/# CONFIG_INETD is not set/' -i .config + +# Busybox Patch is incompatible enough with GNU Patch that it can't be +# used for GNULib projects built from Git. +- sed -e 's/CONFIG_PATCH=y.*/# CONFIG_PATCH is not set/' -i .config + +# None of this is needed because we have kmod; and it actually breaks the +# Linux build because depmod isn't compatible enough with util-linux's. +- sed -e 's/CONFIG_DEPMOD=y.*/# CONFIG_DEPMOD is not set/' -i .config +- sed -e 's/CONFIG_INSMOD=y.*/# CONFIG_INSMOD is not set/' -i .config +- sed -e 's/CONFIG_MODPROBE=y.*/# CONFIG_MODPROBE is not set/' -i .config +- sed -e 's/CONFIG_MODPROBE_SMALL=y.*/# CONFIG_MODPROBE_SMALL is not set/' -i .config +- sed -e 's/CONFIG_LSMOD=y.*/# CONFIG_LSMOD is not set/' -i .config +- sed -e 's/CONFIG_RMMOD=y.*/# CONFIG_RMMOD is not set/' -i .config + +# General features that we don't need. +- sed -e 's/CONFIG_FEATURE_MOUNT_CIFS=y.*/# CONFIG_FEATURE_MOUNT_CIFS is not set/' + -i .config +- sed -e 's/CONFIG_FEATURE_EXTRA_QUIET=y.*/# CONFIG_FEATURE_EXTRA_QUIET is not set/' + -i .config +- sed -e 's/CONFIG_FEATURE_INIT_COREDUMPS=y.*/# CONFIG_FEATURE_INIT_COREDUMPS is not + set/' -i .config +- sed -e 's/CONFIG_FEATURE_INIT_SCTTY=y.*/# CONFIG_FEATURE_INIT_SCTTY is not set/' + -i .config +- sed -e 's/CONFIG_FEATURE_INIT_SYSLOG=y.*/# CONFIG_FEATURE_INIT_SYSLOG is not set/' + -i .config +- sed -e 's/CONFIG_FEATURE_INITRD=y.*/# CONFIG_FEATURE_INITRD is not set/' -i .config +- sed -e 's/CONFIG_FEATURE_MINIX2=y.*/# CONFIG_FEATURE_MINIX2 is not set/' -i .config +- sed -e 's/CONFIG_FSCK_MINIX=y.*/# CONFIG_FSCK_MINIX is not set/' -i .config +- sed -e 's/CONFIG_LOSETUP=y.*/# CONFIG_LOSETUP is not set/' -i .config +- sed -e 's/CONFIG_LSUSB=y.*/# CONFIG_LSUSB is not set/' -i .config +- sed -e 's/CONFIG_LSPCI=y.*/# CONFIG_LSPCI is not set/' -i .config +- sed -e 's/CONFIG_LZMA=y.*/# CONFIG_LZMA is not set/' -i .config +- sed -e 's/CONFIG_MKFS_EXT2=y.*/# CONFIG_MKFS_EXT2 is not set/' -i .config +- sed -e 's/CONFIG_MKFS_MINIX=y.*/# CONFIG_MKFS_MINIX is not set/' -i .config +- sed -e 's/CONFIG_STRINGS=y.*/# CONFIG_STRINGS is not set/' -i .config +- sed -e 's/CONFIG_UNLZMA=y.*/# CONFIG_UNLZMA is not set/' -i .config +- sed -e 's/CONFIG_UNXZ=y.*/# CONFIG_UNXZ is not set/' -i .config +- sed -e 's/CONFIG_XZ=y.*/# CONFIG_XZ is not set/' -i .config + +# Now turn on some little bits we do need +- sed -e 's/# CONFIG_BBCONFIG is not set/CONFIG_BBCONFIG=y/' -i .config +- sed -e 's/# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set/CONFIG_FEATURE_COMPRESS_BBCONFIG=y/' + -i .config +- sed -e 's/# CONFIG_FEATURE_MOUNT_HELPERS is not set/CONFIG_FEATURE_MOUNT_HELPERS=y/' + -i .config + + +build-commands: +- make KCONFIG_NOTIMESTAMP=1 + +install-commands: +- | + if [ "$PREFIX" = /usr ]; then PREFIX=; fi && + make CONFIG_PREFIX="$DESTDIR$PREFIX" KCONFIG_NOTIMESTAMP=1 install && + chmod 6755 "$DESTDIR$PREFIX"/bin/busybox +# Set up man environment variables +- mkdir -p "$DESTDIR"/etc +- | + cat << EOF > "$DESTDIR/etc/man.conf" + # This file is used by man to provide a manpath for those without one by + # examining their PATH environment variable. + # + # Lines beginning with `#' are comments and are ignored. Any combination of + # tabs or spaces may be used as `whitespace' separators. + + MANDATORY_MANPATH /usr/man + MANDATORY_MANPATH /usr/share/man + MANDATORY_MANPATH /usr/local/share/man + EOF |