Skip to content

Commit

Permalink
create static bin busybox with zstd support
Browse files Browse the repository at this point in the history
  • Loading branch information
binhex committed May 7, 2024
1 parent ebba6a1 commit 52f9698
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Binary file modified build/amd64/utils/busybox/busybox
Binary file not shown.
Binary file modified build/arm64/utils/busybox/busybox
Binary file not shown.
8 changes: 6 additions & 2 deletions build/common/root/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@ TARGETARCH="${1}"

# create vars for arch
if [ "${TARGETARCH}" = "amd64" ]; then
url="http://mirror.bytemark.co.uk/archlinux/iso/latest/archlinux-bootstrap-x86_64.tar.gz"
url="http://mirror.bytemark.co.uk/archlinux/iso/latest/archlinux-bootstrap-x86_64.tar.zst"
exclude="root.x86_64"
strip="--strip-components=1"
compession="zst"
decompress="/bootstrap/zstd -d /bootstrap/archlinux.tar.${compression}"
else
url="http://mirrors.dotsrc.org/archlinuxarm/os/ArchLinuxARM-aarch64-latest.tar.gz"
exclude="."
strip=""
compression="gz"
decompress="/bootstrap/gzip -d /bootstrap/archlinux.tar.${compression}"
fi

# download tarball, note busybox wget does not support SSL
/bootstrap/sh -c "/bootstrap/wget --timeout=60 -O /bootstrap/archlinux.tar.gz ${url} && /bootstrap/tar --exclude=${exclude}/etc/resolv.conf --exclude=${exclude}/etc/hosts -xvf /bootstrap/archlinux.tar.gz ${strip} -C / && /bin/bash -c 'chmod +x /bootstrap/*.sh && /bin/bash /bootstrap/install.sh ${TARGETARCH}'"
/bootstrap/sh -c "/bootstrap/wget --timeout=60 -O /bootstrap/archlinux.tar.${compression} ${url} && ${decompress} && /bootstrap/tar --exclude=${exclude}/etc/resolv.conf --exclude=${exclude}/etc/hosts -xvf /bootstrap/archlinux.tar ${strip} -C / && /bin/bash -c 'chmod +x /bootstrap/*.sh && /bin/bash /bootstrap/install.sh ${TARGETARCH}'"

0 comments on commit 52f9698

Please sign in to comment.