diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-02-01 20:37:29 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-02-03 19:48:45 +0900 |
commit | d85382e41efbe3f3f9012a08851f93bb4919de65 (patch) | |
tree | bdcdac1cd8463f6847b2b30a6b643e715144372d /build-essential/stage2-busybox.bst | |
parent | 7d6dc7242598361009ab492db2367e545fc53189 (diff) | |
download | definitions-d85382e41efbe3f3f9012a08851f93bb4919de65.tar.gz |
Manual conversion of Baserock's build-essential stratum
This huge commit is a manual conversion, notes on what was
needed:
o project.conf defines the arch specific stuff which was
previously hardcoded into YBD, so the stage1 target and target
etc are all defined by the build-essential project.conf
o Direct and easy changes for git source representation
o Added stage1.bst & stage2.bst "stacks", everything built in
stage2 build-depends on stage1.bst, and the final build-essential
products build-depend on stage2.bst (note build-depend means
to depend _only_ for building, not propagated forward).
o Instead of using host tools we build on the GNOME flatpak
sdk/platform bundles
o Some build-essential morph files use $(dirname $(pwd)) for a sysroot,
which is weird, it means the morph files rely on building at one directory
below the slash sysroot - in buildstream we build in /buildstream/build
which is two - had to replace these with $(dirname $(dirname $(pwd))) instead
o Remove the devices sections from the fhs-dirs elements, not allowed
to create static device nodes in buildstream.
Diffstat (limited to 'build-essential/stage2-busybox.bst')
-rw-r--r-- | build-essential/stage2-busybox.bst | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/build-essential/stage2-busybox.bst b/build-essential/stage2-busybox.bst new file mode 100644 index 00000000..12e770dd --- /dev/null +++ b/build-essential/stage2-busybox.bst @@ -0,0 +1,99 @@ +kind: manual + +sources: +- kind: git + url: upstream:busybox + track: 1_23_1 + ref: 1ecfe811fe2f70380170ef7d820e8150054e88ca + +depends: +- filename: build-essential/stage1.bst + type: build +- build-essential/stage2-linux-api-headers.bst +- build-essential/stage2-glibc.bst + +variables: + prefix: /tools + +environment: + PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin + +config: + + configure-commands: + # Explicitly setting HOSTCC is required because we have a 'gcc' earlier in + # the PATH supplied by the stage2-gcc chunk, which can't execute outside of + # the stage 3 staging area. + - make HOSTCC="/usr/bin/gcc" CROSS_COMPILE=%{target-stage1}- KCONFIG_NOTIMESTAMP=1 defconfig + + # 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. + - 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_USE_INITTAB=y.*/# CONFIG_FEATURE_USE_INITTAB 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_HALT=y.*/# CONFIG_HALT is not set/' -i .config + - sed -e 's/CONFIG_INIT=y.*/# CONFIG_INIT is not set/' -i .config + - sed -e 's/CONFIG_INIT_TERMINAL_TYPE=y.*/CONFIG_INIT_TERMINAL_TYPE=""/' -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_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_RUNLEVEL=y.*/# CONFIG_RUNLEVEL 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 + + build-commands: + - | + export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" + export CPPFLAGS="--sysroot=$STAGE2_SYSROOT" + export LDFLAGS="--sysroot=$STAGE2_SYSROOT" + make HOSTCC="/usr/bin/gcc" CROSS_COMPILE=%{target-stage1}- KCONFIG_NOTIMESTAMP=1 + + install-commands: + # We expect to be built with a non-standard prefix in stage 2 (i.e. not + # /usr). The install will break if prefix is set to /usr. + - | + export STAGE2_SYSROOT="$(dirname $(dirname $(pwd)))" + export CPPFLAGS="--sysroot=$STAGE2_SYSROOT" + export LDFLAGS="--sysroot=$STAGE2_SYSROOT" + make CONFIG_PREFIX="%{install-root}%{prefix}" \ + HOSTCC="/usr/bin/gcc" \ + CROSS_COMPILE=%{target-stage1}- \ + KCONFIG_NOTIMESTAMP=1 install && + chmod 6755 "%{install-root}%{prefix}"/bin/busybox |