Ubuntu Bionic is here!


#24

the config is updated in

hope it helps you.
Also it seems that the EDID is not necessary but we need: video=HDMI-A-1:1920x1080@60e


#25

Wonderful…
Thank you this will help for sure.
I will test it within the next hour or so.

If i can get video working with the video=HDMI-A-1:1920x1080@60e added to the command-line it should be easier to track down the problem. Considering that line specifies the connector and the mode maybe its just one of the 2 that needs patched. Either selecting the correct connector or setting the mode.

Have you tested this after
Merge pull request #1 from hihope-hikey/hikey970-debain


#26

I downloaded your kernel tree by doing.
git clone https://github.com/janrinze/linux.git -b hikey970-v4.9

I tried to build it and i get the error below.
Which is related to the commit i asked you about.

Do you have a kernel tree that you can test to make sure it builds?
I am building the kernel on a server are you building it on the Hikey970 or cross-compiling?
What tool-chain are you using. I wonder if it is a tool-chain issue but i don’t think it is.

If you have a kernel that works and will build can you upload it so i can try this?

And my last question is do you have a modified defconfig file.
Or are you copying .config with the changes to the tree after doing make mrproper?

HERE is the build ERROR.
If you turn off #define CMA_POOL in /drivers/gpu/hisilicon/kirin9xx/kirin_drm_drv.h
I think it will build.
But do we need the CMA Pool.

I hope you have the good kernel source on a local machine or stashed away somewhere. We need to version before Merge pull request [#1] from hihope-hikey/hikey970-debain.

I have a feeling thats where things got broken. Else i have a tool chain problem.
Can you try to build the kernel on your end and let me know.

Thanks for the help !!
-DKBUILD_MODNAME=’“kirin_drm”’ -c -o drive rs/gpu/drm/hisilicon/kirin9xx/.tmp_kirin_fbdev.o drivers/gpu/drm/hisilicon/kirin 9xx/kirin_fbdev.c
drivers/gpu/drm/hisilicon/kirin9xx/kirin_fbdev.c: In function ‘kirin_drm_fbdev_i nit’:
drivers/gpu/drm/hisilicon/kirin9xx/kirin_fbdev.c:456:14: error: assignment to ‘s truct drm_fbdev_cma *’ from incompatible pointer type ‘struct drm_fb_helper *’ -Werror=incompatible-pointer-types]
priv->fbdev = helper;
^
drivers/gpu/drm/hisilicon/kirin9xx/kirin_fbdev.c: In function ‘kirin_drm_fbdev_f ini’:
drivers/gpu/drm/hisilicon/kirin9xx/kirin_fbdev.c:470:33: error: initialization o f ‘struct drm_fb_helper *’ from incompatible pointer type ‘struct drm_fbdev_cma *’ [-Werror=incompatible-pointer-types]
struct drm_fb_helper *helper = priv->fbdev;
^~~~
In file included from ./include/linux/list.h:8,
from ./include/linux/agp_backend.h:33,
from ./include/drm/drmP.h:35,
from drivers/gpu/drm/hisilicon/kirin9xx/kirin_fbdev.c:18:
./include/linux/kernel.h:836:48: error: initialization of ‘const struct drm_fb_h elper *’ from incompatible pointer type ‘struct drm_fbdev_cma *’ [-Werror=incomp atible-pointer-types]
const typeof( ((type *)0)->member ) *__mptr = (ptr);
^


#27

Just to mention.
If you turn off USB_SERIAL I think your usb will work right for uart.
My config is different and UART Works.
The only setting i have is

CONFIG_USB_SERIAL is not set

I THINK I FOUND THE MAIN REASON YOUR CONSOLE IS NOT WORKING.
You need to change the grub.cfg commandline.
Mine is set to.
console=tty0 console=ttyAMA6,115200n8

Yours is set to
console=tty1 console=ttyAMA6,115200n8

**---Line 3862 Changed From **
**# CONFIG_USB_SERIAL is not set**
**---Changed To**
**CONFIG_USB_SERIAL=y**
**# CONFIG_USB_SERIAL_CONSOLE is not set**
**CONFIG_USB_SERIAL_GENERIC=y**
**# CONFIG_USB_SERIAL_SIMPLE is not set**
**# CONFIG_USB_SERIAL_AIRCABLE is not set**
**# CONFIG_USB_SERIAL_ARK3116 is not set**
**# CONFIG_USB_SERIAL_BELKIN is not set**
**# CONFIG_USB_SERIAL_CH341 is not set**
**# CONFIG_USB_SERIAL_WHITEHEAT is not set**
**# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set**
**# CONFIG_USB_SERIAL_CP210X is not set**
**# CONFIG_USB_SERIAL_CYPRESS_M8 is not set**
**# CONFIG_USB_SERIAL_EMPEG is not set**
**CONFIG_USB_SERIAL_FTDI_SIO=y**
**# CONFIG_USB_SERIAL_VISOR is not set**
**# CONFIG_USB_SERIAL_IPAQ is not set**
**# CONFIG_USB_SERIAL_IR is not set**
**# CONFIG_USB_SERIAL_EDGEPORT is not set**
**# CONFIG_USB_SERIAL_EDGEPORT_TI is not set**
**# CONFIG_USB_SERIAL_F81232 is not set**
**# CONFIG_USB_SERIAL_GARMIN is not set**
**# CONFIG_USB_SERIAL_IPW is not set**
**# CONFIG_USB_SERIAL_IUU is not set**
**# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set**
**# CONFIG_USB_SERIAL_KEYSPAN is not set**
**# CONFIG_USB_SERIAL_KLSI is not set**
**# CONFIG_USB_SERIAL_KOBIL_SCT is not set**
**# CONFIG_USB_SERIAL_MCT_U232 is not set**
**# CONFIG_USB_SERIAL_METRO is not set**
**# CONFIG_USB_SERIAL_MOS7720 is not set**
**# CONFIG_USB_SERIAL_MOS7840 is not set**
**# CONFIG_USB_SERIAL_MXUPORT is not set**
**# CONFIG_USB_SERIAL_NAVMAN is not set**
**CONFIG_USB_SERIAL_PL2303=y**
**# CONFIG_USB_SERIAL_OTI6858 is not set**
**# CONFIG_USB_SERIAL_QCAUX is not set**
**# CONFIG_USB_SERIAL_QUALCOMM is not set**
**# CONFIG_USB_SERIAL_SPCP8X5 is not set**
**# CONFIG_USB_SERIAL_SAFE is not set**
**# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set**
**# CONFIG_USB_SERIAL_SYMBOL is not set**
**# CONFIG_USB_SERIAL_TI is not set**
**# CONFIG_USB_SERIAL_CYBERJACK is not set**
**# CONFIG_USB_SERIAL_XIRCOM is not set**
**# CONFIG_USB_SERIAL_OPTION is not set**
**# CONFIG_USB_SERIAL_OMNINET is not set**
**# CONFIG_USB_SERIAL_OPTICON is not set**
**# CONFIG_USB_SERIAL_XSENS_MT is not set**
**CONFIG_USB_SERIAL_WISHBONE=m**
**# CONFIG_USB_SERIAL_SSU100 is not set**
**# CONFIG_USB_SERIAL_QT2 is not set**
**CONFIG_USB_SERIAL_DEBUG=m**

#28

try the other branch hikey970-v4.9-jrp.
I use that, it has a few changes to get things compiled.

The UART used by the boot process and grub are not changed by anything in the kernel, the kernel isn’t running yet then.


#29

USB_SERIAL I need because I have more boards here and connect to them over USB to Serial cables. It’s not related to the serial console that is available before the kernel boots or when grub shows its menu.


#30

Just wondering if your sure about these settings.
CONFIG_EXTRA_FIRMWARE=“edid/edid.bin”
CONFIG_EXTRA_FIRMWARE_DIR=“firmware”

I’m having a different problem now.
Error related to no rule to make target edid/edid.bin
Seems something needs added to the kernel tree in firmware/edid?

I will try to build with those settings off.

If i do the following it builds ok.

export ARCH=arm64
make ARCH=arm64 mrproper
make ARCH=arm64 hikey970_defconfig
make ARCH=arm64 -j24

But if i
mv config_debian_hikey970 .config
export ARCH=arm64
make ARCH=arm64 -j24

It wont build correctly.
I will take a look at the configs when i get home to see what the difference is.

It’s not throwing any errors during the build but using the config_debian_hikey970 .config as .config it will not generate /boot/Image or Modules.
If i run make ARCH=arm64 modules it will build the modules.
But if i make ARCH=arm64 vmlinux I get the error.


#31

Sorry about that, the edid in the kernel actually does not belong there and was an attempt to get 2560x1440. It did not work either since the bandwidth is too high for the hardware.
Updated the git repository.


#33

Hi, I have two question about hikey970…

1. Did you port ubuntu 18.04 on hikey970 board successfully?

2. How can I see grub menu?
hikey board turn on -> black screen -> shunya login window...
I want to see grub menu....

#34
  1. No need to port, Ubuntu 18.04 supports arm64. The board itself requires a working kernel and that is not provided by Ubuntu.
  2. grub menu can be seen on the serial console, not on the screen.

#36

Thank you so much, janrinze!!!

I can see the grub menu on the serial console!

and also I have a question…
Why I can see the message from kernel, grub menus on only serial console?
Is it possible to see those things on HDMI monitor connected to hikey 970 board??


#37

Unfortunately grub is used to start the kernel but does not have HDMI support.
In general grub would be using the bios to show messages and on a PC the bios handles the screen output.
The console output on the USB-C at the side of the board does not accept input.


#38

I just want to add one note here.
Maybe there is something different about my board.
I have loaded the Lemaker Ubuntu 16.04.
I am running Kernel from janrinze tree.

I swear on my life that the usb-c port on the side of the board all alone works for both input and output in my case. I’m not sure what the difference is but my board is reversed.

If i connect to the 3 pin Uart on low speed expansion header that serial connection will not allow input.

If i connect usb-c (not next to hdmi) on side of board I have both input and output in console.

It cant be the kernel cause we are running the same kernel.
Is it possible that the tty setting in the grub.cfg changes this?

I would also like to point out for anyone that wants to edit the grub.cfg.
You will find grub.cfg in 2 places, in the rootfs ( /boot/grub/grub.cfg).
And also in the BOOT.img. (boot-hikey970.uefi /boot/grub/grub.cfg)

To change the grub.cfg you have to mount boot-hikey970.uefi.
Then edit the grub.cfg, then unmount and flash boot-hikey970.uefi to the boot partition.


#39

Hi,

I have 2 questions related to this it would be great if you could help me with this.

  1. I wanted to limit the size of the available physical memory. On researching about how to do this, i found out that we can edit the grub.cfg in the (/boot/grub/grub.cfg) and add a parameter “mem=2G”. After this, i do a reboot but the total available physical memory doesn’t change.
    Could you tell me how I can achieve this ?

PS: I did all this directly on the board.
Also, I flashed all the binaries(like leubuntu-16.04.img, boot-hikey970.uefi.img etc) from a windows terminal (host machine) using AndroidSDK platform tools (fastboot.exe) on the board.

  1. I tried to hold shift during reboot to get the grub menu but i am not able to see it. On reading one of the post, it was written that the grub menu will be on the serial console and not on the screen. Could you tell me how to get this grub menu, if I have a windows host machine?

Regards,
Siva


#40

First don’t edit the grub.cfg on the board.
You have to edit the grub.cfg that is in the boot image.
To do that you have to mount the boot-hikey970.uefi.img
Then edit the grub.cfg in /boot/grub/grub.cfg

sudo mount -o loop boot-hikey970.uefi.img ~/directory-to -mount-image
In order to do that you need a linux system. Windows wont work.

To see the grub boot menu you need the console.
Connect usb cable to usb-c that is by itself. not next to hdmi.
Open windows device manager and find the port number.
then use putty to connect to the serial console of the board.

Not sure how your going to mount and edit boot-hikey970.uefi.img.
You might be able to use.
https://www.osforensics.com/tools/mount-disk-images.html

Download the demo.

After you edit the boot-hikey970.uefi.img you need to flash it to the boot partition.
fastboot flash boot boot-hikey970.uefi.img


#41

Is there anyone who can make partition table for Hikey970 ???


#42

I have a ptable that makes /de/sdd12 about 60gb.
use 64gtoendprm_ptable.img instead of prm_patable.img.
You can get 64gtoendprm_ptable.img from here.

After you flash the new table and boot the board run.
sudo resize2fs /dev/sdd12

Make sure the commandline in the grub.cfg points to /dev/sdd12.


#43

Thank you. This worked fine and I am able to vary the size of Physical Memory.

I connected the serial port to my machine and started PUTTY at the serial line (identified by the device manager). As soon as I switch on the board so garbage is getting printed on the session. This is what i am trying to do to get the grub menu.

  1. Open the terminal
  2. enter reboot
  3. hold shift when it is rebooting (nothing is happening)
  4. I also tried to hit Esc continuously, it stopped booting.

Could you tell me the correct way to get the grub menu?

Regards,
Siva


#44

You should connect usb to usb-c on side of board not the one next to the hdmi.

My putty settings are like this.

Serial Line is COM 24
Speed 115200
Connection Type serial is checked.

Under SERIAL TAB.

Set com port
speed = 115200
data bits 8
stop bits 1
Parity = none
Flow control = Xon/xoff

Usually i open putty right after plugging in the board.
The grub menu comes up.

Did you build a kernel?
The 96 boards kernel needs work to run ubuntu - Debain.
I have a working Branch if you need it.


#45

The settings were the issue, now i am able to get the grub menu. Thank you :slight_smile:

Not the new kernel. (the initial one that i built had the issue of Monitor glowing) Is that fixed?
The working branch that you have is Debian or Ubuntu? Sure, i would like to try.

Regards,
Siva