mirror of https://github.com/armbian/build.git
117 lines
3.9 KiB
Plaintext
117 lines
3.9 KiB
Plaintext
|
|
source "${BASH_SOURCE%/*}/sunxi64_common.inc"
|
|
|
|
OVERLAY_PREFIX='sun50i-a64'
|
|
|
|
case $BRANCH in
|
|
default)
|
|
# for backwards compatibility
|
|
LINUXFAMILY=pine64
|
|
|
|
ATFSOURCE='https://github.com/longsleep/arm-trusted-firmware'
|
|
ATFDIR='arm-trusted-firmware-sunxi-bsp'
|
|
ATFBRANCH='branch:allwinner-a64-bsp'
|
|
ATF_USE_GCC='> 6.3'
|
|
ATF_TARGET_MAP='PLAT=sun50iw1p1 DEBUG=1 bl31;;build/sun50iw1p1/debug/bl31.bin'
|
|
|
|
BOOTSOURCE='https://github.com/longsleep/u-boot-pine64'
|
|
BOOTDIR='u-boot-pine64'
|
|
BOOTBRANCH='branch:pine64-hacks'
|
|
BOOTSCRIPT='boot-pine64-default.cmd:boot.cmd'
|
|
BOOTENV_FILE='pine64-default.txt'
|
|
UBOOT_TARGET_MAP=';;u-boot-with-dtb.bin'
|
|
BOOTPATCHDIR='u-boot-pine64-default'
|
|
|
|
UBOOT_COMPILER='arm-linux-gnueabihf-'
|
|
UBOOT_USE_GCC='> 5.0'
|
|
|
|
KERNELSOURCE='https://github.com/ayufan-pine64/linux-pine64'
|
|
KERNELBRANCH='branch:my-hacks-1.2'
|
|
KERNELDIR='linux-pine64'
|
|
KERNEL_USE_GCC='> 5.0'
|
|
|
|
GOVERNOR=interactive
|
|
INITRD_ARCH=arm
|
|
|
|
if [[ $BOARD == pinebook-a64 ]]; then
|
|
ASOUND_STATE='asound.state.pinebooka64-default'
|
|
else
|
|
ASOUND_STATE='asound.state.pine64-default'
|
|
fi
|
|
;;
|
|
|
|
next)
|
|
BOOTENV_FILE='sun50iw1-next.txt'
|
|
GOVERNOR=ondemand
|
|
;;
|
|
|
|
dev)
|
|
BOOTENV_FILE='sun50iw1-next.txt'
|
|
BOOTSOURCE='https://github.com/anarsoul/u-boot-pine64'
|
|
BOOTDIR=$MAINLINE_UBOOT_DIR
|
|
BOOTBRANCH='branch:pinebook-wip-20181104'
|
|
BOOTPATCHDIR='u-boot-sun50iw2'
|
|
UBOOT_USE_GCC='> 7.0'
|
|
UBOOT_TARGET_MAP=';;spl/sunxi-spl.bin u-boot.itb'
|
|
BOOTSCRIPT='boot-sun50i-next.cmd:boot.cmd'
|
|
GOVERNOR=ondemand
|
|
|
|
;;
|
|
esac
|
|
|
|
CPUMIN=480000
|
|
CPUMAX=1200000
|
|
|
|
uboot_custom_postprocess()
|
|
{
|
|
if [[ $BRANCH == default ]]; then
|
|
dtc -I dts -O dtb -o dt.dtb $SRC/packages/blobs/sunxi/a64/${BOARD}.dts
|
|
tools/boot0img -B $SRC/packages/blobs/sunxi/a64/boot0-${BOARD}.bin -s $SRC/packages/blobs/sunxi/a64/scp.bin \
|
|
-d bl31.bin -u u-boot.bin -e -F dt.dtb -o u-boot-with-dtb.bin
|
|
fi
|
|
}
|
|
|
|
family_tweaks_s()
|
|
{
|
|
if [[ $BRANCH == default ]]; then
|
|
# Wi-Fi: mask 2nd interface, disabled powermanagement
|
|
echo -e "options 8723bs if2name=p2p0 rtw_power_mgnt=0\noptions 8723cs if2name=p2p0 rtw_power_mgnt=0" \
|
|
> $SDCARD/etc/modprobe.d/wifi-rt8723-pine64.conf
|
|
mkdir -p $SDCARD/boot/bat
|
|
if [[ $BOARD == pinebook-a64 ]]; then
|
|
cp -R $SRC/packages/blobs/pinebook/* $SDCARD/boot/
|
|
# enable services installed from BSP
|
|
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable pinebook-bluetooth.service pinebook-enable-sound.service \
|
|
pinebook-store-sound-on-suspend.service pinebook-restore-sound-after-resume.service >/dev/null 2>&1"
|
|
fi
|
|
if [[ $BOARD == lime-a64 ]]; then
|
|
# enable services installed from BSP
|
|
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable pinebook-bluetooth.service >/dev/null 2>&1"
|
|
fi
|
|
fi
|
|
# power manager
|
|
[[ $BUILD_DESKTOP == yes && $BOARD == pinebook-a64 ]] && chroot $SDCARD /bin/bash -c "apt-get -qq -y install xfce4-power-manager bluetooth >/dev/null 2>&1"
|
|
}
|
|
|
|
family_tweaks_bsp()
|
|
{
|
|
if [[ $BRANCH == default && $BOARD == pinebook-a64 ]]; then
|
|
# Bluetooth
|
|
install -m 755 $SRC/packages/bsp/pinebook/rtk_hciattach $destination/usr/bin
|
|
cp $SRC/packages/bsp/pinebook/pinebook-bluetooth.service $destination/lib/systemd/system/
|
|
# sound/serial console switch on some Pinebook revisions
|
|
cp $SRC/packages/bsp/pinebook/pinebook-enable-sound.service $destination/lib/systemd/system/
|
|
# suspend resume audio fix for Pinebook
|
|
cp $SRC/packages/bsp/pinebook/pinebook-store-sound-on-suspend.service $destination/lib/systemd/system/
|
|
cp $SRC/packages/bsp/pinebook/pinebook-restore-sound-after-resume.service $destination/lib/systemd/system/
|
|
cp $SRC/packages/bsp/pinebook/50-pine64-pinebook-touchpad.conf $destination/etc/X11/xorg.conf.d/50-pine64-pinebook-touchpad.conf
|
|
fi
|
|
|
|
if [[ $BRANCH == default && $BOARD == lime-a64 ]]; then
|
|
# Bluetooth
|
|
install -m 755 $SRC/packages/bsp/lime-a64/rtk_hciattach $destination/usr/bin
|
|
cp $SRC/packages/bsp/lime-a64/lime-a64-bluetooth.service $destination/lib/systemd/system/
|
|
cp $SRC/packages/bsp/lime-a64/02-lime-a64-hdmi-fbdev.conf $destination/etc/X11/xorg.conf.d/
|
|
fi
|
|
}
|