Skip to content

Commit

Permalink
README: Update instructions for building a flashable image
Browse files Browse the repository at this point in the history
Signed-off-by: Nhi Pham <npham@amperecomputing.com>
  • Loading branch information
nhivp committed Oct 29, 2021
1 parent 1ff7eff commit f28c438
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ tianocore_img: _check_atf_slim _check_board_setting tianocore_fd
dd bs=1024 seek=2048 if=$(OUTPUT_FD_IMAGE) of=$(OUTPUT_RAW_IMAGE); \
fi

# For Ampere ATF version 1.03 and 2.01, the following supports adding 4MB padding to the final image for
# compatibility with the support of firmware update utility.
@if [ $(ATF_MAJOR)$(ATF_MINOR) -eq 103 ] || [ $(ATF_MAJOR)$(ATF_MINOR) -eq 201 ]; then \
dd if=/dev/zero bs=1024 count=4096 | tr "\000" "\377" > $(OUTPUT_IMAGE); \
dd bs=1 seek=4194304 conv=notrunc if=$(OUTPUT_RAW_IMAGE) of=$(OUTPUT_IMAGE); \
Expand Down
13 changes: 3 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,8 @@ $ python nvparam.py -f Platform/Ampere/JadePkg/jade_board_setting.txt -o BUILDS/

### Build integrated UEFI + Board Setting + ATF image

For Ampere ATF 1.03 and later version
```
$ dd bs=1024 count=6144 if=/dev/zero | tr "\000" "\377" > BUILDS/jade_tianocore_atf/jade_tianocore_atf.img
$ dd bs=1 seek=4194304 conv=notrunc if=<ampere_atf_image_filepath> of=BUILDS/jade_tianocore_atf/jade_tianocore_atf.img
$ dd bs=1 seek=6225920 conv=notrunc if=BUILDS/jade_tianocore_atf/jade_board_setting.bin of=BUILDS/jade_tianocore_atf/jade_tianocore_atf.img
$ dd bs=1024 seek=6144 if=BUILDS/jade_tianocore_atf/jade_tianocore.fip.signed of=BUILDS/jade_tianocore_atf/jade_tianocore_atf.img
Generating the final image with the following commands:

Result: BUILDS/jade_tianocore_atf/jade_tianocore_atf.img
```

For Ampere ATF 1.02 version
```
$ dd bs=1024 count=2048 if=/dev/zero | tr "\000" "\377" > BUILDS/jade_tianocore_atf/jade_tianocore_atf.img
$ dd bs=1 conv=notrunc if=<ampere_atf_image_filepath> of=BUILDS/jade_tianocore_atf/jade_tianocore_atf.img
Expand All @@ -107,6 +98,8 @@ $ dd bs=1024 seek=2048 if=BUILDS/jade_tianocore_atf/jade_tianocore.fip.signed of
Result: BUILDS/jade_tianocore_atf/jade_tianocore_atf.img
```

Note that the `jade_tianocore_atf.img` image is flashed at the beginning of the ATF SLIM region according to the SPI-NOR Flash Layout.

### Build Tianocore Capsule

For current Ampere ATF
Expand Down

0 comments on commit f28c438

Please sign in to comment.