OP-TEE / build

Makefiles to use OP-TEE on various platforms
107 stars 209 forks source link

Issue with building image - v3.22.0 on Raspberry Pi 3B+ #675

Closed fe23-dev closed 9 months ago

fe23-dev commented 11 months ago

I have a system using OP-TEE v3.21.0 and I have attempted to build the latest version using the instructions on the official page - https://optee.readthedocs.io/

These are the commands I used:

  1. repo init -u https://github.com/OP-TEE/manifest.git -m rpi3.xml -b 3.22.0
  2. repo sync -j4 --no-clone-bundle
  3. cd build
  4. make -j2 toolchains

However I ran into an issue where the 'Image' file cannot be found when running the following command:

make -j `nproc`

However, not knowing if this was a critical error, I continued with the build process.

I then ran the command: make img-help

Which gives me the output: Use 'dmesg' to find your device/SD-card name, then run the following as root: $ sudo dd if=/home/latest/optee/build/../out/rpi3-sdcard.img of=/dev/<name-of-my-sd-card> bs=1024k conv=fsync status=progress

This step has changed a lot since the last version, so I was unsure if this was actually the correct process or whether this was a result of the error that had occurred in relation to the 'Image' file in the previous step

When I run the command: sudo dd if=/home/latest/optee/build/../out/rpi3-sdcard.img of=/dev/sdb bs=1024k conv=fsync status=progress

I got the output: dd: failed to open '/home/latest/optee/build/../out/rpi3-sdcard.img': No such file or directory

However, when I later tried to run this entire process again using one core for logging purposes to ensure that the commands and errors would be saved in the correct order, this error no longer occurred and the files were successfully transferred to the SD card and my system would boot on the raspberry pi.

I then attempted to restart this again to see whether it was a one-off issue, however when running the command without restricting it to one core the 'dd' command failed again as the rpi3-sdcard.img file once again did not exist.

After looking through the repo I found I could run the command: sudo make sdcard-image

After this command had run fully, the rpi3-sdcard.img file now existed and the 'dd' command now worked resulting in the system on my raspberry pi working.

github-actions[bot] commented 9 months ago

This issue has been marked as a stale issue because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time.