Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
This commit is contained in:
59
target/linux/rockchip/image/Makefile
Normal file
59
target/linux/rockchip/image/Makefile
Normal file
@@ -0,0 +1,59 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/image.mk
|
||||
|
||||
DEVICE_VARS += UBOOT_DEVICE_NAME
|
||||
|
||||
define Build/Compile
|
||||
$(CP) $(LINUX_DIR)/COPYING $(KDIR)/COPYING.linux
|
||||
endef
|
||||
|
||||
### Image scripts ###
|
||||
define Build/boot-common
|
||||
# This creates a new folder copies the dtb (as rockchip.dtb)
|
||||
# and the kernel image (as kernel.img)
|
||||
rm -fR $@.boot
|
||||
mkdir -p $@.boot
|
||||
|
||||
$(CP) $(IMAGE_KERNEL) $@.boot/kernel.img
|
||||
endef
|
||||
|
||||
define Build/boot-script
|
||||
# Make an U-boot image and copy it to the boot partition
|
||||
mkimage -A arm -O linux -T script -C none -a 0 -e 0 -d $(if $(1),$(1),default).bootscript $@.boot/boot.scr
|
||||
endef
|
||||
|
||||
define Build/pine64-img
|
||||
# Creates the final SD/eMMC images,
|
||||
# combining boot partition, root partition as well as the u-boot bootloader
|
||||
|
||||
# Generate a new partition table in $@ with 32 MiB of
|
||||
# alignment padding for the u-boot-rockchip.bin (idbloader + u-boot) to fit:
|
||||
# http://opensource.rock-chips.com/wiki_Boot_option#Boot_flow
|
||||
#
|
||||
# U-Boot SPL expects the U-Boot ITB to be located at sector 0x4000 (8 MiB) on the MMC storage
|
||||
PADDING=1 $(SCRIPT_DIR)/gen_image_generic.sh \
|
||||
$@ \
|
||||
$(CONFIG_TARGET_KERNEL_PARTSIZE) $@.boot \
|
||||
$(CONFIG_TARGET_ROOTFS_PARTSIZE) $(IMAGE_ROOTFS) \
|
||||
32768
|
||||
|
||||
# Copy the u-boot-rockchip.bin to the image at sector 0x40
|
||||
dd if="$(STAGING_DIR_IMAGE)"/$(UBOOT_DEVICE_NAME)-u-boot-rockchip.bin of="$@" seek=64 conv=notrunc
|
||||
endef
|
||||
|
||||
### Devices ###
|
||||
define Device/Default
|
||||
PROFILES := Default
|
||||
KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb
|
||||
BOOT_SCRIPT :=
|
||||
IMAGES := sysupgrade.img.gz
|
||||
IMAGE/sysupgrade.img.gz = boot-common | boot-script $$(BOOT_SCRIPT) | pine64-img | gzip | append-metadata
|
||||
DEVICE_DTS = rockchip/$$(SOC)-$(lastword $(subst _, ,$(1)))
|
||||
UBOOT_DEVICE_NAME = $(lastword $(subst _, ,$(1)))-$$(SOC)
|
||||
endef
|
||||
|
||||
include $(SUBTARGET).mk
|
||||
|
||||
$(eval $(call BuildImage))
|
||||
176
target/linux/rockchip/image/armv8.mk
Normal file
176
target/linux/rockchip/image/armv8.mk
Normal file
@@ -0,0 +1,176 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2020 Tobias Maedel
|
||||
|
||||
# FIT will be loaded at 0x02080000. Leave 16M for that, align it to 2M and load the kernel after it.
|
||||
KERNEL_LOADADDR := 0x03200000
|
||||
|
||||
define Device/firefly_roc-rk3328-cc
|
||||
DEVICE_VENDOR := Firefly
|
||||
DEVICE_MODEL := ROC-RK3328-CC
|
||||
SOC := rk3328
|
||||
DEVICE_DTS := rockchip/rk3328-roc-cc
|
||||
UBOOT_DEVICE_NAME := roc-cc-rk3328
|
||||
endef
|
||||
TARGET_DEVICES += firefly_roc-rk3328-cc
|
||||
|
||||
define Device/friendlyarm_nanopc-t4
|
||||
DEVICE_VENDOR := FriendlyARM
|
||||
DEVICE_MODEL := NanoPC T4
|
||||
SOC := rk3399
|
||||
DEVICE_PACKAGES := kmod-brcmfmac brcmfmac-nvram-4356-sdio cypress-firmware-4356-sdio
|
||||
endef
|
||||
TARGET_DEVICES += friendlyarm_nanopc-t4
|
||||
|
||||
define Device/friendlyarm_nanopi-r2c
|
||||
DEVICE_VENDOR := FriendlyARM
|
||||
DEVICE_MODEL := NanoPi R2C
|
||||
SOC := rk3328
|
||||
DEVICE_PACKAGES := kmod-usb-net-rtl8152
|
||||
endef
|
||||
TARGET_DEVICES += friendlyarm_nanopi-r2c
|
||||
|
||||
define Device/friendlyarm_nanopi-r2c-plus
|
||||
DEVICE_VENDOR := FriendlyARM
|
||||
DEVICE_MODEL := NanoPi R2C Plus
|
||||
SOC := rk3328
|
||||
DEVICE_PACKAGES := kmod-usb-net-rtl8152
|
||||
endef
|
||||
TARGET_DEVICES += friendlyarm_nanopi-r2c-plus
|
||||
|
||||
define Device/friendlyarm_nanopi-r2s
|
||||
DEVICE_VENDOR := FriendlyARM
|
||||
DEVICE_MODEL := NanoPi R2S
|
||||
SOC := rk3328
|
||||
DEVICE_PACKAGES := kmod-usb-net-rtl8152
|
||||
endef
|
||||
TARGET_DEVICES += friendlyarm_nanopi-r2s
|
||||
|
||||
define Device/friendlyarm_nanopi-r4s
|
||||
DEVICE_VENDOR := FriendlyARM
|
||||
DEVICE_MODEL := NanoPi R4S
|
||||
DEVICE_VARIANT := 4GB LPDDR4
|
||||
SOC := rk3399
|
||||
DEVICE_PACKAGES := kmod-r8169
|
||||
endef
|
||||
TARGET_DEVICES += friendlyarm_nanopi-r4s
|
||||
|
||||
define Device/friendlyarm_nanopi-r4s-enterprise
|
||||
DEVICE_VENDOR := FriendlyARM
|
||||
DEVICE_MODEL := NanoPi R4S Enterprise Edition
|
||||
DEVICE_VARIANT := 4GB LPDDR4
|
||||
SOC := rk3399
|
||||
UBOOT_DEVICE_NAME := nanopi-r4s-rk3399
|
||||
DEVICE_PACKAGES := kmod-r8169
|
||||
endef
|
||||
TARGET_DEVICES += friendlyarm_nanopi-r4s-enterprise
|
||||
|
||||
define Device/friendlyarm_nanopi-r5c
|
||||
DEVICE_VENDOR := FriendlyARM
|
||||
DEVICE_MODEL := NanoPi R5C
|
||||
SOC := rk3568
|
||||
DEVICE_PACKAGES := kmod-r8169 kmod-rtw88-8822ce rtl8822ce-firmware wpad-basic-mbedtls
|
||||
endef
|
||||
TARGET_DEVICES += friendlyarm_nanopi-r5c
|
||||
|
||||
define Device/friendlyarm_nanopi-r5s
|
||||
DEVICE_VENDOR := FriendlyARM
|
||||
DEVICE_MODEL := NanoPi R5S
|
||||
SOC := rk3568
|
||||
DEVICE_PACKAGES := kmod-r8169
|
||||
endef
|
||||
TARGET_DEVICES += friendlyarm_nanopi-r5s
|
||||
|
||||
define Device/pine64_rock64
|
||||
DEVICE_VENDOR := Pine64
|
||||
DEVICE_MODEL := Rock64
|
||||
SOC := rk3328
|
||||
endef
|
||||
TARGET_DEVICES += pine64_rock64
|
||||
|
||||
define Device/pine64_rockpro64
|
||||
DEVICE_VENDOR := Pine64
|
||||
DEVICE_MODEL := RockPro64
|
||||
SOC := rk3399
|
||||
endef
|
||||
TARGET_DEVICES += pine64_rockpro64
|
||||
|
||||
define Device/radxa_cm3-io
|
||||
DEVICE_VENDOR := Radxa
|
||||
DEVICE_MODEL := CM3 IO
|
||||
SOC := rk3566
|
||||
DEVICE_DTS := rockchip/rk3566-radxa-cm3-io
|
||||
UBOOT_DEVICE_NAME := radxa-cm3-io-rk3566
|
||||
endef
|
||||
TARGET_DEVICES += radxa_cm3-io
|
||||
|
||||
define Device/radxa_e25
|
||||
DEVICE_VENDOR := Radxa
|
||||
DEVICE_MODEL := E25
|
||||
SOC := rk3568
|
||||
DEVICE_DTS := rockchip/rk3568-radxa-e25
|
||||
BOOT_SCRIPT := radxa-e25
|
||||
UBOOT_DEVICE_NAME := radxa-e25-rk3568
|
||||
DEVICE_PACKAGES := kmod-r8169 kmod-ata-ahci-dwc
|
||||
endef
|
||||
TARGET_DEVICES += radxa_e25
|
||||
|
||||
define Device/radxa_rock-3a
|
||||
DEVICE_VENDOR := Radxa
|
||||
DEVICE_MODEL := ROCK 3A
|
||||
SOC := rk3568
|
||||
DEVICE_PACKAGES := kmod-usb-net-cdc-ncm kmod-usb-net-rndis
|
||||
endef
|
||||
TARGET_DEVICES += radxa_rock-3a
|
||||
|
||||
define Device/radxa_rock-pi-4a
|
||||
DEVICE_VENDOR := Radxa
|
||||
DEVICE_MODEL := ROCK Pi 4A
|
||||
SOC := rk3399
|
||||
SUPPORTED_DEVICES := radxa,rockpi4a radxa,rockpi4
|
||||
UBOOT_DEVICE_NAME := rock-pi-4-rk3399
|
||||
endef
|
||||
TARGET_DEVICES += radxa_rock-pi-4a
|
||||
|
||||
define Device/radxa_rock-pi-e
|
||||
DEVICE_VENDOR := Radxa
|
||||
DEVICE_MODEL := ROCK Pi E
|
||||
SOC := rk3328
|
||||
endef
|
||||
TARGET_DEVICES += radxa_rock-pi-e
|
||||
|
||||
define Device/radxa_rock-pi-s
|
||||
DEVICE_VENDOR := Radxa
|
||||
DEVICE_MODEL := ROCK Pi S
|
||||
SOC := rk3308
|
||||
DEVICE_DTS := rockchip/rk3308-rock-pi-s
|
||||
BOOT_SCRIPT := rock-pi-s
|
||||
UBOOT_DEVICE_NAME := rock-pi-s-rk3308
|
||||
DEVICE_PACKAGES := kmod-usb-net-cdc-ncm kmod-usb-net-rndis
|
||||
endef
|
||||
TARGET_DEVICES += radxa_rock-pi-s
|
||||
|
||||
define Device/sinovoip_bpi-r2-pro
|
||||
DEVICE_VENDOR := Sinovoip
|
||||
DEVICE_MODEL := Bananapi-R2 Pro
|
||||
SOC := rk3568
|
||||
SUPPORTED_DEVICES := sinovoip,rk3568-bpi-r2pro
|
||||
DEVICE_PACKAGES := kmod-ata-ahci-dwc
|
||||
endef
|
||||
TARGET_DEVICES += sinovoip_bpi-r2-pro
|
||||
|
||||
define Device/xunlong_orangepi-r1-plus
|
||||
DEVICE_VENDOR := Xunlong
|
||||
DEVICE_MODEL := Orange Pi R1 Plus
|
||||
SOC := rk3328
|
||||
DEVICE_PACKAGES := kmod-usb-net-rtl8152
|
||||
endef
|
||||
TARGET_DEVICES += xunlong_orangepi-r1-plus
|
||||
|
||||
define Device/xunlong_orangepi-r1-plus-lts
|
||||
DEVICE_VENDOR := Xunlong
|
||||
DEVICE_MODEL := Orange Pi R1 Plus LTS
|
||||
SOC := rk3328
|
||||
DEVICE_PACKAGES := kmod-usb-net-rtl8152
|
||||
endef
|
||||
TARGET_DEVICES += xunlong_orangepi-r1-plus-lts
|
||||
15
target/linux/rockchip/image/default.bootscript
Normal file
15
target/linux/rockchip/image/default.bootscript
Normal file
@@ -0,0 +1,15 @@
|
||||
part uuid ${devtype} ${devnum}:2 uuid
|
||||
|
||||
if test $stdout = 'serial@fe660000' ;
|
||||
then serial_addr=',0xfe660000';
|
||||
elif test $stdout = 'serial@ff130000' ;
|
||||
then serial_addr=',0xff130000';
|
||||
elif test $stdout = 'serial@ff1a0000' ;
|
||||
then serial_addr=',0xff1a0000';
|
||||
fi;
|
||||
|
||||
setenv bootargs "console=ttyS2,1500000 earlycon=uart8250,mmio32${serial_addr} root=PARTUUID=${uuid} rw rootwait";
|
||||
|
||||
load ${devtype} ${devnum}:1 ${kernel_addr_r} kernel.img
|
||||
|
||||
bootm ${kernel_addr_r}
|
||||
7
target/linux/rockchip/image/radxa-e25.bootscript
Normal file
7
target/linux/rockchip/image/radxa-e25.bootscript
Normal file
@@ -0,0 +1,7 @@
|
||||
part uuid ${devtype} ${devnum}:2 uuid
|
||||
|
||||
setenv bootargs "console=ttyS2,115200 earlycon=uart8250,mmio32,0xfe660000 root=PARTUUID=${uuid} rw rootwait";
|
||||
|
||||
load ${devtype} ${devnum}:1 ${kernel_addr_r} kernel.img
|
||||
|
||||
bootm ${kernel_addr_r}
|
||||
7
target/linux/rockchip/image/rock-pi-s.bootscript
Normal file
7
target/linux/rockchip/image/rock-pi-s.bootscript
Normal file
@@ -0,0 +1,7 @@
|
||||
part uuid ${devtype} ${devnum}:2 uuid
|
||||
|
||||
setenv bootargs "console=ttyS0,1500000 earlycon=uart8250,mmio32,0xff0a0000 root=PARTUUID=${uuid} rw rootwait";
|
||||
|
||||
load ${devtype} ${devnum}:1 ${kernel_addr_r} kernel.img
|
||||
|
||||
bootm ${kernel_addr_r}
|
||||
Reference in New Issue
Block a user