summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2023-07-22 10:34:03 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2023-07-22 10:34:03 +0200
commitd909afeed29663ce6f4c6f56bee82644eeccaab9 (patch)
tree75455f5e73add51b53e9efb22455350fe757673f /scripts
parent0a4cd9a19b07469e886f0879838394155ea87bb5 (diff)
downloadi486tcc-linux-d909afeed29663ce6f4c6f56bee82644eeccaab9.tar.gz
i486tcc-linux-d909afeed29663ce6f4c6f56bee82644eeccaab9.tar.bz2
added tinyx from puppy, rxvt and minimal fonts
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build.sh42
-rwxr-xr-xscripts/create_root.sh2
-rwxr-xr-xscripts/run_qemu_direct.sh3
3 files changed, 46 insertions, 1 deletions
diff --git a/scripts/build.sh b/scripts/build.sh
index 6f8477f..f6b9722 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -422,6 +422,48 @@ else
echo "stage1 dropbear exists"
fi
+if [ ! -f "${BASE}/build/stage1/lib/libX11.a" ]; then
+ rm -rf "tinyxlib-${TINYXLIB_VERSION}"
+ tar xf "${BASE}/downloads/tinyxlib-${TINYXLIB_VERSION}.tar.gz"
+ cd "tinyxlib-${TINYXLIB_VERSION}"
+ patch -Np1 < "${BASE}/patches/tinyxlib-tcc.patch"
+ make -j$CPUS CC="${BASE}/build/stage1/bin/i386-tcc" \
+ COMPFLAGS="-Os -march=i486 -Wall -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_GNU_SOURCE -fno-strength-reduce -nostdlib -fno-strict-aliasing -I. -ffunction-sections -fdata-sections" \
+ LDFLAGS=""
+ mkdir -p "${BASE}/build/stage1/share/X11"
+ make -j$CPUS DESTDIR="${BASE}/build/stage1" PREDIR=/ -j$CPUS install
+ cd ..
+else
+ echo "stage1 tinyxlib exists"
+fi
+
+if [ ! -f "${BASE}/build/stage1/bin/Xfbdev" ]; then
+ rm -rf "tinyxserver-${TINYXSERVER_VERSION}"
+ tar xf "${BASE}/downloads/tinyxserver-${TINYXSERVER_VERSION}.tar.gz"
+ cd "tinyxserver-${TINYXSERVER_VERSION}"
+ patch -Np1 < "${BASE}/patches/tinyxserver-tcc.patch"
+ make -j$CPUS BASE="${BASE}" core Xfbdev xinit
+ make -j$CPUS BASE="${BASE}" DESTDIR="${BASE}/build/stage1" PREDIR=/ -j$CPUS install
+ cd ..
+else
+ echo "stage1 Xfbdev exists"
+fi
+
+if [ ! -f "${BASE}/build/stage1/bin/rxvt" ]; then
+ rm -rf "rxvt-${RXVT_VERSION}"
+ tar xf "${BASE}/downloads/rxvt-${RXVT_VERSION}.tar.gz"
+ cd "rxvt-${RXVT_VERSION}"
+ CC="${BASE}/build/stage1/bin/i386-tcc" \
+ ./configure --enable-static --prefix="${BASE}/build/stage1" \
+ --x-includes="${BASE}/build/stage1/include" \
+ --x-libraries="${BASE}/build/stage1/lib"
+ make -j$CPUS LDFLAGS="-static"
+ make -j$CPUS install
+ cd ..
+else
+ echo "stage1 rxvt exists"
+fi
+
# TODO FROM HERE
# TODO: have some way to deal with dependencies and with the user
diff --git a/scripts/create_root.sh b/scripts/create_root.sh
index 1adc8e9..727093f 100755
--- a/scripts/create_root.sh
+++ b/scripts/create_root.sh
@@ -77,6 +77,8 @@ test -d "${ROOT}/bin" || mkdir "${ROOT}/bin"
cp -dR "${LOCAL}"/bin/* "${ROOT}/bin"
test -d "${ROOT}/etc" || mkdir "${ROOT}/etc"
cp -dR "${LOCAL}"/etc/* "${ROOT}/etc"
+test -d "${ROOT}/share" || mkdir "${ROOT}/share"
+cp -dR "${LOCAL}"/share/* "${ROOT}/share"
# copy ramdisk, boot loader and kernel to /boot
cp ramdisk.img "${ROOT}/boot"
diff --git a/scripts/run_qemu_direct.sh b/scripts/run_qemu_direct.sh
index 0e34b13..974515e 100755
--- a/scripts/run_qemu_direct.sh
+++ b/scripts/run_qemu_direct.sh
@@ -4,7 +4,8 @@ qemu-nbd -f raw root.img -x ROOT &
sleep 2 && \
qemu-system-i386 -cpu 486 -m 24M -machine isapc \
-kernel bzImage -initrd ramdisk.img \
- -append "debug loglevel=7 earlycon=vga earlycon=uart8250,io,0x3f8,9600n8 console=tty0 console=ttyS0,9600n8 iommu=off nomodeset init=/init" \
+ -append "debug loglevel=7 earlycon=vga earlycon=uart8250,io,0x3f8,9600n8 console=tty0 console=ttyS0,9600n8 iommu=off init=/init vga=0x311" \
-netdev user,id=net0,net=10.0.0.0/24,host=10.0.0.2,dhcpstart=10.0.0.16,hostfwd=tcp::2222-:22 \
+ -vga std \
-device ne2k_isa,iobase=0x300,irq=10,netdev=net0
pkill qemu-nbd