Upgrading to Buster?

Is it possible to upgrade to a newer Debian release? Did anybody try?
It looks like nobody supports this board anymore or I’m wrong?

Dmitry

Hikey960 remains a reference board for AOSP. That means there are (reasonably) recent and tested kernels available for the board. I don’t think there will ever be another Debian release but there are enough pieces knocking about to construct a new Debian rootfs could be put together (although unless you were very lucky you would almost certainly need a UART adapter to debug things).

That’s sad.
Linaro seems have all the staff to create another release.
Images (for stretch) seems generated by FAI.
Kernel and few custom packages are built by OBS (and these packages are available with APT).
Unfortunately I’m not familiar with these, not sure I will be able to create such an image shortly.

I’m also considering the possibility to upgrade my running board with APT, but the main issue for me is to backup a rootfs partition (and restore in case of problems).

I’ve created the Armbian build for Hikey960.
The source code is at https://github.com/divis1969/build/tree/hikey960
There is also release published at github (https://github.com/divis1969/build/releases/tag/hikey960-v0.1). It contains .img and .ext4 images for Armbian Ubuntu Focal (20.04). I did not build or test other distros that can be built in Armbian environment.

The .img file can be flashed to SD card (with Balena Etcher, for example) and the board can boot from SD card (if you are lucky or patient and try few times, it can hung on boot while initializing SD card. This seems a known issue, I’ve grabbed a patch from Android 5.4 kernel which I hope can address it, but it does not).

You need a debug console to to see the boot log and login for the first time.
While booting, Armbian resize the rootfs partition, so give it some time.
Than you should follow the prompts to setup root password and setup a non-root account.
Once done, you can configure Wifi:
nmcli radio wifi
nmcli radio wifi on (if not enabled)
nmcli device wifi list
nmcli device wifi connect "<SSID>" password <PASSWORD> name "<NM-Connection-name>"

After wifi connected, you can ssh to the board.

The .ext4 image is intended to be flashed to system partition with fastboot. I did not tried this yet.
I’m going to backup existing system partition first (and maybe backup the services I have running on this board, so I can restore those later on new distro).

1 Like

There is also kernel 5.4 integrated to Armbian build for Hikey960. It is built from Android source tree but with few changes in the kernel config. The code and release published on the same github.

This build seems does not suffer from hang caused by SD card.

Since I now have a backup of my current system, I’ve tried to upgrade to Buster with apt. I’ve disabled all 3rd party sources. replaced ‘stretch’ with 'buster in /etc/apt/sources.list, and replaced http://obs.linaro.org/linaro-overlay-stretch/Debian_9.0/
with http://obs.linaro.org/linaro-overlay-buster/buster/ in /etc/apt/sources.list.d/linaro.list, lines with http://obs.linaro.org/hikey/stretch/ left untouched (this is the kernel).

sudo apt update
sudo apt upgrade
sudo apt dist-upgrade

Upgrade was successful (well, actually, if fails initially because of the no more space left on the root partition, I’ve removed all I can and repeated again, successfully this time).

The services running though required additional corrections (mostly because of 3rd party packages used).

Actually, I’m going to switch to Armbian with 5.4 kernel - this build shows a higher Wifi throughput (it uses 4 bit bus in DTS) and, as I said above, no issue with SD card initialization.

Hi,

I’m trying to make the USB working through the Type A connectors on the Armbian (see above) with android’s kernel 5.4.
I can see 2 USB hubs with lsusb:
$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Unfortunately, it looks like the power is not provided by the connector(s) and there is no device detected.
At the same time, I can see that gpios seems ok:
$ sudo cat /sys/kernel/debug/gpio

gpiochip25: GPIOs 304-311, parent: amba/fff0e000.gpio, fff0e000.gpio:
...
 gpio-306 (GPIO_202_VBUS_TYPEC |typec-vbus          ) out lo 
...
 gpio-310 (GPIO_206_USBSW_SEL  |otg-switch          ) out hi 
...
gpiochip5: GPIOs 464-471, parent: amba/e8a10000.gpio, e8a10000.gpio:
...
 gpio-470 (GPIO_046_HUB_VDD33_E|hub-vdd33-en        ) out hi 

I have tried to boot Debian/4.19 from sd card and cannot observe device detection as well, though previously, when I have it on system partition, the USB worked good (I’ve used USB-Ethernet adapter for some time instead of wifi).

JIC, if I connect the Type C connector to another host, I can see some activity on host machine, but device is not detected properly. I suppose this is just because the USB gadget on the board is not properly configured. I do not think this affects the type A (or indicate the same root cause.

When I was trying to switch to my own (Armbian) build, I had occasionally damaged the info of emmc.
I was able to restore it (following https://github.com/96boards-hikey/tools-images-hikey960/blob/master/README-flash-uefi.md) and boot my build (as well as Debian) but maybe I’ve lost something (ex. some firmware that is uploaded by bootloder to the USB switch - it is connected by I2C but linux kernel drivers seems does not use this)?
I know that ancient bootloader (non-UEFI) was patching the devicetree, but I doubt this have any relation to my issue.

I’m stuck with it assuming this is either my HW issue or this is due to the damaged emmc, so I would appreciate for any suggestions.

Upgraded to bookworm today, but still running the old patched 4.14 kernel because of the HDMI driver.
Less android = more freedom.

Debian GNU/Linux 12 linaro-developer ttyAMA6

linaro-developer login: root (automatic login)

Linux linaro-developer 4.14.0-linaro-hikey960+ #1 SMP PREEMPT Mon Apr 12 20:56:34 UTC 2021 aarch64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Sep 20 12:16:28 UTC 2023 on ttyAMA6
root@linaro-developer:~# ~.

Disconnected.