Odroid C2 mainline kernel support

Moderators: mdrjr, odroid

Re: Odroid C2 mainline kernel support

Unread postby rooted » Sun Mar 26, 2017 1:02 pm

crashoverride wrote:
rooted wrote:Indeed, I can't wait to give it a try

I looked through the source code, but I can not find any hardware video codec drivers[1]. If you try it (LibreElec), please report if its using hardware codecs.

[edit]
[1] The "amlogic" folder in the kernel where the drivers used to be is not present. I also looked in "driver/media/platform" for V4L drivers, but did not find any for meson.

I haven't had a chance but I believe it's sw only but how can we have kodi running without GPU? Framebuffer I guess.
User avatar
rooted
 
Posts: 3652
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1
C1+
C2
XU3 Lite
XU4
VU7+
HiFi Shield 2
Smart Power (original)

Re: Odroid C2 mainline kernel support

Unread postby narmstrong » Tue Mar 28, 2017 12:55 am

rooted wrote:
crashoverride wrote:
rooted wrote:Indeed, I can't wait to give it a try

I looked through the source code, but I can not find any hardware video codec drivers[1]. If you try it (LibreElec), please report if its using hardware codecs.

[edit]
[1] The "amlogic" folder in the kernel where the drivers used to be is not present. I also looked in "driver/media/platform" for V4L drivers, but did not find any for meson.

I haven't had a chance but I believe it's sw only but how can we have kodi running without GPU? Framebuffer I guess.


Hi, the GPU 3D acceleration is working, for the Kodi UI, and the Video decoding is done in software only.

The decoding works fine up to 720p h264, if you try 1080p it won't follow.

The amlogic hardware accelerated decoding is an huge piece of code amd should be rewritten as a V4L4 driver to be handled in a generic way and stop depending on the aml libraries.

Neil
narmstrong
 
Posts: 6
Joined: Tue Mar 21, 2017 7:06 pm
Location: Villeneuve-Loubet, France
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby bolek » Tue Mar 28, 2017 2:00 am

@Neil: I'd like to try to build your amlogic/v4.11/odroid-usb-hog-rft release. I'm mainly interested in proper network and usb support. I tried your LibreELEC image and was pleased to see ethernet working well.
In 4.11 usb-hog release, I don't see a C2 specific defconfig. Should I just make defconfig?
Any compilation step changes compared to https://github.com/umiddelb/armhf/wiki/ ... perimental (except clone url and make defconfig)?
Thanks for your help and effort.
bolek
 
Posts: 8
Joined: Tue Mar 28, 2017 1:47 am
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby umiddelb » Tue Mar 28, 2017 5:34 am

bolek wrote:@Neil: I'd like to try to build your amlogic/v4.11/odroid-usb-hog-rft release. I'm mainly interested in proper network and usb support. I tried your LibreELEC image and was pleased to see ethernet working well.
In 4.11 usb-hog release, I don't see a C2 specific defconfig. Should I just make defconfig?
Any compilation step changes compared to https://github.com/umiddelb/armhf/wiki/ ... perimental (except clone url and make defconfig)?
Thanks for your help and effort.


The steps mentioned above will give you a kernel with ethernet and (some) USB support. The kernel source trees from Kevin Hilman and Neil Armstrong usually come with a defconfig only. From time to time I merge new items into the gx-defconfig.

Due to a different partition layout and boot procedure, you may need to copy the contents of /boot/kernel.d/linux-4.11..../* to /media/boot/

Cheers
Uli
umiddelb
 
Posts: 411
Joined: Thu Jan 29, 2015 6:42 am
languages_spoken: English, German
ODROIDs: ODROID-C1, ODROID-XU4, ODROID-C2

Re: Odroid C2 mainline kernel support

Unread postby bolek » Tue Mar 28, 2017 12:02 pm

Thanks for the clarification, Uli.
If I am to copy the contents of /boot/kernel.d/linux-4.11..../* to /media/boot/ I will run out of space as mmcblk0p1 is mounted there and it's only 128M, whereas the contents of linux-4.11.../ are some 156M in size.
So either I am misunderstanding something or I need to resize mmcblk0p1 before I copy stuff from /boot/kernel.d/linux-4.11..../.

Would you mind posting your boot.ini (relevant fatload mmc section) and/or partition layout?
Thanks once again.
bolek
 
Posts: 8
Joined: Tue Mar 28, 2017 1:47 am
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby umiddelb » Tue Mar 28, 2017 6:25 pm

Hi Bolek,

you may need to remove the debug information:

Code: Select all
find . -type f -name '*.ko' | xargs -n 1 objcopy --strip-unneeded


This will reduce the storage consumption to 45 MB per kernel image. I've updated the section in my HowTo accordingly.

I don't use the boot.ini at all.

Cheers,
Uli
umiddelb
 
Posts: 411
Joined: Thu Jan 29, 2015 6:42 am
languages_spoken: English, German
ODROIDs: ODROID-C1, ODROID-XU4, ODROID-C2

Re: Odroid C2 mainline kernel support

Unread postby bolek » Wed Mar 29, 2017 12:21 am

Thanks, Uli! Will try and report back with my findings.
bolek
 
Posts: 8
Joined: Tue Mar 28, 2017 1:47 am
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby bolek » Fri Mar 31, 2017 3:31 am

bolek wrote:Thanks, Uli! Will try and report back with my findings.


Well, after several days and multiple tries, I still haven't figured out what I am doing wrong... :?
Would anyone be kind enough to share a full general-purpose (not media centric like LibreELEC or similarly specialized) OS image with a working mainline? I wish to test out a few things, just can't get the thing to boot for the life of me... :cry:
I hope we get a (semi) official kernel update soon.
bolek
 
Posts: 8
Joined: Tue Mar 28, 2017 1:47 am
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby umiddelb » Fri Mar 31, 2017 6:07 pm

bolek wrote:
bolek wrote:Thanks, Uli! Will try and report back with my findings.


Well, after several days and multiple tries, I still haven't figured out what I am doing wrong... :?
Would anyone be kind enough to share a full general-purpose (not media centric like LibreELEC or similarly specialized) OS image with a working mainline? I wish to test out a few things, just can't get the thing to boot for the life of me... :cry:
I hope we get a (semi) official kernel update soon.


Most likely you might have forgotten to switch the Linux console from ttyS0 to ttyAML0 (in boot.ini), otherwise you won't get any output on the console.
umiddelb
 
Posts: 411
Joined: Thu Jan 29, 2015 6:42 am
languages_spoken: English, German
ODROIDs: ODROID-C1, ODROID-XU4, ODROID-C2

Re: Odroid C2 mainline kernel support

Unread postby daggs » Sat Apr 01, 2017 3:22 am

narmstrong wrote:
rooted wrote:
crashoverride wrote:
rooted wrote:Indeed, I can't wait to give it a try

I looked through the source code, but I can not find any hardware video codec drivers[1]. If you try it (LibreElec), please report if its using hardware codecs.

[edit]
[1] The "amlogic" folder in the kernel where the drivers used to be is not present. I also looked in "driver/media/platform" for V4L drivers, but did not find any for meson.

I haven't had a chance but I believe it's sw only but how can we have kodi running without GPU? Framebuffer I guess.


Hi, the GPU 3D acceleration is working, for the Kodi UI, and the Video decoding is done in software only.

The decoding works fine up to 720p h264, if you try 1080p it won't follow.

The amlogic hardware accelerated decoding is an huge piece of code amd should be rewritten as a V4L4 driver to be handled in a generic way and stop depending on the aml libraries.

Neil


is there any planed initiative to port the driver or active one?
bolek wrote:
bolek wrote:Thanks, Uli! Will try and report back with my findings.


Well, after several days and multiple tries, I still haven't figured out what I am doing wrong... :?
Would anyone be kind enough to share a full general-purpose (not media centric like LibreELEC or similarly specialized) OS image with a working mainline? I wish to test out a few things, just can't get the thing to boot for the life of me... :cry:
I hope we get a (semi) official kernel update soon.


if you don't mind tinkering with buildroot, I can post here a patch that allows usage of that repo. it compiles well but I didn't the chance to test it.
daggs
 
Posts: 189
Joined: Tue Mar 22, 2016 6:34 pm
languages_spoken: english, spanish
ODROIDs: odroid c2

Re: Odroid C2 mainline kernel support

Unread postby daggs » Sat Apr 01, 2017 6:03 pm

Neil, btw, I've searched for V4L4 driver both in the kernel an via google and came short, can you point me to such reference?
I know of v4l2 but not v4l4.
daggs
 
Posts: 189
Joined: Tue Mar 22, 2016 6:34 pm
languages_spoken: english, spanish
ODROIDs: odroid c2

Re: Odroid C2 mainline kernel support

Unread postby memeka » Sat Apr 01, 2017 7:29 pm

daggs wrote:Neil, btw, I've searched for V4L4 driver both in the kernel an via google and came short, can you point me to such reference?
I know of v4l2 but not v4l4.

He said that the driver *should be written*, not *is*, and also he meant v4l2 :)

I think it's clear that this kernel has no VPU driver, the "old" style drivers are not there, and hopefully there will be new v4l2 drivers in the future.
User avatar
memeka
 
Posts: 3529
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART

Re: Odroid C2 mainline kernel support

Unread postby daggs » Sun Apr 02, 2017 1:25 am

memeka wrote:
daggs wrote:Neil, btw, I've searched for V4L4 driver both in the kernel an via google and came short, can you point me to such reference?
I know of v4l2 but not v4l4.

He said that the driver *should be written*, not *is*, and also he meant v4l2 :)

I think it's clear that this kernel has no VPU driver, the "old" style drivers are not there, and hopefully there will be new v4l2 drivers in the future.

I didn't said I've searched for the amlogic driver, I've said I searched for V4L4 driver which I've never heard of.

I know there is no driver in this kernel, I've asked in the post before if there any active or planed initiative on the mentioned conversion.
daggs
 
Posts: 189
Joined: Tue Mar 22, 2016 6:34 pm
languages_spoken: english, spanish
ODROIDs: odroid c2

Re: Odroid C2 mainline kernel support

Unread postby listenmitglied » Tue Apr 11, 2017 8:58 pm

Edit: (work in progress - not finalized)
Here a working configuration for mainline kernel 4.11-rc7.
It bases on the installed ubuntu 16.04.2 from hardkernel (kernel 3.14), "apt dist-upgrade" to newest packages.
Ethernet is working, USB-testing is WIP and will be reported. I did not try HDMI so far.

Steps:
1) upgrade the hardkernel distribution.
2) it may be wise to check with "dpkg-reconfigure tzdata", if your timezone is correct.
3) login as root and "cd /usr/src"
4) fetch the 4.11-rc7 kernel from kernel.org with "wget ...", "tar xJf ..." and "cd ./linux-4.11..."
5) apply the seven patches, attached as tar-file, with "patch -p1 < ...". Only one patch gave me a hint, that the patch had to be applied some lines away, but works anyway.
6) rm .config
7) create new .config from below.
8) use ./build.sh from below
9) use ./install.sh from below
10) use boot.ini from below. Attention: As mentioned above, an MMC is /dev/mmcblk0p2, a SD-Card is /dev/mmcblk1p2 for root-device. The "fsck.repair"-option may delay the boot quite a bit. Remove if you want. As I often just remove the power cord, the filesystem needs this option.
11) reboot

12) Please take notice that the MAC of the NIC seems to change here and there with the new kernel. So the DHCP may assign another IP after reboot(s). I got my forth new MAC from the same C2 now...

.config:
Code: Select all



boot.ini:
Code: Select all
ODROIDC2-UBOOT-CONFIG
setenv bootargs "root=/dev/mmcblk1p2 rootwait ro fsck.repair=yes console=ttyAML0,115200 no_console_suspend net.ifnames=0"
setenv loadaddr "0x01080000"
setenv dtb_loadaddr "0x01000000"
fatload mmc 0:1 ${loadaddr} uImage-4.11.0-rc7
fatload mmc 0:1 ${dtb_loadaddr} meson-gxbb-odroidc2-4.11.0-rc7.dtb
bootm ${loadaddr} - ${dtb_loadaddr}


build.sh:
Code: Select all
make -j4 dtbs Image modules
make modules_install
make headers_install
make firmware_install
mkimage -A arm64 -O linux -T kernel -C none -a 0x1080000 -e 0x1080000 -n linux-next -d arch/arm64/boot/Image uImage


install.sh:
Code: Select all
set +x
kernelversion=`cat ./include/config/kernel.release`
cp -v .config /boot/config-$kernelversion
echo "kernel version" $kernelversion
cp -v ./arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dtb /media/boot/meson-gxbb-odroidc2-$kernelversion.dtb
cp -v ./uImage /media/boot/uImage-$kernelversion
cp -v .config /media/boot/config-$kernelversion
sync
Attachments
odroidc2_patches.tar
(39 KiB) Downloaded 22 times
Last edited by listenmitglied on Sat Apr 22, 2017 6:48 pm, edited 1 time in total.
listenmitglied
 
Posts: 4
Joined: Tue Feb 28, 2017 10:26 pm
languages_spoken: german
ODROIDs: 4 x C2

Re: Odroid C2 mainline kernel support

Unread postby umiddelb » Wed Apr 12, 2017 4:19 am

Is there any kind of output you get from the serial console?
umiddelb
 
Posts: 411
Joined: Thu Jan 29, 2015 6:42 am
languages_spoken: English, German
ODROIDs: ODROID-C1, ODROID-XU4, ODROID-C2

Re: Odroid C2 mainline kernel support

Unread postby moon.linux » Wed Apr 12, 2017 4:29 am

@listenmitglied

Only possible thing you could be missing ODROIDC2-UBOOT-CONFIG command in boot.ini

Code: Select all
ODROIDC2-UBOOT-CONFIG
setenv bootargs "root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwait ro console=ttyAML0,115200 no_console_suspend net.ifnames=0"
setenv loadaddr "0x01080000"
setenv dtb_loadaddr "0x01000000"
fatload mmc 0:1 ${loadaddr} uImage-4.11.0-rc5
fatload mmc 0:1 ${dtb_loadaddr} meson-gxbb-odroidc2-4.11.0-rc5.dtb
bootm ${loadaddr} - ${dtb_loadaddr}



If you want to test the HDMI you probably need to test this image and use the config option provided for future builds.

viewtopic.php?f=135&t=22717&start=150#p183785
moon.linux
 
Posts: 828
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: Odroid C2 mainline kernel support

Unread postby listenmitglied » Wed Apr 12, 2017 6:09 am

@moon.linux:
The command is in the boot.ini, sorry.
LibreElec runs quite fine on Odroid. I'll give that a try, but I just need a headless server - performance on Ethernet and USB. Ideally graphics are turned off completely :)
listenmitglied
 
Posts: 4
Joined: Tue Feb 28, 2017 10:26 pm
languages_spoken: german
ODROIDs: 4 x C2

Re: Odroid C2 mainline kernel support

Unread postby Flole » Thu Apr 13, 2017 10:42 pm

I am also trying to compile the Kernel and I am having issues getting Ethernet to work. As I want to boot from NFS, this is crucial for my application. I tried all three different repositories with and without various patches. However, the online one that worked was the Librelec precompiled image (when I tried to self-compile it also doesn't work, even though I used the config.gz extracted from the kernel) from which I took the boot partition and used it with my debian ext4, however it doesn't have NFS enabled which makes it impossible for me to use like I need it. I am receiving the phy phy-c0000000.phy.0: phy poweron failed --> -22 error. Could anyone point me in the right direction or give me an advice while it is not working? I am having various issues with the 3.x kernel which makes me want to try the mainline kernel now.
Flole
 
Posts: 11
Joined: Thu Apr 13, 2017 10:14 pm
languages_spoken: english, german
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby brad » Sun Apr 16, 2017 12:51 pm

narmstrong wrote:If you want to try the Quake 3 Demo on your C2, I provided some pre-built tarballs to drop on a SDCard here :
https://github.com/superna9999/meson_gx_mali_q3_demo
tarballs :
https://github.com/superna9999/meson_gx ... o/releases



Thanks Neil, Quake 3 Demo is working great. Nice work.
brad
 
Posts: 552
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby bolek » Mon Apr 17, 2017 11:26 am

OK, after a new batch of efforts, I think I am getting a bit closer.
I tried to get as close to @umiddelb's setup as possible so I took his z2d scripts and prepared a base Ubuntu image that has u-571 macros baked in.
I then proceeded to compile the kernel as outlined here. I also cleaned up dtb's to keep only the c2 dtb.
To avoid confusion between HK boot stuff and u-571, I moved hk kernel to /boot/kernel.d/hk and removed /media/boot altogether.
The result is a working 3.14.79-110 HK kernel and a compiled 4.11.0-rc6 kernel.
My /boot now looks like this
Code: Select all
root@odroid-c2:/# ls -lR /boot/
/boot/:
total 12
drwxr-xr-x 4 root root 4096 Apr 16 12:31 conf.d
drwxr-xr-x 4 root root 4096 Apr 16 11:59 kernel.d

/boot/conf.d:
total 8
lrwxr-xr-x 1 root root      2 Apr 16 12:31 default -> hk
drwxr-xr-x 2 root root   4096 Apr 16 12:13 hk
drwxr-xr-x 2 root root   4096 Apr 16 12:28 mainline

/boot/conf.d/hk:
total 4
lrwxrwxrwx 1 root root  17 Apr 16 12:13 kernel -> /boot/kernel.d/hk
-rw-r--r-- 1 root root 786 Apr  9 12:57 uEnv.txt

/boot/conf.d/mainline:
total 8
lrwxrwxrwx 1 root root  19 Apr 16 12:02 kernel -> /boot/kernel.d/test
-rw-r--r-- 1 root root 559 Apr 16 12:28 uEnv.txt

/boot/kernel.d:
total 8
drwxr-xr-x 2 root root 4096 Apr 16 12:12 hk
drwxr-xr-x 2 root root 4096 Apr 16 12:00 linux-4.11.0-rc6-gx-gede6d1c
lrwxrwxrwx 1 root root   43 Apr 16 11:56 test -> /boot/kernel.d/linux-4.11.0-rc6-gx-gede6d1c

/boot/kernel.d/hk:
total 18276
-rw------- 1 root root 13472384 Apr 16 09:53 Image
-rw-r--r-- 1 root root    29804 Apr 16 09:53 meson64_odroidc2.dtb
-rw-r--r-- 1 root root  5202109 Apr 16 09:53 uInitrd

/boot/kernel.d/linux-4.11.0-rc6-gx-gede6d1c:
total 45352
-rw-r--r-- 1 root root   155965 Apr 16 11:56 config-4.11.0-rc6-gx-gede6d1c
-rwxr-xr-x 1 root root 15557120 Apr 16 11:56 Image
-rw-r--r-- 1 root root  5847089 Apr 16 11:58 initrd.img-4.11.0-rc6-gx-gede6d1c
-rw-r--r-- 1 root root    16361 Apr 16 11:56 meson-gxbb-odroidc2.dtb
-rw-r--r-- 1 root root  3580860 Apr 16 11:56 System.map
-rw-r--r-- 1 root root 15557184 Apr 16 11:56 uImage
-rw-r--r-- 1 root root  5847153 Apr 16 11:58 uInitrd


When I switch default boot configuration to mainline, I still don't get a successful boot, though. My mainline uEnv.txt is the same as hk uEnv.txt, except for console:
Code: Select all
k_console=console=ttyAML0,115200

I am suspecting other changes to uEnv.txt are needed, but am not sure which ones.
Here's my full mainline uEnv.txt:
Code: Select all
bootscr=
k_console=console=ttyAML0,115200
k_rootfs=root=UUID=deadbeef-dead-beef-dead-beefdeadbeef rootwait rw fsck.repair$
k_governor=governor=conservative
k_video=no_console_suspend hdmimode=1080p60hz m_bpp=32
m_set_bootargs=setenv bootargs "${k_console} ${k_rootfs} ${k_governor} ${k_vide$
run_pre_boot=1
m_pre_boot=fdt addr ${fdt_addr_r}; run fdt_rm_graphics; run fdt_rm_meson_timer;
fdt_rm_graphics=fdt rm /reserved-memory; fdt rm /aocec; fdt rm /meson-fb; fdt r$
fdt_rm_meson_timer=fdt rm /meson_timer; fdt rm /cpus/cpu@0/timer; fdt rm /cpus/$
fdt_rm_arch_timer=fdt rm /timer;


I also noticed this file (https://github.com/umiddelb/u-571/blob/ ... e_boot.txt), but I could not use it to edit the uEnv.txt that would make mainline boot properly.
Does anyone have a working uEnv.txt for C2 mainline?
I notice a few people want a basic headless server setup with mainline. If I figure it out, I will write up a tutorial/guide.

Thanks to all who keep posting their observations, and to Uli for a great work on compilation guide, z2d and u-571. I hope to have a booting mainline soon.
Cheers,
- Bolek
bolek
 
Posts: 8
Joined: Tue Mar 28, 2017 1:47 am
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby umiddelb » Tue Apr 18, 2017 6:17 pm

Hi Bolek,

please take this uEnv.txt for booting the mainline kernel:
Code: Select all
bootscr=
fdt=meson-gxbb-odroidc2.dtb
kernel=uImage
k_console=console=tty0 console=ttyAML0,115200n8
k_rootfs=root=UUID=deadbeef-dead-beef-dead-beefdeadbeef rootwait rw fsck.repair=yes
k_governor=governor=interactive
k_video=no_console_suspend
m_set_bootargs=setenv bootargs "${k_console} ${k_rootfs} ${k_governor} ${k_video} net.ifnames=0 elevator=noop";
run_pre_boot=0


As done for the Pine64, I'll switch to use the mainline kernel in z2d for the C2 as well, once 4.11 has been released.

Cheers
Uli
umiddelb
 
Posts: 411
Joined: Thu Jan 29, 2015 6:42 am
languages_spoken: English, German
ODROIDs: ODROID-C1, ODROID-XU4, ODROID-C2

Re: Odroid C2 mainline kernel support

Unread postby bolek » Wed Apr 19, 2017 1:46 am

Thanks Uli! I am able to boot mainline kernel with the provided uEnv.txt.
Now I can do bunch of testing.
USB support seems to be hit-or-miss. I was able to mount a SanDisk Flash Drive, but a USB microsd reader did not even light up when plugged in.

My main motivation for trying out mainline was to test Docker Swarm overlay networking which was a problem on 3.14 and it seems promising on mainline, even though I need to do more testing.
Had to switch to overlay storage driver as aufs is not present in this kernel.

Once I prepare a good base image, I plan to write up a how-to. Overall, looks very promising. Can't wait for official support from HK.
Thanks once again Uli!
bolek
 
Posts: 8
Joined: Tue Mar 28, 2017 1:47 am
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby linuxest » Wed Apr 19, 2017 9:10 am

Awesome! I also want to build an affordable clustering headless server based on Docker Swarm.
I hope you can make a working base image soon.
linuxest
 
Posts: 30
Joined: Tue Nov 08, 2016 6:35 pm
languages_spoken: english
ODROIDs: 10 x XU4s
2 x C2s with HiFi-Shield 2

Re: Odroid C2 mainline kernel support

Unread postby alpha_one_x86 » Thu Apr 20, 2017 10:30 am

bolek wrote:Once I prepare a good base image, I plan to write up a how-to

Yes please, I need test it too, on SD or eMMC, with ethernet
User avatar
alpha_one_x86
 
Posts: 86
Joined: Wed Aug 27, 2014 6:47 am
languages_spoken: french, english, spanish
ODROIDs: 15 odroid u3, 10 odroid c1, 50 odroid c2

Re: Odroid C2 mainline kernel support

Unread postby brad » Thu Apr 20, 2017 11:45 am

alpha_one_x86 wrote:
bolek wrote:Once I prepare a good base image, I plan to write up a how-to

Yes please, I need test it too, on SD or eMMC, with ethernet


I have been testing yocto build process (with help from Neil Armstrong using his meson-meta package) and are very close to a working development build incorporating everything (bootloader, uboot kernel and rootfs) to produce a direct image to be written to an sd card for the C2. Packages for the custom generated distributions will be based on rpm's.

Currently based on kernel 4.10 stable with backported hdmi and audio patches with a number of options including minimal headless and HDMI options.

Im going to do some more testing tonight (my time) and will be sure to share results (and possibly some test images)

meson-meta (development version krogoth-next) can be found here but still not quiet working in terms of the bootloader config...
https://github.com/superna9999/meta-mes ... ogoth-next
brad
 
Posts: 552
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby rooted » Thu Apr 20, 2017 2:42 pm

brad wrote:
alpha_one_x86 wrote:
bolek wrote:Once I prepare a good base image, I plan to write up a how-to

Yes please, I need test it too, on SD or eMMC, with ethernet


I have been testing yocto build process (with help from Neil Armstrong using his meson-meta package) and are very close to a working development build incorporating everything (bootloader, uboot kernel and rootfs) to produce a direct image to be written to an sd card for the C2. Packages for the custom generated distributions will be based on rpm's.

Currently based on kernel 4.10 stable with backported hdmi and audio patches with a number of options including minimal headless and HDMI options.

Im going to do some more testing tonight (my time) and will be sure to share results (and possibly some test images)

meson-meta (development version krogoth-next) can be found here but still not quiet working in terms of the bootloader config...
https://github.com/superna9999/meta-mes ... ogoth-next

This sounds great.
User avatar
rooted
 
Posts: 3652
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1
C1+
C2
XU3 Lite
XU4
VU7+
HiFi Shield 2
Smart Power (original)

Re: Odroid C2 mainline kernel support

Unread postby brad » Thu Apr 20, 2017 5:59 pm

rooted wrote:This sounds great.


I now have a working minimal yocto install using meson-meta krogoth-next (still packaging bootloader / uboot manually for the moment) with following features

- Custom root fs built by yocto / OpenEmbedded
- hardkernel uboot (ripped from Ubuntu minimal image for the moment) with boot.ini to autoboot without intervention in uboot console
- Console on serial and HDMI
- USB (have not tested OTG yet)
- Gigabit Ethernet
- rpm package manager
- Linux hardkernel-odroidc2 4.10.11-yocto-standard-meson64-meson #1 SMP PREEMPT Wed Apr 19 03:52:34 AEST 2017 aarch64 GNU/Linux
- Minimal rootfs (still need to resize fs to fit disk)...
Code: Select all
Filesystem     Type  Size  Used Avail Use% Mounted on
/dev/root      ext4  975M  236M  670M  27% /

- sd or mmc working

Overnight will be building from sources a more fully featured rootfs / kernel and further testing tomorrow. If all goes well I might consider hosting some prebuilt images along with rpms for a custom development distribution for others to test and play with easily but I might wait for stable meson-meta korgoth firstly before I take that on.

A big thank you to Baylibre, Neil Armstrong and others for all of the hard work and dedication to supporting meson, C2 and the Yocto project.
brad
 
Posts: 552
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby rooted » Thu Apr 20, 2017 8:06 pm

I will watch your repo
User avatar
rooted
 
Posts: 3652
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1
C1+
C2
XU3 Lite
XU4
VU7+
HiFi Shield 2
Smart Power (original)

Re: Odroid C2 mainline kernel support

Unread postby moon.linux » Fri Apr 21, 2017 1:44 am

Sounds wonderful...otg issue will also be fix soon.
moon.linux
 
Posts: 828
Joined: Thu Oct 02, 2014 11:42 pm
languages_spoken: english

Re: Odroid C2 mainline kernel support

Unread postby FoxBob79 » Fri Apr 21, 2017 4:56 am

If I try to build with Yocto I always get this error:

Code: Select all
Error in compiling python function in /home/elmar/odroidC2/amlogic-bsp/meta-meson/classes/kernel-uimage-meson64.bbclass, line 3:

The code lines resulting in this error were:
     0006:        d.setVar("DEPENDS", depends)
     0007:   d.setVar("KERNEL_IMAGETYPE_FOR_MAKE", "Image")
     0008:
TabError: inconsistent use of tabs and spaces in indentation (kernel-uimage-meson64.bbclass, line 10)


What do I wrong?
User avatar
FoxBob79
 
Posts: 17
Joined: Thu Apr 28, 2016 4:37 am
languages_spoken: german, english
ODROIDs: odroidC2

Re: Odroid C2 mainline kernel support

Unread postby zeta » Fri Apr 21, 2017 7:18 am

FoxBob79 wrote:If I try to build with Yocto I always get this error:

Code: Select all
Error in compiling python function in /home/elmar/odroidC2/amlogic-bsp/meta-meson/classes/kernel-uimage-meson64.bbclass, line 3:

The code lines resulting in this error were:
     0006:        d.setVar("DEPENDS", depends)
     0007:   d.setVar("KERNEL_IMAGETYPE_FOR_MAKE", "Image")
     0008:
TabError: inconsistent use of tabs and spaces in indentation (kernel-uimage-meson64.bbclass, line 10)


What do I wrong?
It looks like the error is in the file quoted in the error (kernel-uimage-meson64.bbclass).
Python doesn't like when both spaces and tabs are mixed when indenting some code. Editing this file shows that the "python __anonymous' function is indeented by spaces, except the line containing "KERNEL_IMAGETYPE_FOR_MAKE", leading to the error you get.
You can try to edit this file to replace the tab by some spaces and see if it works.
I am not yet at this point (got errors of mirrors for "log_rotate" package yesterday, but it seems to be ok today, so compilation is restarted for a few hours), but should be soon, I hope. If I get the same error, and this fix works, I will create a pull request.

Edit: here is a link to the file source where we can see the indentation problem : https://github.com/superna9999/meta-mes ... 64.bbclass . There is not history for that file, it has been added this way on the 15th of April/
zeta
 
Posts: 6
Joined: Fri Apr 21, 2017 7:04 am
languages_spoken: english, french
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby brad » Fri Apr 21, 2017 8:24 am

zeta wrote:It looks like the error is in the file quoted in the error (kernel-uimage-meson64.bbclass).
Python doesn't like when both spaces and tabs are mixed when indenting some code. Editing this file shows that the "python __anonymous' function is indeented by spaces, except the line containing "KERNEL_IMAGETYPE_FOR_MAKE", leading to the error you get.
You can try to edit this file to replace the tab by some spaces and see if it works.
I am not yet at this point (got errors of mirrors for "log_rotate" package yesterday, but it seems to be ok today, so compilation is restarted for a few hours), but should be soon, I hope. If I get the same error, and this fix works, I will create a pull request.

Edit: here is a link to the file source where we can see the indentation problem : https://github.com/superna9999/meta-mes ... 64.bbclass . There is not history for that file, it has been added this way on the 15th of April/


I did not have any issues with kernel-uimage-meson64.bbclass but this may be related to the version of python on the build machines.

In regards to logrotate issues, fedorahosted.org was retired at start of March and source location has changed, see here for patch to resolve the recipe and change source location if its still not working https://patchwork.openembedded.org/patch/138737/
brad
 
Posts: 552
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby FoxBob79 » Fri Apr 21, 2017 5:10 pm

Big Thanks for all the hints. :-) I think it is really a problem with python, but I still use the newest version. I will have a look at the patch this evening.
User avatar
FoxBob79
 
Posts: 17
Joined: Thu Apr 28, 2016 4:37 am
languages_spoken: german, english
ODROIDs: odroidC2

Re: Odroid C2 mainline kernel support

Unread postby zeta » Fri Apr 21, 2017 7:11 pm

brad wrote:In regards to logrotate issues, fedorahosted.org was retired at start of March and source location has changed, see here for patch to resolve the recipe and change source location if its still not working https://patchwork.openembedded.org/patch/138737/
Thanks for the info. It built successfully this night, so I don't know how, but it looks like poky found a way to find a mirror, without having to patch anything.
I have not yet had time to test the generated image, will try to do at the end of the day.

brad wrote:I did not have any issues with kernel-uimage-meson64.bbclass but this may be related to the version of python on the build machines.
I didn't have this error neither. My build machine runs an up to date Fedora 25. I will check tonight what the python version is on this.

FoxBob79 wrote:Big Thanks for all the hints. :-) I think it is really a problem with python, but I still use the newest version.
Can you show what python version you are using, so that we can compare ?
zeta
 
Posts: 6
Joined: Fri Apr 21, 2017 7:04 am
languages_spoken: english, french
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby brad » Fri Apr 21, 2017 11:19 pm

I think its worth noting in this thread that C2 support has basically been incorporated into mainline uboot now, see below for some details...

http://git.denx.de/?p=u-boot.git&a=sear ... t&s=odroid
brad
 
Posts: 552
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby listenmitglied » Sat Apr 22, 2017 4:29 am

I got now an UART-Adapter.
Output:

Code: Select all
GXBB:GXBB:GXBB:BLGXBB:GXBB:GXBB:GXBB:GXBB:GXBB:▒GXBB:B▒GXBB:B▒GXBB:GXBB:GXBB:GXB                                          B:GXBB:GXBB:BL1:0GXBB:▒GXBB:BL1:▒GXBB:BL1:▒GXBB:BL1:0GXBB:BL1:0▒GXBB:BL1:0▒GXBB:                                          BL1:0▒GXBB:BL1:0▒GXBB:BL1:0GXBB:BL1:0▒GXBB:BL1:0GXBB:BL1:▒GXBB:BL1:0GXBB:BL1:0GX                                          BB:BL1:▒GXBB:BL1:▒GXBB:BL1:▒GXBB:BL1▒GXBB:BL1▒GXBB:BL▒GXBB:BL1GXBB:BL▒GXBB:BL▒GX                                          BB:BLGXBB:B▒GXBB:B▒GXBB:▒GXBB:▒GXBB:▒GXBB:▒GXBB:▒GXBB:▒GXBB:BL1:08dafd:0a8993;FE                                          AT:EDFC318C;POC:3;RCY:0;EMMC:800;NAND:81;SD:0;READ:0;CHK:0;
TE: 455603
no sdio debug board detected

BL2 Built : 11:44:26, Nov 25 2015.
gxb gfb13a3b-c2 - jcao@wonton

Board ID = 8
set vcck to 1100 mv
set vddee to 1050 mv
CPU clk: 1536MHz
DDR channel setting: DDR0 Rank0+1 same
DDR0: 2048MB(auto) @ 912MHz(2T)-13
DataBus test pass!
AddrBus test pass!
Load fip header from SD, src: 0x0000c200, des: 0x01400000, size: 0x000000b0
Load bl30 from SD, src: 0x00010200, des: 0x01000000, size: 0x00009ef0
Sending bl30........................................OK.
Run bl30...
Load bl301 from SD, src: 0x0001c200, des: 0x01000000, size: 0x000018c0
Wait bl30...Done
Sending bl301.......OK.
Run bl301...
 SD, src: 0x00020200, des: 0x10100000, size: 0x00011130


--- UART initialized after reboot ---
[Reset cause: unknown]
[Image: unknown, amlogic_v1.1.3046-00db630-dirty 2016-08-31 09:24:14 tao.zeng@dr                                          oid04]
bl30: check_permit, count is 1
bl30: check_permit: ok!
chipid: ef be ad de d f0 Load bl33 from SD, src: 0x00034200, des: 0x01000000, si                                          ze: 0x00073510
ad ba ef be ad de not ES chip
[0.571195 Inits done]
secure task start!
high task start!
low task start!
NOTICE:  BL3-1: v1.0(debug):4d2e34d
NOTICE:  BL3-1: Built : 17:08:35, Oct 29 2015
INFO:    BL3-1: Initializing runtime services
INFO:    BL3-1: Preparing for EL3 exit to normal world
INFO:    BL3-1: Next image address = 0x1000000
INFO:    BL3-1: Next image spsr = 0x3c9


U-Boot 2015.01-00189-g205c7b3 (Feb 27 2017 - 10:53:13)

DRAM:  2 GiB
Relocation Offset is: 76f32000
-------------------------------------------------
* Welcome to Hardkernel's ODROID-C2
-------------------------------------------------
CPU : AMLogic S905
S/N : HKC213254DFD811B
MAC : 00:1e:06:33:cd:9b
BID : HKC2211610
-------------------------------------------------
register usb cfg[1][0] = 0000000077f95058
register usb cfg[0][1] = 0000000077f95078
vpu detect type: 5
vpu clk_level = 7
set vpu clk: 666667000Hz, readback: 666660000Hz(0x300)
MMC:   aml_priv->desc_buf = 0x0000000073f2ad30
aml_priv->desc_buf = 0x0000000073f2cec0
SDIO Port B: 0, SDIO Port C: 1
ret = 1 .[mmc_init] mmc init success
In:    serial
Out:   serial
Err:   serial
----------------------------------
MMC Size : 64 GB
----------------------------------
reading boot-logo.bmp.gz
** Unable to read file boot-logo.bmp.gz **
reading boot-logo.bmp
** Unable to read file boot-logo.bmp **
movi: the partiton 'logo' is reading...

MMC read: dev # 0, block # 61024, count 2048 ... 2048 blocks read: OK
hpd_state=1
[CANVAS]addr=0x3f800000 width=3840, height=1440

set hdmitx VIC = 16
hdmitx phy setting done
set hdmitx VIC = 16
hdmitx phy setting done
Error: Bad gzipped data
There is no valid bmp file at the given address
Net:   Meson_Ethernet
Hit [Enter] key twice to stop autoboot:  0
reading boot.ini
4108 bytes read in 7 ms (572.3 KiB/s)
cfgload: applying boot.ini...
cfgload: setenv bootargs "root=UUID=e139ce78-9841-40fe-8823-96a304a09859 rootwai                                          t ro console=ttyAML0,115200 no_console_suspend net.ifnames=0"
cfgload: setenv loadaddr "0x01080000"
cfgload: setenv dtb_loadaddr "0x01000000"
cfgload: fatload mmc 0:1 ${loadaddr} uImage-4.11.0-rc5-gx
reading uImage-4.11.0-rc5-gx
15557184 bytes read in 723 ms (20.5 MiB/s)
cfgload: fatload mmc 0:1 ${dtb_loadaddr} meson-gxbb-odroidc2-4.11.0-rc5-gx.dtb
reading meson-gxbb-odroidc2-4.11.0-rc5-gx.dtb
16293 bytes read in 10 ms (1.6 MiB/s)
cfgload: bootm ${loadaddr} - ${dtb_loadaddr}
ee_gate_off ...
## Booting kernel from Legacy Image at 01080000 ...
   Image Name:   linux-next
   Image Type:   AArch64 Linux Kernel Image (uncompressed)
   Data Size:    15557120 Bytes = 14.8 MiB
   Load Address: 01080000
   Entry Point:  01080000
   Verifying Checksum ... OK
load dtb from 0x1000000 ......
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x1000000
   Loading Kernel Image ... OK
   kernel loaded at 0x01080000, end = 0x01f56200
   Loading Device Tree to 000000001fff9000, end 000000001fffffa4 ... OK

Starting kernel ...

uboot time: 4598858 us
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.11.0-rc5-gx (root@odroid64) (gcc version 5.4.0 20                                          160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) ) #4 SMP PREEMPT Thu Apr 13 20:26:                                          16 CEST 2017
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 16 MiB at 0x0000000077000000
[    0.000000] NUMA: No NUMA configuration found
[    0.000000] NUMA: Faking a node at [mem 0x0000000000000000-0x0000000077ffffff                                          ]
[    0.000000] NUMA: Adding memblock [0x1000000 - 0xfffffff] on node 0
[    0.000000] NUMA: Adding memblock [0x10200000 - 0x77ffffff] on node 0
[    0.000000] NUMA: Initmem setup node 0 [mem 0x01000000-0x77ffffff]
[    0.000000] NUMA: NODE_DATA [mem 0x76fd9480-0x76fdaf7f]
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000001000000-0x0000000077ffffff]
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000001000000-0x000000000fffffff]
[    0.000000]   node   0: [mem 0x0000000010200000-0x0000000077ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000001000000-0x0000000077ffffff]
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv0.2 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: Trusted OS migration not required
[    0.000000] percpu: Embedded 23 pages/cpu @ffff800076f7a000 s56856 r8192 d291                                          60 u94208
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: enabling workaround for ARM erratum 845719
[    0.000000] Built 1 zonelists in Node order, mobility grouping on.  Total pag                                          es: 479296
[    0.000000] Policy zone: DMA
[    0.000000] Kernel command line: root=UUID=e139ce78-9841-40fe-8823-96a304a098                                          59 rootwait ro console=ttyAML0,115200 no_console_suspend net.ifnames=0
[    0.000000] log_buf_len individual max cpu contribution: 4096 bytes
[    0.000000] log_buf_len total cpu_extra contributions: 12288 bytes
[    0.000000] log_buf_len min size: 16384 bytes
[    0.000000] log_buf_len: 32768 bytes
[    0.000000] early log buf free: 13856(84%)
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Memory: 1882380K/1947648K available (9020K kernel code, 984K rwda                                          ta, 4032K rodata, 1088K init, 285K bss, 48884K reserved, 16384K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffff000000000000 - 0xffff000008000000   (   128 M                                          B)
[    0.000000]     vmalloc : 0xffff000008000000 - 0xffff7dffbfff0000   (129022 G                                          B)
[    0.000000]       .text : 0xffff000008080000 - 0xffff000008950000   (  9024 K                                          B)
[    0.000000]     .rodata : 0xffff000008950000 - 0xffff000008d50000   (  4096 K                                          B)
[    0.000000]       .init : 0xffff000008d50000 - 0xffff000008e60000   (  1088 K                                          B)
[    0.000000]       .data : 0xffff000008e60000 - 0xffff000008f56200   (   985 K                                          B)
[    0.000000]        .bss : 0xffff000008f56200 - 0xffff000008f9d6ac   (   286 K                                          B)
[    0.000000]     fixed   : 0xffff7dfffe7fd000 - 0xffff7dfffec00000   (  4108 K                                          B)
[    0.000000]     PCI I/O : 0xffff7dfffee00000 - 0xffff7dffffe00000   (    16 M                                          B)
[    0.000000]     vmemmap : 0xffff7e0000000000 - 0xffff800000000000   (  2048 G                                          B maximum)
[    0.000000]               0xffff7e0000040000 - 0xffff7e0001e00000   (    29 M                                          B actual)
[    0.000000]     memory  : 0xffff800001000000 - 0xffff800078000000   (  1904 M                                          B)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 64.
[    0.000000]  RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=4.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=4
[    0.000000] NR_IRQS:64 nr_irqs:64 0
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] arm_arch_timer: Architected cp15 timer(s) running at 24.00MHz (ph                                          ys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles:                                           0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000002] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 43980                                          46511097ns
[    0.000240] Console: colour dummy device 80x25
[    0.000278] Calibrating delay loop (skipped), value calculated using timer fr                                          equency.. 48.00 BogoMIPS (lpj=96000)
[    0.000285] pid_max: default: 32768 minimum: 301
[    0.000337] Security Framework initialized
[    0.000651] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.001838] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.002375] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.002387] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.016015] ASID allocator initialised with 65536 entries
[    0.036415] EFI services will not be available.
[    0.052043] smp: Bringing up secondary CPUs ...
[    0.084713] Detected VIPT I-cache on CPU1
[    0.084750] CPU1: Booted secondary processor [410fd034]
[    0.116733] Detected VIPT I-cache on CPU2
[    0.116751] CPU2: Booted secondary processor [410fd034]
[    0.148774] Detected VIPT I-cache on CPU3
[    0.148790] CPU3: Booted secondary processor [410fd034]
[    0.148822] smp: Brought up 1 node, 4 CPUs
[    0.148835] SMP: Total of 4 processors activated.
[    0.148839] CPU features: detected feature: 32-bit EL0 Support
[    0.148872] CPU: All CPU(s) started at EL2
[    0.148885] alternatives: patching kernel code
[    0.149349] devtmpfs: initialized
[    0.151282] DMI not present or invalid.
[    0.151403] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, ma                                          x_idle_ns: 7645041785100000 ns
[    0.151438] futex hash table entries: 1024 (order: 5, 131072 bytes)
[    0.151817] pinctrl core: initialized pinctrl subsystem
[    0.152740] NET: Registered protocol family 16
[    0.156813] cpuidle: using governor menu
[    0.157142] vdso: 2 pages (1 code @ ffff000008957000, 1 data @ ffff000008e650                                          00)
[    0.157154] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.161330] DMA: preallocated 256 KiB pool for atomic allocations
[    0.161581] Serial: AMBA PL011 UART driver
[    0.170334] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[    0.170941] ACPI: Interpreter disabled.
[    0.171811] vgaarb: loaded
[    0.171977] SCSI subsystem initialized
[    0.172253] usbcore: registered new interface driver usbfs
[    0.172285] usbcore: registered new interface driver hub
[    0.172329] usbcore: registered new device driver usb
[    0.172616] pps_core: LinuxPPS API ver. 1 registered
[    0.172620] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giome                                          tti <giometti@linux.it>
[    0.172636] PTP clock support registered
[    0.172721] dmi: Firmware registration failed.
[    0.172963] Advanced Linux Sound Architecture Driver Initialized.
[    0.173477] clocksource: Switched to clocksource arch_sys_counter
[    0.173578] VFS: Disk quotas dquot_6.6.0
[    0.173621] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.173761] pnp: PnP ACPI: disabled
[    0.177703] NET: Registered protocol family 2
[    0.178109] TCP established hash table entries: 16384 (order: 5, 131072 bytes                                          )
[    0.178229] TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
[    0.178414] TCP: Hash tables configured (established 16384 bind 16384)
[    0.178512] UDP hash table entries: 1024 (order: 3, 32768 bytes)
[    0.178551] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
[    0.178665] NET: Registered protocol family 1
[    0.178890] RPC: Registered named UNIX socket transport module.
[    0.178895] RPC: Registered udp transport module.
[    0.178898] RPC: Registered tcp transport module.
[    0.178901] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.179391] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counte                                          rs available
[    0.179533] kvm [1]: 8-bit VMID
[    0.179537] kvm [1]: IDMAP page: 193c000
[    0.179540] kvm [1]: HYP VA range: 800000000000:ffffffffffff
[    0.180105] kvm [1]: Hyp mode initialized successfully
[    0.180132] kvm [1]: vgic-v2@c4304000
[    0.180181] kvm [1]: vgic interrupt IRQ1
[    0.180190] kvm [1]: virtual timer IRQ4
[    0.180910] audit: initializing netlink subsys (disabled)
[    0.181200] workingset: timestamp_bits=44 max_order=19 bucket_order=0
[    0.185824] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.186248] NFS: Registering the id_resolver key type
[    0.186273] Key type id_resolver registered
[    0.186277] Key type id_legacy registered
[    0.186286] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.186406] 9p: Installing v9fs 9p2000 file system support
[    0.187864] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 2                                          47)
[    0.187937] io scheduler noop registered
[    0.188033] io scheduler cfq registered (default)
[    0.188037] io scheduler mq-deadline registered
[    0.193885] xenfs: not registering filesystem on non-xen platform
[    0.196044] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.197166] SuperH (H)SCI(F) driver initialized
[    0.197411] c81004c0.serial: ttyAML0 at MMIO 0xc81004c0 (irq = 11, base_baud                                           = 1500000) is a meson_uart
[    1.010104] console [ttyAML0] enabled
[    1.014087] msm_serial: driver initialized
[    1.022496] loop: module loaded
[    1.022938] hisi_sas: driver version v1.6
[    1.026590] libphy: Fixed MDIO Bus: probed
[    1.029123] tun: Universal TUN/TAP device driver, 1.6
[    1.034563] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[    1.039681] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[    1.045589] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k
[    1.052438] igb: Copyright (c) 2007-2014 Intel Corporation.
[    1.057989] igbvf: Intel(R) Gigabit Virtual Function Network Driver - version                                           2.4.0-k
[    1.065721] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
[    1.071609] sky2: driver version 1.30
[    1.075557] VFIO - User Level meta-driver version: 0.3
[    1.081084] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.086775] ehci-pci: EHCI PCI platform driver
[    1.091197] ehci-platform: EHCI generic platform driver
[    1.096416] ehci-exynos: EHCI EXYNOS driver
[    1.100532] ehci-msm: Qualcomm On-Chip EHCI Host Controller
[    1.106044] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.112135] ohci-pci: OHCI PCI platform driver
[    1.116549] ohci-platform: OHCI generic platform driver
[    1.121748] ohci-exynos: OHCI EXYNOS driver
[    1.126103] usbcore: registered new interface driver usb-storage
[    1.132790] i2c /dev entries driver
[    1.137100] sdhci: Secure Digital Host Controller Interface driver
[    1.141372] sdhci: Copyright(c) Pierre Ossman
[    1.145866] Synopsys Designware Multimedia Card Interface Driver
[    1.152278] meson-gx-mmc d0074000.mmc: allocated mmc-pwrseq
[    1.197785] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.198746] ledtrig-cpu: registered to indicate activity on CPUs
[    1.207356] meson-sm: secure-monitor enabled
[    1.208424] usbcore: registered new interface driver usbhid
[    1.213640] usbhid: USB HID core driver
[    1.217596] platform-mhu c883c404.mailbox: Platform MHU Mailbox registered
[    1.225595] Initializing XFRM netlink socket
[    1.228481] NET: Registered protocol family 17
[    1.232920] 9pnet: Installing 9P2000 support
[    1.237139] Key type dns_resolver registered
[    1.241770] registered taskstats version 1
[    1.250296] dwc2 c9000000.usb: c9000000.usb supply vusb_d not found, using du                                          mmy regulator
[    1.253457] dwc2 c9000000.usb: c9000000.usb supply vusb_a not found, using du                                          mmy regulator
[    1.593493] dwc2 c9000000.usb: dwc2_check_param_tx_fifo_sizes: Invalid parameter g-tx-fifo-size, setting to default average
[    1.598945] dwc2 c9000000.usb: dwc2_check_param_tx_fifo_sizes: Invalid parameter g_tx_fifo_size[1]=0
[    1.608000] dwc2 c9000000.usb: dwc2_check_param_tx_fifo_sizes: Invalid parameter g_tx_fifo_size[2]=0
[    1.617055] dwc2 c9000000.usb: dwc2_check_param_tx_fifo_sizes: Invalid parameter g_tx_fifo_size[3]=0
[    1.626111] dwc2 c9000000.usb: dwc2_check_param_tx_fifo_sizes: Invalid parameter g_tx_fifo_size[4]=0
[    1.635167] dwc2 c9000000.usb: dwc2_check_param_tx_fifo_sizes: Invalid parameter g_tx_fifo_size[5]=0
[    1.644230] dwc2 c9000000.usb: EPs: 7, dedicated fifos, 1984 entries in SPRAM
[    1.651631] dwc2 c9000000.usb: DWC OTG Controller
[    1.655971] dwc2 c9000000.usb: new USB bus registered, assigned bus number 1
[    1.662956] dwc2 c9000000.usb: irq 20, io mem 0xc9000000
[    1.668554] hub 1-0:1.0: USB hub found
[    1.671926] hub 1-0:1.0: 1 port detected
[    1.676542] dwc2 c9100000.usb: c9100000.usb supply vusb_d not found, using dummy regulator
[    1.684019] dwc2 c9100000.usb: c9100000.usb supply vusb_a not found, using dummy regulator
[    1.809575] dwc2 c9100000.usb: DWC OTG Controller
[    1.809609] dwc2 c9100000.usb: new USB bus registered, assigned bus number 2
[    1.815644] dwc2 c9100000.usb: irq 21, io mem 0xc9100000
[    1.821296] hub 2-0:1.0: USB hub found
[    1.824613] hub 2-0:1.0: 1 port detected
[    1.828583] hub: probe of 2-0:1.0 failed with error -2
[    1.834499] meson-gx-mmc d0072000.mmc: Got CD GPIO
[    1.879282] scpi_protocol scpi: SCP Protocol 0.0 Firmware 0.0.0 version
[    1.886489] hctosys: unable to open rtc device (rtc0)
[    1.886617] VCC1V8: disabling
[    1.888832] VCC3V3: disabling
[    1.891776] ALSA device list:
[    1.894706]   No soundcards found.
[    1.903720] Waiting for root device UUID=e139ce78-9841-40fe-8823-96a304a09859...
[    2.165162] mmc1: new high speed SDXC card at address 59b4
[    2.165486] mmcblk1: mmc1:59b4 00000 59.7 GiB
[    2.170890]  mmcblk1: p1 p2



So... it hangs. What's wrong? Configuration in previous post.

edit: found one error by myself: The root device has another UUID. So change root in bootargs/boot.ini to "root=/dev/mmcblk1p2" and it boots.
Still doesn't have ethernet, but I'll search for this tomorrow.
So far: 4.11rc5 is booting up!
Code: Select all
[  OK  ] Started Login Service.
[FAILED] Failed to start Raise network interfaces.
See 'systemctl status networking.service' for details.
[  OK  ] Reached target Network.
         Starting OpenBSD Secure Shell server...
         Starting /etc/rc.local Compatibility...
[  OK  ] Started /etc/rc.local Compatibility.
[  OK  ] Started Getty on tty1.
[  OK  ] Started Serial Getty on ttyAML0.
[  OK  ] Reached target Login Prompts.
[  OK  ] Started OpenBSD Secure Shell server.
[  OK  ] Reached target Multi-User System.
[  OK  ] Reached target Graphical Interface.
[  OK  ] Started Stop ureadahead data collection 45s after completed startup.
         Starting Update UTMP about System Runlevel Changes...
[  OK  ] Started Update UTMP about System Runlevel Changes.

Ubuntu 16.04.2 LTS odroid64 ttyAML0

odroid64 login:
listenmitglied
 
Posts: 4
Joined: Tue Feb 28, 2017 10:26 pm
languages_spoken: german
ODROIDs: 4 x C2

Re: Odroid C2 mainline kernel support

Unread postby FoxBob79 » Sat Apr 22, 2017 5:47 am

I switched from my pc to the server cause he is running Ubuntu 16.04.2. After setting up as written in the README.md the build works!! :-) But now I get this error:

Code: Select all
foxbob@HP-SERVER:~/amlogic-bsp/build$ wic create ../poky/scripts/lib/wic/canned-wks/sdimage-bootpart.wks -e amlogic-image-headless-sd
Checking basic build environment...
Done.

Creating image(s)...

Error: No boot files defined, IMAGE_BOOT_FILES unset


Till now I havent probe the new error...

PS: I use this repo: https://github.com/superna9999/meta-meson/tree/krogoth-next
User avatar
FoxBob79
 
Posts: 17
Joined: Thu Apr 28, 2016 4:37 am
languages_spoken: german, english
ODROIDs: odroidC2

Re: Odroid C2 mainline kernel support

Unread postby zeta » Sat Apr 22, 2017 6:41 am

FoxBob79 wrote:But now I get this error:
Code: Select all
foxbob@HP-SERVER:~/amlogic-bsp/build$ wic create ../poky/scripts/lib/wic/canned-wks/sdimage-bootpart.wks -e amlogic-image-headless-sd
Checking basic build environment...
Done.

Creating image(s)...

Error: No boot files defined, IMAGE_BOOT_FILES unset
It looks like we are working at the same pace, I am a the same step as you ;)
I only discovered the command 'wic' in your post, all the yocto I used so far (that must be only my 4th target, so not a lot) did generate some sort of image already without having to get back to this.
For exemple, the "meta-odroid" layer I am using in another build than the meta-meson we are trying here, has custom recipes to generate an sdcard image directly, as can be seen in this file : https://github.com/mecno/meta-odroid/bl ... id.bbclass

May I ask where you got the details to use this script ? Are you following a tutorial of some sort ?

Digging in the wic script, and related files (like poky/scripts/lib/wic/plugins/source/bootimg-partition.py), it appears nothing in the configuration file tells it which files it has to put in the sdimage through the "IMAGE_BOOT_FILES" variable.
You could try to configure it in your local.conf file, but I don't see where in the script it would know where the files have to be placed in the system, as if we compare to the meta-odroid exemple listed above, the are special offsets to place the bl1 and uboot files in the boot partition. I'm not sure at this point that "wic" is the correct tool to generate the sdcard for the odroid.

I will try to manually copy the kernel without changing/moving the uboot of my working sdcard and also manually put the ext4 rootfs, to see if that would work, first, and I'll get back to this full sdcard image generation after.
zeta
 
Posts: 6
Joined: Fri Apr 21, 2017 7:04 am
languages_spoken: english, french
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby FoxBob79 » Sat Apr 22, 2017 7:00 am

May I ask where you got the details to use this script ? Are you following a tutorial of some sort ?


I am using this repo: https://github.com/superna9999/meta-meson/tree/krogoth-next

and the README.md in it: https://github.com/superna9999/meta-meson/blob/krogoth-next/README.md
User avatar
FoxBob79
 
Posts: 17
Joined: Thu Apr 28, 2016 4:37 am
languages_spoken: german, english
ODROIDs: odroidC2

Re: Odroid C2 mainline kernel support

Unread postby zeta » Sat Apr 22, 2017 7:40 am

FoxBob79 wrote:
May I ask where you got the details to use this script ? Are you following a tutorial of some sort ?


I am using this repo: https://github.com/superna9999/meta-meson/tree/krogoth-next

and the README.md in it: https://github.com/superna9999/meta-meson/blob/krogoth-next/README.md
Ok, I see. I overlooked the "-next" in the branch name in your previous message. I am on the simple "krogoth" branch.
It's getting late, I will continue tomorrow. Trying to copy the files in place in a working sdcard didn't work for this first try, as one had uImage kind of kernel, and the other Image (which are not detected as the same kind of file by the "file" command, so I have to get some correct configuration in u-boot before switching format I think).
zeta
 
Posts: 6
Joined: Fri Apr 21, 2017 7:04 am
languages_spoken: english, french
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby brad » Sat Apr 22, 2017 8:50 am

I think the bootloader & uboot part (and wic) still has some trouble. Ive been using standard hardkernel image (for the bootloader and uboot) and manually installing uImage, dtb, boot.ini and rootfs ext4 partition onto it for the moment.

To enable hardkernel uboot to work Neil provided to following link from LibreELEC build... https://github.com/superna9999/LibreELE ... r/boot.ini

I needed to remove the line
Code: Select all
setenv libreelec "quiet"


And add in an extra boot parameter

For emmc..
root=/dev/mmcblk0p2
For sd...
root=/dev/mmcblk1p2

I added this to the Boot Specific Stuff area like this (some of the other parameters are unneeded for our purposes here

Code: Select all
setenv bootrootfs "boot=/dev/mmcblk1p1 disk=/dev/mmcblk1p2 root=/dev/mmcblk0p2"


Ive just completed another build overnight this time in the cloud where I can host

Some checking now this morning and looking into testing / making the bootloader / uboot build work as well, then I will try to post some links for working images, rpm repo and try to make yum package manager work with it all.

Neil mentioned he will push krogoth-next soon with some fixes to stable, you can see some discussions in the issues area of the git repo.

cheers,
Brad.
brad
 
Posts: 552
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby Flole » Sun Apr 23, 2017 8:40 am

brad wrote:Ive just completed another build overnight this time in the cloud where I can host

Some checking now this morning and looking into testing / making the bootloader / uboot build work as well, then I will try to post some links for working images, rpm repo and try to make yum package manager work with it all.


Does your build include NFS Root and Kernel IP Autoconfig support? That would be absolutely great and hopefully finally make this piece of hardware useful.

My test builds had somehow issues with the system time, it was going completely crazy, sometimes too fast, sometimes too slow which makes it useless for my setup. Also when running htop it's not updating the screen (at least over ssh), I hope your build doesn't have these issues, I'll be glad to check it out once its ready. Also I should be able to just replace my kernel and then use the Ubuntu filesystem I already have, right?
Flole
 
Posts: 11
Joined: Thu Apr 13, 2017 10:14 pm
languages_spoken: english, german
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby brad » Sun Apr 23, 2017 10:56 am

Ive added a new thread with link to a guide for installing the OpenEmbedded build I have produced for some testing and feedback..

viewtopic.php?f=138&t=26783

Downloads included in the guide
brad
 
Posts: 552
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby brad » Sun Apr 23, 2017 11:35 am

Flole wrote:Does your build include NFS Root and Kernel IP Autoconfig support? That would be absolutely great and hopefully finally make this piece of hardware useful.


Edit: I was wrong it does by default :)

In regards to system clock I haven't noticed any issues, and top works fine for me havent used htop but the ncurses support is there for it.
brad
 
Posts: 552
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby OpenProgger » Sat Apr 29, 2017 3:07 am

I tried to boot a mainline kernel from linux-next with the recent merged HDMI patches(and a HDMI patch for the C2 dts)
but after loading the dw_hdmi module the kernel hangs, as built-in driver the kernel hangs after uboot loads the kernel
Is it possible that HDMI on C2 only works with the hardkernel uboot or am i missed something?

Apart from that USB,MMC and ethernet works quite well on current mainline git sources
OpenProgger
 
Posts: 7
Joined: Sat Apr 29, 2017 2:58 am
languages_spoken: english,german
ODROIDs: Odroid C2

Re: Odroid C2 mainline kernel support

Unread postby brad » Sat Apr 29, 2017 10:47 am

OpenProgger wrote:I tried to boot a mainline kernel from linux-next with the recent merged HDMI patches(and a HDMI patch for the C2 dts)
but after loading the dw_hdmi module the kernel hangs, as built-in driver the kernel hangs after uboot loads the kernel
Is it possible that HDMI on C2 only works with the hardkernel uboot or am i missed something?

Apart from that USB,MMC and ethernet works quite well on current mainline git sources


When you say the kernel hangs is the blue light flashing on the odroid? It may be an issue with defining the serial console in the kernel boot parameters.

Do you see any kernel console output on the serial or the HDMI and what are the kernel boot parameters you are passing?
brad
 
Posts: 552
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby OpenProgger » Sat Apr 29, 2017 6:22 pm

Sadly i have no UART kit to check the serial console output. HDMI output is always without signal.
I use no Boot parameters because my initramfs is mounting rootfs. Beside that no other parameters are used.
If i enable built-in HDMI the blue led only blinks once(kernel Boot) and then it Lichts permanent blue(kernel hang). As module it blinks until the HDMI module is loading.
In mainline uboot the led is currently diabled.
If i have time i could try to Boot with hk uboot.
OpenProgger
 
Posts: 7
Joined: Sat Apr 29, 2017 2:58 am
languages_spoken: english,german
ODROIDs: Odroid C2

Re: Odroid C2 mainline kernel support

Unread postby brad » Sat Apr 29, 2017 6:41 pm

You might like to try setting your console boot parameter to "console=tty0" for HDMI to see if any messages are displayed
brad
 
Posts: 552
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

Re: Odroid C2 mainline kernel support

Unread postby OpenProgger » Sat Apr 29, 2017 8:59 pm

brad wrote:You might like to try setting your console boot parameter to "console=tty0" for HDMI to see if any messages are displayed

Changes nothing, there is not even a HDMI signal, the dw_hdmi module fails before it even create a signal.
Possible that the hk uboot does some HDMI initialization that the kernel need to display something. Similar to sunxi(Alwinner) devices where a current uboot was required to use the simplefb driver
OpenProgger
 
Posts: 7
Joined: Sat Apr 29, 2017 2:58 am
languages_spoken: english,german
ODROIDs: Odroid C2

Re: Odroid C2 mainline kernel support

Unread postby brad » Sun Apr 30, 2017 11:30 am

OpenProgger wrote:
brad wrote:You might like to try setting your console boot parameter to "console=tty0" for HDMI to see if any messages are displayed

Changes nothing, there is not even a HDMI signal, the dw_hdmi module fails before it even create a signal.
Possible that the hk uboot does some HDMI initialization that the kernel need to display something. Similar to sunxi(Alwinner) devices where a current uboot was required to use the simplefb driver


I will try the linux next version shortly

I have been using a version of 4.10.10 stable (https://git.kernel.org/pub/scm/linux/ke ... 91cda99e4e) with these patches applied .

https://github.com/superna9999/meta-mes ... son64-4.10

Additionally for the mali driver kernel side (dont think there are userspace drivers), this this git https://github.com/superna9999/meson_gx_mali_450

and patches to incorporate to kernel 4.10.10 here..

https://github.com/superna9999/meson_gx ... linux-4.10
brad
 
Posts: 552
Joined: Tue Mar 29, 2016 1:22 pm
Location: Australia
languages_spoken: english
ODROIDs: C2

PreviousNext

Return to General Chat

Who is online

Users browsing this forum: No registered users and 2 guests