This is a cache of https://discuss.96boards.org/t/unable-to-flash-debian-system-img/1150. It is a snapshot of the page at 2024-10-31T04:58:07.971+0000.
Unable to flash debian_system.img - HiKey - 96Boards Forum

Unable to flash debian_system.img

Hello,

A week ago I received the HiKey with 2GB RAM.

Then I built the optee stuff according to the nice page:

(No errors were detected.)

However, all attempts to flash optee onto computer failed.
More details:
It looks like, all the components are being flashed Ok, besides the normal operating system.
e.g.

sudo make recovery

gives:

python /home/devel/optee2/build/…/burn-boot/hisi-idt.py --img1=/home/devel/optee2/build/…/l-loader/l-loader.bin
±---------------------+
(’ Serial: ‘, ‘/dev/serial/by-id/usb-\xe4\x95\x87\xe4\x95\x8e\xe4\xa5\x8e_\xe3\x84\xb0\xe3\x8c\xb2\xe3\x94\xb4\xe3\x9c\xb6\xe3\xa4\xb8-if00-port0’)
(’ Image1: ‘, ‘/home/devel/optee2/build/…/l-loader/l-loader.bin’)
(’ Image2: ', ‘’)
±---------------------+

(‘Sending’, ‘/home/devel/optee2/build/…/l-loader/l-loader.bin’, ‘…’)
Done

fastboot flash ptable /home/devel/optee2/build/…/l-loader/ptable-linux-4g.img
< waiting for device >
target reported max download size of 268435456 bytes
sending ‘ptable’ (17 KB)…
OKAY [ 0.001s]
writing ‘ptable’…
OKAY [ 0.002s]
finished. total time: 0.003s
fastboot flash fastboot /home/devel/optee2/build/…/arm-trusted-firmware/build/hikey/release/fip.bin
target reported max download size of 268435456 bytes
sending ‘fastboot’ (1381 KB)…
OKAY [ 0.052s]
writing ‘fastboot’…
OKAY [ 1.012s]
finished. total time: 1.064s
fastboot flash nvme /home/devel/optee2/build/…/out/nvme.img
target reported max download size of 268435456 bytes
sending ‘nvme’ (128 KB)…
OKAY [ 0.005s]
writing ‘nvme’…
OKAY [ 0.004s]
finished. total time: 0.009s
fastboot flash boot /home/devel/optee2/build/…/out/boot-fat.uefi.img
target reported max download size of 268435456 bytes
sending ‘boot’ (65536 KB)…
OKAY [ 2.221s]
writing ‘boot’…
OKAY [ 3.040s]
finished. total time: 5.261s
fastboot flash system /home/devel/optee2/build/…/out/debian_system.img
target reported max download size of 268435456 bytes
erasing ‘system’…
OKAY [ 0.000s]
sending sparse ‘system’ (262140 KB)…
OKAY [ 9.017s]
writing ‘system’…
FAILED (status read failed (Protocol error))
finished. total time: 14.104s
Makefile:358: recipe for target ‘flash’ failed
make[1]: *** [flash] Error 1
Makefile:333: recipe for target ‘recovery’ failed
make: *** [recovery] Error 2

///==============

sudo make flash
gives similar crash.

///==============

I also downloaded the prebuilt latest binaries:
from
http://builds.96boards.org/releases/hikey/linaro/binaries/latest/
and
https://builds.96boards.org/releases/hikey/linaro/debian/latest/

The flashing is still crashing in the same way.

Any help is appreciated.

Thank you.

As answered in https://github.com/OP-TEE/optee_os/issues/1296.

Hi,

Thanks a lot for your help!
Finally it works.