aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitch Riedstra <mitch@riedstra.us>2018-04-22 18:26:18 -0400
committerMitch Riedstra <mitch@riedstra.us>2018-04-22 18:26:18 -0400
commit73692b5ba9f28b75e226152044b18409a7df7685 (patch)
tree06e8dbb42994ee65c8c815de3c23e5d2a910716d
parentb3810b12552a937dcb6486ccf775a0bd9094db23 (diff)
downloadmin-73692b5ba9f28b75e226152044b18409a7df7685.tar.gz
min-73692b5ba9f28b75e226152044b18409a7df7685.tar.xz
Addex XZ as well as sources and a working "tar" for the system.
( I need to rename it to cpio )
-rw-r--r--busybox-config4
-rw-r--r--readme.md6
-rw-r--r--scripts/build.sh3
-rw-r--r--scripts/get_sources.sh10
-rw-r--r--scripts/linux.sh2
-rw-r--r--scripts/musl-cross-make.sh15
-rw-r--r--scripts/pv.sh22
-rw-r--r--scripts/setup_musl_cross.sh27
-rw-r--r--scripts/tar-pfx.sh22
-rw-r--r--scripts/xz.sh24
10 files changed, 119 insertions, 16 deletions
diff --git a/busybox-config b/busybox-config
index 06ae0b6..fadc793 100644
--- a/busybox-config
+++ b/busybox-config
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Busybox version: 1.28.3
-# Sat Apr 21 08:32:56 2018
+# Sun Apr 22 18:08:53 2018
#
CONFIG_HAVE_DOT_CONFIG=y
@@ -161,7 +161,7 @@ CONFIG_GZIP_FAST=0
# CONFIG_FEATURE_GZIP_LEVELS is not set
CONFIG_FEATURE_GZIP_DECOMPRESS=y
CONFIG_LZOP=y
-# CONFIG_UNLZOP is not set
+CONFIG_UNLZOP=y
# CONFIG_LZOPCAT is not set
# CONFIG_LZOP_COMPR_HIGH is not set
CONFIG_RPM=y
diff --git a/readme.md b/readme.md
index fdb158c..69a9a3e 100644
--- a/readme.md
+++ b/readme.md
@@ -45,5 +45,11 @@ and placed the `output` folder into `./x86_64-linux-musl` where `x86_64` is
the arch you're compiling for, in theory this should work for ARM and the like
but I haven't gotten around to testing.
+If you wish to set this up automatically run `sh scripts/musl-cross-make.sh`
+after `sh scripts/get_sources.sh`
+
Run `scripts/get_sources.sh` and then `scripts/build.sh` It's rather important
to run them from the `min` directory so the paths and imports will be correct.
+
+
+ sudo ln -sv /s6/min/pfx/usr/lib/libc.so /lib/ld-musl-x86_64.so.1
diff --git a/scripts/build.sh b/scripts/build.sh
index c5b47bd..604af31 100644
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -8,11 +8,12 @@ $shell scripts/ncurses.sh
$shell scripts/vim.sh
$shell scripts/busybox.sh
$shell scripts/tree.sh
+$shell scripts/pv.sh
$shell scripts/zlib.sh
$shell scripts/libressl.sh
$shell scripts/openssh.sh
$shell scripts/nginx.sh
-$shell scripts/libarchive.sh.sh
+$shell scripts/libarchive.sh
$shell scripts/runit.sh
$shell scripts/conf.sh
$shell scripts/tar-pfx.sh
diff --git a/scripts/get_sources.sh b/scripts/get_sources.sh
index 538d03b..f9c3c3a 100644
--- a/scripts/get_sources.sh
+++ b/scripts/get_sources.sh
@@ -1,11 +1,11 @@
#!/bin/sh
. ./.vars
cd ${dist_dir}
-wget -i ${base_dir}/sources.lst
+for line in $(cat ${base_dir}/sources.lst); do
+ wget -c "$line" || echo ""
+done
# Because otherwise it's saved as 'mirror'... *sigh*
wget -O php-7.2.4.tar.xz http://us3.php.net/get/php-7.2.4.tar.xz/from/this/mirror
-git clone git://git.suckless.org/sbase
-git clone git://git.suckless.org/ubase
-git clone git://git.suckless.org/sinit
-git clone https://github.com/voidlinux/void-runit
+# git clone https://github.com/voidlinux/void-runit
git clone https://github.com/irssi/irssi
+git clone https://github.com/richfelker/musl-cross-make
diff --git a/scripts/linux.sh b/scripts/linux.sh
index 2bfedd8..407407f 100644
--- a/scripts/linux.sh
+++ b/scripts/linux.sh
@@ -1,6 +1,6 @@
#!/bin/sh
. ./.vars
-VERSION=4.16.2
+VERSION=4.16.3
KERNEL_TAR_PKG="${build_dir}/linux-$VERSION/linux-$VERSION-x86.tar"
cd $build_dir
if ! [ -d "${build_dir}/linux-$VERSION" ] ; then
diff --git a/scripts/musl-cross-make.sh b/scripts/musl-cross-make.sh
new file mode 100644
index 0000000..c8f477f
--- /dev/null
+++ b/scripts/musl-cross-make.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+. ./.vars
+# VERSION=3.3.2
+APP_NAME="musl-cross-make"
+BUILD_DIR="${build_dir}/$APP_NAME"
+if ! [ -d "$BUILD_DIR" ] ; then
+ cd "$build_dir"
+ git clone ${dist_dir}/$APP_NAME
+fi
+cd "$BUILD_DIR"
+make -j$(nproc) TARGET=$BUILD_TGT
+make install TARGET=$BUILD_TGT
+mv output "$BUILD_TGT"
+tar cfzv "$base_dir/${BUILD_TGT}.tgz" "$BUILD_TGT"
+mv "$BUILD_TGT" "$base_dir/"
diff --git a/scripts/pv.sh b/scripts/pv.sh
new file mode 100644
index 0000000..f715dc7
--- /dev/null
+++ b/scripts/pv.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+. ./.vars
+VERSION=1.6.6
+APP_NAME="pv"
+BUILD_DIR="${build_dir}/$APP_NAME-$VERSION"
+if ! [ -d "$BUILD_DIR" ] ; then
+ cd "$build_dir"
+ tar xfjv ${dist_dir}/$APP_NAME-$VERSION.tar.bz2
+fi
+cd "$BUILD_DIR"
+export CC=$BUILD_TGT-gcc
+export CFLAGS="-I$prefix/usr/include -static"
+export DESTDIR=$prefix
+export LDFLAGS="-L$prefix/usr/lib/ -static"
+rm config.log || echo ""
+make clean || echo ""
+./configure \
+ --host=$BUILD_TGT \
+ --prefix=/usr \
+ --with-sysroot=$prefix
+make -j$(nproc)
+make install
diff --git a/scripts/setup_musl_cross.sh b/scripts/setup_musl_cross.sh
new file mode 100644
index 0000000..6ae5dd6
--- /dev/null
+++ b/scripts/setup_musl_cross.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+. ./.vars
+# VERSION=3.3.2
+APP_NAME="musl-cross-make"
+BUILD_DIR="${build_dir}/$APP_NAME"
+if ! [ -d "$BUILD_DIR" ] ; then
+ cd "$build_dir"
+ git clone ${dist_dir}/$APP_NAME
+fi
+cd "$BUILD_DIR"
+export CC=$BUILD_TGT-gcc
+export CFLAGS="-I$prefix/usr/include -static"
+export DESTDIR=$prefix
+export LDFLAGS="-L$prefix/usr/lib/ -static"
+rm config.log || echo ""
+make clean || echo ""
+./configure \
+ --host=$BUILD_TGT \
+ --prefix=/usr \
+ --without-xml2 \
+ --enable-bsdtar=static \
+ --enable-bsdcpio=static \
+ --enable-bsdcat=static \
+ --without-openssl \
+ --with-sysroot=$prefix
+make -j$(nproc)
+make install
diff --git a/scripts/tar-pfx.sh b/scripts/tar-pfx.sh
index b395764..2b5a215 100644
--- a/scripts/tar-pfx.sh
+++ b/scripts/tar-pfx.sh
@@ -1,10 +1,18 @@
#!/bin/sh
. ./.vars
-bsdtar \
- --numeric-owner \
- --owner=root \
- --group=root \
- -C pfx \
- -cvf - . \
- | xz -9 -T0 -vc > pfx.txz
+SZE=$(du -sm $prefix |awk '{print $1}')
+
+ # | cpio -R root:root -do - \
+find $prefix \
+ | cpio -v -R root:root -oH newc \
+ | pv -s ${SZE}M \
+ | xz -T0 -9 -c > pfx.txz
+
+# bsdtar \
+# --numeric-owner \
+# --owner=root \
+# --group=root \
+# -C pfx \
+# -cvf - . \
+# | xz -9 -T0 -vc > pfx.txz
diff --git a/scripts/xz.sh b/scripts/xz.sh
new file mode 100644
index 0000000..079f3e2
--- /dev/null
+++ b/scripts/xz.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+. ./.vars
+VERSION=5.2.3
+APP_NAME="xz"
+BUILD_DIR="${build_dir}/$APP_NAME-$VERSION"
+if ! [ -d "$BUILD_DIR" ] ; then
+ cd "$build_dir"
+ tar xfJv ${dist_dir}/$APP_NAME-$VERSION.tar.xz
+fi
+cd "$BUILD_DIR"
+export CC=$BUILD_TGT-gcc
+export CFLAGS="-I$prefix/usr/include -static"
+export CPPFLAGS="$CFLAGS"
+export DESTDIR=$prefix
+export LDFLAGS="-L$prefix/usr/lib/ -static"
+rm config.log || echo ""
+make clean || echo ""
+./configure \
+ --host=$BUILD_TGT \
+ --prefix=/usr \
+ --enable-threads='yes' \
+ --with-sysroot=$prefix
+make -j$(nproc)
+make install