2026-07-12 01:52:41 +02:00
|
|
|
# Maintainer: Kira <[@kira](https://dev.kira-linux.org/kira)>
|
|
|
|
|
|
|
|
|
|
pkgname=bzz-initrd
|
2026-08-01 23:45:14 +02:00
|
|
|
pkgver=0.2.1
|
2026-07-12 01:52:41 +02:00
|
|
|
pkgrel=1
|
|
|
|
|
pkgdesc='Initrd image for Kira Linux'
|
|
|
|
|
url='https://dev.kira-linux.org'
|
|
|
|
|
arch=(x86_64)
|
|
|
|
|
|
2026-08-01 23:45:14 +02:00
|
|
|
_nyanit_ver=0.2.1
|
2026-07-12 01:52:41 +02:00
|
|
|
_nyanit_src=v${_nyanit_ver}.tar.gz
|
2026-07-31 16:08:18 +02:00
|
|
|
_nyanit_src_dir=nyanit
|
2026-07-12 01:52:41 +02:00
|
|
|
|
|
|
|
|
makedepends=(
|
|
|
|
|
bcachefs-tools
|
2026-07-29 14:24:01 +02:00
|
|
|
dosfstools
|
2026-07-12 01:52:41 +02:00
|
|
|
coreutils
|
|
|
|
|
pax-utils
|
2026-07-14 00:08:34 +02:00
|
|
|
rust
|
|
|
|
|
tar
|
2026-07-12 01:52:41 +02:00
|
|
|
bc
|
|
|
|
|
cpio
|
|
|
|
|
gettext
|
|
|
|
|
pahole
|
|
|
|
|
perl
|
|
|
|
|
python
|
|
|
|
|
xz
|
|
|
|
|
gzip
|
|
|
|
|
zstd
|
|
|
|
|
)
|
|
|
|
|
options=(
|
|
|
|
|
!debug
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
source=(
|
|
|
|
|
https://dev.kira-linux.org/kira-linux/nyanit/archive/${_nyanit_src}
|
|
|
|
|
)
|
|
|
|
|
|
2026-07-21 00:26:14 +02:00
|
|
|
# source=(
|
|
|
|
|
# nyanit.zip
|
|
|
|
|
# )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-08-01 23:45:14 +02:00
|
|
|
sha256sums=('b4a5518e49a798c71e27e4638dbadf57b85b4961817333ebba3f449a3ee87a01')
|
|
|
|
|
b2sums=('0d3c6be735d41b23bfd460ae5d87cc008ac9fb75653e0115e289440e8e5f43211cdaacfca29f9120ee866d3dafad4bd7b7c3e298382f47825efd83cea286b4d8')
|
2026-07-12 01:52:41 +02:00
|
|
|
|
|
|
|
|
_tools_list=(
|
|
|
|
|
/usr/bin/bcachefs
|
|
|
|
|
/usr/bin/fsck
|
|
|
|
|
/usr/bin/fsck.vfat
|
|
|
|
|
/usr/bin/switch_root
|
2026-07-29 14:24:01 +02:00
|
|
|
/usr/bin/blkid
|
2026-07-12 01:52:41 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
build() {
|
|
|
|
|
|
|
|
|
|
echo "Building NYANIT..."
|
|
|
|
|
cd $_nyanit_src_dir
|
|
|
|
|
cargo build --release
|
2026-07-14 00:08:34 +02:00
|
|
|
cp target/release/nyanit $srcdir/init
|
|
|
|
|
chmod +x $srcdir/init
|
2026-07-12 01:52:41 +02:00
|
|
|
echo "##### DONE Building NYANIT #####"
|
|
|
|
|
echo ""
|
|
|
|
|
|
2026-07-14 00:08:34 +02:00
|
|
|
echo "Populate initdramfs tree..."
|
|
|
|
|
cd $srcdir
|
2026-08-01 23:45:14 +02:00
|
|
|
mkdir -p initramfs/{dev,proc,sys,run,mnt,mnt/bee_root,tmp,etc,usr,usr/bin,usr/lib}
|
2026-07-14 00:08:34 +02:00
|
|
|
|
2026-07-21 00:26:14 +02:00
|
|
|
echo "Create /bin /lib /lib64 simlinks"
|
|
|
|
|
cd $srcdir/initramfs
|
|
|
|
|
ln -s usr/lib lib64
|
|
|
|
|
ln -s usr/lib lib
|
|
|
|
|
ln -s usr/bin bin
|
|
|
|
|
cd $srcdir/initramfs/usr
|
|
|
|
|
ln -s lib lib64
|
2026-07-14 00:08:34 +02:00
|
|
|
|
|
|
|
|
echo "Install NYANIT..."
|
|
|
|
|
cd $srcdir
|
|
|
|
|
lddtree --bindir / --copy-to-tree $srcdir/initramfs init
|
|
|
|
|
|
2026-07-12 01:52:41 +02:00
|
|
|
echo "Copy libs and binaries"
|
|
|
|
|
cd $srcdir
|
|
|
|
|
lddtree --copy-to-tree $srcdir/initramfs "${_tools_list[@]}"
|
|
|
|
|
|
2026-07-21 00:26:14 +02:00
|
|
|
echo "Remove setuid flag from everything..."
|
|
|
|
|
chmod -R a-s $srcdir/initramfs
|
2026-07-12 01:52:41 +02:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
package() {
|
|
|
|
|
pkgdesc="The $pkgdesc kernel and modules"
|
|
|
|
|
license=(
|
|
|
|
|
GPL-3.0-or-later
|
|
|
|
|
GPL-2.0-or-later
|
|
|
|
|
GPL-2.0-only
|
|
|
|
|
Zlib
|
|
|
|
|
)
|
|
|
|
|
|
2026-07-21 00:26:14 +02:00
|
|
|
echo "Create device node"
|
|
|
|
|
cd $srcdir/initramfs
|
|
|
|
|
mknod -m 622 dev/console c 5 1
|
|
|
|
|
|
|
|
|
|
# echo "Change owner to root"
|
|
|
|
|
# chown -R root:root $srcdir/initramfs
|
|
|
|
|
|
|
|
|
|
# echo "Run ldconfig"
|
|
|
|
|
# ldconfig -r $srcdir/initramfs -v
|
|
|
|
|
|
|
|
|
|
# Create cpio archive
|
|
|
|
|
echo "Create cpio archive"
|
|
|
|
|
cd $srcdir/initramfs
|
|
|
|
|
find . | cpio -ov --format=newc > ../initramfs.cpio
|
|
|
|
|
|
2026-07-12 01:52:41 +02:00
|
|
|
echo "Installing bzz-initrd"
|
|
|
|
|
install -vDm 644 $srcdir/initramfs.cpio -t "$pkgdir/usr/share/$pkgname/"
|
|
|
|
|
}
|
|
|
|
|
|