-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
odroid/hc4: new configuration package
Signed-off-by: Christian Stewart <[email protected]>
- Loading branch information
Showing
24 changed files
with
441 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Base configuration for the ODROID C4 board (aarch64). | ||
Base configuration for the ODROID C4 board. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Odroid HC4 | ||
|
||
This configuration targets the Odroid HC4. | ||
|
||
**Petitboot must be bypassed to boot this board.** | ||
|
||
See the [common config](../) for more information. | ||
|
||
## Getting Started | ||
|
||
Set the comma-separated `SKIFF_CONFIG` variable: | ||
|
||
```sh | ||
$ export SKIFF_CONFIG=odroid/hc4,skiff/core | ||
$ make configure # configure the system | ||
$ make compile # build the system | ||
``` | ||
|
||
Once the build is complete, we will flash to a MicroSD card to boot. You will | ||
need to `sudo bash` for this on most systems. | ||
|
||
```sh | ||
$ sudo bash # switch to root | ||
$ export ODROID_SD=/dev/sdz # make sure this is right! (usually sdb) | ||
$ make cmd/odroid/common/format # tell skiff to format the device | ||
$ make cmd/odroid/common/install # tell skiff to install the os | ||
``` | ||
|
||
You only need to run the `format` step once. It will create the partition table. | ||
The `install` step will overwrite the current Skiff installation on the card, | ||
taking care to not touch any persistent data (from the persist partition). It's | ||
safe to upgrade Skiff independently from your persistent data. | ||
|
||
You will then need to disable Petitboot: | ||
|
||
## Disabling Petitboot | ||
|
||
On default, the HC4 boots from SPI, which contains petitboot. If the black | ||
button on the bottom of the device (the "boot select" switch) is pressed, the | ||
board will use u-boot from the MicroSD card. | ||
|
||
To permanently disable petitboot: | ||
|
||
1. Attach a display & keyboard to the device. | ||
2. Power on the board. | ||
3. Go to "Exit to shell" and enter these commands: | ||
|
||
```sh | ||
flash_eraseall /dev/mtd0 | ||
flash_eraseall /dev/mtd1 | ||
flash_eraseall /dev/mtd2 | ||
flash_eraseall /dev/mtd3 | ||
``` | ||
|
||
Alternatively, boot to SkiffOS using the black button on the bottom of the | ||
device while booting, then use the following command to erase the SPI: | ||
|
||
```sh | ||
flash_erase /dev/mtd0 0 0 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
BR2_aarch64=y | ||
BR2_cortex_a55=y | ||
BR2_ARM_FPU_FP_ARMV8=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
BR2_LINUX_KERNEL_INTREE_DTS_NAME="amlogic/meson-sm1-odroid-hc4" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
BR2_TARGET_GENERIC_GETTY=y | ||
BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y | ||
BR2_TARGET_GENERIC_GETTY_PORT="ttyAML0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
BR2_TARGET_UBOOT_CUSTOM_VERSION=y | ||
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2022.07-rc4" | ||
|
||
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="odroid-hc4" | ||
|
||
# Closed source blobs for amlogic fip | ||
BR2_PACKAGE_AMLOGIC_BOOT_FIP=y | ||
BR2_PACKAGE_AMLOGIC_BOOT_FIP_BOARD="odroid-hc4" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# enable flash_eraseall tool | ||
CONFIG_FLASH_ERASEALL=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-march=armv8.2-a+crypto+fp16+rcpc+dotprod -mtune=cortex-a55 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
#!/bin/bash | ||
|
||
IMAGES_DIR=${SKIFF_BUILDROOT_DIR}/output/images | ||
|
||
echo "Copying sd_fuse script..." | ||
rsync -rav $SKIFF_CURRENT_CONF_DIR/resources/sd_fuse/ $IMAGES_DIR/hk_sd_fuse/ | ||
|
||
# this helper function includes postprocess for u200 and its variants. | ||
# $1 PATH for uboot blob repo | ||
# $2 family g12a or g12b | ||
# source: https://raw.githubusercontent.com/armbian/build/master/config/sources/families/include/meson64_common.inc | ||
uboot_g12_postprocess() | ||
{ | ||
$1/blx_fix.sh $1/bl30.bin \ | ||
zero_tmp \ | ||
bl30_zero.bin \ | ||
$1/bl301.bin \ | ||
bl301_zero.bin \ | ||
bl30_new.bin bl30 | ||
|
||
$1/blx_fix.sh $1/bl2.bin \ | ||
zero_tmp \ | ||
bl2_zero.bin \ | ||
$1/acs.bin \ | ||
bl21_zero.bin \ | ||
bl2_new.bin bl2 | ||
|
||
$1/aml_encrypt_$2 --bl30sig \ | ||
--input bl30_new.bin \ | ||
--output bl30_new.bin.g12.enc \ | ||
--level v3 | ||
$1/aml_encrypt_$2 --bl3sig \ | ||
--input bl30_new.bin.g12.enc \ | ||
--output bl30_new.bin.enc \ | ||
--level v3 --type bl30 | ||
$1/aml_encrypt_$2 --bl3sig \ | ||
--input $1/bl31.img \ | ||
--output bl31.img.enc \ | ||
--level v3 --type bl31 | ||
$1/aml_encrypt_$2 --bl3sig \ | ||
--input bl33.bin \ | ||
--compress lz4 \ | ||
--output bl33.bin.enc \ | ||
--level v3 --type bl33 | ||
$1/aml_encrypt_$2 --bl2sig \ | ||
--input bl2_new.bin \ | ||
--output bl2.n.bin.sig | ||
if [ -e $1/lpddr3_1d.fw ] | ||
then | ||
$1/aml_encrypt_$2 --bootmk --output u-boot-signed.bin \ | ||
--bl2 bl2.n.bin.sig \ | ||
--bl30 bl30_new.bin.enc \ | ||
--bl31 bl31.img.enc \ | ||
--bl33 bl33.bin.enc \ | ||
--ddrfw1 $1/ddr4_1d.fw \ | ||
--ddrfw2 $1/ddr4_2d.fw \ | ||
--ddrfw3 $1/ddr3_1d.fw \ | ||
--ddrfw4 $1/piei.fw \ | ||
--ddrfw5 $1/lpddr4_1d.fw \ | ||
--ddrfw6 $1/lpddr4_2d.fw \ | ||
--ddrfw7 $1/diag_lpddr4.fw \ | ||
--ddrfw8 $1/aml_ddr.fw \ | ||
--ddrfw9 $1/lpddr3_1d.fw \ | ||
--level v3 | ||
else | ||
$1/aml_encrypt_$2 --bootmk --output u-boot-signed.bin \ | ||
--bl2 bl2.n.bin.sig \ | ||
--bl30 bl30_new.bin.enc \ | ||
--bl31 bl31.img.enc \ | ||
--bl33 bl33.bin.enc \ | ||
--ddrfw1 $1/ddr4_1d.fw \ | ||
--ddrfw2 $1/ddr4_2d.fw \ | ||
--ddrfw3 $1/ddr3_1d.fw \ | ||
--ddrfw4 $1/piei.fw \ | ||
--ddrfw5 $1/lpddr4_1d.fw \ | ||
--ddrfw6 $1/lpddr4_2d.fw \ | ||
--ddrfw7 $1/diag_lpddr4.fw \ | ||
--ddrfw8 $1/aml_ddr.fw \ | ||
--level v3 | ||
fi | ||
} | ||
|
||
echo "Building u-boot fip..." | ||
cd ${IMAGES_DIR} | ||
mkdir -p ./boot-fip | ||
cd ./boot-fip | ||
cp ../u-boot.bin bl33.bin | ||
uboot_g12_postprocess ${IMAGES_DIR}/amlogic-boot-fip/ g12a | ||
cp u-boot-signed.bin.sd.bin ${IMAGES_DIR}/ | ||
echo "Built u-boot fip for odroid hc4." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# CONFIG_CLK_QORIQ is not set | ||
# CONFIG_COMMON_CLK_CDCE706 is not set | ||
# CONFIG_COMMON_CLK_CDCE925 is not set | ||
# CONFIG_COMMON_CLK_CS2000_CP is not set | ||
# CONFIG_COMMON_CLK_NXP is not set | ||
# CONFIG_COMMON_CLK_PIC32 is not set | ||
# CONFIG_COMMON_CLK_PWM is not set | ||
# CONFIG_COMMON_CLK_PXA is not set | ||
# CONFIG_COMMON_CLK_SCPI is not set | ||
# CONFIG_COMMON_CLK_SI514 is not set | ||
# CONFIG_COMMON_CLK_SI5351 is not set | ||
# CONFIG_COMMON_CLK_SI570 is not set | ||
# CONFIG_COMMON_CLK_VERSATILE is not set | ||
# CONFIG_FTL is not set | ||
# CONFIG_IIO_BUFFER_CB is not set | ||
# CONFIG_INFTL is not set | ||
# CONFIG_LEDS_TRIGGER_MTD is not set | ||
# CONFIG_MTD_ABSENT is not set | ||
# CONFIG_MTD_AFS_PARTS is not set | ||
# CONFIG_MTD_AR7_PARTS is not set | ||
# CONFIG_MTD_CFI is not set | ||
# CONFIG_MTD_CFI_I4 is not set | ||
# CONFIG_MTD_CFI_I8 is not set | ||
# CONFIG_MTD_DOCG3 is not set | ||
# CONFIG_MTD_JEDECPROBE is not set | ||
# CONFIG_MTD_LPDDR is not set | ||
# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
# CONFIG_MTD_MT81xx_NOR is not set | ||
# CONFIG_MTD_NAND_BRCMNAND is not set | ||
# CONFIG_MTD_NAND_CAFE is not set | ||
# CONFIG_MTD_NAND_DENALI_DT is not set | ||
# CONFIG_MTD_NAND_DENALI_PCI is not set | ||
# CONFIG_MTD_NAND_DISKONCHIP is not set | ||
# CONFIG_MTD_NAND_DOCG4 is not set | ||
# CONFIG_MTD_NAND_ECC_BCH is not set | ||
# CONFIG_MTD_NAND_ECC_SMC is not set | ||
# CONFIG_MTD_NAND_GPIO is not set | ||
# CONFIG_MTD_NAND_HISI504 is not set | ||
# CONFIG_MTD_NAND_MTK is not set | ||
# CONFIG_MTD_NAND_NANDSIM is not set | ||
# CONFIG_MTD_NAND_OMAP_BCH_BUILD is not set | ||
# CONFIG_MTD_NAND_PLATFORM is not set | ||
# CONFIG_MTD_NAND_RICOH is not set | ||
# CONFIG_MTD_ONENAND is not set | ||
# CONFIG_MTD_PARTITIONED_MASTER is not set | ||
# CONFIG_MTD_RAM is not set | ||
# CONFIG_MTD_REDBOOT_PARTS is not set | ||
# CONFIG_MTD_ROM is not set | ||
# CONFIG_MTD_SM_COMMON is not set | ||
# CONFIG_MTD_SPINAND_MT29F is not set | ||
# CONFIG_MTD_SWAP is not set | ||
# CONFIG_MTD_TESTS is not set | ||
# CONFIG_MTD_UBI_BLOCK is not set | ||
# CONFIG_MTD_UBI_FASTMAP is not set | ||
# CONFIG_MTD_UBI_GLUEBI is not set | ||
# CONFIG_NFTL is not set | ||
# CONFIG_RFD_FTL is not set | ||
# CONFIG_SM_FTL is not set | ||
# CONFIG_SSFDC is not set | ||
|
||
CONFIG_COMMON_CLK_XGENE=y | ||
CONFIG_IIO=y | ||
CONFIG_IIO_BUFFER=y | ||
CONFIG_IIO_KFIFO_BUF=y | ||
CONFIG_MTD=y | ||
CONFIG_MTD_BLKDEVS=y | ||
CONFIG_MTD_BLOCK=y | ||
CONFIG_MTD_CFI_I1=y | ||
CONFIG_MTD_CFI_I2=y | ||
CONFIG_MTD_CMDLINE_PARTS=y | ||
CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
CONFIG_MTD_NAND=y | ||
CONFIG_MTD_NAND_ECC=y | ||
CONFIG_MTD_NAND_IDS=y | ||
CONFIG_MTD_OF_PARTS=y | ||
CONFIG_MTD_OOPS=y | ||
CONFIG_MTD_SPI_NOR=y | ||
CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y | ||
CONFIG_MTD_UBI=y | ||
CONFIG_MTD_UBI_BEB_LIMIT=20 | ||
CONFIG_MTD_UBI_WL_THRESHOLD=4096 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CONFIG_CMDLINE="" |
Oops, something went wrong.