From 204a0ea6a57d82e485ea4fbad50d51892d0246fa Mon Sep 17 00:00:00 2001 From: onefang Date: Mon, 16 Mar 2020 14:45:30 +1000 Subject: Add a build script. --- BuildIt.sh | 33 +++++++++++++++++++++++++++++++++ miniconfig | 12 ++++++++++++ src/git-sub-modules/README | 3 +++ 3 files changed, 48 insertions(+) create mode 100755 BuildIt.sh create mode 100644 miniconfig create mode 100644 src/git-sub-modules/README diff --git a/BuildIt.sh b/BuildIt.sh new file mode 100755 index 0000000..fdcb747 --- /dev/null +++ b/BuildIt.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +# Poor mans git sub modules / subtrees, coz otherwise it gets complex. +if [ ! -d src/git-sub-modules/toybox ]; then + pushd src/git-sub-modules + git clone https://github.com/landley/toybox.git + popd +else + pushd src/git-sub-modules/toybox + git pull + popd +fi + +pushd src/git-sub-modules/toybox +#git stash save +#git pull +#git stash pop +popd + +mkdir -p build +rm -fr build/toybox +cp -r src/git-sub-modules/toybox build/ +ln -fs ../../../src/boxes build/toybox/toys/boxes +ln -fs ../toys/boxes/handlekeys.c build/toybox/lib +ln -fs ../toys/boxes/handlekeys.h build/toybox/lib + +pushd build/toybox >/dev/null +make clean +#make defconfig +##make menuconfig +make allnoconfig KCONFIG_ALLCONFIG=../../miniconfig || exit 1 +make || exit 1 +popd >/dev/null diff --git a/miniconfig b/miniconfig new file mode 100644 index 0000000..a8b01c4 --- /dev/null +++ b/miniconfig @@ -0,0 +1,12 @@ +CONFIG_BOXES=y +CONFIG_HELP=y +CONFIG_PS=y +CONFIG_RM=y +CONFIG_SH=y +CONFIG_SU=y +CONFIG_UUIDGEN=y +CONFIG_TOYBOX_FREE=y +CONFIG_TOYBOX_HELP=y +CONFIG_TOYBOX_HELP_DASHDASH=y +CONFIG_TOYBOX_I18N=y +CONFIG_TOYBOX_SUID=y diff --git a/src/git-sub-modules/README b/src/git-sub-modules/README new file mode 100644 index 0000000..1cf4e1a --- /dev/null +++ b/src/git-sub-modules/README @@ -0,0 +1,3 @@ +Put git sub modules here, and then add code to BuildIt.sh to move them to +where they are needed, or link them. Poor man's git sub modules / +subtrees, coz otherwise it gets complex. -- cgit v1.1