Ubuntu16.04 with kernel 4.16

Post Reply
User avatar
bpteodor
Posts: 2
Joined: Mon Apr 02, 2018 11:39 pm
languages_spoken: english
ODROIDs: u3 xu4
Has thanked: 0
Been thanked: 0
Contact:

Ubuntu16.04 with kernel 4.16

Unread post by bpteodor » Thu Apr 05, 2018 4:50 am

Since there is no support for the U3 any more, we are stuck with a very old kernel, that is not even capable of running docker.
So I compiled the kernel (4.16.0-v7) and I thought to share it, in case somebody else wants to use it too.
It's not really all that well tested, but it seems to work so far.

ubuntu16.04-odroidu3-kernel4.16
credentials: root/odroid

If you want to build it yourself, this is what I used as guide.
Thanks for the great guide, Nico Maas.

This is free software. It comes without any warranty. Use at your own risk.
Last edited by bpteodor on Fri Apr 06, 2018 3:39 am, edited 1 time in total.

User avatar
odroid
Site Admin
Posts: 32725
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 218 times
Been thanked: 367 times
Contact:

Re: Ubuntu16.04 with kernel 4.16

Unread post by odroid » Thu Apr 05, 2018 9:09 am

Really appreciate the OS image. I've uploaded it to our server as a mirror.
https://dn.odroid.com/4412/Linux/ubuntu ... ernel4.16/

I have a few questions.
Which Kernel configuration file did you use?
Is the SD, eMMC, Ethernet and USB working to run a headless system at least?
How about HDMI output?
Which u-boot version do you use?
Sorry for many questions.

User avatar
bpteodor
Posts: 2
Joined: Mon Apr 02, 2018 11:39 pm
languages_spoken: english
ODROIDs: u3 xu4
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu16.04 with kernel 4.16

Unread post by bpteodor » Fri Apr 06, 2018 3:38 am

Kernel config

I haven't done much testing but SD, Ethernet, USB, HDMI seem to work. I don't have eMMC.
One issue with the Ethernet is that it's generating a new MAC address on restart. I haven't looked into it yet.

u-boot version 2016.11-rc3-g8a65327 from https://github.com/tobiasjakobi/u-boot
Last edited by bpteodor on Mon May 28, 2018 5:57 pm, edited 2 times in total.

User avatar
odroid
Site Admin
Posts: 32725
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 218 times
Been thanked: 367 times
Contact:

Re: Ubuntu16.04 with kernel 4.16

Unread post by odroid » Fri Apr 06, 2018 8:49 am

Thank you for the links.

henriku
Posts: 12
Joined: Tue May 05, 2015 6:32 am
languages_spoken: english
ODROIDs: U3
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu16.04 with kernel 4.16

Unread post by henriku » Mon Apr 16, 2018 1:15 pm

How is the stability of your kernel?
I tried using your kernel config with the kernel 4.14 with some modifications to enable mail and hardware decoding and get kernel freezes randomly after a few hours.

I use the modified tree by Liquidacid:
https://github.com/tobiasjakobi/linux-o ... oid-4.14.y

redbean190ml
Posts: 4
Joined: Wed Jul 05, 2017 12:52 pm
languages_spoken: english
ODROIDs: U3
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu16.04 with kernel 4.16

Unread post by redbean190ml » Tue May 01, 2018 8:45 am

Impressive! :o
I hope this version be improved constantly. There is not much time left until 14.04 support expried.
And I'm so sad that Ubuntu 18.04 seems not to provide 32bit version and my U3 can't load Ubuntu after 16.04 support expired.
BTW, thanks for sharing, bpteodor :D

User avatar
odroid
Site Admin
Posts: 32725
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 218 times
Been thanked: 367 times
Contact:

Re: Ubuntu16.04 with kernel 4.16

Unread post by odroid » Tue May 01, 2018 8:49 am

Ubuntu 18.04 supports the 32bit ARM processors well.

redbean190ml
Posts: 4
Joined: Wed Jul 05, 2017 12:52 pm
languages_spoken: english
ODROIDs: U3
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu16.04 with kernel 4.16

Unread post by redbean190ml » Wed May 02, 2018 1:28 pm

OK, I was wrong. Thanks for correcting!

Mark1250
Posts: 14
Joined: Fri Jan 09, 2015 1:26 am
languages_spoken: english
ODROIDs: U3, XU4, C1+
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu16.04 with kernel 4.16

Unread post by Mark1250 » Tue May 22, 2018 12:57 pm

@bpteodor
Thanks for the work in getting kernel 4.16 to work with the U3.

I dd'ed the image to my 16GB emmc, but my U3 won't boot. On the serial console I get:

Code: Select all

Hit any key to stop autoboot:  0                                                                                                                                                                   
do_fat_cfgload : cmd = fatload mmc 0:1 0x41000000 boot.ini                                                                                                                                         
reading boot.ini                                                                                                                                                                                   
Warning : Reads a file that is smaller than the cluster size.                                                                                                                                      
1677 bytes read in 16 ms (101.6 KiB/s)                                                                                                                                                             
Find boot.ini file from FAT Area!!                                                                                                                                                                 
boot.ini command = setenv initrd_high "0xffffffff"                                                                                                                                                 
boot.ini command = setenv fdt_high "0xffffffff"                                                                                                                                                    
boot.ini command = setenv bootcmd "fatload mmc 0:1 0x40008000 zImage_4.16; fatload mmc 0:1 0x42000000 uInitrd-4.16.0-v7; fatload mmc 0:1 0x44000000 exynos4412-odroidu3_4.16.dtb; bootz 0x40008000"
boot.ini command = setenv bootargs "console=tty1 console=ttySAC1,115200n8 root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait ro mem=2047M ${videoconfig}"                                     
boot.ini command = boot                                                                                                                                                                            
reading zImage_4.16                                                                                                                                                                                
5390616 bytes read in 38 ms (135.3 MiB/s)                                                                                                                                                          
reading uInitrd-4.16.0-v7                                                                                                                                                                          
5851094 bytes read in 43 ms (129.8 MiB/s)                                                                                                                                                          
reading exynos4412-odroidu3_4.16.dtb                                                                                                                                                               
53449 bytes read in 65 ms (802.7 KiB/s)                                                                                                                                                            
Unknown command 'bootz' - try 'help'                                                                                                                                                               
boot.ini command =                                                                                                                                                                                 
NAME: S5P_MSHC4                                                                                                                                                                                    
NAME: S5P_MSHC4                                                                                                                                                                                    
>>> Load Boot Script from mmc 0:1 <<<                                                                                                                                                              
reading boot.scr                                                                                                                                                                                   
Warning : Reads a file that is smaller than the cluster size.                                                                                                                                      
1749 bytes read in 17 ms (99.6 KiB/s)                                                                                                                                                              
## Executing script at 40008000                                                                                                                                                                    
Unknown command 'ODROID4412-UBOOT-CONFIG' - try 'help'                                                                                                                                             
reading zImage_4.16                                                                                                                                                                                
5390616 bytes read in 38 ms (135.3 MiB/s)                                                                                                                                                          
reading uInitrd-4.16.0-v7                                                                                                                                                                          
5851094 bytes read in 43 ms (129.8 MiB/s)                                                                                                                                                          
reading exynos4412-odroidu3_4.16.dtb                                                                                                                                                               
53449 bytes read in 59 ms (883.8 KiB/s)                                                                                                                                                            
Unknown command 'bootz' - try 'help'                                                                                                                                                               
Exynos4412 #
I then tried the image on an sd card. I've got mythtv-backend, samba, and apache running for 2 days without issue.

Mark

sihorton
Posts: 13
Joined: Wed Mar 27, 2013 6:54 am
languages_spoken: english
ODROIDs: u2
Location: Sweden
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu16.04 with kernel 4.16

Unread post by sihorton » Sat Sep 01, 2018 8:30 am

@bpteodor
This worked great to run docker, I was able to follow the standard docker install instructions https://docs.docker.com/install/linux/d ... repository and get the latest 18.06.1-ce running on your new kernel without issue!

I was also able to "do-release-upgrade" and upgrade to ubuntu 18.04.1 LTS. I had some issues with ports.ubuntu.com not being found which I solved by setting the nameservers to "8.8.8.8" before the upgrade. The network card eth0 was coming up with a new random mac address on each restart. I was able to set a fixed ip address using netplan, or use "ip link set dev eth0 address xx:xx:xx:xx:xx:xx" command on boot to reset the mac address.

So now I have an odroid u2 running ubuntu 18.04.1 LTS with docker 18.06.1-ce which is really good.

I have not tested extensively and there could be other issues lurking I have not run into yet, but now I have an odroid u2 running ubuntu 18.04.1 LTS with docker 18.06.1-ce which is very encouraging!

/Simon

sihorton
Posts: 13
Joined: Wed Mar 27, 2013 6:54 am
languages_spoken: english
ODROIDs: u2
Location: Sweden
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu16.04 with kernel 4.16

Unread post by sihorton » Sat Sep 22, 2018 9:16 pm

I was able to find a better permanent solution to the board getting a new mac address on every reboot using this image.

Code: Select all

nano /etc/network/interfaces.d/eth0

Code: Select all

auto eth0
    iface eth0 inet dhcp
    hwaddress ether aa:bb:cc:dd:ee:ff
So by dropping a file for eth0 into interfaces.d I was able to properly set the configuration for eth0 and set a fixed mac address which persists across reboots, so now the router can assign the ip address as previously.

/Simon

smolit
Posts: 4
Joined: Fri Nov 09, 2018 8:43 pm
languages_spoken: english, german
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu16.04 with kernel 4.16

Unread post by smolit » Sun Nov 11, 2018 7:11 am

Hi Folks,

this images runs perfectly on a sd card but on a emmc it would't boot.
Do you have any ideas how to this image booted from emmc?

Thanks
Sebastian

MakhmudovEvgeniy
Posts: 39
Joined: Mon May 13, 2013 11:00 am
languages_spoken: english, russian
ODROIDs: ODROID-X2, ODROID-U3
Location: Russia
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Ubuntu16.04 with kernel 4.16

Unread post by MakhmudovEvgeniy » Tue Feb 12, 2019 3:22 am

I am use this image, but i have the random MAC in boot.
My target was permanent MAC.
After some failed attempts, i use udev to get target. I described my step, maybe somebody find it useful in next.
Pages which used :
First used hwinfo utility to find path of class device in network interface eth0, example of output

Code: Select all

>> net.1: get network data
  net interface: name = lo, path = /class/net/lo
    type = 772
    carrier = 1
    hw_addr = 00:00:00:00:00:00
    GDRVINFO ethtool error: Operation not supported
    ethtool private flags: 0
  net interface: name = usb0, path = /class/net/usb0
    type = 1
    hw_addr = ca:67:c8:95:2c:28
    net device: path = /devices/platform/12480000.hsotg/gadget
    ethtool driver: g_ether
    ethtool    bus: gadget
    ethtool private flags: 0
  net interface: name = eth0, path = /class/net/eth0
    type = 1
    carrier = 1
    hw_addr = 86:5e:67:33:21:08
    net device: path = /devices/platform/12580000.ehci/usb1/1-2/1-2:1.0
    net driver: name = smsc95xx, path = /bus/usb/drivers/smsc95xx
    ethtool private flags: 0
  usb0: ethtool link state: 0
  
Next use udevadm info -a -p /class/net/eth0 to find attributes which will matching when writ udev rules. Output example:

Code: Select all

looking at device '/devices/platform/12580000.ehci/usb1/1-2/1-2:1.0/net/eth0':
    KERNEL=="eth0"
    SUBSYSTEM=="net"
    DRIVER==""
    ATTR{addr_assign_type}=="1"
    ATTR{addr_len}=="6"
    ATTR{address}=="86:5e:67:33:21:08"
    ATTR{broadcast}=="ff:ff:ff:ff:ff:ff"
    ATTR{carrier}=="1"
    ATTR{carrier_changes}=="4"
    ATTR{carrier_down_count}=="2"
    ATTR{carrier_up_count}=="2"
    ATTR{dev_id}=="0x0"
    ATTR{dev_port}=="0"
    ATTR{dormant}=="0"
    ATTR{duplex}=="full"
    ATTR{flags}=="0x1003"
    ATTR{gro_flush_timeout}=="0"
    ATTR{ifalias}==""
    ATTR{ifindex}=="3"
    ATTR{iflink}=="3"
    ATTR{link_mode}=="0"
    ATTR{mtu}=="1500"
    ATTR{netdev_group}=="0"
    ATTR{operstate}=="up"
    ATTR{proto_down}=="0"
    ATTR{speed}=="100"
    ATTR{tx_queue_len}=="1000"
    ATTR{type}=="1"
Next write dev rules, to set permanent MAC vim /etc/udev/rules.d/75-mac-spoof.rules

Code: Select all

ACTION=="add", KERNEL=="eth0", SUBSYSTEM=="net", RUN+="/sbin/ip link set dev $name address 3a:02:dd:67:b6:01"
These users thanked the author MakhmudovEvgeniy for the post:
Fips11 (Sat Jun 01, 2019 9:54 pm)
odroid micropc's it's a wonderful thing! It's a cheap and powerful tool for realize your technical ideas! Thank you, hardkernel, you change a part of my life

LiquidAcid
Posts: 1093
Joined: Fri Oct 11, 2013 11:07 pm
languages_spoken: english
ODROIDs: X2
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Ubuntu16.04 with kernel 4.16

Unread post by LiquidAcid » Tue Feb 12, 2019 3:58 am

That only works if the smsc95xx is assigned the kernel name eth0.

Steevee28
Posts: 8
Joined: Tue Jan 30, 2018 4:55 pm
languages_spoken: english, german
ODROIDs: U3
Has thanked: 1 time
Been thanked: 4 times
Contact:

Re: Ubuntu16.04 with kernel 4.16

Unread post by Steevee28 » Mon Jun 17, 2019 11:31 pm

Do you know whether accelerated GLES rendering with libMali.so is working together with that kernel ???

Some months ago, I also tried to run my device with a newer kernel (4.15 afair), but I couldn't manage to get back accelerated GLES rendering at all, so this was a no-go.
:(

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 2 guests