armbian-build/config/sources/sun8i.conf

59 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'
KERNEL_USE_GCC='> 5.0'
ASOUND_STATE='asound.state.sun8i-default'
;;
dev)
GOVERNOR=ondemand
ASOUND_STATE='asound.state.sun8i-dev'
;;
esac
[[ -z $CPUMIN ]] && CPUMIN=480000
[[ -z $CPUMAX ]] && CPUMAX=1400000
family_tweaks_s()
{
# enable serial gadget on OTG port since the board doesn't have Ethernet
case ${BOARD} in
orangepilite|nanopi*|orangepizero*|bananapim2plus)
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 2>&1"
echo "ttyGS0" >> $SDCARD/etc/securetty
;;
esac
if [[ ${BOARD} == nanopi-r1 ]]; then
# rename eth1 to wan0
echo 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",ATTR{address}=="00:00:00:00:00:00",ATTR{dev_id}=="0x0", ATTR{type}=="1",KERNEL=="eth1", NAME="wan0"' > $SDCARD/etc/udev/rules.d/70-persisetn-net.rules
fi
}
family_tweaks_bsp_s()
{
# h3disp for sun8i/3.4.x
if [[ $BRANCH == default ]]; then
install -m 755 $SRC/packages/bsp/{h3disp,h3consumption} $destination/usr/bin
fi
}