Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate media boards into the rockchip64 family #6834

Merged
merged 5 commits into from
Jun 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 6 additions & 15 deletions config/boards/firefly-itx-3588j.csc
Original file line number Diff line number Diff line change
@@ -1,25 +1,16 @@
# Rockchip RK3588j Octa core 4GB-32GB eMMC GBE HDMI HDMI-IN PCIe SATA USB3 WiFi 4G 5G
BOARD_NAME="Firefly ITX-3588J"
BOARDFAMILY="rockchip-rk3588"
BOOT_SOC="rk3588"
BOARD_MAINTAINER=""
KERNEL_TARGET="vendor"
FULL_DESKTOP="yes"
BOOT_LOGO="desktop"
BOOTCONFIG="rk3588_defconfig"
BOOT_FDT_FILE="rockchip/rk3588-firefly-itx-3588j.dtb"
SRC_EXTLINUX="yes"
SRC_CMDLINE="console=ttyS02,1500000 console=tty0"
BOOT_SOC="rk3588"
BOOT_LOGO="desktop"
FULL_DESKTOP="yes"
IMAGE_PARTITION_TABLE="gpt"

function post_family_config__firefly-itx-3588j_use_vendor_uboot() {
BOOTCONFIG="rk3588_defconfig"
BOOTSOURCE='https://github.com/150balbes/u-boot-rk'
BOOTBRANCH='branch:rk3588'
BOOTDIR="u-boot-${BOARD}"
BOOTPATCHDIR="u-boot-firefly-itx-3588j"
}

function post_family_tweaks_bsp__firefly-itx-3588j() {
function post_family_tweaks_bsp__firefly_itx_3588j() {
display_alert "$BOARD" "Installing rk3588-bluetooth.service" "info"

# Bluetooth on this board is handled by a Broadcom (AP6275PR3) chip and requires
Expand All @@ -33,7 +24,7 @@ function post_family_tweaks_bsp__firefly-itx-3588j() {
return 0
}

function post_family_tweaks__firefly-itx-3588j_enable_services() {
function post_family_tweaks__firefly_itx_3588j_enable_services() {
display_alert "$BOARD" "Enabling rk3588-bluetooth.service" "info"
chroot_sdcard systemctl enable rk3588-bluetooth.service
return 0
Expand Down
27 changes: 22 additions & 5 deletions config/boards/quartz64a.csc
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
# Rockchip RK3566 quad core 4GB-8GB GBE PCIe USB3
BOARD_NAME="Pine Quartz64 A"
BOARDFAMILY="media"
BOARDFAMILY="rockchip64"
BOARD_MAINTAINER=""
BOOT_SOC="rk3568"
BOOT_SOC="rk3566"
BOOTCONFIG="quartz64-a-rk3566_defconfig"
KERNEL_TARGET="current,edge"
FULL_DESKTOP="yes"
BOOT_LOGO="desktop"
BOOT_FDT_FILE="rockchip/rk3566-quartz64-a.dtb"
SRC_EXTLINUX="yes"
SRC_CMDLINE="console=ttyS02,1500000 console=tty0"
ASOUND_STATE="asound.state.station-m2"
IMAGE_PARTITION_TABLE="gpt"

# Mainline U-Boot
function post_family_config__quartz64_a_use_mainline_uboot() {
display_alert "$BOARD" "Using mainline U-Boot for $BOARD / $BRANCH" "info"

declare -g BOOTSOURCE="https://github.com/u-boot/u-boot.git" # We ❤️ Mainline U-Boot
declare -g BOOTBRANCH="tag:v2024.07-rc5"
declare -g BOOTPATCHDIR="v2024.07/board_${BOARD}"
# Don't set BOOTDIR, allow shared U-Boot source directory for disk space efficiency

declare -g UBOOT_TARGET_MAP="BL31=${RKBIN_DIR}/${BL31_BLOB} ROCKCHIP_TPL=${RKBIN_DIR}/${DDR_BLOB};;u-boot-rockchip.bin"

# Disable stuff from rockchip64_common; we're using binman here which does all the work already
unset uboot_custom_postprocess write_uboot_platform write_uboot_platform_mtd

# Just use the binman-provided u-boot-rockchip.bin, which is ready-to-go
function write_uboot_platform() {
dd "if=$1/u-boot-rockchip.bin" "of=$2" bs=32k seek=1 conv=notrunc status=none
}
}
26 changes: 22 additions & 4 deletions config/boards/quartz64b.csc
Original file line number Diff line number Diff line change
@@ -1,13 +1,31 @@
# Rockchip RK3566 quad core 4GB-8GB GBE PCIe USB3
BOARD_NAME="Pine Quartz64 B"
BOARDFAMILY="media"
BOARDFAMILY="rockchip64"
BOARD_MAINTAINER=""
BOOT_SOC="rk3568"
BOOT_SOC="rk3566"
BOOTCONFIG="quartz64-b-rk3566_defconfig"
KERNEL_TARGET="current,edge"
FULL_DESKTOP="yes"
BOOT_LOGO="desktop"
BOOT_FDT_FILE="rockchip/rk3566-quartz64-b.dtb"
SRC_EXTLINUX="yes"
SRC_CMDLINE="console=ttyS02,1500000 console=tty0"
IMAGE_PARTITION_TABLE="gpt"

# Mainline U-Boot
function post_family_config__quartz64_b_use_mainline_uboot() {
display_alert "$BOARD" "Using mainline U-Boot for $BOARD / $BRANCH" "info"

declare -g BOOTSOURCE="https://github.com/u-boot/u-boot.git" # We ❤️ Mainline U-Boot
declare -g BOOTBRANCH="tag:v2024.07-rc5"
declare -g BOOTPATCHDIR="v2024.07/board_${BOARD}"
# Don't set BOOTDIR, allow shared U-Boot source directory for disk space efficiency

declare -g UBOOT_TARGET_MAP="BL31=${RKBIN_DIR}/${BL31_BLOB} ROCKCHIP_TPL=${RKBIN_DIR}/${DDR_BLOB};;u-boot-rockchip.bin"

# Disable stuff from rockchip64_common; we're using binman here which does all the work already
unset uboot_custom_postprocess write_uboot_platform write_uboot_platform_mtd

# Just use the binman-provided u-boot-rockchip.bin, which is ready-to-go
function write_uboot_platform() {
dd "if=$1/u-boot-rockchip.bin" "of=$2" bs=32k seek=1 conv=notrunc status=none
}
}
36 changes: 23 additions & 13 deletions config/boards/station-m1.csc
Original file line number Diff line number Diff line change
@@ -1,28 +1,38 @@
# Rockchip RK3328 quad core 1GB-4GB GBE eMMC USB3 WiFi
BOARD_NAME="Station M1"
BOARDFAMILY="media"
BOARDFAMILY="rockchip64"
BOOT_SOC="rk3328"
BOARD_MAINTAINER="150balbes"
BOOTCONFIG="roc-pc-rk3328_defconfig"
KERNEL_TARGET="legacy,current,edge"
BOOTCONFIG="roc-cc-rk3328_defconfig"
KERNEL_TARGET="current,edge"
FULL_DESKTOP="yes"
BOOT_LOGO="desktop"
BOOT_FDT_FILE="rockchip/rk3328-roc-pc.dtb"
SRC_EXTLINUX="yes"
SERIALCON="ttyS0,tty0"
SRC_CMDLINE="console=ttyS2,1500000 console=tty0"
ASOUND_STATE="asound.state.station-m1"

function post_family_tweaks__station_m1() {
display_alert "$BOARD" "Installing board tweaks" "info"

cp -R $SRC/packages/blobs/rtl8723bt_fw/* $SDCARD/lib/firmware/rtl_bt/
cp -R $SRC/packages/blobs/station/firmware/* $SDCARD/lib/firmware/
if [[ $BRANCH == legacy ]]; then
install -m 755 $SRC/packages/bsp/rk3328/m1/rtk_hciattach $SDCARD/usr/bin/rtk_hciattach
sed -e 's/exit 0//g' -i $SDCARD/etc/rc.local
echo "su -c '/usr/bin/rtk_hciattach -n -s 115200 /dev/ttyS2 rtk_h5 &'" >> $SDCARD/etc/rc.local
echo "exit 0" >> $SDCARD/etc/rc.local
fi
}

# Mainline U-Boot
function post_family_config__station_m1_use_mainline_uboot() {
display_alert "$BOARD" "Using mainline U-Boot for $BOARD / $BRANCH" "info"

declare -g BOOTSOURCE="https://github.com/u-boot/u-boot.git" # We ❤️ Mainline U-Boot
declare -g BOOTBRANCH="tag:v2024.07-rc5"
declare -g BOOTPATCHDIR="v2024.07/board_${BOARD}"
# Don't set BOOTDIR, allow shared U-Boot source directory for disk space efficiency

declare -g UBOOT_TARGET_MAP="BL31=${RKBIN_DIR}/${BL31_BLOB} ROCKCHIP_TPL=${RKBIN_DIR}/${DDR_BLOB};;u-boot-rockchip.bin"

# Disable stuff from rockchip64_common; we're using binman here which does all the work already
unset uboot_custom_postprocess write_uboot_platform write_uboot_platform_mtd

return 0
# Just use the binman-provided u-boot-rockchip.bin, which is ready-to-go
function write_uboot_platform() {
dd "if=$1/u-boot-rockchip.bin" "of=$2" bs=32k seek=1 conv=notrunc status=none
}
}
27 changes: 23 additions & 4 deletions config/boards/station-p2.csc
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
# Rockchip RK3568 quad core 2GB-4GB GBE eMMC NVMe SATA USB3 WiFi
BOARD_NAME="Station P2"
BOARDFAMILY="media"
BOARDFAMILY="rockchip64"
BOOT_SOC="rk3568"
BOARD_MAINTAINER="150balbes"
BOOTCONFIG="firefly-p2-rk3568_defconfig"
KERNEL_TARGET="current,edge"
FULL_DESKTOP="yes"
BOOT_LOGO="desktop"
BOOT_FDT_FILE="rockchip/rk3568-firefly-roc-pc.dtb"
SRC_EXTLINUX="yes"
SRC_CMDLINE="console=ttyS02,1500000 console=tty0"
ASOUND_STATE="asound.state.station-p2"
IMAGE_PARTITION_TABLE="gpt"

Expand All @@ -20,3 +18,24 @@ function post_family_tweaks__station_p2() {

return 0
}

# Mainline U-Boot
function post_family_config__station_p2_use_mainline_uboot() {
display_alert "$BOARD" "Using mainline U-Boot for $BOARD / $BRANCH" "info"

declare -g BOOTCONFIG="generic-rk3568_defconfig" # Use generic defconfig which should boot all RK3568 boards
declare -g BOOTSOURCE="https://github.com/u-boot/u-boot.git" # We ❤️ Mainline U-Boot
declare -g BOOTBRANCH="tag:v2024.07-rc5"
declare -g BOOTPATCHDIR="v2024.07/board_${BOARD}"
# Don't set BOOTDIR, allow shared U-Boot source directory for disk space efficiency

declare -g UBOOT_TARGET_MAP="BL31=${RKBIN_DIR}/${BL31_BLOB} ROCKCHIP_TPL=${RKBIN_DIR}/${DDR_BLOB};;u-boot-rockchip.bin"

# Disable stuff from rockchip64_common; we're using binman here which does all the work already
unset uboot_custom_postprocess write_uboot_platform write_uboot_platform_mtd

# Just use the binman-provided u-boot-rockchip.bin, which is ready-to-go
function write_uboot_platform() {
dd "if=$1/u-boot-rockchip.bin" "of=$2" bs=32k seek=1 conv=notrunc status=none
}
}
Loading