Ubuntu 18.04 Minimal OS image for X2 U2 U3

Post Reply
kwojtas
Posts: 5
Joined: Wed Aug 01, 2018 5:45 am
languages_spoken: english
ODROIDs: u2 x2
Has thanked: 0
Been thanked: 0
Contact:

Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by kwojtas » Wed Aug 01, 2018 1:04 pm

Hi, I prepared Ubuntu 18.04 image for x2 u2 and u3 boards :)

It contains uboot from debian repository version u-boot-exynos_2018.05+dfsg-1_armhf.deb
https://packages.debian.org/buster/armh ... s/download
It should boot from sd card. If you use emmc card and it does not boot, then maybe your bootloader on emmc card is too old? In such case you can follow this instruction to update u-boot on emmc
https://angband.pl/doc/u2.txt

Linux kernel is mainline 4.17 and is compiled by myself. Config is default with few extra flags enabled for docker, qemu and serial cp210x.

Rootfs is based on xu4. Only kernel package is replaced and libc-dev.
https://wiki.odroid.com/odroid-xu4/os_i ... 4/20180531

If you want to use this image for x2 board, then you should change device tree on boot partition firstly:

Code: Select all

$ mv exynos4412-odroidx2.dtb exynos.dtb
Enjoy :)
https://uploadfiles.io/4yq3t
Last edited by kwojtas on Wed Aug 01, 2018 2:28 pm, edited 1 time in total.

kwojtas
Posts: 5
Joined: Wed Aug 01, 2018 5:45 am
languages_spoken: english
ODROIDs: u2 x2
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by kwojtas » Wed Aug 01, 2018 1:12 pm

Checksum is

Code: Select all

$ md5sum ubuntu-18.04-4.17-minimal-odroid-x2-u2-u3-20180730.img.xz 
a213774cc8771ccbdbe7a3ffba5af1a8  ubuntu-18.04-4.17-minimal-odroid-x2-u2-u3-20180730.img.xz
I had some issues installing docker. It looks like installation process hangs. If you have some problems, then take a look at terminal session when it ends successfully
https://ufile.io/kgqcu

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

Re: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by odroid » Thu Aug 02, 2018 9:22 am

Thank you for the OS image. I made a backup in our server.
https://www.odroid.in/mirror/dn.odroid. ... 4_minimal/

moon.linux
Posts: 1163
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by moon.linux » Fri Aug 03, 2018 11:57 am

Thanks you very much.

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: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by sihorton » Sat Sep 01, 2018 2:33 am

This looks excellent - would love to get docker running with a newer kernel on my u2.

I downloaded and burned the image to sd card (I don't have emmc card), the red power light comes on but the live led does not flash even once, looking on the uart I get nothing. Have tried with 3 different sd cards and different writers so that is probably not the problem, and I burned 1604 and booted successfully using the same cards and readers.

Opening up boot.ini I see that it is checking ${board_name} and then loading files that do not exist (exynos5422-odroidxu3.dtb, but the image has exynos4412-odroidu3.dtb):

Code: Select all

if test "${board_name}" = "xu3"; then fatload mmc 0:1 0x44000000 exynos5422-odroidxu3.dtb; setenv fdtloaded "true"; fi
I changed the script to instead setenv board_name "u2" and then added

Code: Select all

if test "${board_name}" = "u2"; then fatload mmc 0:1 0x44000000 exynos4412-odroidu3.dtb; setenv fdtloaded "true"; fi
still nothing on the board, nothing on uart and the alive led does not flash. Not sure exactly what to change to get this to boot on a u2, I assume it should all be the same as u3 so if anyone has this working and maybe needed to make changes to boot.ini if you could share that with me I would be very happy!

/Simon

moon.linux
Posts: 1163
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by moon.linux » Sat Sep 01, 2018 2:53 am

boot.ini will not work with upstream kernel for odroid u2/u3 you need to build new u-boot + new boot.scr to load the image and dtb on the board.
for more details you can see below link.

Code: Select all

https://angband.pl/doc/u2.txt

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: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by sihorton » Sat Sep 01, 2018 4:48 am

ok thanks for the information, I will look into it.

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: Ubuntu 18.04 Minimal OS image for X2 U2 U3

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

Since I do not have an emmc but only an sd card I found it easier to work with the sd card image from this post: viewtopic.php?f=77&t=30654&p=232918#p232918. I was then able to do a "do-dist-upgrade" and work through various issues to get everything up and running. I now have an odroid u2 running ubuntu 18.04.1 LTS with docker 18.06.1-ce which is very encouraging!
Thanks for the inspiration!

/Simon

hometecky
Posts: 1
Joined: Sun Sep 02, 2018 6:42 am
languages_spoken: english
ODROIDs: X2
Location: Leo Indiana
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by hometecky » Sun Sep 02, 2018 6:49 am

Hi, Has anyone gotten this mage to work with the X2. I have tried it on the SC card and the emmc no luck. Any help would be great
Thanks

Patjutzu
Posts: 3
Joined: Sun Mar 24, 2013 4:47 pm
languages_spoken: German
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by Patjutzu » Mon Sep 17, 2018 1:29 pm

Good Morning

Could you please describe to me exactly how I use your .img Ubuntu 18.04 Minimal OS image for X2 U2 U3
on my odroid X2 bring about my SD Card to work.
Unfortunately I can't do anything with her statement $ mv exynos4412-odroidx2.dtb exynos.dtb or I don't know how it's meant because I am a Windows user.
I would be very grateful for an answer.

greetings
YinYang

User avatar
tobetter
Posts: 3693
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 28 times
Been thanked: 116 times
Contact:

Re: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by tobetter » Wed Sep 19, 2018 11:30 am

Patjutzu wrote: Unfortunately I can't do anything with her statement $ mv exynos4412-odroidx2.dtb exynos.dtb or I don't know how it's meant because I am a Windows user.
Are you able to access exynos4412-odroidx2.dtb in your SD card from your Windows? Then, just copy the file to exynos.dtb from Windows and deleting exynos4412-odroidx2.dtb is your option.

Patjutzu
Posts: 3
Joined: Sun Mar 24, 2013 4:47 pm
languages_spoken: German
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by Patjutzu » Wed Sep 19, 2018 10:24 pm

Sadly, it's not possible! Could not you upload the finished exynos.dtb to me somewhere so I just transfer it to my sd card?

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: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by sihorton » Sat Sep 22, 2018 5:35 pm

I have attached dts and dtb files from my compile of kernel 4.18.5,

* exynos4412-odroidu3.dtb
* exynos4412-odroidx.dtb
* exynos4412-odroidx2.dtb

/Simon
Attachments
dts-4.18.5.zip
(36.26 KiB) Downloaded 123 times

Patjutzu
Posts: 3
Joined: Sun Mar 24, 2013 4:47 pm
languages_spoken: German
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by Patjutzu » Sun Sep 23, 2018 2:55 pm

I'll try that, thank you

bluemango
Posts: 6
Joined: Sat Jul 06, 2013 1:05 am
languages_spoken: english german
ODROIDs: ODROID-X2
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by bluemango » Thu Oct 04, 2018 5:08 pm

Hi,
I've tried the image on my X2 using an SD card.
Should it be enough to replace the device tree file with the X2 one, or do I also need to do something with the bootloader (as with the u2/u3)?
Because I did so and the device did not boot up, e.g. only the red LED is on...

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: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by sihorton » Sat Oct 06, 2018 7:41 am

I was not able to get this image to boot on my u2. Rather I started from a different image: viewtopic.php?f=77&t=30654, that has a newer kernel than the stock one (4.16.0-v7), but it has 16.04 rather than 18.04 like this image. I was able to boot that image, and then I was able to do "do-release-upgrade" and get ubuntu to update to 18.04 from 16.04. There were a couple of problems, but I worked through them with help from https://www.nico-maas.de/?p=1491. That then left me with a newer kernel and the latest ubuntu. I was then able to build an even later kernel from that sd card.

My boot.ini has a line:

Code: Select all

setenv bootcmd "fatload mmc 0:1 0x40008000 zImage_4.18.5; fatload mmc 0:1 0x42000000 uInitrd-4.18.5; fatload mmc 0:1 0x44000000 exynos4412-odroidu3_4.18.5.dtb; bootz 0x40008000 0x42000000 0x44000000"
so what I am guessing is that you can swap the "exynos4412-odroidu3_4.18.5.dtb" for "exynos4412-odroidx2.dtb" from my zip and you will then get the device drivers for your board. It might be that the kernel you are booting has to be the exact same version as the .dtb, with the same kernel options, I am not certain.

There is a uart connection on my u2, hopefully on your board as well. I have a cable that connects from the board to usb using that connector, with that I am able to see the boot process even if it does not boot, it shows errors. So maybe if you try to use the uart you can see what the board is printing out. If you can see what the boot is printing out hopefully that will give a clue as to what is not working.

/Simon

clang
Posts: 21
Joined: Fri Nov 01, 2013 7:44 pm
languages_spoken: english
ODROIDs: odroid x2
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by clang » Thu Oct 18, 2018 4:00 pm

Hi everyone,
I'm having some trouble getting the ubuntu 18.04 minimal os image to work on an x2 board.

I have ubuntu mate 16.04 working on this board (which is great), so while I would like the 18.04 minimal image installed I don't won't to break my current installation and wind up with nothing working.

I flashed the image to an SD card using dd, and followed the above directions (mv exynos4412-odroidx2.dtb exynos.dtb) but I can't get the card to boot.
I tried booting just the card with no emmc card connected but that didn't work (disconnected the emmc card, changed jumper lead to sd boot).
I looked at the instructions about updating u-boot on emmc, but as those relate to Odroid-U2/U3 boards, I'm not exactly sure of what to change to follow these instructions for an x2 board.
When I try booting with the emmc connected, it starts booting and then offers option for root management with the message that firmware is not where expected (?/lib/firmware or some such).
I understand that I might have to teach myself a bit to get this working and I'm happy with that.
Any help much appreciated.

EWIuser
Posts: 19
Joined: Sat Dec 27, 2014 11:25 pm
languages_spoken: French and English
ODROIDs: U3
Location: Montreal, Quebec Canada
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by EWIuser » Mon Oct 29, 2018 4:16 am

Hi everyone, first of all I would like to thank Kwojtas for putting together this 18.04 version for the U3 and Odroid for making it easily available on-line. I've been using my U3 with Smooth Groove 14.04 for the past few years and was very happy to see the possibility to upgrade it to 18.04 so I downloaded the image and restored it to a 16GB micro SD card then inserted it in my U3. It started up and froze on an error soon after it booted up so after some time I pressed the reset button and it booted up again. This time it came up to the log in prompt so I logged in as root and immediately proceeded to apt-get update then apt-get upgrade and also apt-get tasksel to load the desired OS. In initiated tasksel and installed Ubuntu Studio desktop and the Audio recording and editing suite which all went successfully even though it took several hours. My U3 booted up and Oh joy! the Ubuntu Studio log in page appeared. I logged in and immediately checked the home directory to find that the partition had been expanded to the full 16GB which must have happened on the first install. I then tried Jack but got error messages because the snd-seq and alsa modules were not loaded in the kernel. I tried to load them with modprobe but they were not available. Am I not using modprobe correctly? If the modules are missing is there a way to add them to the existing kernel or do I have to recompile the whole thing?
Any help would be greatly appreciated.
Again thanks guys for all the great support.

tve
Posts: 47
Joined: Sun Jul 13, 2014 4:02 pm
languages_spoken: english
ODROIDs: odroid-u3, odroid-c1, odroid-c1+
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by tve » Tue Dec 18, 2018 11:56 am

I'm having two issues:
- this image does not fit onto my 8GB EMMC. It's 200MB too large. Why is this image 8GB when the data in it is only a bit over 2GB in size?
- the kernel is lacking lots of options and/or modules, I'm using my U3 as a router and lots of iptables, vlan, and other topions are missing, how do I compile a kernel that is less minimal?

EWIuser
Posts: 19
Joined: Sat Dec 27, 2014 11:25 pm
languages_spoken: French and English
ODROIDs: U3
Location: Montreal, Quebec Canada
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by EWIuser » Sat Dec 22, 2018 10:06 pm

@kwojtas I've been trying to add missing modules and recompile the kernel following wiki instructions but the original source is needed and I wasn't able to get it with the usual command using the (uname -r). It can't be found. Any way you could point us to the right source so we can add the modules we need?
@odroid, would you know where the sources would be?
Anyone?

tve
Posts: 47
Joined: Sun Jul 13, 2014 4:02 pm
languages_spoken: english
ODROIDs: odroid-u3, odroid-c1, odroid-c1+
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by tve » Sun Dec 23, 2018 2:02 am

I haven't had difficulties building a new kernel. I'm doing this on an XU4 so it's a bit faster and so I can recompile if I broke the U3 I'm using this for. This assumes that you got kwojtas' image onto an SDcard or EMMC:
  • Code: Select all

    git clone https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
    , then check out branch linux-4.17.y (that's where all the minor patch releases get accumulated)
  • copy /boot/config-4.17.0 from the U3 into .config
  • Code: Select all

    make menuconfig
    to add what you're missing, I added a kernel suffix of "-tve" so you'll see that show up in the scripts below
  • install kernel compilation pre-requisites (oops, did that long ago, find the right apt-get line by search)
  • I have the following script to do the compilation sitting one dir level up from the kernel:

    Code: Select all

    tve@core /h/s/u3-kernel> cat do-make
    #! /bin/bash -e
    cd linux-stable
    make INSTALL_MOD_PATH=/tmp -j 9 bzImage modules
    make INSTALL_MOD_PATH=/tmp modules_install
    du -hs /tmp/lib/modules/*
    This will have placed the /lib/modules tree into /tmp
  • I have the following script in the same place to copy the kernel and stuff onto the U3 over the network, alternatively you could plug the sdcard in and copy that way (gw.local is the U3):

    Code: Select all

    tve@core /h/s/u3-kernel> cat to-gw
    #! /bin/bash
    SUFF=${SUFF:-tve}
    VERS=${VERS:-4.17.19}
    GW=gw.local
    rsync linux-stable/arch/arm/boot/zImage root@$GW:/boot/vmlinuz-$VERS-$SUFF
    rsync linux-stable/arch/arm/boot/zImage root@$GW:/media/boot/zImage-$VERS-$SUFF
    rsync linux-stable/.config root@$GW:/boot/config-$VERS-$SUFF
    rsync linux-stable/System.map root@$GW:/boot/System.map-$VERS-$SUFF
    rsync -a /tmp/lib/modules/$VERS-$SUFF/ root@$GW:/lib/modules/$VERS-$SUFF
  • I modified /media/boot/boot.scr to boot my kernel, for that I created a boot.txt in /boot:

    Code: Select all

    setenv fdt_high "0xffffffff"
    
    # sd card has priority over emmc
    setenv bootcmd "fatload mmc 1:1 0x40008000 zImage-4.17.19-tve || fatload mmc 0:1 0x40008000 zImage-4.17.19-tve; fatload mmc 1:1 0x42000000 uInitrd-4.17.19-tve || fatload mmc 0:1 0x42000000 uInitrd-4.17.19-tve; fatload mmc 1:1 0x44000000 exynos.dtb || fatload mmc 0:1 0x44000000 exynos.dtb; bootz 0x40008000 0x42000000 0x44000000"
    
    setenv bootargs "console=tty1 console=ttySAC1,115200n8 root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait ro  mem=2047M"
    
    boot
  • after having copied the kernel onto the U3 I use this script (in /boot) on the U3 to prep /media/boot:

    Code: Select all

    root@gw# cat /boot/do-tve-kernel
    #! /bin/bash
    SUFF=${SUFF:-tve}
    VERS=${VERS:-4.17.19}
    update-initramfs -c -k $VERS-$SUFF
    mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd \
      -d /boot/initrd.img-$VERS-$SUFF /boot/uInitrd-$VERS-$SUFF
    cp /boot/uInitrd-$VERS-$SUFF /media/boot/
    mkimage -C none -A arm -T script -d boot.txt /media/boot/boot.scr
    sync
  • I manually made a back-up of the original boot.scr so I can restore it if needed. This is what I'm ending up in /media/boot:

    Code: Select all

    # ls /media/boot
    boot.ini*          boot.scr-orig*  exynos4412-odroidu3.dtb*  uInitrd-4.17.19-tve*
    boot.ini.default*  config*         exynos4412-odroidx2.dtb*  zImage*
    boot.scr*          exynos.dtb*     uInitrd*                  zImage-4.17.19-tve*
I'm not an expert at all this stuff, so I'm sure there are better ways to do it. But so far this has worked for me... The instructions that helped the most and that have more useful snippets if you're compiling on the U3 itself is https://angband.pl/doc/u2.txt. The worst part of all this is that the U3 doesn't reboot on its own, I have to manually power cycle it after it shuts down. Looks like this is a defect in the HW design...

I hope this helps!

EWIuser
Posts: 19
Joined: Sat Dec 27, 2014 11:25 pm
languages_spoken: French and English
ODROIDs: U3
Location: Montreal, Quebec Canada
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by EWIuser » Mon Dec 24, 2018 1:55 am

@tve, thanks for the great info. Got a few questions.
When you say "then check out branch linux-4.17.y (that's where all the minor patch releases get accumulated)" do you mean to go where the whole patch series can be found in one patch at:
> https://www.kernel.org/pub/linux/kernel ... .13-rc1.gz
> or in the git tree and branch at:
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.17.y
and apply the patch I guess?
Also can you explain why the suffix?
The make menuconfig I can handle since I've gone through it a few times already.
I'll try following the rest of the instructions and let you know how it turns out.
Sorry about my ignorance on the subject but i'm more into music than programming and unfortunately they seem to go hand in hand now.

tve
Posts: 47
Joined: Sun Jul 13, 2014 4:02 pm
languages_spoken: english
ODROIDs: odroid-u3, odroid-c1, odroid-c1+
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by tve » Mon Dec 24, 2018 2:08 am

Simply:

Code: Select all

git clone https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
cd linux-stable
git checkout linux-4.17.y
cp ..../config-4.17.0 .config
make menuconfig
linux-4.17.y is a branch, so you check that branch out. It's the branch that has all the 4.17 patches applied, currently it's at 4.17.19.

EWIuser
Posts: 19
Joined: Sat Dec 27, 2014 11:25 pm
languages_spoken: French and English
ODROIDs: U3
Location: Montreal, Quebec Canada
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by EWIuser » Tue Dec 25, 2018 6:15 am

Hi again @tve, followed the instructions with a few changes because I'm doing it on the U3 itself but it wouldn't boot.
Here's what I did:

git clone https://git.kernel.org/pub/scm/linux/ke ... stable.git
cd linux-stable
git checkout linux-4.17.y
cp ..../config-4.17.0 .config
make menuconfig
make INSTALL_MOD_PATH=/tmp -j 4 bzImage modules
make INSTALL_MOD_PATH=/tmp modules_install
du -hs /tmp/lib/modules/*
SUFF=${SUFF:-tve}
VERS=${VERS:-4.17.19}
rsync arch/arm/boot/zImage /boot/vmlinuz-$VERS-$SUFF
rsync arch/arm/boot/zImage /media/boot/zImage-$VERS-$SUFF
rsync .config /boot/config-$VERS-$SUFF
rsync System.map /boot/System.map-$VERS-$SUFF
rsync -a /tmp/lib/modules/$VERS /lib/modules/$VERS-$SUFF
# make the /boot/boot.txt file with correct version and suffix
update-initramfs -c -k $VERS-$SUFF
mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/initrd.img-$VERS-$SUFF /boot/uInitrd-$VERS-$SUFF
cp /boot/uInitrd-$VERS-$SUFF /media/boot/
mkimage -C none -A arm -T script -d boot.txt /media/boot/boot.scr
sync

Everything went through without any errors but it wouldn't boot.
Any idea what I might have done wrong?
Again thanks for the help

tve
Posts: 47
Joined: Sun Jul 13, 2014 4:02 pm
languages_spoken: english
ODROIDs: odroid-u3, odroid-c1, odroid-c1+
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by tve » Tue Dec 25, 2018 6:18 am

what did you change in the menuconfig?
what did the du print?
what did you see on the serial console when it tried to boot?

EWIuser
Posts: 19
Joined: Sat Dec 27, 2014 11:25 pm
languages_spoken: French and English
ODROIDs: U3
Location: Montreal, Quebec Canada
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by EWIuser » Tue Dec 25, 2018 6:56 am

I added the alsa and sequencer support
The du printed all the same as what you listed minus the asterix at the end of the names
No serial console to monitor.
I also changed the -j 9 compiling option to -j 4 for the U3 quad core

tve
Posts: 47
Joined: Sun Jul 13, 2014 4:02 pm
languages_spoken: english
ODROIDs: odroid-u3, odroid-c1, odroid-c1+
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by tve » Tue Dec 25, 2018 11:56 am

Without serial console it's kind'a hard to tell what is happening... Does the blue LED come on at all? Are you booting from sdcard or emmc, and if the latter, do you have a recent bootloader?

EWIuser
Posts: 19
Joined: Sat Dec 27, 2014 11:25 pm
languages_spoken: French and English
ODROIDs: U3
Location: Montreal, Quebec Canada
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by EWIuser » Tue Dec 25, 2018 9:57 pm

No the blue led doesn't come on. Only the red light is on solid. I'm booting from the sdcard. I figured I should get it going first and then work on getting it on the emmc. I also realized I gave you the wrong info concerning the du printout, I was referring to what I had in /media/boot having the same files but without the asterix at the end like yours did. I'll star over again and take note of it. I'll see if I can provide myself with a serial console to do this right. Very kind of you to to help me out like this.

tve
Posts: 47
Joined: Sun Jul 13, 2014 4:02 pm
languages_spoken: english
ODROIDs: odroid-u3, odroid-c1, odroid-c1+
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by tve » Wed Dec 26, 2018 2:46 am

Do I assume correctly that you start by putting kwojtas' image onto the sdcard and then test-boot to make sure it works?
Something I should have told you is to make a backup copy of boot.scr because then if the new kernel doesn't boot you can restore boot.scr by plugging the sdcard into a laptop, that should bring you back so you can try again.

I believe the blue LED comes on pretty early in the boot process, but without serial adapter it's really a shot in the dark. Having one is kind'a minimal requirement for all this. I forget whether you need a 1.8V one (which is harder to find) or whether a more std 3.3V works, you need to look that up.

Why don't you post:

Code: Select all

ls -ls /boot /media/boot
du -s /lib/modules/$VERS-$SUFF
cat /boot/boot.txt

EWIuser
Posts: 19
Joined: Sat Dec 27, 2014 11:25 pm
languages_spoken: French and English
ODROIDs: U3
Location: Montreal, Quebec Canada
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by EWIuser » Wed Dec 26, 2018 3:42 am

I started over again but got stuck at
root@odroid:/boot# update-initramfs -c -k $VERS-$SUFF
update-initramfs: Generating /boot/initrd.img-4.17.19-tve
depmod: WARNING: could not open /var/tmp/mkinitramfs_o1cB9u/lib/modules/4.17.19-tve/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_o1cB9u/lib/modules/4.17.19-tve/modules.builtin: No such file or directory


Here is what I have now

root@odroid:~/linux-stable# ls -ls /boot /media/boot
/boot:
total 84672
3004 -rw-r--r-- 1 root root 3074838 Jul 30 19:06 System.map-4.17.0
3024 -rw-r--r-- 1 root root 3093699 Dec 25 18:09 System.map-4.17.19-tve
4 -rw-r--r-- 1 root root 526 Dec 25 17:45 boot.txt
128 -rw-r--r-- 1 root root 128229 Jul 30 19:06 config-4.17.0
128 -rw-r--r-- 1 root root 128377 Dec 25 18:09 config-4.17.19-tve
3420 -rw-r--r-- 1 root root 3500118 May 16 2017 initrd.img-3.10.96+
7996 -rw-r--r-- 1 root root 8187777 May 29 2018 initrd.img-4.14.43-138
5048 -rw-r--r-- 1 root root 5167858 Jul 30 20:07 initrd.img-4.17.0
5104 -rw-r--r-- 1 root root 5224390 Dec 25 18:14 initrd.img-4.17.19-tve
4028 -rw-r--r-- 1 root root 4124409 Jul 3 2016 uInitrd-3.10.96-101
4036 -rw-r--r-- 1 root root 4128799 Jul 7 2016 uInitrd-3.10.96-113
7996 -rw-r--r-- 1 root root 8187841 May 29 2018 uInitrd-4.14.43-138
5948 -rw-r--r-- 1 root root 6083682 Dec 13 2017 uInitrd-4.14.5-92
5188 -rw-r--r-- 1 root root 5306244 May 11 2017 uInitrd-4.9.27-35
5188 -rw-r--r-- 1 root root 5309215 May 15 2017 uInitrd-4.9.28-38
5404 -rw-r--r-- 1 root root 5530194 Aug 20 2017 uInitrd-4.9.44-54
5448 -rw-r--r-- 1 root root 5577959 Aug 24 2017 uInitrd-4.9.44-56
6708 -rwxr-xr-x 1 root root 6868368 Jul 30 19:06 vmlinuz-4.17.0
6872 -rwxr-xr-x 1 root root 7034592 Dec 25 18:08 vmlinuz-4.17.19-tve

/media/boot:
total 21874
10 -rwxr-xr-x 1 root root 9650 May 29 2018 boot.ini
2 -rwxr-xr-x 1 root root 753 Aug 20 2017 boot.ini.default
2 -rwxr-xr-x 1 root root 550 Jul 30 15:16 boot.scr
124 -rwxr-xr-x 1 root root 126236 Jul 30 15:17 config
54 -rwxr-xr-x 1 root root 53441 Jul 30 15:17 exynos.dtb
54 -rwxr-xr-x 1 root root 53441 Jul 30 15:16 exynos4412-odroidu3.dtb
54 -rwxr-xr-x 1 root root 53253 Jul 30 15:17 exynos4412-odroidx2.dtb
7996 -rwxr-xr-x 1 root root 8187841 May 29 2018 uInitrd
6708 -rwxr-xr-x 1 root root 6868360 Jul 30 15:17 zImage
6870 -rwxr-xr-x 1 root root 7034592 Dec 25 18:09 zImage-4.17.19-tve
root@odroid:~/linux-stable#

root@odroid:~/linux-stable# du -s /lib/modules/$VERS-$SUFF
66492 /lib/modules/4.17.19-tve
root@odroid:~/linux-stable#

root@odroid:~/linux-stable# cat /boot/boot.txt
setenv fdt_high "0xffffffff"

# sd card has priority over emmc
setenv bootcmd "fatload mmc 1:1 0x40008000 zImage-4.17.19-tve || fatload mmc 0:1 0x40008000 zImage-4.17.19-tve; fatload mmc 1:1 0x42000000 uInitrd-4.17.19-tve || fatload mmc 0:1 0x42000000 uInitrd-4.17.19-tve; fatload mmc 1:1 0x44000000 exynos.dtb || fatload mmc 0:1 0x44000000 exynos.dtb; bootz 0x40008000 0x42000000 0x44000000"

setenv bootargs "console=tty1 console=ttySAC1,115200n8 root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait ro mem=2047M"

boot
root@odroid:~/linux-stable#

I feel there is confusion about .config or config in the steps you described which might be my issue of not understanding clearly.
Here are all the steps I took:
git clone https://git.kernel.org/pub/scm/linux/ke ... stable.git
cd linux-stable
git checkout linux-4.17.y
cp /boot/config-4.17.0 .config
make menuconfig

make INSTALL_MOD_PATH=/tmp -j 4 bzImage modules
make INSTALL_MOD_PATH=/tmp modules_install
du -hs /tmp/lib/modules/*

(results of du = 65M /tmp/lib/modules/4.17.19 )

SUFF=${SUFF:-tve}
VERS=${VERS:-4.17.19}
rsync arch/arm/boot/zImage /boot/vmlinuz-$VERS-$SUFF
rsync arch/arm/boot/zImage /media/boot/zImage-$VERS-$SUFF
rsync .config /boot/config-$VERS-$SUFF
rsync System.map /boot/System.map-$VERS-$SUFF
rsync -a /tmp/lib/modules/$VERS /lib/modules/$VERS-$SUFF
# make the /boot/boot.txt file with correct version and suffix
#
setenv fdt_high "0xffffffff"

# sd card has priority over emmc
setenv bootcmd "fatload mmc 1:1 0x40008000 zImage-4.17.19-tve || fatload mmc 0:1 0x40008000 zImage-4.17.19-tve; fatload mmc 1:1 0x42000000 uInitrd-4.17.19-tve || fatload mmc 0:1 0x42000000 uInitrd-4.17.19-tve; fatload mmc 1:1 0x44000000 exynos.dtb || fatload mmc 0:1 0x44000000 exynos.dtb; bootz 0x40008000 0x42000000 0x44000000"

setenv bootargs "console=tty1 console=ttySAC1,115200n8 root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait ro mem=2047M"

boot
#

update-initramfs -c -k $VERS-$SUFF
mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n uInitrd -d /boot/initrd.img-$VERS-$SUFF /boot/uInitrd-$VERS-$SUFF
cp /boot/uInitrd-$VERS-$SUFF /media/boot/
mkimage -C none -A arm -T script -d boot.txt /media/boot/boot.scr
sync


You don't know how much I appreciate your guidance here but nonetheless I do need to prepare for the Christmas supper so I wish you a merry Christmas and hope we'll be able to continue this tomorrow if possible.

EWIuser
Posts: 19
Joined: Sat Dec 27, 2014 11:25 pm
languages_spoken: French and English
ODROIDs: U3
Location: Montreal, Quebec Canada
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by EWIuser » Wed Dec 26, 2018 11:19 pm

Hi again @tve, Ok I'm back with some questions.
1- Just before the make menuconfig command you wrote to "cp /boot/config-4.17.0 .config", is there a period before config?

2- In the line "make INSTALL_MOD_PATH=/tmp -j 9 bzImage modules" was I right when I replaced -j 9 by -j 4 ?

3- When you wrote "This will have placed the /lib/modules tree into /tmp" I learned that every time the odroid reboots the /tmp file gets rewritten over so when I interrupted the procedures to make an image it mightv'e screwed things up.

I'm ready to go at it again but wanted to check these things out with you before I went any further.

tve
Posts: 47
Joined: Sun Jul 13, 2014 4:02 pm
languages_spoken: english
ODROIDs: odroid-u3, odroid-c1, odroid-c1+
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by tve » Thu Dec 27, 2018 1:24 am

1. yes, the menuconfig uses/updates the .config file, so you init it with the one from kwojtas

2. "-j 4" works fine, it just changes the concurrency

3. you're right, you can use a different persistent dir, unlikely to make a huge difference, though

tve
Posts: 47
Joined: Sun Jul 13, 2014 4:02 pm
languages_spoken: english
ODROIDs: odroid-u3, odroid-c1, odroid-c1+
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by tve » Thu Dec 27, 2018 1:34 am

Try running make exynos_defconfig once before the menuconfig, I do not believe it changes anything, but shouldn't hurt either.

It looks like your /media/boot is missing uInitrd-4.17.19-tve, you must have skipped the cp command?

BTW, I would have expected you to use a -ewi or so suffix for your kernel ;-)

EWIuser
Posts: 19
Joined: Sat Dec 27, 2014 11:25 pm
languages_spoken: French and English
ODROIDs: U3
Location: Montreal, Quebec Canada
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by EWIuser » Thu Dec 27, 2018 4:11 am

Everything was going Ok until I got to

root@odroid:/boot# update-initramfs -c -k $VERS-$SUFF
update-initramfs: Generating /boot/initrd.img-4.17.19-tve
depmod: WARNING: could not open /lib/modules/4.17.19-tve/modules.order: No such file or directory
depmod: WARNING: could not open /lib/modules/4.17.19-tve/modules.builtin: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_FQ67MK/lib/modules/4.17.19-tve/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_FQ67MK/lib/modules/4.17.19-tve/modules.builtin: No such file or directory
root@odroid:/boot# ls /lib/modules/4.17.19
ls: cannot access '/lib/modules/4.17.19': No such file or directory
root@odroid:/boot# ls /lib/modules/
4.17.0 4.17.19-tve
root@odroid:/boot# ls /lib/modules/4.17.19-tve/
4.17.19 modules.alias.bin modules.dep modules.devname modules.symbols
modules.alias modules.builtin.bin modules.dep.bin modules.softdep modules.symbols.bin
root@odroid:/boot# ls /lib/modules/4.17.19-tve/4.17.19/
build modules.alias.bin modules.dep modules.order modules.symbols.bin
kernel modules.builtin modules.dep.bin modules.softdep source
modules.alias modules.builtin.bin modules.devname modules.symbols

I posted directory listings so you could see where files ended up. I think the uInitrd-4.17.19-tve gets copied over later in the process so that's why it doesn't show up.

EWIuser
Posts: 19
Joined: Sat Dec 27, 2014 11:25 pm
languages_spoken: French and English
ODROIDs: U3
Location: Montreal, Quebec Canada
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by EWIuser » Thu Dec 27, 2018 4:40 am

Also can I try running make exynos_defconfig and menuconfig now at the stage I'm at or should I start from scratch again?
P.S. Suffix or no suffix doesn't really matter to me as long as I can get the thing to work with MIDI.

EWIuser
Posts: 19
Joined: Sat Dec 27, 2014 11:25 pm
languages_spoken: French and English
ODROIDs: U3
Location: Montreal, Quebec Canada
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by EWIuser » Thu Dec 27, 2018 5:40 am

One more thing, now I'm starting to sound like detective Columbo, when you wrote "after having copied the kernel onto the U3 I use this script (in /boot) on the U3 to prep /media/boot: " did you do something specific not written in the instructions or was it done with the rsync command lines?

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: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by LiquidAcid » Thu Jan 03, 2019 2:27 am

In case someone cares, odroid-4.20.y is available now.

tve
Posts: 47
Joined: Sun Jul 13, 2014 4:02 pm
languages_spoken: english
ODROIDs: odroid-u3, odroid-c1, odroid-c1+
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by tve » Thu Jan 03, 2019 3:20 am

LiquidAcid wrote:
Thu Jan 03, 2019 2:27 am
In case someone cares, odroid-4.20.y is available now.
Nice!

IOOI
Posts: 7
Joined: Mon Mar 04, 2019 11:26 am
languages_spoken: english
ODROIDs: U2
Has thanked: 0
Been thanked: 0
Contact:

Re: Ubuntu 18.04 Minimal OS image for X2 U2 U3

Unread post by IOOI » Sun Mar 10, 2019 9:17 am

sihorton wrote:
Sat Sep 01, 2018 8:34 am
Since I do not have an emmc but only an sd card I found it easier to work with the sd card image from this post: viewtopic.php?f=77&t=30654&p=232918#p232918. I was then able to do a "do-dist-upgrade" and work through various issues to get everything up and running. I now have an odroid u2 running ubuntu 18.04.1 LTS with docker 18.06.1-ce which is very encouraging!
Thanks for the inspiration!

/Simon
Thank you for your inspiration!

I created an image containing Ubuntu 18.04 Desktop available here: https://github.com/IOOI-SqAR/odroid/rel ... 308.img.xz md5sum: https://raw.githubusercontent.com/IOOI- ... .xz.md5sum

The image is suitable for 128GB microSDXC-cards (119 GiBiByte or exacly 127865454592 Bytes), I used a SanDisk Ultra R100 microSDXC 128GB Kit, UHS-I U1, A1, Class 10 (SDSQUAR-128G-GN6MA), which has exactly this size — hence the size of the .img.

If you don't have an microSDXC card of this size (it costs just 23 Euros here, so come on!) or you just don't trust me, the instruction are here:
https://github.com/IOOI-SqAR/odroid.

Have fun and please report back if the image works on the U3 or the X2.

regards,

IOOI

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 2 guests