mirror of
https://github.com/DrHo1y/orangepi-build.git
synced 2026-08-30 18:33:17 +07:00
Add H2/H3 legacy branch support
This commit is contained in:
@@ -230,7 +230,7 @@ compile_uboot()
|
||||
f_dst=$(basename "${f_src}")
|
||||
fi
|
||||
[[ ! -f $f_src ]] && exit_with_error "U-boot file not found" "$(basename "${f_src}")"
|
||||
if [[ "${version}" =~ 2014.07|2011.09|2018.05 ]]; then
|
||||
if [[ "${version}" =~ 2014.07|2011.09 || $BOARD == orangepizero2 ]]; then
|
||||
cp "${f_src}" "${SRC}/.tmp/packout/${f_dst}"
|
||||
else
|
||||
cp "${f_src}" "${SRC}/.tmp/${uboot_name}/usr/lib/${uboot_name}/${f_dst}"
|
||||
|
||||
@@ -424,7 +424,7 @@ install_common()
|
||||
chroot "${SDCARD}" /bin/bash -c "systemctl daemon-reload" >> "${DEST}"/debug/install.log 2>&1
|
||||
chroot "${SDCARD}" /bin/bash -c "systemctl --no-reload enable serial-getty@${array[0]}.service" \
|
||||
>> "${DEST}"/debug/install.log 2>&1
|
||||
if [[ "${array[0]}" == "ttyGS0" && $LINUXFAMILY == sun8i && $BRANCH == default ]]; then
|
||||
if [[ "${array[0]}" == "ttyGS0" && $LINUXFAMILY == sun8i && $BRANCH == legacy ]]; then
|
||||
mkdir -p "${SDCARD}"/etc/systemd/system/serial-getty@ttyGS0.service.d
|
||||
cat <<-EOF > "${SDCARD}"/etc/systemd/system/serial-getty@ttyGS0.service.d/10-switch-role.conf
|
||||
[Service]
|
||||
|
||||
@@ -798,7 +798,8 @@ prepare_host()
|
||||
"gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.xz"
|
||||
"gcc-linaro-arm-none-eabi-4.8-2014.04_linux.tar.xz"
|
||||
"gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux.tar.xz"
|
||||
"gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabi.tar.xz"
|
||||
"gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabi.tar.xz"
|
||||
"gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf.tar.xz"
|
||||
"gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi.tar.xz"
|
||||
"gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz"
|
||||
"gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz"
|
||||
|
||||
@@ -222,7 +222,7 @@ create_board_package()
|
||||
[ ! -f "/etc/network/interfaces" ] && cp /etc/network/interfaces.default /etc/network/interfaces
|
||||
ln -sf /var/run/motd /etc/motd
|
||||
rm -f /etc/update-motd.d/00-header /etc/update-motd.d/10-help-text
|
||||
|
||||
if [ -f "/boot/bin/$BOARD.bin" ] && [ ! -f "/boot/script.bin" ]; then ln -sf bin/$BOARD.bin /boot/script.bin >/dev/null 2>&1 || cp /boot/bin/$BOARD.bin /boot/script.bin; fi
|
||||
if [ ! -f "/etc/default/orangepi-motd" ]; then
|
||||
mv /etc/default/orangepi-motd.dpkg-dist /etc/default/orangepi-motd
|
||||
fi
|
||||
@@ -279,6 +279,13 @@ create_board_package()
|
||||
# this is required for NFS boot to prevent deconfiguring the network on shutdown
|
||||
sed -i 's/#no-auto-down/no-auto-down/g' "${destination}"/etc/network/interfaces.default
|
||||
|
||||
if [[ ( $LINUXFAMILY == sun8i ) && $BRANCH == legacy ]]; then
|
||||
# add mpv config for vdpau_sunxi
|
||||
mkdir -p "${destination}"/etc/mpv/
|
||||
cp "${EXTER}"/packages/bsp/mpv/mpv_sunxi.conf "${destination}"/etc/mpv/mpv.conf
|
||||
echo "export VDPAU_OSD=1" > "${destination}"/etc/profile.d/90-vdpau.sh
|
||||
chmod 755 "${destination}"/etc/profile.d/90-vdpau.sh
|
||||
fi
|
||||
if [[ $LINUXFAMILY == sunxi* ]]; then
|
||||
# add mpv config for x11 output - slow, but it works compared to no config at all
|
||||
# TODO: Test which output driver is better with DRM
|
||||
@@ -286,6 +293,16 @@ create_board_package()
|
||||
cp "${EXTER}"/packages/bsp/mpv/mpv_mainline.conf "${destination}"/etc/mpv/mpv.conf
|
||||
fi
|
||||
|
||||
case $RELEASE in
|
||||
xenial)
|
||||
if [[ $BRANCH == legacy && $LINUXFAMILY == sun8i ]]; then
|
||||
# this is required only for old kernels
|
||||
# not needed for Stretch since there will be no Stretch images with kernels < 4.4
|
||||
mkdir -p "${destination}"/lib/systemd/system/haveged.service.d/
|
||||
cp "${EXTER}"/packages/bsp/10-no-new-privileges.conf "${destination}"/lib/systemd/system/haveged.service.d/
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
# execute $LINUXFAMILY-specific tweaks
|
||||
[[ $(type -t family_tweaks_bsp) == function ]] && family_tweaks_bsp
|
||||
|
||||
|
||||
Reference in New Issue
Block a user