mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
40 lines
1.4 KiB
Plaintext
40 lines
1.4 KiB
Plaintext
|
|
source "${BASH_SOURCE%/*}/sunxi_common.inc"
|
|
|
|
case $BRANCH in
|
|
default)
|
|
LINUXKERNEL='https://github.com/igorpecovnik/linux'
|
|
KERNELBRANCH='sun8i'
|
|
LINUXSOURCE='linux-sun8i'
|
|
;;
|
|
|
|
dev)
|
|
LINUXKERNEL='https://github.com/megous/linux'
|
|
KERNELBRANCH='orange-pi-4.6'
|
|
LINUXSOURCE='linux-sun8i-mainline'
|
|
;;
|
|
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 $CACHEDIR/sdcard/etc/lirc/hardware.conf
|
|
sed -e 's/MODULES=""/MODULES="sunxi_cir"/g' -i $CACHEDIR/sdcard/etc/lirc/hardware.conf
|
|
sed -e 's/DRIVER="UNCONFIGURED"/DRIVER="default"/g' -i $CACHEDIR/sdcard/etc/lirc/hardware.conf
|
|
cp $SRC/lib/config/lirc.conf.cubietruck $CACHEDIR/sdcard/etc/lirc/lircd.conf
|
|
|
|
# enable serial gadget on OTG port since the board doesn't have Ethernet
|
|
if [[ $BOARD == orangepilite && ( $RELEASE == jessie || $RELEASE == xenial ) ]]; then
|
|
mkdir -p $CACHEDIR/sdcard/etc/systemd/system/serial-getty@ttyGS0.service.d
|
|
cat <<-EOF > $CACHEDIR/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
|
|
chroot $CACHEDIR/sdcard /bin/bash -c "systemctl --no-reload enable serial-getty@ttyGS0.service > /dev/null"
|
|
echo "ttyGS0" >> $CACHEDIR/sdcard/etc/securetty
|
|
fi
|
|
}
|