Boot using device tree

Hi,

I also don’t get the fdt to work with a beagle-xm as well.

u-boot:

U-Boot SPL 2012.04.01-mainline-jenkinsuser1-v2012.04.01 (Jul 01 2012 - 16:00:04)
U-Boot 2012.04.01-mainline-jenkinsuser1-v2012.04.01 (Jul 01 2012 - 16:00:04)

kernel (just the config is custom - it’s a 3.4.4. stable kernel):

root@generic-armv7a:~# cat /proc/version
Linux version 3.4.4-custom-jenkinsuser1 (jenkinsuser1@jenkins-slave-1) (gcc version 4.6.4 20120303 (prerelease) (GCC) ) #1 PREEMPT Sun Jul 1 21:02:35 EEST 2012

Note that I’m able to boot from /dev/mmcblk0p2

root@generic-armv7a:~# cat /proc/cmdline
console=ttyO2,115200n8 mpurate=auto buddy=none camera=none vram=12M omapfb.mode=dvi:640x480MR-16@60 omapdss.def_disp=dvi root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait

That’s how I try to use the fdt:

OMAP3 beagleboard.org # setenv fdtargs ‘mmc rescan 0; ext2load mmc 0:2 0x82000000 /boot/uImage; ext2load mmc 0:2 0x80000000 /boot/omap3-beagle.dtb’
OMAP3 beagleboard.org # run fdtargs
Loading file “/boot/uImage” from mmc device 0:2 (xxa2)
3239720 bytes read
Loading file “/boot/omap3-beagle.dtb” from mmc device 0:2 (xxa2)
1732 bytes read

OMAP3 beagleboard.org # setenv bootargs ‘console=ttyO2,115200n8 root=/dev/mmcblk0p2 rootdelay=2 rootfstype=ext3 rw’
OMAP3 beagleboard.org # setenv bootcmd ‘fdt addr 0x80000000; fdt resize; bootm 0x82000000 - 0x80000000’
OMAP3 beagleboard.org # boot

Booting kernel from Legacy Image at 82000000 …

Image Name: Linux-3.4.4-custom-jenkinsuser1
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3239656 Bytes = 3.1 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum … OK

Flattened Device Tree blob at 80000000

Booting using the fdt blob at 0x80000000
Loading Kernel Image … OK
OK
reserving fdt memory region: addr=80000000 size=1000
Loading Device Tree to 8fffc000, end 8fffffff … OK

Starting kernel …

Uncompressing Linux… done, booting the kernel.
Booting Linux on physical CPU 0
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Linux version 3.4.4-custom-jenkinsuser1 (jenkinsuser1@jenkins-slave-1) (gcc version 4.6.4 20120303 (prerelease) (GCC) ) #1 PREEMPT Sun Jul 1 21:02:35 EEST 2012
CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: Generic OMAP3 (Flattened Device Tree), model: TI OMAP3 BeagleBoard
Reserving 14680064 bytes SDRAM for VRAM
Memory policy: ECC disabled, Data cache writeback
OMAP3630 ES1.2 (l2cache iva sgx neon isp 192mhz_clk )
sr_init: platform driver register failed for SR
SmartReflex Class3 initialized
clock: disabling unused clocks to save power
registered taskstats version 1
omapfb omapfb: no displays
omapfb omapfb: failed to setup omapfb
omapfb: probe of omapfb failed with error -22
console [netcon0] enabled
netconsole: network logging started
twl_rtc twl_rtc: setting system clock to 2012-05-07 20:58:45 UTC (1336424325)
ALSA device list:
No soundcards found.
Waiting 2sec before mounting root device…
VFS: Cannot open root device “mmcblk0p2” or unknown-block(0,0): error -6
Please append a correct “root=” boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[] (unwind_backtrace+0x0/0xec) from [] (dump_stack+0x20/0x24)
[] (dump_stack+0x20/0x24) from [] (panic+0x88/0x1c4)
[] (panic+0x88/0x1c4) from [] (mount_block_root+0x1e0/0x224)
[] (mount_block_root+0x1e0/0x224) from [] (mount_root+0xf0/0x110)
[] (mount_root+0xf0/0x110) from [] (prepare_namespace+0x168/0x1c8)
[] (prepare_namespace+0x168/0x1c8) from [] (kernel_init+0x1c0/0x200)
[] (kernel_init+0x1c0/0x200) from [] (kernel_thread_exit+0x0/0x8)

Looks like somehow on the way we lost the capability to boot from /dev/mmcblk0p2.

Did anyhow have success with a fdt on a beagle-xm and a recent mainline kernel?

Regards,

Robert

Did you try to edit the dts file , In some kernel there is a line in the dts file which sets these boot args , usually the root is ramdisk something like root=ram/dev0 ,.Did you change it to root=/dev/mmcblkop2 ?

Hi Kartik,

Did you try to edit the dts file , In some kernel there is a line in the
dts file which sets these boot args , usually the root is ramdisk
something like root=ram/dev0 ,.Did you change it to root=/dev/mmcblkop2 ?

No I did not, since what's passed through the kernel command line should
take precedence over what's in the fdt.

BTW did you try to enable CONFIG_EARLY_PRINTK in your kernel config?
You might be able to see a it more what's going wrong where it stucks.

Regards,

Robert

..."A successful tool is one that was used to do something undreamed of
by its author." - S. C. Johnson

My public pgp key is available at:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x90320BF1

Yes I had enabled the early printk , and lot of other debug features , there were no prints

Strange.

Did you try a 3.4.4 kernel?

I observed without fdt:

...
Waiting for root device /dev/mmcblk0p2...
usb 1-2.1: new high-speed USB device number 3 using ehci-omap
mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new high speed SDHC card at address b368
mmcblk0: mmc0:b368 USD 7.46 GiB
mmcblk0: p1 p2 p3
...

with fdt:

...
Waiting 2sec before mounting root device...
VFS: Cannot open root device "mmcblk0p2" or unknown-block(0,0): error -6
...

Here is the complete log without a fdt: http://pastebin.com/24YmytTg
here with: http://pastebin.com/uwA6gt07

Regards,

Robert

..."Simplify, and add lightness" - Race car designer George Miller

My public pgp key is available at:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x90320BF1

Yes i tried several kernels and 3.4.4 was also among them , without the fdt the board boots up fine , but with fdt it stops at the part
uncompressing kernel …booting kernel part.

This message occurs when it doesn’t get the console right. I even tried connecting it to a LCD screen , yet there was no output. :frowning:
the same with 3.2.2 and some other kernel verisons.

VFS: Cannot open root device “mmcblk0p2” or unknown-block(0,0): error -6 This error I got it for panda-board.(not resolved)
I was never able to go past this message

  1. OK

  2. reserving fdt memory region: addr=80000000 size=1000

  3. Loading Device Tree to 8fffc000, end 8fffffff … OK

  4. Starting kernel …

  5. Uncompressing Linux… done, booting the kernel.

with beagle board.

Hi,

VFS: Cannot open root device "mmcblk0p2" or unknown-block(0,0): error
-6 This error I got it for panda-board.(not resolved)
I was never able to go past this message

I remember something like this as well, but rootdelay=2 fixed it.
There is also an issue with some SD cards, which are too slow, so you
can tweak the timeout in the kernel, but hey, it works without fdt.

Hmmm ... timing?

Actually the fdt version gives me 597.64 Bogomips, while the non fdt
version gives 456.86.

   1.
      OK
   2.
         reserving fdt memory region: addr=80000000 size=1000
   3.
         Loading Device Tree to 8fffc000, end 8fffffff ... OK
   4.
       
   5.
      Starting kernel ...
   6.
       
   7.
      Uncompressing Linux... done, booting the kernel.

with beagle board.

I attached the config for my beagle-xm rev C, can you see if this takes
you any further?

Regards,

Robert
..."Information hiding is very good, but students need some information
first before they can start hiding it" -- Dr. C. Ravishankar

My public pgp key is available at:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x90320BF1

custom-config-3.4.4 (68.6 KB)

Yes , I will look into it , thanks a lot for all this. I will get back to you as soon as there is some change in the status .

Hi,

Yes , I will look into it , thanks a lot for all this. I will get back
to you as soon as there is some change in the status .

No problem. Please keep me updated. I'll also let you know in case
something changes.

Regards,

Robert
..."Pointers are like jumps, leading wildly from one part of the data
structure to another. Their introduction into high-level languages has
been a step backwards from which we may never recover." - C. A. R.
Hoare, "Hints on Programming Language Design", 1973

My public pgp key is available at:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x90320BF1