Odroid C1+ and Kernel 4.x

Moderators: mdrjr, odroid

Odroid C1+ and Kernel 4.x

Unread postby mad_ady » Mon Mar 07, 2016 5:01 pm

Hello everyone,

I'm trying to boot kernel 4.4-rc2 on Odroid C1+. I followed the guide here: https://github.com/umiddelb/armhf/wiki/ ... ARM-device to compile the kernel.

I modified boot.ini and changed the console parameter to this: "console=ttyAML0,115200n8" in order to get serial console working.

When I try to boot the kernel (from emmc), it boots, loads initramfs but fails to load the root filesystem (ALERT! /dev/disk/by-uuid/e139ce78-9841-40fe-8823-96a304a09859 does not exist. Dropping to a shell!). Also it sees only one CPU.

I've tried with both uInitrd from the default 3.10 kernel and with the one generated from the 4.4 kernel tree.

Complete bootlog and a few ls'es are here: http://pastebin.com/gvVx369G

I'd like to ask if emmc is supported in 4.4 for C1, or if I should try with an SD card instead.
User avatar
mad_ady
 
Posts: 4427
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: Odroid C1+ and Kernel 4.x

Unread postby memeka » Mon Mar 07, 2016 8:39 pm

change in boot.init rootfs=UUIDe139ce78... to rootfs=/dev/mmcblk0p2
User avatar
memeka
 
Posts: 4024
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Odroid C1+ and Kernel 4.x

Unread postby mad_ady » Wed Mar 09, 2016 3:59 am

I have tried this. Still doesn't fully boot but I seem to have broken my cheap usb-to-ttl adapter and can't get the exact output at the moment. Will update as soon as possible.
User avatar
mad_ady
 
Posts: 4427
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: Odroid C1+ and Kernel 4.x

Unread postby hhh1 » Wed Jun 15, 2016 3:46 am

mad_ady wrote:I have tried this. Still doesn't fully boot but I seem to have broken my cheap usb-to-ttl adapter and can't get the exact output at the moment. Will update as soon as possible.


Can you please be so kind and tell me how did you manage to run 4.x kernel on C1 at all?

I spent 2 days of my life trying to run it with kernel.org kernel 4.6 and 4.7 and linaro kernel 4.6.
But all I got on linaro kernel was a freeze on "Uncompressing Linux... done, booting the kernel."
And on kernel.org:
[ 0.770483] VFS: Cannot open root device "mmcblk0p1" or unknown-block(0,0): error -6
[ 0.778237] Please append a correct "root=" boot option; here are the available partitions:
[ 0.786615] 0100 65536 ram0 (driver?)
...
[ 0.857191] 010f 65536 ram15 (driver?)
[ 0.861945] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

Looks like it doesn't see eMMC/SD card at all.
I feel myself trapped. :cry:
Please tell me what config did you use? multi_v7_defconfig?
Any additional options?
And dtb was meson8b-odroidc1.dtb, right?
hhh1
 
Posts: 46
Joined: Wed Jun 15, 2016 3:35 am
languages_spoken: english
ODROIDs: c1 c1+ c2

Re: Odroid C1+ and Kernel 4.x

Unread postby daemon32 » Thu Jul 07, 2016 7:44 am

Hi, I've been following the efforts to mainline support for the AMlogic SOCs that are used in the odroid-c1 and I've found these resources very useful:

The linux-meson project (the mainlining effort):
http://linux-meson.com/doku.php

The linux-meson mailing list:
http://lists.infradead.org/mailman/listinfo/linux-amlogic

A website that displays build information about various kernels on various boards, including mainline C1 support:
https://kernelci.org/boot/meson8b-odroidc1/

Where the linux-meson patches usually come from/end up:
https://github.com/carlocaione/linux-meson

Some attempt at porting the odroid-c1 to upstream u-boot:
https://github.com/carlocaione/u-boot

There's no display/audio (hdmitx) or GPU support yet, but nearly everything else is there from what I can tell.
daemon32
 
Posts: 23
Joined: Sun Jul 19, 2015 2:45 am
languages_spoken: english
ODROIDs: ODROID-C1

Re: Odroid C1+ and Kernel 4.x

Unread postby lavorrick » Tue Jul 12, 2016 5:27 pm

@mad_ady my experience is almost identical to yours, except I compiled a 4.7-rc7 kernel, and my C1+ has an SD card in it, rather than an eMMC. I used multi_v7_defconfig without any other options for the build. The kernel starts up fine, but cannot see any trace of the SD card and so is unable to mount root partition, just like you.

What I have noticed is that the meson8b-odroidc1.dtb that came out of my kernel build is very small (3,283 bytes) vs the one that is supplied with hardkernel's Ubuntu 14.04 image (meson8b_odroidc.dtb - 19.257 bytes)

The links supplied by @daemon32 are very interesting, particularly the one with the boot status of various boards, where 4.7-rc7 (amongst other versions) is show to be "successful" on the C1, though when you read through the actual boot log, it doesn't look like they even attempt to load a root filesystem, if I'm interpreting it correctly. I guess "success" is defined as the kernel being able to start and run, regardless of whether or not any of the hardware peripherals can be accessed.

My current goal is to get a headless Ubuntu distribution on my board, I don't care about the GPU/HDMI support. I only need USB, GPIO, Ethernet and obviously SD/eMMC support right now. Has anybody achieved this?
lavorrick
 
Posts: 16
Joined: Tue Feb 10, 2015 7:04 pm
languages_spoken: english
ODROIDs: C1, C1+, XU4

Re: Odroid C1+ and Kernel 4.x

Unread postby mad_ady » Tue Jul 12, 2016 5:43 pm

I'm sorry guys, I have completely missed this thread and your replies. I haven't tried booting 4.x in a while, but I might try again either with NFS rootfs or with usb rootfs. It might be interesting to look into the efforts to boot 4.x on the C2 - those also required extensive uboot updates.
User avatar
mad_ady
 
Posts: 4427
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: Odroid C1+ and Kernel 4.x

Unread postby gügü » Thu Jun 29, 2017 8:18 pm

Can we revive this thread and the effort all together champions?
gügü
 
Posts: 68
Joined: Sun Dec 20, 2015 6:35 am
languages_spoken: english
ODROIDs: C1 - C2

Re: Odroid C1+ and Kernel 4.x

Unread postby mad_ady » Thu Jun 29, 2017 9:21 pm

Wow, I don't even remember creating this thread. I wonder why I was experimenting with kernel 4.x on the C1? Oh, well.

I think I remember reading around the forum that amlogic has released/was releasing a 4.x (4.8 maybe?) for the S805. But I haven't experimented with it.
User avatar
mad_ady
 
Posts: 4427
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: Odroid C1+ and Kernel 4.x

Unread postby gügü » Thu Jun 29, 2017 10:45 pm

I'm fiddling around running the latest mainline kernel 4.12-rc7 with Odroid C2.
I wanted to run some docker swarm features on the Odroid C1 which requires higher than 3.18 as kernel configs.
gügü
 
Posts: 68
Joined: Sun Dec 20, 2015 6:35 am
languages_spoken: english
ODROIDs: C1 - C2

Re: Odroid C1+ and Kernel 4.x

Unread postby gügü » Fri Jun 30, 2017 10:13 pm

Did someone managed to run a headless server with basic I/O, ethernet, External USB HD ? I also don't care about Video GPU and Desktop stuff I just need to have the required Docker settings in the kernel to run Swarm.
gügü
 
Posts: 68
Joined: Sun Dec 20, 2015 6:35 am
languages_spoken: english
ODROIDs: C1 - C2

Re: Odroid C1+ and Kernel 4.x

Unread postby lavorrick » Fri Jun 30, 2017 10:29 pm

I did get a kernel to boot up on mine, last year sometime I think, maybe version 4.8 or so. But hardly any of the peripherals were working I don't think, including the MMC slot. Hardkernel themselves don't seem to be interested in anything unless graphics support is there, which I think is a mistake - I'm sure there's huge numbers of use cases out there for these boards which don't involve using any graphical output.

I keep a close eye on these guys at http://linux-meson.com/doku.php who seem to be making headway on it, gradually.
lavorrick
 
Posts: 16
Joined: Tue Feb 10, 2015 7:04 pm
languages_spoken: english
ODROIDs: C1, C1+, XU4

Re: Odroid C1+ and Kernel 4.x

Unread postby olace » Wed Jul 26, 2017 11:09 am

Anyone knows if HDMI will be supported on newer versions?
Because in http://linux-meson.com/doku.php have only 'no' in cell for HDMI.
olace
 
Posts: 4
Joined: Sun Sep 27, 2015 3:40 am
languages_spoken: english
ODROIDs: C1

Re: Odroid C1+ and Kernel 4.x

Unread postby lavorrick » Fri Aug 11, 2017 3:34 pm

olace wrote:Anyone knows if HDMI will be supported on newer versions?
Because in http://linux-meson.com/doku.php have only 'no' in cell for HDMI.


They have a couple of references to the display in the TODO section of that page:

"Add Display support for pre-GX SoCs
Add HDMI support for pre-GX SoCs, Unknown HDMI Controller IP"

pre-GX refers to the meson8 and meson8b etc. as I understand it.

I expect it'll be a long time before they get to this though.
lavorrick
 
Posts: 16
Joined: Tue Feb 10, 2015 7:04 pm
languages_spoken: english
ODROIDs: C1, C1+, XU4

Re: Odroid C1+ and Kernel 4.x

Unread postby itsmaxdd » Wed Apr 04, 2018 4:34 pm

Do we have any news?
itsmaxdd
 
Posts: 47
Joined: Thu Dec 24, 2015 6:41 pm
languages_spoken: english

Re: Odroid C1+ and Kernel 4.x

Unread postby lavorrick » Wed Jun 20, 2018 5:44 pm

I compiled and ran a kernel from the amlogic integ branch, which reports to be some version of 4.17. It runs fine and can access my SD card and ethernet and USB drive. I haven't tried an MMC card and I found that the USB OTG port does not work. The CPU governer also appears to be inoperative, so I assume the cores are running at full bore the whole time. It's definitely substantial progress! One puzzling thing is that you cannot reboot from any other kernel version into this new one - it hangs on boot if you try. You have to pull the power plug out and cold boot into this 4.17 one and then it works.
lavorrick
 
Posts: 16
Joined: Tue Feb 10, 2015 7:04 pm
languages_spoken: english
ODROIDs: C1, C1+, XU4

Re: Odroid C1+ and Kernel 4.x

Unread postby mad_ady » Wed Jun 20, 2018 6:05 pm

That's great news. Can you post the link to the kernel/build instructions?
User avatar
mad_ady
 
Posts: 4427
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: Odroid C1+ and Kernel 4.x

Unread postby lavorrick » Wed Jun 20, 2018 7:48 pm

The problem is that what I've done is such a hack that I would be here all day telling you what I've done. Also I'm no expert at this stuff, I daresay there's plenty of better ways to do things than I have done.

Anyway I have uploaded the kernel that I have built http://mreeve.com/odroid/c1-kernel/ which you can feel free to grab and have a go with if you like. You'll need the kernel (uImage), the ramdisk (uInitrd), the device tree binary (meson8b-odroidc1.dtb) and the kernel modules tarball (modules.tar). It's a long time since I've used a hardkernel bootloader, but I think you'll need to put the kernel, ramdisk and device tree binary under /media/boot, unpack the modules into the root directory, then modify the bootloader to set suitable filenames and kernel parameters. The really important takeaways from this are that the device tree binary filename is subtly different from version 3, and the console is on ttyAML0 and not ttyS0.

The config for this kernel is just multi_v7_defconfig plus CONFIG_BLK_DEV_DM built as a module, which I need as my root filesystem is on a logical volume on a USB stick.

In terms of building, I use my XU4 as it's a lot faster. Also, my C1 is running debian on an external USB stick with the U-571 bootloader on an SD card. This was all assembled with z2d https://github.com/umiddelb/z2d but I modified it to have a separate /boot partition which resides on the SD card. For the sake of simplicity though I'll instead assume you're running a stock hardkernel Ubuntu image here on which you will do the build.

git clone -b integ git://git.kernel.org/pub/scm/linux/kern ... mlogic.git

cd linux-amlogic

make multi_v7_defconfig
make -j4
make LOADADDR=0x00208000 uImage

cp arch/arm/boot/uImage /media/boot
cp arch/arm/boot/dts/meson8b-odroidc1.dtb /media/boot

make modules_install

kver=`make kernelrelease`
cd /boot
update-initramfs -c -k ${kver}
mkimage -A arm -O linux -T ramdisk -a 0x0 -e 0x0 -n initrd.img-${kver} -d initrd.img-${kver} uInitrd-${kver}
cp uInitrd-${kver} /media/boot/uInitrd

Then modify the bootloader config as described earlier.

Good luck!
lavorrick
 
Posts: 16
Joined: Tue Feb 10, 2015 7:04 pm
languages_spoken: english
ODROIDs: C1, C1+, XU4

Re: Odroid C1+ and Kernel 4.x

Unread postby mad_ady » Wed Jun 20, 2018 8:17 pm

Thanks!
User avatar
mad_ady
 
Posts: 4427
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1


Return to General Chat

Who is online

Users browsing this forum: No registered users and 1 guest