Finish the rename to iglunix

This commit is contained in:
aheirman 2021-02-10 20:00:20 +01:00
parent c9fe261560
commit f1b5d615ea
8 changed files with 62 additions and 62 deletions

View file

@ -1,4 +1,4 @@
# lazybox # Iglunix
Unix like software distribution with no GNU components Unix like software distribution with no GNU components
All build scripts are 0BSD Licensed. All build scripts are 0BSD Licensed.

View file

@ -1,12 +1,12 @@
#!/bin/sh #!/bin/sh
dd if=../tiny-linux-bootloader/disk of=lazybox.img dd if=../tiny-linux-bootloader/disk of=iglunix.img
exit exit
TOTAL=`stat -c %s lazybox.img` TOTAL=`stat -c %s iglunix.img`
SECTOR=$(($TOTAL / 512)) SECTOR=$(($TOTAL / 512))
dd if=/dev/zero count=$((3145727 - $SECTOR)) >> lazybox.img dd if=/dev/zero count=$((3145727 - $SECTOR)) >> iglunix.img
echo "o echo "o
@ -18,9 +18,9 @@ p
a a
1 1
w w
" | fdisk lazybox.img " | fdisk iglunix.img
# losetup -o 32256 /dev/loop0 lazybox.img # losetup -o 32256 /dev/loop0 iglunix.img
# mkfs.vfat /dev/loop0 # mkfs.vfat /dev/loop0
# mount /dev/loop0 ./isoroot # mount /dev/loop0 ./isoroot
# #rm -r isoroot/* # #rm -r isoroot/*

View file

@ -1,4 +1,4 @@
# Lazybox Linux # Iglunix Linux
## Building ## Building
@ -32,24 +32,24 @@ One needs to cross compile GNU Make and place it in `/usr/bin/gmake`
From here one needs to build the first package, `mksh` which will From here one needs to build the first package, `mksh` which will
allow one to rebuild `toybox` and `busybox`. allow one to rebuild `toybox` and `busybox`.
Clone this git repo into `$LBROOT/root/lazybox` and then chroot to `$LBROOT` Clone this git repo into `$LBROOT/root/iglunix` and then chroot to `$LBROOT`
```sh ```sh
cd /root/lazybox cd /root/iglunix
cd pkgs/mksh cd pkgs/mksh
../../lazypkg.sh ../../iglupkg.sh
tar -xf out/mksh*.tar.xz -C / tar -xf out/mksh*.tar.xz -C /
cd ../.. cd ../..
cd pkgs/bmake cd pkgs/bmake
../../lazypkg.sh ../../iglupkg.sh
tar -xf out/bmake*.tar.xz -C / tar -xf out/bmake*.tar.xz -C /
cd ../.. cd ../..
cd pkgs/gmake cd pkgs/gmake
../../lazypkg.sh ../../iglupkg.sh
tar-xf out/gmake*.tar.xz -C / tar-xf out/gmake*.tar.xz -C /
cd ../../ cd ../../

View file

@ -4,9 +4,9 @@
# mksh bmake gmake libressl cmake curl rsync linux flex # mksh bmake gmake libressl cmake curl rsync linux flex
# byacc om4 zlib samurai libffi python ca-certificates # byacc om4 zlib samurai libffi python ca-certificates
# zlib expat gettext-tiny git kati netbsd-curses kakoune # zlib expat gettext-tiny git kati netbsd-curses kakoune
# lazybox llvm musl # iglunix llvm musl
# #
# This should be enough to completely rebuild LazyBox from Source # This should be enough to completely rebuild Iglunix from Source
# #
# Create the root fs dir # Create the root fs dir
@ -27,11 +27,11 @@ cp_packages (){
done done
} }
#packages=(musl mksh bmake gmake libressl cmake curl rsync linux flex byacc om4 zlib samurai libffi python ca-certificates zlib expat gettext-tiny git kati netbsd-curses kakoune lazybox) #packages=(musl mksh bmake gmake libressl cmake curl rsync linux flex byacc om4 zlib samurai libffi python ca-certificates zlib expat gettext-tiny git kati netbsd-curses kakoune iglunix)
packages=(musl linux mksh busybox toybox lazybox) packages=(musl linux mksh busybox toybox iglunix)
cp_packages ./isoroot cp_packages ./isoroot
#packages=(musl mksh busybox toybox llvm bmake gmake libressl cmake curl rsync linux flex byacc om4 zlib samurai libffi python ca-certificates zlib expat gettext-tiny git kati netbsd-curses kakoune lazybox rust less heirloom-doctools file pci-ids) #packages=(musl mksh busybox toybox llvm bmake gmake libressl cmake curl rsync linux flex byacc om4 zlib samurai libffi python ca-certificates zlib expat gettext-tiny git kati netbsd-curses kakoune iglunix rust less heirloom-doctools file pci-ids)
#cp_packages ./diskroot #cp_packages ./diskroot
cat >isoroot/init << EOF cat >isoroot/init << EOF
@ -58,7 +58,7 @@ exec /bin/sh
mkdir /mnt mkdir /mnt
# while not mount $(blkid -L LAZYBOX_BS_MEDIA) /mnt; do # while not mount $(blkid -L IGLUNIX_BS_MEDIA) /mnt; do
# echo "Failed to mount boot disk" # echo "Failed to mount boot disk"
# echo "Retrying" # echo "Retrying"
# sleep 0.5 # sleep 0.5
@ -131,10 +131,10 @@ cp boot/vmlinuz ../isoout/vmlinuz
exit exit
dd if=/dev/zero of=lazybox.img count=524288 dd if=/dev/zero of=iglunix.img count=524288
fdisk lazybox.img fdisk iglunix.img
#losetup -o 32256 /dev/loop0 lazybox.img #losetup -o 32256 /dev/loop0 iglunix.img
mount /dev/loop0 ./isoroot mount /dev/loop0 ./isoroot
rm -r isoroot/* rm -r isoroot/*
cp -r isoout/* isoroot cp -r isoout/* isoroot

48
iglu.sh
View file

@ -69,8 +69,8 @@ do
done done
if [ "$d" = "1" ]; then if [ "$d" = "1" ]; then
stat /usr/share/lazypkg/$1 > /dev/null 2> /dev/null || find_fail stat /usr/share/iglupkg/$1 > /dev/null 2> /dev/null || find_fail
grep deps /usr/share/lazypkg/$1 | tr '=' '\n' | grep -v deps | tr ':' '\n' grep deps /usr/share/iglupkg/$1 | tr '=' '\n' | grep -v deps | tr ':' '\n'
elif [ "$iu" = "1" ]; then elif [ "$iu" = "1" ]; then
# Setup names # Setup names
@ -78,31 +78,31 @@ elif [ "$iu" = "1" ]; then
bname=$(echo "$bname_we" | cut -f 1 -d '.') bname=$(echo "$bname_we" | cut -f 1 -d '.')
# locate installed package # locate installed package
stat /usr/share/lazypkg/$bname > /dev/null 2> /dev/null || find_fail stat /usr/share/iglupkg/$bname > /dev/null 2> /dev/null || find_fail
echo "Upgrading $bname_we" echo "Upgrading $bname_we"
continue_interactive continue_interactive
# Extract new package and verify # Extract new package and verify
mkdir -p /tmp/lazybox/$bname_we || exit 1 mkdir -p /tmp/iglunix/$bname_we || exit 1
tar -xf $1 -C /tmp/lazybox/$bname_we || tar_fail tar -xf $1 -C /tmp/iglunix/$bname_we || tar_fail
stat /tmp/lazybox/$bname_we/usr/share/lazypkg/$bname >/dev/null || stat_fail stat /tmp/iglunix/$bname_we/usr/share/iglupkg/$bname >/dev/null || stat_fail
# Check deps # Check deps
deps=$(grep deps /tmp/lazybox/$bname_we/usr/share/lazypkg/$bname | tr '=' '\n' | grep -v deps | tr ':' '\n') deps=$(grep deps /tmp/iglunix/$bname_we/usr/share/iglupkg/$bname | tr '=' '\n' | grep -v deps | tr ':' '\n')
for dep in $deps; do for dep in $deps; do
stat /usr/share/lazypkg/$dep > /dev/null 2> /dev/null || dep_not_found $dep stat /usr/share/iglupkg/$dep > /dev/null 2> /dev/null || dep_not_found $dep
done done
# Grab a list of old files and new files to install # Grab a list of old files and new files to install
OFILES=$(sed -n '/\[fs\]/,$p' /usr/share/lazypkg/$bname | OFILES=$(sed -n '/\[fs\]/,$p' /usr/share/iglupkg/$bname |
grep -v "\[fs\]" | awk '{print length, $0}' | sort -rn | cut -d " " -f2-) grep -v "\[fs\]" | awk '{print length, $0}' | sort -rn | cut -d " " -f2-)
NFILES=$(sed -n '/\[fs\]/,$p' /tmp/lazybox/$bname_we/usr/share/lazypkg/$bname | NFILES=$(sed -n '/\[fs\]/,$p' /tmp/iglunix/$bname_we/usr/share/iglupkg/$bname |
grep -v "\[fs\]" | awk '{print length, $0}' | sort -rn | cut -d " " -f2-) grep -v "\[fs\]" | awk '{print length, $0}' | sort -rn | cut -d " " -f2-)
# Extract tar # Extract tar
tar -xf $1 -C / tar -xf $1 -C /
rm -r /tmp/lazybox/$bname_we rm -r /tmp/iglunix/$bname_we
# Remove old files (don't know if this works yet) # Remove old files (don't know if this works yet)
@ -126,27 +126,27 @@ elif [ "$iu" = "1" ]; then
elif [ "$i" = "1" ]; then elif [ "$i" = "1" ]; then
bname_we=$(basename "$1") bname_we=$(basename "$1")
bname=$(echo "$bname_we" | cut -f 1 -d '.') bname=$(echo "$bname_we" | cut -f 1 -d '.')
stat /usr/share/lazypkg/$bname > /dev/null 2> /dev/null && already_exists stat /usr/share/iglupkg/$bname > /dev/null 2> /dev/null && already_exists
echo "Installing $bname_we" echo "Installing $bname_we"
continue_interactive continue_interactive
mkdir -p /tmp/lazybox/$bname_we || exit 1 mkdir -p /tmp/iglunix/$bname_we || exit 1
tar -xf $1 -C /tmp/lazybox/$bname_we || tar_fail tar -xf $1 -C /tmp/iglunix/$bname_we || tar_fail
stat /tmp/lazybox/$bname_we/usr/share/lazypkg/$bname >/dev/null || stat_fail stat /tmp/iglunix/$bname_we/usr/share/iglupkg/$bname >/dev/null || stat_fail
deps=$(grep deps /tmp/lazybox/$bname_we/usr/share/lazypkg/$bname | tr '=' '\n' | grep -v deps | tr ':' '\n') deps=$(grep deps /tmp/iglunix/$bname_we/usr/share/iglupkg/$bname | tr '=' '\n' | grep -v deps | tr ':' '\n')
for dep in $deps; do for dep in $deps; do
stat /usr/share/lazypkg/$dep > /dev/null 2> /dev/null || dep_not_found $dep stat /usr/share/iglupkg/$dep > /dev/null 2> /dev/null || dep_not_found $dep
done done
tar -xf $1 -C / tar -xf $1 -C /
rm -r /tmp/lazybox/$bname_we rm -r /tmp/iglunix/$bname_we
elif [ "$f" = "1" ]; then elif [ "$f" = "1" ]; then
stat /usr/share/lazypkg/$1 > /dev/null 2> /dev/null || find_fail stat /usr/share/iglupkg/$1 > /dev/null 2> /dev/null || find_fail
sed -n '/\[fs\]/,$p' /usr/share/lazypkg/$1 | grep -v "\[fs\]" sed -n '/\[fs\]/,$p' /usr/share/iglupkg/$1 | grep -v "\[fs\]"
elif [ "$l" = "1" ]; then elif [ "$l" = "1" ]; then
stat /usr/share/lazypkg/$1 > /dev/null 2> /dev/null || find_fail stat /usr/share/iglupkg/$1 > /dev/null 2> /dev/null || find_fail
sed -n '/\[license\]/,/\[fs\]/{/\[license\]\|\[fs\]/!p}' /usr/share/lazypkg/$1 sed -n '/\[license\]/,/\[fs\]/{/\[license\]\|\[fs\]/!p}' /usr/share/iglupkg/$1
elif [ "$u" = "1" ]; then elif [ "$u" = "1" ]; then
stat /usr/share/lazypkg/$1 > /dev/null 2> /dev/null || find_fail stat /usr/share/iglupkg/$1 > /dev/null 2> /dev/null || find_fail
FILES=$(sed -n '/\[fs\]/,$p' /usr/share/lazypkg/$1 | grep -v "\[fs\]" | awk '{print length, $0}' | sort -rn | cut -d " " -f2-) FILES=$(sed -n '/\[fs\]/,$p' /usr/share/iglupkg/$1 | grep -v "\[fs\]" | awk '{print length, $0}' | sort -rn | cut -d " " -f2-)
echo "Uninstalling $1" echo "Uninstalling $1"
continue_interactive continue_interactive

View file

@ -35,9 +35,9 @@ mkdir -p $dir/out/$pkgname
pkgdir=$dir/out/$pkgname package pkgdir=$dir/out/$pkgname package
mkdir -p $dir/out/$pkgname/usr/share/lazypkg mkdir -p $dir/out/$pkgname/usr/share/iglupkg
cat > $dir/out/$pkgname/usr/share/lazypkg/$pkgname << EOF cat > $dir/out/$pkgname/usr/share/iglupkg/$pkgname << EOF
[pkg] [pkg]
name=$pkgname name=$pkgname
ver=$pkgver ver=$pkgver
@ -46,15 +46,15 @@ deps=$deps
[license] [license]
EOF EOF
chmod 644 $dir/out/$pkgname/usr/share/lazypkg/$pkgname chmod 644 $dir/out/$pkgname/usr/share/iglupkg/$pkgname
cd $srcdir cd $srcdir
license >> $dir/out/$pkgname/usr/share/lazypkg/$pkgname license >> $dir/out/$pkgname/usr/share/iglupkg/$pkgname
echo >> $dir/out/$pkgname/usr/share/lazypkg/$pkgname echo >> $dir/out/$pkgname/usr/share/iglupkg/$pkgname
echo [fs] >> $dir/out/$pkgname/usr/share/lazypkg/$pkgname echo [fs] >> $dir/out/$pkgname/usr/share/iglupkg/$pkgname
cd $dir/out/$pkgname/ cd $dir/out/$pkgname/
find * >> $dir/out/$pkgname/usr/share/lazypkg/$pkgname find * >> $dir/out/$pkgname/usr/share/iglupkg/$pkgname
cd $dir/out/$pkgname cd $dir/out/$pkgname
tar -cf ../$pkgname.$pkgver.tar.xz * tar -cf ../$pkgname.$pkgver.tar.xz *
@ -69,9 +69,9 @@ echo $ext | tr ':' '\n' | while read e; do
package_\$(echo \$e | tr '-' '_') package_\$(echo \$e | tr '-' '_')
mkdir -p $dir/out/$pkgname-\$e/usr/share/lazypkg mkdir -p $dir/out/$pkgname-\$e/usr/share/iglupkg
cat > $dir/out/$pkgname-\$e/usr/share/lazypkg/$pkgname-\$e << EOF cat > $dir/out/$pkgname-\$e/usr/share/iglupkg/$pkgname-\$e << EOF
[pkg] [pkg]
name=$pkgname-\$e name=$pkgname-\$e
ver=$pkgver ver=$pkgver
@ -80,16 +80,16 @@ deps=$pkgname
[license] [license]
EOF EOF
chmod 644 $dir/out/$pkgname-\$e/usr/share/lazypkg/$pkgname-\$e chmod 644 $dir/out/$pkgname-\$e/usr/share/iglupkg/$pkgname-\$e
cd $srcdir cd $srcdir
license >> $dir/out/$pkgname-\$e/usr/share/lazypkg/$pkgname-\$e license >> $dir/out/$pkgname-\$e/usr/share/iglupkg/$pkgname-\$e
echo >> $dir/out/$pkgname-\$e/usr/share/lazypkg/$pkgname-\$e echo >> $dir/out/$pkgname-\$e/usr/share/iglupkg/$pkgname-\$e
echo [fs] >> $dir/out/$pkgname-\$e/usr/share/lazypkg/$pkgname-\$e echo [fs] >> $dir/out/$pkgname-\$e/usr/share/iglupkg/$pkgname-\$e
cd $dir/out/$pkgname-\$e cd $dir/out/$pkgname-\$e
find * >> $dir/out/$pkgname-\$e/usr/share/lazypkg/$pkgname-\$e find * >> $dir/out/$pkgname-\$e/usr/share/iglupkg/$pkgname-\$e
cd $dir/out/$pkgname-\$e cd $dir/out/$pkgname-\$e
tar -cf ../$pkgname-\$e.$pkgver.tar.xz * tar -cf ../$pkgname-\$e.$pkgver.tar.xz *

View file

@ -73,7 +73,7 @@ build() {
-DCLANG_DEFAULT_CXX_STDLIB='libc++' \ -DCLANG_DEFAULT_CXX_STDLIB='libc++' \
-DCLANG_DEFAULT_RTLIB=compiler-rt \ -DCLANG_DEFAULT_RTLIB=compiler-rt \
-DCLANG_DEFAULT_UNWINDLIB=libunwind \ -DCLANG_DEFAULT_UNWINDLIB=libunwind \
-DCLANG_VENDOR="LazyBox" \ -DCLANG_VENDOR="Iglunix" \
-DCLANG_ENABLE_STATIC_ANALYZER=OFF \ -DCLANG_ENABLE_STATIC_ANALYZER=OFF \
-DCLANG_ENABLE_ARCMT=OFF \ -DCLANG_ENABLE_ARCMT=OFF \
-DCLANG_LINK_CLANG_DYLIB=OFF \ -DCLANG_LINK_CLANG_DYLIB=OFF \

View file

@ -8,8 +8,8 @@
-KERN="./barebones" -KERN="./barebones"
-RD="./big.init" -RD="./big.init"
+OUTPUT="/tiny-linux-bootloader/disk" +OUTPUT="/tiny-linux-bootloader/disk"
+KERN="/lazybox/isoout/vmlinuz" +KERN="/iglunix/isoout/vmlinuz"
+RD="/lazybox/isoout/initramfs.img" +RD="/iglunix/isoout/initramfs.img"
#size of kern + ramdisk #size of kern + ramdisk
K_SZ=`stat -c %s $KERN` K_SZ=`stat -c %s $KERN`