mirror of
https://github.com/DrHo1y/orangepi-build.git
synced 2026-03-27 19:16:43 +07:00
orangepizero2: current: linux-5.13 support
This commit is contained in:
4
external/config/boards/orangepizero2.conf
vendored
Normal file → Executable file
4
external/config/boards/orangepizero2.conf
vendored
Normal file → Executable file
@@ -2,4 +2,6 @@
|
||||
BOARD_NAME="Orange Pi Zero 2"
|
||||
BOARDFAMILY="sun50iw9"
|
||||
BOOTCONFIG="orangepi_zero2_defconfig"
|
||||
KERNEL_TARGET="legacy"
|
||||
KERNEL_TARGET="legacy,current"
|
||||
MODULES="uwe5622_bsp_sdio sprdwl_ng sprdbt_tty"
|
||||
MODULES_BLACKLIST_LEGACY="bcmdhd"
|
||||
|
||||
1
external/config/bootscripts/boot-sun50i-next.cmd
vendored
Normal file → Executable file
1
external/config/bootscripts/boot-sun50i-next.cmd
vendored
Normal file → Executable file
@@ -5,6 +5,7 @@
|
||||
|
||||
# default values
|
||||
setenv load_addr "0x45000000"
|
||||
setenv overlay_error "false"
|
||||
setenv rootdev "/dev/mmcblk0p1"
|
||||
setenv verbosity "1"
|
||||
setenv rootfstype "ext4"
|
||||
|
||||
8134
external/config/kernel/linux-5.13-sunxi64.config
vendored
Normal file
8134
external/config/kernel/linux-5.13-sunxi64.config
vendored
Normal file
File diff suppressed because it is too large
Load Diff
4
external/config/sources/families/include/sunxi64_common.inc
vendored
Normal file → Executable file
4
external/config/sources/families/include/sunxi64_common.inc
vendored
Normal file → Executable file
@@ -32,7 +32,11 @@ write_uboot_platform()
|
||||
dd if=$1/boot0_sdcard.fex of=$2 bs=8k seek=1 conv=fsync > /dev/null 2>&1
|
||||
dd if=$1/boot_package.fex of=$2 bs=8k seek=2050 conv=fsync > /dev/null 2>&1 || true
|
||||
elif [[ -f $1/u-boot-with-dtb.bin ]]; then # legacy a64 loader
|
||||
dd if=/dev/zero of=$2 bs=1k count=1023 seek=1 status=noxfer > /dev/null 2>&1
|
||||
dd if=$1/u-boot-with-dtb.bin of=$2 bs=1k seek=8 conv=fsync > /dev/null 2>&1 || true
|
||||
elif [[ -f $1/u-boot-sunxi-with-spl.bin ]]; then
|
||||
dd if=/dev/zero of=$2 bs=1k count=1023 seek=1 status=noxfer > /dev/null 2>&1
|
||||
dd if=$1/u-boot-sunxi-with-spl.bin of=$2 bs=1k seek=8 conv=fsync > /dev/null 2>&1 || true
|
||||
else
|
||||
[[ -f $1/sunxi-spl.bin ]] && dd if=$1/sunxi-spl.bin of=$2 bs=8k seek=1 conv=fsync > /dev/null 2>&1
|
||||
[[ -f $1/u-boot.itb ]] && dd if=$1/u-boot.itb of=$2 bs=8k seek=5 conv=fsync > /dev/null 2>&1 || true
|
||||
|
||||
81
external/config/sources/families/sun50iw9.conf
vendored
Normal file → Executable file
81
external/config/sources/families/sun50iw9.conf
vendored
Normal file → Executable file
@@ -7,41 +7,55 @@ LINUXFAMILY=sun50iw9
|
||||
GOVERNOR=ondemand
|
||||
|
||||
case $BRANCH in
|
||||
|
||||
legacy)
|
||||
|
||||
KERNELBRANCH="branch:orange-pi-4.9-sun50iw9"
|
||||
KERNELPATCHDIR=${BOARDFAMILY}-${BRANCH}
|
||||
KERNELBRANCH="branch:orange-pi-4.9-sun50iw9"
|
||||
KERNELPATCHDIR=${BOARDFAMILY}-${BRANCH}
|
||||
BOOTBRANCH='branch:v2018.05-sun50iw9'
|
||||
UBOOT_TARGET_MAP=';;u-boot.bin:u-boot.fex'
|
||||
UBOOT_TARGET_MAP=";;dts/${BOARD}-u-boot.dts boot0_sdcard.fex boot_package.fex"
|
||||
UBOOT_COMPILER="arm-linux-gnueabi-"
|
||||
UBOOT_USE_GCC='> 6.0'
|
||||
BOOTENV_FILE=sun50iw9-default.txt
|
||||
BOOTSCRIPT='boot-sun50iw9.cmd:boot.cmd'
|
||||
PACK_UBOOT="yes"
|
||||
OFFSET=20
|
||||
ATFSOURCE=""
|
||||
ATF_COMPILE="no"
|
||||
INITRD_ARCH=arm
|
||||
MODULES_LEGACY="uwe5622_bsp_sdio sprdbt_tty sprdwl_ng"
|
||||
ASOUND_STATE='asound.state.sun50iw9-legacy'
|
||||
;;
|
||||
|
||||
current)
|
||||
|
||||
OVERLAY_PREFIX='sun50i-h616'
|
||||
ATFSOURCE='https://github.com/ARM-software/arm-trusted-firmware'
|
||||
ATFBRANCH='branch:master'
|
||||
ATF_PLAT="sun50i_h616";
|
||||
ATF_TARGET_MAP='PLAT=sun50i_h616 DEBUG=1 bl31;;build/sun50i_h616/debug/bl31.bin'
|
||||
UBOOT_TARGET_MAP=';;u-boot-sunxi-with-spl.bin'
|
||||
BOOTBRANCH='branch:v2021.07-sunxi'
|
||||
BOOTSCRIPT='boot-sun50i-next.cmd:boot.cmd'
|
||||
KERNELBRANCH='branch:orange-pi-5.13-sunxi64'
|
||||
LINUXCONFIG='linux-5.13-sunxi64'
|
||||
ASOUND_STATE='asound.state.sun50iw9-current'
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
family_tweaks_s()
|
||||
{
|
||||
if [[ -f $SDCARD/lib/systemd/system/aw859a-bluetooth.service ]]; then
|
||||
|
||||
# install and enable Bluetooth
|
||||
chroot $SDCARD /bin/bash -c "apt-get -y -qq install rfkill bluetooth bluez bluez-tools" >/dev/null 2>&1
|
||||
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable aw859a-bluetooth.service >/dev/null 2>&1"
|
||||
if [[ $BOARD == orangepizero2 ]]; then
|
||||
|
||||
chroot $SDCARD /bin/bash -c "apt-get -y -qq install rfkill bluetooth bluez bluez-tools" >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [[ -f $SDCARD/lib/systemd/system/hdmi-audio.service ]]; then
|
||||
|
||||
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable hdmi-audio.service >/dev/null 2>&1"
|
||||
chroot $SDCARD /bin/bash -c "systemctl --no-reload enable hdmi-audio.service >/dev/null 2>&1"
|
||||
fi
|
||||
|
||||
if [[ ${BUILD_DESKTOP} == yes ]]; then
|
||||
if [[ ${BRANCH} == legacy && ${BUILD_DESKTOP} == yes ]]; then
|
||||
|
||||
cp ${EXTER}/packages/blobs/sunxi/h616/pulseaudio/default.pa-${BOARD} ${SDCARD}/etc/pulse/default.pa
|
||||
cp ${EXTER}/packages/blobs/sunxi/h616/pulseaudio/default.conf ${SDCARD}/usr/share/pulseaudio/alsa-mixer/profile-sets/
|
||||
@@ -51,14 +65,49 @@ family_tweaks_s()
|
||||
family_tweaks_bsp()
|
||||
{
|
||||
|
||||
if [[ $BOARD == orangepizero2 ]]; then
|
||||
install -m 755 $EXTER/packages/blobs/bt/hciattach/hciattach_opi_$ARCH $destination/usr/bin/hciattach_opi
|
||||
|
||||
install -m 755 $EXTER/packages/blobs/bt/hciattach/hciattach_opi_$ARCH $destination/usr/bin/hciattach_opi
|
||||
cp $EXTER/packages/bsp/sunxi/aw859a-bluetooth.service $destination/lib/systemd/system/
|
||||
if [[ ${BRANCH} == legacy ]]; then
|
||||
|
||||
install -m 755 $EXTER/packages/blobs/sunxi/h616/inithdmiaudio $destination/usr/bin/
|
||||
cp $EXTER/packages/blobs/sunxi/h616/libtinyalsa.so $destination/usr/lib/
|
||||
cp $EXTER/packages/bsp/sunxi/hdmi-audio.service $destination/lib/systemd/system/
|
||||
|
||||
cp $EXTER/packages/bsp/sunxi/hdmi-audio.service $destination/lib/systemd/system/
|
||||
fi
|
||||
}
|
||||
|
||||
uboot_custom_postprocess()
|
||||
{
|
||||
|
||||
if [[ ${BRANCH} == legacy ]]; then
|
||||
|
||||
export PATH=${EXTER}/packages/pack-uboot/${BOARDFAMILY}/tools/:$PATH
|
||||
cp ${EXTER}/packages/pack-uboot/${BOARDFAMILY}/bin/* . -r
|
||||
cp sys_config/sys_config_${BOARD}.fex sys_config.fex
|
||||
cp u-boot.bin u-boot.fex
|
||||
|
||||
# make u-boot dtb
|
||||
$EXTER/packages/pack-uboot/${BOARDFAMILY}/tools/dtc -p 2048 -W no-unit_address_vs_reg -@ -O dtb -o ${BOARD}-u-boot.dtb -b 0 dts/${BOARD}-u-boot.dts >/dev/null 2>&1
|
||||
|
||||
busybox unix2dos sys_config.fex
|
||||
$EXTER/packages/pack-uboot/${BOARDFAMILY}/tools/script sys_config.fex >/dev/null 2>&1
|
||||
cp ${BOARD}-u-boot.dtb sunxi.fex
|
||||
$EXTER/packages/pack-uboot/${BOARDFAMILY}/tools/update_dtb sunxi.fex 4096 >/dev/null 2>&1
|
||||
$EXTER/packages/pack-uboot/${BOARDFAMILY}/tools/update_boot0 boot0_sdcard.fex sys_config.bin SDMMC_CARD >/dev/null 2>&1
|
||||
|
||||
$EXTER/packages/pack-uboot/${BOARDFAMILY}/tools/update_uboot -no_merge u-boot.fex sys_config.bin >/dev/null 2>&1
|
||||
update_uboot -no_merge u-boot.bin sys_config.bin >/dev/null 2>&1
|
||||
|
||||
#pack boot package
|
||||
busybox unix2dos boot_package.cfg
|
||||
$EXTER/packages/pack-uboot/${BOARDFAMILY}/tools/dragonsecboot -pack boot_package.cfg >/dev/null 2>&1
|
||||
|
||||
if [[ ${MERGE_UBOOT} == yes ]]; then
|
||||
|
||||
display_alert "Merge u-boot" "u-boot-${BOARD}-merged.bin" "info"
|
||||
dd if=/dev/zero of=u-boot-${BOARD}-merged.bin bs=1M count=20 > /dev/null 2>&1
|
||||
dd if=boot0_sdcard.fex of=u-boot-${BOARD}-merged.bin bs=8k seek=1 conv=fsync > /dev/null 2>&1
|
||||
dd if=boot_package.fex of=u-boot-${BOARD}-merged.bin bs=8k seek=2050 conv=fsync > /dev/null 2>&1
|
||||
mv u-boot-${BOARD}-merged.bin ${DEB_STORAGE}/u-boot/
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
104
external/packages/blobs/asound.state/asound.state.sun50iw9-current
vendored
Normal file
104
external/packages/blobs/asound.state/asound.state.sun50iw9-current
vendored
Normal file
@@ -0,0 +1,104 @@
|
||||
state.Codec {
|
||||
control.1 {
|
||||
iface MIXER
|
||||
name 'digital volume'
|
||||
value 0
|
||||
comment {
|
||||
access 'read write'
|
||||
type INTEGER
|
||||
count 1
|
||||
range '0 - 63'
|
||||
dbmin -9999999
|
||||
dbmax 4121460
|
||||
dbvalue.0 -9999999
|
||||
}
|
||||
}
|
||||
control.2 {
|
||||
iface MIXER
|
||||
name 'LINEOUT volume'
|
||||
value 30
|
||||
comment {
|
||||
access 'read write'
|
||||
type INTEGER
|
||||
count 1
|
||||
range '0 - 31'
|
||||
dbmin -9999999
|
||||
dbmax 150
|
||||
dbvalue.0 0
|
||||
}
|
||||
}
|
||||
control.3 {
|
||||
iface MIXER
|
||||
name 'LINEOUT Switch'
|
||||
value true
|
||||
comment {
|
||||
access 'read write'
|
||||
type BOOLEAN
|
||||
count 1
|
||||
}
|
||||
}
|
||||
control.4 {
|
||||
iface MIXER
|
||||
name 'Left Output Mixer DACL Switch'
|
||||
value true
|
||||
comment {
|
||||
access 'read write'
|
||||
type BOOLEAN
|
||||
count 1
|
||||
}
|
||||
}
|
||||
control.5 {
|
||||
iface MIXER
|
||||
name 'Left Output Mixer DACR Switch'
|
||||
value true
|
||||
comment {
|
||||
access 'read write'
|
||||
type BOOLEAN
|
||||
count 1
|
||||
}
|
||||
}
|
||||
control.6 {
|
||||
iface MIXER
|
||||
name 'Right Output Mixer DACL Switch'
|
||||
value true
|
||||
comment {
|
||||
access 'read write'
|
||||
type BOOLEAN
|
||||
count 1
|
||||
}
|
||||
}
|
||||
control.7 {
|
||||
iface MIXER
|
||||
name 'Right Output Mixer DACR Switch'
|
||||
value true
|
||||
comment {
|
||||
access 'read write'
|
||||
type BOOLEAN
|
||||
count 1
|
||||
}
|
||||
}
|
||||
control.8 {
|
||||
iface MIXER
|
||||
name 'Left LINEOUT Mux'
|
||||
value LOMixer
|
||||
comment {
|
||||
access 'read write'
|
||||
type ENUMERATED
|
||||
count 1
|
||||
item.0 LOMixer
|
||||
item.1 LROMixer
|
||||
}
|
||||
}
|
||||
control.9 {
|
||||
iface MIXER
|
||||
name 'Right LINEOUT Mux'
|
||||
value ROMixer
|
||||
comment {
|
||||
access 'read write'
|
||||
type ENUMERATED
|
||||
count 1
|
||||
item.0 ROMixer
|
||||
item.1 LROMixer
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -85,6 +85,14 @@ prepare_board() {
|
||||
done
|
||||
fi
|
||||
|
||||
# IRQ distribution based on $BOARDFAMILY and/or $BOARD_NAME
|
||||
case ${BOARD} in
|
||||
orangepizero2)
|
||||
rfkill unblock all
|
||||
/usr/bin/hciattach_opi -n -s 1500000 /dev/ttyBT0 sprd &
|
||||
;;
|
||||
esac
|
||||
|
||||
case ${BOARDFAMILY} in
|
||||
rk3399)
|
||||
for i in $(awk -F':' '/gpu/{print $1}' </proc/interrupts | sed 's/\ //g'); do
|
||||
|
||||
@@ -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 || $BOARD == orangepizero2 ]]; then
|
||||
if [[ "${version}" =~ 2014.07|2011.09 ]]; then
|
||||
cp "${f_src}" "${SRC}/.tmp/packout/${f_dst}"
|
||||
else
|
||||
cp "${f_src}" "${SRC}/.tmp/${uboot_name}/usr/lib/${uboot_name}/${f_dst}"
|
||||
|
||||
Reference in New Issue
Block a user