OPTEE flashing on Hikey problem

I am following the instructions here https://github.com/96boards/documentation/wiki/HiKeyOPTEE#flash.

Everything seems to work up to the point where I finish flashing the jessie.udpated.img. The next instruction says to turn off the HiKey board, so I unplugged the power. Then removed link 3-4 and plugged the power back in.

However rather than turning on, it initially lights up USER LED4, and then hangs after switching to LED1 and LED3.

I have tried both the 4g and 8g ptable after renaming it to ptable-linux.img. The jessie.updated.img and fip.bin are the ones produced from the instructions above, while the I-loader, ptable-linux, boot-fat.uefi and nvme I grabbed from https://builds.96boards.org/snapshots/hikey/linaro/uefi/latest/.

I looked at getting started, there seems to be a fastboot reboot step somewhere but these instructions for OPTEE explicitly says not to. I am not sure what I am doing wrong right now and do not have access to serial console (adapter board is on the way).

Never mind I got this to work. I did a fastboot reboot at the end and I might’ve mixed up the 4g vs 8g emmc and ptables.

When creating the jessie.update.img, I had to increase the size a bit. Also when running the xtests, I had to sudo and use full path.

Was in the middle of verifying your issue. Glad you got it resolved.

Oh, btw, forgot to mention that with the exception of the test suite, all release and snapshot builds are now OP-TEE enabled.

To be clear, after the fastboot steps you issued a fastboot reboot? Or did you use the power button on the board to restart. From what I’ve seen the power button is next to useless and only reboots (doesn’t power off) so I have been unplugging the power cord to turn the board off. When I follow the instructions on the HiKey page I can get through the flashing, but when I turn the board on with link 3-4 open it hangs.

I’ve managed to boot android and debian using the LeMaker instructions (http://wiki.lemaker.org/HiKey(LeMaker_version):Quick_Start) but I’ve not been able to get op-tee on it as well. The instructions for the most recent install in op-tee’s Makefile directly contradict instructions from HiKey and LeMaker about how the pins should be setup. (op-tee wants 1-2 and 5-6 closed while HiKey and LeMaker want 1-2 and 3-4 closed when flashing).

OP-TEE’s Makefile does not contradict the instructions. There are 2 ways to get into fastboot mode to flash the images. The first is via recovery mode that requires 1-2 and 3-4 to be closed. You can also get to fastboot mode in UEFI (instead of having it boot normally) and this requires 1-2 and 5-6 to be closed. The Makefile explains both options, maybe not perfectly well since all these are quite confusing anyway, and you’re probably looking at the second one.

OK. That makes sense. It was confusing to see OP-TEE’s instructions point you towards the HiKey instructions that have you close 1-2 and 3-4 and then have you run make flash which says to close 1-2 and 5-6 (in the newest makefile, make recovery requests that you close 1-2 and 3-4). Hearing that those are 2 different ways of flashing with fast boot is reassuring. Thank you.