You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -12,37 +12,83 @@ main: Primary development branch. Contributors should develop submissions based
12
12
13
13
## Requirements
14
14
15
-
[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. Make sure to use at least version 1.1.5 which supports setting the sector size.
15
+
[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 [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.
17
16
18
17
[qdl](https://github.com/linux-msm/qdl) is typically used for flashing. While recent versions are available in Debian and Ubuntu, make sure to use at least version 2.1 as it contains important fixes.
19
18
20
-
##Usage
19
+
### Optional requirements
21
20
22
-
To build flashable assets, run debos as follows:
21
+
Building U-Boot for the RB1 requires the following build-dependencies:
By default, debos will try to pick a fast build backend; it will try to use its KVM backend ("-b kvm") when available, and otherwise an UML environment ("-b uml"). If none of these work, a solid backend is QEMU ("-b qemu"); because the target images are arm64, this can be really slow when building from another architecture such as amd64.
84
+
By default, debos will try to pick a fast build backend. It will prefer to use its KVM backend (`-b kvm`) when available, and otherwise an UML environment (`-b uml`). If none of these work, a solid backend is QEMU (`-b qemu`). Because the target images are arm64, building under QEMU can be really slow, especially when building from another architecture such as amd64.
39
85
40
86
To build large images, the debos resource defaults might not be sufficient. Consider raising the default debos memory and scratchsize settings. This should provide a good set of minimum defaults:
The `disk-sdcard.img` disk image can simply be written to a SD card, albeit most Qualcomm boards boot from internal storage by default. With an SD card, the board will use boot firmware from internal storage (eMMC or UFS) and do an EFI boot from the SD card if the firmware can't boot from internal storage.
77
122
78
-
If there is no need to update the boot firmware, the `disk-ufs.img` disk image can also be flashed on the first LUN of the internal UFS storage with [qdl](https://github.com/linux-msm/qdl). Create a `rawprogram-ufs.xml` file as follows:
123
+
For UFS boards, if there is no need to update the boot firmware, the `disk-ufs.img` disk image can also be flashed on the first LUN of the internal UFS storage with [qdl](https://github.com/linux-msm/qdl). Create a `rawprogram-ufs.xml` file as follows:
79
124
```xml
80
125
<?xml version="1.0" ?>
81
126
<data>
@@ -86,14 +131,7 @@ Put the board in "emergency download mode" (EDL; see next section) and run:
Make sure to use `prog_firehose_ddr.elf` for the target platform, such as this [version from the QCM6490 boot binaries](https://softwarecenter.qualcomm.com/download/software/chip/qualcomm_linux-spf-1-0/qualcomm-linux-spf-1-0_test_device_public/r1.0_00058.0/qcm6490-le-1-0/common/build/ufs/bin/QCM6490_bootbinaries.zip).
90
-
91
-
To flash a complete set of assets on UFS internal storage, put the board in EDL mode and run:
Make sure to use `prog_firehose_ddr.elf` for the target platform, such as this [version from the QCM6490 boot binaries](https://softwarecenter.qualcomm.com/download/software/chip/qualcomm_linux-spf-1-0/qualcomm-linux-spf-1-0_test_device_public/r1.0_00058.0/qcm6490-le-1-0/common/build/ufs/bin/QCM6490_bootbinaries.zip) or this [version from the RB1 rescue image](https://releases.linaro.org/96boards/rb1/linaro/rescue/23.12/rb1-bootloader-emmc-linux-47528.zip).
97
135
98
136
### Emergency Download Mode (EDL)
99
137
@@ -109,144 +147,6 @@ To enter EDL mode:
109
147
110
148
NB: It's also possible to run qdl from the host while the baord is not connected, and starting the board directly in EDL mode.
111
149
112
-
### RB1 instructions (alpha)
113
-
114
-
The RB1 board boots from eMMC by default and uses an Android style boot architecture. Read-on to flash a disk image to the eMMC storage of the RB1 board and emulate an UEFI boot architecture.
115
-
116
-
#### Build disk-sdcard.img with debos
117
-
As above, build a SD card image as it's using a 512 sector size, like eMMC on the RB1:
118
-
```bash
119
-
debos \
120
-
--fakemachine-backend qemu \
121
-
--memory 1GiB \
122
-
--scratchsize 4GiB \
123
-
-t xfcedesktop:true \
124
-
debos-recipes/qualcomm-linux-debian-rootfs.yaml
125
-
debos \
126
-
--fakemachine-backend qemu \
127
-
--memory 1GiB \
128
-
--scratchsize 4GiB \
129
-
-t dtb:qcom/qrb2210-rb1.dtb \
130
-
-t imagetype:sdcard \
131
-
debos-recipes/qualcomm-linux-debian-image.yaml
132
-
```
133
-
134
-
#### Build U-Boot with RB1 support
135
-
136
-
U-Boot will be chainloaded from the first Android boot partition.
137
-
138
-
A convenience shell script is provided to checkout the relevant U-Boot branch and to build U-Boot for RB1 and wrap it in an Android boot image.
#### Build an upstream Linux kernel to workaround boot issues
148
-
149
-
Linux 6.14 or later will just work, but 6.13 kernels need `CONFIG_CLK_QCM2290_GPUCC=m` ([upstream submission](https://lore.kernel.org/linux-arm-msm/[email protected]/))
150
-
151
-
In any case, make sure to set `CONFIG_EFI_ZBOOT=y` as [systemd-boot won't implement support for compressed images (zImage)](https://github.com/systemd/systemd/issues/23788); the kernel config fragment in `kernel-configs/systemd-boot.config` does this.
152
-
153
-
1. A convenience shell script is provided to checkout the latest kernel and build a deb package from it with the above config.
154
-
```bash
155
-
sudo apt install git crossbuild-essential-arm64 make flex bison bc \
1. download and unpack the [Linux eMMC RB1 recovery image version 23.12 from Linaro](https://releases.linaro.org/96boards/rb1/linaro/rescue/23.12/)
197
-
198
-
1. edit rawprogram0.xml and change the filename for the following partitions to these values to match files generated earlier:
199
-
200
-
|label|filename|
201
-
|---|---|
202
-
|`boot_a`|`u-boot-abootimg.img`|
203
-
|`esp`|`disk-sdcard.img1`|
204
-
|`rootfs`|`disk-sdcard.img2`|
205
-
206
-
#### Flash the image
207
-
208
-
You probably want to connect to the serial port during the whole process, to follow what’s happening on the target. Plug the type-B USB cable to your host and access the serial console with 115200 8N1, e.g. with screen:
209
-
210
-
Linux (tweak the name of the device):
211
-
```bash
212
-
screen /dev/ttyUSB* 115200
213
-
```
214
-
macOS (tweak the name of the device):
215
-
```bash
216
-
screen /dev/cu.usbserial-* 115200
217
-
```
218
-
219
-
Make sure that the 6th switch on the `DIP_SW_1` bank next to the eMMC is `ON` as to use the USB type-C port for flashing.
220
-
221
-
Put the board in "emergency download" mode (EDL) by removing any cable from the USB type-C port, and pressing the `F_DL` button while turning the power on.
222
-
223
-
Connect a cable from the flashing host to the USB type-C port on the board.
0 commit comments