Add tcc 0.9.26
This is the first tcc, which will be used to build 0.9.26p1. Instructions taken from bootstrap.sh in tcc-0.9.26p1. p1 denotes it has been patched.
This commit is contained in:
parent
360cd528be
commit
39e0a366be
|
@ -13,3 +13,6 @@
|
|||
[submodule "sysa/nyacc"]
|
||||
path = sysa/nyacc
|
||||
url = https://git.savannah.gnu.org/git/nyacc.git
|
||||
[submodule "sysa/tcc-0.9.26p1"]
|
||||
path = sysa/tcc-0.9.26p1
|
||||
url = https://gitlab.com/janneke/tinycc
|
||||
|
|
36
rootfs.sh
36
rootfs.sh
|
@ -1,6 +1,9 @@
|
|||
#!/bin/bash
|
||||
set -ex
|
||||
|
||||
QEMU_CMD=$1
|
||||
RAM=$2
|
||||
|
||||
pushd sysa
|
||||
|
||||
# SYSTEM A
|
||||
|
@ -10,7 +13,6 @@ mkdir -p tmp/
|
|||
sudo mount -t tmpfs -o size=8G tmpfs tmp
|
||||
|
||||
# base: mescc-tools-seed
|
||||
|
||||
# copy in all the mescc-tools-seed stuff
|
||||
cp -r mescc-tools-seed/x86/* tmp
|
||||
cp -r mescc-tools-seed/{M2-Planet,mes-m2,mescc-tools} tmp/
|
||||
|
@ -21,15 +23,23 @@ cp -r ../bootstrap-seeds tmp/
|
|||
# replace the init kaem with our own custom one
|
||||
mv tmp/kaem.run tmp/mescc-tools-seed.kaem.run
|
||||
cp base.kaem.run tmp/kaem.run
|
||||
# checkout new version of mescc-tools
|
||||
pushd tmp/mescc-tools
|
||||
git fetch
|
||||
git checkout 5768b2a79036f34b9bd420ab4801ad7dca15dff8
|
||||
popd
|
||||
# create directories needed
|
||||
mkdir tmp/bin
|
||||
|
||||
# after mescc-tools-seed we get into our own little directory because
|
||||
# after mescc-tools-seed we get into our own directory because
|
||||
# the mescc-tools-seed one is hella messy
|
||||
mkdir tmp/after/bin -p
|
||||
mkdir tmp/after/{lib,include}
|
||||
mkdir tmp/after/lib/{tcc,linux}
|
||||
ln -s . tmp/after/lib/x86-mes
|
||||
ln -s . tmp/after/lib/linux/x86-mes
|
||||
mkdir tmp/after/include/{mes,gnu,linux,sys,mach}
|
||||
mkdir tmp/after/include/linux/x86
|
||||
mkdir tmp/after/include/linux/{x86,x86_64}
|
||||
# put all the kaems for after in
|
||||
cp after.kaem tmp/
|
||||
cp after.kaem.run tmp/after/kaem.run
|
||||
|
@ -46,13 +56,26 @@ popd
|
|||
|
||||
# mes
|
||||
cp -r mes tmp/after/
|
||||
cp -r mes tmp/after/tcc-mes
|
||||
ln -s lib/x86-mes tmp/after/mes/x86-mes
|
||||
cp -r nyacc tmp/after/
|
||||
cp mes.kaem tmp/after/
|
||||
cp mes-files/mescc.scm tmp/after/bin/
|
||||
cp mes-files/config.h tmp/after/mes/include/mes/
|
||||
cp mes-files/config.h tmp/after/tcc-mes/include/mes/
|
||||
mkdir tmp/after/mes/{bin,m2}
|
||||
|
||||
# tcc 0.9.26
|
||||
cp tcc.kaem tmp/after/
|
||||
cp -r tcc-0.9.26p1 tmp/after/
|
||||
pushd tmp/after/tcc-0.9.26p1
|
||||
cp ../../../tcc-0.9.26p1-files/config.h .
|
||||
ln -s ../mes/module .
|
||||
ln -s ../mes/mes .
|
||||
ln -s /after/lib x86-mes
|
||||
ln -s /after/lib/linux .
|
||||
popd
|
||||
|
||||
# General cleanup
|
||||
find tmp -name .git -exec rm -rf \;
|
||||
|
||||
|
@ -61,13 +84,14 @@ cd tmp
|
|||
find . | cpio -H newc -o | gzip > initramfs.igz
|
||||
|
||||
# Run
|
||||
qemu-system-x86_64 -enable-kvm \
|
||||
-m 16G \
|
||||
${QEMU_CMD:-qemu-system-x86_64} -enable-kvm \
|
||||
-m ${RAM:-8G} \
|
||||
-nographic \
|
||||
-no-reboot \
|
||||
-kernel ../../kernel -initrd initramfs.igz -append console=ttyS0,kernel.panic=2
|
||||
-kernel ../../kernel -initrd initramfs.igz -append console=ttyS0
|
||||
|
||||
cd ../..
|
||||
|
||||
# Cleanup
|
||||
sudo umount sysa/tmp
|
||||
|
||||
|
|
|
@ -38,10 +38,14 @@ cd ..
|
|||
bin/get_machine bin/mes-m2 bin/kaem bin/catm
|
||||
|
||||
# Part 4: blynn-compiler
|
||||
|
||||
cd blynn-compiler
|
||||
kaem --file go.kaem
|
||||
cd ..
|
||||
|
||||
# Part 5: mes
|
||||
kaem --file mes.kaem
|
||||
|
||||
# Part 6: tcc
|
||||
cd tcc-0.9.26p1
|
||||
kaem --file ../tcc.kaem
|
||||
cd ..
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit b65c9026d3ddeed5007e5aa1e709dc4006778293
|
||||
Subproject commit 75493bc386a4bd19d8d1ce92cf004e994d8d9932
|
|
@ -209,6 +209,14 @@ cp /after/bin/mes-new /after/bin/mes
|
|||
cp ${libdir}/x86-mes/libc.a /after/lib/
|
||||
cp ${libdir}/x86-mes/libc+tcc.a /after/lib/
|
||||
cp ${libdir}/x86-mes/libmescc.a /after/lib/
|
||||
cp ${libdir}/x86-mes/libc.s /after/lib/
|
||||
cp ${libdir}/x86-mes/libc+tcc.s /after/lib/
|
||||
cp ${libdir}/x86-mes/libmescc.s /after/lib/
|
||||
cp ${libdir}/x86-mes/x86.M1 /after/lib/
|
||||
cp crt1.o /after/lib/
|
||||
cp crt1.s /after/lib/
|
||||
cp ${libdir}/linux/x86-mes/elf32-footer-single-main.hex2 /after/lib/linux/
|
||||
cp ${libdir}/linux/x86-mes/elf32-header.hex2 /after/lib/linux/
|
||||
|
||||
# Install header files
|
||||
cp include/alloca.h /after/include/alloca.h
|
||||
|
@ -279,3 +287,5 @@ cp include/sys/wait.h /after/include/sys/wait.h
|
|||
# Test mes
|
||||
libdir=/after/lib
|
||||
${MES} -c "(display 'Hello,Mes!) (newline)"
|
||||
|
||||
cd ..
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 5bba73ccca0e794a6557de166b91923228cb6f73
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue