mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-14 04:52:59 +02:00
Add MACHINE_TYPE variable to be able to support multiple versions of one platform.
This commit is contained in:
16
make.sh
16
make.sh
@@ -255,7 +255,7 @@ buildtoolchain() {
|
||||
lfsmake1 make PASS=1
|
||||
lfsmake1 binutils PASS=1
|
||||
lfsmake1 gcc PASS=1
|
||||
if [ "${MACHINE}" = "arm" ]; then
|
||||
if [ "${MACHINE_TYPE}" = "arm" ]; then
|
||||
lfsmake1 linux TOOLS=1 HEADERS=1
|
||||
else
|
||||
lfsmake1 linux-libc-header
|
||||
@@ -294,7 +294,7 @@ buildbase() {
|
||||
LOGFILE="$BASEDIR/log/_build.base.log"
|
||||
export LOGFILE
|
||||
lfsmake2 stage2
|
||||
if [ "${MACHINE}" = "arm" ]; then
|
||||
if [ "${MACHINE_TYPE}" = "arm" ]; then
|
||||
lfsmake2 linux HEADERS=1
|
||||
else
|
||||
lfsmake2 linux-libc-header
|
||||
@@ -354,7 +354,7 @@ buildbase() {
|
||||
lfsmake2 vim
|
||||
|
||||
# ARM cannot use grub.
|
||||
if [ "${MACHINE}" != "arm" ]; then
|
||||
if [ "${MACHINE_TYPE}" != "arm" ]; then
|
||||
lfsmake2 grub
|
||||
fi
|
||||
}
|
||||
@@ -377,7 +377,7 @@ buildipfire() {
|
||||
ipfiremake zd1211-firmware
|
||||
|
||||
# The xen and PAE kernels are only available for x86
|
||||
if [ "${MACHINE}" != "arm" ]; then
|
||||
if [ "${MACHINE_TYPE}" != "arm" ]; then
|
||||
ipfiremake linux XEN=1
|
||||
ipfiremake kqemu XEN=1
|
||||
ipfiremake v4l-dvb XEN=1
|
||||
@@ -414,7 +414,7 @@ buildipfire() {
|
||||
ipfiremake linux
|
||||
ipfiremake v4l-dvb
|
||||
|
||||
if [ "${MACHINE}" != "arm" ]; then
|
||||
if [ "${MACHINE_TYPE}" != "arm" ]; then
|
||||
# Virtualization helpers are only available for x86.
|
||||
ipfiremake kqemu
|
||||
ipfiremake kvm-kmod
|
||||
@@ -669,7 +669,7 @@ buildipfire() {
|
||||
ipfiremake wpa_supplicant
|
||||
ipfiremake hostapd
|
||||
ipfiremake urlgrabber
|
||||
if [ "${MACHINE:0:3}" != "arm" ]; then
|
||||
if [ "${MACHINE_TYPE}" != "arm" ]; then
|
||||
ipfiremake syslinux
|
||||
fi
|
||||
ipfiremake tftpd
|
||||
@@ -696,7 +696,7 @@ buildipfire() {
|
||||
ipfiremake perl-DBD-mysql
|
||||
ipfiremake cacti
|
||||
ipfiremake icecc
|
||||
if [ "${MACHINE:0:3}" != "arm" ]; then
|
||||
if [ "${MACHINE_TYPE}" != "arm" ]; then
|
||||
ipfiremake openvmtools
|
||||
fi
|
||||
ipfiremake nagiosql
|
||||
@@ -754,7 +754,7 @@ buildinstaller() {
|
||||
# Run installer scripts one by one
|
||||
LOGFILE="$BASEDIR/log/_build.installer.log"
|
||||
export LOGFILE
|
||||
if [ "${MACHINE:0:3}" != "arm" ]; then
|
||||
if [ "${MACHINE_TYPE}" != "arm" ]; then
|
||||
ipfiremake as86
|
||||
ipfiremake mbr
|
||||
ipfiremake memtest
|
||||
|
||||
@@ -226,8 +226,9 @@ if [ 'x86_64' = $MACHINE -o 'i686' = $MACHINE -o 'i586' = $MACHINE ]; then
|
||||
CXX2FLAGS="-O2 -march=i586 -mtune=i586 -pipe -fomit-frame-pointer"
|
||||
elif [ 'armv5tejl' = $MACHINE -o 'armv5tel' = $MACHINE ]; then
|
||||
echo "`date -u '+%b %e %T'`: Machine is ARM (or equivalent)" >> $LOGFILE
|
||||
MACHINE=arm
|
||||
BUILDTARGET=arm-unknown-linux-gnueabi
|
||||
MACHINE=armv5tel
|
||||
MACHINE_TYPE=arm
|
||||
BUILDTARGET=${MACHINE}-unknown-linux-gnueabi
|
||||
CFLAGS="-O2 -march=armv5te -fomit-frame-pointer -pipe"
|
||||
CXXFLAGS="$CFLAGS"
|
||||
C2FLAGS="$CFLAGS"
|
||||
@@ -282,7 +283,9 @@ entershell() {
|
||||
CCACHE_COMPRESS=1 \
|
||||
CCACHE_HASHDIR=1 \
|
||||
KVER=$KVER \
|
||||
BUILDTARGET="$BUILDTARGET" MACHINE="$MACHINE" \
|
||||
BUILDTARGET="$BUILDTARGET" \
|
||||
MACHINE="$MACHINE" \
|
||||
MACHINE_TYPE="$MACHINE_TYPE" \
|
||||
KGCC="ccache /usr/bin/gcc" \
|
||||
/tools/bin/bash
|
||||
if [ $? -ne 0 ]; then
|
||||
@@ -328,12 +331,14 @@ lfsmakecommoncheck()
|
||||
echo -ne "`date -u '+%b %e %T'`: Building $* " >> $LOGFILE
|
||||
|
||||
cd $BASEDIR/lfs && make -s -f $* LFS_BASEDIR=$BASEDIR MACHINE=$MACHINE \
|
||||
MACHINE_TYPE="$MACHINE_TYPE" \
|
||||
MESSAGE="$1\t " download >> $LOGFILE 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
exiterror "Download error in $1"
|
||||
fi
|
||||
|
||||
cd $BASEDIR/lfs && make -s -f $* LFS_BASEDIR=$BASEDIR MACHINE=$MACHINE \
|
||||
MACHINE_TYPE="$MACHINE_TYPE" \
|
||||
MESSAGE="$1\t md5sum" md5 >> $LOGFILE 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
exiterror "md5sum error in $1, check file in cache or signature"
|
||||
@@ -350,6 +355,7 @@ lfsmake1() {
|
||||
|
||||
cd $BASEDIR/lfs && make -f $* BUILDTARGET=$BUILDTARGET \
|
||||
MACHINE=$MACHINE \
|
||||
MACHINE_TYPE=$MACHINE_TYPE \
|
||||
LFS_BASEDIR=$BASEDIR \
|
||||
ROOT=$LFS \
|
||||
KVER=$KVER \
|
||||
@@ -383,6 +389,7 @@ lfsmake2() {
|
||||
CCACHE_DIR=/usr/src/ccache CCACHE_COMPRESS=1 CCACHE_HASHDIR=1 \
|
||||
KVER=$KVER MAKETUNING=$MAKETUNING \
|
||||
BUILDTARGET="$BUILDTARGET" MACHINE="$MACHINE" \
|
||||
MACHINE_TYPE="$MACHINE_TYPE" \
|
||||
IPFVER="$IPFVER" \
|
||||
/tools/bin/bash -x -c "cd /usr/src/lfs && \
|
||||
make -f $* LFS_BASEDIR=/usr/src install" >>$LOGFILE 2>&1
|
||||
@@ -415,6 +422,7 @@ ipfiremake() {
|
||||
CCACHE_DIR=/usr/src/ccache CCACHE_COMPRESS=1 CCACHE_HASHDIR=1 \
|
||||
KVER=$KVER MAKETUNING=$MAKETUNING \
|
||||
BUILDTARGET="$BUILDTARGET" MACHINE="$MACHINE" \
|
||||
MACHINE_TYPE="$MACHINE_TYPE" \
|
||||
IPFVER="$IPFVER" \
|
||||
/bin/bash -x -c "cd /usr/src/lfs && \
|
||||
make -f $* LFS_BASEDIR=/usr/src install" >>$LOGFILE 2>&1
|
||||
@@ -446,6 +454,7 @@ ipfiredist() {
|
||||
CCACHE_DIR=/usr/src/ccache CCACHE_COMPRESS=1 CCACHE_HASHDIR=1 \
|
||||
KVER=$KVER IPFVER="$IPFVER" \
|
||||
BUILDTARGET="$BUILDTARGET" MACHINE="$MACHINE" \
|
||||
MACHINE_TYPE="$MACHINE_TYPE" \
|
||||
/bin/bash -x -c "cd /usr/src/lfs && \
|
||||
make -f $1 LFS_BASEDIR=/usr/src dist" >>$LOGFILE 2>&1
|
||||
|
||||
@@ -477,6 +486,7 @@ installmake() {
|
||||
CCACHE_DIR=/usr/src/ccache CCACHE_COMPRESS=1 CCACHE_HASHDIR=1 \
|
||||
KVER=$KVER IPFVER="$IPFVER" \
|
||||
BUILDTARGET="$BUILDTARGET" MACHINE="$MACHINE" \
|
||||
MACHINE_TYPE="$MACHINE_TYPE" \
|
||||
/bin/bash -x -c "cd /usr/src/lfs && \
|
||||
make -f $* LFS_BASEDIR=/usr/src install" >>$LOGFILE 2>&1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user