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


Jan Kiszka
 

On 25.05.22 19:34, Hannah Kiekens wrote:
On Wed, May 25, 2022 at 1:41 PM Jan Kiszka <jan.kiszka@...
<mailto:jan.kiszka@...>> wrote:

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.


There is no real reason why I am switching to bullseye.
This combination worked great, what it was before did not
Right, and that is likely only because the current combination chooses
kernel 4.19 which is no longer working since 05dd963a.

This patch is currently doing the rounds at our site for evaluating/demo
isar-cip-core, I needed a working, easy to follow guide for regular
techies.  I am not sure if the technical details matter in this case
 
For that particular purpose, it does not. However, we should try to
structure the document in a way that it can be easier maintained or is
less likely to out-date where possible.


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.


Sorry, it's not entirely clear if you want me to modify this patch or not.
Was kind of thinking out loudly. Let's make it more concert now:

- describe the requirements, here kernel >= 5.10
- suggest to use "kas-container menu", besides providing a concrete
call of "kas-container build ..."

Meanwhile, I've created a patch to switch defaults to bullseye [1].

Thanks,
Jan

[1]
https://lore.kernel.org/cip-dev/9c68811b-c8df-6f80-d314-b379b131ab8c@siemens.com/T/#u

--
Siemens AG, Technology
Competence Center Embedded Linux


Hannah Kiekens
 



On Wed, May 25, 2022 at 1:41 PM Jan Kiszka <jan.kiszka@...> wrote:
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.


There is no real reason why I am switching to bullseye.
This combination worked great, what it was before did not
This patch is currently doing the rounds at our site for evaluating/demo isar-cip-core, I needed a working, easy to follow guide for regular techies.  I am not sure if the technical details matter in this case
 

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.


Sorry, it's not entirely clear if you want me to modify this patch or not.

Hannah


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


Hannah Kiekens
 

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
```

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.
--
2.36.1