mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-16 03:41:26 +00:00
Rename some variables for better readability
This commit is contained in:
parent
a2f848e897
commit
3d332a9c1c
22 changed files with 211 additions and 209 deletions
|
@ -105,7 +105,7 @@ echo -e "\n${#buildlist[@]} total\n"
|
|||
buildall_start=`date +%s`
|
||||
n=0
|
||||
for line in "${buildlist[@]}"; do
|
||||
unset LINUXFAMILY LINUXCONFIG LINUXKERNEL LINUXSOURCE KERNELBRANCH BOOTLOADER BOOTSOURCE BOOTBRANCH ARCH UBOOT_NEEDS_GCC KERNEL_NEEDS_GCC \
|
||||
unset LINUXFAMILY LINUXCONFIG KERNELDIR KERNELSOURCE KERNELBRANCH BOOTDIR BOOTSOURCE BOOTBRANCH ARCH UBOOT_NEEDS_GCC KERNEL_NEEDS_GCC \
|
||||
CPUMIN CPUMAX UBOOT_VER KERNEL_VER GOVERNOR BOOTSIZE UBOOT_TOOLCHAIN KERNEL_TOOLCHAIN PACKAGE_LIST_EXCLUDE KERNEL_IMAGE_TYPE \
|
||||
write_uboot_platform family_tweaks install_boot_script UBOOT_FILES LOCALVERSION UBOOT_COMPILER KERNEL_COMPILER UBOOT_TARGET \
|
||||
MODULES MODULES_NEXT
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
# create_chroot
|
||||
# update_chroot
|
||||
# chroot_build_packages
|
||||
# fetch_from_repo
|
||||
# chroot_installpackages
|
||||
|
||||
# create_chroot <target_dir>
|
||||
|
@ -193,101 +192,6 @@ chroot_build_packages()
|
|||
done
|
||||
} #############################################################################
|
||||
|
||||
# fetch_rom_repo <url> <directory> <ref> <ref_subdir>
|
||||
# <url>: remote repository URL
|
||||
# <directory>: local directory; subdir for branch/tag will be created
|
||||
# <ref>:
|
||||
# branch:name
|
||||
# tag:name
|
||||
# HEAD*
|
||||
# commit:hash@depth*
|
||||
#
|
||||
# *: Work in progress
|
||||
# <ref_subdir>: "yes" to create subdirectory for tag or branch name
|
||||
#
|
||||
fetch_from_repo()
|
||||
{
|
||||
local url=$1
|
||||
local dir=$2
|
||||
local ref=$3
|
||||
local ref_subdir=$4
|
||||
|
||||
[[ -z $ref || ( $ref != tag:* && $ref != branch:* ) ]] && exit_with_error "Error in configuration"
|
||||
local ref_type=${ref%%:*}
|
||||
local ref_name=${ref##*:}
|
||||
|
||||
display_alert "Checking git sources" "$dir $ref_name" "info"
|
||||
|
||||
# get default remote branch name without cloning
|
||||
# doesn't work with git:// remote URLs
|
||||
# local ref_name=$(git ls-remote --symref $url HEAD | grep -o 'refs/heads/\S*' | sed 's%refs/heads/%%')
|
||||
|
||||
if [[ $ref_subdir == yes ]]; then
|
||||
mkdir -p $SOURCES/$dir/$ref_name
|
||||
cd $SOURCES/$dir/$ref_name
|
||||
else
|
||||
mkdir -p $SOURCES/$dir/
|
||||
cd $SOURCES/$dir/
|
||||
fi
|
||||
|
||||
# this may not work if $SRC is a part of git repository
|
||||
if [[ $(git rev-parse --is-inside-work-tree 2>/dev/null) != true ]]; then
|
||||
display_alert "Creating local copy"
|
||||
git init -q .
|
||||
git remote add origin $url
|
||||
fi
|
||||
|
||||
local local_hash=$(git rev-parse @ 2>/dev/null)
|
||||
|
||||
local changed=false
|
||||
case $ref_type in
|
||||
branch)
|
||||
local remote_hash=$(git ls-remote -h origin "$ref_name" | cut -f1)
|
||||
[[ $local_hash != $remote_hash ]] && changed=true
|
||||
;;
|
||||
|
||||
tag)
|
||||
local remote_hash=$(git ls-remote -t origin "$ref_name" | cut -f1)
|
||||
if [[ $local_hash != $remote_hash ]]; then
|
||||
remote_hash=$(git ls-remote -t origin "$ref_name^{}" | cut -f1)
|
||||
[[ -z $remote_hash || $local_hash != $remote_hash ]] && changed=true
|
||||
fi
|
||||
;;
|
||||
|
||||
head)
|
||||
local remote_hash=$(git ls-remote origin HEAD | cut -f1)
|
||||
[[ $local_hash != $remote_hash ]] && changed=true
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ $changed == true ]]; then
|
||||
# remote was updated, fetch and check out updates
|
||||
display_alert "Fetching updates"
|
||||
case $ref_type in
|
||||
branch) git fetch --depth 1 origin $ref_name ;;
|
||||
tag) git fetch --depth 1 origin tags/$ref_name ;;
|
||||
head) git fetch --depth 1 origin HEAD ;;
|
||||
esac
|
||||
display_alert "Checking out"
|
||||
git checkout -f -q FETCH_HEAD
|
||||
elif [[ -n $(git status -uno --porcelain) ]]; then
|
||||
# working directory is not clean
|
||||
if [[ $FORCE_CHECKOUT == yes ]]; then
|
||||
display_alert "Checking out"
|
||||
git checkout -f -q HEAD
|
||||
else
|
||||
display_alert "Skipping checkout"
|
||||
fi
|
||||
else
|
||||
# working directory is clean, nothing to do
|
||||
display_alert "Up to date"
|
||||
fi
|
||||
if [[ -f .gitmodules ]]; then
|
||||
display_alert "Updating submodules"
|
||||
git submodule update --init --depth 1
|
||||
fi
|
||||
} #############################################################################
|
||||
|
||||
# chroot_installpackages
|
||||
#
|
||||
chroot_installpackages()
|
||||
|
|
|
@ -1,28 +1,28 @@
|
|||
|
||||
BOOTLOADER='https://github.com/SolidRun/u-boot-imx6'
|
||||
BOOTSOURCE='https://github.com/SolidRun/u-boot-imx6'
|
||||
BOOTBRANCH='imx6'
|
||||
BOOTSOURCE='u-boot-cubox'
|
||||
BOOTDIR='u-boot-cubox'
|
||||
|
||||
UBOOT_NEEDS_GCC='< 5.0'
|
||||
KERNEL_NEEDS_GCC='< 5.0'
|
||||
|
||||
case $BRANCH in
|
||||
default)
|
||||
LINUXKERNEL='https://github.com/linux4kix/linux-linaro-stable-mx6'
|
||||
KERNELSOURCE='https://github.com/linux4kix/linux-linaro-stable-mx6'
|
||||
KERNELBRANCH='linux-linaro-lsk-v3.14-mx6'
|
||||
LINUXSOURCE='linux-cubox'
|
||||
KERNELDIR='linux-cubox'
|
||||
;;
|
||||
|
||||
next)
|
||||
LINUXKERNEL=$MAINLINE_KERNEL
|
||||
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
|
||||
KERNELBRANCH=$MAINLINE_KERNEL_BRANCH
|
||||
LINUXSOURCE=$MAINLINE_KERNEL_SOURCE
|
||||
KERNELDIR=$MAINLINE_KERNEL_DIR
|
||||
;;
|
||||
|
||||
dev)
|
||||
LINUXKERNEL='https://github.com/SolidRun/linux-fslc'
|
||||
KERNELSOURCE='https://github.com/SolidRun/linux-fslc'
|
||||
KERNELBRANCH='3.14-1.0.x-mx6-sr'
|
||||
LINUXSOURCE='linux-cubox'
|
||||
KERNELDIR='linux-cubox'
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
BOOTLOADER='https://github.com/SolidRun/u-boot-armada38x'
|
||||
BOOTSOURCE='https://github.com/SolidRun/u-boot-armada38x'
|
||||
BOOTBRANCH='u-boot-2013.01-15t1-clearfog'
|
||||
BOOTSOURCE='u-boot-armada'
|
||||
BOOTDIR='u-boot-armada'
|
||||
|
||||
UBOOT_NEEDS_GCC='< 5.0'
|
||||
|
||||
|
@ -8,21 +8,21 @@ UBOOT_TARGET="u-boot.mmc"
|
|||
|
||||
case $BRANCH in
|
||||
default)
|
||||
LINUXKERNEL='https://github.com/SolidRun/linux-armada38x'
|
||||
KERNELSOURCE='https://github.com/SolidRun/linux-armada38x'
|
||||
KERNELBRANCH='linux-3.10.70-15t1-clearfog'
|
||||
LINUXSOURCE='linux-armada'
|
||||
KERNELDIR='linux-armada'
|
||||
;;
|
||||
|
||||
next)
|
||||
LINUXKERNEL=$MAINLINE_KERNEL
|
||||
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
|
||||
KERNELBRANCH=$MAINLINE_KERNEL_BRANCH
|
||||
LINUXSOURCE=$MAINLINE_KERNEL_SOURCE
|
||||
KERNELDIR=$MAINLINE_KERNEL_DIR
|
||||
;;
|
||||
|
||||
dev)
|
||||
LINUXKERNEL='https://github.com/SolidRun/linux-stable'
|
||||
KERNELSOURCE='https://github.com/SolidRun/linux-stable'
|
||||
KERNELBRANCH='linux-4.4.y-clearfog'
|
||||
LINUXSOURCE='linux-armada-modern'
|
||||
KERNELDIR='linux-armada-modern'
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
|
||||
BOOTLOADER="https://github.com/UDOOboard/uboot-imx"
|
||||
BOOTSOURCE="https://github.com/UDOOboard/uboot-imx"
|
||||
BOOTBRANCH="2015.04.imx-neo"
|
||||
BOOTSOURCE="u-boot-neo"
|
||||
BOOTDIR="u-boot-neo"
|
||||
|
||||
LINUXKERNEL='https://github.com/UDOOboard/linux_kernel'
|
||||
KERNELSOURCE='https://github.com/UDOOboard/linux_kernel'
|
||||
#KERNELBRANCH="imx_3.14.28_1.0.0_ga_neo"
|
||||
KERNELBRANCH="3.14-1.0.x-udoo"
|
||||
#LINUXSOURCE="linux-udoo-neo"
|
||||
LINUXSOURCE="linux-udoo"
|
||||
#KERNELDIR="linux-udoo-neo"
|
||||
KERNELDIR="linux-udoo"
|
||||
|
||||
CPUMIN=392000
|
||||
CPUMAX=996000
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
BOOTLOADER='https://github.com/hardkernel/u-boot.git'
|
||||
BOOTSOURCE='https://github.com/hardkernel/u-boot.git'
|
||||
BOOTBRANCH='odroidc-v2011.03'
|
||||
BOOTSOURCE='u-boot-odroidc1'
|
||||
BOOTDIR='u-boot-odroidc1'
|
||||
UBOOT_NEEDS_GCC='< 4.9'
|
||||
BOOTSIZE=32
|
||||
|
||||
|
@ -9,15 +9,15 @@ KERNEL_NEEDS_GCC='< 4.9'
|
|||
|
||||
case $BRANCH in
|
||||
default)
|
||||
LINUXKERNEL='https://github.com/hardkernel/linux'
|
||||
KERNELSOURCE='https://github.com/hardkernel/linux'
|
||||
KERNELBRANCH='odroidc-3.10.y'
|
||||
LINUXSOURCE='linux-odroidc1'
|
||||
KERNELDIR='linux-odroidc1'
|
||||
;;
|
||||
|
||||
next)
|
||||
LINUXKERNEL='https://github.com/tobetter/linux'
|
||||
KERNELSOURCE='https://github.com/tobetter/linux'
|
||||
KERNELBRANCH='odroidxu4-v4.2'
|
||||
LINUXSOURCE='linux-odroidxu-next'
|
||||
KERNELDIR='linux-odroidxu-next'
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
BOOTLOADER='https://github.com/hardkernel/u-boot.git'
|
||||
BOOTSOURCE='https://github.com/hardkernel/u-boot.git'
|
||||
BOOTBRANCH='odroidc2-v2015.01'
|
||||
BOOTSOURCE='u-boot-odroidc2'
|
||||
BOOTDIR='u-boot-odroidc2'
|
||||
BOOTSIZE=64
|
||||
UBOOT_NEEDS_GCC='< 5.0'
|
||||
UBOOT_TARGET="ARCH=arm"
|
||||
|
||||
LINUXKERNEL='https://github.com/hardkernel/linux'
|
||||
KERNELSOURCE='https://github.com/hardkernel/linux'
|
||||
KERNELBRANCH='odroidc2-3.14.y'
|
||||
LINUXSOURCE='linux-odroidc2'
|
||||
KERNELDIR='linux-odroidc2'
|
||||
|
||||
ARCH=arm64
|
||||
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
|
||||
BOOTLOADER='https://github.com/hardkernel/u-boot.git'
|
||||
BOOTSOURCE='https://github.com/hardkernel/u-boot.git'
|
||||
BOOTBRANCH='odroidxu3-v2012.07'
|
||||
BOOTSOURCE='u-boot-odroidxu'
|
||||
BOOTDIR='u-boot-odroidxu'
|
||||
BOOTSIZE=64
|
||||
OFFSET=2
|
||||
UBOOT_NEEDS_GCC='< 4.9'
|
||||
|
||||
case $BRANCH in
|
||||
default)
|
||||
LINUXKERNEL='https://github.com/hardkernel/linux'
|
||||
KERNELSOURCE='https://github.com/hardkernel/linux'
|
||||
KERNELBRANCH='odroidxu3-3.10.y'
|
||||
LINUXSOURCE='linux-odroidxu4'
|
||||
KERNELDIR='linux-odroidxu4'
|
||||
;;
|
||||
|
||||
next)
|
||||
LINUXKERNEL=$MAINLINE_KERNEL
|
||||
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
|
||||
KERNELBRANCH=$MAINLINE_KERNEL_BRANCH
|
||||
LINUXSOURCE=$MAINLINE_KERNEL_SOURCE
|
||||
KERNELDIR=$MAINLINE_KERNEL_DIR
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
BOOTLOADER='https://github.com/zador-blood-stained/u-boot-pine64-armbian.git'
|
||||
BOOTSOURCE='https://github.com/zador-blood-stained/u-boot-pine64-armbian.git'
|
||||
BOOTBRANCH=''
|
||||
BOOTSOURCE='u-boot-pine64-armbian'
|
||||
BOOTDIR='u-boot-pine64-armbian'
|
||||
UBOOT_NEEDS_GCC='<4.9'
|
||||
|
||||
OFFSET=20
|
||||
|
@ -9,16 +9,16 @@ BOOTSIZE=64
|
|||
|
||||
case $BRANCH in
|
||||
default)
|
||||
LINUXKERNEL='https://github.com/longsleep/linux-pine64.git'
|
||||
KERNELSOURCE='https://github.com/longsleep/linux-pine64.git'
|
||||
KERNELBRANCH='pine64-hacks-1.2'
|
||||
LINUXSOURCE='linux-pine64'
|
||||
KERNELDIR='linux-pine64'
|
||||
GOVERNOR=interactive
|
||||
;;
|
||||
|
||||
dev)
|
||||
LINUXKERNEL='https://github.com/apritzel/linux.git'
|
||||
KERNELSOURCE='https://github.com/apritzel/linux.git'
|
||||
KERNELBRANCH='a64-wip'
|
||||
LINUXSOURCE='linux-pine64-dev'
|
||||
KERNELDIR='linux-pine64-dev'
|
||||
GOVERNOR=ondemand
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
|
||||
BOOTLOADER='https://github.com/LeMaker/u-boot-actions'
|
||||
BOOTSOURCE='https://github.com/LeMaker/u-boot-actions'
|
||||
BOOTBRANCH='s500-master'
|
||||
BOOTSOURCE='u-boot-s500'
|
||||
BOOTDIR='u-boot-s500'
|
||||
|
||||
UBOOT_TARGET="u-boot-dtb.img"
|
||||
|
||||
BOOTSIZE=32
|
||||
OFFSET=16
|
||||
|
||||
LINUXKERNEL='https://github.com/LeMaker/linux-actions'
|
||||
KERNELSOURCE='https://github.com/LeMaker/linux-actions'
|
||||
KERNELBRANCH='linux-3.10.y'
|
||||
LINUXSOURCE='linux-s500'
|
||||
KERNELDIR='linux-s500'
|
||||
|
||||
CPUMIN=408000
|
||||
CPUMAX=1104000
|
||||
|
@ -25,9 +25,9 @@ case $BOARD in
|
|||
|
||||
roseapple)
|
||||
UBOOT_FILES="$SRC/lib/bin/s500-bootloader-roseapple.bin u-boot-dtb.img"
|
||||
BOOTLOADER='https://github.com/xapp-le/u-boot'
|
||||
BOOTSOURCE='https://github.com/xapp-le/u-boot'
|
||||
BOOTBRANCH='merge-20160113'
|
||||
BOOTSOURCE='u-boot-roseapple'
|
||||
BOOTDIR='u-boot-roseapple'
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
|
@ -3,21 +3,21 @@ source "${BASH_SOURCE%/*}/sunxi_common.inc"
|
|||
|
||||
case $BRANCH in
|
||||
default)
|
||||
LINUXKERNEL='https://github.com/linux-sunxi/linux-sunxi'
|
||||
KERNELSOURCE='https://github.com/linux-sunxi/linux-sunxi'
|
||||
KERNELBRANCH='sunxi-3.4'
|
||||
LINUXSOURCE='linux-sunxi'
|
||||
KERNELDIR='linux-sunxi'
|
||||
;;
|
||||
|
||||
next)
|
||||
LINUXKERNEL=$MAINLINE_KERNEL
|
||||
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
|
||||
KERNELBRANCH=$MAINLINE_KERNEL_BRANCH
|
||||
LINUXSOURCE=$MAINLINE_KERNEL_SOURCE
|
||||
KERNELDIR=$MAINLINE_KERNEL_DIR
|
||||
;;
|
||||
|
||||
dev)
|
||||
LINUXKERNEL=$MAINLINE_KERNEL
|
||||
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
|
||||
KERNELBRANCH=''
|
||||
LINUXSOURCE=$MAINLINE_KERNEL_SOURCE
|
||||
KERNELDIR=$MAINLINE_KERNEL_DIR
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
|
@ -3,22 +3,22 @@ source "${BASH_SOURCE%/*}/sunxi_common.inc"
|
|||
|
||||
case $BRANCH in
|
||||
default)
|
||||
LINUXKERNEL='https://github.com/linux-sunxi/linux-sunxi'
|
||||
KERNELSOURCE='https://github.com/linux-sunxi/linux-sunxi'
|
||||
KERNELBRANCH='sunxi-3.4'
|
||||
LINUXSOURCE='linux-sunxi'
|
||||
KERNELDIR='linux-sunxi'
|
||||
KERNEL_NEEDS_GCC='< 5.0'
|
||||
;;
|
||||
|
||||
next)
|
||||
LINUXKERNEL=$MAINLINE_KERNEL
|
||||
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
|
||||
KERNELBRANCH=$MAINLINE_KERNEL_BRANCH
|
||||
LINUXSOURCE=$MAINLINE_KERNEL_SOURCE
|
||||
KERNELDIR=$MAINLINE_KERNEL_DIR
|
||||
;;
|
||||
|
||||
dev)
|
||||
LINUXKERNEL=$MAINLINE_KERNEL
|
||||
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
|
||||
KERNELBRANCH=''
|
||||
LINUXSOURCE=$MAINLINE_KERNEL_SOURCE
|
||||
KERNELDIR=$MAINLINE_KERNEL_DIR
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
|
@ -3,21 +3,21 @@ source "${BASH_SOURCE%/*}/sunxi_common.inc"
|
|||
|
||||
case $BRANCH in
|
||||
default)
|
||||
LINUXKERNEL='https://github.com/linux-sunxi/linux-sunxi'
|
||||
KERNELSOURCE='https://github.com/linux-sunxi/linux-sunxi'
|
||||
KERNELBRANCH='sunxi-3.4'
|
||||
LINUXSOURCE='linux-sunxi'
|
||||
KERNELDIR='linux-sunxi'
|
||||
;;
|
||||
|
||||
next)
|
||||
LINUXKERNEL=$MAINLINE_KERNEL
|
||||
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
|
||||
KERNELBRANCH=$MAINLINE_KERNEL_BRANCH
|
||||
LINUXSOURCE=$MAINLINE_KERNEL_SOURCE
|
||||
KERNELDIR=$MAINLINE_KERNEL_DIR
|
||||
;;
|
||||
|
||||
dev)
|
||||
LINUXKERNEL=$MAINLINE_KERNEL
|
||||
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
|
||||
KERNELBRANCH=''
|
||||
LINUXSOURCE=$MAINLINE_KERNEL_SOURCE
|
||||
KERNELDIR=$MAINLINE_KERNEL_DIR
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
|
@ -3,25 +3,25 @@ source "${BASH_SOURCE%/*}/sunxi_common.inc"
|
|||
|
||||
case $BRANCH in
|
||||
default)
|
||||
LINUXKERNEL='https://github.com/linux-sunxi/linux-sunxi'
|
||||
KERNELSOURCE='https://github.com/linux-sunxi/linux-sunxi'
|
||||
KERNELBRANCH='sunxi-3.4'
|
||||
LINUXSOURCE='linux-sunxi'
|
||||
KERNELDIR='linux-sunxi'
|
||||
|
||||
CPUMAX=1010000
|
||||
;;
|
||||
|
||||
next)
|
||||
LINUXKERNEL=$MAINLINE_KERNEL
|
||||
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
|
||||
KERNELBRANCH=$MAINLINE_KERNEL_BRANCH
|
||||
LINUXSOURCE=$MAINLINE_KERNEL_SOURCE
|
||||
KERNELDIR=$MAINLINE_KERNEL_DIR
|
||||
|
||||
CPUMAX=960000
|
||||
;;
|
||||
|
||||
dev)
|
||||
LINUXKERNEL=$MAINLINE_KERNEL
|
||||
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
|
||||
KERNELBRANCH=''
|
||||
LINUXSOURCE=$MAINLINE_KERNEL_SOURCE
|
||||
KERNELDIR=$MAINLINE_KERNEL_DIR
|
||||
|
||||
CPUMAX=960000
|
||||
;;
|
||||
|
|
|
@ -3,15 +3,15 @@ source "${BASH_SOURCE%/*}/sunxi_common.inc"
|
|||
|
||||
case $BRANCH in
|
||||
default)
|
||||
LINUXKERNEL='https://github.com/igorpecovnik/linux'
|
||||
KERNELSOURCE='https://github.com/igorpecovnik/linux'
|
||||
KERNELBRANCH='sun8i'
|
||||
LINUXSOURCE='linux-sun8i'
|
||||
KERNELDIR='linux-sun8i'
|
||||
;;
|
||||
|
||||
dev)
|
||||
LINUXKERNEL='https://github.com/megous/linux'
|
||||
KERNELSOURCE='https://github.com/megous/linux'
|
||||
KERNELBRANCH='orange-pi-4.6'
|
||||
LINUXSOURCE='linux-sun8i-mainline'
|
||||
KERNELDIR='linux-sun8i-mainline'
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
|
@ -3,21 +3,21 @@ source "${BASH_SOURCE%/*}/sunxi_common.inc"
|
|||
|
||||
case $BRANCH in
|
||||
default)
|
||||
LINUXKERNEL='https://github.com/linux-sunxi/linux-sunxi'
|
||||
KERNELSOURCE='https://github.com/linux-sunxi/linux-sunxi'
|
||||
KERNELBRANCH='sunxi-3.4'
|
||||
LINUXSOURCE='linux-sunxi'
|
||||
KERNELDIR='linux-sunxi'
|
||||
;;
|
||||
|
||||
next)
|
||||
LINUXKERNEL=$MAINLINE_KERNEL
|
||||
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
|
||||
KERNELBRANCH=$MAINLINE_KERNEL_BRANCH
|
||||
LINUXSOURCE=$MAINLINE_KERNEL_SOURCE
|
||||
KERNELDIR=$MAINLINE_KERNEL_DIR
|
||||
;;
|
||||
|
||||
dev)
|
||||
LINUXKERNEL=$MAINLINE_KERNEL
|
||||
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
|
||||
KERNELBRANCH=''
|
||||
LINUXSOURCE=$MAINLINE_KERNEL_SOURCE
|
||||
KERNELDIR=$MAINLINE_KERNEL_DIR
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
BOOTLOADER=$MAINLINE_UBOOT
|
||||
BOOTSOURCE=$MAINLINE_UBOOT_SOURCE
|
||||
BOOTDIR=$MAINLINE_UBOOT_DIR
|
||||
BOOTBRANCH=$MAINLINE_UBOOT_BRANCH
|
||||
|
||||
case $BRANCH in
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
|
||||
BOOTLOADER='git://git.toradex.com/u-boot-toradex.git'
|
||||
BOOTSOURCE='git://git.toradex.com/u-boot-toradex.git'
|
||||
BOOTBRANCH='2015.04-toradex'
|
||||
BOOTSOURCE='u-boot-toradex'
|
||||
BOOTDIR='u-boot-toradex'
|
||||
|
||||
LINUXKERNEL='git://git.toradex.com/linux-toradex.git'
|
||||
KERNELSOURCE='git://git.toradex.com/linux-toradex.git'
|
||||
KERNELBRANCH='toradex_imx_3.14.28_1.0.0_ga'
|
||||
LINUXSOURCE='linux-toradex'
|
||||
KERNELDIR='linux-toradex'
|
||||
|
||||
# CPUMIN=
|
||||
# CPUMAX=
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
|
||||
BOOTLOADER='https://github.com/UDOOboard/uboot-imx'
|
||||
BOOTSOURCE='https://github.com/UDOOboard/uboot-imx'
|
||||
BOOTBRANCH='2015.10.fslc-qdl'
|
||||
BOOTSOURCE='u-boot-udoo'
|
||||
BOOTDIR='u-boot-udoo'
|
||||
|
||||
case $BRANCH in
|
||||
default)
|
||||
LINUXKERNEL='https://github.com/UDOOboard/linux_kernel'
|
||||
KERNELSOURCE='https://github.com/UDOOboard/linux_kernel'
|
||||
KERNELBRANCH='3.14-1.0.x-udoo'
|
||||
LINUXSOURCE='linux-udoo'
|
||||
KERNELDIR='linux-udoo'
|
||||
;;
|
||||
|
||||
next)
|
||||
LINUXKERNEL='https://github.com/patrykk/linux-udoo'
|
||||
KERNELSOURCE='https://github.com/patrykk/linux-udoo'
|
||||
KERNELBRANCH='v4.4.0-6-vivante-5.0.11.p7.3'
|
||||
LINUXSOURCE='linux-udoo-next'
|
||||
KERNELDIR='linux-udoo-next'
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
|
@ -28,20 +28,20 @@ CACHEDIR=$DEST/cache
|
|||
|
||||
# used by multiple sources - reduce code duplication
|
||||
if [[ $USE_MAINLINE_GOOGLE_MIRROR == yes ]]; then
|
||||
MAINLINE_KERNEL='https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable'
|
||||
MAINLINE_KERNEL_SOURCE='https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable'
|
||||
else
|
||||
MAINLINE_KERNEL='git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git'
|
||||
MAINLINE_KERNEL_SOURCE='git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git'
|
||||
fi
|
||||
# allow upgrades for same major.minor versions
|
||||
ARMBIAN_MAINLINE_KERNEL_VERSION="4.6"
|
||||
MAINLINE_KERNEL_BRANCH=v$(wget -qO- https://www.kernel.org/finger_banner | awk '{print $NF}' | grep -oE "^${ARMBIAN_MAINLINE_KERNEL_VERSION//./\\.}\.?[[:digit:]]*")
|
||||
#MAINLINE_KERNEL_BRANCH="v$(wget -qO- https://www.kernel.org/finger_banner | grep "The latest st" | awk '{print $NF}' | head -1)"
|
||||
MAINLINE_KERNEL_SOURCE="linux-vanilla"
|
||||
MAINLINE_KERNEL_DIR="linux-vanilla"
|
||||
|
||||
MAINLINE_UBOOT='git://git.denx.de/u-boot.git'
|
||||
MAINLINE_UBOOT_SOURCE='git://git.denx.de/u-boot.git'
|
||||
#MAINLINE_UBOOT_BRANCH="v$(git ls-remote git://git.denx.de/u-boot.git | grep -v rc | grep -v '\^' | tail -1 | cut -d'v' -f 2)"
|
||||
MAINLINE_UBOOT_BRANCH="v2016.07"
|
||||
MAINLINE_UBOOT_SOURCE='u-boot'
|
||||
MAINLINE_UBOOT_DIR='u-boot'
|
||||
|
||||
if [[ -f $SRC/lib/config/sources/$LINUXFAMILY.conf ]]; then
|
||||
source $SRC/lib/config/sources/$LINUXFAMILY.conf
|
||||
|
@ -168,14 +168,17 @@ PACKAGE_LIST="$PACKAGE_LIST $PACKAGE_LIST_RELEASE $PACKAGE_LIST_ADDITIONAL"
|
|||
# debug
|
||||
cat <<-EOF >> $DEST/debug/output.log
|
||||
## BUILD CONFIGURATION
|
||||
Config: $LINUXCONFIG
|
||||
Kernel source: $LINUXKERNEL
|
||||
Kernel configuration:
|
||||
Repository: $KERNELSOURCE
|
||||
Branch: $KERNELBRANCH
|
||||
linuxsource: $LINUXSOURCE
|
||||
Config file: $LINUXCONFIG
|
||||
|
||||
U-boot configuration:
|
||||
Repository: $BOOTSOURCE
|
||||
Branch: $BOOTBRANCH
|
||||
Offset: $OFFSET
|
||||
bootsize: $BOOTSIZE
|
||||
bootloader: $BOOTLOADER
|
||||
bootsource: $BOOTSOURCE
|
||||
bootbranch: $BOOTBRANCH
|
||||
CPU $CPUMIN / $CPUMAX with $GOVERNOR
|
||||
Size: $BOOTSIZE
|
||||
|
||||
CPU configuration:
|
||||
$CPUMIN - $CPUMAX with $GOVERNOR
|
||||
EOF
|
||||
|
|
95
general.sh
95
general.sh
|
@ -14,6 +14,7 @@
|
|||
# exit_with_error
|
||||
# get_package_list_hash
|
||||
# fetch_from_github
|
||||
# fetch_from_repo
|
||||
# display_alert
|
||||
# grab_version
|
||||
# fingerprint_image
|
||||
|
@ -177,6 +178,100 @@ if [ $? -ne 0 ]; then
|
|||
fi
|
||||
}
|
||||
|
||||
# fetch_rom_repo <url> <directory> <ref> <ref_subdir>
|
||||
# <url>: remote repository URL
|
||||
# <directory>: local directory; subdir for branch/tag will be created
|
||||
# <ref>:
|
||||
# branch:name
|
||||
# tag:name
|
||||
# HEAD*
|
||||
# commit:hash@depth*
|
||||
#
|
||||
# *: Work in progress
|
||||
# <ref_subdir>: "yes" to create subdirectory for tag or branch name
|
||||
#
|
||||
fetch_from_repo()
|
||||
{
|
||||
local url=$1
|
||||
local dir=$2
|
||||
local ref=$3
|
||||
local ref_subdir=$4
|
||||
|
||||
[[ -z $ref || ( $ref != tag:* && $ref != branch:* ) ]] && exit_with_error "Error in configuration"
|
||||
local ref_type=${ref%%:*}
|
||||
local ref_name=${ref##*:}
|
||||
|
||||
display_alert "Checking git sources" "$dir $ref_name" "info"
|
||||
|
||||
# get default remote branch name without cloning
|
||||
# doesn't work with git:// remote URLs
|
||||
# local ref_name=$(git ls-remote --symref $url HEAD | grep -o 'refs/heads/\S*' | sed 's%refs/heads/%%')
|
||||
|
||||
if [[ $ref_subdir == yes ]]; then
|
||||
mkdir -p $SOURCES/$dir/$ref_name
|
||||
cd $SOURCES/$dir/$ref_name
|
||||
else
|
||||
mkdir -p $SOURCES/$dir/
|
||||
cd $SOURCES/$dir/
|
||||
fi
|
||||
|
||||
# this may not work if $SRC is a part of git repository
|
||||
if [[ $(git rev-parse --is-inside-work-tree 2>/dev/null) != true ]]; then
|
||||
display_alert "Creating local copy"
|
||||
git init -q .
|
||||
git remote add origin $url
|
||||
fi
|
||||
|
||||
local local_hash=$(git rev-parse @ 2>/dev/null)
|
||||
|
||||
local changed=false
|
||||
case $ref_type in
|
||||
branch)
|
||||
local remote_hash=$(git ls-remote -h origin "$ref_name" | cut -f1)
|
||||
[[ $local_hash != $remote_hash ]] && changed=true
|
||||
;;
|
||||
|
||||
tag)
|
||||
local remote_hash=$(git ls-remote -t origin "$ref_name" | cut -f1)
|
||||
if [[ $local_hash != $remote_hash ]]; then
|
||||
remote_hash=$(git ls-remote -t origin "$ref_name^{}" | cut -f1)
|
||||
[[ -z $remote_hash || $local_hash != $remote_hash ]] && changed=true
|
||||
fi
|
||||
;;
|
||||
|
||||
head)
|
||||
local remote_hash=$(git ls-remote origin HEAD | cut -f1)
|
||||
[[ $local_hash != $remote_hash ]] && changed=true
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ $changed == true ]]; then
|
||||
# remote was updated, fetch and check out updates
|
||||
display_alert "Fetching updates"
|
||||
case $ref_type in
|
||||
branch) git fetch --depth 1 origin $ref_name ;;
|
||||
tag) git fetch --depth 1 origin tags/$ref_name ;;
|
||||
head) git fetch --depth 1 origin HEAD ;;
|
||||
esac
|
||||
display_alert "Checking out"
|
||||
git checkout -f -q FETCH_HEAD
|
||||
elif [[ -n $(git status -uno --porcelain) ]]; then
|
||||
# working directory is not clean
|
||||
if [[ $FORCE_CHECKOUT == yes ]]; then
|
||||
display_alert "Checking out"
|
||||
git checkout -f -q HEAD
|
||||
else
|
||||
display_alert "Skipping checkout"
|
||||
fi
|
||||
else
|
||||
# working directory is clean, nothing to do
|
||||
display_alert "Up to date"
|
||||
fi
|
||||
if [[ -f .gitmodules ]]; then
|
||||
display_alert "Updating submodules"
|
||||
git submodule update --init --depth 1
|
||||
fi
|
||||
} #############################################################################
|
||||
|
||||
display_alert()
|
||||
#--------------------------------------------------------------------------------------------------------------------------------
|
||||
|
|
10
main.sh
10
main.sh
|
@ -177,10 +177,10 @@ start=`date +%s`
|
|||
[[ $CLEAN_LEVEL == *sources* ]] && cleaning "sources"
|
||||
|
||||
display_alert "source downloading" "@host" "info"
|
||||
fetch_from_github "$BOOTLOADER" "$BOOTSOURCE" "$BOOTBRANCH" "yes"
|
||||
BOOTSOURCEDIR=$BOOTSOURCE/$GITHUBSUBDIR
|
||||
fetch_from_github "$LINUXKERNEL" "$LINUXSOURCE" "$KERNELBRANCH" "yes"
|
||||
LINUXSOURCEDIR=$LINUXSOURCE/$GITHUBSUBDIR
|
||||
fetch_from_github "$BOOTSOURCE" "$BOOTDIR" "$BOOTBRANCH" "yes"
|
||||
BOOTSOURCEDIR=$BOOTDIR/$GITHUBSUBDIR
|
||||
fetch_from_github "$KERNELSOURCE" "$KERNELDIR" "$KERNELBRANCH" "yes"
|
||||
LINUXSOURCEDIR=$KERNELDIR/$GITHUBSUBDIR
|
||||
|
||||
if [[ -n $MISC1 ]]; then fetch_from_github "$MISC1" "$MISC1_DIR"; fi
|
||||
if [[ -n $MISC5 ]]; then fetch_from_github "$MISC5" "$MISC5_DIR"; fi
|
||||
|
@ -213,7 +213,7 @@ if [[ ! -f $DEST/debs/${CHOSEN_UBOOT}_${REVISION}_${ARCH}.deb ]]; then
|
|||
fi
|
||||
cd $SOURCES/$BOOTSOURCEDIR
|
||||
grab_version "$SOURCES/$BOOTSOURCEDIR" "UBOOT_VER"
|
||||
[[ $FORCE_CHECKOUT == yes ]] && advanced_patch "u-boot" "$BOOTSOURCE-$BRANCH" "$BOARD" "$BOOTSOURCE-$BRANCH $UBOOT_VER"
|
||||
[[ $FORCE_CHECKOUT == yes ]] && advanced_patch "u-boot" "$BOOTDIR-$BRANCH" "$BOARD" "$BOOTDIR-$BRANCH $UBOOT_VER"
|
||||
compile_uboot
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue