Skip to content

Commit b80c2ff

Browse files
Daniil Petrovrsglobal
Daniil Petrov
authored andcommitted
Add orange pi 4
1. Change path for ATF bl31 file for Rockchip. 2. Add config files for Rockchip. 3. Change config parameters for fastboot. 4. Change number of sector for written images. 5. Change value of address for bootscript. 6. Change config files for emmc and sd, because in rockchip, emmc is 0, sd is 1. 7. Add created uboot image for rockchip. Rockchip needs binaries from rkbin repository. 8. Add support wifi for board. 9. Add support emmc for board. Config for kernel: opi4/rockchip_defconfig is copy of armbian/build https://github.com/armbian/build/blob/01882653efdc7d20a6c9464b000a6017cbb9cfb4/config/kernel/linux-rockchip64-dev.config Signed-off-by: Daniil Petrov <[email protected]>
1 parent 003cd61 commit b80c2ff

17 files changed

+9260
-4
lines changed

common/boardconfig-common.mk

+4-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
5555
#BOARD_VENDORIMAGE_PARTITION_SIZE := 2147483648 # 2GB
5656

5757
# Boot image
58-
BOARD_BOOTIMAGE_PARTITION_SIZE := 25165824
58+
BOARD_BOOTIMAGE_PARTITION_SIZE := 29360128
5959
#BOARD_DTBIMAGE_PARTITION_SIZE := 1048576
6060
BOARD_DTBOIMG_PARTITION_SIZE := 524288
6161

@@ -89,6 +89,9 @@ endif
8989
ifeq ($(PRODUCT_BOARD_PLATFORM),broadcom)
9090
BOARD_KERNEL_BASE := 0x00000000
9191
endif
92+
ifeq ($(PRODUCT_BOARD_PLATFORM),rockchip)
93+
BOARD_KERNEL_BASE := 0x2000000
94+
endif
9295
BOARD_KERNEL_PAGESIZE := 4096
9396
BOARD_KERNEL_CMDLINE := androidboot.hardware=$(TARGET_PRODUCT)
9497
BOARD_MKBOOTIMG_ARGS += --kernel_offset 0x80000 --second_offset 0x8800 --ramdisk_offset 0x3300000

opi4/AndroidProducts.mk

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
#
3+
# Copyright (C) 2019 The Android Open-Source Project
4+
# Copyright (C) 2020 Daniil Petrov ([email protected])
5+
6+
PRODUCT_MAKEFILES := \
7+
$(LOCAL_DIR)/opi4.mk
8+
9+
COMMON_LUNCH_CHOICES := \
10+
opi4-userdebug

opi4/BoardConfig.mk

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
#
3+
# Copyright (C) 2019 The Android Open-Source Project
4+
5+
include device/glodroid/common/boardconfig-common.mk
6+
7+
# Architecture
8+
TARGET_ARCH := arm64
9+
TARGET_ARCH_VARIANT := armv8-a
10+
TARGET_CPU_ABI := arm64-v8a
11+
TARGET_CPU_ABI2 :=
12+
TARGET_CPU_VARIANT := cortex-a53
13+
14+
TARGET_2ND_ARCH := arm
15+
TARGET_2ND_ARCH_VARIANT := armv7-a-neon
16+
TARGET_2ND_CPU_ABI := armeabi-v7a
17+
TARGET_2ND_CPU_ABI2 := armeabi
18+
TARGET_2ND_CPU_VARIANT := cortex-a15
19+
20+
BOARD_GPU_DRIVERS := kmsro panfrost
21+
TARGET_BOARD_INFO_FILE := device/glodroid/opi4/board-info.txt
22+
ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
23+
BOARD_KERNEL_CMDLINE += earlyprintk console=ttyS2,1500000n8
24+
endif

opi4/board-info.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require board=opi4

opi4/device.mk

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
#
3+
# Copyright (C) 2020 Daniil Petrov ([email protected])
4+
5+
$(call inherit-product, device/glodroid/common/device-common.mk)
6+
$(call inherit-product, device/glodroid/common/bluetooth/no-bluetooth.mk)
7+
8+
PRODUCT_COPY_FILES += \
9+
vendor/raspberry/firmware-nonfree/brcm/brcmfmac43456-sdio.clm_blob:$(TARGET_COPY_OUT_VENDOR)/etc/firmware/brcm/brcmfmac43456-sdio.clm_blob \
10+
vendor/raspberry/firmware-nonfree/brcm/brcmfmac43456-sdio.bin:$(TARGET_COPY_OUT_VENDOR)/etc/firmware/brcm/brcmfmac43456-sdio.bin \
11+
vendor/raspberry/firmware-nonfree/brcm/brcmfmac43456-sdio.txt:$(TARGET_COPY_OUT_VENDOR)/etc/firmware/brcm/brcmfmac43456-sdio.rockchip,rk3399-orangepi.txt \

opi4/kernel.config

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# We need DRM built-in to show recovery/fastbootd UI which is on initrd
2+
CONFIG_DRM=y
3+
CONFIG_DRM_ROCKCHIP=y
4+
CONFIG_USB_DWC3_GADGET=y
5+
# CONFIG_USB_DWC3_DUAL_ROLE is not set

opi4/opi4.mk

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
#
3+
# Copyright (C) 2020 Daniil Petrov ([email protected])
4+
5+
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
6+
$(call inherit-product, device/glodroid/opi4/device.mk)
7+
8+
PRODUCT_BOARD_PLATFORM := rockchip
9+
PRODUCT_NAME := opi4
10+
PRODUCT_DEVICE := opi4
11+
PRODUCT_BRAND := OrangePI
12+
PRODUCT_MODEL := opi4
13+
PRODUCT_MANUFACTURER := xunlong
14+
PRODUCT_HAS_EMMC := true
15+
16+
UBOOT_DEFCONFIG := orangepi-rk3399_defconfig
17+
ATF_PLAT := rk3399
18+
19+
# Variable for uboot: https://github.com/armbian/build/blob/19a963189510a541a0486933eb8eaa1d7bc7f695/config/sources/families/rk3399.conf#L36
20+
DDR_BLOB := rk33/rk3399_ddr_933MHz_v1.24.bin
21+
MINILOADER_BLOB := rk33/rk3399_miniloader_v1.26.bin
22+
RKTRUST_INI := RK3399TRUST.ini
23+
RK33_BIN := bin/rk33
24+
25+
KERNEL_DEFCONFIG := $(LOCAL_PATH)/rockchip_defconfig
26+
KERNEL_FRAGMENTS := $(LOCAL_PATH)/kernel.config
27+
28+
KERNEL_DTB_FILE := rockchip/rk3399-orangepi.dtb

0 commit comments

Comments
 (0)