Kaboom is a tool to bootstrap AOSC OS stage 1 from a (sane) Linux environment. It is completely rootless with fakeroot, so you can run it anywhere.
- Host GCC and binutils
- GNU Bash, 5.0 and up
- CMake
fakeroot- Header and other development files for the following packages:
- GCC and Binutils:
gmp,mpfr - Python 3:
zlib,expat,libffi,openssl - Dependencies to build
file,gettext, andpkgconf
- GCC and Binutils:
- Decent network connection
- Decent amount of free disk space
- Patience
The only argument required is the target architecture:
git clone https://github.com/AOSC-Dev/kaboom
cd kaboom
./kaboom ARCH
For a list of available architectures, please see targets/ in the source tree.
To aid the development, kaboom comes with a continuation feature. You can specify -c stage/package to continue from the package that previously failed after attempting to fix the error:
./kaboom -c stage0/gcc ia64
This sysroot ships with GDB. To aid development and debugging, you can build the target glibc with debug symbols:
./kaboom --debug-libc ia64
The final sysroot will be archived using tar and compressed using xz, with filename like kaboom-stage1-$ARCH-$DATE.tar.xz. The archive does not have any path prefix to the files. To extract, create a new directory with the root user and extract this archive from there:
sudo mkdir stage1-alpha
cd stage1-alpha
sudo tar xf ../kaboom-stage1-alpha-20251232.tar.xz
# Then you can enter the environment to build packages
sudo chroot $PWD
# Or...
sudo systemd-nspawn -D $PWDAdding a new target involves the following steps:
- Write a new target definition file at
target/YOURARCHcontaining:
KABOOM_TARGET_TRIPLE: System triplet following GNU convention (the vendor must bekaboom, e.g.mips64r6el-kaboom-linux-gnuabi64).KABOOM_TARGET_CFLAGS: C compiler flags for the target. Usually contains-march=,-mcpu=and-mtune=, sometimes other-moptions are used to precisely control the generated code.KABOOM_TARGET_CXXFLAGS: C++ compiler flags for the target. Mostly same asCFLAGS.KABOOM_TARGET_KERNEL_ARCH:ARCH=option for the kernel. Seearch/in the kernel tree for details.KABOOM_TARGET_ENDIANNESS: Endianness of the target. Eitherlittleorbig.KABOOM_TARGET_OPENSSL_TARGET: Target option used to configure OpenSSL. SeeConfigurations/10-main.confin the OpenSSL source tree for details. If in doubt, say"linux-generic(32|64) no-asm"here.
- Make a test run by running
./kaboom2 YOURARCH. chrootinto your sysroot, run the following program:
git clonewget URLcurl URL
- Edit
/etc/autobuild/ab4cfg.sh, replace your maintainer information, and specifyARCH=manually. - Build
bcusingacbs-build bc:+stage2. - If this build succeeded, then this architecture can be added into kaboom.
Sometimes the generic options used to configure a package is not enough. Configure options specific to this target must reside in the target specification file.
Target specific package overrides are specified with a Bash array, with the name like PACKAGE_STAGE_DEF__ARCH:
GLIBC_TOOLS_DEF__IA64=(
"--disable-werror"
)For example, for MIPS3 (loongson2f) machines the default -march option must be specified. To achieve this, add the following lines to target/loongson2f:
# Need to specify for both the host (cross-compile toolchain) and stage0 (cross-compiled) GCC
GCC_TOOLS_DEF__LOONGSON2F=(
"--with-arch=mips3"
"--with-tune=loongson2f"
)
GCC_STAGE0_DEF__LOONGSON2F=(
"--with-arch=mips3"
"--with-tune=loongson2f"
)