Added ayn-odin2mini board config;
Fixed WITH_GRUB flag;
This commit is contained in:
parent
6d0e2575a2
commit
bb72cffe68
@ -13,9 +13,9 @@ declare -g BOARD_FIRMWARE_INSTALL="-full"
|
|||||||
declare -g DESKTOP_AUTOLOGIN="yes"
|
declare -g DESKTOP_AUTOLOGIN="yes"
|
||||||
|
|
||||||
# Check to make sure variants are supported
|
# Check to make sure variants are supported
|
||||||
declare -g VALID_BOARDS=("ayn-odin2" "ayn-odin2portal" "ayn-thor")
|
declare -g VALID_BOARDS=("ayn-odin2" "ayn-odin2portal" "ayn-odin2mini" "ayn-thor")
|
||||||
|
|
||||||
declare -g WITH_GRUB="no"
|
declare -g WITH_GRUB="${WITH_GRUB:-no}"
|
||||||
|
|
||||||
if [[ ! " ${VALID_BOARDS[*]} " =~ " ${BOARD} " ]]; then
|
if [[ ! " ${VALID_BOARDS[*]} " =~ " ${BOARD} " ]]; then
|
||||||
exit_with_error "Error: Invalid board '$BOARD'. Valid options are: ${VALID_BOARDS[*]}" >&2
|
exit_with_error "Error: Invalid board '$BOARD'. Valid options are: ${VALID_BOARDS[*]}" >&2
|
||||||
|
|||||||
1
config/boards/ayn-odin2mini.csc
Normal file
1
config/boards/ayn-odin2mini.csc
Normal file
@ -0,0 +1 @@
|
|||||||
|
source "${SRC}/config/boards/ayn-odin2.csc"
|
||||||
31
packages/bsp/ayn-odin2mini/AYN-Odin2.conf
Normal file
31
packages/bsp/ayn-odin2mini/AYN-Odin2.conf
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
# Use case configuration for AYN Odin2
|
||||||
|
# Author: Teguh Sobirin <teguh@sobir.in>
|
||||||
|
|
||||||
|
Syntax 4
|
||||||
|
|
||||||
|
SectionUseCase."HiFi" {
|
||||||
|
File "/AYN/Odin2/HiFi.conf"
|
||||||
|
Comment "HiFi quality Music."
|
||||||
|
}
|
||||||
|
|
||||||
|
BootSequence [
|
||||||
|
cset "name='RX_RX0 Digital Volume' 84"
|
||||||
|
cset "name='RX_RX1 Digital Volume' 84"
|
||||||
|
cset "name='HPHL Volume' 20"
|
||||||
|
cset "name='HPHR Volume' 20"
|
||||||
|
cset "name='ADC2 Volume' 10"
|
||||||
|
]
|
||||||
|
|
||||||
|
LibraryConfig.remap.Config {
|
||||||
|
|
||||||
|
ctl.default.map {
|
||||||
|
"name='HP Volume'" {
|
||||||
|
"name='HPHL Volume'".vindex.0 0
|
||||||
|
"name='HPHR Volume'".vindex.1 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Include.card-init.File "/lib/card-init.conf"
|
||||||
|
Include.ctl-remap.File "/lib/ctl-remap.conf"
|
||||||
|
Include.wcd-init.File "/codecs/wcd938x/init.conf"
|
||||||
91
packages/bsp/ayn-odin2mini/HiFi.conf
Normal file
91
packages/bsp/ayn-odin2mini/HiFi.conf
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
# Use case configuration for AYN Odin2
|
||||||
|
# Author: Teguh Sobirin <teguh@sobir.in>
|
||||||
|
|
||||||
|
SectionVerb {
|
||||||
|
EnableSequence [
|
||||||
|
cset "name='PRIMARY_MI2S_RX Audio Mixer MultiMedia1' 1"
|
||||||
|
cset "name='RX_CODEC_DMA_RX_0 Audio Mixer MultiMedia2' 1"
|
||||||
|
cset "name='DISPLAY_PORT_RX_0 Audio Mixer MultiMedia2' 0"
|
||||||
|
cset "name='MultiMedia3 Mixer TX_CODEC_DMA_TX_3' 1"
|
||||||
|
]
|
||||||
|
|
||||||
|
DisableSequence [
|
||||||
|
cset "name='PRIMARY_MI2S_RX Audio Mixer MultiMedia1' 0"
|
||||||
|
cset "name='RX_CODEC_DMA_RX_0 Audio Mixer MultiMedia2' 0"
|
||||||
|
cset "name='DISPLAY_PORT_RX_0 Audio Mixer MultiMedia2' 0"
|
||||||
|
cset "name='MultiMedia3 Mixer TX_CODEC_DMA_TX_3' 0"
|
||||||
|
]
|
||||||
|
|
||||||
|
Value {
|
||||||
|
TQ "HiFi"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SectionDevice."Speaker" {
|
||||||
|
Comment "Speaker playback"
|
||||||
|
|
||||||
|
Value {
|
||||||
|
PlaybackPriority 150
|
||||||
|
PlaybackPCM "hw:${CardId},0"
|
||||||
|
PlaybackChannels 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SectionDevice."Headphones" {
|
||||||
|
Comment "Headphones Playback"
|
||||||
|
|
||||||
|
Include.wcdhpe.File "/codecs/wcd938x/HeadphoneEnableSeq.conf"
|
||||||
|
Include.wcdhpd.File "/codecs/wcd938x/HeadphoneDisableSeq.conf"
|
||||||
|
Include.rxmhpe.File "/codecs/qcom-lpass/rx-macro/HeadphoneEnableSeq.conf"
|
||||||
|
Include.rxmhpd.File "/codecs/qcom-lpass/rx-macro/HeadphoneDisableSeq.conf"
|
||||||
|
|
||||||
|
Value {
|
||||||
|
PlaybackPriority 200
|
||||||
|
PlaybackPCM "hw:${CardId},1"
|
||||||
|
PlaybackMixer "default:${CardId}"
|
||||||
|
PlaybackMixerElem "HP"
|
||||||
|
PlaybackChannels 2
|
||||||
|
JackControl "Headphone Jack"
|
||||||
|
JackHWMute "Speaker"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SectionDevice."Headset" {
|
||||||
|
Comment "Headphone Microphone"
|
||||||
|
|
||||||
|
Include.wcdmice.File "/codecs/wcd938x/HeadphoneMicEnableSeq.conf"
|
||||||
|
Include.wcdmicd.File "/codecs/wcd938x/HeadphoneMicDisableSeq.conf"
|
||||||
|
Include.txmhpe.File "/codecs/qcom-lpass/tx-macro/SoundwireMic1EnableSeq.conf"
|
||||||
|
Include.txmhpd.File "/codecs/qcom-lpass/tx-macro/HeadphoneMicDisableSeq.conf"
|
||||||
|
|
||||||
|
Value {
|
||||||
|
CapturePriority 200
|
||||||
|
CapturePCM "hw:${CardId},2"
|
||||||
|
CaptureMixerElem "ADC2"
|
||||||
|
CaptureChannels 1
|
||||||
|
JackControl "Mic Jack"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SectionDevice."DisplayPort" {
|
||||||
|
Comment "DisplayPort playback"
|
||||||
|
|
||||||
|
EnableSequence [
|
||||||
|
cset "name='PRIMARY_MI2S_RX Audio Mixer MultiMedia1' 0"
|
||||||
|
cset "name='RX_CODEC_DMA_RX_0 Audio Mixer MultiMedia2' 0"
|
||||||
|
cset "name='DISPLAY_PORT_RX_0 Audio Mixer MultiMedia2' 1"
|
||||||
|
]
|
||||||
|
|
||||||
|
DisableSequence [
|
||||||
|
cset "name='PRIMARY_MI2S_RX Audio Mixer MultiMedia1' 1"
|
||||||
|
cset "name='DISPLAY_PORT_RX_0 Audio Mixer MultiMedia2' 0"
|
||||||
|
cset "name='RX_CODEC_DMA_RX_0 Audio Mixer MultiMedia2' 1"
|
||||||
|
]
|
||||||
|
|
||||||
|
Value {
|
||||||
|
PlaybackPriority 100
|
||||||
|
PlaybackPCM "hw:${CardId},1"
|
||||||
|
JackControl "DP0 Jack"
|
||||||
|
JackHWMute "Speaker"
|
||||||
|
}
|
||||||
|
}
|
||||||
58
packages/bsp/ayn-odin2mini/LinuxLoader.cfg
Normal file
58
packages/bsp/ayn-odin2mini/LinuxLoader.cfg
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
#
|
||||||
|
# Configure the LinuxLoader settings
|
||||||
|
#
|
||||||
|
|
||||||
|
[LinuxLoader]
|
||||||
|
|
||||||
|
# Controls on-screen logging
|
||||||
|
# This setting can persist without config file or sdcard being present
|
||||||
|
Debug = true
|
||||||
|
|
||||||
|
# Boot target. Can be one of the following:
|
||||||
|
# "default" (ABL default)
|
||||||
|
# "Linux" (direct Linux Image load)
|
||||||
|
# "EFI"
|
||||||
|
# "UEFI Shell" (will execute startup.nsh automatically if found on any FAT partition)
|
||||||
|
# "Mass Storage" (will mount the UFS LUN specified below as mass storage)
|
||||||
|
Target = "default"
|
||||||
|
|
||||||
|
# Default UFS LUN to mount as mass storage
|
||||||
|
# Allowed values: 0, 1, 2, 3, 4, 5
|
||||||
|
MassStorageLUN = 0
|
||||||
|
|
||||||
|
# Volume up boot target. Can be one of the following:
|
||||||
|
# "BDS Menu" (will enter the UEFI boot menu provided by Qualcomm, don't touch anything there unless you know what you are doing!)
|
||||||
|
# "UEFI Shell" (will execute startup.nsh automatically if found on any FAT partition)
|
||||||
|
# "recovery"
|
||||||
|
# "Linux"
|
||||||
|
DefaultVolUp = "Linux"
|
||||||
|
|
||||||
|
# Setting this to *true* will enable USB Host mode in UEFI
|
||||||
|
# This might be useful if you want to play with UEFI.
|
||||||
|
# Note that you will need an externally powered type-C hub to connect USB devices. (at least for now)
|
||||||
|
UsbHostMode = false
|
||||||
|
|
||||||
|
# Controls hypervisor UART enablement
|
||||||
|
#
|
||||||
|
# Setting *true* here will force enable the hypervisor UART
|
||||||
|
# Setting *false* here will force disable the hypervisor UART
|
||||||
|
# Removing this line will avoid changing the default behavior
|
||||||
|
# Please leave it to *false* unless you know what you are doing
|
||||||
|
HypUartEnable = false
|
||||||
|
|
||||||
|
# Controls display hardware status during exit boot services
|
||||||
|
#
|
||||||
|
# The dispcc driver from mainline Linux kernel has a bug, which
|
||||||
|
# prevents the display hardware from initializing properly if
|
||||||
|
# the display hardware is not disabled before exiting boot services.
|
||||||
|
#
|
||||||
|
# Set this to *true* if you are trying to boot a mainline kernel.
|
||||||
|
DisableDisplayHW = true
|
||||||
|
|
||||||
|
[Linux]
|
||||||
|
# Accept both gzipped and non-gzipped kernel images
|
||||||
|
Image = "Image"
|
||||||
|
initrd = "initrd.img-INITRD_PLACEHOLDER"
|
||||||
|
devicetree = "dtb/qcom/qcs8550-ayn-odin2mini.dtb"
|
||||||
|
cmdline = "clk_ignore_unused pd_ignore_unused arm64.nopauthfbcon=rotate:3 console=ttyMSM0,115200n8 root=UUID=UUID_PLACEHOLDER"
|
||||||
|
|
||||||
20
packages/bsp/ayn-odin2mini/zz-update-abl-kernel
Executable file
20
packages/bsp/ayn-odin2mini/zz-update-abl-kernel
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -ex
|
||||||
|
new_rootfs_image_uuid=$(sed -e 's/^.*root=UUID=//' -e 's/ .*$//' < /proc/cmdline)
|
||||||
|
gzip -c /boot/vmlinuz-*-sm8550-arm64 > /tmp/Image.gz
|
||||||
|
|
||||||
|
cat /tmp/Image.gz /usr/lib/linux-image-*-sm8550-arm64/qcom/qcs8550-ayn-odin2-hypdtbo.dtb > /tmp/Image.gz-dtb
|
||||||
|
|
||||||
|
source /boot/armbianEnv.txt
|
||||||
|
/usr/bin/mkbootimg \
|
||||||
|
--kernel /tmp/Image.gz-dtb \
|
||||||
|
--ramdisk /boot/initrd.img-*-sm8550-arm64 \
|
||||||
|
--base 0x0 \
|
||||||
|
--second_offset 0x00f00000 \
|
||||||
|
--cmdline "clk_ignore_unused pd_ignore_unused panic=30 audit=0 allow_mismatched_32bit_el0 rw mem_sleep_default=s2idle root=UUID=${new_rootfs_image_uuid}" \
|
||||||
|
--kernel_offset 0x8000 \
|
||||||
|
--ramdisk_offset 0x1000000 \
|
||||||
|
--tags_offset 0x100 \
|
||||||
|
--pagesize 4096 \
|
||||||
|
-o /boot/armbian-kernel.img
|
||||||
|
rm -f /tmp/Image.gz /tmp/Image.gz-dtb
|
||||||
Loading…
Reference in New Issue
Block a user