57 lines
1.4 KiB
Plaintext
57 lines
1.4 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)
|
|
KERNELSOURCE=$MAINLINE_KERNEL_SOURCE
|
|
KERNELBRANCH='branch:master'
|
|
KERNELDIR=$MAINLINE_KERNEL_DIR
|
|
|
|
GOVERNOR=ondemand
|
|
|
|
ASOUND_STATE='asound.state.sun8i-dev'
|
|
;;
|
|
esac
|
|
|
|
[[ -z $CPUMIN ]] && CPUMIN=480000
|
|
[[ -z $CPUMAX ]] && CPUMAX=1010000
|
|
|
|
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
|
|
}
|
|
|
|
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
|
|
}
|