Skip to content

Commit

Permalink
Add initial support YYT-R1
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperKali committed Nov 3, 2024
1 parent aec6055 commit cab576a
Show file tree
Hide file tree
Showing 39 changed files with 7,387 additions and 7,276 deletions.
1 change: 1 addition & 0 deletions Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ menu "System"
source "$BR2_EXTERNAL_BATOCERA_PATH/package/batocera/boot/uboot-rock-5c/Config.in"
source "$BR2_EXTERNAL_BATOCERA_PATH/package/batocera/boot/uboot-bananapi-m7/Config.in"
source "$BR2_EXTERNAL_BATOCERA_PATH/package/batocera/boot/uboot-orangepi-5-pro/Config.in"
source "$BR2_EXTERNAL_BATOCERA_PATH/package/batocera/boot/uboot-youyeetoo-r1/Config.in"
endmenu

menu "Toolchain"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
LABEL batocera.linux
LINUX /boot/linux
FDT /boot/rk3588s-youyeetoo-r1.dtb
APPEND initrd=/boot/initrd.lz4 label=BATOCERA rootwait quiet loglevel=0 console=ttyS0,115200n8 coherent_pool=2M
29 changes: 29 additions & 0 deletions board/batocera/rockchip/rk3588/youyeetoo-r1/create-boot-script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

# HOST_DIR = host dir
# BOARD_DIR = board specific dir
# BUILD_DIR = base dir/build
# BINARIES_DIR = images dir
# TARGET_DIR = target dir
# BATOCERA_BINARIES_DIR = batocera binaries sub directory

HOST_DIR=$1
BOARD_DIR=$2
BUILD_DIR=$3
BINARIES_DIR=$4
TARGET_DIR=$5
BATOCERA_BINARIES_DIR=$6

DTB="rk3588s-youyeetoo-r1.dtb"

mkdir -p "${BATOCERA_BINARIES_DIR}/boot/boot" || exit 1
mkdir -p "${BATOCERA_BINARIES_DIR}/boot/extlinux" || exit 1

cp "${BINARIES_DIR}/Image" "${BATOCERA_BINARIES_DIR}/boot/boot/linux" || exit 1
cp "${BINARIES_DIR}/initrd.lz4" "${BATOCERA_BINARIES_DIR}/boot/boot/initrd.lz4" || exit 1
cp "${BINARIES_DIR}/rootfs.squashfs" "${BATOCERA_BINARIES_DIR}/boot/boot/batocera.update" || exit 1

cp "${BINARIES_DIR}/${DTB}" "${BATOCERA_BINARIES_DIR}/boot/boot/" || exit 1
cp "${BOARD_DIR}/boot/extlinux.conf" "${BATOCERA_BINARIES_DIR}/boot/extlinux/" || exit 1

exit 0
48 changes: 48 additions & 0 deletions board/batocera/rockchip/rk3588/youyeetoo-r1/genimage.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
image boot.vfat {
vfat {
extraargs = "-F 32 -n BATOCERA"
@files
}
size = 6G
}

image userdata.ext4 {
ext4 {
label = "SHARE"
use-mke2fs = "true"
extraargs = "-m 0"
}
size = "512M"
# include files from TARGET_DIR/userdata
mountpoint = "/userdata"
}

image batocera.img {
hdimage {
align = "1M"
partition-table-type = "gpt"
}

partition part_idbloader {
in-partition-table = "no"
image = "../../uboot-youyeetoo-r1/idbloader.img"
offset = 32K
}

partition part_uboot {
in-partition-table = "no"
image = "../../uboot-youyeetoo-r1/u-boot.itb"
offset = 8M
}

partition vfat {
partition-type-uuid = "F"
image = "boot.vfat"
offset = 16M
}

partition userdata {
partition-type-uuid = "L"
image = "userdata.ext4"
}
}
6 changes: 4 additions & 2 deletions configs/batocera-rk3588.board
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_1=y
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_GIT=y
BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/armbian/linux-rockchip.git"
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="6dfe401b287bdf15675c9c180c843da028c34d08"
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rk-6.1-rkr3"
BR2_LINUX_KERNEL_PATCH="$(BR2_EXTERNAL_BATOCERA_PATH)/board/batocera/rockchip/rk3588/linux_patches"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_BATOCERA_PATH)/board/batocera/rockchip/rk3588/linux-defconfig.config"
Expand All @@ -29,7 +29,7 @@ BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y

# Build the DTB from the kernel sources
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="rockchip/rk3588-bananapi-m7 rockchip/rk3588s-rock-5c rockchip/rk3588-rock-5b rockchip/rk3588s-rock-5a rockchip/rk3588-evb1-lp4-v10-linux rockchip/rk3588s-orangepi-5 rockchip/rk3588s-orangepi-5b rockchip/rk3588-orangepi-5-plus rockchip/rk3588s-orangepi-5-pro rockchip/rk3588s-9tripod-linux rockchip/rk3588-blueberry-edge-v12-linux rockchip/rk3588s-khadas-edge2 rockchip/rk3588s-roc-pc"
BR2_LINUX_KERNEL_INTREE_DTS_NAME="rockchip/rk3588-bananapi-m7 rockchip/rk3588s-rock-5c rockchip/rk3588-rock-5b rockchip/rk3588s-rock-5a rockchip/rk3588-evb1-lp4-v10-linux rockchip/rk3588s-orangepi-5 rockchip/rk3588s-orangepi-5b rockchip/rk3588-orangepi-5-plus rockchip/rk3588s-orangepi-5-pro rockchip/rk3588s-9tripod-linux rockchip/rk3588-blueberry-edge-v12-linux rockchip/rk3588s-khadas-edge2 rockchip/rk3588s-roc-pc rockchip/rk3588s-youyeetoo-r1"
BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="$(BR2_EXTERNAL_BATOCERA_PATH)/board/batocera/rockchip/rk3588/dts/rk3588s-gameforce-ace.dts"
# Use 'extreme' ZSTD compression for a smaller image, but a bit more CPU to decompress
BR2_TARGET_ROOTFS_SQUASHFS4_ZSTD=y
Expand All @@ -54,6 +54,8 @@ BR2_PACKAGE_UBOOT_KHADAS_EDGE_2=y
BR2_PACKAGE_UBOOT_ROCK_5C=y
BR2_PACKAGE_UBOOT_BANANAPI_M7=y
BR2_PACKAGE_UBOOT_ORANGEPI_5_PRO=y
BR2_PACKAGE_UBOOT_YOUYEETOO_R1=y


# Rock5B U-Boot
BR2_TARGET_UBOOT=y
Expand Down
4 changes: 4 additions & 0 deletions package/batocera/boot/uboot-youyeetoo-r1/Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
config BR2_PACKAGE_UBOOT_YOUYEETOO_R1
bool "uboot-youyeetoo-r1"
help
U-Boot files for Youyeetoo R1
Binary file not shown.
Binary file not shown.
24 changes: 24 additions & 0 deletions package/batocera/boot/uboot-youyeetoo-r1/uboot-youyeetoo-r1.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
################################################################################
#
# uboot-youyeetoo-r1
#
################################################################################

UBOOT_YOUYEETOO_R1_VERSION = 2017.09-1.0.8
UBOOT_YOUYEETOO_R1_SOURCE =

define UBOOT_YOUYEETOO_R1_BUILD_CMDS
endef

UBOOT_YOUYEETOO_R1_PATH = \
$(BR2_EXTERNAL_BATOCERA_PATH)/package/batocera/boot/uboot-youyeetoo-r1

define UBOOT_YOUYEETOO_R1_INSTALL_TARGET_CMDS
mkdir -p $(BINARIES_DIR)/uboot-youyeetoo-r1
cp -f $(BR2_EXTERNAL_BATOCERA_PATH)/package/batocera/boot/uboot-youyeetoo-r1/idbloader.img \
$(BINARIES_DIR)/uboot-youyeetoo-r1/idbloader.img
cp -f $(BR2_EXTERNAL_BATOCERA_PATH)/package/batocera/boot/uboot-youyeetoo-r1/u-boot.itb \
$(BINARIES_DIR)/uboot-youyeetoo-r1/u-boot.itb
endef

$(eval $(generic-package))
Loading

0 comments on commit cab576a

Please sign in to comment.