armbian-build/config/sources/sun50iw1.conf
2017-05-21 10:07:55 +02:00

71 lines
2.1 KiB
Plaintext

source "${BASH_SOURCE%/*}/sunxi64_common.inc"
OVERLAY_PREFIX='sun50i-a64'
case $BRANCH in
default)
# for backwards compatibility
LINUXFAMILY=pine64
BOOTSOURCE='https://github.com/armbian/u-boot-pine64-legacy.git'
BOOTDIR='u-boot-pine64'
BOOTBRANCH='branch:master'
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'
#KERNELSOURCE='https://github.com/longsleep/linux-pine64.git'
#KERNELBRANCH='branch:pine64-hacks-1.2'
#KERNELDIR='linux-pine64'
KERNELSOURCE='https://github.com/ayufan-pine64/linux-pine64'
KERNELBRANCH='branch:my-hacks-1.2'
KERNELDIR='linux-pine64'
GOVERNOR=interactive
INITRD_ARCH=arm
;;
dev)
BOOTENV_FILE='sun50iw1-next.txt'
GOVERNOR=ondemand
;;
esac
CPUMIN=480000
CPUMAX=1200000
write_uboot_platform()
{
# default
[[ -f $1/u-boot-with-dtb.bin ]] && dd if=$1/u-boot-with-dtb.bin of=$2 bs=1k seek=8 conv=fsync > /dev/null 2>&1 || true
# mainline
[[ -f $1/u-boot-sunxi-with-spl.bin ]] && dd if=$1/u-boot-sunxi-with-spl.bin of=$2 bs=1k seek=8 conv=fsync > /dev/null 2>&1 || true
}
family_tweaks()
{
if [[ $BRANCH == default ]]; then
# Bluetooth
install -m 755 $SRC/lib/bin/rtk_hciattach $CACHEDIR/$SDCARD/usr/local/bin
install -m 644 $SRC/lib/scripts/services/pinebook-bluetooth.service $CACHEDIR/$SDCARD/etc/systemd/system/
chroot $CACHEDIR/$SDCARD /bin/bash -c "systemctl --no-reload enable pinebook-bluetooth.service>/dev/null 2>&1"
# 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" \
>$CACHEDIR/$SDCARD/etc/modprobe.d/wifi-rt8723-pine64.conf
# Audio -- TODO: Use unified asound.state
mkdir -p $CACHEDIR/$SDCARD/var/lib/alsa/
if [[ $BOARD == pinebook-a64 ]]; then
cp $SRC/lib/config/asound.state.pinebooka64-default $CACHEDIR/$SDCARD/var/lib/alsa/asound.state
else
cp $SRC/lib/config/asound.state.pine64-default $CACHEDIR/$SDCARD/var/lib/alsa/asound.state
fi
fi
if [[ $BRANCH == dev && $BOARD == pine64so ]]; then
echo "mmc0-broken-cd=on" >> $CACHEDIR/$SDCARD/boot/armbianEnv.txt
fi
}