mirror of
https://bitbucket.org/gwenhael/cubietruck-slackware.git
synced 2024-12-26 21:58:20 +01:00
group built binaries in a specific directory
This commit is contained in:
parent
c03441dbec
commit
0eb3f4fe31
1 changed files with 30 additions and 10 deletions
40
build.sh
40
build.sh
|
@ -91,6 +91,7 @@ done
|
||||||
|
|
||||||
# --- Script --------------------------------------------------------------------
|
# --- Script --------------------------------------------------------------------
|
||||||
CWD=$(pwd)
|
CWD=$(pwd)
|
||||||
|
BINARIES_DIR=$CWD/binaries
|
||||||
|
|
||||||
mkdir -p $DEST
|
mkdir -p $DEST
|
||||||
|
|
||||||
|
@ -98,6 +99,8 @@ echo "Building Cubietruck-Slackware in $DEST from $CWD"
|
||||||
|
|
||||||
if [ "$COMPILE" = "true" ]; then
|
if [ "$COMPILE" = "true" ]; then
|
||||||
|
|
||||||
|
mkdir -p $BINARIES_DIR
|
||||||
|
|
||||||
echo "--------------------------------------------------------------------------------"
|
echo "--------------------------------------------------------------------------------"
|
||||||
echo "Downloading necessary files for building - aka Toolchain"
|
echo "Downloading necessary files for building - aka Toolchain"
|
||||||
echo "--------------------------------------------------------------------------------"
|
echo "--------------------------------------------------------------------------------"
|
||||||
|
@ -133,7 +136,11 @@ if [ "$COMPILE" = "true" ]; then
|
||||||
( cd $DEST/u-boot-sunxi
|
( cd $DEST/u-boot-sunxi
|
||||||
make clean CROSS_COMPILE=$CROSS_COMPILE
|
make clean CROSS_COMPILE=$CROSS_COMPILE
|
||||||
make -j2 'cubietruck' CROSS_COMPILE=$CROSS_COMPILE
|
make -j2 'cubietruck' CROSS_COMPILE=$CROSS_COMPILE
|
||||||
make HOSTCC=gcc CROSS_COMPILE='' tools )
|
make HOSTCC=gcc CROSS_COMPILE='' tools
|
||||||
|
|
||||||
|
mkdir -p $BINARIES_DIR/$(basename $(pwd))
|
||||||
|
mv tools/mkimage $BINARIES_DIR/$(basename $(pwd))
|
||||||
|
)
|
||||||
|
|
||||||
# Allwinner tools
|
# Allwinner tools
|
||||||
if [ -d "$DEST/sunxi-tools" ]; then
|
if [ -d "$DEST/sunxi-tools" ]; then
|
||||||
|
@ -145,7 +152,11 @@ if [ "$COMPILE" = "true" ]; then
|
||||||
echo "------ Compiling sunxi tools"
|
echo "------ Compiling sunxi tools"
|
||||||
( cd $DEST/sunxi-tools
|
( cd $DEST/sunxi-tools
|
||||||
make clean
|
make clean
|
||||||
make fex2bin bin2fex )
|
make fex2bin bin2fex
|
||||||
|
|
||||||
|
mkdir -p $BINARIES_DIR/$(basename $(pwd))
|
||||||
|
mv fexc fex2bin bin2fex $BINARIES_DIR/$(basename $(pwd))
|
||||||
|
)
|
||||||
|
|
||||||
# Hardware configurations
|
# Hardware configurations
|
||||||
if [ -d "$DEST/cubie_configs" ]; then
|
if [ -d "$DEST/cubie_configs" ]; then
|
||||||
|
@ -161,6 +172,9 @@ if [ "$COMPILE" = "true" ]; then
|
||||||
sed -e 's/screen0_output_type.*/screen0_output_type = 3/g' $DEST/cubie_configs/sysconfig/linux/ct.fex > $DEST/cubie_configs/sysconfig/linux/ct-hdmi.fex
|
sed -e 's/screen0_output_type.*/screen0_output_type = 3/g' $DEST/cubie_configs/sysconfig/linux/ct.fex > $DEST/cubie_configs/sysconfig/linux/ct-hdmi.fex
|
||||||
sed -e 's/screen0_output_type.*/screen0_output_type = 4/g' $DEST/cubie_configs/sysconfig/linux/ct.fex > $DEST/cubie_configs/sysconfig/linux/ct-vga.fex
|
sed -e 's/screen0_output_type.*/screen0_output_type = 4/g' $DEST/cubie_configs/sysconfig/linux/ct.fex > $DEST/cubie_configs/sysconfig/linux/ct-vga.fex
|
||||||
fi
|
fi
|
||||||
|
mkdir -p $BINARIES_DIR/cubie_configs
|
||||||
|
$BINARIES_DIR/sunxi-tools/fex2bin $DEST/cubie_configs/sysconfig/linux/ct-vga.fex $BINARIES_DIR/cubie_configs/script-vga.bin
|
||||||
|
$BINARIES_DIR/sunxi-tools/fex2bin $DEST/cubie_configs/sysconfig/linux/ct-hdmi.fex $BINARIES_DIR/cubie_configs/script-hdmi.bin
|
||||||
|
|
||||||
# Patwood's kernel 3.4.75+
|
# Patwood's kernel 3.4.75+
|
||||||
if [ -d "$DEST/linux-sunxi" ]; then
|
if [ -d "$DEST/linux-sunxi" ]; then
|
||||||
|
@ -169,10 +183,10 @@ if [ "$COMPILE" = "true" ]; then
|
||||||
else
|
else
|
||||||
git clone https://github.com/patrickhwood/linux-sunxi $DEST/linux-sunxi
|
git clone https://github.com/patrickhwood/linux-sunxi $DEST/linux-sunxi
|
||||||
fi
|
fi
|
||||||
PATH=$PATH:$DEST/u-boot-sunxi/tools/
|
|
||||||
|
|
||||||
echo "------ Compiling kernel"
|
echo "------ Compiling kernel"
|
||||||
( cd $DEST/linux-sunxi
|
( cd $DEST/linux-sunxi
|
||||||
|
PATH=$PATH:$BINARIES_DIR/u-boot-sunxi/
|
||||||
|
|
||||||
make clean
|
make clean
|
||||||
|
|
||||||
# Adding wlan firmware to kernel source
|
# Adding wlan firmware to kernel source
|
||||||
|
@ -185,7 +199,13 @@ if [ "$COMPILE" = "true" ]; then
|
||||||
cp $CWD/config/kernel.config $DEST/linux-sunxi/.config
|
cp $CWD/config/kernel.config $DEST/linux-sunxi/.config
|
||||||
make -j2 ARCH=arm CROSS_COMPILE=$CROSS_COMPILE uImage modules
|
make -j2 ARCH=arm CROSS_COMPILE=$CROSS_COMPILE uImage modules
|
||||||
make -j2 ARCH=arm CROSS_COMPILE=$CROSS_COMPILE INSTALL_MOD_PATH=output modules_install
|
make -j2 ARCH=arm CROSS_COMPILE=$CROSS_COMPILE INSTALL_MOD_PATH=output modules_install
|
||||||
make -j2 ARCH=arm CROSS_COMPILE=$CROSS_COMPILE INSTALL_HDR_PATH=output headers_install )
|
make -j2 ARCH=arm CROSS_COMPILE=$CROSS_COMPILE INSTALL_HDR_PATH=output headers_install
|
||||||
|
|
||||||
|
mkdir -p $BINARIES_DIR/$(basename $(pwd))
|
||||||
|
cp $DEST/linux-sunxi/arch/arm/boot/uImage $BINARIES_DIR/$(basename $(pwd))
|
||||||
|
cp -R $DEST/linux-sunxi/output/lib/modules $BINARIES_DIR/$(basename $(pwd))
|
||||||
|
cp -R $DEST/linux-sunxi/output/lib/firmware/ $BINARIES_DIR/$(basename $(pwd))
|
||||||
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@ -300,18 +320,18 @@ echo "setup video output"
|
||||||
echo $CUBIETRUCK_DISPLAY
|
echo $CUBIETRUCK_DISPLAY
|
||||||
case $CUBIETRUCK_DISPLAY in
|
case $CUBIETRUCK_DISPLAY in
|
||||||
VGA) # VGA
|
VGA) # VGA
|
||||||
$DEST/sunxi-tools/fex2bin $DEST/cubie_configs/sysconfig/linux/ct-vga.fex$DEST/output/sdcard/boot/script.bin
|
cp $BINARIES_DIR/cubie_configs/script-vga.bin $DEST/output/sdcard/boot/script.bin
|
||||||
;;
|
;;
|
||||||
HDMI) # HDMI
|
HDMI) # HDMI
|
||||||
$DEST/sunxi-tools/fex2bin $DEST/cubie_configs/sysconfig/linux/ct-hdmi.fex $DEST/output/sdcard/boot/script.bin
|
cp $BINARIES_DIR/cubie_configs/script-hdmi.bin $DEST/output/sdcard/boot/script.bin
|
||||||
;;
|
;;
|
||||||
*) exit 1
|
*) exit 1
|
||||||
esac
|
esac
|
||||||
|
|
||||||
echo "Installing kernel"
|
echo "Installing kernel"
|
||||||
cp $DEST/linux-sunxi/arch/arm/boot/uImage $DEST/output/sdcard/boot/
|
cp $BINARIES_DIR/linux-sunxi/uImage $DEST/output/sdcard/boot/
|
||||||
cp -R $DEST/linux-sunxi/output/lib/modules $DEST/output/sdcard/lib/
|
cp -R $BINARIES_DIR/linux-sunxi/modules $DEST/output/sdcard/lib/
|
||||||
cp -R $DEST/linux-sunxi/output/lib/firmware/ $DEST/output/sdcard/lib/
|
cp -R $BINARIES_DIR/linux-sunxi/firmware/ $DEST/output/sdcard/lib/
|
||||||
|
|
||||||
sync
|
sync
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue