This is a cache of It is a snapshot of the page at 2021-06-06T12:22:20.768+0000.
Are there any reason why we don't have debian or ubuntu image for HiKey 960 and DragonBorad has? - HiKey 960 - 96Boards Forum

Are there any reason why we don't have debian or ubuntu image for HiKey 960 and DragonBorad has?

Are there any reason why we don’t have debian or ubuntu image for HiKey 960 and DragonBorad has ?

Debian 9 or Ubuntu 16.04 ??

1 Like

It simply reflects the different focus of the teams behind these boards. The team that works on the Dragonboards has focused primarily on Debian whilst the team working on the Hikey family is focused on AOSP.

So Huawei has own team that work on Android for all phones in straightforward way
And some other people in linaro do AOSP version and they try to add mainline support to linux kernel?

It should be really nice to have basic debian distribution that anybody can flash to hikey.
It shouldn’t be hard with all that linaro knowhow and hw.

1 Like

We have preliminary Debian 9 test images with 4.15 kernel for Hikey/Hikey960:

They require latest UEFI firmware from

I have downloaded the prebuilt UEFI version 55

bash -r -v 55

uploaded the the images into RAM

strace -e trace=write,read,file -s 8192 -x ./hikey_idt -c config -p /dev/ttyUSB1 2>/tmp/HIKEY_IDT_LOG

and flashed the new partition table, l-loader and fip:

fastboot flash ptable prm_ptable.img
fastboot flash fastboot l-loader.bin
fastboot flash fip fip.bin

There are some error messages at boot

ch 0 gt_errfail, STATUS:0x00000060
ch 0 gdst_errfail, STATUS:0x00000040
ch 1 gt_errfail, STATUS:0x00000060
ch 1 gdst_errfail, STATUS:0x00000040
ch 2 gt_errfail, STATUS:0x00000060
ch 2 gdst_errfail, STATUS:0x00000040
ch 3 gt_errfail, STATUS:0x00000060
ch 3 gdst_errfail, STATUS:0x00000040
C0W!DV0x0000000drang0Cnt0x0000000d status:0x00000001 err_code:225

but the bleeding edge UEFI is now running (even with OP-TEE, but i’m planning to get rid of all this “trusted” firmware once everything is sorted out):

boot_c0 PROFILE 4
NOTICE:  Booting Trusted Firmware
NOTICE:  BL1: v1.4(release):v1.4-656-g15e59585
NOTICE:  BL1: Built : 11:03:12, Feb 12 2018
NOTICE:  BL1: Booting BL2
NOTICE:  BL2: v1.4(release):v1.4-656-g15e59585
NOTICE:  BL2: Built : 11:03:12, Feb 12 2018
NOTICE:  BL1: Booting BL31
NOTICE:  BL31: v1.4(release):v1.INFO:    TEE-CORE:
INFO:    TEE-CORE: OP-TEE version: 2.6.0 #1 Mon Feb 12 11:03:10 UTC 2018 aarch64
INFO:    TEE-CORE: Initialized
UEFI firmware (version Alpha built at 11:02:50 on Feb 12 2018)

Now i have downloaded the Hikey debian image rootfs-linaro-stretch-developer-hikey-20180212-17.img.gz
decompressed it, and converted into normal ext4 image

simg2img rootfs-linaro-stretch-developer-hikey-20180212-17.img rootfs-linaro-stretch-developer-hikey-20180212-17.ext4

It has a moderate size of 1819279360 bytes, so where should i flash it in UFS ?
And the most important question: where do i get the hikey960 (not hikey!) 4.15 kernel, dtb and ramdisk and how does it fit into the whole UEFI infrastructure ?

What about xloader partition (sec_xloader.img) ?

You need to flash the boot*.uefi.img to ‘boot’ partition.
You can flash rootfs to ‘system’ partition (sdd10).

OK. The sec_xloader.img was already there :slight_smile:
Flashed this uefi boot image

fastboot flash boot boot-0.0+AUTOINC+ba45819943-ea12986b87-r0-hikey960-20180209072216-129.uefi.img

and this rootfs

fastboot flash system rootfs-linaro-stretch-developer-hikey-20180212-17.img

The kernel+RD boots

Begin: Will now check root file system ... fsck from util-linux 2.29.2                                                                                                                                                                                                                                                                                                    
[/sbin/fsck.ext4 (1) -- /dev/sdd10] fsck.ext4 -a -C0 /dev/sdd10                                                                                                                                                                                                                                                                                                           
rootfs: clean, 32545/111104 files, 285345/444160 blocks                                                                                                                                                                                                                                                                                                                   
[    5.108338] EXT4-fs (sdd10): mounted filesystem with ordered data mode. Opts: (null)                                                                                                                                                                                                                                                                                   
Begin: Running /scripts/local-bottom ... done.                                                                                                                                                                                                                                                                                                                            
Begin: Running /scripts/init-bottom ... done.                                                                                                                                                                                                                                                                                                                             
[    5.204415] systemd[1]: System time before build time, advancing clock.                                                                                                                                                                                                                                                                                                
[    5.223911] ip_tables: (C) 2000-2006 Netfilter Core Team                                                                                                                                                                                                                                                                                                               

Welcome to Debian GNU/Linux 9 (stretch)!

but it seems that the rootfs has some problems

[ ***  ] A start job is running for dev-disk…label-BOOT.device (41s / 1min 30s)
[ TIME ] Timed out waiting for device dev-disk-by\x2dlabel-BOOT.device.
[DEPEND] Dependency failed for /boot/efi.
[DEPEND] Dependency failed for Local File Systems.

The console is dead now, need to reboot

You are in emergency mode. After logging in, type "journalctl -xb
Cannot open access to console, the root account is locked.
See sulogin(8) man page for more details.

Press Enter to continue.
sulogin: input overrun at /dev/ttyAMA6

Rebooted. BT firmware is missing

[    5.603288] hci-ti serial0-0: Direct firmware load for ti-connectivity/TIInit_11.8.32.bts failed with error -2
[    5.613315] Bluetooth: hci0: request_firmware failed(errno -2) for ti-connectivity/TIInit_11.8.32.bts
[    5.622545] Bluetooth: hci0: download firmware failed, retrying...

and the console is locked :frowning:
Should i edit the rootfs and allow getty & root login on the console ?
Going to be messy with this sparse ext4 …

You can get firmware (TIInit_11.8.32.bts) from android tree:

you can use simg2img to convert from sparse to regular img and then mount the img:

$ simg2img rpb.uefi.img update.img
$ mkdir mount
$ mount -o loop update.img mount
$ ...
$ umount mount/
$ img2simg update.img rpb.uefi.img

Done. I have added the root password hash to /etc/shadow and can login.
The actual problem is with this /etc/fstab entry for “EFI System” on /dev/sdd7

# device during installation: /dev/loop0p1
LABEL=BOOT     /boot/efi       vfat    rw      0       2

root@linaro-developer:~# mount /boot/efi
mount: can't find LABEL=BOOT

root@linaro-developer:~# mount /dev/sdd7 /mnt/
[ 1328.513698] FAT-fs (sdd7): logical sector size too small for device (logical sector size = 512)
mount: /dev/sdd7: can't read superblock

root@linaro-developer:~# dd if=/dev/sdd7 bs=256 count=1 2>/dev/null| od -A x -t c
000000 353   X 220   m   k   f   s   .   f   a   t  \0 002 001      \0   
000010 002  \0  \0  \0  \0 370  \0  \0   ?  \0 377  \0  \0  \0  \0  \0
000020  \0  \0 002  \0 361 003  \0  \0  \0  \0  \0  \0 002  \0  \0  \0
000030 001  \0 006  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
000040 200  \0   ) 223   z 210 342   b   o   o   t                    
000050           F   A   T   3   2             016 037 276   w   | 254
000060   " 300   t  \v   V 264 016 273  \a  \0 315 020   ^ 353 360   2
000070 344 315 026 315 031 353 376   T   h   i   s       i   s       n
000080   o   t       a       b   o   o   t   a   b   l   e       d   i
000090   s   k   .           P   l   e   a   s   e       i   n   s   e
0000a0   r   t       a       b   o   o   t   a   b   l   e       f   l
0000b0   o   p   p   y       a   n   d  \r  \n   p   r   e   s   s    
0000c0   a   n   y       k   e   y       t   o       t   r   y       a
0000d0   g   a   i   n       .   .   .      \r  \n  \0  \0  \0  \0  \0
0000e0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0

I would say it is actually a success story, and after some polishing Debian 9 is ready for an enduser.
The UFS disk is horribly fragmented because of the android et al. stuff, but it’s bearable for now.

Disk /dev/sda: 4 MiB, 4194304 bytes, 1024 sectors
Disk /dev/sdb: 4 MiB, 4194304 bytes, 1024 sectors
Disk /dev/sdc: 8 MiB, 8388608 bytes, 2048 sectors
Disk /dev/sdd: 29.8 GiB, 31973179392 bytes, 7805952 sectors

/dev/sdc1    256  2047    1792   7M Microsoft basic data

GPT PMBR size mismatch (7805956 != 7805951) will be corrected by w(rite).
The backup GPT table is corrupt, but the primary appears OK, so that will be used.
GPT PMBR size mismatch (7805956 != 7805951) will be corrected by w(rite).

/dev/sdd1      256     511     256    1M Microsoft basic data
/dev/sdd2      512    3583    3072   12M Microsoft basic data
/dev/sdd3     3584    5119    1536    6M Microsoft basic data
/dev/sdd4     5120    8191    3072   12M Linux filesystem
/dev/sdd5     8192   73727   65536  256M Microsoft basic data
/dev/sdd6    73728   73983     256    1M Microsoft basic data
/dev/sdd7    73984   90367   16384   64M EFI System
/dev/sdd8    90368   94463    4096   16M Microsoft basic data
/dev/sdd9    94464   94975     512    2M Microsoft basic data
/dev/sdd10   94976 1295103 1200128  4.6G Linux filesystem
/dev/sdd11 1295104 1495807  200704  784M Microsoft basic data
/dev/sdd12 1495808 1496063     256    1M Microsoft basic data
/dev/sdd13 1496064 7805951 6309888 24.1G Linux filesystem

@helg You have flashed the wrong boot partition. Flash the one matching to the rootfs release. Use the one from the debian build:

The BT firmware does but not on the first boot. Need to investigate more.

I am always confused by this hikey vs. hikey960 naming, but having running Debian on hi3660 is a great thing. We still have not lost the battle for general purpose computing against the android multilayered jail garden :sunglasses:


Lemaker’s wiki retrospectively renamed the original hikey as hikey620 around the time the hikey960 was released. That would be useful but the renaming so long after the product is released means “hikey” will always be somewhat ambiguous (have to study the context very closely to figure out if it refers to the family or the old product… or if the poster actualy means hikey960 and doesn’t know how ambiguious hikey already is).

Anybody can write wiki article how to can install this official debian image?
I don’t see any information on download page

1 Like

If there was a wiki, i can document the debian installation and provide other helpful background information.

You can contribute to the documentation:

Do i need a github account for that ?



<disclaimer>This is a personal viewpoint… not agreed Linaro policy</disclaimer>

I was kinda hoping that contribution policy wouldn’t come up. I don’t consider it to be very user friendly (for these reasons).

So you do need a github account to make a pull request but, whilst the policy may come across as a bit over zealous, there are lots of humans patrolling the issue tracker! If you do submit an issue asking where to file it they will help you figure out where best to put the docs.

PS If your question about github is an ethical issue rather than simply not-having-an-account then we can probably find someone to act as a bridge.


Would it be possible to share some of the steps you used to install Debian on the hikey 960? I am in the same boat as you were and would appreciate some pointers on how to get the install going.

If it helps, I have done this already:

and continued with this:
I just dont see anything when I try to boot the box up.

I’ve also tried this with no success:

Any help will be much appreciated.