diff mbox series

[5/6] arm-bsp/corstone1000: Update Corstone-1000 user guide

Message ID 20240430162957.94499-6-emekcan.aras@arm.com
State New
Headers show
Series Add support for using the systemready layer to Corstone-1000 | expand

Commit Message

Emekcan Aras April 30, 2024, 4:29 p.m. UTC
From: Drew Reed <Drew.Reed@arm.com>

Update the Corstone-1000 user guide with the new instructions on how to
build/use an ESP image and how to use the meta-arm-systemready layer to
run the ACS tests.

Signed-off-by: Drew Reed <Drew.Reed@arm.com>
---
 .../documentation/corstone1000/user-guide.rst | 132 ++++--------------
 1 file changed, 27 insertions(+), 105 deletions(-)
diff mbox series

Patch

diff --git a/meta-arm-bsp/documentation/corstone1000/user-guide.rst b/meta-arm-bsp/documentation/corstone1000/user-guide.rst
index 073ea213..4b15d6c3 100644
--- a/meta-arm-bsp/documentation/corstone1000/user-guide.rst
+++ b/meta-arm-bsp/documentation/corstone1000/user-guide.rst
@@ -395,77 +395,12 @@  running the ACS tests.
 
 **Common to FVP and FPGA:**
 
-#. Create an empty 100 MB partition:
-   ::
-
-      dd if=/dev/zero of=corstone1000-efi-partition.img iflag=fullblock bs=512 count=204800 && sync
-
-#. Use OpenSuse Raw image to copy the contents of EFI partition.
-
-   To download OpenSUSE Tumbleweed raw image:
-     - Under `OpenSUSE Tumbleweed appliances <http://download.opensuse.org/ports/aarch64/tumbleweed/appliances/>`__
-     - The user should look for a Tumbleweed-ARM-JeOS-efi.aarch64-* Snapshot, for example,
-       ``openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64-<date>-Snapshot<date>.raw.xz``
-
-   Once the .raw.xz file is downloaded, the raw image file needs to be extracted:
-
-   ::
-
-      unxz <file-name.raw.xz>
-
-
-   The above command will generate a file ending with extension .raw image. Use the
-   following command to get address of the first partition
-
-   ::
-
-     fdisk -lu <path-to-img>/openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64-<date>-Snapshot<date>.raw
-     ->  Device                                                                               Start     End  Sectors  Size Type
-          <path-to-img>/openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64-<date>-Snapshot<date>.raw1    8192   40959    32768   16M EFI System
-          <path-to-img>/openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64-<date>-Snapshot<date>.raw2   40960 1064959  1024000  500M Linux swap
-          <path-to-img>/openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64-<date>-Snapshot<date>.raw3 1064960 5369822  4304863  2.1G Linux filesystem
-
-     ->   <blockaddress_1st_partition> = 8192
-     ->   <sectorsize_1st_partition> = 32768
-
-#. Copy the ESP from opensuse image to empty image:
-
-   ::
-
-     dd conv=notrunc if=openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64-<date>-Snapshot<date>.raw skip=<blockaddress_1st_partition> of=corstone1000-efi-partition.img seek=<blockaddress_1st_partition> iflag=fullblock seek=<blockaddress_1st_partition> bs=512 count=<sectorsize_1s_partition> && sync
-
-
-#. Create the file efi_disk.layout locally. Copy the content of provided disk layout below to the efi_disk.layout to label the ESP correctly.
-
-   efi_disk.layout
-   ::
-
-     label: gpt
-     label-id: AC53D121-B818-4515-9031-BE02CCEB8701
-     device: corstone1000-efi-partition.img
-     unit: sectors
-     first-lba: 34
-     last-lba: 204766
-
-     corstone1000-efi-partition.img : start=8192, size=32768, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, uuid=792D821F-98AE-46E3-BABD-948003A650F8, name="p.UEFI"
-
-   And use the following command the label the newly created ESP.
-
-   ::
-
-      sfdisk corstone1000-efi-partition.img < efi_disk.layout
-
-   To test the image, you can now mount the disk image
-
-   ::
-
-      fdisk -lu corstone1000-efi-partition.img
-      ->  Device                          Start   End Sectors Size Type
-          corstone1000-efi-partition.img1  8192 40959   32768  16M EFI System
-
-          <offset_1st_partition> = 8192 * 512 (sector size) = 4194304
+::
+  kas build meta-arm/kas/corstone1000-{mps3,fvp}.yml:meta-arm/ci/debug.yml --target corstone1000-esp-image
 
-      sudo mount -o loop,offset=4194304 corstone1000-efi-partition.img /mount_point
+Once the build is successful ``corstone1000-esp-image-corstone1000-{mps3,fvp}.wic`` will be available in either:
+ - ``<_workspace>/build/tmp/deploy/images/corstone1000-fvp/`` folder for FVP build;
+ - ``<_workspace>/build/tmp/deploy/images/corstone1000-mps3/`` folder for FPGA build.
 
 **Using ESP in FPGA:**
 
@@ -476,19 +411,16 @@  confirm). Be cautious here and don't confuse your host machine own hard drive wi
 USB drive. Run the following commands to prepare the ACS image in USB stick:
 
 ::
-
-   sudo dd if=corstone1000-efi-partition.img of=/dev/sdb iflag=direct oflag=direct status=progress bs=512; sync;
+   sudo dd if=corstone1000-esp-image-corstone1000-mps3.wic of=/dev/sdb iflag=direct oflag=direct status=progress bs=512; sync;
 
 Now you can plug this USB stick to the board together with ACS test USB stick.
 
 **Using ESP in FVP:**
 
-The ESP disk image can directly be used in Corstone-1000 FVP by simply passing it as
-the 2nd MMC card image.
+The ESP disk image once created will be used automatically in the Corstone-1000 FVP as the 2nd MMC card image.
 
 ::
-
-   kas shell meta-arm/kas/corstone1000-fvp.yml:meta-arm/ci/debug.yml -c "../meta-arm/scripts/runfvp -- -C board.msd_mmc.p_mmc_file="${<path-to-img>/ir_acs_live_image.img}" -C board.msd_mmc_2.p_mmc_file="${<path-to-img>/corstone1000-efi-partition.img}"
+   kas shell meta-arm/kas/corstone1000-fvp.yml:meta-arm/ci/debug.yml -c "../meta-arm/scripts/runfvp -- -C board.msd_mmc.p_mmc_file="${<path-to-img>/ir_acs_live_image.img}"
 
 Clean Secure Flash Before Testing (applicable to FPGA only)
 ===========================================================
@@ -616,36 +548,16 @@  the platform is booted to linux at the end of the ACS tests.
 FVP instructions for ACS image and run
 ======================================
 
-Download ACS image from:
- - ``https://gitlab.arm.com/systemready/acs/arm-systemready/-/tree/main/IR/prebuilt_images/v23.03_2.0.0``
-
-Use the below command to run the FVP with EFI and ACS image support in the
-SD cards.
-
+The FVP has been integrated in the meta-arm-systemready layer so the running of the ACS tests can be handled automatically as follows
 ::
 
-  unxz ${<path-to-img>/ir-acs-live-image-generic-arm64.wic.xz}
-
-  kas shell meta-arm/kas/corstone1000-fvp.yml:meta-arm/ci/debug.yml -c "../meta-arm/scripts/runfvp --terminals=xterm -- -C board.msd_mmc.p_mmc_file=<path-to-img>/ir-acs-live-image-generic-arm64.wic -C board.msd_mmc_2.p_mmc_file="${<path-to-img>/corstone1000-efi-partition.img}"
+  kas build meta-arm/ci/corstone1000-fvp.yml:meta-arm/ci/debug.yml:kas/arm-systemready-ir-acs.yml
 
-The test results can be fetched using following commands:
-
-::
-
-  sudo mkdir /mnt/test
-  sudo mount -o rw,offset=<offset_3rd_partition> <path-to-img>/ir-acs-live-image-generic-arm64.wic /mnt/test/
-  fdisk -lu <path-to-img>/ir-acs-live-image-generic-arm64.wic
-  ->  Device                                                     Start     End Sectors  Size Type
-       <path-to-img>/ir-acs-live-image-generic-arm64.wic1    2048  206847  204800   100M Microsoft basic data
-       <path-to-img>/ir-acs-live-image-generic-arm64.wic2  206848 1024239  817392 399.1M Linux filesystem
-       <path-to-img>/ir-acs-live-image-generic-arm64.wic3 1026048 1128447  102400    50M Microsoft basic data
+The details of how this layer works can be found in : ``<_workspace>/meta-arm-systemready/README.md``
 
-  ->   <offset_3rd_partition> = 1026048 * 512 (sector size) = 525336576
+**NOTE:** You can't use the standard meta-arm/kas/corstone1000-fvp.yml kas file as it sets the build up for only building firmware
 
-The FVP will reset multiple times during the test, and it might take up to 1 day to finish
-the test. At the end of test, the FVP host terminal will halt showing a shell prompt.
-Once test is finished, the FVP can be stoped, and result can be copied following above
-instructions.
+**NOTE:** These test might take up to 1 day to finish
 
 **NOTE:** A rare issue has been noticed (5-6% occurence) during which the FVP hangs during booting the system while running ACS tests.
 If this happens, please apply the following patch, rebuild the software stack for FVP and re-run the ACS tests.
@@ -796,12 +708,24 @@  the on disk method.
 Copying the FVP capsules
 ========================
 
-First, mount the IR image:
+First, Find the 1st partition offset:
+
+::
+
+  fdisk -lu <path-to-img>/ir-acs-live-image-generic-arm64.wic
+  ->  Device                                                     Start     End Sectors  Size Type
+       <path-to-img>/ir-acs-live-image-generic-arm64.wic1    2048  206847  204800   100M Microsoft basic data
+       <path-to-img>/ir-acs-live-image-generic-arm64.wic2  206848 1024239  817392 399.1M Linux filesystem
+       <path-to-img>/ir-acs-live-image-generic-arm64.wic3 1026048 1128447  102400    50M Microsoft basic data
+
+  ->   <offset_3rd_partition> = 2048 * 512 (sector size) = 1048576
+
+Next, mount the IR image:
 
 ::
 
    sudo mkdir /mnt/test
-   sudo mount -o rw,offset=1048576 <path-to-img>/ir-acs-live-image-generic-arm64.wic  /mnt/test
+   sudo mount -o rw,offset=<first_partition_offset> <path-to-img>/ir-acs-live-image-generic-arm64.wic  /mnt/test
 
 Then, copy the capsules:
 
@@ -817,8 +741,6 @@  Then, unmount the IR image:
 
    sudo umount /mnt/test
 
-**NOTE:** Please refer to `FVP instructions for ACS image and run`_ section to find the first partition offset.
-
 ******************************
 Performing the capsule update
 ******************************