Running Mainline Linux Kernel on U3

Moderators: odroid, mdrjr

Re: Running Mainline Linux Kernel on U3

Unread postby Panzerknacker » Wed May 06, 2015 10:00 pm

gulp wrote:i've installed the updated u-boot on this new sd card (seen as /dev/sdb on a U3 running ubuntu) with
Code: Select all
dd if=u-boot-dtb.bin of=/dev/sdb seek=62
sync


After a reboot with this SD, the U3 dosn't boot (the blue light is completely off).
unfortunately i don't have a usb serial cable to see what happens, i'm doing something wrong?

Hi Gulp,

I have not used an SD, but I read somewhere the offset of u-boot on SD is 63 vice 62 on eMMC.
Without serial debug cable your work seems to be impossible.
User avatar
Panzerknacker
 
Posts: 237
Joined: Sat Feb 22, 2014 10:08 pm
languages_spoken: German, English
ODROIDs: U3, X, XU, XU3, XU4, W

Re: Running Mainline Linux Kernel on U3

Unread postby gulp » Wed May 06, 2015 10:05 pm

Panzerknacker wrote:
gulp wrote:i've installed the updated u-boot on this new sd card (seen as /dev/sdb on a U3 running ubuntu) with
Code: Select all
dd if=u-boot-dtb.bin of=/dev/sdb seek=62
sync


After a reboot with this SD, the U3 dosn't boot (the blue light is completely off).
unfortunately i don't have a usb serial cable to see what happens, i'm doing something wrong?

Hi Gulp,

I have not used an SD, but I read somewhere the offset of u-boot on SD is 63 vice 62 on eMMC.
Without serial debug cable your work seems to be impossible.


Thank you, this evening i'll try again with seek=63 ;)
gulp
 
Posts: 18
Joined: Mon Apr 14, 2014 4:58 am
languages_spoken: Italian,english
ODROIDs: Odroid U3

Re: Running Mainline Linux Kernel on U3

Unread postby LiquidAcid » Wed May 06, 2015 10:43 pm

Panzerknacker wrote:I have not used an SD, but I read somewhere the offset of u-boot on SD is 63 vice 62 on eMMC.
Without serial debug cable your work seems to be impossible.

The various offsets are documented in the u-boot readme.
LiquidAcid
 
Posts: 1056
Joined: Fri Oct 11, 2013 11:07 pm
languages_spoken: english
ODROIDs: X2

Re: Running Mainline Linux Kernel on U3

Unread postby gulp » Thu May 07, 2015 7:00 am

ok, now with
Code: Select all
dd if=u-boot-dtb.bin of=/dev/sdb seek=63
sync

the sd boot kernel 3.19 :)
but, if i try to boot with root filesystem on my hdd, the kernel use always the root partition on SD, ignoring boot.src config.

this is my boot.src to boot from hdd (it works ok on stock kernel and uboot)
Code: Select all
hddboot
setenv initrd_high "0xffffffff"
setenv fdt_high "0xffffffff"
setenv bootcmd "fatload mmc 0:1 0x40008000 zImage; fatload mmc 0:1 0x42000000 uInitrd; bootm 0x40008000 0x42000000"
setenv bootargs "console=tty1 console=ttySAC1,115200n8 root=UUID=04a6125c-95f3-45ec-ab35-2421095aa033 rootwait ro  mem=2047M"
boot


tried also with root=/dev/sda1 but with no luck :roll:
gulp
 
Posts: 18
Joined: Mon Apr 14, 2014 4:58 am
languages_spoken: Italian,english
ODROIDs: Odroid U3

Re: Running Mainline Linux Kernel on U3

Unread postby Panzerknacker » Thu May 07, 2015 4:46 pm

I think you have to set the right u-boot environment.
So first get you the serial debug cable.
Then you might want to read the docs that LiquidAcid pointed us to.
User avatar
Panzerknacker
 
Posts: 237
Joined: Sat Feb 22, 2014 10:08 pm
languages_spoken: German, English
ODROIDs: U3, X, XU, XU3, XU4, W

Re: Running Mainline Linux Kernel on U3

Unread postby LiquidAcid » Thu May 07, 2015 8:54 pm

Also it might be worth pointing out that you can still manipulate the u-boot environment from userspace with the fw_{print,set}env utilities.
LiquidAcid
 
Posts: 1056
Joined: Fri Oct 11, 2013 11:07 pm
languages_spoken: english
ODROIDs: X2

Re: Running Mainline Linux Kernel on U3

Unread postby marijus » Sat Jun 06, 2015 2:21 am

Hello!
I am trying to build mainline linux-4.1-rc6 (also tried with stable 4.0.4) on my archlinuxarm setup.
The kernel boots fine from emmc but i am running into two major problems:

1.) the usb keyboard sometime works sometimes not after boot (seems to be a race condition somewhere)
2.) ethernet will not be recognised (this is my main problem)

uboot version is: 2015.01

how i build the kernel:

make exynos_defconfig
make menuconfig ( i need to enable some modules to make the the usb keyboard work)
make -j5 zImage modules dtbs
make modules_install

cat arch/arm/boot/zImage arch/arm/boot/dts/exynos4412-odroidu3.dtb > zImage_dtb

Than i copy zImage_dtb to /boot and rename it to zImage,

Any help is appreceated!
marijus
 
Posts: 1
Joined: Sat Jun 06, 2015 2:06 am
languages_spoken: english

Re: Running Mainline Linux Kernel on U3

Unread postby egan-ru » Sun Sep 13, 2015 5:02 am

today i run gentoo system on odroid u2.
uboot 2015.01
Tobias Jakobi's kernel (4.1.5)
custom config only for exynos4412 support
stage 3
running without initramfs
gcc4.9.3
ethernet and usb-keyboard work well
egan-ru
 
Posts: 3
Joined: Sun Sep 13, 2015 4:52 am
languages_spoken: english, russian
ODROIDs: odroid u2

Re: Running Mainline Linux Kernel on U3

Unread postby hugolp » Wed Jan 06, 2016 8:06 am

How usable are these kernels? I want to try Docker in my U3 but I need a more modern kernel to do so. I use my U3 as a headless server, so I do not care for X or any other graphic library and only use one USB.
hugolp
 
Posts: 84
Joined: Thu Mar 14, 2013 2:55 pm
languages_spoken: english, catalan, spanish
ODROIDs: U2, C2

Re: Running Mainline Linux Kernel on U3

Unread postby Panzerknacker » Wed Jan 06, 2016 2:30 pm

https://github.com/tobiasjakobi/linux-o ... roid-4.3.y
is running on an U3 here now for 60 days.

You can even give mainline 4.4 a try now.
Even X/HDMI is working just without Mali.
User avatar
Panzerknacker
 
Posts: 237
Joined: Sat Feb 22, 2014 10:08 pm
languages_spoken: German, English
ODROIDs: U3, X, XU, XU3, XU4, W

Re: Running Mainline Linux Kernel on U3

Unread postby hugolp » Fri Jan 08, 2016 5:43 am

Panzerknacker wrote:https://github.com/tobiasjakobi/linux-odroid/tree/odroid-4.3.y
is running on an U3 here now for 60 days.

You can even give mainline 4.4 a try now.
Even X/HDMI is working just without Mali.


The link is not working.
hugolp
 
Posts: 84
Joined: Thu Mar 14, 2013 2:55 pm
languages_spoken: english, catalan, spanish
ODROIDs: U2, C2

Re: Running Mainline Linux Kernel on U3

Unread postby Panzerknacker » Fri Jan 08, 2016 6:14 am

One day too late, try mainline.
User avatar
Panzerknacker
 
Posts: 237
Joined: Sat Feb 22, 2014 10:08 pm
languages_spoken: German, English
ODROIDs: U3, X, XU, XU3, XU4, W

Re: Running Mainline Linux Kernel on U3

Unread postby neagix » Sat Mar 26, 2016 7:00 pm

Panzerknacker wrote:One day too late, try mainline.

Hasn't the repository been renamed? I see this one there now:

https://github.com/tobiasjakobi/linux-odroid-public

Which has 3 4.x branches
neagix
 
Posts: 264
Joined: Sun Apr 14, 2013 2:54 am
languages_spoken: english
ODROIDs: U2

Re: Running Mainline Linux Kernel on U3

Unread postby neagix » Sat Mar 26, 2016 7:07 pm

Panzerknacker wrote:https://github.com/tobiasjakobi/linux-odroid/tree/odroid-4.3.y
is running on an U3 here now for 60 days.

You can even give mainline 4.4 a try now.
Even X/HDMI is working just without Mali.


Interesting discussion thread here! These days I am back around hacking with one of my U2s, which I assume it will run same kernel as U3s do.
My end goal would be to run a modern 4.x kernel (instead of the current 3.8.y); seems like you have already achieved this.

Is there any chance we will get the Mali binaries for accelerated graphics support on a 4.x kernel? (I guess not).

So, to recap, in order to use mainline 4.x (using LiquidAcid's repos) I would have to:

I am not using accelerated graphics with this U2 at the moment, so I guess it should work.
neagix
 
Posts: 264
Joined: Sun Apr 14, 2013 2:54 am
languages_spoken: english
ODROIDs: U2

Re: Running Mainline Linux Kernel on U3

Unread postby LiquidAcid » Sun Mar 27, 2016 1:47 am

neagix wrote:Interesting discussion thread here! These days I am back around hacking with one of my U2s, which I assume it will run same kernel as U3s do.

AFAIK the U2 and U3 differ in routing of USB and audio, both which shouldn't matter for the kernel.

neagix wrote:Is there any chance we will get the Mali binaries for accelerated graphics support on a 4.x kernel? (I guess not).

See commit 802ae3bbec8f40840233f2e901f8cf728d47cbc6 to be86fe3ce0a4d10f0b143378d457a615bab9176a in linux-odroid-public/odroid-4.4.y.

neagix wrote:I am not using accelerated graphics with this U2 at the moment, so I guess it should work.

Linux-Exynos/ODROID-X2, needs slight modification for the U2.
LiquidAcid
 
Posts: 1056
Joined: Fri Oct 11, 2013 11:07 pm
languages_spoken: english
ODROIDs: X2

Re: Running Mainline Linux Kernel on U3

Unread postby odroid » Sun Mar 27, 2016 4:23 pm

I want to clarify that the U2 and U3 are very identical and 100% software compatible.
User avatar
odroid
Site Admin
 
Posts: 22735
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Running Mainline Linux Kernel on U3

Unread postby neagix » Sun Mar 27, 2016 8:50 pm

LiquidAcid wrote:
neagix wrote:Interesting discussion thread here! These days I am back around hacking with one of my U2s, which I assume it will run same kernel as U3s do.

AFAIK the U2 and U3 differ in routing of USB and audio, both which shouldn't matter for the kernel.

odroid wrote:I want to clarify that the U2 and U3 are very identical and 100% software compatible.

Thanks for confirming

LiquidAcid wrote:
neagix wrote:Is there any chance we will get the Mali binaries for accelerated graphics support on a 4.x kernel? (I guess not).

See commit 802ae3bbec8f40840233f2e901f8cf728d47cbc6 to be86fe3ce0a4d10f0b143378d457a615bab9176a in linux-odroid-public/odroid-4.4.y.

neagix wrote:I am not using accelerated graphics with this U2 at the moment, so I guess it should work.

Linux-Exynos/ODROID-X2, needs slight modification for the U2.

Awesome! I see this project has come a long way :) Thanks for your replies and your work, will definitely try this out tomorrow (+20h)
neagix
 
Posts: 264
Joined: Sun Apr 14, 2013 2:54 am
languages_spoken: english
ODROIDs: U2

Re: Running Mainline Linux Kernel on U3

Unread postby neagix » Mon Mar 28, 2016 9:43 pm

@LiquidAcid I see in that commit range that you have merged and cleaned up ARM's driver, that's great. Can't wait to give it a try.

Not sure if it has been mentioned, but once u-boot is built one needs to copy the dtb this way:
Code: Select all
cp ./arch/arm/dts/exynos4412-odroid.dtb /mnt/realBoot/exynos4412-odroidu3.dtb


The name must be exactly exynos4412-odroidu3.dtb, at least in u-boot v2015.01 which I am currently trying.

I built 4.4.y and I am using LiquidAcid's vanilla config (I just removed the -vanilla local suffix); the u-boot process seems fine:
Code: Select all
U-Boot 2015.01 (Mar 28 2016 - 14:23:59)

CPU:    Exynos4412@1000MHz
Board: Odroid based on Exynos4412
Model: u3
I2C:   ready
DRAM:  2 GiB
Board PMIC init
MMC:   SAMSUNG SDHCI: 0, EXYNOS DWMMC: 1
*** Warning - bad CRC, using default environment

DFU alt info setting: done
Net:   No ethernet found.
Hit any key to stop autoboot:  0
reading exynos4412-odroidu3.dtb
13425 bytes read in 31 ms (422.9 KiB/s)
reading uInitrd
2418815 bytes read in 190 ms (12.1 MiB/s)
reading zImage
2518808 bytes read in 195 ms (12.3 MiB/s)
Kernel image @ 0x40007fc0 [ 0x000000 - 0x266f18 ]
## Loading init Ramdisk from Legacy Image at 42000000 ...
   Image Name:   uInitrd
   Image Type:   ARM Linux RAMDisk Image (uncompressed)
   Data Size:    2418751 Bytes = 2.3 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 40800000
   Booting using the fdt blob at 0x40800000
   Loading Ramdisk to 4fdb1000, end 4ffff83f ... OK
   Loading Device Tree to 4fdaa000, end 4fdb0470 ... OK

Starting kernel ...


Only problem is that it gets stuck at that line "Starting kernel ..." and CPU goes probably at 100% use (fan gets spinning). At this point I guess there's something wrong with the initramfs/kernel, I'll keep tinkering around it (not the first time I've seen this behavior). Once fixed this I'll probably try latest u-boot mainline.

Edit: same behavior by removing the uInitrd
Edit 2: other differences I noticed: a boot.scr which works with Hardkernel's older version of u-boot will not work with a more recent (v2015.01) u-boot, thus it will try to boot from the default partition 2 of the SD card instead of boot.scr's specified kernel command line rootfs
neagix
 
Posts: 264
Joined: Sun Apr 14, 2013 2:54 am
languages_spoken: english
ODROIDs: U2

Re: Running Mainline Linux Kernel on U3

Unread postby LiquidAcid » Tue Mar 29, 2016 8:05 am

See what u-boot already tells you. It's using the default environment, which is probably your issue here.
LiquidAcid
 
Posts: 1056
Joined: Fri Oct 11, 2013 11:07 pm
languages_spoken: english
ODROIDs: X2

Re: Running Mainline Linux Kernel on U3

Unread postby neagix » Tue Mar 29, 2016 8:30 am

LiquidAcid wrote:See what u-boot already tells you. It's using the default environment, which is probably your issue here.

The root partition issue is not a big problem; I am stuck at the "Starting kernel..." line, the u-boot output is in previous post (although there I was incorrectly using an uInitrd). What could cause the kernel to not be loaded? Normally I would think about compression methods compatibility, but I don't think that's the issue here
neagix
 
Posts: 264
Joined: Sun Apr 14, 2013 2:54 am
languages_spoken: english
ODROIDs: U2

Re: Running Mainline Linux Kernel on U3

Unread postby marlemion » Tue Mar 29, 2016 6:41 pm

Try 'bootz' instead of 'bootm' in your boot.txt/scr file.
marlemion
 
Posts: 232
Joined: Sun Mar 31, 2013 7:33 pm
languages_spoken: english
ODROIDs: Odroid U2

Re: Running Mainline Linux Kernel on U3

Unread postby LiquidAcid » Tue Mar 29, 2016 7:30 pm

neagix wrote:The root partition issue is not a big problem; I am stuck at the "Starting kernel..." line, the u-boot output is in previous post (although there I was incorrectly using an uInitrd). What could cause the kernel to not be loaded? Normally I would think about compression methods compatibility, but I don't think that's the issue here

You should supply at least the uboot env and everything it depends on, otherwise you won't get much help.
LiquidAcid
 
Posts: 1056
Joined: Fri Oct 11, 2013 11:07 pm
languages_spoken: english
ODROIDs: X2

Re: Running Mainline Linux Kernel on U3

Unread postby neagix » Thu Mar 31, 2016 3:26 am

LiquidAcid wrote:You should supply at least the uboot env and everything it depends on, otherwise you won't get much help.


My boot.scr (the part after binary data):
Code: Select all
setenv fdt_high "0xffffffff"
setenv bootcmd "fatload mmc 0:1 0x40008000 zImage; fatload mmc 0:1 0x42000000 uInitrd; bootm 0x40008000 0x42000000"
setenv bootargs "console=tty1 console=ttySAC1,115200n8 root=UUID=2cba3ad4-817b-4614-a721-f7fd9c040eca rootwait ro  mem=2047M"
boot


exynos4412-odroidu3.dtb (zipped)
kernel is built from https://github.com/tobiasjakobi/linux-o ... ecd1dbaa2e with vanilla config

Note that - as per rootfs parameter - the system would be booting from an external USB hard disk instead of a microSD partition.
I have removed uInitrd from the fat32 partition on purpose to skip it, as I think this kernel (4.4.6) does not need it; it hangs equally when using the built uInitrd.

I still get the hanging and full CPU usage:
Code: Select all
U-Boot 2015.01 (Mar 28 2016 - 14:23:59)

CPU:    Exynos4412@1000MHz
Board: Odroid based on Exynos4412
Model: u3
I2C:   ready
DRAM:  2 GiB
Board PMIC init
MMC:   SAMSUNG SDHCI: 0, EXYNOS DWMMC: 1
*** Warning - bad CRC, using default environment

DFU alt info setting: done
Net:   No ethernet found.
Hit any key to stop autoboot:  0
reading exynos4412-odroidu3.dtb
13425 bytes read in 33 ms (396.5 KiB/s)
reading uInitrd
** Unable to read file uInitrd **
reading zImage
2518808 bytes read in 197 ms (12.2 MiB/s)
Kernel image @ 0x40007fc0 [ 0x000000 - 0x266f18 ]
## Flattened Device Tree blob at 40800000
   Booting using the fdt blob at 0x40800000
   Loading Device Tree to 4fff9000, end 4ffff470 ... OK

Starting kernel ...


Shall I rebuild boot.scr without the uInitrd references? Maybe I remember incorrectly that it would not be necessary for uInitrd to be there even if specified in boot.scr?

Thanks
neagix
 
Posts: 264
Joined: Sun Apr 14, 2013 2:54 am
languages_spoken: english
ODROIDs: U2

Re: Running Mainline Linux Kernel on U3

Unread postby LiquidAcid » Thu Mar 31, 2016 4:25 am

I still don't see your u-boot env there.
LiquidAcid
 
Posts: 1056
Joined: Fri Oct 11, 2013 11:07 pm
languages_spoken: english
ODROIDs: X2

Re: Running Mainline Linux Kernel on U3

Unread postby neagix » Thu Mar 31, 2016 7:06 am

LiquidAcid wrote:I still don't see your u-boot env there.

This line:
Code: Select all
*** Warning - bad CRC, using default environment

Was pretty indicative for me of a default environment, hence I thought it was unnecessary to post it. (Unless the environment is not really default and is being read also from the first sectors of microSD/eMMC? I am quite new to u-boot internals)

Here it is:
Code: Select all
U-Boot 2015.01 (Mar 28 2016 - 14:23:59)

CPU:    Exynos4412@1000MHz
Board: Odroid based on Exynos4412
Model: u3
I2C:   ready
DRAM:  2 GiB
Board PMIC init
MMC:   SAMSUNG SDHCI: 0, EXYNOS DWMMC: 1
*** Warning - bad CRC, using default environment

DFU alt info setting: done
Net:   No ethernet found.
Hit any key to stop autoboot:  0
Odroid # env print
autoboot=if test -e mmc 0 Image.itb; then; run boot_fit;elif test -e mmc 0 zImage; then; run boot_zimg;elif test -e mmc 0 uImage; then; run boot_uimg;fi;
baudrate=115200
boardname=odroidu3
boot_fit=setenv kerneladdr 0x42000000;setenv kernelname Image.itb;run loadkernel;run kernel_args;bootm ${kerneladdr}#${boardname}
boot_uimg=setenv kerneladdr 0x40007FC0;setenv kernelname uImage;run check_dtb;run check_ramdisk;run loadkernel;run kernel_args;bootm ${kerneladdr} ${initrd_addr} ${fdt_addr};
boot_zimg=setenv kerneladdr 0x40007FC0;setenv kernelname zImage;run check_dtb;run check_ramdisk;run loadkernel;run kernel_args;bootz ${kerneladdr} ${initrd_addr} ${fdt_addr};
bootargs=Please use defined boot
bootcmd=run autoboot
bootdelay=0
check_dtb=if run loaddtb; then setenv fdt_addr ${fdtaddr};else setenv fdt_addr;fi;
check_ramdisk=if run loadinitrd; then setenv initrd_addr ${initrdaddr};else setenv initrd_addr -;fi;
console=console=ttySAC1,115200n8
consoleoff=set console console=ram; save; reset
consoleon=set console console=ttySAC1,115200n8; save; reset
dfu_alt_boot=u-boot raw 0x3f 0x800;bl1 raw 0x1 0x1e;bl2 raw 0x1f 0x1d;tzsw raw 0x83f 0x138
dfu_alt_info=u-boot raw 0x3f 0x800;bl1 raw 0x1 0x1e;bl2 raw 0x1f 0x1d;tzsw raw 0x83f 0x138;uImage fat 0 1;zImage fat 0 1;Image.itb fat 0 1;uInitrd fat 0 1;exynos4412-odroidu3.dtb fat 0 1;exynos4412-odroidx2.dtb fat 0 1;boot part 0 1;platform part 0 2
dfu_alt_system=uImage fat 0 1;zImage fat 0 1;Image.itb fat 0 1;uInitrd fat 0 1;exynos4412-odroidu3.dtb fat 0 1;exynos4412-odroidx2.dtb fat 0 1;boot part 0 1;platform part 0 2
fdtaddr=40800000
fdtfile=exynos4412-odroidu3.dtb
initrdaddr=42000000
initrdname=uInitrd
kernel_args=setenv bootargs root=/dev/mmcblk${mmcrootdev}p${mmcrootpart} rootwait ${console} ${opts}
loaddtb=fatload mmc ${mmcbootdev}:${mmcbootpart} ${fdtaddr} ${fdtfile}
loadinitrd=fatload mmc ${mmcbootdev}:${mmcbootpart} ${initrdaddr} ${initrdname}
loadkernel=fatload mmc ${mmcbootdev}:${mmcbootpart} ${kerneladdr} ${kernelname}
mmcbootdev=0
mmcbootpart=1
mmcrootdev=0
mmcrootpart=2
soc_id=4412
soc_rev=2.0

Environment size: 2138/4092 bytes


Edit: I understand the default environment may vary depending on the u-boot build. I built v2015.1 of u-boot mainline with the odroid defconfig as per OP here.
neagix
 
Posts: 264
Joined: Sun Apr 14, 2013 2:54 am
languages_spoken: english
ODROIDs: U2

Re: Running Mainline Linux Kernel on U3

Unread postby LiquidAcid » Thu Mar 31, 2016 6:38 pm

Correct, the default env depends on your u-boot version. And as you can see it's pretty complex in the sense that does a lot of branching in its script execution, hence my advice to replace it by a simpler version tailored to your system. In particular you might've already noticed that your boot script isn't even loaded by the environment, so your own bootargs never apply (including your rootfs setting).

Additionally to fixing up the env you should also enable earlyprintk support in the kernel and enable it. That should give you more information in the early initialization stage of the kernel.
LiquidAcid
 
Posts: 1056
Joined: Fri Oct 11, 2013 11:07 pm
languages_spoken: english
ODROIDs: X2

Re: Running Mainline Linux Kernel on U3

Unread postby neagix » Sun Oct 16, 2016 8:17 pm

LiquidAcid wrote:Correct, the default env depends on your u-boot version. And as you can see it's pretty complex in the sense that does a lot of branching in its script execution, hence my advice to replace it by a simpler version tailored to your system. In particular you might've already noticed that your boot script isn't even loaded by the environment, so your own bootargs never apply (including your rootfs setting).

Additionally to fixing up the env you should also enable earlyprintk support in the kernel and enable it. That should give you more information in the early initialization stage of the kernel.

I reduced it to a simple version that I copy/paste over serial interface (not all at once, can't handle it):

Code: Select all
setenv kerneladdr 0x40007FC0
setenv kernelname zImage
fdtaddr=40800000
fdtfile=exynos4412-odroidu3.dtb
mmcbootdev=0
mmcbootpart=1
setenv fdt_addr ${fdtaddr}
setenv bootargs "console=tty1 console=ttySAC1,115200n8 root=/dev/mmcblk0p2 ro  mem=2047M"
setenv initrd_addr -

fatload mmc ${mmcbootdev}:${mmcbootpart} ${fdtaddr} ${fdtfile}
fatload mmc ${mmcbootdev}:${mmcbootpart} ${kerneladdr} ${kernelname}
bootz ${kerneladdr} ${initrd_addr} ${fdt_addr}


This gets me a completely hung console after:
Code: Select all
Starting kernel ...


So now I'll try enabling early printk as you suggested; for those interested, I have spawn a separate thread for my U-boot issues: viewtopic.php?f=81&t=24123&p=163863

Edit: I enabled early printk on UART2, no luck. There is nothing displayed.

Edit 2: there is to say that now I am using U-boot master and that loads correctly boot.scr by default (my March post had no boot.scr loaded because I was using a 2015 u-boot version)
neagix
 
Posts: 264
Joined: Sun Apr 14, 2013 2:54 am
languages_spoken: english
ODROIDs: U2

Re: Running Mainline Linux Kernel on U3

Unread postby neagix » Mon Oct 17, 2016 1:00 am

marlemion wrote:Try 'bootz' instead of 'bootm' in your boot.txt/scr file.

Yeah this was an useful tip, but unfortunately the 2015 version of u-boot didn't load boot.scr for odroid devices. That is in place on u-boot master version now.
neagix
 
Posts: 264
Joined: Sun Apr 14, 2013 2:54 am
languages_spoken: english
ODROIDs: U2

Re: Running Mainline Linux Kernel on U3

Unread postby neagix » Mon Oct 17, 2016 2:39 pm

I have built several different kernel configs for https://github.com/tobiasjakobi/linux-odroid-public (4.8.y) but they all panic with:
Code: Select all
[    0.000000] Unable to handle kernel paging request at virtual address f8000000
[    0.000000] pgd = c0004000
[    0.000000] [f8000000] *pgd=00000000
[    0.000000] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 4.8.1+ #12
[    0.000000] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
[    0.000000] task: c09055c0 task.stack: c0900000
[    0.000000] PC is at s5p_init_cpu+0xc/0x38
[    0.000000] LR is at exynos_init_io+0x28/0x68
[    0.000000] pc : [<c0808028>]    lr : [<c08079ac>]    psr: a00001d3
[    0.000000] sp : c0901eb8  ip : c0901ec8  fp : c0901ec4
[    0.000000] r10: 40100000  r9 : c0824d2c  r8 : 70000000
[    0.000000] r7 : c09393e8  r6 : c090e320  r5 : efffe000  r4 : c090e178
[    0.000000] r3 : ffffffff  r2 : 00000000  r1 : 00002d28  r0 : f8000000
[    0.000000] Flags: NzCv  IRQs off  FIQs off  Mode SVC_32  ISA ARM  Segment none
[    0.000000] Control: 10c5387d  Table: 4000404a  DAC: 00000051
[    0.000000] Process swapper (pid: 0, stack limit = 0xc0900218)
[    0.000000] Stack: (0xc0901eb8 to 0xc0902000)
[    0.000000] 1ea0:                                                       c0901ed4 c0901ec8
[    0.000000] 1ec0: c08079ac c0808028 c0901f34 c0901ed8 c0806280 c0807990 00000000 c0900000
[    0.000000] 1ee0: 00040900 c090e178 c0824d2c 00800000 c0100000 00040100 ffff1000 0006ffff
[    0.000000] 1f00: 00001000 00000007 00000000 40008000 c0824d2c 00000200 000022fc c090244c
[    0.000000] 1f20: 80000200 c090e320 c0901fa4 c0901f38 c08026e4 c0805a60 0000006c 10c5387d
[    0.000000] 1f40: 00000001 00000000 c0901f6c c0901f58 c0161378 c0160c94 000022e4 000093e0
[    0.000000] 1f60: c0901f94 c0901f70 c01be084 c0161358 00000000 00000000 00000000 00000000
[    0.000000] 1f80: c09024b8 ffffffff c0902440 4000406a 00000001 00000000 c0901ff4 c0901fa8
[    0.000000] 1fa0: c0800a2c c08020d0 00000000 00000000 00000000 00000000 00000000 00000000
[    0.000000] 1fc0: 00000000 c08268c0 00000000 c0939294 c09024b8 c08268bc c09067e8 4000406a
[    0.000000] 1fe0: 413fc090 00000000 00000000 c0901ff8 40008078 c0800990 00000000 00000000
[    0.000000] Backtrace:
[    0.000000] [<c080801c>] (s5p_init_cpu) from [<c08079ac>] (exynos_init_io+0x28/0x68)
[    0.000000] [<c0807984>] (exynos_init_io) from [<c0806280>] (paging_init+0x82c/0xa44)
[    0.000000] [<c0805a54>] (paging_init) from [<c08026e4>] (setup_arch+0x620/0xac0)
[    0.000000]  r10:c090e320 r9:80000200 r8:c090244c r7:000022fc r6:00000200 r5:c0824d2c
[    0.000000]  r4:40008000
[    0.000000] [<c08020c4>] (setup_arch) from [<c0800a2c>] (start_kernel+0xa8/0x3a0)
[    0.000000]  r10:00000000 r9:00000001 r8:4000406a r7:c0902440 r6:ffffffff r5:c09024b8
[    0.000000]  r4:00000000
[    0.000000] [<c0800984>] (start_kernel) from [<40008078>] (0x40008078)
[    0.000000]  r10:00000000 r9:413fc090 r8:4000406a r7:c09067e8 r6:c08268bc r5:c09024b8
[    0.000000]  r4:c0939294
[    0.000000] Code: e89da800 e1a0c00d e92dd800 e24cb004 (e5902000)
[    0.000000] ---[ end trace f68728a0d3053b52 ]---
[    0.000000] Kernel panic - not syncing: Attempted to kill the idle task!
[    0.000000] ---[ end Kernel panic - not syncing: Attempted to kill the idle task!


I am using the DTB built by U-boot (master). Any ideas?

Edit 1: tried torvalds' v4.8, same kernel panic :?:
Edit 2: now running torvalds' v4.8 successfully! the problem was that I was using U-boot's dtb while by using the kernel (make dtbs) .dtb, everything works fine. Thanks for the help with this :)
neagix
 
Posts: 264
Joined: Sun Apr 14, 2013 2:54 am
languages_spoken: english
ODROIDs: U2

Re: Running Mainline Linux Kernel on U3

Unread postby Cypher » Sun Apr 09, 2017 4:58 am

Hello everyone,

Does anybody here use linux mainline 4.9 or anything close to it?
If so, could you please provide your /boot directory, kernel .config, and boot.scr ?

Currently I have no way of getting the console output of my U3 to debug my boot problems, but it seems the kernel is at least starting because the blue LED is "heartbeating".

Thanks a lot!
Cypher
 
Posts: 2
Joined: Tue Apr 19, 2016 1:06 am
languages_spoken: English, German
ODROIDs: U3, XU4

Previous

Return to Projects

Who is online

Users browsing this forum: No registered users and 2 guests