View Issue Details

IDProjectCategoryView StatusLast Update
0004891UBootU-Bootpublic2021-10-05 12:19
Reporterderksen Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Target Versionfsimx8mm-Y2021.04Fixed in Versionfsimx8mm-Y2021.04 
Summary0004891: Add fsimage command to handle NBoot images
DescriptionAdd fsimage command to handle NBoot images

Add a new command fsimage. This command is mainly used to save (install)
NBoot images. But it can also show the current BOARD-ID, the current
BOARD-CFG, the current F&S architecture and the current FIRMWARE image.
    
Add cmd/fsimage.c for the command itself. Add CONFIG_CMD_FSIMAGE to
Kconfig and change Makefile to build the new file.
    
The main stuff for handling the fsimage command is done in
board/F+S/common/fs_image_common.c. Add the following new functions:
    
fs_image_get_arch()
Returns the current architecture.
    
fs_image_get_board_id()
Returns the current BOARD-ID.
    
fs_image_get_cfg_addr_check()
Checks if the BOARD-CFG in OCRAM is valid and returns its address.
    
fs_image_list()
Lists the contents of an F&S image, similar to scripts/fsimage.sh.
    
fs_image_load_firmware()
Loads the FIRMWARE image from NAND or eMMC to the given address for
further inspection, for example to list the contents.
    
fs_image_save()
Does some sanity checks on the NBoot image in RAM and then saves it
to NAND or eMMC.
    
To implement all these functions, the code in fs_image_common.c is
heavily restructured. Functions that are only available in SPL are
grouped together, functions that are only available in NBoot are
grouped together and functions that are available in both are
grouped together. A lot of auxiliary functions are introduced to
avoid duplicate code. Change board/F+S/common/Makefile to build
fs_image_common not only in SPL case.
    
Activate the new fsimage command in fsimx8mm_defconfig.
Forum Link

Activities

There are no notes attached to this issue.