Skip to content

Commit 7e13aba

Browse files
committed
debos: Generate images for both sector sizes
Update docs and drop workaround script. Signed-off-by: Loïc Minier <[email protected]>
1 parent 5089cdd commit 7e13aba

File tree

4 files changed

+11
-73
lines changed

4 files changed

+11
-73
lines changed

.github/workflows/debos.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,10 @@ jobs:
9898
# qemu backend also requires to set scratchsize, otherwise
9999
# the whole build is done from memory and the out of memory
100100
# killer gets triggered
101-
debos -b qemu --scratchsize 4GiB qualcomm-linux-debian-image.yaml
101+
debos -b qemu --scratchsize 4GiB -t sectorsize:4096 \
102+
qualcomm-linux-debian-image.yaml
103+
debos -b qemu --scratchsize 4GiB -t sectorsize:512 \
104+
qualcomm-linux-debian-image.yaml
102105
EOF
103106
) | sudo incus exec "${INCUS_NAME}" -- sh
104107
@@ -115,7 +118,8 @@ jobs:
115118
dir="${FILESERVER_DIR}/${id}"
116119
mkdir -vp "${dir}"
117120
# copy output files
118-
cp -v disk.img "${dir}"
121+
cp -v disk-4096.img "${dir}"
122+
cp -v disk-512.img "${dir}"
119123
# instruct fileserver to publish this directory
120124
url="${FILESERVER_URL}/${id}/"
121125
curl -X POST -H 'Accept: text/event-stream' "${url}"

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ main: Primary development branch. Contributors should develop submissions based
1313
## Requirements
1414

1515
[debos](https://github.com/go-debos/debos) is required to build the debos recipes. Recent debos packages should be available in Debian and Ubuntu repositories; there are
16-
[debos installation instructions](https://github.com/go-debos/debos?tab=readme-ov-file#installation-from-source-under-debian) on the project's page, notably for Docker images and to build debos from source.
16+
[debos installation instructions](https://github.com/go-debos/debos?tab=readme-ov-file#installation-from-source-under-debian) on the project's page, notably for Docker images and to build debos from source. Make sure to use at least version 1.1.5 which supports setting the sector size.
1717

1818
[qdl](https://github.com/linux-msm/qdl) is typically used for flashing. While recent versions are available in Debian and Ubuntu, make sure you have at least version 2.1 as it contains important fixes.
1919

@@ -45,7 +45,7 @@ A few options are provided in the debos recipes; for the root filesystem recipe:
4545

4646
For the image recipe:
4747
- dtb: override the firmware provided device tree with one from the linux kernel, e.g. `qcom/qcs6490-rb3gen2.dtb`; default: don't override
48-
- image: set the output disk image filename; default: `disk.img`
48+
- image: set the output disk image filename; default: `disk-4096.img`
4949
- imagesize: set the output disk image size; default: `4GiB`
5050

5151
These can be passed as follows:
@@ -67,10 +67,6 @@ Depending on the target board and target boot media, it's also necessary to use
6767

6868
The RB3 Gen2 board boots from UFS by default. To flash a disk image to the UFS storage of the RB3 Gen2 board:
6969
1. provision some known good early boot assets by flashing the Yocto edition of [Qualcomm Linux](https://www.qualcomm.com/developer/software/qualcomm-linux)
70-
1. unless you've got a recent debos that supports creating images with a 4096B sector size, convert the debos disk image from 512B to 4096B sector sizes; this sample script can be used as a workaround until [debos gains support for setting the sector size](https://github.com/go-debos/debos/issues/537) but it's a britle approach which requires root, the workaround script is also full of hardcoded expectations and might need local tweaks:
71-
```bash
72-
sudo scripts/workaround-convert-sector-size disk.img disk-4096.img 4096
73-
```
7470
1. create a `rawprogram-ufs.xml` file instructing QDL to flash to the first UFS LUN (LUN0):
7571
```xml
7672
<?xml version="1.0" ?>

debos-recipes/qualcomm-linux-debian-image.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
{{- $dtb := or .dtb "firmware" }}
2-
{{- $image := or .image "disk.img" }}
32
{{- $imagesize := or .imagesize "4GiB" }}
3+
{{- $sectorsize := or .sectorsize 512 }}
4+
{{- $image := or .image (printf "disk-%s.img" $sectorsize) }}
45

56
architecture: arm64
7+
sectorsize: {{ $sectorsize }}
68

79
actions:
810
- action: unpack

scripts/workaround-convert-sector-size

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)