HUB
Sign inSign up

cake233/loong64-busybox

By cake233

•Updated over 3 years ago

Image
0

441

cake233/loong64-busybox repository overview

⁠Busybox container for Loongarch64 architecture

⁠How to run it?

Before running, if your host architecture is not loongarch64, you must first configure qemu-user & binfmt.

docker run -it --rm --platform=linux/loong64 cake233/loong64-busybox

⁠Additional explanation

The following content discusses how this container is built.

⁠How to build busybox bin?
git clone --depth=1 git://busybox.net/busybox.git git
cd git
  • static
make menuconfig

TUI: Settings --> Build Options --> [ * ] Build static binary (no shared libs) (i.e. CONFIG_STATIC=y ; CONFIG_STATIC_LIBGCC=y)

  • Or default
make defconfig

make -j4
make install
cd _install
doas tar -cvf ../../busybox.tar .
⁠How to get glibc?
mkdir -p usr/lib 
ln -s usr/lib lib
ln -s lib usr/lib64
ln -s usr/lib lib64

# $PWD is `path/to/_install`
pacman -r $PWD --dbpath /var/lib/pacman/ -S glibc
rm -rfv usr/share/*
⁠Dockerfile
FROM scratch
ADD busybox.tar /
CMD ["/bin/ash"]

Tag summary

Content type

Image

Digest

sha256:a82d47afc…

Size

1.2 MB

Last updated

over 3 years ago

docker pull cake233/loong64-busybox