]> git.mdlowis.com Git - proto/aardvark-linux.git/commitdiff
Base system is working well enough to have a decent chroot shell available to do...
authorMike Lowis <mike.lowis@gentex.com>
Mon, 25 Jan 2016 13:23:35 +0000 (13:23 +0000)
committerMike Lowis <mike.lowis@gentex.com>
Mon, 25 Jan 2016 13:23:35 +0000 (13:23 +0000)
build.sh
config.sh
musl-cross-config.sh [new file with mode: 0644]

index 73898416f2c7d81a55312dd9a420550bf9532199..e6bb9ddbfdc8bbeb486c9ca0b57d5b7d6a6edf01 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -37,35 +37,57 @@ gitclone(){
 ###############################################################################
 # Build the Cross-Compiler
 ###############################################################################
-mkdir -vp $AL_TOOLS
-gitclone https://github.com/sabotage-linux/musl-cross.git "$AL_SOURCES/musl-cross"
-cd "$AL_SOURCES/musl-cross"
-cp "$AL/musl-cross-config.sh" config.sh
-./build.sh
-cd "$AL"
+if [ ! -d "$AL_TOOLS/$(uname -m)-linux-musl" ]; then
+    mkdir -vp $AL_TOOLS
+    gitclone https://github.com/sabotage-linux/musl-cross.git "$AL_SOURCES/musl-cross"
+    cd "$AL_SOURCES/musl-cross"
+    cp "$AL/musl-cross-config.sh" config.sh
+    ./build.sh
+    cd "$AL"
+fi
 
 ################################################################################
 ## Setup the Build Environment
 ################################################################################
-#export CC="$(uname -m)-linux-musl-gcc"
-#export CXX="$(uname -m)-linux-musl-g++"
-#export AR="$(uname -m)-linux-musl-ar"
-#export AS="$(uname -m)-linux-musl-as"
-#export LD="$(uname -m)-linux-musl-ld"
-#export RANLIB="$(uname -m)-linux-musl-ranlib"
-#export READELF="$(uname -m)-linux-musl-readelf"
-#export STRIP="$(uname -m)-linux-musl-strip"
-#export CFLAGS="-static"
-#export LDFLAGS="-static"
-#
+export CC="$(uname -m)-linux-musl-gcc"
+export CXX="$(uname -m)-linux-musl-g++"
+export AR="$(uname -m)-linux-musl-ar"
+export AS="$(uname -m)-linux-musl-as"
+export LD="$(uname -m)-linux-musl-ld"
+export RANLIB="$(uname -m)-linux-musl-ranlib"
+export READELF="$(uname -m)-linux-musl-readelf"
+export STRIP="$(uname -m)-linux-musl-strip"
+export LDFLAGS="--static"
+
 ################################################################################
 ## Setup the Build Environment
 ################################################################################
-#
-## Install sbase
-#gitclone http://git.suckless.org/sbase $AL_SOURCES/sbase
-#cd "$AL_SOURCES/sbase"
-#make CC=$CC -j8
-#make PREFIX=$AL_ROOT install
-#cd $AL
+
+# Install sbase
+gitclone http://git.suckless.org/sbase $AL_SOURCES/sbase
+cd "$AL_SOURCES/sbase"
+make CC="$CC" LD="$LD" LDFLAGS="$LDFLAGS" -j8
+make PREFIX=$AL_ROOT install
+cd $AL
+
+# Install ubase
+gitclone http://git.suckless.org/ubase $AL_SOURCES/ubase
+cd "$AL_SOURCES/ubase"
+make CC="$CC" LD="$LD" LDFLAGS="$LDFLAGS" -j8
+make PREFIX=$AL_ROOT install
+cd $AL
+
+# Install mksh
+fetch mksh-R52b.tgz https://www.mirbsd.org/MirOS/dist/mir/mksh/ "$AL_SOURCES/mksh"
+cd "$AL_SOURCES/mksh"
+if [ ! -f mksh ]; then
+    chmod +x Build.sh
+    ./Build.sh
+fi
+mkdir -p "$AL_ROOT/etc/" "$AL_ROOT/usr/share/doc/mksh/examples"
+cp mksh "$AL_ROOT/bin/"
+chmod 555 "$AL_ROOT/bin/mksh"
+cp dot.mkshrc "$AL_ROOT/usr/share/doc/mksh/examples"
+ln -svf mksh "$AL_ROOT/bin/sh"
+cd $AL
 
index 73ee7239a339cfafdbc9e02650b53e67807151d0..423ef46bda5ba70aad4ac3978fcc7365ee46ff28 100644 (file)
--- a/config.sh
+++ b/config.sh
@@ -22,24 +22,24 @@ export AL_TARBALLS=$AL/tarballs
 # Variable pointing to the sources directory
 export AL_SOURCES=$AL/sources
 
-export AL_TGT=$(uname -m)-linux-musl
 
 ###############################################################################
 # Build Environment Settings
 ###############################################################################
 
 # Setup the path to use the cross-tools when they're available
+export AL_TGT=$(uname -m)-linux-musl
 export PATH=$AL_ROOT/tools/$AL_TGT/bin:$PATH
 
-export CC=$AL_TGT-gcc
-export CXX=$AL_TGT-g++
-export AR=$AL_TGT-ar
-export AS=$AL_TGT-as
-export LD=$AL_TGT-ld
-export RANLIB=$AL_TGT-ranlib
-export READELF=$AL_TGT-readelf
-export STRIP=$AL_TGT-strip
-
-export CFLAGS="-static"
-export LDFLAGS="-static"
+#export CC=$AL_TGT-gcc
+#export CXX=$AL_TGT-g++
+#export AR=$AL_TGT-ar
+#export AS=$AL_TGT-as
+#export LD=$AL_TGT-ld
+#export RANLIB=$AL_TGT-ranlib
+#export READELF=$AL_TGT-readelf
+#export STRIP=$AL_TGT-strip
+#
+#export CFLAGS="-static"
+#export LDFLAGS="-static"
 
diff --git a/musl-cross-config.sh b/musl-cross-config.sh
new file mode 100644 (file)
index 0000000..6b36085
--- /dev/null
@@ -0,0 +1,26 @@
+# ARCH will be auto-detected as the host if not specified
+#ARCH=i486
+#ARCH=x86_64
+#ARCH=powerpc
+#ARCH=arm
+#ARCH=microblaze
+#ARCH=mips
+#ARCH=mipsel
+
+CC_BASE_PREFIX=$AL_TOOLS
+
+# If you use arm, you may need more fine-tuning:
+# arm hardfloat v7
+#TRIPLE=arm-linux-musleabihf
+#GCC_BOOTSTRAP_CONFFLAGS="--with-arch=armv7-a --with-float=hard --with-fpu=vfpv3-d16"
+#GCC_CONFFLAGS="--with-arch=armv7-a --with-float=hard --with-fpu=vfpv3-d16"
+
+# arm softfp
+#TRIPLE=arm-linux-musleabi
+#GCC_BOOTSTRAP_CONFFLAGS="--with-arch=armv7-a --with-float=softfp"
+#GCC_CONFFLAGS="--with-arch=armv7-a --with-float=softfp"
+
+MAKEFLAGS=-j8
+
+# Enable this to build the bootstrap gcc (thrown away) without optimization, to reduce build time
+GCC_STAGE1_NOOPT=1