Skip to content

Commit

Permalink
support bananapim6.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
BPI-SINOVOIP committed Dec 18, 2023
1 parent eec57ef commit 9163a04
Show file tree
Hide file tree
Showing 5 changed files with 4,882 additions and 0 deletions.
51 changes: 51 additions & 0 deletions config/boards/bananapim6.conf
@@ -0,0 +1,51 @@
# Synaptics VS680 SoC quad core A73(2.1Ghz) 4GB SoC eMMC USB3
BOARD_NAME="Banana Pi M6"
BOARDFAMILY="vs680"
#BOOTCONFIG="vs680_spi_defconfig"
BOOTCONFIG="vs680_spi_boot_defconfig"
#BOOT_SOC="rk3588"
#vs680_a0_defconfig
KERNEL_TARGET="legacy,edge,midstream"
FULL_DESKTOP="yes"
BOOT_LOGO="desktop"
#BOOT_FDT_FILE="rockchip/rk3588-bananapi-w3.dtb"
#BOOT_SCENARIO="spl-blobs"
#UEFI_FS_LABEL="BPI-BOOT"
WIREGUARD="no"
#
OFFSET="100"
BOOT_FS_LABEL="BPI-BOOT"
ROOT_FS_LABEL="BPI-ROOT"
#BOOT_SUPPORT_SPI="yes"
#BOOT_SPI_RKSPI_LOADER="yes"
BOOTSIZE="256"
#IMAGE_PARTITION_TABLE="gpt"
SKIP_BOOTSPLASH="yes" # Skip boot splash patch, conflicts with CONFIG_VT=yes
BOOTFS_TYPE="fat"

function post_family_tweaks__bananapim6_naming_audios() {
display_alert "$BOARD" "Renaming bananapim6 audios" "info"

mkdir -p $SDCARD/etc/udev/rules.d/
echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-hdmi0-sound", ENV{SOUND_DESCRIPTION}="HDMI0 Audio"' > $SDCARD/etc/udev/rules.d/90-naming-audios.rules
echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-hdmi1-sound", ENV{SOUND_DESCRIPTION}="HDMI1 Audio"' >> $SDCARD/etc/udev/rules.d/90-naming-audios.rules
echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-hdmiin-sound", ENV{SOUND_DESCRIPTION}="HDMI-In Audio"' >> $SDCARD/etc/udev/rules.d/90-naming-audios.rules
echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-dp0-sound", ENV{SOUND_DESCRIPTION}="DP0 Audio"' >> $SDCARD/etc/udev/rules.d/90-naming-audios.rules
echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-es8316-sound", ENV{SOUND_DESCRIPTION}="ES8316 Audio"' >> $SDCARD/etc/udev/rules.d/90-naming-audios.rules

return 0
}

# Override family config for this board; let's avoid conditionals in family config.
function post_family_config__bananapim6_use_vendor_uboot() {
BOOTSOURCE='https://github.com/BPI-SINOVOIP/pi-u-boot.git'
BOOTBRANCH='branch:v2019.10-vs680'
BOOTPATCHDIR="legacy"
}

function post_family_config__bananapim6_use_vendor_kernel() {
declare -g KERNEL_MAJOR_MINOR="5.4" # Major and minor versions of this kernel.
KERNELSOURCE='https://github.com/BPI-SINOVOIP/pi-linux.git'
KERNELBRANCH='branch:pi-5.4-vs680-hdmi'
KERNELPATCHDIR="legacy"
}
34 changes: 34 additions & 0 deletions config/bootscripts/boot-vs680.cmd
@@ -0,0 +1,34 @@
# DO NOT EDIT THIS FILE
#
# Please edit /boot/armbianEnv.txt to set supported parameters
#

setenv overlay_error "false"
# default values
setenv rootdev "/dev/mmcblk0p1"
setenv verbosity "1"
setenv console "both"
setenv bootlogo "false"
setenv rootfstype "ext4"
setenv docker_optimizations "on"
setenv earlycon "off"

echo "Boot script loaded from ${devtype} ${devnum}"

if test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then
echo "skip load ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}armbianEnv.txt"
#load ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}armbianEnv.txt
#env import -t ${ramdisk_addr_r} ${filesize}
fi

#setenv bootargs 'rootfstype=ext4 root=/dev/mmcblk1p2 rw rootwait'
setenv bootargs 'rootfstype=ext4 root=/dev/mmcblk1p2 rw rootwait board=bpi-m6 loglevel=8 tz_enable vppta chipid=43111a82aee08964 cma=343932928@1509949440'
mmc list
fatload mmc 1:1 0x4b800000 dtb/synaptics/vs680-a0-evk.dtb
fatload mmc 1:1 0x04c80000 Image
booti 0x04c80000 - 0x4b800000


# Recompile with:
# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr
# mkimage -C none -A arm -T script -d boot.cmd boot.scr

0 comments on commit 9163a04

Please sign in to comment.