Re: [isar-cip-core][PATCH] Update README.swupdate.md for bullseye & 5.10


Jan Kiszka
 

Hehe, someone actually read AND tried the manual :). Thanks for caring!

Would be good to list some reasoning for switching to bullseye here.
Buster should still work, "just" not with 4.19 anymore.

In fact, we should think about making bullseye default in kas-cip.yml.

On 25.05.22 11:20, Hannah Kiekens wrote:
Signed-off-by: Hannah Kiekens <hannah.kiekens@...>
---
doc/README.swupdate.md | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/doc/README.swupdate.md b/doc/README.swupdate.md
index e28db24..ab957f1 100644
--- a/doc/README.swupdate.md
+++ b/doc/README.swupdate.md
@@ -13,13 +13,13 @@ host$ git clone https://gitlab.com/cip-project/cip-core/isar-cip-core.git
Set up `kas-container` as described in the [top-level README](../README.md).
Then build the image which will later serve as update package:
```
-host$ ./kas-container build kas-cip.yml:kas/board/qemu-amd64.yml:kas/opt/ebg-swu.yml
+host$ ./kas-container build kas-cip.yml:kas/board/qemu-amd64.yml:kas/opt/5.10.yml:kas/opt/bullseye.yml:kas/opt/ebg-swu.yml
```
-Save the generated swu `build/tmp/deploy/images/qemu-amd64/cip-core-image-cip-core-buster-qemu-amd64.swu` into a separate folder (ex: /tmp).
+Save the generated swu `build/tmp/deploy/images/qemu-amd64/cip-core-image-cip-core-bullseye-qemu-amd64.swu` into a separate folder (ex: /tmp).

Next, rebuild the image, switching to the RT kernel as modification:
```
-host$ ./kas-container build kas-cip.yml:kas/board/qemu-amd64.yml:kas/opt/ebg-swu.yml:kas/opt/rt.yml
+host$ ./kas-container build kas-cip.yml:kas/board/qemu-amd64.yml:kas/opt/5.10.yml:kas/opt/bullseye.yml:kas/opt/ebg-swu.yml:kas/opt/rt.yml
5.10 becomes default when selecting bullseye, so you could drop that option.

It's probably also worth noting that some of the build configuration
issues are "resolved" now via "kas-container menu" and its dependency
encoding. But it is still clearer to describe the actual configuration
the way it's done here.

```

Now start the image which will contain the RT kernel:
@@ -27,9 +27,9 @@ Now start the image which will contain the RT kernel:
host$ SWUPDATE_BOOT=y ./start-qemu.sh amd64
```

-Copy `cip-core-image-cip-core-buster-qemu-amd64.swu` file from `tmp` folder into the running system:
+Copy `cip-core-image-cip-core-bullseye-qemu-amd64.swu` file from `tmp` folder into the running system:
```
-host$ scp -P 22222 /tmp/cip-core-image-cip-core-buster-qemu-amd64.swu root@localhost:
+host$ scp -P 22222 /tmp/cip-core-image-cip-core-bullseye-qemu-amd64.swu root@localhost:~
```

Check which partition is booted, e.g. with lsblk:
@@ -47,16 +47,16 @@ sda 8:0 0 2G 0 disk
Also check that you are running the RT kernel:
```
root@demo:~# uname -a
-Linux demo 4.19.233-cip69-rt24 #1 SMP PREEMPT RT Tue Apr 12 09:23:51 UTC 2022 x86_64 GNU/Linux
+Linux demo 5.10.109-cip5-rt4 #1 SMP PREEMPT_RT Wed May 25 08:02:24 UTC 2022 x86_64 GNU/Linux
root@demo:~# ls /lib/modules
-4.19.233-cip69-rt24
+5.10.109-cip5-rt4
root@demo:~# cat /sys/kernel/realtime
1
```

Now apply swupdate and reboot
```
-root@demo:~# swupdate -i cip-core-image-cip-core-buster-qemu-amd64.swu
+root@demo:~# swupdate -i cip-core-image-cip-core-bullseye-qemu-amd64.swu
root@demo:~# reboot
```

@@ -75,9 +75,9 @@ sda 8:0 0 2G 0 disk
Check the active kernel:
```
root@demo:~# uname -a
-Linux demo 4.19.235-cip70 #1 SMP Tue Apr 12 09:08:39 UTC 2022 x86_64 GNU/Linux
+Linux demo 5.10.115-cip7 #1 SMP Wed May 25 07:46:12 UTC 2022 x86_64 GNU/Linux
root@demo:~# ls /lib/modules
-4.19.235-cip70
+5.10.115-cip7
```

Check bootloader ustate after swupdate
@@ -121,12 +121,12 @@ root@demo:~# bg_setenv -c
Build the image for swupdate with a service which causes kernel panic during system boot using below command:

```
-host$ ./kas-container build kas-cip.yml:kas/board/qemu-amd64.yml:kas/opt/ebg-swu.yml:kas/opt/kernel-panic.yml
+host$ ./kas-container build kas-cip.yml:kas/board/qemu-amd64.yml:kas/opt/5.10.yml:kas/opt/bullseye.yml:kas/opt/ebg-swu.yml:kas/opt/kernel-panic.yml
```
-Save the generated swu `build/tmp/deploy/images/qemu-amd64/cip-core-image-cip-core-buster-qemu-amd64.swu` in a separate folder.
+Save the generated swu `build/tmp/deploy/images/qemu-amd64/cip-core-image-cip-core-bullseye-qemu-amd64.swu` in a separate folder.
Then build the image without `kernel-panic.yml` recipe using below command:
```
-host$ ./kas-container build kas-cip.yml:kas/board/qemu-amd64.yml:kas/opt/ebg-swu.yml
+host$ ./kas-container build kas-cip.yml:kas/board/qemu-amd64.yml:kas/opt/5.10.yml:kas/opt/bullseye.yml:kas/opt/ebg-swu.yml
```

Start the target on QEMU:
@@ -134,14 +134,14 @@ Start the target on QEMU:
host$ SWUPDATE_BOOT=y ./start-qemu.sh amd64
```

-Copy `cip-core-image-cip-core-buster-qemu-amd64.swu` file from `tmp` folder into the running system:
+Copy `cip-core-image-cip-core-bullseye-qemu-amd64.swu` file from `tmp` folder into the running system:
```
-host$ scp -P 22222 /tmp/cip-core-image-cip-core-buster-qemu-amd64.swu root@localhost:
+host$ scp -P 22222 /tmp/cip-core-image-cip-core-bullseye-qemu-amd64.swu root@localhost:~
```

Apply swupdate as below:
```
-root@demo:~# swupdate -i cip-core-image-cip-core-buster-qemu-amd64.swu
+root@demo:~# swupdate -i cip-core-image-cip-core-bullseye-qemu-amd64.swu
```

Check bootloader ustate after swupdate. If the swupdate is successful then **revision number** should be **3** and status should be changed to **INSTALLED** for Partition #1.
Jan

--
Siemens AG, Technology
Competence Center Embedded Linux

Join cip-dev@lists.cip-project.org to automatically receive all group messages.