Ubuntu 20.04 on Cloudshell 2 - Overlay?

Post Reply
cameronbunce
Posts: 5
Joined: Wed Nov 18, 2020 12:17 pm
languages_spoken: english
ODROIDs: XU4 CS2 - Docker NAS | HC1 - camera server
Has thanked: 3 times
Been thanked: 0
Contact:

Ubuntu 20.04 on Cloudshell 2 - Overlay?

Post by cameronbunce »

I'm having trouble with my Cloudshell after updating to Ubuntu 20.04 and I did read this from the Wiki

In Ubuntu 20.04 with kernel 5.4, you have to modify the DTBO settings like this.

Code: Select all

; Device Tree Overlay
overlay_resize=16384
overlay_profile=hktft_cs_ogst
overlays="spi0 i2c0 i2c1 uart0"
 
[overlay_hktft_cs_ogst]
overlays="hktft-cs-ogst i2c0"
After poking around I can use fdtdump ( I picked that up from https://www.raspberrypi.org/documentati ... ce-tree.md) and I'm looking at the contents of /media/boot/overlays but I can't figure out which file (files?) to edit or how.

Code: Select all

/media/boot/overlays$ ls
ads7846.dtbo        hktft32.dtbo  i2c0.dtbo  spi0.dtbo         uart0.dtbo
hktft-cs-ogst.dtbo  hktft35.dtbo  i2c1.dtbo  sx865x-i2c1.dtbo
Could someone please point me in the right direction?

User avatar
tobetter
Posts: 6635
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 330 times
Been thanked: 924 times
Contact:

Re: Ubuntu 20.04 on Cloudshell 2 - Overlay?

Post by tobetter »

Can you share what are you going to do with the device tree overlay or fdtdump?

User avatar
odroid
Site Admin
Posts: 35909
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1320 times
Been thanked: 913 times
Contact:

Re: Ubuntu 20.04 on Cloudshell 2 - Overlay?

Post by odroid »

You might need to edit config.ini file.
These users thanked the author odroid for the post:
cameronbunce (Thu Nov 19, 2020 6:04 am)

cameronbunce
Posts: 5
Joined: Wed Nov 18, 2020 12:17 pm
languages_spoken: english
ODROIDs: XU4 CS2 - Docker NAS | HC1 - camera server
Has thanked: 3 times
Been thanked: 0
Contact:

Re: Ubuntu 20.04 on Cloudshell 2 - Overlay?

Post by cameronbunce »

Thanks for your responses,
odroid wrote:
Wed Nov 18, 2020 1:00 pm
You might need to edit config.ini file.
This has been helpful, I think I'm at least able to see where the modifications go.
tobetter wrote:
Wed Nov 18, 2020 12:55 pm
Can you share what are you going to do with the device tree overlay or fdtdump?
I was fumbling in the dark with google and a Wiki.

my /media/boot/config.ini now looks ( in part ) like this:

Code: Select all

; Device Tree Overlay
overlay_resize=16384
overlay_profile=hktft_cs_ogst
overlays="spi0 i2c0 i2c1 uart0"

[overlay_custom]
overlays="i2c0 i2c1"

[overlay_hktft32]
overlays="hktft32 ads7846"

[overlay_hktft35]
overlays="hktft35 sx865x-i2c1"

[overlay_hktft_cs_ogst]
overlays="hktft-cs-ogst i2c0"
and I have rebooted but the fan does not turn on either automatically ( I have installed cloudshell2-fan from the hardkernel ppa ) or manually,
I get this when trying manually:

Code: Select all

cameron@odroid:~$ sudo i2cset -y 1 0x60 0x05 0xf0
Error: Could not open file `/dev/i2c-1' or `/dev/i2c/1': No such file or directory

AreaScout
Posts: 1531
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: german, english
ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell, Go2, C4
Has thanked: 82 times
Been thanked: 251 times
Contact:

Re: Ubuntu 20.04 on Cloudshell 2 - Overlay?

Post by AreaScout »

    Hello

    Just add this section so it look like this:

    Code: Select all

    [overlay_hktft_cs_ogst]
    overlays="hktft-cs-ogst i2c0 i2c1"
    
    On kernel 5.4 chip address has changed to 0 so the command has to be changed to i2cset -y 0 0x60 0x05 0xf0

    RG
    These users thanked the author AreaScout for the post:
    cameronbunce (Thu Nov 19, 2020 6:05 am)

    cameronbunce
    Posts: 5
    Joined: Wed Nov 18, 2020 12:17 pm
    languages_spoken: english
    ODROIDs: XU4 CS2 - Docker NAS | HC1 - camera server
    Has thanked: 3 times
    Been thanked: 0
    Contact:

    Re: Ubuntu 20.04 on Cloudshell 2 - Overlay?

    Post by cameronbunce »

    Thank you I did miss that part,
    Now I've got config.ini looking like:

    Code: Select all

    ; Device Tree Overlay
    overlay_resize=16384
    overlay_profile=hktft_cs_ogst
    overlays="spi0 i2c0 i2c1 uart0"
    
    [overlay_custom]
    overlays="i2c0 i2c1"
    
    ...
    
    [overlay_hktft_cs_ogst]
    overlays="hktft-cs-ogst i2c0 i2c1"
    
    but I'm still getting -

    Code: Select all

    cameron@odroid:~$ sudo i2cset -y 0 0x60 0x50 0xf0
    Error: Could not open file `/dev/i2c-0' or `/dev/i2c/0': No such file or directory
    

    AreaScout
    Posts: 1531
    Joined: Sun Jul 07, 2013 3:05 am
    languages_spoken: german, english
    ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
    N1, Go, VU5A, Show2, CloudShell2,
    H2, N2, VU7A, VuShell, Go2, C4
    Has thanked: 82 times
    Been thanked: 251 times
    Contact:

    Re: Ubuntu 20.04 on Cloudshell 2 - Overlay?

    Post by AreaScout »

      @cameronbunce

      Are you booting from eMMC ? If yes it could be that you have a old u-boot on it, to update you can flash my image from here viewtopic.php?p=296942#p296942 after that, logon via ssh and execute armbian-config from there you can update u-boot, after that procedure it should work

      edit: The info above seems to not fit for Ubuntu, an apt install u-boot --reinstall should update u-boot on Ubuntu

      RG

      cameronbunce
      Posts: 5
      Joined: Wed Nov 18, 2020 12:17 pm
      languages_spoken: english
      ODROIDs: XU4 CS2 - Docker NAS | HC1 - camera server
      Has thanked: 3 times
      Been thanked: 0
      Contact:

      Re: Ubuntu 20.04 on Cloudshell 2 - Overlay?

      Post by cameronbunce »

      Thanks for the reply AreaScout,

      I'm using the Ubuntu 20.04 / 5.4 Kernel image from https://wiki.odroid.com/odroid-xu4/os_i ... ubuntu_5.4

      Code: Select all

      Linux version 5.4.77-217 (root@1604_builder_armhf) (gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2))
      After udating uboot from apt and rebooting I still see the same response when trying to write to either i2c address

      I checked /dev and I only see two addresses 2 and 4

      Code: Select all

      cameron@odroid:/dev$ ls | grep i2c
      i2c-2
      i2c-4
      
      neither of which succeed with that write command

      I'm going to check my physical connections

      AreaScout
      Posts: 1531
      Joined: Sun Jul 07, 2013 3:05 am
      languages_spoken: german, english
      ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
      N1, Go, VU5A, Show2, CloudShell2,
      H2, N2, VU7A, VuShell, Go2, C4
      Has thanked: 82 times
      Been thanked: 251 times
      Contact:

      Re: Ubuntu 20.04 on Cloudshell 2 - Overlay?

      Post by AreaScout »

        @cameronbunce

        That's not good, try this command and reboot, it will apply the corresponding overlay files to the *.dtb file, so it doesn't has to be loaded on boot time

        fdtoverlay -v -i /media/boot/exynos5422-odroidxu4.dtb -o /media/boot/exynos5422-odroidxu4.dtb /media/boot/overlays/hktft-cs-ogst.dtbo /media/boot/overlays/i2c0.dtbo /media/boot/overlays/i2c1.dtbo

        or

        Download my NAS image with OpenMediaVault 5 (webUI) and Media Center capabilities if you connect it to a TV (stream Netflix, Disney+ or Amazon or just watch movies from HDD) and see if the fan is running by either run i2cset or wait until the board reaches a temperature of >60°C CPU or 50°C HDD (configurable inside /etc/cloudshell2-monitoring/cloudshell2-monitoring.conf)

        viewtopic.php?p=296942#p296942

        RG

        cameronbunce
        Posts: 5
        Joined: Wed Nov 18, 2020 12:17 pm
        languages_spoken: english
        ODROIDs: XU4 CS2 - Docker NAS | HC1 - camera server
        Has thanked: 3 times
        Been thanked: 0
        Contact:

        Re: Ubuntu 20.04 on Cloudshell 2 - Overlay?

        Post by cameronbunce »

        @AreaScout, Thanks for your help on this one, Danke Schoen

        I ran the command you mentioned, grepped for the i2c devices and finding no new devices, I shut it down. This morning I checked the cabling - took it all apart and put it all back together.

        Between having a good cold rest and the fdtoverlay command, we're back in action this morning.

        Theres a small part of me that wants to start from scratch with a fresh 20.04 image and see if I can reproduce the problem and fix it in isolation, but I don't know have a spare cloudshell and this one run the family photo NextCloud instance. If anyone else experiences it I'll for sure run through it.

        AreaScout
        Posts: 1531
        Joined: Sun Jul 07, 2013 3:05 am
        languages_spoken: german, english
        ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
        N1, Go, VU5A, Show2, CloudShell2,
        H2, N2, VU7A, VuShell, Go2, C4
        Has thanked: 82 times
        Been thanked: 251 times
        Contact:

        Re: Ubuntu 20.04 on Cloudshell 2 - Overlay?

        Post by AreaScout »

        cameronbunce wrote:
        Fri Nov 20, 2020 10:41 pm
        Theres a small part of me that wants to start from scratch with a fresh 20.04 image and see if I can reproduce the problem and fix it in isolation, but I don't know have a spare cloudshell and this one run the family photo NextCloud instance. If anyone else experiences it I'll for sure run through it.
        Nothing holding you back from again install 20.04 image on i.e another SD card, it will not harm the contains of the hard disk, if your main install is on a eMMC I of course would try a SD card to isolate a possible eMMC fault/incompatibility

        RG

        joshua.yang
        Posts: 465
        Joined: Fri Sep 22, 2017 5:54 pm
        languages_spoken: Korean, English
        ODROIDs: XU4, XU4Q + Cloudshell2, H2, N2
        Has thanked: 32 times
        Been thanked: 127 times
        Contact:

        Re: Ubuntu 20.04 on Cloudshell 2 - Overlay?

        Post by joshua.yang »

        Hi.

        By default, /dev/i2c-0 and i2c-1 should be shown without any editing.

        In the short test on my side, I could see those two I2C files just right after freshly installing the ubuntu-20.04.1-5.4-minimal-odroid-xu4-20200812.img.xz.
        It keeps being after updating the kernel.

        As like @AreaScout said, changing the OS image will not harm your hard disk. To prevent the accident clearly, you can disconnect the hard drive from your XU4 before starting the test.
        In that case, as you know, you have to use a different SD card. Do not erase your currently inserted card.

        And, I suggest you re-install the bootini package by using sudo apt update && sudo apt install --reinstall uboot bootini linux-odroid-5422. I think those will correct the boot partition structure, where is located in /media/boot.
        These users thanked the author joshua.yang for the post (total 3):
        odroid (Mon Nov 23, 2020 3:24 pm) • AreaScout (Mon Nov 23, 2020 8:28 pm) • cameronbunce (Tue Nov 24, 2020 10:42 pm)

        Post Reply

        Return to “CloudShell”

        Who is online

        Users browsing this forum: No registered users and 1 guest