armbian-build/config/sources/sun8i.conf
zador-blood-stained 1949c0b6da Move debootstrap and packaging directories to a temp directory
This avoids errors with filesystem features and permissions when output
directory is shared in Virtualbox (i.e. when using Vagrant)
2017-08-01 12:26:10 +03:00

53 lines
1.5 KiB
Plaintext

source "${BASH_SOURCE%/*}/sunxi_common.inc"
[[ -z $OVERLAY_PREFIX ]] && OVERLAY_PREFIX='sun8i-h3'
case $BRANCH in
default)
BOOTENV_FILE='sun8i-default.txt'
KERNELSOURCE='https://github.com/igorpecovnik/linux'
KERNELBRANCH='branch:sun8i'
KERNELDIR='linux-sun8i'
ASOUND_STATE='asound.state.sun8i-default'
;;
dev)
KERNELSOURCE='https://github.com/megous/linux/'
KERNELBRANCH='branch:orange-pi-4.11'
KERNELDIR='linux-sun8i-mainline'
GOVERNOR=ondemand
ASOUND_STATE='asound.state.sun8i-dev'
;;
esac
[[ -z $CPUMIN ]] && CPUMIN=480000
[[ -z $CPUMAX ]] && CPUMAX=1010000
family_tweaks()
{
# this is for legacy kernel only
sed -e 's/DEVICE=""/DEVICE="\/dev\/lirc0"/g' -i $SDCARD/etc/lirc/hardware.conf
sed -e 's/MODULES=""/MODULES="sunxi_cir"/g' -i $SDCARD/etc/lirc/hardware.conf
sed -e 's/DRIVER="UNCONFIGURED"/DRIVER="default"/g' -i $SDCARD/etc/lirc/hardware.conf
cp $SRC/config/lirc.conf.cubietruck $SDCARD/etc/lirc/lircd.conf
# enable serial gadget on OTG port since the board doesn't have Ethernet
case ${BOARD} in
orangepilite|nanopiair|orangepizero*)
mkdir -p $SDCARD/etc/systemd/system/serial-getty@ttyGS0.service.d
if [[ $BRANCH == default ]]; then
cat <<-EOF > $SDCARD/etc/systemd/system/serial-getty@ttyGS0.service.d/10-switch-role.conf
[Service]
ExecStartPre=-/bin/sh -c "echo 2 > /sys/bus/platform/devices/sunxi_usb_udc/otg_role"
EOF
fi
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable serial-getty@ttyGS0.service > /dev/null"
echo "ttyGS0" >> $SDCARD/etc/securetty
;;
esac
}