OP-TEE/manifest

Which xml file should I use?

FIREWOODCUT opened this issue · 14 comments

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.

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

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

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!

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

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

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

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?

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.

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

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

?

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.

@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

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

@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

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