Support ODROID C4 SBC (#926)

* initial ODROID-C4 support
* setting clk_ignore_unused
This commit is contained in:
ubergeek801
2020-11-05 02:40:25 -07:00
committed by GitHub
parent 503117d8bf
commit 0b52271b3a
14 changed files with 339 additions and 8 deletions

View File

@@ -14,6 +14,11 @@ config BR2_PACKAGE_HARDKERNEL_BOOT_ODROID_C2
help
For the Odroid-C2
config BR2_PACKAGE_HARDKERNEL_BOOT_ODROID_C4
bool "Odroid-C4"
help
For the Odroid-C4
config BR2_PACKAGE_HARDKERNEL_BOOT_ODROID_XU4
bool "Odroid-XU4"
help

View File

@@ -32,6 +32,62 @@ define HARDKERNEL_BOOT_BUILD_CMDS
dd if=$(@D)/u-boot.img of=$(@D)/u-boot.gxbb bs=512 skip=96
endef
else ifeq ($(BR2_PACKAGE_HARDKERNEL_BOOT_ODROID_C4),y)
# travis/odroidc4-153 20201014
HARDKERNEL_BOOT_VERSION = 2a4e31e3fde9bced8a150d338aa397a0362df191
HARDKERNEL_BOOT_BINS += u-boot.sm1
define HARDKERNEL_BOOT_BUILD_CMDS
# blx_fix_g12a.sh is appropriate for C4 as well as N2
curl -L -o $(@D)/fip/blx_fix.sh https://raw.githubusercontent.com/home-assistant/hassos-blobs/d88ec078470f236d694ba1f9e69a44759ddf41ea/odroid-n2/blx_fix_g12a.sh
# acs.bin and bl301.bin appear to be different than N2 versions
curl -L -o $(@D)/fip/acs.bin https://raw.githubusercontent.com/home-assistant/operating-system-blobs/75fa51f44221da614a717673a27bec4fa01ccd6c/hardkernel/odroid-c4/acs.bin
curl -L -o $(@D)/fip/bl301.bin https://raw.githubusercontent.com/home-assistant/operating-system-blobs/75fa51f44221da614a717673a27bec4fa01ccd6c/hardkernel/odroid-c4/bl301.bin
bash $(@D)/fip/blx_fix.sh \
$(@D)/fip/g12a/bl30.bin $(@D)/fip/zero_tmp $(@D)/fip/bl30_zero.bin \
$(@D)/fip/bl301.bin $(@D)/fip/bl301_zero.bin $(@D)/fip/bl30_new.bin \
bl30
bash $(@D)/fip/blx_fix.sh \
$(@D)/fip/g12a/bl2.bin $(@D)/fip/zero_tmp $(@D)/fip/bl2_zero.bin \
$(@D)/fip/acs.bin $(@D)/fip/bl21_zero.bin $(@D)/fip/bl2_new.bin \
bl2
$(@D)/fip/g12a/aml_encrypt_g12a --bl30sig --input $(@D)/fip/bl30_new.bin \
--output $(@D)/fip/bl30_new.bin.g12a.enc \
--level v3
$(@D)/fip/g12a/aml_encrypt_g12a --bl3sig --input $(@D)/fip/bl30_new.bin.g12a.enc \
--output $(@D)/fip/bl30_new.bin.enc \
--level v3 --type bl30
$(@D)/fip/g12a/aml_encrypt_g12a --bl3sig --input $(@D)/fip/g12a/bl31.img \
--output $(@D)/fip/bl31.img.enc \
--level v3 --type bl31
$(@D)/fip/g12a/aml_encrypt_g12a --bl3sig --input $(BINARIES_DIR)/u-boot.bin \
--output $(@D)/fip/bl33.bin.enc \
--level v3 --type bl33
$(@D)/fip/g12a/aml_encrypt_g12a --bl2sig --input $(@D)/fip/bl2_new.bin \
--output $(@D)/fip/bl2.n.bin.sig
$(@D)/fip/g12a/aml_encrypt_g12a --bootmk \
--output $(@D)/fip/u-boot.bin \
--bl2 $(@D)/fip/bl2.n.bin.sig \
--bl30 $(@D)/fip/bl30_new.bin.enc \
--bl31 $(@D)/fip/bl31.img.enc \
--bl33 $(@D)/fip/bl33.bin.enc \
--ddrfw1 $(@D)/fip/g12a/ddr4_1d.fw \
--ddrfw2 $(@D)/fip/g12a/ddr4_2d.fw \
--ddrfw3 $(@D)fip/g12a/ddr3_1d.fw \
--ddrfw4 $(@D)/fip/g12a/piei.fw \
--ddrfw5 $(@D)/fip/g12a/lpddr4_1d.fw \
--ddrfw6 $(@D)/fip/g12a/lpddr4_2d.fw \
--ddrfw7 $(@D)/fip/g12a/diag_lpddr4.fw \
--ddrfw8 $(@D)/fip/g12a/aml_ddr.fw \
--ddrfw9 $(@D)/fip/g12a/lpddr3_1d.fw \
--level v3
cp $(@D)/fip/u-boot.bin $(@D)/u-boot.sm1
endef
else ifeq ($(BR2_PACKAGE_HARDKERNEL_BOOT_ODROID_XU4),y)
HARDKERNEL_BOOT_VERSION = 88af53fbcef8386cb4d5f04c19f4b2bcb69e90ca