Adding compilation for liblzma and grub
This commit is contained in:
@@ -16,7 +16,17 @@ mkdir -p rootfs/chibrax
|
||||
|
||||
#installation de grub
|
||||
# coreutils = cat
|
||||
sudo pacstrap rootfs coreutils grub sed || exit 1
|
||||
sudo pacstrap rootfs device-mapper || exit 1
|
||||
|
||||
echo "construction de liblzma"
|
||||
chmod +x ./liblzma/build.sh
|
||||
cd liblzma && ./build.sh || exit 1 && cd -
|
||||
echo "done"
|
||||
|
||||
echo "construction de grub"
|
||||
chmod +x ./grub/build.sh
|
||||
cd grub && ./build.sh || exit 1 && cd -
|
||||
echo "done"
|
||||
|
||||
echo "construction de Nodejs"
|
||||
chmod +x ./nodejs/build.sh
|
||||
@@ -44,12 +54,4 @@ echo "done"
|
||||
|
||||
sudo cp rootfs\ overrides/* rootfs/ -r || exit 1
|
||||
|
||||
sudo rm rootfs/var/cache -r
|
||||
|
||||
echo "removing arch's grub hooks"
|
||||
sudo rm rootfs/etc/grub.d/10_linux
|
||||
sudo rm rootfs/etc/grub.d/20_linux_xen
|
||||
sudo rm rootfs/etc/grub.d/30_os-prober
|
||||
sudo rm rootfs/etc/grub.d/41_custom
|
||||
#celui sert a rien tant qu'on ne supporte pas l'uefi
|
||||
sudo rm rootfs/etc/grub.d/30_uefi-firmware
|
||||
sudo rm rootfs/var/cache -r
|
||||
+10
-10
@@ -42,20 +42,20 @@ cp rootfs/* $CHIBRAX_MOUNT_POINT -r
|
||||
echo "done"
|
||||
|
||||
echo "installing grub"
|
||||
mount --rbind /dev /mnt/mychroot/dev
|
||||
mount --make-rslave /mnt/mychroot/dev
|
||||
mount -t proc /proc /mnt/mychroot/proc
|
||||
mount --rbind /sys /mnt/mychroot/sys
|
||||
mount --make-rslave /mnt/mychroot/sys
|
||||
mount --rbind /tmp /mnt/mychroot/tmp
|
||||
mount --rbind /dev $CHIBRAX_MOUNT_POINT/dev
|
||||
mount --make-rslave $CHIBRAX_MOUNT_POINT/dev
|
||||
mount -t proc /proc $CHIBRAX_MOUNT_POINT/proc
|
||||
mount --rbind /sys $CHIBRAX_MOUNT_POINT/sys
|
||||
mount --make-rslave $CHIBRAX_MOUNT_POINT/sys
|
||||
mount --rbind /tmp $CHIBRAX_MOUNT_POINT/tmp
|
||||
|
||||
chroot $CHIBRAX_MOUNT_POINT grub-install --target=i386-pc ${LOOP_ROOT} --modules=part_msdos
|
||||
chroot $CHIBRAX_MOUNT_POINT grub-mkconfig -o /boot/grub/grub.cfg
|
||||
|
||||
umount /mnt/mychroot/dev
|
||||
umount /mnt/mychroot/proc
|
||||
umount /mnt/mychroot/sys
|
||||
umount /mnt/mychroot/tmp
|
||||
umount $CHIBRAX_MOUNT_POINT/dev
|
||||
umount $CHIBRAX_MOUNT_POINT/proc
|
||||
umount $CHIBRAX_MOUNT_POINT/sys
|
||||
umount $CHIBRAX_MOUNT_POINT/tmp
|
||||
|
||||
PARTUUID=$(lsblk $LOOP --fs | awk '{print $4}' | grep -v LABEL)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
if [ -f /bin/pacman ] # btw
|
||||
then
|
||||
sudo pacman -S python gcc make bc unzip wget sudo binutils nasm
|
||||
sudo pacman -S python gcc make bc unzip wget sudo binutils nasm autoconf diffutils binutils bison gettext flex
|
||||
else if [ -f /bin/apt ] #deb / ubuntu
|
||||
then
|
||||
sudo apt-get install python3 g++ make bc unzip wget sudo
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
src
|
||||
Executable
+32
@@ -0,0 +1,32 @@
|
||||
VER=2.06
|
||||
|
||||
if [ "$EUID" = 0 ]
|
||||
then echo "Please don't run this as root"
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
if [ ! -d src ]
|
||||
then
|
||||
mkdir -p src
|
||||
cd src
|
||||
curl https://git.savannah.gnu.org/cgit/grub.git/snapshot/grub-$VER.tar.gz --output grub.tar.gz
|
||||
tar xvf grub.tar.gz
|
||||
rm grub.tar.gz
|
||||
mv grub-$VER/* .
|
||||
cd -
|
||||
fi
|
||||
|
||||
cd src
|
||||
#no shure git.sv.gnu.org still exists but i had problems with my proxy anyway
|
||||
sed -i "s/git\:\/\/git\.sv\.gnu\.org\/gnulib/https\:\/\/git.savannah.gnu.org\/git\/gnulib.git/g" ./bootstrap
|
||||
|
||||
./bootstrap
|
||||
./configure --disable-werror
|
||||
make -j$(nproc)
|
||||
|
||||
DESTDIR=$(pwd)/../../rootfs
|
||||
|
||||
sudo make install DESTDIR=$(realpath $DESTDIR)
|
||||
cd -
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
|
||||
if [ "$EUID" = 0 ]
|
||||
then echo "Please don't run this as root"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ ! -d src ]
|
||||
then
|
||||
wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.5.tar.xz
|
||||
@@ -13,6 +19,7 @@ then
|
||||
|
||||
fi
|
||||
cd src
|
||||
# make clean qui supprime le .config
|
||||
make mrproper
|
||||
cp ../.config .config
|
||||
make -j$(nproc) bzImage
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
src
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
git clone https://github.com/kobolabs/liblzma src
|
||||
cd src
|
||||
git pull
|
||||
./configure
|
||||
make -j$(nproc)
|
||||
cd -
|
||||
|
||||
sudo cp src/src/liblzma/.libs/liblzma.so ../rootfs/usr/lib
|
||||
sudo cp src/src/liblzma/.libs/liblzma.so.5 ../rootfs/usr/lib
|
||||
@@ -17,4 +17,4 @@ module.exports = {
|
||||
init,
|
||||
after,
|
||||
before
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user