Skip to content

Commit

Permalink
meta-nuvoton: support build norootfs
Browse files Browse the repository at this point in the history
default-distrovars.inc depend on ARCH_DEFAULT_KERNELIMAGETYPE
to set KERNEL_IMAGETYPE, vendor could overwrite KERNEL_IMAGETYPE
in configuration file to change kernel target build.

since static-norootfs.inc set KERNEL_IMAGETYPE and KERNEL_IMAGETYPES
as ARCH_DEFAULT_KERNELIMAGETYPE, we overwrite both value to "Image"
since arm64 kernel doesn't support zImage target.

Add FLASH_MANIFEST_OFFSET and merge_bootloader in nuvoton npcm8xx.
Add compress kernel image when build norootfs.

Tested:
build norootfs evb-npcm845 target ok
flash norootfs flash-evb-npcm845 image ok

Signed-off-by: James Chiang <[email protected]>
Signed-off-by: Tim Lee <[email protected]>
Change-Id: I688cd48f2cc43f464e23f4a1f5408ce5b7195c56
  • Loading branch information
timlee66 authored and williamspatrick committed Feb 26, 2024
1 parent 1a28efb commit 3a63ed4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions meta-nuvoton/conf/machine/evb-npcm845.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ require conf/machine/include/obmc-bsp-common.inc

FLASH_SIZE = "65536"
FLASH_UBOOT_OFFSET:flash-65536 = "0"
FLASH_MANIFEST_OFFSET:flash-65536 = "3832"
FLASH_UBOOT_ENV_OFFSET:flash-65536 = "3840"
FLASH_KERNEL_OFFSET:flash-65536 = "4096"
FLASH_ROFS_OFFSET:flash-65536 = "12288"
Expand Down
4 changes: 4 additions & 0 deletions meta-nuvoton/conf/machine/include/npcm8xx.inc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ require conf/machine/include/nuvoton.inc
require conf/machine/include/igps-keys.inc

KERNEL_IMAGETYPE ?= "Image"

KERNEL_IMAGETYPE:df-obmc-static-norootfs = "Image"
KERNEL_IMAGETYPES:df-obmc-static-norootfs = "${KERNEL_IMAGETYPE}"

KERNEL_EXTRA_ARGS ?= "UIMAGE_LOADADDR=0x00008000"

UBOOT_MACHINE ?= "ArbelEVB_defconfig"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ OPTEE_BIN = "tee.bin"
UBOOT_BIN = "u-boot.bin"
BB_NO_TIP_BIN = "arbel_a35_bootblock_no_tip.bin"

FIT_KERNEL_COMP_ALG:df-obmc-static-norootfs = "gzip"
FIT_KERNEL_COMP_ALG_EXTENSION:df-obmc-static-norootfs = ".gz"

# Align images if needed
python do_pad_binary() {
TIP_IMAGE = d.getVar('TIP_IMAGE', True)
Expand Down Expand Up @@ -257,7 +260,9 @@ do_generate_ext4_tar:append() {
addtask do_pad_binary before do_prepare_bootloaders
addtask do_sign_binary before do_merge_bootloaders after do_prepare_bootloaders
addtask do_prepare_bootloaders before do_generate_static after do_generate_rwfs_static
addtask do_prepare_bootloaders before do_generate_static_norootfs after do_image_cpio
addtask do_merge_bootloaders before do_generate_static after do_sign_binary
addtask do_merge_bootloaders before do_generate_static_norootfs after do_sign_binary
addtask do_merge_bootloaders before do_generate_ext4_tar after do_prepare_bootloaders

# Include the full bootblock and u-boot in the final static image
Expand All @@ -280,5 +285,7 @@ do_generate_ubi_tar[depends] += "${PN}:do_prepare_bootloaders"
do_generate_ubi_tar[depends] += "${PN}:do_merge_bootloaders"
do_generate_static_tar[depends] += "${PN}:do_prepare_bootloaders"
do_generate_static_tar[depends] += "${PN}:do_merge_bootloaders"
do_generate_static_norootfs[depends] += "${PN}:do_prepare_bootloaders"
do_generate_static_norootfs[depends] += "${PN}:do_merge_bootloaders"
do_generate_ext4_tar[depends] += "${PN}:do_prepare_bootloaders"
do_generate_ext4_tar[depends] += "${PN}:do_merge_bootloaders"

0 comments on commit 3a63ed4

Please sign in to comment.