Support Orange Pi 3 Plus

This commit is contained in:
orangepi-xunlong 2024-04-01 09:19:48 +08:00
parent e9165fce27
commit 94d50c2386
27 changed files with 13743 additions and 1 deletions

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,12 @@
# Amlogic S905D3 quad core 2/4GB RAM SoC eMMC GBE USB3 SPI
BOARD_NAME="Orange Pi 3 Plus"
BOARDFAMILY="meson-sm1"
BOOTCONFIG="orangepi-3-plus_defconfig"
KERNEL_TARGET="next"
SERIALCON="ttyAML0"
BOOT_LOGO="desktop"
BOOT_FDT_FILE="amlogic/meson-sm1-orangepi-3-plus.dtb"
ASOUND_STATE="asound.state.orangepi3plus"
DISTRIB_TYPE_CURRENT="bullseye bookworm jammy"
DISTRIB_TYPE_NEXT="bullseye bookworm jammy"
REVISION="1.0.0"

3
external/config/bootenv/meson.txt vendored Normal file
View File

@ -0,0 +1,3 @@
verbosity=1
console=both
debug_uart=ttyAML0

View File

@ -0,0 +1,149 @@
# DO NOT EDIT THIS FILE
#
# Please edit /boot/orangepiEnv.txt to set supported parameters
#
setenv scriptaddr "0x32000000"
setenv kernel_addr_r "0x34000000"
setenv fdt_addr_r "0x4080000"
setenv overlay_error "false"
# default values
setenv rootdev "/dev/mmcblk1p1"
setenv verbosity "1"
setenv console "both"
setenv bootlogo "false"
setenv rootfstype "ext4"
setenv docker_optimizations "on"
setenv debug_uart "ttyAML0"
# odroid c4 legacy kernel values from boot.ini
setenv dtb_loadaddr "0x1000000"
setenv k_addr "0x1100000"
setenv loadaddr "0x1B00000"
setenv initrd_loadaddr "0x4080000"
setenv display_autodetect "true"
# HDMI Mode
# Resolution Configuration
# Symbol | Resolution
# ----------------------+-------------
# "480x272p60hz" | 480x272 Progressive 60Hz
# "480x320p60hz" | 480x320 Progressive 60Hz
# "480p60hz" | 720x480 Progressive 60Hz
# "576p50hz" | 720x576 Progressive 50Hz
# "720p60hz" | 1280x720 Progressive 60Hz
# "720p50hz" | 1280x720 Progressive 50Hz
# "1080p60hz" | 1920x1080 Progressive 60Hz
# "1080p50hz" | 1920x1080 Progressive 50Hz
# "1080p30hz" | 1920x1080 Progressive 30Hz
# "1080p24hz" | 1920x1080 Progressive 24Hz
# "1080i60hz" | 1920x1080 Interlaced 60Hz
# "1080i50hz" | 1920x1080 Interlaced 50Hz
# "2160p60hz" | 3840x2160 Progressive 60Hz
# "2160p50hz" | 3840x2160 Progressive 50Hz
# "2160p30hz" | 3840x2160 Progressive 30Hz
# "2160p25hz" | 3840x2160 Progressive 25Hz
# "2160p24hz" | 3840x2160 Progressive 24Hz
# "smpte24hz" | 3840x2160 Progressive 24Hz SMPTE
# "2160p60hz420" | 3840x2160 Progressive 60Hz YCbCr 4:2:0
# "2160p50hz420" | 3840x2160 Progressive 50Hz YCbCr 4:2:0
# "640x480p60hz" | 640x480 Progressive 60Hz
# "800x480p60hz" | 800x480 Progressive 60Hz
# "800x600p60hz" | 800x600 Progressive 60Hz
# "1024x600p60hz" | 1024x600 Progressive 60Hz
# "1024x768p60hz" | 1024x768 Progressive 60Hz
# "1280x800p60hz" | 1280x800 Progressive 60Hz
# "1280x1024p60hz" | 1280x1024 Progressive 60Hz
# "1360x768p60hz" | 1360x768 Progressive 60Hz
# "1440x900p60hz" | 1440x900 Progressive 60Hz
# "1600x900p60hz" | 1600x900 Progressive 60Hz
# "1600x1200p60hz" | 1600x1200 Progressive 60Hz
# "1680x1050p60hz" | 1680x1050 Progressive 60Hz
# "1920x1200p60hz" | 1920x1200 Progressive 60Hz
# "2560x1080p60hz" | 2560x1080 Progressive 60Hz
# "2560x1440p60hz" | 2560x1440 Progressive 60Hz
# "2560x1600p60hz" | 2560x1600 Progressive 60Hz
# "3440x1440p60hz" | 3440x1440 Progressive 60Hz
setenv hdmimode "1080p60hz"
setenv monitor_onoff "false"
setenv overscan "100"
setenv sdrmode "auto"
setenv voutmode "hdmi"
setenv disablehpd "false"
setenv cec "false"
setenv disable_vu7 "true"
setenv max_freq_a55 "1908"
#setenv max_freq_a55 "2100"
setenv maxcpus "4"
# Show what uboot default fdtfile is
echo "U-boot default fdtfile: ${fdtfile}"
echo "Current variant: ${variant}"
# legacy kernel values from boot.ini
if test -e ${devtype} ${devnum} ${prefix}orangepiEnv.txt; then
load ${devtype} ${devnum} ${scriptaddr} ${prefix}orangepiEnv.txt
env import -t ${scriptaddr} ${filesize}
fi
# get PARTUUID of first partition on SD/eMMC it was loaded from
# mmc 0 is always mapped to device u-boot (2016.09+) was loaded from
if test "${devtype}" = "mmc"; then part uuid mmc ${devnum}:1 partuuid; fi
if test "${console}" = "display"; then setenv consoleargs "console=tty1"; fi
echo "Current fdtfile after orangepiEnv: ${fdtfile}"
if test "${console}" = "serial"; then setenv consoleargs "console=${debug_uart},115200"; fi
if test "${console}" = "display" || test "${console}" = "both"; then setenv consoleargs "console=${debug_uart},115200 console=tty1"; fi
if test "${console}" = "serial"; then setenv consoleargs "console=${debug_uart},115200"; fi
if test "${bootlogo}" = "true"; then
setenv consoleargs "splash plymouth.ignore-serial-consoles ${consoleargs}"
else
setenv consoleargs "splash=verbose ${consoleargs}"
fi
if test "${disable_vu7}" = "false"; then setenv usbhidquirks "usbhid.quirks=0x0eef:0x0005:0x0004"; fi
setenv bootargs "root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 coherent_pool=2M loglevel=${verbosity} ubootpart=${partuuid} libata.force=noncq usb-storage.quirks=${usbstoragequirks} ${usbhidquirks} ${extraargs} ${extraboardargs}"
if test "${docker_optimizations}" = "on"; then setenv bootargs "${bootargs} cgroup_enable=memory swapaccount=1"; fi
echo "Mainline bootargs: ${bootargs}"
load ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd
load ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image
load ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}
fdt addr ${fdt_addr_r}
fdt resize 65536
for overlay_file in ${overlays}; do
if load ${devtype} ${devnum} ${scriptaddr} ${prefix}dtb/amlogic/overlay/${overlay_prefix}-${overlay_file}.dtbo; then
echo "Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo"
fdt apply ${scriptaddr} || setenv overlay_error "true"
fi
done
for overlay_file in ${user_overlays}; do
if load ${devtype} ${devnum} ${scriptaddr} ${prefix}overlay-user/${overlay_file}.dtbo; then
echo "Applying user provided DT overlay ${overlay_file}.dtbo"
fdt apply ${scriptaddr} || setenv overlay_error "true"
fi
done
if test "${overlay_error}" = "true"; then
echo "Error applying DT overlays, restoring original DT"
load ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}
else
if load ${devtype} ${devnum} ${scriptaddr} ${prefix}dtb/amlogic/overlay/${overlay_prefix}-fixup.scr; then
echo "Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)"
source ${scriptaddr}
fi
if test -e ${devtype} ${devnum} ${prefix}fixup.scr; then
load ${devtype} ${devnum} ${scriptaddr} ${prefix}fixup.scr
echo "Applying user provided fixup script (fixup.scr)"
source ${scriptaddr}
fi
fi
booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
# Recompile with:
# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,127 @@
BOOTSCRIPT="boot-meson64.cmd:boot.cmd"
BOOTENV_FILE='meson.txt'
LINUXFAMILY=meson64
ARCH=arm64
#SERIALCON=ttyAML0
SERIALCON=ttyS0
SRC_LOADADDR='LOADADDR=0x1080000'
OVERLAY_PREFIX='meson'
# this family does not need it
ATF_COMPILE="no"
# Set CPUMIN et al if not already set in the board config.
CPUMIN=${CPUMIN:-500000}
CPUMAX=${CPUMAX:-1536000}
GOVERNOR=${GOVERNOR:-ondemand}
write_uboot_platform() {
dd if=$1/u-boot.bin of=$2 bs=1 count=442 conv=fsync >/dev/null 2>&1
dd if=$1/u-boot.bin of=$2 bs=512 skip=1 seek=1 conv=fsync >/dev/null 2>&1
}
family_tweaks_bsp() {
mkdir -p $destination/etc/udev/rules.d
mkdir -p $destination/usr/local/bin
mkdir -p "$destination"/etc/X11/xorg.conf.d
case "${BOARD}" in
"orangepi3plus")
cat <<- EOF > "$destination"/etc/X11/xorg.conf
Section "Device"
Identifier "DRM Graphics Acclerated"
## Use modesetting and glamor
Driver "modesetting"
Option "AccelMethod" "glamor" ### "glamor" to enable 3D acceleration, "none" to disable.
Option "DRI" "2"
Option "Dri2Vsync" "true"
Option "TripleBuffer" "True"
## End glamor configuration
EndSection
Section "Screen"
Identifier "Default Screen"
SubSection "Display"
Depth 24
EndSubSection
EndSection
EOF
;;
esac
}
# this helper function includes postprocess for u200 and its variants.
# $1 PATH for uboot blob repo
# $2 family g12a or g12b
uboot_g12_postprocess() {
mv -v u-boot.bin bl33.bin
$1/blx_fix.sh $1/bl30.bin \
zero_tmp \
bl30_zero.bin \
$1/bl301.bin \
bl301_zero.bin \
bl30_new.bin bl30
$1/blx_fix.sh $1/bl2.bin \
zero_tmp \
bl2_zero.bin \
$1/acs.bin \
bl21_zero.bin \
bl2_new.bin bl2
$1/aml_encrypt_$2 --bl30sig \
--input bl30_new.bin \
--output bl30_new.bin.g12.enc \
--level v3
$1/aml_encrypt_$2 --bl3sig \
--input bl30_new.bin.g12.enc \
--output bl30_new.bin.enc \
--level v3 --type bl30
$1/aml_encrypt_$2 --bl3sig \
--input $1/bl31.img \
--output bl31.img.enc \
--level v3 --type bl31
$1/aml_encrypt_$2 --bl3sig \
--input bl33.bin \
--compress lz4 \
--output bl33.bin.enc \
--level v3 --type bl33
$1/aml_encrypt_$2 --bl2sig \
--input bl2_new.bin \
--output bl2.n.bin.sig
if [ -e $1/lpddr3_1d.fw ]; then
$1/aml_encrypt_$2 --bootmk --output u-boot.bin \
--bl2 bl2.n.bin.sig \
--bl30 bl30_new.bin.enc \
--bl31 bl31.img.enc \
--bl33 bl33.bin.enc \
--ddrfw1 $1/ddr4_1d.fw \
--ddrfw2 $1/ddr4_2d.fw \
--ddrfw3 $1/ddr3_1d.fw \
--ddrfw4 $1/piei.fw \
--ddrfw5 $1/lpddr4_1d.fw \
--ddrfw6 $1/lpddr4_2d.fw \
--ddrfw7 $1/diag_lpddr4.fw \
--ddrfw8 $1/aml_ddr.fw \
--ddrfw9 $1/lpddr3_1d.fw \
--level v3
else
$1/aml_encrypt_$2 --bootmk --output u-boot.bin \
--bl2 bl2.n.bin.sig \
--bl30 bl30_new.bin.enc \
--bl31 bl31.img.enc \
--bl33 bl33.bin.enc \
--ddrfw1 $1/ddr4_1d.fw \
--ddrfw2 $1/ddr4_2d.fw \
--ddrfw3 $1/ddr3_1d.fw \
--ddrfw4 $1/piei.fw \
--ddrfw5 $1/lpddr4_1d.fw \
--ddrfw6 $1/lpddr4_2d.fw \
--ddrfw7 $1/diag_lpddr4.fw \
--ddrfw8 $1/aml_ddr.fw \
--level v3
fi
}

View File

@ -0,0 +1,179 @@
#
# SPDX-License-Identifier: GPL-2.0
#
# Copyright (c) 2013-2023 Igor Pecovnik, igor@armbian.com
#
# This file is a part of the Armbian Build Framework
# https://github.com/armbian/build/
#
source "${BASH_SOURCE%/*}/include/meson64_common.inc"
CPUMIN=667000
CPUMAX=1800000
GOVERNOR=ondemand
case $BRANCH in
#current)
# UBOOT_TARGET_MAP=";;build/u-boot.bin.sd.bin:u-boot.bin"
# BOOTPATCHDIR="v2015.01"
# BOOTBRANCH='branch:u-boot-2015.01'
# UBOOT_COMPILER="aarch64-linux-gnu-"
# UBOOT_USE_GCC='< 5.0'
# UBOOT_TOOLCHAIN2='arm-none-eabi-:5.0'
# KERNELBRANCH='branch:orange-pi-5.15-s905d3'
# KERNELPATCHDIR='rockchip-rk3588-legacy'
# LINUXCONFIG="linux-5.15-s905d3-current"
# KERNEL_USE_GCC='> 10.0'
# BOOT_FDT_FILE="meson-sm1-orangepi-3-plus.dtb"
# ;;
next)
UBOOT_TARGET_MAP="u-boot-dtb.img;;u-boot.bin.sd.bin:u-boot.bin u-boot-dtb.img u-boot-spi.bin:u-boot-spi.bin"
BOOTPATCHDIR="v2023.07-meson64"
BOOTBRANCH='branch:v2023.07-meson64'
KERNELBRANCH='branch:orange-pi-6.1-meson64'
LINUXCONFIG="linux-6.1-meson64-next"
#KERNELBRANCH='branch:orange-pi-6.5-meson64'
#LINUXCONFIG="linux-6.5-meson64-next"
KERNELPATCHDIR='meson64-next'
KERNEL_USE_GCC='> 10.0'
ASOUND_STATE='asound.state.orangepi3plus-next'
;;
esac
write_uboot_platform_mtd() {
dd if=$1/u-boot-spi.bin of=/dev/mtdblock0
}
family_tweaks() {
#if [[ ${BRANCH} == current ]]; then
# sed -i 's/^debug_uart.*/debug_uart=ttyS0/' "${SDCARD}"/boot/orangepiEnv.txt
# SERIALCON="ttyS0"
#fi
install_wiringop
rsync -a --chown=root:root --exclude=etc/pulse "${EXTER}"/packages/bsp/overlays_s905d3/* ${SDCARD}/
chroot $SDCARD /bin/bash -c "apt-get -y -qq install usb-modeswitch tree dnsmasq v4l-utils swig python3-dev python3-setuptools bluez libncurses-dev" >> "${DEST}"/${LOG_SUBPATH}/install.log 2>&1
#install_docker
#install_balenaEtcher
}
uboot_custom_postprocess() {
cd "${BOOTSOURCEDIR}"
if [[ ${BOARD} == orangepi3plus && ${BRANCH} == next ]]; then
# Preserve the u-boot produced (unsigned) u-boot.bin
cp -v u-boot.bin u-boot.bin.orig
# Sign using the old FIP blobs (amlogic-boot-fip-vim3-spi), for use exclusively with SPI booting.
display_alert "Signing u-boot for SPI booting with old blobs" "${BOARD}" "info"
uboot_g12_postprocess "${EXTER}"/cache/sources/amlogic-boot-fip-spi/${BOARD} g12a
# Once done, store the resulting u-boot.bin as u-boot-spi.bin referenced in the UBOOT_TARGET_MAP above.
cp -v u-boot.bin u-boot-spi.bin
# Restore the original, so we can do everything again.
cp -v u-boot.bin.orig u-boot.bin
# Do the normal signing, using the regular/updated FIP blobs. This is for eMMC booting.
display_alert "Signing u-boot for eMMC/SD booting with new blobs" "${BOARD}" "info"
uboot_g12_postprocess "${EXTER}"/cache/sources/amlogic-boot-fip/${BOARD} g12a
display_alert "Done postprocessing u-boot with new/old FIP blobs" "${BOARD}" "info"
fi
#if [[ ${BOARD} == orangepi3plus && ${BRANCH} == current ]]; then
# UBOOT_SRC_FOLDER="${BOOTSOURCEDIR}"
# source fip/variables.sh "${BOOTSOURCEDIR}"
# source fip/lib.sh
# source fip/build_bl2.sh
# source fip/build_bl30.sh
# source fip/build_bl31.sh
# source fip/build_bl32.sh
# source fip/build_bl33.sh
# source fip/build_bl40.sh
# # Cleanup old binaries
# rm -rf ${FIP_BUILD_FOLDER}
# # source uboot pre-build configs
# source ${SOURCE_FILE}
# CUR_SOC=${CONFIG_SYS_SOC}
# if [ "y" == "${CONFIG_NEED_BL32}" ]; then
# BLX_NEEDFUL[3]="true"
# fi
# export_variables
# source ${FIP_FOLDER}${CUR_SOC}/variable_soc.sh
# # compile fip tools for ddr_parse and map_tool
# prepare_tools > /dev/null 2>&1 || true
# # source soc package script
# source ${FIP_FOLDER}${CUR_SOC}/build.sh
# # source configs
# source ${CONFIG_FILE}
# if [ "y" == "${CONFIG_SUPPORT_CUSOTMER_BOARD}" ]; then
# BOARD_DIR="customer/board/${CONFIG_SYS_BOARD}"
# else
# BOARD_DIR="${CONFIG_BOARDDIR}"
# fi
# mkdir -p ${FIP_BUILD_FOLDER}
# cp ${FIP_FOLDER}${CUR_SOC}/bl2.bin $FIP_BUILD_FOLDER
# cp ${FIP_FOLDER}${CUR_SOC}/bl30.bin $FIP_BUILD_FOLDER
# cp ${FIP_FOLDER}${CUR_SOC}/bl31.bin $FIP_BUILD_FOLDER
# cp ${FIP_FOLDER}${CUR_SOC}/bl31.img $FIP_BUILD_FOLDER
# #cp ${FIP_FOLDER}${CUR_SOC}/bl32.bin $FIP_BUILD_FOLDER
# # cp bl33(uboot)
# copy_bl33
# # cp other firmwares(soc related)
# copy_other_soc
# # package final bootloader
# package
# if [ "y" != "${CONFIG_AML_SIGNED_UBOOT}" ]; then
# # copy bootloader to main folder
# mkdir -p ${BUILD_FOLDER}
# cp ${FIP_BUILD_FOLDER}u-boot.bin ${BUILD_FOLDER}u-boot.bin
# cp ${FIP_BUILD_FOLDER}u-boot.bin.encrypt ${BUILD_FOLDER}u-boot.bin.encrypt
# cp ${FIP_BUILD_FOLDER}u-boot.bin.encrypt.efuse ${BUILD_FOLDER}u-boot.bin.encrypt.efuse
# cp ${FIP_BUILD_FOLDER}u-boot.bin.encrypt.sd.bin ${BUILD_FOLDER}u-boot.bin.encrypt.sd.bin
# cp ${FIP_BUILD_FOLDER}u-boot.bin.encrypt.usb.bl2 ${BUILD_FOLDER}u-boot.bin.encrypt.usb.bl2
# cp ${FIP_BUILD_FOLDER}u-boot.bin.encrypt.usb.tpl ${BUILD_FOLDER}u-boot.bin.encrypt.usb.tpl
# cp ${FIP_BUILD_FOLDER}u-boot.bin.sd.bin ${BUILD_FOLDER}u-boot.bin.sd.bin
# cp ${FIP_BUILD_FOLDER}u-boot.bin.usb.bl2 ${BUILD_FOLDER}u-boot.bin.usb.bl2
# cp ${FIP_BUILD_FOLDER}u-boot.bin.usb.tpl ${BUILD_FOLDER}u-boot.bin.usb.tpl
# if [ "y" == "${CONFIG_AML_CRYPTO_IMG}" ]; then
# cp ${FIP_BUILD_FOLDER}boot.img.encrypt ${BUILD_FOLDER}boot.img.encrypt
# fi
# fi
#fi
}

View File

@ -0,0 +1,781 @@
state.OPI3Plus {
control.1 {
iface MIXER
name 'TOACODEC Lane Select'
value 0
comment {
access 'read write'
type INTEGER
count 1
range '0 - 3'
}
}
control.2 {
iface MIXER
name 'ACODEC Playback Channel Mode'
value Stereo
comment {
access 'read write'
type ENUMERATED
count 1
item.0 Stereo
item.1 Mono
}
}
control.3 {
iface MIXER
name 'ACODEC Playback Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.4 {
iface MIXER
name 'ACODEC Playback Volume'
value.0 255
value.1 255
comment {
access 'read write'
type INTEGER
count 2
range '0 - 255'
dbmin -9999999
dbmax 0
dbvalue.0 0
dbvalue.1 0
}
}
control.5 {
iface MIXER
name 'ACODEC Ramp Rate'
value Fast
comment {
access 'read write'
type ENUMERATED
count 1
item.0 Fast
item.1 Slow
}
}
control.6 {
iface MIXER
name 'ACODEC Volume Ramp Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.7 {
iface MIXER
name 'ACODEC Mute Ramp Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.8 {
iface MIXER
name 'ACODEC Unmute Ramp Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.9 {
iface MIXER
name 'TDMOUT_C Lane 0 Volume'
value.0 0
value.1 0
comment {
access 'read write'
type INTEGER
count 2
range '0 - 255'
}
}
control.10 {
iface MIXER
name 'TDMOUT_C Lane 1 Volume'
value.0 0
value.1 0
comment {
access 'read write'
type INTEGER
count 2
range '0 - 255'
}
}
control.11 {
iface MIXER
name 'TDMOUT_C Lane 2 Volume'
value.0 0
value.1 0
comment {
access 'read write'
type INTEGER
count 2
range '0 - 255'
}
}
control.12 {
iface MIXER
name 'TDMOUT_C Lane 3 Volume'
value.0 0
value.1 0
comment {
access 'read write'
type INTEGER
count 2
range '0 - 255'
}
}
control.13 {
iface MIXER
name 'TDMOUT_C Gain Enable Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.14 {
iface MIXER
name 'TDMOUT_B Lane 0 Volume'
value.0 0
value.1 0
comment {
access 'read write'
type INTEGER
count 2
range '0 - 255'
}
}
control.15 {
iface MIXER
name 'TDMOUT_B Lane 1 Volume'
value.0 0
value.1 0
comment {
access 'read write'
type INTEGER
count 2
range '0 - 255'
}
}
control.16 {
iface MIXER
name 'TDMOUT_B Lane 2 Volume'
value.0 0
value.1 0
comment {
access 'read write'
type INTEGER
count 2
range '0 - 255'
}
}
control.17 {
iface MIXER
name 'TDMOUT_B Lane 3 Volume'
value.0 0
value.1 0
comment {
access 'read write'
type INTEGER
count 2
range '0 - 255'
}
}
control.18 {
iface MIXER
name 'TDMOUT_B Gain Enable Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.19 {
iface PCM
device 10
name 'Playback Channel Map'
value.0 0
value.1 0
value.2 0
value.3 0
value.4 0
value.5 0
value.6 0
value.7 0
comment {
access read
type INTEGER
count 8
range '0 - 36'
}
}
control.20 {
iface PCM
device 10
name 'IEC958 Playback Mask'
value ffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
comment {
access read
type IEC958
count 1
}
}
control.21 {
iface PCM
device 10
name 'IEC958 Playback Default'
value '0400000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
comment {
access 'read write'
type IEC958
count 1
}
}
control.22 {
iface PCM
device 10
name ELD
value '100008006a10000100000000000000004a84601541534d2d313536464354097f070000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
comment {
access 'read volatile'
type BYTES
count 128
}
}
control.23 {
iface MIXER
name 'FRDDR_A SRC 1 EN Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.24 {
iface MIXER
name 'FRDDR_A SRC 2 EN Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.25 {
iface MIXER
name 'FRDDR_A SRC 3 EN Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.26 {
iface MIXER
name 'FRDDR_A SINK 1 SEL'
value 'OUT 1'
comment {
access 'read write'
type ENUMERATED
count 1
item.0 'OUT 0'
item.1 'OUT 1'
item.2 'OUT 2'
item.3 'OUT 3'
item.4 'OUT 4'
item.5 'OUT 5'
item.6 'OUT 6'
item.7 'OUT 7'
}
}
control.27 {
iface MIXER
name 'FRDDR_A SINK 2 SEL'
value 'OUT 1'
comment {
access 'read write'
type ENUMERATED
count 1
item.0 'OUT 0'
item.1 'OUT 1'
item.2 'OUT 2'
item.3 'OUT 3'
item.4 'OUT 4'
item.5 'OUT 5'
item.6 'OUT 6'
item.7 'OUT 7'
}
}
control.28 {
iface MIXER
name 'FRDDR_A SINK 3 SEL'
value 'OUT 1'
comment {
access 'read write'
type ENUMERATED
count 1
item.0 'OUT 0'
item.1 'OUT 1'
item.2 'OUT 2'
item.3 'OUT 3'
item.4 'OUT 4'
item.5 'OUT 5'
item.6 'OUT 6'
item.7 'OUT 7'
}
}
control.29 {
iface MIXER
name 'FRDDR_B SRC 1 EN Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.30 {
iface MIXER
name 'FRDDR_B SRC 2 EN Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.31 {
iface MIXER
name 'FRDDR_B SRC 3 EN Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.32 {
iface MIXER
name 'FRDDR_B SINK 1 SEL'
value 'OUT 1'
comment {
access 'read write'
type ENUMERATED
count 1
item.0 'OUT 0'
item.1 'OUT 1'
item.2 'OUT 2'
item.3 'OUT 3'
item.4 'OUT 4'
item.5 'OUT 5'
item.6 'OUT 6'
item.7 'OUT 7'
}
}
control.33 {
iface MIXER
name 'FRDDR_B SINK 2 SEL'
value 'OUT 1'
comment {
access 'read write'
type ENUMERATED
count 1
item.0 'OUT 0'
item.1 'OUT 1'
item.2 'OUT 2'
item.3 'OUT 3'
item.4 'OUT 4'
item.5 'OUT 5'
item.6 'OUT 6'
item.7 'OUT 7'
}
}
control.34 {
iface MIXER
name 'FRDDR_B SINK 3 SEL'
value 'OUT 1'
comment {
access 'read write'
type ENUMERATED
count 1
item.0 'OUT 0'
item.1 'OUT 1'
item.2 'OUT 2'
item.3 'OUT 3'
item.4 'OUT 4'
item.5 'OUT 5'
item.6 'OUT 6'
item.7 'OUT 7'
}
}
control.35 {
iface MIXER
name 'FRDDR_C SRC 1 EN Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.36 {
iface MIXER
name 'FRDDR_C SRC 2 EN Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.37 {
iface MIXER
name 'FRDDR_C SRC 3 EN Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.38 {
iface MIXER
name 'FRDDR_C SINK 1 SEL'
value 'OUT 1'
comment {
access 'read write'
type ENUMERATED
count 1
item.0 'OUT 0'
item.1 'OUT 1'
item.2 'OUT 2'
item.3 'OUT 3'
item.4 'OUT 4'
item.5 'OUT 5'
item.6 'OUT 6'
item.7 'OUT 7'
}
}
control.39 {
iface MIXER
name 'FRDDR_C SINK 2 SEL'
value 'OUT 1'
comment {
access 'read write'
type ENUMERATED
count 1
item.0 'OUT 0'
item.1 'OUT 1'
item.2 'OUT 2'
item.3 'OUT 3'
item.4 'OUT 4'
item.5 'OUT 5'
item.6 'OUT 6'
item.7 'OUT 7'
}
}
control.40 {
iface MIXER
name 'FRDDR_C SINK 3 SEL'
value 'OUT 1'
comment {
access 'read write'
type ENUMERATED
count 1
item.0 'OUT 0'
item.1 'OUT 1'
item.2 'OUT 2'
item.3 'OUT 3'
item.4 'OUT 4'
item.5 'OUT 5'
item.6 'OUT 6'
item.7 'OUT 7'
}
}
control.41 {
iface MIXER
name 'TODDR_A SRC SEL'
value 'IN 0'
comment {
access 'read write'
type ENUMERATED
count 1
item.0 'IN 0'
item.1 'IN 1'
item.2 'IN 2'
item.3 'IN 3'
item.4 'IN 4'
item.5 'IN 5'
item.6 'IN 6'
item.7 'IN 7'
item.8 'IN 8'
item.9 'IN 9'
item.10 'IN 10'
item.11 'IN 11'
item.12 'IN 12'
item.13 'IN 13'
item.14 'IN 14'
item.15 'IN 15'
}
}
control.42 {
iface MIXER
name 'TODDR_B SRC SEL'
value 'IN 0'
comment {
access 'read write'
type ENUMERATED
count 1
item.0 'IN 0'
item.1 'IN 1'
item.2 'IN 2'
item.3 'IN 3'
item.4 'IN 4'
item.5 'IN 5'
item.6 'IN 6'
item.7 'IN 7'
item.8 'IN 8'
item.9 'IN 9'
item.10 'IN 10'
item.11 'IN 11'
item.12 'IN 12'
item.13 'IN 13'
item.14 'IN 14'
item.15 'IN 15'
}
}
control.43 {
iface MIXER
name 'TODDR_C SRC SEL'
value 'IN 0'
comment {
access 'read write'
type ENUMERATED
count 1
item.0 'IN 0'
item.1 'IN 1'
item.2 'IN 2'
item.3 'IN 3'
item.4 'IN 4'
item.5 'IN 5'
item.6 'IN 6'
item.7 'IN 7'
item.8 'IN 8'
item.9 'IN 9'
item.10 'IN 10'
item.11 'IN 11'
item.12 'IN 12'
item.13 'IN 13'
item.14 'IN 14'
item.15 'IN 15'
}
}
control.44 {
iface MIXER
name 'TOHDMITX I2S SRC'
value 'I2S B'
comment {
access 'read write'
type ENUMERATED
count 1
item.0 'I2S A'
item.1 'I2S B'
item.2 'I2S C'
}
}
control.45 {
iface MIXER
name 'TOHDMITX Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.46 {
iface MIXER
name 'TOHDMITX SPDIF SRC'
value 'SPDIF A'
comment {
access 'read write'
type ENUMERATED
count 1
item.0 'SPDIF A'
item.1 'SPDIF B'
}
}
control.47 {
iface MIXER
name 'TOACODEC SRC'
value 'I2S B'
comment {
access 'read write'
type ENUMERATED
count 1
item.0 'I2S A'
item.1 'I2S B'
item.2 'I2S C'
}
}
control.48 {
iface MIXER
name 'TOACODEC OUT EN Switch'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.49 {
iface MIXER
name 'ACODEC Right DAC Sel'
value Right
comment {
access 'read write'
type ENUMERATED
count 1
item.0 Right
item.1 Left
}
}
control.50 {
iface MIXER
name 'ACODEC Left DAC Sel'
value Left
comment {
access 'read write'
type ENUMERATED
count 1
item.0 Left
item.1 Right
}
}
control.51 {
iface MIXER
name 'TDMIN_C SRC SEL'
value 'IN 0'
comment {
access 'read write'
type ENUMERATED
count 1
item.0 'IN 0'
item.1 'IN 1'
item.2 'IN 2'
item.3 'IN 3'
item.4 'IN 4'
item.5 'IN 5'
item.6 'IN 6'
item.7 'IN 7'
item.8 'IN 8'
item.9 'IN 9'
item.10 'IN 10'
item.11 'IN 11'
item.12 'IN 12'
item.13 'IN 13'
item.14 'IN 14'
item.15 'IN 15'
}
}
control.52 {
iface MIXER
name 'TDMIN_B SRC SEL'
value 'IN 0'
comment {
access 'read write'
type ENUMERATED
count 1
item.0 'IN 0'
item.1 'IN 1'
item.2 'IN 2'
item.3 'IN 3'
item.4 'IN 4'
item.5 'IN 5'
item.6 'IN 6'
item.7 'IN 7'
item.8 'IN 8'
item.9 'IN 9'
item.10 'IN 10'
item.11 'IN 11'
item.12 'IN 12'
item.13 'IN 13'
item.14 'IN 14'
item.15 'IN 15'
}
}
control.53 {
iface MIXER
name 'TDMIN_A SRC SEL'
value 'IN 0'
comment {
access 'read write'
type ENUMERATED
count 1
item.0 'IN 0'
item.1 'IN 1'
item.2 'IN 2'
item.3 'IN 3'
item.4 'IN 4'
item.5 'IN 5'
item.6 'IN 6'
item.7 'IN 7'
item.8 'IN 8'
item.9 'IN 9'
item.10 'IN 10'
item.11 'IN 11'
item.12 'IN 12'
item.13 'IN 13'
item.14 'IN 14'
item.15 'IN 15'
}
}
control.54 {
iface MIXER
name 'TDMOUT_C SRC SEL'
value 'IN 0'
comment {
access 'read write'
type ENUMERATED
count 1
item.0 'IN 0'
item.1 'IN 1'
item.2 'IN 2'
item.3 'IN 3'
item.4 'IN 4'
}
}
control.55 {
iface MIXER
name 'TDMOUT_B SRC SEL'
value 'IN 0'
comment {
access 'read write'
type ENUMERATED
count 1
item.0 'IN 0'
item.1 'IN 1'
item.2 'IN 2'
item.3 'IN 3'
item.4 'IN 4'
}
}
}

View File

@ -336,6 +336,11 @@ prepare_board() {
--baudrate 1500000 --patchram /lib/firmware/BCM4345C0.hcd /dev/ttyS1 & --baudrate 1500000 --patchram /lib/firmware/BCM4345C0.hcd /dev/ttyS1 &
fi fi
;; ;;
orangepi3plus)
gpio mode 28 in
gpio mode 28 up
gpio read 28
;;
esac esac

View File

@ -0,0 +1,5 @@
{
"registry-mirrors": [
"https://docker.mirrors.ustc.edu.cn"
]
}

View File

@ -0,0 +1,29 @@
#!/bin/bash
if [[ -z $1 ]]; then
user=root
else
user=$1
fi
[[ -d /lib/systemd/system/getty@.service.d/ ]] && rm /lib/systemd/system/getty@.service.d/ -rf
[[ -f /lib/systemd/system/serial-getty@.service.d/override.conf ]] && rm /lib/systemd/system/serial-getty@.service.d/override.conf -f
[[ -d /etc/systemd/system/getty@.service.d/ ]] && rm /etc/systemd/system/getty@.service.d/ -rf
[[ -f /etc/systemd/system/serial-getty@.service.d/override.conf ]] && rm /etc/systemd/system/serial-getty@.service.d/override.conf -f
if [[ $1 == "-d" ]]; then
exit
fi
mkdir -p /etc/systemd/system/getty@.service.d/
mkdir -p /etc/systemd/system/serial-getty@.service.d/
cat <<-EOF > \
/etc/systemd/system/serial-getty@.service.d/override.conf
[Service]
ExecStartPre=/bin/sh -c 'exec /bin/sleep 10'
ExecStart=
ExecStart=-/sbin/agetty --noissue --autologin ${user} %I \$TERM
Type=idle
EOF
cp /etc/systemd/system/serial-getty@.service.d/override.conf \
/etc/systemd/system/getty@.service.d/override.conf

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,11 @@
#!/bin/bash
if [[ -z $1 ]]; then
user=root
else
user=$1
fi
sudo sed -i '/autologin-user=/d' /etc/lightdm/lightdm.conf.d/22-orangepi-autologin.conf
sudo echo autologin-user=${user} >> /etc/lightdm/lightdm.conf.d/22-orangepi-autologin.conf
sudo sed -i 's/root/anything/' /etc/pam.d/lightdm-autologin

View File

@ -0,0 +1,5 @@
#!/bin/bash
sudo sed -i \
"s/autologin-user=.*/#&/" \
/etc/lightdm/lightdm.conf.d/22-orangepi-autologin.conf

View File

@ -0,0 +1,8 @@
#!/bin/bash
if [[ $(uname -r) == 5.4.* ]]; then
echo 1 | sudo update-alternatives --config iptables > /dev/null
fi
sudo systemctl enable docker.service
sudo systemctl start docker.service

View File

@ -0,0 +1,4 @@
#!/bin/bash
sudo rm /etc/ssh/ssh_host_*
sudo dpkg-reconfigure openssh-server

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,5 @@
[Service]
ExecStartPre=/bin/sh -c 'exec /bin/sleep 10'
ExecStart=
ExecStart=-/sbin/agetty --noissue --autologin orangepi %I $TERM
Type=idle

View File

@ -0,0 +1,5 @@
[Service]
ExecStartPre=/bin/sh -c 'exec /bin/sleep 10'
ExecStart=
ExecStart=-/sbin/agetty --noissue --autologin orangepi %I $TERM
Type=idle

View File

@ -1869,7 +1869,7 @@ show_checklist_variables ()
install_wiringop() install_wiringop()
{ {
install_deb_chroot "$EXTER/cache/debs/arm64/wiringpi_2.51.deb" install_deb_chroot "$EXTER/cache/debs/arm64/wiringpi_2.52.deb"
chroot "${SDCARD}" /bin/bash -c "apt-mark hold wiringpi" >> "${DEST}"/${LOG_SUBPATH}/install.log 2>&1 chroot "${SDCARD}" /bin/bash -c "apt-mark hold wiringpi" >> "${DEST}"/${LOG_SUBPATH}/install.log 2>&1
if [[ ${IGNORE_UPDATES} != yes ]]; then if [[ ${IGNORE_UPDATES} != yes ]]; then
@ -1881,6 +1881,8 @@ install_wiringop()
cp ${EXTER}/cache/sources/wiringOP/next ${SDCARD}/usr/src/wiringOP -rfa cp ${EXTER}/cache/sources/wiringOP/next ${SDCARD}/usr/src/wiringOP -rfa
cp ${EXTER}/cache/sources/wiringOP-Python/next ${SDCARD}/usr/src/wiringOP-Python -rfa cp ${EXTER}/cache/sources/wiringOP-Python/next ${SDCARD}/usr/src/wiringOP-Python -rfa
rm $SDCARD/root/*.deb >/dev/null 2>&1
} }
install_docker() { install_docker() {

View File

@ -244,6 +244,7 @@ if [[ -z $BOARD ]]; then
options+=("orangepicm4" "Rockchip RK3566 quad core 2-8GB RAM GBE eMMC USB3 NvMe WiFi/BT") options+=("orangepicm4" "Rockchip RK3566 quad core 2-8GB RAM GBE eMMC USB3 NvMe WiFi/BT")
options+=("orangepi3b" "Rockchip RK3566 quad core 2-8GB RAM GBE eMMC USB3 NvMe WiFi/BT") options+=("orangepi3b" "Rockchip RK3566 quad core 2-8GB RAM GBE eMMC USB3 NvMe WiFi/BT")
#options+=("orangepir1plus" "Rockchip RK3328 quad core 1GB RAM 2xGBE USB2 SPI") #options+=("orangepir1plus" "Rockchip RK3328 quad core 1GB RAM 2xGBE USB2 SPI")
#options+=("orangepi3plus" "Amlogic S905D3 quad core 2/4GB RAM SoC eMMC GBE USB3 SPI WiFi/BT")
menustr="Please choose a Board." menustr="Please choose a Board."
BOARD=$(whiptail --title "${titlestr}" --backtitle "${backtitle}" \ BOARD=$(whiptail --title "${titlestr}" --backtitle "${backtitle}" \