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

Which xml file should I use? #222

Open
FIREWOODCUT opened this issue Nov 15, 2022 · 14 comments
Open

Which xml file should I use? #222

FIREWOODCUT opened this issue Nov 15, 2022 · 14 comments

Comments

@FIREWOODCUT
Copy link

I'm migrating optee to the rk3399 development board. I don't know which xml to download the warehouse code from. How should I do? At present, I have only completed the process of emulating optee on the QEMU platform, and I don't know how to compile it on the real machine.

@jforissier
Copy link
Contributor

I have just submitted pull requests for the RockPi4, perhaps it can help?

#221
OP-TEE/build#602
linaro-swg/linux#106

@FIREWOODCUT
Copy link
Author

Can RockPi4 support RockChip? I can't find the mk file in the master branch of the build project. I'm at a loss and don't know what to do. Please give me some advice. Thank you!

@jforissier
Copy link
Contributor

Rockpi4 boards have a rk3399 SoC. The mk file will be in the master branch soon. Review is in progress.

@FIREWOODCUT
Copy link
Author

Excuse me, is the review OK? I would like to try.

@jforissier
Copy link
Contributor

Yes. First make sure you install the prerequisites listed at https://optee.readthedocs.io/en/latest/building/prerequisites.html plus e2tools and libusb-1.0-0-dev for Rockpi4.
Then please try:

mkdir optee_rockpi4
cd optee_rockpi4
repo init -u https://github.com/OP-TEE/manifest.git -m rockpi4.xml
repo sync
cd build
make toolchains
make -j$(nproc)
make flash

@FIREWOODCUT
Copy link
Author

I tried compiling on the x86 machine. It seems that the out and out br directories are generated normally, and rockpi4.img is output under the out directory.

Then I executed the "make flash" command and got the following prompt:
"Please connect the board to the computer via a USB cable.
The cable must be connected to the upper USB 3 (blue) port.
Then press and hold the mask ROM button (first one on the left
under the HDMI connector), apply power and release the button.
(More details at https://wiki.radxa.com/Rockpi4/dev/usb-install)
Press enter to continue, Ctrl-C to cancel:"

Does this mean that I can connect the rk3399 development board and start burning?

@jforissier
Copy link
Contributor

I understand that your board is not a Rockpi 4 but a different rk3399 board, so it might not work, but you may try. With a bit of luck the loader will be able to flash the onboard eMMC and with even more luck it will boot properly.

Does your board have a microSD card slot? Write the out/rockpi4.img image to the SD card with cat or dd and try booting from it.

@FIREWOODCUT
Copy link
Author

OK, I think I can try. Thank you for your support!

@jforissier
Copy link
Contributor

repo: reusing existing repo client checkout in /root/optee

?

@jbech-linaro
Copy link
Contributor

Something weird going on at your end, just to be sure I just tried

$ repo init -u https://github.com/OP-TEE/manifest.git -m rockpi4.xml
Downloading Repo source from https://gerrit.googlesource.com/git-repo
remote: Finding sources: 100% (4/4)
remote: Total 4 (delta 1), reused 4 (delta 1)

Your identity is: Joakim Bech <...>
If you want to change this, please re-run 'repo init' with --config-name

repo has been initialized in /tmp

repo: reusing existing repo client checkout in /root/optee

That is probably just because you're running the repo init again from a folder where you previously have been having another repo setup. Btw, building as root seems like a pretty bad idea (you're doing the build in Docker or?). You should be fine with using a normal user.

@TaihuLight
Copy link

TaihuLight commented Dec 3, 2022

@jbech-linaro @jforissier @FIREWOODCUT @wamserma
Yes, the ERR repo: reusing existing repo client checkout in /root/optee arises from running repo init at the previous repo setup. It is solved by rm -rf /boot/optee' and running repo initat a newly created directory. I could run $ repo init -u https://github.com/OP-TEE/manifest.git -m rockpi4.xml` successfully.

Unfortunately, When I try to build the stable version 3.19.0 for Rock Pi 4B by adding the option -b 3.19.0 as follows, it occurs another ERR and tips that **manifest rockpi4.xml not available**. How to fix it?

$ repo init -u https://github.com/OP-TEE/manifest.git -m rockpi4.xml -b 3.19.0
Downloading Repo source from https://gerrit.googlesource.com/git-repo
remote: Counting objects: 151, done
remote: Finding sources: 100% (4/4)
remote: Total 4 (delta 0), reused 4 (delta 0)
Unpacking objects: 100% (4/4), 18.70 KiB | 2.34 MiB/s, done.
fatal: manifest 'rockpi4.xml' not available
fatal: manifest rockpi4.xml not found

@wamserma
Copy link
Contributor

wamserma commented Dec 3, 2022

rockpi4.xml has been added after the 3.19.0 release. Use the current head or wait for 3.20.0 top bei tagged.

@TaQini
Copy link

TaQini commented Feb 19, 2023

@jbech-linaro @wamserma I successfully build OP-TEE for Rock Pi 4B, and flash rockpi4.img into an SD card by run sudo dd if=rockpi4.img of=/dev/sdc bs=1kiB conv=notrunc on my Host PC. When I boot 4B from the SD card, It loads the kernel and shows image How to fix it?

OP-TEE build successfully but boot failed.

repo init -u https://github.com/OP-TEE/manifest.git -m rockpi4.xml
repo sync -j4 --no-clone-bundle
make -j2 toolchains
make -j `nproc`
sudo make flash

image3

I got the same problem while booting Rock Pi 4B:
image
and then:
image2

@jforissier
Copy link
Contributor

I am using a serial console. Are you using the HDMI output? I don't know if it works.

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

No branches or pull requests

6 participants