SAMA5D4 Xplained Ultra Board BSP
guowenxue
2019-08-11 44b6985a5c9724e5f8b8f30000c5f022dee42863
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
 
set -e
 
ROOTFS_PATH=`pwd`/../../linux-bsp/rootfs/
 
LYFTP_SRC=ftp://master.iot-yun.club/src/
 
CROSSTOOL=/opt/crosstool/cortex-a7/bin/arm-linux-gnueabi-
 
SRC_NAME=busybox-1.31.0
PACK_SUFIX=tar.bz2
 
JOBS=`cat /proc/cpuinfo  |  grep processor | wc -l`
 
if [ ! -d $SRC_NAME ] ; then
    if [ ! -f $SRC_NAME.${PACK_SUFIX} ] ; then
        wget ${LYFTP_SRC}/${SRC_NAME}.${PACK_SUFIX}
    fi
 
    tar -xjf $SRC_NAME.${PACK_SUFIX}
fi
 
cp config/${SRC_NAME}.config $SRC_NAME/.config
 
cd $SRC_NAME
 
sed -i "s|^CONFIG_CROSS_COMPILER_PREFIX.*|CONFIG_CROSS_COMPILER_PREFIX=\"${CROSSTOOL}\"|g" .config
sed -i "s|^CONFIG_PREFIX.*|CONFIG_PREFIX=\"$ROOTFS_PATH\"|g" .config
 
make 
#make uninstall && sudo make install