added linux bootstrap step & fixed case statement for the other builds

This commit is contained in:
ag-tsotetsi
2026-02-07 14:19:03 +02:00
parent 71554453c3
commit 2f781b46b2
4 changed files with 52 additions and 0 deletions

View File

@@ -40,6 +40,7 @@ case $1 in
;;
toolchain)
toolchain
;;
setup)
setup
;;

View File

@@ -69,6 +69,7 @@ case $1 in
;;
toolchain)
toolchain
;;
setup)
setup
;;

43
build/linux/build.bash Normal file
View File

@@ -0,0 +1,43 @@
. $PROJECTDIR/build/linux/package.env
fetch $LINUX_URL
cd $SOURCES && tar xf linux-$LINUX_VERSION.tar.xz && cd linux-$LINUX_VERSION
make mrproper
bootstrap() {
make headers
find usr/include -type f ! -name '*.h' -delete
cp -r usr/include $SYSROOT/usr
}
toolchain() {
echo toolchain
}
setup() {
echo setup
}
final() {
echo final
}
case $1 in
bootstrap)
bootstrap
;;
toolchain)
toolchain
;;
setup)
setup
;;
final)
final
;;
esac
cd $SOURCES && rm -rf $SOURCES/linux-$LINUX_VERSION

7
build/linux/package.env Normal file
View File

@@ -0,0 +1,7 @@
export LINUX_VERSION=6.18.7
IFS='.' read -r LINUX_VERSION_MAJOR LINUX_VERSION_MINOR LINUX_VERSION_PATCH <<< $LINUX_VERSION
export LINUX_VERSION_MAJOR LINUX_VERSION_MINOR LINUX_VERSION_PATCH
export LINUX_URL=https://cdn.kernel.org/pub/linux/kernel/v$LINUX_VERSION_MAJOR.x/linux-$LINUX_VERSION.tar.xz