More BSP refactoring

This commit is contained in:
zador-blood-stained 2017-12-01 18:46:33 +03:00
parent 2851e0987e
commit 4b5bbc32e8
4 changed files with 19 additions and 13 deletions

View File

@ -46,7 +46,7 @@ family_tweaks_s()
esac
}
family_tweaks_bsp()
family_tweaks_bsp_s()
{
# h3disp for sun8i/3.4.x
if [[ $BRANCH == default ]]; then

View File

@ -47,6 +47,21 @@ family_tweaks()
cp $SRC/packages/blobs/splash/armbian-u-boot-24.bmp $SDCARD/boot/boot.bmp
}
family_tweaks_bsp()
{
# execute specific tweaks function if present
[[ $(type -t family_tweaks_bsp_s) == function ]] && family_tweaks_bsp_s
if [[ $BRANCH == default ]]; then
arm-linux-gnueabihf-gcc $SRC/packages/bsp/sunxi-temp/sunxi_tp_temp.c -o $destination/usr/bin/sunxi_tp_temp
# convert and add fex files
mkdir -p $destination/boot/bin
for i in $(ls -w1 $SRC/config/fex/*.fex | xargs -n1 basename); do
fex2bin $SRC/config/fex/${i%*.fex}.fex $destination/boot/bin/${i%*.fex}.bin
done
fi
}
write_uboot_platform()
{
dd if=/dev/zero of=$2 bs=1k count=1023 seek=1 status=noxfer > /dev/null 2>&1

View File

@ -217,7 +217,7 @@ for line in "${buildlist[@]}"; do
BOOTSCRIPT UBOOT_TARGET_MAP LOCALVERSION UBOOT_COMPILER KERNEL_COMPILER BOOTCONFIG BOOTCONFIG_VAR_NAME BOOTCONFIG_DEFAULT BOOTCONFIG_NEXT BOOTCONFIG_DEV \
MODULES MODULES_NEXT MODULES_DEV INITRD_ARCH HAS_UUID_SUPPORT BOOTENV_FILE BOOTDELAY MODULES_BLACKLIST MODULES_BLACKLIST_NEXT \
MODULES_BLACKLIST_DEV MOUNT SDCARD BOOTPATCHDIR KERNELPATCHDIR buildtext RELEASE IMAGE_TYPE OVERLAY_PREFIX ASOUND_STATE \
ATF_COMPILER ATF_USE_GCC ATFSOURCE ATFDIR ATFBRANCH ATFSOURCEDIR PACKAGE_LIST_RM NM_IGNORE_DEVICES DISPLAY_MANAGER
ATF_COMPILER ATF_USE_GCC ATFSOURCE ATFDIR ATFBRANCH ATFSOURCEDIR PACKAGE_LIST_RM NM_IGNORE_DEVICES DISPLAY_MANAGER family_tweaks_bsp_s
read BOARD BRANCH RELEASE BUILD_DESKTOP <<< $line
n=$[$n+1]

View File

@ -154,17 +154,6 @@ create_board_package()
echo "/dev/mmcblk0 ${UBOOT_FW_ENV[0]} ${UBOOT_FW_ENV[1]}" >> $destination/etc/fw_env.config
fi
if [[ $LINUXFAMILY == sun*i* ]]; then
if [[ $BRANCH == default ]]; then
arm-linux-gnueabihf-gcc $SRC/packages/bsp/sunxi-temp/sunxi_tp_temp.c -o $destination/usr/bin/sunxi_tp_temp
# convert and add fex files
mkdir -p $destination/boot/bin
for i in $(ls -w1 $SRC/config/fex/*.fex | xargs -n1 basename); do
fex2bin $SRC/config/fex/${i%*.fex}.fex $destination/boot/bin/${i%*.fex}.bin
done
fi
fi
if [[ ( $LINUXFAMILY == sun*i || $LINUXFAMILY == pine64 ) && $BRANCH == default ]]; then
# add mpv config for vdpau_sunxi
mkdir -p $destination/etc/mpv/
@ -172,6 +161,7 @@ create_board_package()
echo "export VDPAU_OSD=1" > $destination/etc/profile.d/90-vdpau.sh
chmod 755 $destination/etc/profile.d/90-vdpau.sh
fi
if [[ $LINUXFAMILY == sunxi* && $BRANCH != default ]]; then
# add mpv config for x11 output - slow, but it works compared to no config at all
# TODO: Test which output driver is better with DRM
@ -184,6 +174,7 @@ create_board_package()
mkdir -p $destination/etc/NetworkManager/dispatcher.d/
install -m 755 $SRC/packages/bsp/99disable-power-management $destination/etc/NetworkManager/dispatcher.d/
;;
xenial)
mkdir -p $destination/usr/lib/NetworkManager/conf.d/
cp $SRC/packages/bsp/zz-override-wifi-powersave-off.conf $destination/usr/lib/NetworkManager/conf.d/