aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Marinho <jose.marinho@arm.com>2021-08-06 14:27:17 +0100
committerJose Marinho <jose.marinho@arm.com>2021-08-07 01:41:31 +0100
commit72cd65b488022cc7ecc8776e4a4fc33a03f4a81b (patch)
tree9c70d3964b55818ee30b8493a8269243be8df3e6
parent04dcdbb9d0f9d2e8e57258d2e2a93d0bbff3874c (diff)
extend Readme.rst
-rw-r--r--Readme.rst136
1 files changed, 93 insertions, 43 deletions
diff --git a/Readme.rst b/Readme.rst
index 8cf221f..e917f32 100644
--- a/Readme.rst
+++ b/Readme.rst
@@ -15,20 +15,20 @@ Cloning the prototype
::
- repo init -u https://github.com/jmarinho/u-boot-manifest -m fwu_BET0.xml
+ repo init -u https://git.linaro.org/people/jose.marinho/u-boot-manifest.git -m fwu_BET0.xml
repo sync
-Prototype build
----------------
+Imx8mm-evk
+-----------
.. note::
The build of the prototype was tested with gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.
This cross compiler can be obtained from: https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz
-Build prototype for imx8mm-evk
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Build
+~~~~~
::
@@ -38,25 +38,8 @@ Build prototype for imx8mm-evk
make -j8
-Build prototype for qemu
-~~~~~~~~~~~~~~~~~~~~~~~~
-
-::
-
- export CROSS_COMPILE=aarch64-linux-gnu-
- make qemu_arm64_defconfig
- make addcapsuleconfig
-
- make -j8
-
-
Executing the Prototype
------------------------
-
-
-
-Execution on the imx8MM-evk
-~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~
The board's dipswitch selects booting from MicroSD.
@@ -79,20 +62,83 @@ A GPT along with an rootfs partition and a ESP can be added by executing the fol
./scripts/gen_ESP.sh imx8mm_sd.img 280
+The partition with the ext4 filesystem should contains:
+- a Linux kernel (tested with v5.8.0-rc1)
+- the board dtb obtained from the kernel build (tested with v5.8.0-rc1)
+- the capsule (the scripts at scripts/build_capsule.sh creates the fip.capsule file which can be copied to the ext4 filesystem)
-Start qemu simulation
-~~~~~~~~~~~~~~~~~~~~~
+Write the imx8mm_sd.img onto a SD card.
+Place the SD card on the imx8mm-evk and power the board ON.
-export VIRTDISK=disk.img
-# The proto has been tested with qemu v6.0, see the "Build Qemu" section below for instructions to build qemu v6.0
-make qemu-fip
+Install Capsule from u-boot shell
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+ load mmc 1:1 70000000 fip.capsule
+ efidebug tup
+Install Capsule from Linux
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The following assumes that Image and imx8mm-evk.dtb are in the ext4 filesystem.
+From the u-boot shell:
+
+::
+
+ efidebug boot add -b 0000 ‘kernel’ mmc 1:1 Image -s 'ttymxc3,115200 earlycon=ec_imx6q,0x30890000,115200 debug=7 cpuidle.off=1 default_hugepagesz=1024m hugepagesz=1024m hugepages=2 pci=pcie_bus_perf rw fstype=ext4 root=/dev/mmcblk1p1 rootwait rw init=/sbin/init';
+ efidebug boot add -b 0001 ‘ESP’ mmc 1:2 EFI/UpdateCapsule;
+ efidebug boot order 0001 0000
+
+ reset
+
+The platform will reset, Linux will boot as the second boot option.
+
+From Linux:
+
+::
+
+ #mount the ESP partition in /mnt
+ mount /dev/mmcblk1p2 /mnt
+
+ cp /fip.capsule /mnt/EFI/UpdateCapsule/
+
+ reboot
+
+ #The system resets
+ #u-boot install the capsule
+
+ #the system will reset with the newly installed FW.
+
+Qemu
+----
+
+Build
+~~~~~
+
+::
+
+ export CROSS_COMPILE=aarch64-linux-gnu-
+ make qemu_arm64_defconfig
+ make addcapsuleconfig
+
+ make -j8
+
+Execute the simulation
+~~~~~~~~~~~~~~~~~~~~~~
+
+::
+
+ export VIRTDISK=disk.img
+
+ # The proto has been tested with qemu v6.0, see the "Build Qemu" section below for instructions to build qemu v6.0.
+ export QEMU_BIN=<qemu-system-aarch64 binary>
+
+ make qemu-fip
-Triggering a capsule update
----------------------------
Triggering UpdateCapsule directly from the U-boot shell
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -109,32 +155,36 @@ Triggering UpdateCapsule directly from the U-boot shell
efidebug psci_reset
-Triggering UpdateCapsule from Linux
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Install Capsule from Linux
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+From the u-boot shell:
::
+ efidebug boot add -b 0000 ‘kernel’ virtio 0:1 Image -s 'ttyAMA0,115200 earlycon=pl011,mmio32,0x9000000 debug=7 default_hugepagesz=1024m hugepagesz=1024m hugepages=2 pci=pcie_bus_perf root=/dev/vda1 rw fstype=ext4 init=/sbin/init';
+ efidebug boot add -b 0001 ‘ESP’ virtio 0:2 EFI/UpdateCapsule;
+ efidebug boot order 0001 0000
- setenv bootargs ttyAMA0,115200 earlycon=pl011,mmio32,0x9000000 debug=7 default_hugepagesz=1024m hugepagesz=1024m hugepages=2 pci=pcie_bus_perf root=/dev/vda rw fstype=ext4 init=/bin/sh
- virtio scan; load virtio 0 $fdt_addr qemu_arm64.dtb; load virtio 0 0x70000000 Image; bootefi 0x70000000 $fdt_addr
+ reset
+From Linux:
+
+::
# Linux boots up
- mount -n -t sysfs none /sys
- cat /sys/firmware/efi/esrt/entries/entry0/is_trial_state
+ #mount the ESP partition in /mnt
+ mount /dev/mmcblk1p2 /mnt
- cat fip.capsule > dev/efi_capsule_loader
+ cp /fip.capsule /mnt/EFI/UpdateCapsule/
reboot -f
- # Qemu will reset
+ # Qemu will reset.
- setenv bootargs ttyAMA0,115200 earlycon=pl011,mmio32,0x9000000 debug=7 default_hugepagesz=1024m hugepagesz=1024m hugepages=2 pci=pcie_bus_perf root=/dev/vda rw fstype=ext4 init=/bin/sh
- virtio scan; load virtio 0 $fdt_addr qemu_arm64.dtb; load virtio 0 0x70000000 Image; bootefi 0x70000000 $fdt_addr
+ # u-boot installes the capsule.
- # Linux boots up
+ # Linux boots up with the newly installed FW.
- mount -n -t sysfs none /sys
- cat /sys/firmware/efi/esrt/entries/entry0/is_trial_state
Auxiliar steps
==============