Small cleanup
This commit is contained in:
parent
4f5733217f
commit
7344345f5a
11
boards.sh
11
boards.sh
@ -194,15 +194,10 @@ install_kernel (){
|
||||
echo "ff02::2 ip6-allrouters" >> $CACHEDIR/sdcard/etc/hosts
|
||||
|
||||
# create modules file
|
||||
IFS=" "
|
||||
if [[ $BRANCH == *next* || $BRANCH == *dev* ]];then
|
||||
for word in $MODULES_NEXT; do
|
||||
echo $word >> $CACHEDIR/sdcard/etc/modules;
|
||||
done
|
||||
if [[ $BRANCH == next || $BRANCH == dev ]]; then
|
||||
tr ' ' '\n' <<< "$MODULES_NEXT" >> $CACHEDIR/sdcard/etc/modules
|
||||
else
|
||||
for word in $MODULES; do
|
||||
echo $word >> $CACHEDIR/sdcard/etc/modules;
|
||||
done
|
||||
tr ' ' '\n' <<< "$MODULES" >> $CACHEDIR/sdcard/etc/modules
|
||||
fi
|
||||
|
||||
# copy and create symlink to default interfaces configuration
|
||||
|
||||
18
build-all.sh
18
build-all.sh
@ -21,16 +21,16 @@ create_images_list()
|
||||
BOARD=$(basename $board | cut -d'.' -f1)
|
||||
source $SRC/lib/config/boards/$BOARD.conf
|
||||
if [[ -n $CLI_TARGET ]]; then
|
||||
|
||||
|
||||
# RELEASES : BRANCHES
|
||||
CLI_TARGET=($(tr ':' ' ' <<< "$CLI_TARGET"))
|
||||
|
||||
|
||||
build_settings_target=($(tr ',' ' ' <<< "${CLI_TARGET[0]}"))
|
||||
build_settings_branch=($(tr ',' ' ' <<< "${CLI_TARGET[1]}"))
|
||||
|
||||
|
||||
[[ ${build_settings_target[0]} == "%" ]] && build_settings_target[0]="${RELEASE_LIST[@]}"
|
||||
[[ ${build_settings_branch[0]} == "%" ]] && build_settings_branch[0]="${BRANCH_LIST[@]}"
|
||||
|
||||
|
||||
for release in ${build_settings_target[@]}; do
|
||||
for kernel in ${build_settings_branch[@]}; do
|
||||
buildlist+=("$BOARD $kernel $release no")
|
||||
@ -38,16 +38,16 @@ create_images_list()
|
||||
done
|
||||
fi
|
||||
if [[ -n $DESKTOP_TARGET ]]; then
|
||||
|
||||
|
||||
# RELEASES : BRANCHES
|
||||
DESKTOP_TARGET=($(tr ':' ' ' <<< "$DESKTOP_TARGET"))
|
||||
|
||||
|
||||
build_settings_target=($(tr ',' ' ' <<< "${DESKTOP_TARGET[0]}"))
|
||||
build_settings_branch=($(tr ',' ' ' <<< "${DESKTOP_TARGET[1]}"))
|
||||
|
||||
|
||||
[[ ${build_settings_target[0]} == "%" ]] && build_settings_target[0]="${RELEASE_LIST[@]}"
|
||||
[[ ${build_settings_branch[0]} == "%" ]] && build_settings_branch[0]="${BRANCH_LIST[@]}"
|
||||
|
||||
|
||||
for release in ${build_settings_target[@]}; do
|
||||
for kernel in ${build_settings_branch[@]}; do
|
||||
buildlist+=("$BOARD $kernel $release yes")
|
||||
@ -93,7 +93,7 @@ echo -e "\n${#buildlist[@]} total\n"
|
||||
buildall_start=`date +%s`
|
||||
|
||||
for line in "${buildlist[@]}"; do
|
||||
unset IFS LINUXFAMILY LINUXCONFIG LINUXKERNEL LINUXSOURCE KERNELBRANCH BOOTLOADER BOOTSOURCE BOOTBRANCH ARCH\
|
||||
unset LINUXFAMILY LINUXCONFIG LINUXKERNEL LINUXSOURCE KERNELBRANCH BOOTLOADER BOOTSOURCE BOOTBRANCH ARCH UBOOT_NEEDS_GCC KERNEL_NEEDS_GCC \
|
||||
CPUMIN CPUMAX UBOOT_VER KERNEL_VER GOVERNOR BOOTSIZE UBOOT_TOOLCHAIN KERNEL_TOOLCHAIN PACKAGE_LIST_EXCLUDE
|
||||
read BOARD BRANCH RELEASE BUILD_DESKTOP <<< $line
|
||||
display_alert "Building" "Board: $BOARD Kernel:$BRANCH${RELEASE:+ Release: $RELEASE}${BUILD_DESKTOP:+ Desktop: $BUILD_DESKTOP}" "ext"
|
||||
|
||||
@ -23,6 +23,7 @@ MISC1="https://github.com/linux-sunxi/sunxi-tools.git" # Allwinner fex compiler
|
||||
MISC1_DIR="sunxi-tools" # local directory
|
||||
MISC5="https://github.com/hglm/a10disp/" # Display changer for Allwinner
|
||||
MISC5_DIR="sunxi-display-changer" # local directory
|
||||
HOST="$BOARD" # set hostname to the board
|
||||
CACHEDIR=$DEST/cache
|
||||
|
||||
# board family configurations
|
||||
@ -209,6 +210,9 @@ esac
|
||||
[[ -z $CPUMIN && ($LINUXFAMILY == udoo || $LINUXFAMILY == neo ) ]] && CPUMIN="392000" && CPUMAX="996000" && GOVERNOR="interactive"
|
||||
[[ -z $GOVERNOR ]] && GOVERNOR="ondemand"
|
||||
|
||||
# naming to distro
|
||||
if [[ $RELEASE == trusty || $RELEASE == xenial ]]; then DISTRIBUTION="Ubuntu"; else DISTRIBUTION="Debian"; fi
|
||||
|
||||
case $ARCH in
|
||||
arm64)
|
||||
TARGETS=Image
|
||||
|
||||
@ -320,22 +320,14 @@ j=1
|
||||
declare -a PACKETS=($1)
|
||||
skupaj=${#PACKETS[@]}
|
||||
while [[ $i -lt $skupaj ]]; do
|
||||
procent=$(echo "scale=2;($j/$skupaj)*100"|bc)
|
||||
procent=${procent%.*}
|
||||
x=${PACKETS[$i]}
|
||||
if [[ $3 == "host" ]]; then
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -qq -y install $x >> $DEST/debug/install.log 2>&1
|
||||
else
|
||||
chroot $CACHEDIR/sdcard /bin/bash -c "DEBIAN_FRONTEND=noninteractive apt-get -qq -y install $x --no-install-recommends" >> $DEST/debug/install.log 2>&1
|
||||
fi
|
||||
|
||||
if [ $? -ne 0 ]; then display_alert "Installation of package failed" "$INSTALL" "err"; exit 1; fi
|
||||
|
||||
if [[ $4 != "quiet" ]]; then
|
||||
printf '%.0f\n' $procent | dialog --backtitle "$backtitle" --title "$2" --gauge "\n\n$x" 9 70
|
||||
fi
|
||||
i=$[$i+1]
|
||||
j=$[$j+1]
|
||||
procent=$(echo "scale=2;($j/$skupaj)*100"|bc)
|
||||
procent=${procent%.*}
|
||||
x=${PACKETS[$i]}
|
||||
chroot $CACHEDIR/sdcard /bin/bash -c "DEBIAN_FRONTEND=noninteractive apt-get -qq -y install $x --no-install-recommends" >> $DEST/debug/install.log 2>&1
|
||||
if [ $? -ne 0 ]; then display_alert "Installation of package failed" "$INSTALL" "err"; exit 1; fi
|
||||
printf '%.0f\n' $procent | dialog --backtitle "$backtitle" --title "$2" --gauge "\n\n$x" 9 70
|
||||
i=$[$i+1]
|
||||
j=$[$j+1]
|
||||
done
|
||||
}
|
||||
|
||||
@ -346,9 +338,8 @@ umount -l $CACHEDIR/sdcard/proc >/dev/null 2>&1
|
||||
umount -l $CACHEDIR/sdcard/sys >/dev/null 2>&1
|
||||
umount -l $CACHEDIR/sdcard/tmp >/dev/null 2>&1
|
||||
umount -l $CACHEDIR/sdcard >/dev/null 2>&1
|
||||
IFS=" "
|
||||
x=$(losetup -a |awk '{ print $1 }' | rev | cut -c 2- | rev | tac);
|
||||
for x in $x; do
|
||||
losetup -d $x
|
||||
x=$(losetup -a | awk '{ print $1 }' | rev | cut -c 2- | rev | tac)
|
||||
for y in $x; do
|
||||
losetup -d $y
|
||||
done
|
||||
}
|
||||
|
||||
6
main.sh
6
main.sh
@ -137,12 +137,6 @@ if [[ $KERNEL_ONLY != yes && -z $RELEASE ]]; then
|
||||
[[ -z $BUILD_DESKTOP ]] && exit_with_error "No option selected"
|
||||
fi
|
||||
|
||||
# naming to distro
|
||||
if [[ $RELEASE == trusty || $RELEASE == xenial ]]; then DISTRIBUTION="Ubuntu"; else DISTRIBUTION="Debian"; fi
|
||||
|
||||
# set hostname to the board
|
||||
HOST="$BOARD"
|
||||
|
||||
source $SRC/lib/configuration.sh
|
||||
|
||||
# The name of the job
|
||||
|
||||
@ -116,8 +116,7 @@ create_board_package (){
|
||||
touch $destination/tmp/.reboot_required
|
||||
|
||||
if [[ $LINUXCONFIG == *sun* ]] ; then
|
||||
|
||||
if [ "$BRANCH" != "next" ]; then
|
||||
if [[ $BRANCH != next ]]; then
|
||||
# add soc temperature app
|
||||
arm-linux-gnueabihf-gcc $SRC/lib/scripts/sunxi-temp/sunxi_tp_temp.c -o $destination/usr/local/bin/sunxi_tp_temp
|
||||
fi
|
||||
@ -126,7 +125,6 @@ create_board_package (){
|
||||
tar xfz $SRC/lib/bin/swconfig.tgz -C $destination/usr/local/bin
|
||||
|
||||
# convert and add fex files
|
||||
unset IFS
|
||||
mkdir -p $destination/boot/bin
|
||||
for i in $(ls -w1 $SRC/lib/config/*.fex | xargs -n1 basename); do
|
||||
fex2bin $SRC/lib/config/${i%*.fex}.fex $destination/boot/bin/${i%*.fex}.bin
|
||||
|
||||
Loading…
Reference in New Issue
Block a user