Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Raspberry Pi 3B+ Not Booting with OP-TEE Image on SD Card" #6442

Closed
Chae0510 opened this issue Nov 8, 2023 · 6 comments · Fixed by OP-TEE/build#706
Closed

"Raspberry Pi 3B+ Not Booting with OP-TEE Image on SD Card" #6442

Chae0510 opened this issue Nov 8, 2023 · 6 comments · Fixed by OP-TEE/build#706

Comments

@Chae0510
Copy link

Chae0510 commented Nov 8, 2023

Following the instructions provided at optee.readthedocs.io I successfully copied the img file to my SD card without any issues. However, when I insert this SD card into my Raspberry Pi 3B+ board and power it on, the ACT LED blinks briefly three times, and the board doesn't boot.

I've also tried following the steps in the link OP-TEE developer build v3.22.0 fails to boot on new RPi 3B+ board, as someone with a similar device faced the same issue, but I still couldn't get the SD card to be read.

I'm using a Raspberry Pi 3 Model B+ (2017 version), and I'm wondering if anyone has encountered a similar error and found a solution. I've tried all the solutions I could find on Google without success.

I'll be waiting for any advice or suggestions. Thank you in advance.

@nolzaheo
Copy link

I tried these steps and it worked on rpi3 b+

$ apt update && apt upgrade -y
$ apt install -y adb acpica-tools autoconf automake bc bison build-essential ccache cpio cscope curl device-tree-compiler e2tools expect fastboot flex ftp-upload gdisk git libattr1-dev libcap-dev libfdt-dev libftdi-dev libglib2.0-dev libgmp3-dev libhidapi-dev libmpc-dev libncurses5-dev libpixman-1-dev libslirp-dev libssl-dev libtool libusb-1.0-0-dev make mtools netcat ninja-build python3-cryptography python3-pip python3-pyelftools python3-serial python-is-python3 rsync swig unzip uuid-dev wget xdg-utils xterm xz-utils zlib1g-dev
$ mkdir -p test
$ cd test
$ curl https://storage.googleapis.com/git-repo-downloads/repo > /bin/repo && chmod a+x /bin/repo
$ repo init -u https://github.com/OP-TEE/manifest.git -m rpi3.xml
$ repo sync -j4 --no-clone-bundle
$ cd build
$ make -j2 toolchains
$ make -j nproc
$ make sdcard-image

@jjsshh3116
Copy link

@nolzaheo
I try this time but failed...
Can you provide specific information such as build environment and Raspberry Pi board version?

@jbech-linaro
Copy link
Contributor

I'm the one maintaining the RPi3 build for OP-TEE, last time I tried was at the 4.0.0 release. Back then it was working as expected. Unfortunately, we don't have the RPi3 on a CI loop, but I can give it a try again to see whether there is a new regression not seen before.

@jjsshh3116
Copy link

@jbech-linaro Thank you for your response! I currently have both the RPi3 B and RPi3 B+ boards. When I use the same SD card image (OP-TEE 4.0.0), it boots up normally only on the RPi3 B board. Therefore, with an experimental approach, I am planning to try creating a boot image for the OP-TEE on the B+ board using buildroot.

@jbech-linaro
Copy link
Contributor

I've been testing a bit this morning and I suspect there is some issues with the dependency graph in the Makefile, since building it seems to sometimes not complete the build and rebuilding solves it. I'll see if I can figure something out.

jbech-linaro added a commit to OP-TEE/build that referenced this issue Nov 27, 2023
From time to time it looks like the Raspberry Pi 3 build completes the
build with no errors, but it's still an incomplete build, since the
iamge for the SD card for example hasn't been created. This is most
likely due to a dependency error in the Makefile. After reviewing the
dependencies it looks like there were at least two dependencies that was
wrong/missing.

- Change so the boot filesystem also depends on linux and the U-boot
  environment file.
- Change so tf-a depends on u-boot and not u-boot-env.
- Change arm-tf targets to tf-a.
- Add .PHONY to a few more targets.

Fixes: OP-TEE/optee_os#6442
Signed-off-by: Joakim Bech <[email protected]>
jbech-linaro added a commit to OP-TEE/build that referenced this issue Nov 27, 2023
From time to time it looks like the Raspberry Pi 3 build completes the
build with no errors, but it's still an incomplete build, since the
image for the SD card for example hasn't been created. This is most
likely due to a dependency error in the Makefile. After reviewing the
dependencies it looks like there were at least two dependencies that was
wrong/missing.

- Change so the boot filesystem also depends on linux and the U-boot
  environment file.
- Change so tf-a depends on u-boot and not u-boot-env.
- Change arm-tf targets to tf-a.
- Add .PHONY to a few more targets.

Fixes: OP-TEE/optee_os#6442
Signed-off-by: Joakim Bech <[email protected]>
@jbech-linaro
Copy link
Contributor

jbech-linaro commented Nov 27, 2023

I've made some changes in OP-TEE/build#706 which I believe solves an issue that the build sometimes not complete as it should, basically some dependency error in the Makefile. Regarding the version, I also the "Rpi3 B v1.2 from 2016".

When I use the same SD card image (OP-TEE 4.0.0), it boots up normally only on the RPi3 B board.

I don't think I can check the B+. But, I will cross check if I have a B+ laying around, since I know I have used a B+ in the past as well I think.

jbech-linaro added a commit to OP-TEE/build that referenced this issue Nov 27, 2023
The Raspberry Pi 3 build appears to complete with no errors from time to
time, but it is still an incomplete build because the image for the SD
card for example has not been built. This is most likely due to a
dependency error in the Makefile. After reviewing the dependencies, it
appears that at least two of them were incorrect or absent.

- Add 'u-boot' instead of 'u-boot-env' as a dependency to TF-A.
- Add 'linux' and 'u-boot-env' as a dependency to the boot filesystem.

Fixes: OP-TEE/optee_os#6442
Signed-off-by: Joakim Bech <[email protected]>
jbech-linaro added a commit to OP-TEE/build that referenced this issue Nov 27, 2023
The Raspberry Pi 3 build appears to complete with no errors from time to
time, but it is still an incomplete build because the image for the SD
card for example has not been built. This is most likely due to a
dependency error in the Makefile. After reviewing the dependencies, it
appears that at least two of them were incorrect or absent.

- Add 'u-boot' instead of 'u-boot-env' as a dependency to TF-A.
- Add 'linux' and 'u-boot-env' as a dependency to the boot filesystem.

Fixes: OP-TEE/optee_os#6442
Signed-off-by: Joakim Bech <[email protected]>
Reviewed-by: Jerome Forissier <[email protected]>
jforissier pushed a commit to OP-TEE/build that referenced this issue Nov 28, 2023
The Raspberry Pi 3 build appears to complete with no errors from time to
time, but it is still an incomplete build because the image for the SD
card for example has not been built. This is most likely due to a
dependency error in the Makefile. After reviewing the dependencies, it
appears that at least two of them were incorrect or absent.

- Add 'u-boot' instead of 'u-boot-env' as a dependency to TF-A.
- Add 'linux' and 'u-boot-env' as a dependency to the boot filesystem.

Fixes: OP-TEE/optee_os#6442
Signed-off-by: Joakim Bech <[email protected]>
Reviewed-by: Jerome Forissier <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants