commit
ff3bb4265f
@ -43,11 +43,12 @@ fi
|
||||
[[ $ROOTFS_TYPE == nfs ]] && FIXED_IMAGE_SIZE=64
|
||||
|
||||
# used by multiple sources - reduce code duplication
|
||||
if [[ $USE_MAINLINE_GOOGLE_MIRROR == yes ]]; then
|
||||
MAINLINE_KERNEL_SOURCE='https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable'
|
||||
else
|
||||
MAINLINE_KERNEL_SOURCE='git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git'
|
||||
fi
|
||||
[[ $USE_MAINLINE_GOOGLE_MIRROR == yes ]] && MAINLINE_MIRROR=google
|
||||
case $MAINLINE_MIRROR in
|
||||
google) MAINLINE_KERNEL_SOURCE='https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable' ;;
|
||||
tuna) MAINLINE_KERNEL_SOURCE='https://mirrors.tuna.tsinghua.edu.cn/git/linux-stable.git' ;;
|
||||
*) MAINLINE_KERNEL_SOURCE='git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git' ;;
|
||||
esac
|
||||
MAINLINE_KERNEL_DIR='linux-mainline'
|
||||
|
||||
if [[ $USE_GITHUB_UBOOT_MIRROR == yes ]]; then
|
||||
@ -226,6 +227,11 @@ esac
|
||||
DEBIAN_MIRROR='httpredir.debian.org/debian'
|
||||
UBUNTU_MIRROR='ports.ubuntu.com/'
|
||||
|
||||
if [[ $DOWNLOAD_MIRROR == china ]] ; then
|
||||
DEBIAN_MIRROR='mirrors.tuna.tsinghua.edu.cn/debian'
|
||||
UBUNTU_MIRROR='mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/'
|
||||
fi
|
||||
|
||||
# For user override
|
||||
if [[ -f $SRC/userpatches/lib.config ]]; then
|
||||
display_alert "Using user configuration override" "userpatches/lib.config" "info"
|
||||
|
||||
@ -375,7 +375,7 @@ prepare_partitions()
|
||||
|
||||
# stage: create blank image
|
||||
display_alert "Creating blank image for rootfs" "$sdsize MiB" "info"
|
||||
dd if=/dev/zero bs=1M status=none count=$sdsize | pv -p -b -r -s $(( $sdsize * 1024 * 1024 )) | dd status=none of=${SDCARD}.raw
|
||||
truncate --size=${sdsize}M ${SDCARD}.raw
|
||||
|
||||
# stage: calculate boot partition size
|
||||
local bootstart=$(($OFFSET * 2048))
|
||||
|
||||
@ -624,7 +624,7 @@ prepare_host()
|
||||
# sync clock
|
||||
if [[ $SYNC_CLOCK != no ]]; then
|
||||
display_alert "Syncing clock" "host" "info"
|
||||
ntpdate -s ${NTP_SERVER:- time.ijs.si}
|
||||
ntpdate -s ${NTP_SERVER:- pool.ntp.org}
|
||||
fi
|
||||
|
||||
if [[ $(dpkg-query -W -f='${db:Status-Abbrev}\n' 'zlib1g:i386' 2>/dev/null) != *ii* ]]; then
|
||||
@ -658,6 +658,9 @@ prepare_host()
|
||||
# Use backup server by default to balance the load
|
||||
|
||||
ARMBIANSERVER=dl.armbian.com
|
||||
if [[ $DOWNLOAD_MIRROR == 'china' ]]; then
|
||||
ARMBIANSERVER='mirrors.tuna.tsinghua.edu.cn/armbian-releases'
|
||||
fi
|
||||
|
||||
local toolchains=(
|
||||
"https://${ARMBIANSERVER}/_toolchains/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.xz"
|
||||
@ -671,7 +674,6 @@ prepare_host()
|
||||
"https://${ARMBIANSERVER}/_toolchains/gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf.tar.xz"
|
||||
"https://${ARMBIANSERVER}/_toolchains/gcc-linaro-6.4.1-2017.11-x86_64_arm-linux-gnueabihf.tar.xz"
|
||||
"https://${ARMBIANSERVER}/_toolchains/gcc-linaro-6.4.1-2017.11-x86_64_aarch64-linux-gnu.tar.xz"
|
||||
"https://${ARMBIANSERVER}/_toolchains/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz"
|
||||
"https://${ARMBIANSERVER}/_toolchains/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf.tar.xz"
|
||||
"https://${ARMBIANSERVER}/_toolchains/gcc-linaro-7.4.1-2019.02-x86_64_arm-eabi.tar.xz"
|
||||
"https://${ARMBIANSERVER}/_toolchains/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi.tar.xz"
|
||||
|
||||
@ -14,14 +14,17 @@ build_firmware()
|
||||
local plugin_repo="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git"
|
||||
local plugin_dir="armbian-firmware${FULL}"
|
||||
[[ -d $SRC/cache/sources/$plugin_dir ]] && rm -rf $SRC/cache/sources/$plugin_dir
|
||||
mkdir -p $SRC/cache/sources/$plugin_dir/lib/firmware
|
||||
|
||||
fetch_from_repo "https://github.com/armbian/firmware" "armbian-firmware-git" "branch:master"
|
||||
if [[ -n $FULL ]]; then
|
||||
fetch_from_repo "$plugin_repo" "$plugin_dir/lib/firmware" "branch:master"
|
||||
fetch_from_repo "$plugin_repo" "linux-firmware-git" "branch:master"
|
||||
# cp : create hardlinks
|
||||
cp -alf $SRC/cache/sources/linux-firmware-git/* $SRC/cache/sources/$plugin_dir/lib/firmware/
|
||||
fi
|
||||
mkdir -p $SRC/cache/sources/$plugin_dir/lib/firmware
|
||||
# overlay our firmware
|
||||
cp -R $SRC/cache/sources/armbian-firmware-git/* $SRC/cache/sources/$plugin_dir/lib/firmware
|
||||
# cp : create hardlinks
|
||||
cp -alf $SRC/cache/sources/armbian-firmware-git/* $SRC/cache/sources/$plugin_dir/lib/firmware/
|
||||
|
||||
# cleanup what's not needed for sure
|
||||
rm -rf $SRC/cache/sources/$plugin_dir/lib/firmware/{amdgpu,amd-ucode,radeon,nvidia,matrox,.git}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user