Fixes
This commit is contained in:
parent
72a3dbf39c
commit
9f9fded8e9
5 changed files with 106 additions and 58 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,4 +5,5 @@ pkgs/*/out
|
||||||
isoroot
|
isoroot
|
||||||
isoout
|
isoout
|
||||||
fdiskscript
|
fdiskscript
|
||||||
|
diskroot
|
||||||
*.img
|
*.img
|
||||||
|
|
33
createimg.sh
33
createimg.sh
|
@ -1,21 +1,28 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
cat > fdiskscript << EOF
|
dd if=../tiny-linux-bootloader/disk of=lazybox.img
|
||||||
o
|
|
||||||
|
TOTAL=`stat -c %s lazybox.img`
|
||||||
|
|
||||||
|
SECTOR=$(($TOTAL / 512))
|
||||||
|
|
||||||
|
dd if=/dev/zero count=$((3145727 - $SECTOR)) >> lazybox.img
|
||||||
|
|
||||||
|
|
||||||
|
echo "o
|
||||||
n
|
n
|
||||||
p
|
p
|
||||||
1
|
1
|
||||||
63
|
32256
|
||||||
|
|
||||||
t
|
a
|
||||||
ef
|
1
|
||||||
w
|
w
|
||||||
EOF
|
" | fdisk lazybox.img
|
||||||
cat fdiskscript | fdisk lazybox.img
|
|
||||||
|
|
||||||
losetup -o 32256 /dev/loop0 lazybox.img
|
# losetup -o 32256 /dev/loop0 lazybox.img
|
||||||
mkfs.vfat /dev/loop0
|
# mkfs.vfat /dev/loop0
|
||||||
mount /dev/loop0 ./isoroot
|
# mount /dev/loop0 ./isoroot
|
||||||
#rm -r isoroot/*
|
# #rm -r isoroot/*
|
||||||
cp -r isoout/* isoroot
|
# #cp -r isoout/* isoroot
|
||||||
umount ./isoroot
|
# umount ./isoroot
|
||||||
|
|
123
geninitrd.sh
123
geninitrd.sh
|
@ -13,34 +13,36 @@
|
||||||
mkdir isoroot
|
mkdir isoroot
|
||||||
mkdir isoout
|
mkdir isoout
|
||||||
|
|
||||||
cp_iso_packages (){
|
mkdir diskroot
|
||||||
|
|
||||||
|
cp_packages (){
|
||||||
#NOTE: this will assume that there always is a '*-dev'/'*-doc' package,\n this is not true.
|
#NOTE: this will assume that there always is a '*-dev'/'*-doc' package,\n this is not true.
|
||||||
# That's why the errors are shown to some one who cares.
|
# That's why the errors are shown to some one who cares.
|
||||||
for pkg in ${packages[@]}
|
for pkg in ${packages[@]}
|
||||||
do
|
do
|
||||||
echo "Going to copy: $pkg to isoroot"
|
echo "Going to copy: $pkg to $1"
|
||||||
tar -xf pkgs/${pkg}/out/${pkg}.*.tar.xz -C ./isoroot
|
tar -xf pkgs/${pkg}/out/${pkg}.*.tar.xz -C $1
|
||||||
tar -xf pkgs/${pkg}/out/${pkg}-dev.*.tar.xz -C ./isoroot 2> /dev/null
|
tar -xf pkgs/${pkg}/out/${pkg}-dev.*.tar.xz -C $1 2> /dev/null
|
||||||
tar -xf pkgs/${pkg}/out/${pkg}-doc.*.tar.xz -C ./isoroot 2> /dev/null
|
tar -xf pkgs/${pkg}/out/${pkg}-doc.*.tar.xz -C $1 2> /dev/null
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
packages=(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 lazybox)
|
||||||
cp_iso_packages
|
packages=(musl linux mksh busybox toybox lazybox)
|
||||||
|
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)
|
||||||
|
#cp_packages ./diskroot
|
||||||
|
|
||||||
cat >isoroot/init << EOF
|
cat >isoroot/init << EOF
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
exec /sbin/init
|
exec /sbin/init
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
chmod +x isoroot/init
|
rm isoroot/sbin/init
|
||||||
|
cat >isoroot/sbin/init << EOF
|
||||||
mkdir -p isoroot/etc/init.d/
|
|
||||||
|
|
||||||
|
|
||||||
cat >isoroot/etc/init.d/rcS << EOF
|
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
export PATH=/usr/sbin:/usr/bin:/sbin:/bin
|
export PATH=/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
mkdir /proc
|
mkdir /proc
|
||||||
mkdir /sys
|
mkdir /sys
|
||||||
|
@ -49,57 +51,90 @@ mount -t proc proc /proc
|
||||||
mount -t sysfs sysfs /sys
|
mount -t sysfs sysfs /sys
|
||||||
mount -t tmpfs tmpfs /tmp
|
mount -t tmpfs tmpfs /tmp
|
||||||
|
|
||||||
echo 0 > /proc/sys/kernel/printk
|
|
||||||
|
|
||||||
ln -s /proc/self/fd/0 /dev/stdin
|
|
||||||
ln -s /proc/self/fd/1 /dev/stdout
|
|
||||||
ln -s /proc/self/fd/2 /dev/stderr
|
|
||||||
|
|
||||||
busybox mdev -s
|
busybox mdev -s
|
||||||
busybox mdev -d
|
busybox mdev -d
|
||||||
|
|
||||||
mkdir -p /dev/pts
|
exec /bin/sh
|
||||||
mount -t devpts devpts /dev/pts
|
|
||||||
|
|
||||||
hostname -F /etc/hostname
|
mkdir /mnt
|
||||||
|
|
||||||
mount -a
|
# while not mount $(blkid -L LAZYBOX_BS_MEDIA) /mnt; do
|
||||||
|
# echo "Failed to mount boot disk"
|
||||||
|
# echo "Retrying"
|
||||||
|
# sleep 0.5
|
||||||
|
# done
|
||||||
|
|
||||||
#busybox modprobe broadcom
|
exec switch_root /mnt
|
||||||
#busybox modprobe tg3
|
|
||||||
#ifconfig eth0 192.168.2.16
|
|
||||||
#busybox route add default gw 192.168.2.1
|
|
||||||
#busybox modprobe radeon
|
|
||||||
|
|
||||||
#busybox telnetd
|
|
||||||
|
|
||||||
#clear
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
chmod +x isoroot/etc/init.d/rcS
|
|
||||||
|
|
||||||
cp /etc/inittab isoroot/etc/
|
chmod +x isoroot/init
|
||||||
|
chmod +x isoroot/sbin/init
|
||||||
|
|
||||||
|
# mkdir -p isoroot/etc/init.d/
|
||||||
|
|
||||||
|
|
||||||
|
# cat >isoroot/etc/init.d/rcS << EOF
|
||||||
|
# #!/bin/sh
|
||||||
|
# export PATH=/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
|
# mkdir /proc
|
||||||
|
# mkdir /sys
|
||||||
|
# mkdir /tmp
|
||||||
|
# mount -t proc proc /proc
|
||||||
|
# mount -t sysfs sysfs /sys
|
||||||
|
# mount -t tmpfs tmpfs /tmp
|
||||||
|
|
||||||
|
# echo 0 > /proc/sys/kernel/printk
|
||||||
|
|
||||||
|
# ln -s /proc/self/fd/0 /dev/stdin
|
||||||
|
# ln -s /proc/self/fd/1 /dev/stdout
|
||||||
|
# ln -s /proc/self/fd/2 /dev/stderr
|
||||||
|
|
||||||
|
# busybox mdev -s
|
||||||
|
# busybox mdev -d
|
||||||
|
|
||||||
|
# mkdir -p /dev/pts
|
||||||
|
# mount -t devpts devpts /dev/pts
|
||||||
|
|
||||||
|
# hostname -F /etc/hostname
|
||||||
|
|
||||||
|
# mount -a
|
||||||
|
|
||||||
|
# #busybox modprobe broadcom
|
||||||
|
# #busybox modprobe tg3
|
||||||
|
# #ifconfig eth0 192.168.2.16
|
||||||
|
# #busybox route add default gw 192.168.2.1
|
||||||
|
# #busybox modprobe radeon
|
||||||
|
|
||||||
|
# #busybox telnetd
|
||||||
|
|
||||||
|
# #clear
|
||||||
|
|
||||||
|
# EOF
|
||||||
|
# chmod +x isoroot/etc/init.d/rcS
|
||||||
|
|
||||||
|
# cp /etc/inittab isoroot/etc/
|
||||||
|
|
||||||
cd isoroot
|
cd isoroot
|
||||||
find . | cpio -ov | gzip -9 >../isoout/initramfs.img
|
find . | cpio -ov | gzip -9 >../isoout/initramfs.img
|
||||||
cp boot/vmlinuz ../isoout/vmlinuz
|
cp boot/vmlinuz ../isoout/vmlinuz
|
||||||
|
|
||||||
cd ../isoout
|
# cd ../isoout
|
||||||
mkdir -p EFI/BOOT
|
# mkdir -p EFI/BOOT
|
||||||
cp ~/Shell.efi EFI/BOOT/BOOTX64.EFI
|
# cp ~/Shell.efi EFI/BOOT/BOOTX64.EFI
|
||||||
|
|
||||||
cat >startup.nsh << EOF
|
# cat >startup.nsh << EOF
|
||||||
\vmlinuz initrd=\initramfs.img console=ttyS0 console=tty0
|
# \vmlinuz initrd=\initramfs.img console=ttyS0 console=tty0
|
||||||
|
|
||||||
|
|
||||||
EOF
|
# EOF
|
||||||
|
|
||||||
exit
|
exit
|
||||||
|
|
||||||
#dd if=/dev/zero of=lazybox.img count=524288
|
dd if=/dev/zero of=lazybox.img count=524288
|
||||||
#fdisk lazybox.img
|
fdisk lazybox.img
|
||||||
cd ..
|
|
||||||
losetup -o 32256 /dev/loop0 lazybox.img
|
#losetup -o 32256 /dev/loop0 lazybox.img
|
||||||
mount /dev/loop0 ./isoroot
|
mount /dev/loop0 ./isoroot
|
||||||
rm -r isoroot/*
|
rm -r isoroot/*
|
||||||
cp -r isoout/* isoroot
|
cp -r isoout/* isoroot
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
pkgname=mesa
|
pkgname=mesa
|
||||||
pkgver=build-byacc
|
pkgver=build-byacc
|
||||||
|
deps="musl:wayland:wayland-protocols:llvm:zlib:expat:libffi:libdrm"
|
||||||
ext=dev
|
ext=dev
|
||||||
|
|
||||||
fetch() {
|
fetch() {
|
||||||
|
|
|
@ -24,6 +24,7 @@ _clear_vendor_checksums() {
|
||||||
|
|
||||||
fetch() {
|
fetch() {
|
||||||
curl "https://static.rust-lang.org/dist/rustc-$pkgver-src.tar.gz" -o $pkgname-$pkgver.tar.xz
|
curl "https://static.rust-lang.org/dist/rustc-$pkgver-src.tar.gz" -o $pkgname-$pkgver.tar.xz
|
||||||
|
# curl "https://static.rust-lang.org/dist/rustc-nightly-src.tar.gz" -o $pkgname-
|
||||||
tar -xf $pkgname-$pkgver.tar.xz
|
tar -xf $pkgname-$pkgver.tar.xz
|
||||||
|
|
||||||
mv rustc-$pkgver-src $pkgname-$pkgver
|
mv rustc-$pkgver-src $pkgname-$pkgver
|
||||||
|
@ -42,6 +43,7 @@ fetch() {
|
||||||
_clear_vendor_checksums openssl-src
|
_clear_vendor_checksums openssl-src
|
||||||
rm -rf src/llvm-project/
|
rm -rf src/llvm-project/
|
||||||
|
|
||||||
|
cd ..
|
||||||
ln -s /usr/bin/gmake make
|
ln -s /usr/bin/gmake make
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,7 +80,9 @@ build() {
|
||||||
--set="target.x86_64-unknown-linux-musl.cc=cc" \
|
--set="target.x86_64-unknown-linux-musl.cc=cc" \
|
||||||
--set="target.x86_64-unknown-linux-musl.cxx=c++" \
|
--set="target.x86_64-unknown-linux-musl.cxx=c++" \
|
||||||
--set="target.x86_64-unknown-linux-musl.ar=ar" \
|
--set="target.x86_64-unknown-linux-musl.ar=ar" \
|
||||||
--set="target.x86_64-unknown-linux-musl.linker=cc"
|
--set="target.x86_64-unknown-linux-musl.linker=cc" \
|
||||||
|
--set="build.rustc=/root/lazybox/diskroot/usr/bin/rustc" \
|
||||||
|
--set="build.cargo=/root/lazybox/diskroot/usr/bin/cargo"
|
||||||
|
|
||||||
sed 's/#deny-warnings = .*/deny-warnings = false/' -i config.toml
|
sed 's/#deny-warnings = .*/deny-warnings = false/' -i config.toml
|
||||||
sed 's|deny(warnings,|deny(|' -i src/bootstrap/lib.rs
|
sed 's|deny(warnings,|deny(|' -i src/bootstrap/lib.rs
|
||||||
|
|
Loading…
Reference in a new issue