GIT_TAG="$(git tag | tail -1)" # Git Tag
GIT_LASTCOMMIT="$(git rev-parse --verify HEAD)" # Last commit
-TOOLCHAINVER=20200924
+TOOLCHAINVER=20210701
+
+# use multicore and max compression
+ZSTD_OPT="-T0 --ultra -22"
###############################################################################
#
CFLAGS_ARCH="-march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
;;
- armv5tel)
+ armv6l)
BUILDTARGET="${build_arch}-unknown-linux-gnueabi"
CROSSTARGET="${build_arch}-cross-linux-gnueabi"
BUILD_PLATFORM="arm"
- CFLAGS_ARCH="-march=armv5te -mfloat-abi=soft -fomit-frame-pointer"
- RUSTFLAGS="-Ccodegen-units=1"
+ CFLAGS_ARCH="-march=armv6zk+fp -mfpu=vfp -mfloat-abi=softfp -fomit-frame-pointer"
+ #RUSTFLAGS="-Ccodegen-units=1"
;;
riscv64)
# 128MB of memory. Therefore we find out how
# many processes fit into memory.
local mem_max=$(( ${SYSTEM_MEMORY} / 128 ))
- local cpu_max=$(( ${SYSTEM_PROCESSORS} + 1 ))
+ local cpu_max=$(( ${SYSTEM_PROCESSORS} ))
local parallelism
if [ ${mem_max} -lt ${cpu_max} ]; then
echo "aarch64"
;;
- armv7*|armv6*|armv5*)
- echo "armv5tel"
+ armv7*|armv6*)
+ echo "armv6l"
;;
riscv64)
mkdir -p "${BASEDIR}/build${TOOLS_DIR}" 2>/dev/null
mkdir -p $BASEDIR/build/{etc,usr/src} 2>/dev/null
mkdir -p $BASEDIR/build/{dev/{shm,pts},proc,sys}
- mkdir -p $BASEDIR/{cache,ccache/${BUILD_ARCH}} 2>/dev/null
+ mkdir -p $BASEDIR/{cache,ccache/${BUILD_ARCH}/${TOOLCHAINVER}} 2>/dev/null
if [ "${ENABLE_RAMDISK}" = "on" ]; then
mkdir -p $BASEDIR/build/usr/src
mount --bind /proc $BASEDIR/build/proc
mount --bind /sys $BASEDIR/build/sys
mount --bind $BASEDIR/cache $BASEDIR/build/usr/src/cache
- mount --bind $BASEDIR/ccache/${BUILD_ARCH} $BASEDIR/build/usr/src/ccache
+ mount --bind $BASEDIR/ccache/${BUILD_ARCH}/${TOOLCHAINVER} $BASEDIR/build/usr/src/ccache
mount --bind $BASEDIR/config $BASEDIR/build/usr/src/config
mount --bind $BASEDIR/doc $BASEDIR/build/usr/src/doc
mount --bind $BASEDIR/html $BASEDIR/build/usr/src/html
# Run LFS static binary creation scripts one by one
export CCACHE_DIR=$BASEDIR/ccache
export CCACHE_TEMPDIR="/tmp"
- export CCACHE_COMPRESS=1
export CCACHE_COMPILERCHECK="string:toolchain-${TOOLCHAINVER} ${BUILD_ARCH}"
# Remove pre-install list of installed files in case user erase some files before rebuild
BUILD_PLATFORM="${BUILD_PLATFORM}" \
CCACHE_DIR=/usr/src/ccache \
CCACHE_TEMPDIR="${CCACHE_TEMPDIR}" \
- CCACHE_COMPRESS="${CCACHE_COMPRESS}" \
CCACHE_COMPILERCHECK="${CCACHE_COMPILERCHECK}" \
GOCACHE="/usr/src/ccache/go" \
KVER="${KVER}" \
cd $BASEDIR/lfs && env -i \
PATH="${TOOLS_DIR}/ccache/bin:${TOOLS_DIR}/bin:$PATH" \
- CCACHE_DIR="${CCACHE_DIR}" \
+ CCACHE_DIR="${CCACHE_DIR}"/${BUILD_ARCH}/${TOOLCHAINVER} \
CCACHE_TEMPDIR="${CCACHE_TEMPDIR}" \
- CCACHE_COMPRESS="${CCACHE_COMPRESS}" \
CCACHE_COMPILERCHECK="${CCACHE_COMPILERCHECK}" \
CFLAGS="${CFLAGS}" \
CXXFLAGS="${CXXFLAGS}" \
# These are working.
;;
- armv5tel:armv5tel|armv5tel:armv5tejl|armv5tel:armv6l|armv5tel:armv7l|armv5tel:aarch64)
+ armv6l:armv6l|armv6l:armv7l|armv6l:aarch64)
# These are working.
;;
- armv5tel:*)
+ armv6l:*)
error=true
;;
esac
export LOGFILE
lfsmake1 stage1
- lfsmake1 ccache PASS=1
lfsmake1 binutils PASS=1
lfsmake1 gcc PASS=1
lfsmake1 linux KCFG="-headers"
lfsmake1 glibc
lfsmake1 libxcrypt
lfsmake1 gcc PASS=L
+ lfsmake1 zlib
+ lfsmake1 zstd
lfsmake1 binutils PASS=2
lfsmake1 gcc PASS=2
- lfsmake1 zlib
- lfsmake1 ccache PASS=2
+ lfsmake1 ccache
lfsmake1 tcl
lfsmake1 expect
lfsmake1 dejagnu
lfsmake2 screen
lfsmake2 elfutils
- case "${BUILD_ARCH}" in
- x86_64|aarch64)
- lfsmake2 linux KCFG=""
- lfsmake2 xtables-addons KCFG=""
- lfsmake2 linux-initrd KCFG=""
- ;;
- i586)
- # x86 kernel build
- lfsmake2 linux KCFG=""
- lfsmake2 xtables-addons KCFG=""
- lfsmake2 linux-initrd KCFG=""
- ;;
-
- armv5tel)
- # arm multi platform (Panda, Wandboard ...) kernel build
- lfsmake2 linux KCFG="-multi"
- lfsmake2 xtables-addons KCFG="-multi"
- lfsmake2 linux-initrd KCFG="-multi"
- ;;
- esac
- lfsmake2 xtables-addons USPACE="1"
+ # Kernelbuild ... current we have no platform that need
+ # multi kernel builds so KCFG is empty
+ lfsmake2 linux KCFG=""
+ lfsmake2 rtl8189es KCFG=""
+ lfsmake2 rtl8812au KCFG=""
+ lfsmake2 xradio KCFG=""
+ lfsmake2 xtables-addons KCFG=""
+ lfsmake2 linux-initrd KCFG=""
+
+ lfsmake2 xtables-addons USPACE="1"
lfsmake2 libgpg-error
lfsmake2 libgcrypt
lfsmake2 libassuan
lfsmake2 libsolv
lfsmake2 ddns
lfsmake2 python3-setuptools-scm
+ lfsmake2 python3-six
lfsmake2 python3-dateutil
lfsmake2 python3-jmespath
lfsmake2 python3-colorama
cd $BASEDIR
- # remove not useable iso on armv5tel (needed to build flash images)
- [ "${BUILD_ARCH}" = "armv5tel" ] && rm -rf *.iso
+ # remove not useable iso on armv6l (needed to build flash images)
+ [ "${BUILD_ARCH}" = "armv6l" ] && rm -rf *.iso
for i in $(ls *.bz2 *.img.xz *.iso 2>/dev/null); do
md5sum $i > $i.md5
# Clear screen
${INTERACTIVE} && clear
- PACKAGE=`ls -v -r $BASEDIR/cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.xz 2> /dev/null | head -n 1`
+ PACKAGE="$BASEDIR/cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.zst"
#only restore on a clean disk
if [ ! -e "${BASEDIR}/build${TOOLS_DIR}/.toolchain-successful" ]; then
if [ ! -n "$PACKAGE" ]; then
prepareenv
buildtoolchain
else
- PACKAGENAME=${PACKAGE%.tar.xz}
+ PACKAGENAME=${PACKAGE%.tar.zst}
print_build_stage "Packaged toolchain compilation"
if [ `md5sum $PACKAGE | awk '{print $1}'` == `cat $PACKAGENAME.md5 | awk '{print $1}'` ]; then
tar axf $PACKAGE
buildtoolchain
echo "`date -u '+%b %e %T'`: Create toolchain image for ${BUILD_ARCH}" | tee -a $LOGFILE
test -d $BASEDIR/cache/toolchains || mkdir -p $BASEDIR/cache/toolchains
- cd $BASEDIR && tar -cf- --exclude='log/_build.*.log' build/${TOOLS_DIR} build/bin/sh log | xz ${XZ_OPT} \
- > cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.xz
- md5sum cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.xz \
+ cd $BASEDIR && tar -cf- --exclude='log/_build.*.log' build/${TOOLS_DIR} build/bin/sh log \
+ | zstd ${ZSTD_OPT} > cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.zst
+ md5sum cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.zst \
> cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.md5
stdumount
;;
gettoolchain)
# arbitrary name to be updated in case of new toolchain package upload
PACKAGE=$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}
- if [ ! -f $BASEDIR/cache/toolchains/$PACKAGE.tar.xz ]; then
+ if [ ! -f $BASEDIR/cache/toolchains/$PACKAGE.tar.zst ]; then
URL_TOOLCHAIN=`grep URL_TOOLCHAIN lfs/Config | awk '{ print $3 }'`
test -d $BASEDIR/cache/toolchains || mkdir -p $BASEDIR/cache/toolchains
echo "`date -u '+%b %e %T'`: Load toolchain image for ${BUILD_ARCH}" | tee -a $LOGFILE
cd $BASEDIR/cache/toolchains
- wget -U "IPFireSourceGrabber/2.x" $URL_TOOLCHAIN/$PACKAGE.tar.xz $URL_TOOLCHAIN/$PACKAGE.md5 >& /dev/null
+ wget -U "IPFireSourceGrabber/2.x" $URL_TOOLCHAIN/$PACKAGE.tar.zst $URL_TOOLCHAIN/$PACKAGE.md5 >& /dev/null
if [ $? -ne 0 ]; then
echo "`date -u '+%b %e %T'`: error downloading $PACKAGE toolchain for ${BUILD_ARCH} machine" | tee -a $LOGFILE
else