added linux bootstrap build
This commit is contained in:
23
build.sh
23
build.sh
@@ -43,6 +43,10 @@ ISL_URL=https://libisl.sourceforge.io/isl-$ISL_VERSION.tar.xz
|
|||||||
GLIBC_VERSION=2.43
|
GLIBC_VERSION=2.43
|
||||||
GLIBC_URL=https://mirror.ufs.ac.za/gnu/glibc/glibc-$GLIBC_VERSION.tar.xz
|
GLIBC_URL=https://mirror.ufs.ac.za/gnu/glibc/glibc-$GLIBC_VERSION.tar.xz
|
||||||
|
|
||||||
|
LINUX_VERSION=6.18.7
|
||||||
|
IFS='.' read -r LINUX_VERSION_MAJOR LINUX_VERSION_MINOR LINUX_VERSION_PATCH <<< $LINUX_VERSION
|
||||||
|
LINUX_URL=https://cdn.kernel.org/pub/linux/kernel/v$LINUX_VERSION_MAJOR.x/linux-$LINUX_VERSION.tar.xz
|
||||||
|
|
||||||
|
|
||||||
if [ ! -d "$SYSROOT" ]; then
|
if [ ! -d "$SYSROOT" ]; then
|
||||||
mkdir -p "$SYSROOT"/{etc,cross,sources,usr,dev,proc,sys,run}
|
mkdir -p "$SYSROOT"/{etc,cross,sources,usr,dev,proc,sys,run}
|
||||||
@@ -125,9 +129,22 @@ bootstap_gcc() {
|
|||||||
cd ..
|
cd ..
|
||||||
cat gcc/limitx.h gcc/glimits.h gcc/limity.h > "`dirname $($TARGET-gcc -print-libgcc-file-name)`/include/limits.h"
|
cat gcc/limitx.h gcc/glimits.h gcc/limity.h > "`dirname $($TARGET-gcc -print-libgcc-file-name)`/include/limits.h"
|
||||||
|
|
||||||
cd "$SOURCES"
|
cd "$SOURCES" && rm -rf gcc-$GCC_VERSION
|
||||||
rm -rf gcc-$GCC_VERSION
|
}
|
||||||
|
|
||||||
|
bootstap_linux() {
|
||||||
|
fetch $LINUX_URL
|
||||||
|
|
||||||
|
cd "$SOURCES" && tar xf linux-$LINUX_VERSION.tar.xz && cd linux-$LINUX_VERSION
|
||||||
|
|
||||||
|
make mrproper
|
||||||
|
make headers
|
||||||
|
find usr/include -type f ! -name '*.h' -delete
|
||||||
|
cp -r usr/include "$SYSROOT"/usr
|
||||||
|
|
||||||
|
cd "$SOURCES" && rm -rf linux-$LINUX_VERSION
|
||||||
}
|
}
|
||||||
|
|
||||||
#bootstrap_binutils
|
#bootstrap_binutils
|
||||||
bootstap_gcc
|
#bootstap_gcc
|
||||||
|
bootstap_linux
|
||||||
Reference in New Issue
Block a user