Files
build/config/sources/sun7i.conf
2018-05-03 09:00:16 +03:00

75 lines
2.0 KiB
Plaintext

source "${BASH_SOURCE%/*}/sunxi_common.inc"
OVERLAY_PREFIX='sun7i-a20'
case $BRANCH in
default)
KERNELSOURCE='https://github.com/linux-sunxi/linux-sunxi'
KERNELBRANCH='branch:sunxi-3.4'
KERNELDIR='linux-sunxi'
KERNEL_USE_GCC='> 5.0'
CPUMAX=1010000
;;
next)
CPUMAX=960000
ASOUND_STATE='asound.state.sunxi-next'
;;
dev)
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
KERNELBRANCH='branch:master'
KERNELDIR=$MAINLINE_KERNEL_DIR
CPUMAX=960000
;;
esac
CPUMIN=480000
family_tweaks_s()
{
if [[ $BOARD == olimex-som204-a20 ]]; then
# Enable serial login on USB-OTG
mkdir -p $SDCARD/etc/systemd/system/serial-getty@ttyGS0.service.d
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable serial-getty@ttyGS0.service > /dev/null 2>&1"
echo "ttyGS0" >> $SDCARD/etc/securetty
if [[ $BRANCH != default ]]; then
# Enable bluetooth
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable olinuxino-bluetooth.service >/dev/null 2>&1"
else
# Install touchscreen calibrator
[[ $BUILD_DESKTOP == yes ]] && chroot $SDCARD /bin/bash -c "apt-get -y -qq install xinput-calibrator >/dev/null 2>&1"
fi
fi
}
family_tweaks_bsp_s()
{
if [[ $BOARD == olimex-som204-a20 ]]; then
if [[ $BRANCH == default ]]; then
# Copy LCD ralated files
install -m 755 $SRC/packages/bsp/olinuxino/usr/sbin/devmem $destination/usr/sbin
install -m 755 $SRC/packages/bsp/olinuxino/usr/sbin/change-display $destination/usr/sbin
# Copy LCD-OLinuXino-15.6FHD service. Initially the service should be disabled
cp $SRC/packages/bsp/olinuxino/lib/systemd/system/olinuxino-lcd.service $destination/lib/systemd/system
else
# Copy bluetooth service
install -m 755 $SRC/packages/bsp/olinuxino/usr/bin/rtk_hciattach $destination/usr/bin
cp $SRC/packages/bsp/olinuxino/lib/systemd/system/olinuxino-bluetooth.service $destination/lib/systemd/system
if [[ $BRANCH == dev ]]; then
# Copy fbdev configuration
cp $SRC/packages/bsp/olinuxino/etc/X11/xorg.conf.d/02-olinuxino-hdmi-fbdev.conf $destination/etc/X11/xorg.conf.d/
fi
fi
fi
}