FWTS on ARMv8 platform (HiKey LeMaker version) from scratch
This is second post from series about LeMaker version of HiKey board from
96boards Customer Edition family.
Previous
post focused on describing hardware part. In this post I would like to show how
to setup firmware development and testing environment.
This post highly rely on
96boards documentation,
so kudos to 96boards and LeMaker for providing lot of information for
developers.
[21174.122832] usb 3-2.2: USB disconnect, device number 15[21343.166870] usb 3-2.1.1: new full-speed USB device number 17 using xhci_hcd
[21343.268348] usb 3-2.1.1: New USB device found, idVendor=12d1, idProduct=3609[21343.268352] usb 3-2.1.1: New USB device strings: Mfr=1, Product=4, SerialNumber=0[21343.268353] usb 3-2.1.1: Product: \xffffffe3\xffffff84\xffffffb0㌲㔴㜶㤸
[21343.268355] usb 3-2.1.1: Manufacturer: 䕇䕎䥎
[21343.269159] option 3-2.1.1:1.0: GSM modem (1-port) converter detected
[21343.269271] usb 3-2.1.1: GSM modem (1-port) converter now attached to ttyUSB2
Correct command and UART log should look similar to this:
usb reset intr
reset device done.
start enum.
enum done intr
Enum is starting.
usb reset intr
enum done intr
NULL package
NULL package
USB ENUM OK.
init ser device done....
USB:: Err!! Unknown USB setup packet!
NULL package
USB:: Err!! Unknown USB setup packet!
NULL package
USB:: Err!! Unknown USB setup packet!
NULL package
USB:: Err!! Unknown USB setup packet!
NULL package
uFileAddress=ss=f9800800
uFileAddress=ss=f9800800
Switch to aarch64 mode. CPU0 executes at 0xf9801000!
As result I saw that green LED on board is on, then I proceed with fastboot
commands.
If above steps finish without the problems, then you know working procedure for
flashing all required components. Now let’s proceed with fast boot and flashing
remaining components:
Remove Boot Select jumper (link 3-4) and power on platform.
System configuration
Wireless network can be easily configured using
this instructions.
It is also required to setup DNS in /etc/resolv.conf ie.:
1
nameserver 8.8.8.8
Bug hunting
There was time when I asked myself what I can do ? Where to start ? Good way to
analyze system compatibility (and find bugs) from firmware perspective is
FirmwareTestSuit. It can be cloned
using:
At point of writing this post only 13 tests passed. Most of testes (243) were
aborted since no support for given feature was detected. This results show that
there is plenty to do before getting well-supported firmware on HiKey.
As presented above HiKey development process is not so simple. Using precompiled
binaries is very useful for presentation purposes, but adding features to EDK2
will requires recompilation some of mentioned components. Documentation is not
easy to search as well as forum, key probablem is that it needs more order,
because various information (sometimes unrelated) are spread actoss directories
and repositories.
Nevertheless hacking ARMv8 firmware may be fun and there huge undiscovered area
to explore. Key question is what valid use cases may lead to extensive firmware
development in this area ? First I would look into features that have to be
exposed to operating system ie. verify boot for Linux OS use of TEE module in
Linux.
As always please share if you feel this is valuable and comment if you have any
questions or something is unclear.
Founder of 3mdeb, a passionate advocate for open-source firmware solutions, driven by a belief in transparency, innovation, and trustworthiness. Every day is a new opportunity to embody the company's vision, emphasizing user liberty, simplicity, and privacy. Beyond business, a casual chess and bridge player, finding peace in nature and nourishment in theology, philosophy, and psychology. A person striving to foster a healthy community, grounded in collaboration and shared growth, while nurturing a lifelong curiosity and a desire to deeply understand the world.