Debian Stretch Image?



is Linaro/96Boards working on a Debian Stretch release, if so are there any pre-build test images for the HiKey board?


There are some stretch based snapshots for DB410C but currently there’s not anything for Hikey.


Hi 96Boards team and community,

I have been attempting to upgrade the HiKey (LeMaker 2gb in this case) Jessie image to Stretch, but have run into difficulties. Wondering if there is a native Stretch image that is available now, perhaps?

As for upgrading in place from Jessie, I have attempted the following:

apt-get update
apt-get upgrade
apt-get dist-upgrade

This results in the board unable to reboot, apparently due to a rewrite of the initrd file in the /boot directory. Upon freshly flashing the board with the latest image available (16.06 I believe), this file is 17.1mb in size. Watching those upgrade steps take place in a console and in PCManFM, I can see the file get rewritten, to 16.9mb upon completion. If I make a back up of the initrd file prior to these upgrade steps, then try this upgrade and allow it take place, then replace the newly created initrd with the backup I made previously, I can actually reboot.

So, that gets me to the latest version of Jessie.

Now, on to Stretch!

Editing /etc/apt/sources.list and replacing “jessie” with “stretch” in all lines, I can once again go through the same steps:

apt-get update
apt-get upgrade

This will complete successfully, however, rebooting once again will now fail to boot. :frowning:

I have the UART adapter from SeeedStudio, so I can watch the console upon boot:

Grub menu loads, after 5 seconds pass, Debian attempts to boot, but the last line on the console is:

EFI stub: Exiting boot services and installing virtual address map...

And the system just hangs. Some googling reveals the need to add “earlyprintk” or “console=ttyUSB0” to the kernel command line to get more detail, as the system could potentially be sitting at a prompt needing some user input, but, I am unsure.

(I do have the Seed UART adapter connected, as well as second UART adapter on pins 2 and 4 of J0 header, though I am not getting anything there either.)

So, anyone have any ideas? Anyone successfully upgraded to Stretch? Or better yet, is there a premade image sitting out there that I have simply missed? :smile:



There’s these:

They are unreleased snapshot builds (and I’m not sure there is any documentation) but its probably less effort than upgrading the distro. I recall doing some manual upgrades on hikey… it tended to break the bootloader configuration and, once you reboot, it can be really difficult to boot any kind of image to recover things.


This is excellent, I will give these a try!

Thanks for pointing me to them! :smiley:


Well, unfortunately, this didn’t work. :frowning:

root@david-VirtualBox:/home/david/Downloads# sudo fastboot flash boot boot-linaro-stretch-developer-hikey-20180212-17.img
target reported max download size of 524288000 bytes
sending 'boot' (65536 KB)...
OKAY [  3.820s]
writing 'boot'...
OKAY [  3.571s]
finished. total time: 7.390s
root@david-VirtualBox:/home/david/Downloads# sudo fastboot flash system rootfs-linaro-stretch-developer-hikey-20180212-17.img
target reported max download size of 524288000 bytes
sending sparse 'system' (511097 KB)...
OKAY [ 32.059s]
writing 'system'...
FAILED (remote: Error flashing partition.)
finished. total time: 32.098s

I am downloading the Desktop (alip) image sitting in this folder now, and will give that one a try:


If you’re flashing via uefi mode (jumpers 1-2, 5-6) then maybe try flashing via recovery mode (jumpers 1-2, 3-4).


I just attempted flashing the Desktop image as referenced above, but, the result was the same, FAILED error. This attempt was performed on a second board, just to be sure the first board was not having hardware issues. In both cases, these failed flashes have bricked the boards, with some odd behavior observed and dead boards in the end…

Both attempts were completed with 1-2 and 5-6 pins (so, Fastboot mode), which as described ended in FAILED errors. At this point, the board will not boot, so I switch jumper from 5-6 to 3-4, so that I should be in Recovery mode, and I believe I need to flash the bootloader with “ -d /dev/ttyUSB0 --img1=l-loader.bin”. That command works (end result is “Done”), and then the board is (I believe) supposed to reboot by itself into Fastboot mode. However, this does not occur…

No matter, I pull the power out, set jumper back to 5-6 so that I should once again enter Fastboot mode, but this time, the board is not recognized and I can’t connect, and thus cannot “fastboot flash” my images. Attaching my UART for a closer examination reveals the following:

NOTICE:  BL2: v1.4(release):v1.5-rc2
NOTICE:  BL2: Built : 10:35:47, Mar  9 2018
NOTICE:  syspll frequency:1190494208Hz
NOTICE:  succeed to init lpddr3 rank0 dram phy
NOTICE:  acpu_dvfs_set_freq: set acpu freq success!NOTICE:  BL2: Booting BL31
NOTICE:  BL3-1: v1.1(release):e9b4909
NOTICE:  BL3-1: Built : 10:50:16, Nov 28 2015
ERROR:   Error initializing runtime service opteed_fast 

So, the board is hanging, unable to enter finish booting even to Fastboot mode, leaving me with no way to even flash known working images.

Any ideas on how to at least get back to a functional state, I’d hate to lose two boards! Additionally, can anyone confirm those Debian Stretch images do in fact work?

Thanks again for the help!


@davidt Sorry to hear that. I think you might have a mixture of old vs new bootloader images that are not compatible with one another. Where did you get the l-loader.bin and fip.bin from that are currently flashed onto the broken board?

For now, try to get the boards back to a working state by via recovery mode (pins 1-2, 3-4 and using the images downloaded from below. Note that these images are old but known to work. (assume that you’re using an 8gb board, right?) (unzip before flashing this) (again, assume 8gb board, and unzip before flashing)

Power off, remove jumper 3-4, power up and verify board is recovered. Once recovered, get back into recovery mode again (using the 15.11 l-loader.bin image), and then, try flashing a boot and stretch image from

Note that the board will not reboot by itself out of recovery. You need to move the jumper from 3-4 to 5-6 (to get into fastboot mode) or from 3-4 to ‘off the board’ (for normal booting).


I use this Debian Stretch image in hikey960 (with its own ptable, uefi, kernel and dtb, because it’s a different CPU)
without any problems.


@vchong - Thanks for pointing me to these 15.11 images, using them I was able to unbrick my boards! Awesome!

I now have fastboot back, and, am currently flashing the Stretch images from the folder you linked to. The rootfs flashing is taking much longer than normal, but, I will let it run it’s course.

Current status:

root@david-VirtualBox:/home/david/Downloads/hikey1511# sudo fastboot flash system rootfs-linaro-stretch-alip-hikey-20171222-12.img
target reported max download size of 268435456 bytes
sending sparse 'system' (241625 KB)...
OKAY [  9.579s]
writing 'system'...
OKAY [ 92.865s]
sending sparse 'system' (262141 KB)...
OKAY [  9.577s]
writing 'system'...
OKAY [ 57.120s]
sending sparse 'system' (262026 KB)...
OKAY [  9.782s]
writing 'system'...
OKAY [132.491s]
sending sparse 'system' (262143 KB)...
OKAY [  9.671s]
writing 'system'...
OKAY [329.327s]
sending sparse 'system' (261916 KB)...
OKAY [  9.878s]
writing 'system'...
OKAY [564.176s]
sending sparse 'system' (262111 KB)...
OKAY [  8.909s]
writing 'system'...

So, this might take a while still. On the plus side I was able to salvage the boards with your help, thanks!


Well, the update did eventually flash completely, and fortunately the boards are un-bricked…but still no luck actually booting these Stretch images. :frowning:

The board boots up, but hangs at the following:

GNU GRUB version 2.02~beta3-5

 ▒*Debian GNU/Linux                                                           ▒
 ▒ Advanced options for Debian GNU/Linux                                      ▒
 ▒                                                                            ▒
 ▒                                                                            ▒
 ▒                                                                            ▒
 ▒                                                                            ▒
 ▒                                                                            ▒
 ▒                                                                            ▒
 ▒                                                                            ▒
 ▒                                                                            ▒
 ▒                                                                            ▒
 ▒                                                                            ▒

      Use the  and  keys to select which entry is highlighted.
      Press enter to boot the selected OS, `e' to edit the commands
      before booting or `c' for a command-line. ESC to return previous
   The highlighted entry will be executed automatically in 0s.
Loading Linux 4.15-hikey ...
Loading initial ramdisk ...
EFI stub: Booting Linux Kernel...
EFI stub: Using DTB from configuration table
EFI stub: Exiting boot services and installing virtual address map...

I have tried the images in both as well as

I suppose I can try 13, 14, 15, as well. But, anyone have any ideas?

Thanks again for all the assistance!


How long did it take to flash the rootfs? Did you do it from recovery mode? It shouldn’t take more than a few minutes.

In any case, now that we know we can recover the board if something goes wrong, try running a full recovery again using all latest images. (l-loader.bin, fip.bin, nvme.img, ptable-linux-8g.img)( is not available under this link but you can use the 15.11) (boot and rootfs images)


Yes, I did think it was odd, it took nearly an hour to flash the rootfs with “sudo fastboot flash system rootfs-linaro-stretch-developer-hikey-20180212-17.img”

At the end, it did say that it was successful, but I thought that was quite strange.

Ok, so now I will try these newer “uefi-openplatformpkg” files and see what the results are. I will report back.

Thanks again for all this help, it is awesome! :slight_smile:


Well, continuing the saga of weird behavior, here are some additional oddities! First and foremost, using the 15.11 series of files does result in a working board, so, I am able to recover from any bad flashes. :slight_smile:

Here is the series of steps performed on a 15.11 flash:

  1. l-loader (15.11 version)
  2. board will automatically reboot to fastboot mode
  3. fastboot flash ptable, fastboot, nvme, boot, rootfs (all 15.11 versions)

Attempting the same steps on the “latest” version of all files from the Stretch folder, however, presents some issues immediately with the l-loader. The output from the command line does state the command executed successfuly, resulting in “Done”, just like the 15.11 version does. However, the board does not automatically reboot to fastboot mode to then continue on with the next steps.

Because I do have the SEEED UART adapter, I can compare the difference in behavior on the console:

The 15.11 l-loader results in this on the console:

NOTICE:  Booting Trusted Firmware
NOTICE:  BL1: v1.1(release):e9b4909
NOTICE:  BL1: Built : 10:50:16, Nov 28 2015
NOTICE:  syspll frequency:1190494208Hz
NOTICE:  succeed to init lpddr3 rank0 dram phy
INFO:    lpddr3_freq_init, set ddrc 533mhz
INFO:    init ddr3 rank0
INFO:    ddr3 rank1 init pass
INFO:    lpddr3_freq_init, set ddrc 800mhz
INFO:    init ddr3 rank0
INFO:    ddr3 rank1 init pass
INFO:    Samsung DDR
NOTICE:  Enter fastboot mode...

The Stretch version of l-loader from the “latest” folder results in this:

NOTICE:  Booting Trusted Firmware
NOTICE:  BL1: v1.4(release):42f4d89
NOTICE:  BL1: Built : 07:32:31, Mar  9 2018
NOTICE:  BL1-FWU: *******FWU Process Started*******

…And just hangs there indefinitely.

A simple comparison of the two l-loader files shows they are significantly different file sizes, roughly 17k for the “latest” and 45k for the 15.11 version.

So, naturally, I figured I would attempt to mix and match, and use the 15.11 l-loader, and the board will then automatically enter fastboot, and then continue on with all of the rest of the files from the “latest” folder. Not terribly surprising, that did not result in a booting board either, ha. That got me so far as to a partially booting board that hangs at the kernel load, initrd load, and then hangs right where my journey began, with:

EFI stub: Exiting boot services and installing virtual address map...

Any last ideas, or, am I stuck with Jessie for eternity? :slight_smile:


Hope i’m not leading you around on a wild goose chase, but would you be willing to try any of the below?

  1. +
  2. +
  3. +


It’s not a goose chase, it’s kind of fun actually! I’ll try out these various combinations tomorrow and let you know the results. Thanks again!


Glad you see it that way! :slight_smile: Have fun and keep us posted. Thanks!


Unfortunately, no good news to report yet. Looking at your suggestions in order, here are the results:

  1. Using the location, this l-loader did not seem to flash properly (similar results to previous, where the board did not automatically reboot into fastboot mode upon completing the recovery)

  2. Because this suggestion made use of the same firmware as suggestion #1, this results in the same outcome as suggestion #1, with the board failing to transition to fastboot after the flash.

  3. This one, I actually have a question on, sorry! I know of course the 15.11 firmware will work, but, for the filesystem, this does not provide an image that I can flash via fastboot, correct? In the folder, I downloaded and extracted the .tar.gz file, but this seems to be a full rootfs…Is there a clean way to replace the rootfs on the eMMC with this one? Or, is there a preferred method to take this OS and create a flashable .img file out of it? (Sorry if that opens a whole other can of worms. If its not feasible, that’s fine too).

Thanks again!


For 1 and 2, try below. Do NOT do it for 3.
Download Then run:

python --img1=recovery.bin

If you do get into a fastboot mode, then run the fastboot flash command below. If not, I’m out of ideas and go to 3 below.

fastboot flash loader $(LLOADER_PATH)/l-loader.bin

Then flash the remaining images from the links provided in 1 and 2 in the previous comment above (ptable*.img, fip.bin, nvme.img, boot.img and rootfs image).

  1. Sorry, didn’t notice that. You can try below command on the extracted dir (assuming the extracted dir is called linaro-stretch-developer-20171109-88). Hopefully it works. Haven’t tried it for a long time.

sudo make_ext4fs -o -L rootfs -l 1500M -s linaro-stretch-developer-20171109-88.img linaro-stretch-developer-20171109-88
or e.g.
sudo make_ext4fs -o -L rootfs -l 1500M -s <new_rootfs_name>.img <dir name of extracted tar file>