Ubuntu Bionic is here!


#46

This is my kernel for Debain or Ubuntu.
I’m still working on it but it is working in the current state.
Bluetooth is turned off to get rid of the ldisk error.
Selinux is disabled cause ubuntu dont use it.
The display will work but is configured for 1920X1080. As long as Your monitor supports 1920X1080 it should work fine.

git clone https://github.com/Bigcountry907/linux.git -b hikey970-v4.9-Debain-Working

Make sure to use branch hikey970-v4.9-Debain-Working

I have an automated build script for putting together ubuntu bionic and building the kernel.

If your running Ubuntu Bionic you have to install a desktop.
If your running bionic you need to add sources to the /etc/apt/sources.list.
deb http://ports.ubuntu.com/ubuntu-ports bionic main universe multiverse restricted
deb-src http://ports.ubuntu.com bionic main universe multiverse restricted
deb http://ports.ubuntu.com/ubuntu-ports/ bionic-security main universe multiverse restricted
deb http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main universe multiverse restricted

After that then do all of this.

sudo resize2fs /dev/sdd12
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install tasksel
sudo tasksel install standard
sudo apt-get install lxde

If you do all that everything should be working.


#47

If you are running the firmware from LeMaker like ubuntu 16.04 no need for the extra apt-get installs.

Just build the kernel.

To install modules.
make ARCH=arm64 INSTALL_MOD_PATH=~/Your-Local-Dir modules_install

then copy the folder to /lib on the board.
So that
/lib/modules/$kernel-version is the path.

My path is.
/lib/modules/4.9.78debian-147548-g9163c1564fb0


#48

I tested lxde and ran into trouble.
but i did install xfce following the directions here and it’s not working too bad.

I made a menu driven interactive script to build Ubuntu Bionic, Build the Kernel, Install the modules and generate a flashable sparse imge.

I will start a new thread and post the program soon as i get a chance.


#49

Thank you So Much!!
This is very helpful


#50

I forgot one more thing, If you use my kernel tree, and for video to work you need to you also have to do the following.

You have to edit the grub.cfg in the path /boot/grub/grub.cfg of the boot-hikey970.uefi.
To do that mount the image and edit the grub.cfg.

Add this line at the end of the command line.

drm_kms_helper.edid_firmware=edid/1920x1080.bin video=HDMI-A-1:1920x1080@60e

And copy the 1920x1080.bin to /lib/firmware/edid.
You have to make dir edid in /lib/firmware on the board. Not the boot.image.

You can get the 1920x1080.bin here.

Be sure to install the modules from your kernel build.
And on the first boot run.
sudo resize2fs /dev/sdd12
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install tasksel
sudo tasksel install standard
sudo apt-get install xubuntu-desktop

My grub.cfg looks like this.

set default="0"

set timeout=10

menuentry ‘Ubuntu Bionic 18.04 (Hikey 970 CE)’ {
search.fs_label rootfs root
set root=($root)
linux /boot/Image-hikey970-v4.9.gz earlycon=pl011,0xfff32000,115200 clk_ignore_unused=true console=tty0 console=ttyAMA6,115200n8 root=/dev/sdd12 rootwait rw quiet efi=noruntime drm.debug=0xf drm_kms_helper.edid_firmware=edid/1920x1080.bin video=HDMI-A-1:1920x1080@60e consoleblank=0
devicetree /boot/kirin970-hikey970.dtb
}

menuentry ‘HiKey970 TEST KERNEL’ {
search.fs_label rootfs root
set root=($root)
linux /boot/test/Image-hikey970-v4.9.gz earlycon=pl011,0xfff32000,115200 clk_ignore_unused=true console=tty1 console=ttyAMA6,115200n8 root=/dev/sdd12 rootwait rw quiet efi=noruntime drm.debug=0xf drm_kms_helper.edid_firmware=edid/1920x1080.bin video=HDMI-A-1:1920x1080@60e consoleblank=0
devicetree /boot/test/kirin970-hikey970.dtb
}

menuentry ‘Recovery mode (Hikey 970 CE)’ {
search.fs_label rootfs root
set root=($root)
linux /boot/Image-hikey970-v4.9.gz earlycon=pl011,0xfff32000,115200 clk_ignore_unused=true console=tty0 console=ttyAMA6,115200n8 ro quiet efi=noruntime init=/bin/sh
devicetree /boot/kirin970-hikey970.dtb
initrd /boot/initramfs-v4.9
}

menuentry ‘Fastboot’ {
search.fs_label boot boot_part
chainloader ($boot_part)/EFI/BOOT/fastboot.efi
}


#51

Just to mention.
Thank janrinze for helping to get the video working. He spent some time working with me to get things going.


#52

Hopefully I get a chance to post the Bionic-Builder tonight.
It is a interactive menu driven builder for ubuntu bionic and the hikey970 kernel.

The kernel tree i have is working well.
Usb drives work
The display works
The sd card works
WiFi works
Ethernet works

And even my NVME SSD in the m.2 PCI slot is now working !!

I want to run one more test build to make sure everything is good to go then i will release my builder.