run shellfmt on all of sources/families

This commit is contained in:
Ricardo Pardini
2022-10-08 13:18:00 +02:00
parent 6b28de15fe
commit 5e17c4f533
39 changed files with 630 additions and 730 deletions

View File

@@ -24,14 +24,14 @@ if [ "$(uname -m)" = "aarch64" ]; then
[[ $ATF_COMPILE != "no" && -z $ATF_COMPILER ]] && ATF_COMPILER="aarch64-linux-gnu-"
[[ -z $UBOOT_COMPILER ]] && UBOOT_COMPILER="aarch64-linux-gnu-"
[[ -z $KERNEL_COMPILER ]] && KERNEL_COMPILER="aarch64-linux-gnu-"
[[ -z $KERNEL_USE_GCC ]] && KERNEL_USE_GCC='> 8.0'
[[ -z $KERNEL_USE_GCC ]] && KERNEL_USE_GCC='> 8.0'
else
[[ $ATF_COMPILE != "no" && -z $ATF_COMPILER ]] && ATF_COMPILER="aarch64-none-linux-gnu-"
[[ -z $UBOOT_COMPILER ]] && UBOOT_COMPILER="aarch64-none-linux-gnu-"
# > 9.2 https://armbian.atlassian.net/browse/AR-557
# [[ -z $KERNEL_COMPILER ]] && KERNEL_COMPILER="aarch64-none-linux-gnu-"
[[ -z $KERNEL_COMPILER ]] && KERNEL_COMPILER="aarch64-linux-gnu-"
[[ -z $KERNEL_USE_GCC ]] && KERNEL_USE_GCC='< 9.2'
[[ -z $KERNEL_COMPILER ]] && KERNEL_COMPILER="aarch64-linux-gnu-"
[[ -z $KERNEL_USE_GCC ]] && KERNEL_USE_GCC='< 9.2'
fi
[[ $ATF_COMPILE != "no" && -z $ATFSOURCE ]] && ATFSOURCE='https://github.com/ARM-software/arm-trusted-firmware'
@@ -39,14 +39,14 @@ fi
[[ $ATF_COMPILE != "no" && -z $ATFBRANCH ]] && ATFBRANCH='commit:af220ebbe467aa580e6b9ba554676f78ffec930f'
[[ $ATF_COMPILE != "no" && -z $ATF_USE_GCC ]] && ATF_USE_GCC='> 8.0'
[[ -z $UBOOT_USE_GCC ]] && UBOOT_USE_GCC='> 8.0'
[[ -z $BOOTSOURCE ]] && BOOTSOURCE=$MAINLINE_UBOOT_SOURCE
[[ -z $BOOTDIR ]] && BOOTDIR=$MAINLINE_UBOOT_DIR
[[ -z $BOOTBRANCH ]] && BOOTBRANCH='tag:v2022.07'
[[ -z $UBOOT_USE_GCC ]] && UBOOT_USE_GCC='> 8.0'
[[ -z $BOOTSOURCE ]] && BOOTSOURCE=$MAINLINE_UBOOT_SOURCE
[[ -z $BOOTDIR ]] && BOOTDIR=$MAINLINE_UBOOT_DIR
[[ -z $BOOTBRANCH ]] && BOOTBRANCH='tag:v2022.07'
[[ -z $KERNELDIR ]] && KERNELDIR=$MAINLINE_KERNEL_DIR
[[ -z $KERNELSOURCE ]] && KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
[[ -z $KERNELBRANCH ]] && KERNELBRANCH='branch:linux-5.4.y'
[[ -z $KERNELDIR ]] && KERNELDIR=$MAINLINE_KERNEL_DIR
[[ -z $KERNELSOURCE ]] && KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
[[ -z $KERNELBRANCH ]] && KERNELBRANCH='branch:linux-5.4.y'
## System toolchains don't have the -none- variant, remove it
[[ "${SKIP_EXTERNAL_TOOLCHAINS}" == "yes" ]] && [[ "${UBOOT_COMPILER}" = *none* ]] && UBOOT_COMPILER="${UBOOT_COMPILER//-none-/-}"
@@ -54,12 +54,12 @@ fi
if [ "$(uname -m)" = "aarch64" ]; then
case "$(lsb_release -sc)" in
"bullseye"|"focal"|"hirsute"|"impish"|"jammy")
PKG_PREFIX="qemu-x86_64-static -L /usr/x86_64-linux-gnu "
;;
*)
PKG_PREFIX="qemu-x86_64 -L /usr/x86_64-linux-gnu "
;;
"bullseye" | "focal" | "hirsute" | "impish" | "jammy")
PKG_PREFIX="qemu-x86_64-static -L /usr/x86_64-linux-gnu "
;;
*)
PKG_PREFIX="qemu-x86_64 -L /usr/x86_64-linux-gnu "
;;
esac
else
PKG_PREFIX=""

View File

@@ -21,24 +21,24 @@ CAN_BUILD_STRETCH=yes
FAST_CREATE_IMAGE="yes"
if [ "$(uname -m)" = "aarch64" ]; then
[[ -z $UBOOT_COMPILER ]] && UBOOT_COMPILER="arm-linux-gnueabihf-"
[[ -z $UBOOT_COMPILER ]] && UBOOT_COMPILER="arm-linux-gnueabihf-"
else
[[ -z $UBOOT_COMPILER ]] && UBOOT_COMPILER="arm-none-linux-gnueabihf-"
[[ -z $UBOOT_COMPILER ]] && UBOOT_COMPILER="arm-none-linux-gnueabihf-"
fi
[[ -z $UBOOT_USE_GCC ]] && UBOOT_USE_GCC='> 8.0'
[[ -z $BOOTSOURCE ]] && BOOTSOURCE=$MAINLINE_UBOOT_SOURCE
[[ -z $BOOTDIR ]] && BOOTDIR=$MAINLINE_UBOOT_DIR
[[ -z $BOOTBRANCH ]] && BOOTBRANCH='tag:v2022.07'
[[ -z $UBOOT_USE_GCC ]] && UBOOT_USE_GCC='> 8.0'
[[ -z $BOOTSOURCE ]] && BOOTSOURCE=$MAINLINE_UBOOT_SOURCE
[[ -z $BOOTDIR ]] && BOOTDIR=$MAINLINE_UBOOT_DIR
[[ -z $BOOTBRANCH ]] && BOOTBRANCH='tag:v2022.07'
if [ "$(uname -m)" = "aarch64" ]; then
[[ -z $KERNEL_COMPILER ]] && KERNEL_COMPILER="arm-linux-gnueabihf-"
[[ -z $KERNEL_USE_GCC ]] && KERNEL_USE_GCC='> 8.0'
[[ -z $KERNEL_COMPILER ]] && KERNEL_COMPILER="arm-linux-gnueabihf-"
[[ -z $KERNEL_USE_GCC ]] && KERNEL_USE_GCC='> 8.0'
else
# > 9.2 https://armbian.atlassian.net/browse/AR-557
#[[ -z $KERNEL_COMPILER ]] && KERNEL_COMPILER="arm-none-linux-gnueabihf-"
[[ -z $KERNEL_COMPILER ]] && KERNEL_COMPILER="arm-linux-gnueabihf-"
[[ -z $KERNEL_USE_GCC ]] && KERNEL_USE_GCC='< 9.2'
[[ -z $KERNEL_COMPILER ]] && KERNEL_COMPILER="arm-linux-gnueabihf-"
[[ -z $KERNEL_USE_GCC ]] && KERNEL_USE_GCC='< 9.2'
fi
[[ -z $KERNELDIR ]] && KERNELDIR=$MAINLINE_KERNEL_DIR
[[ -z $KERNELSOURCE ]] && KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
[[ -z $KERNELBRANCH ]] && KERNELBRANCH='branch:linux-5.4.y'
[[ -z $KERNELDIR ]] && KERNELDIR=$MAINLINE_KERNEL_DIR
[[ -z $KERNELSOURCE ]] && KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
[[ -z $KERNELBRANCH ]] && KERNELBRANCH='branch:linux-5.4.y'

View File

@@ -12,28 +12,28 @@ export GOVERNOR=ondemand
case "${BRANCH}" in
legacy)
export RASPI_DISTRO_KERNEL=yes # This will cause board to include distro's prebuilt kernel, not from source
;;
legacy)
export RASPI_DISTRO_KERNEL=yes # This will cause board to include distro's prebuilt kernel, not from source
;;
current)
export RASPI_DISTRO_KERNEL=no
export KERNELSOURCE='https://github.com/raspberrypi/linux'
export KERNELBRANCH="branch:rpi-5.15.y"
export KERNELPATCHDIR="${LINUXFAMILY}-${BRANCH}"
export LINUXCONFIG="linux-${LINUXFAMILY}-${BRANCH}"
;;
edge)
export RASPI_DISTRO_KERNEL=no
export KERNELSOURCE='https://github.com/raspberrypi/linux'
export KERNELBRANCH="branch:rpi-5.19.y"
export KERNELPATCHDIR="${LINUXFAMILY}-${BRANCH}"
export LINUXCONFIG="linux-${LINUXFAMILY}-${BRANCH}"
;;
current)
export RASPI_DISTRO_KERNEL=no
export KERNELSOURCE='https://github.com/raspberrypi/linux'
export KERNELBRANCH="branch:rpi-5.15.y"
export KERNELPATCHDIR="${LINUXFAMILY}-${BRANCH}"
export LINUXCONFIG="linux-${LINUXFAMILY}-${BRANCH}"
;;
edge)
export RASPI_DISTRO_KERNEL=no
export KERNELSOURCE='https://github.com/raspberrypi/linux'
export KERNELBRANCH="branch:rpi-5.19.y"
export KERNELPATCHDIR="${LINUXFAMILY}-${BRANCH}"
export LINUXCONFIG="linux-${LINUXFAMILY}-${BRANCH}"
;;
esac
pre_initramfs_flash_kernel__write_raspi_cmdline() {
cat <<-EOD >"${FIRMWARE_DIR}/cmdline.txt"
cat <<- EOD > "${FIRMWARE_DIR}/cmdline.txt"
root=LABEL=${ROOT_FS_LABEL} rootfstype=ext4 rootwait fixrtc cgroup_enable=memory cgroup_memory=1 console=tty1 logo.nologo loglevel=1
EOD
}
@@ -55,7 +55,7 @@ pre_flash_kernel__symlink_dtb_and_kernel() {
dtbBase=$(basename "${oneDTB}")
cp "${MOUNT}"/boot/dtb/broadcom/"${dtbBase}" "${MOUNT}"/etc/flash-kernel/dtbs/"${dtbBase}"
done
rm -rf "${MOUNT}"/boot/dtb* || true
# @TODO: rpardini: packaging could maybe already use the correct names? I can't figure out how.
@@ -78,7 +78,7 @@ extension_prepare_config__prepare_rpi_flash_kernel() {
fi
if [[ "${RASPI_DISTRO_KERNEL}" == "yes" ]]; then # and firmware.
unset KERNELSOURCE # Make sure Armbian will not try to compile from source.
unset KERNELSOURCE # Make sure Armbian will not try to compile from source.
export FK__KERNEL_PACKAGES="${FK__KERNEL_PACKAGES} linux-tools-raspi linux-raspi linux-image-raspi "
# Ubuntu Impish+ split the kernel modules, add the extra ones too.
if [[ "$RELEASE" =~ ^(impish|jammy)$ ]]; then

View File

@@ -11,13 +11,13 @@ case $BRANCH in
KERNELBRANCH='branch:linux-5.15.y'
;;
;;
edge)
KERNELBRANCH='branch:linux-5.19.y'
;;
;;
esac
@@ -29,13 +29,13 @@ case $BOARD in
SERIALCON=ttymxc1
BOOTSCRIPT="boot-udoo.cmd:boot.cmd"
BOOTENV_FILE='udoo.txt'
;;
;;
cubox-i)
BOOTSOURCE='https://github.com/SolidRun/u-boot.git'
BOOTBRANCH='branch:v2018.01-solidrun-imx6'
BOOTBRANCH='branch:v2018.01-solidrun-imx6'
BOOTSCRIPT='boot-cubox.cmd:boot.cmd'
BOOTENV_FILE='cubox.txt'
UBOOT_TARGET_MAP=';emmc;SPL:SPL.emmc u-boot.img:u-boot.img.emmc
@@ -43,27 +43,25 @@ case $BOARD in
;sdhc;SPL:SPL.sata u-boot.img:u-boot.img.sata
;sdhc;SPL:SPL.spi-flash u-boot.img:u-boot.img.spi-flash'
;;
;;
wandboard)
BOOTBRANCH="branch:v2017.03"
BOOTSCRIPT='boot-udoo.cmd:boot.cmd'
BOOTENV_FILE='cubox.txt'
;;
;;
esac
write_uboot_platform()
{
write_uboot_platform() {
dd if=$1/SPL.sdhc of=$2 bs=1K seek=1 status=noxfer > /dev/null 2>&1
dd if=$1/u-boot.img.sdhc of=$2 bs=1K seek=69 status=noxfer > /dev/null 2>&1
}
family_tweaks_bsp()
{
install -m 644 $SRC/packages/bsp/cubox/99-hdmi_fb0.conf $destination/etc/X11/xorg.conf.d/99-hdmi_fb0.conf
family_tweaks_bsp() {
install -m 644 $SRC/packages/bsp/cubox/99-hdmi_fb0.conf $destination/etc/X11/xorg.conf.d/99-hdmi_fb0.conf
install -m 755 $SRC/packages/bsp/cubox/brcm_patchram_plus $destination/usr/bin/brcm_patchram_plus
cp $SRC/packages/bsp/cubox/brcm4330 $destination/etc/default/
# TODO: replace by a systemd service

View File

@@ -9,20 +9,20 @@ UBOOT_TARGET_MAP=";;u-boot-dtb.imx"
case $BRANCH in
legacy)
KERNELSOURCE='https://source.codeaurora.org/external/imx/linux-imx'
KERNELBRANCH='branch:imx_4.14.98_2.0.0_ga'
KERNELDIR='linux-imx7'
BOOTBRANCH='branch:imx_v2018.03_4.14.98_2.0.0_ga'
BOOTPATCHDIR="u-boot-imx7d-legacy"
;;
current|default)
;;
current | default)
KERNELSOURCE='https://source.codeaurora.org/external/imx/linux-imx'
KERNELBRANCH='branch:imx_5.4.70_2.3.0'
KERNELDIR='linux-imx7-current'
BOOTBRANCH='branch:imx_v2020.04_5.4.70_2.3.0'
BOOTPATCHDIR="u-boot-imx7d-current"
;;
;;
esac
@@ -32,18 +32,14 @@ GOVERNOR=interactive
SERIALCON=ttymxc0
write_uboot_platform()
{
write_uboot_platform() {
dd if=$1/u-boot-dtb.imx of=$2 bs=1K seek=1 status=noxfer conv=fsync > /dev/null 2>&1
}
family_tweaks()
{
family_tweaks() {
:
}
family_tweaks_bsp()
{
family_tweaks_bsp() {
:
}

View File

@@ -27,17 +27,17 @@ case $BRANCH in
#KERNELBRANCH='branch:odroidg12-4.9.y'
KERNELBRANCH='tag:4.9.277-122'
KERNELDIR='linux-odroid'
;;
;;
current)
current)
KERNELBRANCH='branch:linux-5.10.y'
KERNELPATCHDIR='meson64-current'
;;
;;
edge)
edge)
KERNELBRANCH='branch:linux-5.19.y'
KERNELPATCHDIR='meson64-edge'
;;
;;
esac
@@ -54,135 +54,131 @@ esac
# this helper function includes postprocess for p212 and its variants.
# $1 PATH for uboot blob repo
# $2 dir name in uboot blob repo
uboot_gxl_postprocess()
{
uboot_gxl_postprocess() {
mv u-boot.bin bl33.bin
$1/blx_fix.sh $1/$2/bl30.bin \
$1/$2/zero_tmp \
$1/$2/bl30_zero.bin \
$1/$2/bl301.bin \
$1/$2/bl301_zero.bin \
$1/$2/bl30_new.bin bl30
$1/blx_fix.sh $1/$2/bl30.bin \
$1/$2/zero_tmp \
$1/$2/bl30_zero.bin \
$1/$2/bl301.bin \
$1/$2/bl301_zero.bin \
$1/$2/bl30_new.bin bl30
python $1/acs_tool.pyc $1/$2/bl2.bin \
$1/$2/bl2_acs.bin \
$1/$2/acs.bin 0
$1/$2/bl2_acs.bin \
$1/$2/acs.bin 0
$1/blx_fix.sh $1/$2/bl2_acs.bin \
$1/$2/zero_tmp \
$1/$2/bl2_zero.bin \
$1/$2/bl21.bin \
$1/$2/bl21_zero.bin \
$1/$2/bl2_new.bin bl2
$1/blx_fix.sh $1/$2/bl2_acs.bin \
$1/$2/zero_tmp \
$1/$2/bl2_zero.bin \
$1/$2/bl21.bin \
$1/$2/bl21_zero.bin \
$1/$2/bl2_new.bin bl2
$PKG_PREFIX$1/$2/aml_encrypt_gxl --bl3enc --input $1/$2/bl30_new.bin
$PKG_PREFIX$1/$2/aml_encrypt_gxl --bl3enc --input $1/$2/bl31.img
$PKG_PREFIX$1/$2/aml_encrypt_gxl --bl3enc --input bl33.bin
$PKG_PREFIX$1/$2/aml_encrypt_gxl --bl3enc --input $1/$2/bl30_new.bin
$PKG_PREFIX$1/$2/aml_encrypt_gxl --bl3enc --input $1/$2/bl31.img
$PKG_PREFIX$1/$2/aml_encrypt_gxl --bl3enc --input bl33.bin
$PKG_PREFIX$1/$2/aml_encrypt_gxl --bl2sig --input $1/$2/bl2_new.bin \
--output bl2.n.bin.sig
$PKG_PREFIX$1/$2/aml_encrypt_gxl --bl2sig --input $1/$2/bl2_new.bin \
--output bl2.n.bin.sig
$PKG_PREFIX$1/$2/aml_encrypt_gxl --bootmk \
--output u-boot.bin \
--bl2 bl2.n.bin.sig \
--bl30 $1/$2/bl30_new.bin.enc \
--bl31 $1/$2/bl31.img.enc \
--bl33 bl33.bin.enc
$PKG_PREFIX$1/$2/aml_encrypt_gxl --bootmk \
--output u-boot.bin \
--bl2 bl2.n.bin.sig \
--bl30 $1/$2/bl30_new.bin.enc \
--bl31 $1/$2/bl31.img.enc \
--bl33 bl33.bin.enc
}
# this helper function includes postprocess for s400 and its variants.
# $1 PATH for uboot blob repo
# $2 dir name in uboot blob repo
uboot_axg_postprocess_ng()
{
uboot_axg_postprocess_ng() {
mv u-boot.bin bl33.bin
$1/blx_fix.sh $1/$2/bl30.bin \
$1/$2/zero_tmp \
$1/$2/bl30_zero.bin \
$1/$2/bl301.bin \
$1/$2/bl301_zero.bin \
$1/$2/bl30_new.bin bl30
$1/blx_fix.sh $1/$2/bl30.bin \
$1/$2/zero_tmp \
$1/$2/bl30_zero.bin \
$1/$2/bl301.bin \
$1/$2/bl301_zero.bin \
$1/$2/bl30_new.bin bl30
python3 $1/acs_tool.py $1/$2/bl2.bin \
$1/$2/bl2_acs.bin \
$1/$2/acs.bin 0
$1/$2/bl2_acs.bin \
$1/$2/acs.bin 0
$1/blx_fix.sh $1/$2/bl2_acs.bin \
$1/$2/zero_tmp \
$1/$2/bl2_zero.bin \
$1/$2/bl21.bin \
$1/$2/bl21_zero.bin \
$1/$2/bl2_new.bin bl2
$1/blx_fix.sh $1/$2/bl2_acs.bin \
$1/$2/zero_tmp \
$1/$2/bl2_zero.bin \
$1/$2/bl21.bin \
$1/$2/bl21_zero.bin \
$1/$2/bl2_new.bin bl2
$PKG_PREFIX$1/$2/aml_encrypt_axg --bl3sig --input $1/$2/bl30_new.bin \
--output bl30_new.bin.enc \
--level v3 --type bl30
$PKG_PREFIX$1/$2/aml_encrypt_axg --bl3sig --input $1/$2/bl30_new.bin \
--output bl30_new.bin.enc \
--level v3 --type bl30
$PKG_PREFIX$1/$2/aml_encrypt_axg --bl3sig --input $1/$2/bl31.img \
--output bl31.img.enc \
--level v3 --type bl31
$PKG_PREFIX$1/$2/aml_encrypt_axg --bl3sig --input $1/$2/bl31.img \
--output bl31.img.enc \
--level v3 --type bl31
$PKG_PREFIX$1/$2/aml_encrypt_axg --bl3sig --input bl33.bin --compress lz4 \
--output bl33.bin.enc \
--level v3 --type bl33
$PKG_PREFIX$1/$2/aml_encrypt_axg --bl3sig --input bl33.bin --compress lz4 \
--output bl33.bin.enc \
--level v3 --type bl33
$PKG_PREFIX$1/$2/aml_encrypt_axg --bl2sig --input $1/$2/bl2_new.bin \
--output bl2.n.bin.sig
$PKG_PREFIX$1/$2/aml_encrypt_axg --bl2sig --input $1/$2/bl2_new.bin \
--output bl2.n.bin.sig
$PKG_PREFIX$1/$2/aml_encrypt_axg --bootmk \
--output u-boot.bin \
--bl2 bl2.n.bin.sig \
--bl30 bl30_new.bin.enc \
--bl31 bl31.img.enc \
--bl33 bl33.bin.enc --level v3
$PKG_PREFIX$1/$2/aml_encrypt_axg --bootmk \
--output u-boot.bin \
--bl2 bl2.n.bin.sig \
--bl30 bl30_new.bin.enc \
--bl31 bl31.img.enc \
--bl33 bl33.bin.enc --level v3
}
# this helper function includes postprocess for u200 and its variants.
# $1 PATH for uboot blob repo
# $2 family g12a or g12b
uboot_g12_postprocess()
{
uboot_g12_postprocess() {
mv u-boot.bin bl33.bin
$1/blx_fix.sh $1/bl30.bin \
zero_tmp \
bl30_zero.bin \
$1/bl301.bin \
bl301_zero.bin \
bl30_new.bin bl30
zero_tmp \
bl30_zero.bin \
$1/bl301.bin \
bl301_zero.bin \
bl30_new.bin bl30
$1/blx_fix.sh $1/bl2.bin \
zero_tmp \
bl2_zero.bin \
$1/acs.bin \
bl21_zero.bin \
bl2_new.bin bl2
zero_tmp \
bl2_zero.bin \
$1/acs.bin \
bl21_zero.bin \
bl2_new.bin bl2
$PKG_PREFIX$1/aml_encrypt_$2 --bl30sig \
--input bl30_new.bin \
--output bl30_new.bin.g12.enc \
--level v3
--input bl30_new.bin \
--output bl30_new.bin.g12.enc \
--level v3
$PKG_PREFIX$1/aml_encrypt_$2 --bl3sig \
--input bl30_new.bin.g12.enc \
--output bl30_new.bin.enc \
--level v3 --type bl30
--input bl30_new.bin.g12.enc \
--output bl30_new.bin.enc \
--level v3 --type bl30
$PKG_PREFIX$1/aml_encrypt_$2 --bl3sig \
--input $1/bl31.img \
--output bl31.img.enc \
--level v3 --type bl31
--input $1/bl31.img \
--output bl31.img.enc \
--level v3 --type bl31
$PKG_PREFIX$1/aml_encrypt_$2 --bl3sig \
--input bl33.bin \
--compress lz4 \
--output bl33.bin.enc \
--level v3 --type bl33
--input bl33.bin \
--compress lz4 \
--output bl33.bin.enc \
--level v3 --type bl33
$PKG_PREFIX$1/aml_encrypt_$2 --bl2sig \
--input bl2_new.bin \
--output bl2.n.bin.sig
if [ -e $1/lpddr3_1d.fw ]
then
$PKG_PREFIX$1/aml_encrypt_$2 --bootmk --output u-boot.bin \
--input bl2_new.bin \
--output bl2.n.bin.sig
if [ -e $1/lpddr3_1d.fw ]; then
$PKG_PREFIX$1/aml_encrypt_$2 --bootmk --output u-boot.bin \
--bl2 bl2.n.bin.sig \
--bl30 bl30_new.bin.enc \
--bl31 bl31.img.enc \
@@ -198,7 +194,7 @@ uboot_g12_postprocess()
--ddrfw9 $1/lpddr3_1d.fw \
--level v3
else
$PKG_PREFIX$1/aml_encrypt_$2 --bootmk --output u-boot.bin \
$PKG_PREFIX$1/aml_encrypt_$2 --bootmk --output u-boot.bin \
--bl2 bl2.n.bin.sig \
--bl30 bl30_new.bin.enc \
--bl31 bl31.img.enc \
@@ -218,97 +214,93 @@ uboot_g12_postprocess()
# this helper function includes postprocess for meson gxl and gxm.
# $1 PATH for uboot blob repo
uboot_gxl_postprocess_ng()
{
mv u-boot.bin bl33.bin
uboot_gxl_postprocess_ng() {
mv u-boot.bin bl33.bin
$1/blx_fix.sh $1/bl30.bin \
$1/zero_tmp \
$1/bl30_zero.bin \
$1/bl301.bin \
$1/bl301_zero.bin \
$1/bl30_new.bin bl30
$1/blx_fix.sh $1/bl30.bin \
$1/zero_tmp \
$1/bl30_zero.bin \
$1/bl301.bin \
$1/bl301_zero.bin \
$1/bl30_new.bin bl30
python3 $1/acs_tool.py $1/bl2.bin $1/bl2_acs.bin $1/acs.bin 0
python3 $1/acs_tool.py $1/bl2.bin $1/bl2_acs.bin $1/acs.bin 0
$1/blx_fix.sh $1/bl2_acs.bin \
$1/zero_tmp \
$1/bl2_zero.bin \
$1/bl21.bin \
$1/bl21_zero.bin \
$1/bl2_new.bin bl2
$1/blx_fix.sh $1/bl2_acs.bin \
$1/zero_tmp \
$1/bl2_zero.bin \
$1/bl21.bin \
$1/bl21_zero.bin \
$1/bl2_new.bin bl2
$1/aml_encrypt_gxl --bl3enc --input $1/bl30_new.bin
$1/aml_encrypt_gxl --bl3enc --input $1/bl31.img
$1/aml_encrypt_gxl --bl3enc --input bl33.bin
$1/aml_encrypt_gxl --bl2sig --input $1/bl2_new.bin \
--output bl2.n.bin.sig
$1/aml_encrypt_gxl --bl3enc --input $1/bl30_new.bin
$1/aml_encrypt_gxl --bl3enc --input $1/bl31.img
$1/aml_encrypt_gxl --bl3enc --input bl33.bin
$1/aml_encrypt_gxl --bl2sig --input $1/bl2_new.bin \
--output bl2.n.bin.sig
$1/aml_encrypt_gxl --bootmk --output u-boot.bin \
--bl2 bl2.n.bin.sig \
--bl30 $1/bl30_new.bin.enc \
--bl31 $1/bl31.img.enc \
--bl33 bl33.bin.enc
$1/aml_encrypt_gxl --bootmk --output u-boot.bin \
--bl2 bl2.n.bin.sig \
--bl30 $1/bl30_new.bin.enc \
--bl31 $1/bl31.img.enc \
--bl33 bl33.bin.enc
}
write_uboot_platform()
{
write_uboot_platform() {
dd if=$1/u-boot.bin of=$2 bs=1 count=442 conv=fsync > /dev/null 2>&1
dd if=$1/u-boot.bin of=$2 bs=512 skip=1 seek=1 conv=fsync > /dev/null 2>&1
}
family_tweaks_bsp()
{
family_tweaks_bsp() {
mkdir -p $destination/etc/udev/rules.d
mkdir -p $destination/usr/local/bin
mkdir -p "$destination"/etc/X11/xorg.conf.d
case "${BOARD}" in
"odroidc2" | "nanopik2-s905" | "lepotato" | "lafrite" | "khadas-vim1" | "khadas-vim2" )
cat <<-EOF > "$destination"/etc/X11/xorg.conf.d/02-driver.conf
Section "OutputClass"
Identifier "Amlogic"
MatchDriver "meson"
Driver "modesetting"
Option "PrimaryGPU" "true"
EndSection
Section "Screen"
Identifier "Default Screen"
Device "Meson"
Monitor "foo"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1920x1080" "1440x900" "1280x720" "1280x1024" "1280x960" "1024x768" "800x600" "640x480" "720x400"
EndSubSection
EndSection
EOF
;;
"odroidn2" | "odroidc4" | "khadas-vim2" | "odroidhc4" | "khadas-vim3" | "khadas-vim3l" | "radxa-zero" | "radxa-zero2" )
cat <<-EOF > "$destination"/etc/X11/xorg.conf
Section "Device"
Identifier "DRM Graphics Acclerated"
"odroidc2" | "nanopik2-s905" | "lepotato" | "lafrite" | "khadas-vim1" | "khadas-vim2")
cat <<- EOF > "$destination"/etc/X11/xorg.conf.d/02-driver.conf
Section "OutputClass"
Identifier "Amlogic"
MatchDriver "meson"
Driver "modesetting"
Option "PrimaryGPU" "true"
EndSection
Section "Screen"
Identifier "Default Screen"
Device "Meson"
Monitor "foo"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1920x1080" "1440x900" "1280x720" "1280x1024" "1280x960" "1024x768" "800x600" "640x480" "720x400"
EndSubSection
EndSection
EOF
;;
"odroidn2" | "odroidc4" | "khadas-vim2" | "odroidhc4" | "khadas-vim3" | "khadas-vim3l" | "radxa-zero" | "radxa-zero2")
cat <<- EOF > "$destination"/etc/X11/xorg.conf
Section "Device"
Identifier "DRM Graphics Acclerated"
## Use modesetting and glamor
Driver "modesetting"
Option "AccelMethod" "glamor" ### "glamor" to enable 3D acceleration, "none" to disable.
Option "DRI" "2"
Option "Dri2Vsync" "true"
Option "TripleBuffer" "True"
## End glamor configuration
## Use modesetting and glamor
Driver "modesetting"
Option "AccelMethod" "glamor" ### "glamor" to enable 3D acceleration, "none" to disable.
Option "DRI" "2"
Option "Dri2Vsync" "true"
Option "TripleBuffer" "True"
## End glamor configuration
EndSection
EndSection
Section "Screen"
Identifier "Default Screen"
SubSection "Display"
Depth 24
EndSubSection
EndSection
EOF
;;
esac
Section "Screen"
Identifier "Default Screen"
SubSection "Display"
Depth 24
EndSubSection
EndSection
EOF
;;
esac
}
# This is an extension method, put directly in meson64_common. A "built-in" extension if you will.
@@ -317,4 +309,3 @@ function fetch_sources_tools__amlogic_fip() {
fetch_from_repo "https://github.com/armbian/odroidc2-blobs" "odroidc2-blobs" "branch:master"
fetch_from_repo "https://github.com/LibreELEC/amlogic-boot-fip" "amlogic-boot-fip" "branch:master"
}

View File

@@ -23,7 +23,7 @@ case $BOARD in
UBOOT_TARGET_MAP=';;sd_fuse/bl1.bin.hardkernel sd_fuse/u-boot.bin'
;;
;;
esac
case $BRANCH in
@@ -32,45 +32,42 @@ case $BRANCH in
KERNELBRANCH="branch:linux-5.10.y"
KERNELPATCHDIR='meson-'$BRANCH
;;
;;
current)
KERNELBRANCH="branch:linux-5.15.y"
KERNELPATCHDIR='meson-'$BRANCH
;;
;;
edge)
KERNELBRANCH="branch:linux-5.18.y"
KERNELPATCHDIR='meson-'$BRANCH
;;
;;
esac
write_uboot_platform()
{
write_uboot_platform() {
dd if=$1/bl1.bin.hardkernel of=$2 bs=1 count=442 conv=fsync > /dev/null 2>&1
dd if=$1/bl1.bin.hardkernel of=$2 bs=512 skip=1 seek=1 conv=fsync > /dev/null 2>&1
dd if=$1/u-boot.bin of=$2 bs=512 seek=64 conv=fsync > /dev/null 2>&1
dd if=/dev/zero of=$2 seek=1024 count=32 bs=512 conv=fsync > /dev/null 2>&1
}
family_tweaks()
{
family_tweaks() {
:
}
family_tweaks_bsp()
{
family_tweaks_bsp() {
mkdir -p "$destination/etc/X11/xorg.conf.d"
cat <<-EOF >"$destination/etc/X11/xorg.conf.d/02-driver.conf"
Section "OutputClass"
Identifier "Amlogic"
MatchDriver "meson"
Driver "modesetting"
Option "PrimaryGPU" "true"
EndSection
cat <<- EOF > "$destination/etc/X11/xorg.conf.d/02-driver.conf"
Section "OutputClass"
Identifier "Amlogic"
MatchDriver "meson"
Driver "modesetting"
Option "PrimaryGPU" "true"
EndSection
EOF
}

View File

@@ -1,6 +1,6 @@
case $BRANCH in
legacy|current)
legacy | current)
# Check https://developer.solid-run.com/knowledge-base/a388-u-boot
# for advanced config options
@@ -15,9 +15,9 @@ case $BRANCH in
;sata;u-boot-spl-sata.kwb:u-boot.sata
;uart;u-boot-spl-uart.kwb:u-boot.uart"
;;
;;
edge)
# Check https://developer.solid-run.com/knowledge-base/a388-u-boot
# Check https://developer.solid-run.com/knowledge-base/a388-u-boot
# for advanced config options
BOOTSOURCE='https://github.com/SolidRun/u-boot'
BOOTBRANCH='branch:v2018.01-solidrun-a38x'
@@ -30,11 +30,10 @@ case $BRANCH in
;sata;u-boot-spl-sata.kwb:u-boot.sata
;uart;u-boot-spl-uart.kwb:u-boot.uart"
if [[ $BOARD == clearfogbase ]]; then
OVERLAY_PREFIX='armada-388-clearfog-base'
else
OVERLAY_PREFIX='armada-388-clearfog'
fi
;;
esac

View File

@@ -1,6 +1,6 @@
case $BRANCH in
legacy|current|edge)
legacy | current | edge)
BOOTSOURCE=$MAINLINE_UBOOT_SOURCE
BOOTBRANCH='tag:v2019.04'
@@ -15,14 +15,12 @@ case $BRANCH in
UBOOT_USE_GCC='> 7.0'
OVERLAY_PREFIX='armada-388-helios4'
;;
;;
esac
# Helios4 tweak
family_tweaks_bsp()
{
family_tweaks_bsp() {
## Add dependency list
local DEPENDENCIES="fancontrol, mdadm"
sed -i "/^Depends:/ s/$/, $DEPENDENCIES/" "${destination}"/DEBIAN/control
@@ -56,9 +54,9 @@ family_tweaks_bsp()
### Other tweaks
# add custom motd default conf file
install -m 644 $SRC/packages/bsp/mvebu/helios4/armbian-motd $destination/etc/default/
install -m 644 $SRC/packages/bsp/mvebu/helios4/armbian-motd $destination/etc/default/
# create modules file
# create modules file
if [[ $BRANCH == dev && -n $MODULES_EDGE ]]; then
tr ' ' '\n' <<< "$MODULES_DEV" > "${destination}"/etc/modules
elif [[ $BRANCH == current || $BRANCH == dev ]]; then
@@ -71,7 +69,7 @@ family_tweaks_bsp()
# Remove exit 0 on end of file
sed -i '$ s/^exit 0//g' "${destination}"/DEBIAN/postinst
cat <<-'EOF' >> "${destination}"/DEBIAN/postinst
cat <<- 'EOF' >> "${destination}"/DEBIAN/postinst
### Mdadm tweaks
MDADM_CONF=/etc/mdadm/mdadm.conf
MDADM_HOOK=/usr/share/initramfs-tools/hooks/mdadm

View File

@@ -111,22 +111,22 @@ fi
case $BRANCH in
current)
current)
KERNELBRANCH="branch:linux-5.15.y"
KERNELPATCHDIR='rockchip64-'$BRANCH
LINUXFAMILY=rockchip64
LINUXCONFIG='linux-rockchip64-'$BRANCH
;;
KERNELBRANCH="branch:linux-5.15.y"
KERNELPATCHDIR='rockchip64-'$BRANCH
LINUXFAMILY=rockchip64
LINUXCONFIG='linux-rockchip64-'$BRANCH
;;
edge)
edge)
KERNELPATCHDIR='rockchip64-'$BRANCH
KERNELBRANCH="branch:linux-5.19.y"
LINUXFAMILY=rockchip64
LINUXCONFIG='linux-rockchip64-'$BRANCH
KERNELPATCHDIR='rockchip64-'$BRANCH
KERNELBRANCH="branch:linux-5.19.y"
LINUXFAMILY=rockchip64
LINUXCONFIG='linux-rockchip64-'$BRANCH
;;
;;
esac
@@ -187,7 +187,7 @@ uboot_custom_postprocess() {
local tempfile=$(mktemp)
tools/mkimage -n $BOOT_SOC -T rksd -d $RKBIN_DIR/$DDR_BLOB idbloader.bin
cat $RKBIN_DIR/$MINILOADER_BLOB >>idbloader.bin
cat $RKBIN_DIR/$MINILOADER_BLOB >> idbloader.bin
$PKG_PREFIX$RKBIN_DIR/tools/loaderimage --pack --uboot ./u-boot-dtb.bin uboot.img 0x200000
$PKG_PREFIX$RKBIN_DIR/tools/trust_merger --replace bl31.elf $RKBIN_DIR/$BL31_BLOB trust.ini
@@ -221,18 +221,18 @@ uboot_custom_postprocess() {
write_uboot_platform() {
if [[ -f $1/rksd_loader.img ]]; then # legacy rk3399 loader
dd if=$1/rksd_loader.img of=$2 seek=64 conv=notrunc status=none >/dev/null 2>&1
dd if=$1/rksd_loader.img of=$2 seek=64 conv=notrunc status=none > /dev/null 2>&1
elif [[ -f $1/u-boot.itb ]]; then # $BOOT_SCENARIO == "blobless" || $BOOT_SCENARIO == "tpl-spl-blob"
dd if=$1/idbloader.img of=$2 seek=64 conv=notrunc status=none >/dev/null 2>&1
dd if=$1/u-boot.itb of=$2 seek=16384 conv=notrunc status=none >/dev/null 2>&1
dd if=$1/idbloader.img of=$2 seek=64 conv=notrunc status=none > /dev/null 2>&1
dd if=$1/u-boot.itb of=$2 seek=16384 conv=notrunc status=none > /dev/null 2>&1
elif [[ -f $1/uboot.img ]]; then # $BOOT_SCENARIO == "only-blobs"
dd if=$1/idbloader.bin of=$2 seek=64 conv=notrunc status=none >/dev/null 2>&1
dd if=$1/uboot.img of=$2 seek=16384 conv=notrunc status=none >/dev/null 2>&1
dd if=$1/trust.bin of=$2 seek=24576 conv=notrunc status=none >/dev/null 2>&1
dd if=$1/idbloader.bin of=$2 seek=64 conv=notrunc status=none > /dev/null 2>&1
dd if=$1/uboot.img of=$2 seek=16384 conv=notrunc status=none > /dev/null 2>&1
dd if=$1/trust.bin of=$2 seek=24576 conv=notrunc status=none > /dev/null 2>&1
else
echo "Unsupported u-boot processing configuration!"
@@ -244,7 +244,7 @@ write_uboot_platform() {
write_uboot_platform_mtd() {
if [[ -f $1/rkspi_loader.img ]]; then
dd if=$1/rkspi_loader.img of=$2 conv=notrunc status=none >/dev/null 2>&1
dd if=$1/rkspi_loader.img of=$2 conv=notrunc status=none > /dev/null 2>&1
else
@@ -261,8 +261,8 @@ setup_write_uboot_platform() {
local tmp=$(cat /proc/cmdline)
tmp="${tmp##*ubootpart=}"
tmp="${tmp%% *}"
[[ -n $tmp ]] && local part=$(findfs PARTUUID=$tmp 2>/dev/null)
[[ -n $part ]] && local dev=$(lsblk -n -o PKNAME $part 2>/dev/null)
[[ -n $tmp ]] && local part=$(findfs PARTUUID=$tmp 2> /dev/null)
[[ -n $part ]] && local dev=$(lsblk -n -o PKNAME $part 2> /dev/null)
[[ -n $dev ]] && DEVICE="/dev/$dev"
fi
@@ -279,7 +279,7 @@ family_tweaks() {
# rename USB based network to lan0
mkdir -p $SDCARD/etc/udev/rules.d/
echo 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="r8152", KERNEL=="eth1", NAME="lan0"' >$SDCARD/etc/udev/rules.d/70-rename-lan.rules
echo 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="r8152", KERNEL=="eth1", NAME="lan0"' > $SDCARD/etc/udev/rules.d/70-rename-lan.rules
elif [[ $BOARD == helios64 ]]; then
@@ -340,14 +340,14 @@ family_tweaks() {
else
cp -R $SRC/packages/blobs/jetson/firmware/* $SDCARD/lib/firmware/
fi
fi
fi
}
family_tweaks_bsp() {
if [[ $BOOTCONFIG == *3328* ]] && [[ $BRANCH != legacy ]]; then
mkdir -p "$destination"/etc/X11/xorg.conf.d
cat <<-EOF >"$destination"/etc/X11/xorg.conf.d/02-driver.conf
cat <<- EOF > "$destination"/etc/X11/xorg.conf.d/02-driver.conf
# set fbdev as default driver.
Section "Device"
Identifier "NOGPU"
@@ -359,7 +359,7 @@ family_tweaks_bsp() {
if [[ $BOARD == clockworkpi-a06 ]]; then
# rotate screen & disable dpms
mkdir -p "$destination"/etc/X11/xorg.conf.d
cat <<-EOF >"$destination"/etc/X11/xorg.conf.d/10-monitor.conf
cat <<- EOF > "$destination"/etc/X11/xorg.conf.d/10-monitor.conf
# set monitor
Section "Monitor"
Identifier "DSI-1"
@@ -409,7 +409,7 @@ family_tweaks_bsp() {
fi
if [[ $BOARD == orangepi4-lts ]]; then
# Bluetooth on orangepi 4 LTS board is handled by a Spreadtrum (sprd) chip and requires
# a custom hciattach_opi binary, plus a systemd service to run it at boot time
install -m 755 $SRC/packages/bsp/rk3399/hciattach_opi $destination/usr/bin
@@ -463,11 +463,11 @@ family_tweaks_bsp() {
if [[ $BOARD == rk3318-box ]]; then
# Optional board dtbo selection script
mkdir -p $destination/usr/local/bin
install -m 755 $SRC/packages/bsp/rk3318/rk3318-config $destination/usr/sbin
# Optional board dtbo selection script
mkdir -p $destination/usr/local/bin
install -m 755 $SRC/packages/bsp/rk3318/rk3318-config $destination/usr/sbin
fi
fi
if [[ $BOARD == pinebook-pro ]]; then

View File

@@ -29,17 +29,17 @@ esac
case "$KERNEL_VERSION_LEVEL" in
5.10|5.15|5.16|5.17|5.18|5.19)
5.10 | 5.15 | 5.16 | 5.17 | 5.18 | 5.19)
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
KERNELSOURCENAME='name=origin'
KERNELBRANCH="branch:linux-${KERNEL_VERSION_LEVEL}.y"
;;
;;
*)
KERNELSOURCE="https://github.com/megous/linux"
KERNELSOURCENAME='name=megous'
KERNELBRANCH="branch:orange-pi-$KERNEL_VERSION_LEVEL"
;;
;;
esac
KERNELPATCHDIR='archive/sunxi-'$KERNEL_VERSION_LEVEL
@@ -53,16 +53,15 @@ KERNELPATCHDIR='archive/sunxi-'$KERNEL_VERSION_LEVEL
# KERNELSWITCHOBJ="tag=v5.10.15"
# tag | obj | commit=v5.10.15 | [origin|megous]/$branch | $hash
var_origin_kernel ()
{
var_origin_kernel() {
url=$MAINLINE_KERNEL_SOURCE
name='origin'
branch="linux-${KERNEL_VERSION_LEVEL}.y"
start_tag="v$KERNEL_VERSION_LEVEL"
# checking the reachability of the initial tag
if [ "$(git ls-remote --tags $url $start_tag | \
awk -F'/' '{if (NR == 1) print $NF}')" != "$start_tag" ];then
if [ "$(git ls-remote --tags $url $start_tag |
awk -F'/' '{if (NR == 1) print $NF}')" != "$start_tag" ]; then
exit 177
fi
@@ -72,9 +71,7 @@ var_origin_kernel ()
# [ "$KERNEL_VERSION_LEVEL" == "5.12" ] && start_tag="v5.12-rc7"
}
family_tweaks()
{
family_tweaks() {
if [[ $BOARD == nanopi-r1s-h5 ]]; then
# rename USB based network to lan0
mkdir -p $SDCARD/etc/udev/rules.d/
@@ -88,39 +85,36 @@ family_tweaks()
case $IMAGE_PARTITION_TABLE in
msdos)
write_uboot_platform()
{
write_uboot_platform() {
dd if=/dev/zero of=$2 bs=1k count=1023 seek=1 status=noxfer > /dev/null 2>&1
dd if=$1/u-boot-sunxi-with-spl.bin of=$2 bs=1024 seek=8 status=noxfer > /dev/null 2>&1
}
;;
;;
gpt) # Skip 128K for writing if the partition table is GPT.
write_uboot_platform()
{
write_uboot_platform() {
dd if=/dev/zero of=$2 bs=1024 count=1023 seek=128 status=noxfer > /dev/null 2>&1
dd if=$1/u-boot-sunxi-with-spl.bin of=$2 bs=1024 seek=128 status=noxfer > /dev/null 2>&1
}
;;
;;
esac
setup_write_uboot_platform()
{
setup_write_uboot_platform() {
if grep -q "ubootpart" /proc/cmdline; then
# mainline with new boot script
local tmp=$(cat /proc/cmdline)
tmp="${tmp##*ubootpart=}"
tmp="${tmp%% *}"
[[ -n $tmp ]] && local part=$(findfs PARTUUID=$tmp 2>/dev/null)
[[ -n $part ]] && local dev=$(lsblk -n -o PKNAME $part 2>/dev/null)
[[ -n $tmp ]] && local part=$(findfs PARTUUID=$tmp 2> /dev/null)
[[ -n $part ]] && local dev=$(lsblk -n -o PKNAME $part 2> /dev/null)
[[ -n $dev ]] && DEVICE="/dev/$dev"
else
# legacy or old boot script
local tmp=$(cat /proc/cmdline)
tmp="${tmp##*root=}"
tmp="${tmp%% *}"
[[ -n $tmp ]] && local part=$(findfs $tmp 2>/dev/null)
[[ -n $part ]] && local dev=$(lsblk -n -o PKNAME $part 2>/dev/null)
[[ -n $tmp ]] && local part=$(findfs $tmp 2> /dev/null)
[[ -n $part ]] && local dev=$(lsblk -n -o PKNAME $part 2> /dev/null)
# do not try to write u-boot to USB devices
[[ -n $dev && $dev == mmcblk* ]] && DEVICE="/dev/$dev"
fi

View File

@@ -29,17 +29,17 @@ esac
case "$KERNEL_VERSION_LEVEL" in
5.10|5.15|5.16|5.17|5.18|5.19)
5.10 | 5.15 | 5.16 | 5.17 | 5.18 | 5.19)
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
KERNELSOURCENAME='name=origin'
KERNELBRANCH="branch:linux-${KERNEL_VERSION_LEVEL}.y"
;;
;;
*)
KERNELSOURCE="https://github.com/megous/linux"
KERNELSOURCENAME='name=megous'
KERNELBRANCH="branch:orange-pi-$KERNEL_VERSION_LEVEL"
;;
;;
esac
KERNELPATCHDIR='archive/sunxi-'$KERNEL_VERSION_LEVEL
@@ -53,16 +53,15 @@ KERNELPATCHDIR='archive/sunxi-'$KERNEL_VERSION_LEVEL
# KERNELSWITCHOBJ="tag=v5.10.15"
# tag | obj | commit=v5.10.15 | [origin|megous]/$branch | $hash
var_origin_kernel ()
{
var_origin_kernel() {
url=$MAINLINE_KERNEL_SOURCE
name='origin'
branch="linux-${KERNEL_VERSION_LEVEL}.y"
start_tag="v$KERNEL_VERSION_LEVEL"
# checking the reachability of the initial tag
if [ "$(git ls-remote --tags $url $start_tag | \
awk -F'/' '{if (NR == 1) print $NF}')" != "$start_tag" ];then
if [ "$(git ls-remote --tags $url $start_tag |
awk -F'/' '{if (NR == 1) print $NF}')" != "$start_tag" ]; then
exit 177
fi
@@ -72,34 +71,30 @@ var_origin_kernel ()
# [ "$KERNEL_VERSION_LEVEL" == "5.12" ] && start_tag="v5.12-rc7"
}
family_tweaks()
{
family_tweaks() {
# execute specific tweaks function if present
[[ $(type -t family_tweaks_s) == function ]] && family_tweaks_s
cp $SRC/packages/blobs/splash/armbian-u-boot-24.bmp $SDCARD/boot/boot.bmp
}
family_tweaks_bsp()
{
family_tweaks_bsp() {
# execute specific tweaks function if present
[[ $(type -t family_tweaks_bsp_s) == function ]] && family_tweaks_bsp_s
}
write_uboot_platform()
{
write_uboot_platform() {
dd if=/dev/zero of=$2 bs=1k count=1023 seek=1 status=noxfer > /dev/null 2>&1
dd if=$1/u-boot-sunxi-with-spl.bin of=$2 bs=1024 seek=8 status=noxfer > /dev/null 2>&1
}
setup_write_uboot_platform()
{
setup_write_uboot_platform() {
if grep -q "ubootpart" /proc/cmdline; then
local tmp=$(cat /proc/cmdline)
tmp="${tmp##*ubootpart=}"
tmp="${tmp%% *}"
[[ -n $tmp ]] && local part=$(findfs PARTUUID=$tmp 2>/dev/null)
[[ -n $part ]] && local dev=$(lsblk -n -o PKNAME $part 2>/dev/null)
[[ -n $tmp ]] && local part=$(findfs PARTUUID=$tmp 2> /dev/null)
[[ -n $part ]] && local dev=$(lsblk -n -o PKNAME $part 2> /dev/null)
[[ -n $dev ]] && DEVICE="/dev/$dev"
elif [[ -f /var/lib/armbian/force_search_uboot ]]; then
# This may cause overwriting u-boot for android or other non-Armbian OS installed on eMMC
@@ -114,4 +109,3 @@ setup_write_uboot_platform()
done
fi
}

View File

@@ -5,25 +5,25 @@ export UEFI_GRUB_TIMEOUT=${UEFI_GRUB_TIMEOUT:-3} # Default 3-seconds timeout for
export BOARD_FIRMWARE_INSTALL="-full" # Install full firmware for UEFI boards
case "${BRANCH}" in
legacy)
# This will force `unset KERNELSOURCE` later; no kernel will be built.
# Instead, the distro's default linux-generic kernel will be installed.
export DISTRO_GENERIC_KERNEL=yes
;;
legacy)
# This will force `unset KERNELSOURCE` later; no kernel will be built.
# Instead, the distro's default linux-generic kernel will be installed.
export DISTRO_GENERIC_KERNEL=yes
;;
current)
export DISTRO_GENERIC_KERNEL=no
export LINUXCONFIG="linux-uefi-${LINUXFAMILY}-${BRANCH}"
export KERNELBRANCH="branch:linux-5.15.y"
export KERNELPATCHDIR="uefi-${LINUXFAMILY}-${BRANCH}" # Might be empty.
export KERNELDIR="linux-uefi-${LINUXFAMILY}" # Avoid sharing a source tree with others, until we know it's safe.
;;
current)
export DISTRO_GENERIC_KERNEL=no
export LINUXCONFIG="linux-uefi-${LINUXFAMILY}-${BRANCH}"
export KERNELBRANCH="branch:linux-5.15.y"
export KERNELPATCHDIR="uefi-${LINUXFAMILY}-${BRANCH}" # Might be empty.
export KERNELDIR="linux-uefi-${LINUXFAMILY}" # Avoid sharing a source tree with others, until we know it's safe.
;;
edge)
export DISTRO_GENERIC_KERNEL=no
export LINUXCONFIG="linux-uefi-${LINUXFAMILY}-${BRANCH}"
export KERNELBRANCH="branch:linux-5.19.y"
export KERNELPATCHDIR="uefi-${LINUXFAMILY}-${BRANCH}" # Might be empty.
export KERNELDIR="linux-uefi-${LINUXFAMILY}" # Avoid sharing a source tree with others, until we know it's safe.
;;
edge)
export DISTRO_GENERIC_KERNEL=no
export LINUXCONFIG="linux-uefi-${LINUXFAMILY}-${BRANCH}"
export KERNELBRANCH="branch:linux-5.19.y"
export KERNELPATCHDIR="uefi-${LINUXFAMILY}-${BRANCH}" # Might be empty.
export KERNELDIR="linux-uefi-${LINUXFAMILY}" # Avoid sharing a source tree with others, until we know it's safe.
;;
esac

View File

@@ -46,26 +46,26 @@ write_uboot_platform() {
logger "${FUNCNAME[0]}(): use standart u-boot install."
fi
dd if="$1/u-boot.bin" of="$2" bs=1 count=442 conv=fsync >/dev/null 2>&1
dd if="$1/u-boot.bin" of="$2" bs=512 skip=1 seek=1 conv=fsync >/dev/null 2>&1
dd if="$1/u-boot.bin" of="$2" bs=1 count=442 conv=fsync > /dev/null 2>&1
dd if="$1/u-boot.bin" of="$2" bs=512 skip=1 seek=1 conv=fsync > /dev/null 2>&1
if [[ $method == 1 ]]; then
logger "${FUNCNAME[0]}(): of_boot0 = $of_boot0"
logger "${FUNCNAME[0]}(): of_boot1 = $of_boot1"
# unset force-read-only flag
echo 0 >"/sys/block/${mmc_boot}0/force_ro"
echo 0 >"/sys/block/${mmc_boot}1/force_ro"
logger "${FUNCNAME[0]}(): /sys/block/${mmc_boot}0/force_ro value after unsetting read-only flag: $(<"/sys/block/${mmc_boot}0/force_ro")"
logger "${FUNCNAME[0]}(): /sys/block/${mmc_boot}1/force_ro value after unsetting read-only flag: $(<"/sys/block/${mmc_boot}1/force_ro")"
echo 0 > "/sys/block/${mmc_boot}0/force_ro"
echo 0 > "/sys/block/${mmc_boot}1/force_ro"
logger "${FUNCNAME[0]}(): /sys/block/${mmc_boot}0/force_ro value after unsetting read-only flag: $(< "/sys/block/${mmc_boot}0/force_ro")"
logger "${FUNCNAME[0]}(): /sys/block/${mmc_boot}1/force_ro value after unsetting read-only flag: $(< "/sys/block/${mmc_boot}1/force_ro")"
local uboot_name=u-boot.bin
local uboot_size_in_kbytes=$(($(stat --printf "%s" "$1/$uboot_name") / 1024))
local uboot_offset=1 # 512 bytes in dd
logger "${FUNCNAME[0]}(): uboot_size_in_kbytes = $uboot_size_in_kbytes"
logger "${FUNCNAME[0]}(): uboot_offset = $uboot_offset"
dd if="$1/u-boot.bin" of="$of_boot0" bs=512 skip=1 conv=fsync >/dev/null 2>&1
dd if="$1/u-boot.bin" of="$of_boot1" bs=512 skip=1 conv=fsync >/dev/null 2>&1
dd if="$1/u-boot.bin" of="$of_boot0" bs=512 skip=1 conv=fsync > /dev/null 2>&1
dd if="$1/u-boot.bin" of="$of_boot1" bs=512 skip=1 conv=fsync > /dev/null 2>&1
fi
logger "${FUNCNAME[0]}(): u-boot successfulley installed"
@@ -159,7 +159,7 @@ family_tweaks() {
chroot "${SDCARD}" /bin/bash -c "systemctl --no-reload enable jethub-ethreset.service >/dev/null 2>&1"
# pip3 packages
chroot "${SDCARD}" /bin/bash -c "pip3 install pyserial intelhex python-magic" >>"${DEST}"/debug/install.log 2>&1
chroot "${SDCARD}" /bin/bash -c "pip3 install pyserial intelhex python-magic" >> "${DEST}"/debug/install.log 2>&1
# Hostapd
chroot "${SDCARD}" /bin/bash -c "systemctl --no-reload disable hostapd.service >/dev/null 2>&1"
@@ -172,7 +172,7 @@ family_tweaks() {
display_alert "Adding JetHome repository and authentication key" "/etc/apt/sources.list.d/jethome.list" "info"
cp "${SRC}"/packages/bsp/jethub/jethome.gpg "${SDCARD}/etc/apt/trusted.gpg.d/"
echo "deb http://repo.jethome.ru"$([[ $BETA == yes ]] && echo "/beta" )" ${RELEASE} jethome-${RELEASE}" \
echo "deb http://repo.jethome.ru"$([[ $BETA == yes ]] && echo "/beta")" ${RELEASE} jethome-${RELEASE}" \
>> "${SDCARD}"/etc/apt/sources.list.d/jethome.list
}
@@ -189,7 +189,6 @@ family_tweaks_bsp() {
cp "$SRC/packages/bsp/jethub/jethub-initer.service" "$destination/lib/systemd/system/" || exit_with_error "Unable to copy jethub-initer.service"
cp "$SRC/packages/bsp/jethub/${BOARD}/jethub-init" "$destination/usr/lib/armbian/" || exit_with_error "Unable to copy jethub-init"
# AR-1098 userland fix for net interface does not up at boot
cp "$SRC/packages/bsp/jethub/jethub-ethreset.service" "$destination/lib/systemd/system/" || exit_with_error "Unable to copy jethub-ethreset.service"
cp "$SRC/packages/bsp/jethub/jethub-ethreset" "$destination/usr/lib/armbian/" || exit_with_error "Unable to copy jethub-ethreset"

View File

@@ -65,25 +65,25 @@ case $BRANCH in
LINUXCONFIG='linux-rockchip64-'$BRANCH
fi
fi
;;
;;
current)
KERNELBRANCH="branch:linux-5.19.y"
LINUXCONFIG='linux-media-'$BRANCH
KERNELBRANCH="branch:linux-5.19.y"
LINUXCONFIG='linux-media-'$BRANCH
if [[ $BOARD == station-p2 || $BOARD == station-m2 || $BOARD == quartz64a || $BOARD == bananapir2pro ]]; then
KERNELPATCHDIR='station-p2-'$BRANCH
LINUXFAMILY=station-p2
else
KERNELPATCHDIR='media-'$BRANCH
LINUXFAMILY=media
if [[ $BOARD == station-p2 || $BOARD == station-m2 || $BOARD == quartz64a || $BOARD == bananapir2pro ]]; then
KERNELPATCHDIR='station-p2-'$BRANCH
LINUXFAMILY=station-p2
else
KERNELPATCHDIR='media-'$BRANCH
LINUXFAMILY=media
if [[ $BOARD == jetson-nano ]]; then
MODULES_INITRD="jetson-nano-current"
if [[ $BOARD == jetson-nano ]]; then
MODULES_INITRD="jetson-nano-current"
fi
fi
fi
;;
;;
edge)
KERNELBRANCH="tag:v6.0"
@@ -94,7 +94,7 @@ case $BRANCH in
if [[ $BOARD == jetson-nano ]]; then
MODULES_INITRD="jetson-nano-edge"
fi
;;
;;
esac
prepare_boot_configuration

View File

@@ -20,7 +20,7 @@ if [[ -n ${USE_ODROID_UBOOT} ]] && [[ "${USE_ODROID_UBOOT}" == *"${BRANCH}"* ]];
BOOTDIR='u-boot-odroid'
write_uboot_platform() {
dd if=$1/u-boot.bin of=$2 bs=512 seek=1 conv=fsync >/dev/null 2>&1
dd if=$1/u-boot.bin of=$2 bs=512 seek=1 conv=fsync > /dev/null 2>&1
}
else

View File

@@ -3,21 +3,20 @@ if [[ $BOARD == odroidc2 ]]; then
UBOOT_TARGET_MAP=";;$SRC/cache/sources/odroidc2-blobs/bl1.bin.hardkernel u-boot.bin"
fi
uboot_custom_postprocess()
{
uboot_custom_postprocess() {
if [[ $BOARD == odroidc2 ]]; then
local t=$SRC/cache/sources/odroidc2-blobs/
$PKG_PREFIX$t/fip_create --bl30 $t/gxb/bl30.bin \
--bl301 $t/gxb/bl301.bin \
--bl31 $t/gxb/bl31.bin \
--bl33 u-boot.bin \
fip.bin
$PKG_PREFIX$t/fip_create --bl30 $t/gxb/bl30.bin \
--bl301 $t/gxb/bl301.bin \
--bl31 $t/gxb/bl31.bin \
--bl33 u-boot.bin \
fip.bin
$PKG_PREFIX$t/fip_create --dump fip.bin
cat $t/gxb/bl2.package fip.bin > boot_new.bin
rm -f u-boot.img
$PKG_PREFIX$t/gxb/aml_encrypt_gxb --bootsig \
--input boot_new.bin \
--output u-boot.img
--input boot_new.bin \
--output u-boot.img
rm -f u-boot.bin
dd if=u-boot.img of=u-boot.bin bs=512 skip=96 status=none
fi
@@ -26,44 +25,43 @@ uboot_custom_postprocess()
local t=$SRC/cache/sources/odroidc2-blobs/
mv u-boot.bin bl33.bin
$t/blx_fix.sh $t/k2/bl30.bin \
$t/k2/zero_tmp \
$t/k2/bl30_zero.bin \
$t/k2/bl301.bin \
$t/k2/bl301_zero.bin \
$t/k2/bl30_new.bin bl30
$t/blx_fix.sh $t/k2/bl30.bin \
$t/k2/zero_tmp \
$t/k2/bl30_zero.bin \
$t/k2/bl301.bin \
$t/k2/bl301_zero.bin \
$t/k2/bl30_new.bin bl30
$PKG_PREFIX$t/k2/fip_create --bl30 $t/k2/bl30_new.bin \
--bl31 $t/k2/bl31.img \
--bl33 bl33.bin \
$t/k2/fip.bin
--bl31 $t/k2/bl31.img \
--bl33 bl33.bin \
$t/k2/fip.bin
$PKG_PREFIX$t/k2/fip_create --dump $t/k2/fip.bin
python $t/acs_tool.pyc $t/k2/bl2.bin \
$t/k2/bl2_acs.bin \
$t/k2/acs.bin 0
$t/k2/bl2_acs.bin \
$t/k2/acs.bin 0
$t/blx_fix.sh $t/k2/bl2_acs.bin \
$t/k2/zero_tmp \
$t/k2/bl2_zero.bin \
$t/k2/bl21.bin \
$t/k2/bl21_zero.bin \
$t/k2/bl2_new.bin bl2
$t/blx_fix.sh $t/k2/bl2_acs.bin \
$t/k2/zero_tmp \
$t/k2/bl2_zero.bin \
$t/k2/bl21.bin \
$t/k2/bl21_zero.bin \
$t/k2/bl2_new.bin bl2
cat $t/k2/bl2_new.bin $t/k2/fip.bin > boot_new.bin
$PKG_PREFIX$t/k2/aml_encrypt_gxb --bootsig \
--input boot_new.bin \
--output u-boot.bin
--input boot_new.bin \
--output u-boot.bin
fi
}
if [[ $BOARD == odroidc2 ]]; then
write_uboot_platform()
{
write_uboot_platform() {
dd if=$1/bl1.bin.hardkernel of=$2 bs=1 count=442 conv=fsync > /dev/null 2>&1
dd if=$1/bl1.bin.hardkernel of=$2 bs=512 skip=1 seek=1 conv=fsync > /dev/null 2>&1
dd if=$1/u-boot.bin of=$2 bs=512 seek=97 conv=fsync > /dev/null 2>&1

View File

@@ -8,8 +8,8 @@ fi
if [[ $BOARD = khadas-vim1 ]]; then
# temporally workaround - using prebuild u-boot from https://github.com/khadas/khadas-uboot/releases/tag/0.11
UBOOT_TARGET_MAP=";;$SRC/packages/blobs/meson/u-boot-vim1-sd.bin:u-boot.bin"
# temporally workaround - using prebuild u-boot from https://github.com/khadas/khadas-uboot/releases/tag/0.11
UBOOT_TARGET_MAP=";;$SRC/packages/blobs/meson/u-boot-vim1-sd.bin:u-boot.bin"
fi
@@ -20,13 +20,11 @@ if [[ $BOARD = khadas-vim2 ]]; then
fi
family_tweaks()
{
family_tweaks() {
:
}
uboot_custom_postprocess()
{
uboot_custom_postprocess() {
if [[ $BOARD == lepotato ]]; then
uboot_gxl_postprocess $SRC/cache/sources/odroidc2-blobs/ gxl
fi

View File

@@ -19,7 +19,7 @@ uboot_custom_postprocess() {
elif [[ $BOARD == khadas-vim3l ]]; then
uboot_g12_postprocess $SRC/cache/sources/amlogic-boot-fip/khadas-vim3l g12a
elif [[ $BOARD == bananapim5 ]]; then
uboot_g12_postprocess $SRC/cache/sources/amlogic-boot-fip/bananapi-m5 g12a
uboot_g12_postprocess $SRC/cache/sources/amlogic-boot-fip/bananapi-m5 g12a
else
display_alert "uboot_custom_postprocess meson-sm1" "Unknown BOARD: $BOARD - not using FIP trees" "wrn"
fi

View File

@@ -11,7 +11,7 @@ case $BRANCH in
KERNELBRANCH='branch:linux-4.19.y'
;;
;;
esac
@@ -21,8 +21,7 @@ GOVERNOR="ondemand"
NM_IGNORE_DEVICES="interface-name:eth*,interface-name:wan*,interface-name:lan*,interface-name:br*"
write_uboot_platform()
{
write_uboot_platform() {
if [[ $2 == /dev/mmcblk* && -b ${2}boot0 ]]; then
local device=${2}boot0
echo 0 > /sys/block/$(basename $device)/force_ro
@@ -44,20 +43,18 @@ write_uboot_platform()
fi
}
family_tweaks()
{
family_tweaks() {
[[ -f $SDCARD/etc/netplan/armbian-default.yaml ]] && sed -i "s/^ renderer.*/ renderer: networkd/" $SDCARD/etc/netplan/armbian-default.yaml
cp $SRC/packages/bsp/mt7623/mt7623-wifi.service $SDCARD/lib/systemd/system/
install -m 755 $SRC/packages/bsp/mt7623/mt7623-wifi.bash $SDCARD/usr/local/bin/mt7623-wifi.bash
# very unstable wifi driver, disabled by default http://www.fw-web.de/dokuwiki/doku.php?id=en:bpi-r2:wlan#internal
# chroot $SDCARD /bin/bash -c "systemctl --no-reload enable mt7623-wifi.service >/dev/null 2>&1"
cp $SRC/packages/bsp/mt7623/10* $SDCARD/etc/systemd/network/
cp $SRC/packages/blobs/mt7623n/wireless/{stp_uart_launcher,wmt_loader,wmt_loopback} $SDCARD/usr/local/bin
cp $SRC/packages/bsp/mt7623/10* $SDCARD/etc/systemd/network/
cp $SRC/packages/blobs/mt7623n/wireless/{stp_uart_launcher,wmt_loader,wmt_loopback} $SDCARD/usr/local/bin
}
family_tweaks_bsp()
{
family_tweaks_bsp() {
# mmc-utils is needed for nand-sata-install
install -m 755 $SRC/packages/extras-buildpkgs/mmc-utils/debian/rules $destination/usr/bin/
}

View File

@@ -13,18 +13,18 @@ case $BRANCH in
KERNELBRANCH='tag:v4.19.167'
;;
;;
current)
KERNELBRANCH='branch:linux-5.15.y'
;;
;;
edge)
KERNELBRANCH='branch:linux-5.17.y'
LINUXCONFIG='linux-mvebu-edge'
KERNELPATCHDIR="mvebu-edge"
@@ -36,27 +36,23 @@ case $BRANCH in
# ;spi;u-boot-spl.kwb:u-boot.flash
# ;uart;u-boot-spl.kwb:u-boot.uart"
;;
;;
esac
CPUMIN=800000
CPUMAX=1600000
GOVERNOR=ondemand
write_uboot_platform()
{
write_uboot_platform() {
dd if=$1/u-boot.mmc of=$2 bs=512 seek=1 status=noxfer > /dev/null 2>&1
}
write_uboot_platform_mtd ()
{
write_uboot_platform_mtd() {
dd if=$1/u-boot.flash of=$2 status=noxfer > /dev/null 2>&1
}
family_tweaks()
{
family_tweaks() {
# execute specific tweaks function if present
[[ $(type -t family_tweaks_s) == function ]] && family_tweaks_s

View File

@@ -38,18 +38,18 @@ case $BRANCH in
KERNELBRANCH='branch:linux-4.14.22-armada-18.06'
KERNELDIR='linux-marvell'
;;
;;
current)
KERNELBRANCH='branch:linux-5.15.y'
;;
;;
edge)
edge)
KERNELBRANCH='branch:linux-5.19.y'
;;
;;
esac
@@ -59,8 +59,7 @@ GOVERNOR=ondemand
NM_IGNORE_DEVICES="interface-name:eth*,interface-name:wan*,interface-name:lan*,interface-name:br*"
write_uboot_platform()
{
write_uboot_platform() {
if [[ $BOARD = macchiatobin-doubleshot ]]; then
dd if=$1/flash-image.bin of=$2 bs=512 seek=1 status=noxfer > /dev/null 2>&1
else
@@ -69,11 +68,10 @@ write_uboot_platform()
fi
}
family_tweaks()
{
family_tweaks() {
chroot $SDCARD /bin/bash -c "apt-get -y -qq remove --auto-remove linux-sound-base alsa-base alsa-utils bluez>/dev/null 2>&1"
[[ -f $SDCARD/etc/netplan/armbian-default.yaml ]] && sed -i "s/^ renderer.*/ renderer: networkd/" $SDCARD/etc/netplan/armbian-default.yaml
cp $SRC/packages/bsp/mvebu64/networkd/10* $SDCARD/etc/systemd/network/
cp $SRC/packages/bsp/mvebu64/networkd/10* $SDCARD/etc/systemd/network/
if [[ $BOARD = "espressobin" ]]; then
echo "#Marvell Espressobin Console" >> $SDCARD/etc/securetty
echo "ttyMV0" >> $SDCARD/etc/securetty
@@ -86,22 +84,20 @@ family_tweaks_bsp() {
fi
}
atf_custom_postprocess()
{
atf_custom_postprocess() {
# prepare compilers for postprocess
ubootdir="$SRC/cache/sources/$BOOTDIR/${BOOTBRANCH##*:}"
export ATF1=$toolchain/$ATF_COMPILER
if [[ "${SKIP_EXTERNAL_TOOLCHAINS}" == "yes" ]]; then
export TOOLCHAIN_NAME="arm-linux-gnueabi-"
else
export TOOLCHAIN_NAME="arm-none-linux-gnueabihf-"
fi
export TOOLCHAIN_NAME="arm-linux-gnueabi-"
else
export TOOLCHAIN_NAME="arm-none-linux-gnueabihf-"
fi
export ATF2=$(find_toolchain "$TOOLCHAIN_NAME" "> 10.0")/$TOOLCHAIN_NAME
export BL33=$ubootdir"/u-boot.bin"
}
uboot_custom_postprocess()
{
uboot_custom_postprocess() {
# clean previous
rm $ubootdir/flash-image*
local atfdir="$SRC/cache/sources/$ATFDIR/${ATFBRANCH##*:}"
@@ -119,35 +115,33 @@ uboot_custom_postprocess()
make USE_COHERENT_MEM=0 LOG_LEVEL=20 MV_DDR_PATH=$SRC/cache/sources/marvell-ddr PLAT=a80x0_mcbin CROSS_COMPILE=$ATF1 BL33=$BL33 mrvl_flash $CTHREADS >> $DEST/debug/compilation.log 2>&1
cp build/a80x0_mcbin/release/flash-image.bin $ubootdir/$FILENAME
else
cd $moxbootdir
make clean
make CROSS_CM3=$ATF2 wtmi_app.bin
cd $atfdir
cd $moxbootdir
make clean
make CROSS_CM3=$ATF2 wtmi_app.bin
cd $atfdir
clocks=( 600_600 800_800 1000_800 1200_750 )
topology=( 512m_1cs_0 1g_2cs_2 1g_1cs_4 2g_2cs_7 1g_1cs_5 2g_2cs_6 )
for i in "${clocks[@]}"
do
for j in "${topology[@]}"
do
clocks=(600_600 800_800 1000_800 1200_750)
topology=(512m_1cs_0 1g_2cs_2 1g_1cs_4 2g_2cs_7 1g_1cs_5 2g_2cs_6)
for i in "${clocks[@]}"; do
for j in "${topology[@]}"; do
if [[ $j = *cs_5 || $j = *cs_6 ]]; then local ddrname="DDR4"; else ddrname="DDR3"; fi
FILENAME="flash-image-$ddrname-$j-$i.bin"
DDR_TOPOLOGY="${j##*_}"
CLOCKSPRESET="CPU_${i%_*}_DDR_${i##*_}"
display_alert "Building $FILENAME" "" "info"
make distclean >> $DEST/debug/compilation.log 2>&1
make CROSS_COMPILE=$ATF1 \
CROSS_CM3=$ATF2 \
USE_COHERENT_MEM=0 \
PLAT=a3700 \
CLOCKSPRESET=$CLOCKSPRESET DDR_TOPOLOGY=$DDR_TOPOLOGY \
MV_DDR_PATH=$SRC/cache/sources/marvell-ddr \
WTP=$SRC/cache/sources/marvell-tools \
CRYPTOPP_PATH=$SRC/cache/sources/cryptopp \
BL33=$BL33 \
WTMI_IMG=$moxbootdir/wtmi_app.bin \
BOOTDEV=SPINOR PARTNUM=0 \
LOG_LEVEL=20 all fip mrvl_flash $CTHREADS >> $DEST/debug/compilation.log 2>&1
make CROSS_COMPILE=$ATF1 \
CROSS_CM3=$ATF2 \
USE_COHERENT_MEM=0 \
PLAT=a3700 \
CLOCKSPRESET=$CLOCKSPRESET DDR_TOPOLOGY=$DDR_TOPOLOGY \
MV_DDR_PATH=$SRC/cache/sources/marvell-ddr \
WTP=$SRC/cache/sources/marvell-tools \
CRYPTOPP_PATH=$SRC/cache/sources/cryptopp \
BL33=$BL33 \
WTMI_IMG=$moxbootdir/wtmi_app.bin \
BOOTDEV=SPINOR PARTNUM=0 \
LOG_LEVEL=20 all fip mrvl_flash $CTHREADS >> $DEST/debug/compilation.log 2>&1
cp build/a3700/release/flash-image.bin $ubootdir/$FILENAME
done
done

View File

@@ -13,21 +13,21 @@ case $BRANCH in
KERNELBRANCH='branch:odroidxu4-4.14.y'
KERNELDIR='linux-odroidxu4'
;;
;;
current)
KERNELSOURCE='https://github.com/hardkernel/linux'
KERNELBRANCH='branch:odroid-5.4.y'
KERNELDIR='linux-odroidxu4'
;;
;;
edge)
KERNELSOURCE='https://github.com/tobetter/linux'
KERNELBRANCH='branch:odroid-5.19.y'
KERNELDIR='linux-odroidxu4'
;;
;;
esac
@@ -36,11 +36,7 @@ CPUMAX=2000000
GOVERNOR=ondemand
SERIALCON=ttySAC2
setup_write_uboot_platform()
{
setup_write_uboot_platform() {
# this will update u-boot on the device rootfs is located on
# in case it's a mmc device, otherwise DEVICE will not be changed
@@ -48,17 +44,13 @@ setup_write_uboot_platform()
local tmp=$(cat /proc/cmdline)
tmp="${tmp##*root=}"
tmp="${tmp%% *}"
[[ -n $tmp ]] && local part=$(findfs $tmp 2>/dev/null)
[[ -n $part ]] && local dev=$(lsblk -n -o PKNAME $part 2>/dev/null)
[[ -n $tmp ]] && local part=$(findfs $tmp 2> /dev/null)
[[ -n $part ]] && local dev=$(lsblk -n -o PKNAME $part 2> /dev/null)
[[ -n $dev && $dev == mmcblk* ]] && DEVICE="/dev/${dev}"
}
write_uboot_platform()
{
write_uboot_platform() {
# handle writing to eMMC on package upgrades
# assuming $2 points to a correct device
@@ -90,21 +82,13 @@ write_uboot_platform()
dd if=/dev/zero of=$device seek=$env_position bs=512 count=32 conv=fsync > /dev/null 2>&1
}
family_tweaks()
{
family_tweaks() {
echo "blacklist ina231_sensor" > $SDCARD/etc/modprobe.d/blacklist-odroid.conf
}
family_tweaks_bsp()
{
family_tweaks_bsp() {
mkdir -p $destination/etc/udev/rules.d
cp $SRC/packages/bsp/odroid/90-builtin-net-rps.rules $destination/etc/udev/rules.d

View File

@@ -15,19 +15,19 @@ case $BRANCH in
KERNELBRANCH='branch:stable-4.4-rk3288-linux-v2.x'
KERNELDIR='linux-rockchip'
;;
;;
current)
KERNELBRANCH='branch:linux-5.15.y'
;;
;;
edge)
KERNELBRANCH='branch:linux-5.19.y'
;;
;;
esac
@@ -35,8 +35,7 @@ CPUMIN="600000"
CPUMAX="1500000"
GOVERNOR="ondemand"
write_uboot_platform()
{
write_uboot_platform() {
# Extract the Command Rate bit from existing loader.
# Some DDR memories have issues with different Command Rate, so we
@@ -47,46 +46,46 @@ write_uboot_platform()
while [[ -n $DIR ]]; do
# Find the signature "a7866565" in the first 128k of the stored running image
SIGNATURE_OFFSET=$(dd if=$2 bs=128k count=1 2>/dev/null | od -A o -w4 -tx4 | grep 'a7866565' | cut -d " " -f 1)
SIGNATURE_OFFSET=$(dd if=$2 bs=128k count=1 2> /dev/null | od -A o -w4 -tx4 | grep 'a7866565' | cut -d " " -f 1)
# Some command failed, skip the rest
[[ $? -ne 0 ]] && break;
[[ $? -ne 0 ]] && break
# No signature found, skip the rest
[[ -z $SIGNATURE_OFFSET ]] && break;
[[ -z $SIGNATURE_OFFSET ]] && break
# Command rate bit is 16 bytes before signature
CMD_RATE_OFFSET=$(($SIGNATURE_OFFSET - 16))
CR_BYTE=$(od -A n -t dI -j $CMD_RATE_OFFSET -N 1 $2)
# No command rate byte for some reason, skip the rest
[[ -z $CR_BYTE ]] && break;
[[ -z $CR_BYTE ]] && break
# Invalid command rate byte (should be 0 or 1), skip the rest
[[ "$CR_BYTE" -ne 0 && "$CR_BYTE" -ne 1 ]] && break;
[[ "$CR_BYTE" -ne 0 && "$CR_BYTE" -ne 1 ]] && break
# Proceed patching u-boot-rk322x-with-spl.bin, do find the
# Proceed patching u-boot-rk322x-with-spl.bin, do find the
# cr bit there too to verify that the position of the CR bit is right
SIGNATURE_OFFSET=$(dd if=$1/u-boot-rk322x-with-spl.bin bs=128k count=1 2>/dev/null | od -A o -w4 -tx4 | grep 'a7866565' | cut -d " " -f 1)
SIGNATURE_OFFSET=$(dd if=$1/u-boot-rk322x-with-spl.bin bs=128k count=1 2> /dev/null | od -A o -w4 -tx4 | grep 'a7866565' | cut -d " " -f 1)
# Some command failed, skip the rest
[[ $? -ne 0 ]] && break;
[[ $? -ne 0 ]] && break
# No signature found, skip the rest
[[ -z $SIGNATURE_OFFSET ]] && break
# Command rate bit is 16 bytes before signature
CMD_RATE_OFFSET=$(($SIGNATURE_OFFSET - 16))
DST_BYTE=$(od -A n -t dI -j $CMD_RATE_OFFSET -N 1 $1/u-boot-rk322x-with-spl.bin)
CMD_RATE_OFFSET=$(($SIGNATURE_OFFSET - 16))
DST_BYTE=$(od -A n -t dI -j $CMD_RATE_OFFSET -N 1 $1/u-boot-rk322x-with-spl.bin)
# Verify command rate byte is 0 or 1
[[ "$DST_BYTE" -ne 0 && "$DST_BYTE" -ne 1 ]] && break;
[[ "$DST_BYTE" -ne 0 && "$DST_BYTE" -ne 1 ]] && break
# Patch the file
[[ "$CR_BYTE" -eq 0 ]] && HEX_CR="\x00"
[[ "$CR_BYTE" -eq 1 ]] && HEX_CR="\x01"
echo -e $HEX_CR | dd of=$1/u-boot-rk322x-with-spl.bin bs=1 seek=$CMD_RATE_OFFSET count=1 conv=notrunc >/dev/null 2>&1
echo -e $HEX_CR | dd of=$1/u-boot-rk322x-with-spl.bin bs=1 seek=$CMD_RATE_OFFSET count=1 conv=notrunc > /dev/null 2>&1
# always break the while loop
break
@@ -98,8 +97,7 @@ write_uboot_platform()
}
uboot_custom_postprocess()
{
uboot_custom_postprocess() {
# We use the rockchip proprietary blob to initialize memory chips
# instead of letting u-boot doing the job. Such devices, like xt-mx4vr-v01, have DDR2
@@ -112,22 +110,20 @@ uboot_custom_postprocess()
#
# tools/mkimage -n rk322x -T rksd -d tpl/u-boot-tpl.bin u-boot-rk322x-with-spl.bin
#
tools/mkimage -n rk322x -T rksd -d $SRC/packages/blobs/rockchip/rk322x_ddr_330MHz_v1.10_2t.bin u-boot-rk322x-with-spl.bin
cat spl/u-boot-spl.bin >> u-boot-rk322x-with-spl.bin
dd if=u-boot.itb of=u-boot-rk322x-with-spl.bin seek=$((0x200 - 0x40)) conv=notrunc
}
family_tweaks()
{
family_tweaks() {
true
}
family_tweaks_bsp()
{
family_tweaks_bsp() {
#Graphics and media
mkdir -p $destination/etc/udev/rules.d
mkdir -p $destination/usr/local/bin

View File

@@ -9,13 +9,12 @@ case $BRANCH in
KERNELDIR='linux-rockchip64'
KERNELCONFIG='linux-rockchip64'
;;
;;
esac
prepare_boot_configuration
atf_custom_postprocess()
{
atf_custom_postprocess() {
:
}

View File

@@ -19,22 +19,21 @@ case $BRANCH in
BOOT_FDT_FILE="rockchip/rk3568-rock-3-a.dtb"
fi
;;
# temporary until kernel 5.16 is well supported for rockchip64
# it has to be its own family too
edge)
;;
# temporary until kernel 5.16 is well supported for rockchip64
# it has to be its own family too
edge)
SKIP_BOOTSPLASH="yes"
LINUXFAMILY=rk35xx
;;
;;
esac
prepare_boot_configuration
family_tweaks_bsp()
{
family_tweaks_bsp() {
:
}

View File

@@ -17,13 +17,12 @@ case $BRANCH in
KERNELBRANCH='branch:stable-5.10-rock5'
KERNELPATCHDIR='rockchip-rk3588-legacy'
;;
;;
esac
prepare_boot_configuration
family_tweaks_bsp()
{
family_tweaks_bsp() {
:
}

View File

@@ -6,9 +6,9 @@ OVERLAY_PREFIX='rockchip'
UBOOT_TARGET_MAP=";;$SRC/packages/blobs/rockchip/rk3288_boot.bin u-boot-rockchip-with-spl.bin"
BOOTDELAY=1
if [[ $BOARD == miqi ]]; then
BOOTBRANCH='tag:v2017.11'
BOOTBRANCH='tag:v2017.11'
else
BOOTBRANCH='tag:v2022.04'
BOOTBRANCH='tag:v2022.04'
fi
SERIALCON=ttyS2
@@ -21,18 +21,18 @@ case $BRANCH in
KERNELBRANCH='branch:stable-4.4-rk3288-linux'
KERNELDIR='linux-rockchip'
;;
;;
current)
KERNELBRANCH='branch:linux-5.15.y'
;;
;;
edge)
KERNELBRANCH='branch:linux-5.19.y'
;;
;;
esac
@@ -40,19 +40,17 @@ CPUMIN="600000"
CPUMAX="1900000"
GOVERNOR="ondemand"
write_uboot_platform()
{
write_uboot_platform() {
dd if=/dev/zero of=$2 bs=1k count=1023 seek=1 status=noxfer > /dev/null 2>&1
dd if=$1/u-boot-rockchip-with-spl.bin of=$2 seek=64 conv=notrunc > /dev/null 2>&1
}
uboot_custom_postprocess()
{
uboot_custom_postprocess() {
# xt-q8l-v10 requires the original DDR init blob because u-boot does not support LPDDR2 initialization
# for rk3288 SoC (binary is in sources/rkbin-tools/rk32 path). U-boot is configured to produce a TPL
# which is thrown away. SPL does some more initial configurations, expecially pinmux for power hold,
# so reset works more reliably. U-boot image is set to be at sector 0x200 on the eMMC/SD,
# which is thrown away. SPL does some more initial configurations, expecially pinmux for power hold,
# so reset works more reliably. U-boot image is set to be at sector 0x200 on the eMMC/SD,
# so we burn it 0x200-0x40 because of the rockchip 0x40 sectors offset.
if [[ $BOARD == xt-q8l-v10 ]]; then
tools/mkimage -n rk3288 -T rksd -d $SRC/cache/sources/rkbin-tools/rk32/rk3288_ddr_400MHz_v1.08.bin u-boot-rockchip-with-spl.bin
@@ -66,47 +64,45 @@ uboot_custom_postprocess()
}
family_tweaks()
{
family_tweaks() {
if [[ $BOARD == tinkerboard ]]; then
chroot $SDCARD /bin/bash -c "apt-get -y -qq install rfkill bluetooth bluez bluez-tools"
[[ $BRANCH == legacy ]] && chroot $SDCARD /bin/bash -c "systemctl --no-reload enable tinker-bluetooth.service >/dev/null 2>&1"
sed -i -e "/#load-module module-alsa-sink/r $SRC/packages/bsp/rockchip/pulseaudio.txt" $SDCARD/etc/pulse/default.pa >/dev/null 2>&1
sed -i -e "/#load-module module-alsa-sink/r $SRC/packages/bsp/rockchip/pulseaudio.txt" $SDCARD/etc/pulse/default.pa > /dev/null 2>&1
fi
}
family_tweaks_bsp()
{
#Graphics and media
mkdir -p $destination/etc/udev/rules.d
mkdir -p $destination/usr/local/bin
cp $SRC/packages/bsp/rockchip/hdmi.rules $destination/etc/udev/rules.d
cp $SRC/packages/bsp/rockchip/50-hevc.rules $destination/etc/udev/rules.d
cp $SRC/packages/bsp/rockchip/50-mali.rules $destination/etc/udev/rules.d
cp $SRC/packages/bsp/rockchip/50-vpu.rules $destination/etc/udev/rules.d
cp $SRC/packages/bsp/rockchip/60-media.rules $destination/etc/udev/rules.d
install -m 755 $SRC/packages/bsp/rockchip/hdmi-hotplug $destination/usr/local/bin
family_tweaks_bsp() {
#Graphics and media
mkdir -p $destination/etc/udev/rules.d
mkdir -p $destination/usr/local/bin
cp $SRC/packages/bsp/rockchip/hdmi.rules $destination/etc/udev/rules.d
cp $SRC/packages/bsp/rockchip/50-hevc.rules $destination/etc/udev/rules.d
cp $SRC/packages/bsp/rockchip/50-mali.rules $destination/etc/udev/rules.d
cp $SRC/packages/bsp/rockchip/50-vpu.rules $destination/etc/udev/rules.d
cp $SRC/packages/bsp/rockchip/60-media.rules $destination/etc/udev/rules.d
install -m 755 $SRC/packages/bsp/rockchip/hdmi-hotplug $destination/usr/local/bin
# Peripheral access for specific groups
addgroup --system --quiet --gid 997 gpio
addgroup --system --quiet --gid 998 i2c
cp $SRC/packages/bsp/rockchip/70-gpio.rules $destination/etc/udev/rules.d
cp $SRC/packages/bsp/rockchip/71-i2c.rules $destination/etc/udev/rules.d
# Peripheral access for specific groups
addgroup --system --quiet --gid 997 gpio
addgroup --system --quiet --gid 998 i2c
cp $SRC/packages/bsp/rockchip/70-gpio.rules $destination/etc/udev/rules.d
cp $SRC/packages/bsp/rockchip/71-i2c.rules $destination/etc/udev/rules.d
# Tinkerboard Bluetooth (only legacy kernel, mainline uses serdev)
if [[ $BRANCH == legacy ]]; then
install -m 755 $SRC/packages/bsp/rockchip/rtk_hciattach $destination/usr/bin
install -m 755 $SRC/packages/bsp/rockchip/start_bt.sh $destination/usr/local/bin
cp $SRC/packages/bsp/rockchip/tinker-bluetooth.service $destination/lib/systemd/system/
fi
# Tinkerboard Bluetooth (only legacy kernel, mainline uses serdev)
if [[ $BRANCH == legacy ]]; then
install -m 755 $SRC/packages/bsp/rockchip/rtk_hciattach $destination/usr/bin
install -m 755 $SRC/packages/bsp/rockchip/start_bt.sh $destination/usr/local/bin
cp $SRC/packages/bsp/rockchip/tinker-bluetooth.service $destination/lib/systemd/system/
fi
# Sound
cp $SRC/packages/bsp/rockchip/asound.conf $destination/etc/
cp $SRC/packages/bsp/rockchip/89-pulseaudio-usb.rules $destination/etc/udev/rules.d
# Sound
cp $SRC/packages/bsp/rockchip/asound.conf $destination/etc/
cp $SRC/packages/bsp/rockchip/89-pulseaudio-usb.rules $destination/etc/udev/rules.d
# AP6330 (BCM4330) firmware initramfs hook for in-kernel btbcm driver
mkdir -p $destination/etc/initramfs-tools/hooks
install -m 550 $SRC/packages/bsp/rockchip/ap6330-initramfs-firmware $destination/etc/initramfs-tools/hooks
# AP6330 (BCM4330) firmware initramfs hook for in-kernel btbcm driver
mkdir -p $destination/etc/initramfs-tools/hooks
install -m 550 $SRC/packages/bsp/rockchip/ap6330-initramfs-firmware $destination/etc/initramfs-tools/hooks
}

View File

@@ -7,7 +7,7 @@ case $BRANCH in
KERNELSOURCE='https://github.com/ayufan-rock64/linux-kernel'
KERNELBRANCH='tag:4.4.202-1237-rockchip-ayufan'
KERNELPATCHDIR='rockchip64-'$BRANCH
;;
;;
esac

View File

@@ -22,7 +22,6 @@ IDBLOADER_BLOB=$SRC/packages/blobs/rockchip/rk3308_idbloader_ddr589MHz_uart0_m0_
#Then, reset the RockPi-S to boot from SDNAND. Using that running image:
# dd if=/dev/mmcblk0 of=rk3308_idbloader_ddr589MHz_uart0_m0_v2.06.136sd.bin skip=64 count=280
case $BRANCH in
legacy)
@@ -39,30 +38,28 @@ case $BRANCH in
KERNELDIR='linux-rockchip64'
unset IDBLOADER_BLOB
;;
;;
esac
prepare_boot_configuration
uboot_custom_postprocess()
{
uboot_custom_postprocess() {
# TODO: remove this diversion from common caused by different loaderimage params
loaderimage --pack --uboot ./u-boot-dtb.bin uboot.img 0x600000 --size 1024 1 &&
if [ -r "$IDBLOADER_BLOB" ]; then
echo "Installing $IDBLOADER_BLOB"
echo "Capable of booting from built-in SDNAND"
cp $IDBLOADER_BLOB idbloader.bin
else
[ "$IDBLOADER_BLOB" ] && echo "Missing $IDBLOADER_BLOB"
echo "WARNING: This image will not boot from built-in SDNAND"
tools/mkimage -n rk3308 -T rksd -d $RKBIN_DIR/$DDR_BLOB idbloader.bin &&
cat $RKBIN_DIR/$MINILOADER_BLOB >> idbloader.bin
fi &&
trust_merger --replace bl31.elf $RKBIN_DIR/$BL31_BLOB trust.ini
if [ -r "$IDBLOADER_BLOB" ]; then
echo "Installing $IDBLOADER_BLOB"
echo "Capable of booting from built-in SDNAND"
cp $IDBLOADER_BLOB idbloader.bin
else
[ "$IDBLOADER_BLOB" ] && echo "Missing $IDBLOADER_BLOB"
echo "WARNING: This image will not boot from built-in SDNAND"
tools/mkimage -n rk3308 -T rksd -d $RKBIN_DIR/$DDR_BLOB idbloader.bin &&
cat $RKBIN_DIR/$MINILOADER_BLOB >> idbloader.bin
fi &&
trust_merger --replace bl31.elf $RKBIN_DIR/$BL31_BLOB trust.ini
}
family_tweaks_bsp()
{
family_tweaks_bsp() {
:
}

View File

@@ -7,28 +7,26 @@ BOOTENV_FILE='s5p6818.txt'
UBOOT_TARGET_MAP=";;boot.img bootemmc.img"
ATF_COMPILE="no"
case $BRANCH in
legacy|current)
legacy | current)
KERNELSOURCE='https://github.com/armbian/linux'
KERNELBRANCH='branch:s5p6818'
KERNELDIR='linux-mainline'
;;
;;
esac
CPUMIN="400000"
CPUMAX="1400000"
GOVERNOR=ondemand
write_uboot_platform()
{
write_uboot_platform() {
if [[ "$2" != /dev/mmcblk0 ]]; then
dd if=$1/boot.img of=$2 seek=1 status=noxfer > /dev/null 2>&1
dd if=$1/boot.img of=$2 seek=1 status=noxfer > /dev/null 2>&1
else
dd if=$1/bootemmc.img of=$2 seek=1 status=noxfer > /dev/null 2>&1
dd if=$1/bootemmc.img of=$2 seek=1 status=noxfer > /dev/null 2>&1
fi
}
uboot_custom_postprocess()
{
uboot_custom_postprocess() {
# 2GB differnt bl1 https://github.com/friendlyarm/linux-3.4.y/issues/3#issuecomment-387214487
if [[ $BOARD == nanopct3plus ]]; then
cp $SRC/packages/blobs/nanopi/2g-bl1-nanopi.bin boot.img
@@ -38,17 +36,17 @@ uboot_custom_postprocess()
i=0
merge=""
while [ $i -lt 512 ]; do
val="00000000"; \
[ $i -eq 68 ] && val="00060000" # 0x44 load size
[ $i -eq 72 ] && val="43bffe00" # 0x48 load address
[ $i -eq 76 ] && val="43c00000" # 0x4c launch address
[ $i -eq 504 ] && val="68180300" # 0x1f8 version
[ $i -eq 508 ] && val="4849534E" # 0x1fc "NSIH"
val="00000000"
[ $i -eq 68 ] && val="00060000" # 0x44 load size
[ $i -eq 72 ] && val="43bffe00" # 0x48 load address
[ $i -eq 76 ] && val="43c00000" # 0x4c launch address
[ $i -eq 504 ] && val="68180300" # 0x1f8 version
[ $i -eq 508 ] && val="4849534E" # 0x1fc "NSIH"
# put in little endian
vallo=${val#????}
valhi=${val%????}
merge=$merge"${vallo#??}${vallo%??}${valhi#??}${valhi%??}"
i=$((i+4))
i=$((i + 4))
done
echo $merge | xxd -r -p | dd of=boot.img seek=63 status=none
cat u-boot.bin >> boot.img
@@ -56,7 +54,6 @@ uboot_custom_postprocess()
printf "\2" | dd of=bootemmc.img bs=1 seek=80 conv=notrunc
}
family_tweaks()
{
family_tweaks() {
:
}

View File

@@ -6,8 +6,7 @@ OVERLAY_PREFIX='sun50i-a64'
GOVERNOR=performance
ASOUND_STATE='asound.state.pinebook-next'
family_tweaks_s()
{
family_tweaks_s() {
# add bluetooth firmware for 8723cs + sysrq fix
if [[ $BOARD == pinebook-a64 ]]; then
cp -R $SRC/packages/blobs/rtl8723bt_fw/* $SDCARD/lib/firmware/rtl_bt/

View File

@@ -1,4 +1,4 @@
ATF_PLAT="sun50i_h6";
ATF_PLAT="sun50i_h6"
source "${BASH_SOURCE%/*}/include/sunxi64_common.inc"
OVERLAY_PREFIX='sun50i-h6'
[[ -z $CPUMIN ]] && CPUMIN=480000
@@ -12,26 +12,25 @@ case $BRANCH in
if [[ ${BOARD} == orangepi3-lts ]]; then
ASOUND_STATE='asound.state.sun50iw6-current'
fi
;;
;;
edge)
if [[ ${BOARD} == orangepi3-lts ]]; then
ASOUND_STATE='asound.state.sun50iw6-current'
fi
;;
;;
esac
family_tweaks_s()
{
family_tweaks_s() {
if [[ -f $SDCARD/lib/systemd/system/aw859a-bluetooth.service ]]; then
# install and enable Bluetooth
chroot $SDCARD /bin/bash -c "apt-get -y -qq install rfkill bluetooth bluez bluez-tools >/dev/null 2>&1"
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable aw859a-bluetooth.service >/dev/null 2>&1"
# install and enable Bluetooth
chroot $SDCARD /bin/bash -c "apt-get -y -qq install rfkill bluetooth bluez bluez-tools >/dev/null 2>&1"
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable aw859a-bluetooth.service >/dev/null 2>&1"
fi
if [[ $BUILD_DESKTOP == yes && $BOARD == orangepi3-lts ]]; then
@@ -43,8 +42,7 @@ family_tweaks_s()
fi
}
family_tweaks_bsp()
{
family_tweaks_bsp() {
if [[ ${BOARD} == orangepi3-lts ]]; then
cp $SRC/packages/bsp/sunxi/aw859a-bluetooth.service $destination/lib/systemd/system/

View File

@@ -8,99 +8,95 @@ case $BRANCH in
legacy)
unset var_origin_kernel
LINUXFAMILY=sun50iw9
KERNELSOURCE='https://github.com/orangepi-xunlong/linux-orangepi.git'
KERNELBRANCH="branch:orange-pi-4.9-sun50iw9"
KERNELPATCHDIR=${BOARDFAMILY}-${BRANCH}
KERNELDIR='linux-orangepi'
BOOTSOURCE='https://github.com/orangepi-xunlong/u-boot-orangepi.git'
BOOTBRANCH='branch:v2018.05-sun50iw9'
BOOTPATCHDIR=u-boot-${LINUXFAMILY}
UBOOT_TARGET_MAP=";;dts/${BOARD}-u-boot.dts boot0_sdcard.fex boot_package.fex u-boot.bin:u-boot.fex"
UBOOT_COMPILER="arm-linux-gnueabi-"
UBOOT_USE_GCC='> 6.0'
BOOTENV_FILE=sun50iw9.txt
BOOTSCRIPT='boot-sun50iw9.cmd:boot.cmd'
PACK_UBOOT="yes"
OFFSET=20
ATFSOURCE=""
ATF_COMPILE="no"
INITRD_ARCH=arm
unset var_origin_kernel
LINUXFAMILY=sun50iw9
KERNELSOURCE='https://github.com/orangepi-xunlong/linux-orangepi.git'
KERNELBRANCH="branch:orange-pi-4.9-sun50iw9"
KERNELPATCHDIR=${BOARDFAMILY}-${BRANCH}
KERNELDIR='linux-orangepi'
BOOTSOURCE='https://github.com/orangepi-xunlong/u-boot-orangepi.git'
BOOTBRANCH='branch:v2018.05-sun50iw9'
BOOTPATCHDIR=u-boot-${LINUXFAMILY}
UBOOT_TARGET_MAP=";;dts/${BOARD}-u-boot.dts boot0_sdcard.fex boot_package.fex u-boot.bin:u-boot.fex"
UBOOT_COMPILER="arm-linux-gnueabi-"
UBOOT_USE_GCC='> 6.0'
BOOTENV_FILE=sun50iw9.txt
BOOTSCRIPT='boot-sun50iw9.cmd:boot.cmd'
PACK_UBOOT="yes"
OFFSET=20
ATFSOURCE=""
ATF_COMPILE="no"
INITRD_ARCH=arm
ASOUND_STATE='asound.state.sun50iw9-legacy'
ASOUND_STATE='asound.state.sun50iw9-legacy'
write_uboot_platform()
{
dd if=$1/boot0_sdcard.fex of=$2 bs=8k seek=1 conv=fsync > /dev/null 2>&1
dd if=$1/boot_package.fex of=$2 bs=8k seek=2050 conv=fsync > /dev/null 2>&1 || true
}
write_uboot_platform() {
dd if=$1/boot0_sdcard.fex of=$2 bs=8k seek=1 conv=fsync > /dev/null 2>&1
dd if=$1/boot_package.fex of=$2 bs=8k seek=2050 conv=fsync > /dev/null 2>&1 || true
}
;;
;;
current|edge)
current | edge)
ATFSOURCE='https://github.com/ARM-software/arm-trusted-firmware'
ATFBRANCH='branch:master'
ATF_PLAT="sun50i_h616";
ATF_TARGET_MAP='PLAT=sun50i_h616 DEBUG=1 bl31;;build/sun50i_h616/debug/bl31.bin'
BOOTSCRIPT='boot-sun50i-next.cmd:boot.cmd'
ATFSOURCE='https://github.com/ARM-software/arm-trusted-firmware'
ATFBRANCH='branch:master'
ATF_PLAT="sun50i_h616"
ATF_TARGET_MAP='PLAT=sun50i_h616 DEBUG=1 bl31;;build/sun50i_h616/debug/bl31.bin'
BOOTSCRIPT='boot-sun50i-next.cmd:boot.cmd'
;;
;;
esac
family_tweaks_s()
{
if [[ -f $SDCARD/lib/systemd/system/aw859a-bluetooth.service ]]; then
family_tweaks_s() {
if [[ -f $SDCARD/lib/systemd/system/aw859a-bluetooth.service ]]; then
# Enable Bluetooth
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable aw859a-bluetooth.service >/dev/null 2>&1"
fi
# Enable Bluetooth
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable aw859a-bluetooth.service >/dev/null 2>&1"
fi
if [[ -f $SDCARD/lib/systemd/system/hdmi-audio.service ]]; then
if [[ -f $SDCARD/lib/systemd/system/hdmi-audio.service ]]; then
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable hdmi-audio.service >/dev/null 2>&1"
fi
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable hdmi-audio.service >/dev/null 2>&1"
fi
}
family_tweaks_bsp()
{
family_tweaks_bsp() {
if [[ ${BOARD} == orangepizero2 && ${BRANCH} == legacy ]]; then
install -m 755 $SRC/packages/blobs/bt/hciattach/hciattach_opi_$ARCH $destination/usr/bin/hciattach_opi
cp $SRC/packages/bsp/sunxi/aw859a-bluetooth.service $destination/lib/systemd/system/
if [[ ${BOARD} == orangepizero2 && ${BRANCH} == legacy ]]; then
install -m 755 $SRC/packages/blobs/bt/hciattach/hciattach_opi_$ARCH $destination/usr/bin/hciattach_opi
cp $SRC/packages/bsp/sunxi/aw859a-bluetooth.service $destination/lib/systemd/system/
install -m 755 $SRC/packages/blobs/sunxi/h616/inithdmiaudio $destination/usr/bin/
cp $SRC/packages/blobs/sunxi/h616/libtinyalsa.so $destination/usr/lib/
cp $SRC/packages/bsp/sunxi/hdmi-audio.service $destination/lib/systemd/system/
install -m 755 $SRC/packages/blobs/sunxi/h616/inithdmiaudio $destination/usr/bin/
cp $SRC/packages/blobs/sunxi/h616/libtinyalsa.so $destination/usr/lib/
cp $SRC/packages/bsp/sunxi/hdmi-audio.service $destination/lib/systemd/system/
fi
fi
}
uboot_custom_postprocess()
{
uboot_custom_postprocess() {
if [[ ${BRANCH} == legacy ]]; then
export PATH=$SRC/packages/pack-uboot/${BOARDFAMILY}/tools/:$PATH
cp ${SRC}/packages/pack-uboot/${BOARDFAMILY}/bin/* . -r
cp sys_config/sys_config_${BOARD}.fex sys_config.fex
cp u-boot.bin u-boot.fex
if [[ ${BRANCH} == legacy ]]; then
export PATH=$SRC/packages/pack-uboot/${BOARDFAMILY}/tools/:$PATH
cp ${SRC}/packages/pack-uboot/${BOARDFAMILY}/bin/* . -r
cp sys_config/sys_config_${BOARD}.fex sys_config.fex
cp u-boot.bin u-boot.fex
# make u-boot dtb
$SRC/packages/pack-uboot/${BOARDFAMILY}/tools/dtc -p 2048 -W no-unit_address_vs_reg -@ -O dtb -o ${BOARD}-u-boot.dtb -b 0 dts/${BOARD}-u-boot.dts
# make u-boot dtb
$SRC/packages/pack-uboot/${BOARDFAMILY}/tools/dtc -p 2048 -W no-unit_address_vs_reg -@ -O dtb -o ${BOARD}-u-boot.dtb -b 0 dts/${BOARD}-u-boot.dts
busybox unix2dos sys_config.fex
$SRC/packages/pack-uboot/${BOARDFAMILY}/tools/script sys_config.fex
cp ${BOARD}-u-boot.dtb sunxi.fex
$SRC/packages/pack-uboot/${BOARDFAMILY}/tools/update_dtb sunxi.fex 4096
$SRC/packages/pack-uboot/${BOARDFAMILY}/tools/update_boot0 boot0_sdcard.fex sys_config.bin SDMMC_CARD
busybox unix2dos sys_config.fex
$SRC/packages/pack-uboot/${BOARDFAMILY}/tools/script sys_config.fex
cp ${BOARD}-u-boot.dtb sunxi.fex
$SRC/packages/pack-uboot/${BOARDFAMILY}/tools/update_dtb sunxi.fex 4096
$SRC/packages/pack-uboot/${BOARDFAMILY}/tools/update_boot0 boot0_sdcard.fex sys_config.bin SDMMC_CARD
$SRC/packages/pack-uboot/${BOARDFAMILY}/tools/update_uboot -no_merge u-boot.fex sys_config.bin
update_uboot -no_merge u-boot.bin sys_config.bin
#pack boot package
$SRC/packages/pack-uboot/${BOARDFAMILY}/tools/update_uboot -no_merge u-boot.fex sys_config.bin
update_uboot -no_merge u-boot.bin sys_config.bin
#pack boot package
busybox unix2dos boot_package.cfg
$SRC/packages/pack-uboot/${BOARDFAMILY}/tools/dragonsecboot -pack boot_package.cfg
fi
busybox unix2dos boot_package.cfg
$SRC/packages/pack-uboot/${BOARDFAMILY}/tools/dragonsecboot -pack boot_package.cfg
fi
}

View File

@@ -3,8 +3,7 @@ OVERLAY_PREFIX='sun7i-a20'
[[ -z $CPUMIN ]] && CPUMIN=480000
[[ -z $CPUMAX ]] && CPUMAX=1010000
family_tweaks_bsp_s()
{
family_tweaks_bsp_s() {
if [[ $BOARD == olimex-som204-a20 ]]; then
# BT

View File

@@ -2,8 +2,7 @@ source "${BASH_SOURCE%/*}/include/sunxi_common.inc"
OVERLAY_PREFIX='sun8i-v3s'
family_tweaks_bsp_s()
{
family_tweaks_bsp_s() {
mkdir -p $destination/etc/default
cp $SRC/packages/bsp/sun8i-v3s/etc/default/* $destination/etc/default/
}

View File

@@ -7,8 +7,7 @@ fi
[[ -z $CPUMIN ]] && CPUMIN=480000
[[ -z $CPUMAX ]] && CPUMAX=1400000
family_tweaks_s()
{
family_tweaks_s() {
if [[ ${BOARD} == nanopi-r1 ]]; then
# rename eth1 to wan0
echo 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",ATTR{address}=="00:00:00:00:00:00",ATTR{dev_id}=="0x0", ATTR{type}=="1",KERNEL=="eth1", NAME="wan0"' > $SDCARD/etc/udev/rules.d/70-persisetn-net.rules

View File

@@ -1,4 +1,3 @@
BOOTBRANCH='tag:v2021.04'
KERNELBRANCH='branch:linux-5.10.y'
@@ -13,8 +12,6 @@ BOOTSCRIPT='boot-qemu.cmd:boot.cmd'
BOOTPATCHDIR="u-boot-arm-64"
BOOTDIR='u-boot'
write_uboot_platform()
{
write_uboot_platform() {
dd if=$1/u-boot.bin of=$2 bs=32k seek=1 status=noxfer > /dev/null 2>&1
}
}

View File

@@ -15,13 +15,11 @@ BOOTSCRIPT='boot-zynq.cmd:boot.cmd'
BOOTENV_FILE='zynq.txt'
UBOOT_TARGET_MAP=';;u-boot.elf'
family_tweaks()
{
family_tweaks() {
true
}
uboot_custom_postprocess()
{
uboot_custom_postprocess() {
# Precompiled first stage bootloader
(fetch_from_repo "https://github.com/tparys/xilinx-fsbl-blobs" "xilinx-fsbl" "branch:master")
cp ${SRC}/cache/sources/xilinx-fsbl/zynq/fsbl.elf .
@@ -30,7 +28,7 @@ uboot_custom_postprocess()
compile_xilinx_bootgen
# Create a bootgen build instruction file
cat > build.bif <<EOF
cat > build.bif << EOF
the_ROM_image : {
[bootloader]fsbl.elf
u-boot.elf
@@ -42,7 +40,7 @@ EOF
bootgen -image build.bif -o i boot.bin
# And a simple README for users
cat > README <<EOF
cat > README << EOF
# Regenerate Zynq boot.bin from fsbl.elf, u-boot.elf
bootgen -image build.bif -o i boot.bin
EOF
@@ -60,7 +58,6 @@ EOF
echo "/boot/boot.bin" > "$uboottempdir/${uboot_name}/DEBIAN/conffiles"
}
write_uboot_platform()
{
write_uboot_platform() {
:
}