mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-11 22:05:23 +01:00
Switch to using mes/nyacc tar packages.
This commit is contained in:
parent
7ff2de94c5
commit
40f40ea850
10 changed files with 77 additions and 104 deletions
|
|
@ -8,57 +8,62 @@
|
|||
|
||||
set -ex
|
||||
|
||||
PATH=/after/bin:/bin
|
||||
PATH=/bin
|
||||
|
||||
# Set commonly used variables
|
||||
prefix=/after
|
||||
bindir=${prefix}/bin
|
||||
libdir=${prefix}/lib
|
||||
incdir=${prefix}/include
|
||||
MES_PREFIX=${prefix}/mes/src/mes
|
||||
GUILE_LOAD_PATH=${prefix}/mes/src/nyacc/module:${prefix}/mes/src/mes/mes/module:${prefix}/mes/src/mes/module
|
||||
NYACC_PKG=nyacc-1.00.2
|
||||
MES_PKG=mes
|
||||
MES_PREFIX=${prefix}/${MES_PKG}/src/mes-m2-a7522f26ee020dc498219d0122ea1b7d345bcdd5
|
||||
GUILE_LOAD_PATH=${MES_PREFIX}/mes/module:${MES_PREFIX}/module:${prefix}/${MES_PKG}/src/${NYACC_PKG}/module
|
||||
|
||||
cd ${prefix}
|
||||
|
||||
mkdir ${bindir}
|
||||
|
||||
# Remove remaining dependencies on / (root of /after)
|
||||
cp ../bin/blood-elf bin/blood-elf
|
||||
cp ../bin/catm bin/catm
|
||||
cp ../bin/chmod bin/chmod
|
||||
cp ../bin/get_machine bin/get_machine
|
||||
cp ../bin/hex2 bin/hex2
|
||||
cp ../bin/kaem bin/kaem
|
||||
cp ../bin/M1 bin/M1
|
||||
cp ../bin/M2-Planet bin/M2-Planet
|
||||
cp ../bin/mes-m2 bin/mes-m2
|
||||
cp ../bin/sha256sum bin/sha256sum
|
||||
cp ../bin/ungz bin/ungz
|
||||
cp ../bin/untar bin/untar
|
||||
cp /bin/blood-elf bin/blood-elf
|
||||
cp /bin/catm bin/catm
|
||||
cp /bin/chmod bin/chmod
|
||||
cp /bin/get_machine bin/get_machine
|
||||
cp /bin/hex2 bin/hex2
|
||||
cp /bin/kaem bin/kaem
|
||||
cp /bin/M1 bin/M1
|
||||
cp /bin/M2-Planet bin/M2-Planet
|
||||
cp /bin/mkdir bin/mkdir
|
||||
cp /bin/sha256sum bin/sha256sum
|
||||
cp /bin/ungz bin/ungz
|
||||
cp /bin/untar bin/untar
|
||||
|
||||
/bin/cp /bin/cp /after/bin/cp
|
||||
cp /bin/cp /after/bin/cp
|
||||
|
||||
/bin/chmod 755 bin/blood-elf
|
||||
/bin/chmod 755 bin/catm
|
||||
/bin/chmod 755 bin/chmod
|
||||
/bin/chmod 755 bin/cp
|
||||
/bin/chmod 755 bin/get_machine
|
||||
/bin/chmod 755 bin/hex2
|
||||
/bin/chmod 755 bin/kaem
|
||||
/bin/chmod 755 bin/M1
|
||||
/bin/chmod 755 bin/M2-Planet
|
||||
/bin/chmod 755 bin/mes-m2
|
||||
/bin/chmod 755 bin/sha256sum
|
||||
/bin/chmod 755 bin/ungz
|
||||
/bin/chmod 755 bin/untar
|
||||
|
||||
sha256sum -c stage0-posix-checksums
|
||||
chmod 755 bin/blood-elf
|
||||
chmod 755 bin/catm
|
||||
chmod 755 bin/chmod
|
||||
chmod 755 bin/cp
|
||||
chmod 755 bin/get_machine
|
||||
chmod 755 bin/hex2
|
||||
chmod 755 bin/kaem
|
||||
chmod 755 bin/M1
|
||||
chmod 755 bin/M2-Planet
|
||||
chmod 755 bin/mkdir
|
||||
chmod 755 bin/sha256sum
|
||||
chmod 755 bin/ungz
|
||||
chmod 755 bin/untar
|
||||
|
||||
PATH=/after/bin
|
||||
|
||||
# Needed for patch to work
|
||||
mkdir /tmp
|
||||
|
||||
# mes
|
||||
pkg="mes"
|
||||
pkg=${MES_PKG}
|
||||
cd ${pkg}
|
||||
kaem --file ${pkg}.kaem
|
||||
cd ..
|
||||
cd ${prefix}
|
||||
|
||||
# tcc 0.9.26
|
||||
pkg="tcc-0.9.26"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
d2e38ce7eab153cb2a019de92d12f1afc81f3ca0d4e068597fdab472250c7408 /after/bin/mes-m2
|
||||
e835fdb1cd8c7852e8c879f1efdea6f7392bdd04938f5a01a6199ab2730fac4b /after/bin/mes-m2
|
||||
b91c81e543b878ead4cc975df75e3d211f7bd2dcdd4c90e42df99d44311ce71e /after/bin/mescc.scm
|
||||
90811dafd33ad56b8e4b0adcc04263f9329b9047b7cc337abe8151a75017172c /after/lib/x86-mes/crt1.s
|
||||
e065af5f73d40b20029e9ba23143660f99c6abacb82d1b4c8f2067a4e395d553 /after/lib/x86-mes/crt1.o
|
||||
|
|
|
|||
|
|
@ -12,18 +12,31 @@ MES_ARENA=20000000
|
|||
MES_MAX_ARENA=20000000
|
||||
MES_STACK=6000000
|
||||
MES=${bindir}/mes-m2
|
||||
libdir=${prefix}/mes/src/mes/lib
|
||||
libdir=${MES_PREFIX}/lib
|
||||
|
||||
cp files/mescc.scm ${bindir}/
|
||||
chmod 755 ${bindir}/mescc.scm
|
||||
|
||||
cp files/config.h src/mes/include/mes
|
||||
# Unpack
|
||||
cd src
|
||||
ungz ${NYACC_PKG}.tar.gz
|
||||
untar ${NYACC_PKG}.tar
|
||||
ungz ${MES_PKG}.tar.gz
|
||||
untar ${MES_PKG}.tar
|
||||
|
||||
cd src/mes
|
||||
cp ../files/config.h ${MES_PREFIX}/include/mes
|
||||
|
||||
# Bootstrap Mes using M2-Planet
|
||||
kaem --verbose --file kaem.run
|
||||
chmod 755 ${MES}
|
||||
cd ${MES_PREFIX}
|
||||
|
||||
# These files are symlinked in the repo
|
||||
cp mes/module/srfi/srfi-9-struct.mes mes/module/srfi/srfi-9.mes
|
||||
cp mes/module/srfi/srfi-9/gnu-struct.mes mes/module/srfi/srfi-9/gnu.mes
|
||||
|
||||
# Build mes-m2
|
||||
mkdir bin m2
|
||||
kaem -v -f kaem.run
|
||||
cp bin/mes-m2 ${bindir}/mes-m2
|
||||
chmod 755 ${bindir}/mes-m2
|
||||
|
||||
# Build Mes C library using mes-m2 bootstrapped Mes
|
||||
|
||||
|
|
@ -184,6 +197,10 @@ ${MES} --no-auto-compile -e main ${bindir}/mescc.scm -- -c -D HAVE_CONFIG_H=1 -I
|
|||
catm ${libdir}/x86-mes/libc+tcc.a ${libdir}/x86-mes/libc.a islower.o isupper.o tolower.o toupper.o abtod.o dtoab.o search-path.o execvp.o fclose.o fdopen.o ferror.o fflush.o fopen.o fprintf.o fread.o fseek.o ftell.o fwrite.o printf.o remove.o snprintf.o sprintf.o sscanf.o vfprintf.o vprintf.o vsnprintf.o vsprintf.o vsscanf.o calloc.o qsort.o strtod.o strtof.o strtol.o strtold.o strtoll.o strtoul.o strtoull.o memmem.o strcat.o strchr.o strlwr.o strncpy.o strrchr.o strstr.o strupr.o sigaction.o ldexp.o mprotect.o localtime.o sigemptyset.o setjmp.o close.o rmdir.o stat.o
|
||||
catm ${libdir}/x86-mes/libc+tcc.s ${libdir}/x86-mes/libc.s islower.s isupper.s tolower.s toupper.s abtod.s dtoab.s search-path.s execvp.s fclose.s fdopen.s ferror.s fflush.s fopen.s fprintf.s fread.s fseek.s ftell.s fwrite.s printf.s remove.s snprintf.s sprintf.s sscanf.s vfprintf.s vprintf.s vsnprintf.s vsprintf.s vsscanf.s calloc.s qsort.s strtod.s strtof.s strtol.s strtold.s strtoll.s strtoul.s strtoull.s memmem.s strcat.s strchr.s strlwr.s strncpy.s strrchr.s strstr.s strupr.s sigaction.s ldexp.s mprotect.s localtime.s sigemptyset.s setjmp.s close.s rmdir.s stat.s
|
||||
|
||||
# Make directories
|
||||
mkdir ${prefix}/lib/linux ${incdir}/mes ${incdir}/sys ${incdir}/linux
|
||||
mkdir ${prefix}/lib/x86-mes ${prefix}/lib/linux/x86-mes ${incdir}/linux/x86
|
||||
|
||||
# Install libraries
|
||||
cp ${libdir}/x86-mes/libc.a ${prefix}/lib/x86-mes/
|
||||
cp ${libdir}/x86-mes/libc+tcc.a ${prefix}/lib/x86-mes/
|
||||
|
|
@ -264,7 +281,6 @@ cp include/sys/ucontext.h ${incdir}/sys/ucontext.h
|
|||
cp include/sys/user.h ${incdir}/sys/user.h
|
||||
cp include/sys/wait.h ${incdir}/sys/wait.h
|
||||
|
||||
cd ../..
|
||||
|
||||
# Checksums
|
||||
cd ${prefix}/${MES_PKG}
|
||||
sha256sum -c checksums
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 2ab4c5c676cb66088b0fb8de03b40b01f07bd4e0
|
||||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 06a0985332cfbc76e759da50d228d5aa01b4f6a9
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 880e60906b01bec7024d04250f41d9b6da4fa114
|
||||
Subproject commit 15a783e18f0f04a1195133f1ae9a3e799ef78ebf
|
||||
|
|
@ -76,6 +76,7 @@ mes-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o unified-libc-3.
|
|||
mes-tcc -ar cr ${libdir}/libc.a unified-libc-1.o unified-libc-2.o unified-libc-3.o
|
||||
|
||||
# libtcc1.a
|
||||
mkdir ${libdir}/tcc
|
||||
mes-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 lib/libtcc1.c
|
||||
mes-tcc -ar cr ${libdir}/tcc/libtcc1.a libtcc1.o
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue