* [Buildroot] booting JFFS2 or UBIFS created with buildroot
2011-02-21 21:30 ` Charles Krinke
@ 2011-02-21 21:40 ` Thomas Petazzoni
2011-02-21 21:53 ` Charles Krinke
2011-02-21 22:09 ` Thomas Petazzoni
` (2 subsequent siblings)
3 siblings, 1 reply; 13+ messages in thread
From: Thomas Petazzoni @ 2011-02-21 21:40 UTC (permalink / raw)
To: buildroot
On Mon, 21 Feb 2011 13:30:01 -0800
Charles Krinke <charles.krinke@gmail.com> wrote:
> When I boot a jffs2 image created with buildroot with its associated kernel,
> I get a kernel panic when trying to mount the jffs2 image that looks like
> this:
>
> VFS: Cannot open root device "mtdblock2" or unknown-block(2,0)
> 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(2,0)
Could you post your kernel .config ?
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 13+ messages in thread* [Buildroot] booting JFFS2 or UBIFS created with buildroot
2011-02-21 21:40 ` Thomas Petazzoni
@ 2011-02-21 21:53 ` Charles Krinke
0 siblings, 0 replies; 13+ messages in thread
From: Charles Krinke @ 2011-02-21 21:53 UTC (permalink / raw)
To: buildroot
Dear Thomas:
I am currently using the default from buildroot for the Freescale
MPC8323ERDB reference board but have included it as an attachment.
As I think about this, it may be my problem is that I am using a u-boot.bin
from OpenEmbedded. What is really happening here is that I am trying to
"wean" my group from OpenEmbedded and onto buildroot. It is probable that no
mtd support is compiled into the u-boot I currently have on my MPC8323ERDB.
So, ... I am compiling a u-boot.bin from within buildroot right now and will
attempt to tftp it onto the board. Normally I try to use my BDI for this,
but am home working today (Presidents Day) so if I fubar the incantations
for updating u-boot, I am done until I get to my office tomorrow.
Charles
On Mon, Feb 21, 2011 at 1:40 PM, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:
> On Mon, 21 Feb 2011 13:30:01 -0800
> Charles Krinke <charles.krinke@gmail.com> wrote:
>
> > When I boot a jffs2 image created with buildroot with its associated
> kernel,
> > I get a kernel panic when trying to mount the jffs2 image that looks like
> > this:
> >
> > VFS: Cannot open root device "mtdblock2" or unknown-block(2,0)
> > 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(2,0)
>
> Could you post your kernel .config ?
>
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
--
Charles Krinke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20110221/4a3c3e9d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dotconfig
Type: application/octet-stream
Size: 45888 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20110221/4a3c3e9d/attachment-0001.obj>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] booting JFFS2 or UBIFS created with buildroot
2011-02-21 21:30 ` Charles Krinke
2011-02-21 21:40 ` Thomas Petazzoni
@ 2011-02-21 22:09 ` Thomas Petazzoni
2011-02-21 22:29 ` Charles Krinke
2011-02-21 23:29 ` ANDY KENNEDY
2011-02-22 8:08 ` Guillaume Gardet
3 siblings, 1 reply; 13+ messages in thread
From: Thomas Petazzoni @ 2011-02-21 22:09 UTC (permalink / raw)
To: buildroot
Hello,
On Mon, 21 Feb 2011 13:30:01 -0800
Charles Krinke <charles.krinke@gmail.com> wrote:
> bootcmd=bootm 0xfe120000 - 0xfe080000
> bootargs=root=/dev/mtdblock2 rootfstype=jffs2
> mtdparts=nor:1152k(U-Boot),2176k(kernel),-(JFFS2) rw console=ttyS0,115200
>
> As I recall, this was working the last time I did it 5 years ago, but again,
> I probably have forgotten a few details or there are some config options not
> yet turned on. I am working with buildroot defaults so far.
Your kernel configuration looks ok. Please give some details:
*) How do you flash your JFFS2 filesystem (exact commands)
*) The full kernel boot log
Regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] booting JFFS2 or UBIFS created with buildroot
2011-02-21 22:09 ` Thomas Petazzoni
@ 2011-02-21 22:29 ` Charles Krinke
2011-02-21 22:42 ` Thomas Petazzoni
0 siblings, 1 reply; 13+ messages in thread
From: Charles Krinke @ 2011-02-21 22:29 UTC (permalink / raw)
To: buildroot
Dear Thomas:
First of all, I appreciate greatly the time you are taking to discuss this
issue. Thank you very much.
My flash layout is:
0xFE340000 to top of flash rootfs.jffs2 programmed here
0xFE120000 uImage here
0xFE080000 deviceTree here (1 sector)
0xFE000000 u-boot here
Now with that said, here are my recipes assuming I counted the number of
128k sectors properly for the offset to get to JFFS2 in the bootargs line.
uImage
=>protect off all
=>erase 0xFE120000 0xFE33FFFF
=>tftp 0x8000000 192.168.1.67:/tftpboot/u-Image-br0220 (built in buildroot
yesterday with all defaults)
=>cp.b 0x800000 0xFE120000 <sizeInHex>
rootfs.jffs2
=>protect off all
=>erase 0xFE340000 0xFEFFFFFF
=>tftp 0x8000000 192.168.1.67:/tftpboot/rootfs.jffs2-br0220 (built in
buildroot yesterday with all defaults)
=>cp.b 0x800000 0xFE340000 <sizeInHex>
DeviceTree previously built in OpenEmbedded and it works so I did not update
it this weekend
U-boot: Built a new u-boot.bin just now from buildroot-2010.11 with all
defaults and using the board name "MPC3232ERDB". Flashing it onto the board
with:
=>protect off all
=>erase 0xFE000000 0xFE03FFFF (two 128K sectors at the bottom of flash for
u-boot.bin)
=>tftp 0x8000000 192.168.1.67:/tftpboot/u-boot.bin-br0221 (built just now in
buildroot)
=>cp.b 0x800000 0xFE000000 0x37834 (downloaded u-boot.bin size of 227,830d
bytes)
=> reset
=>setenv ipaddr (and serverip, netmask)
=>setenv bootcmd bootm 0xFE120000 - 0xFE080000
=>setenv bootargs root=/dev/mtdblock2 rootfstype=jffs2
mtdparts=nor:1152k(U-Boot),2176k(kernel),-(JFFS2) rw console=ttyS0,115200
=>saveenv
Here is the boot of the kernel from the serial port
## Booting kernel from Legacy Image at fe120000 ...
Image Name: Linux-2.6.36.1
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 2018472 Bytes = 1.9 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at fe080000
Booting using the fdt blob at 0xfe080000
Uncompressing Kernel Image ... OK
Loading Device Tree to 007fa000, end 007fffff ... OK
Using MPC832x RDB machine description
Linux version 2.6.36.1 (ckrinke at Yin) (gcc version 4.3.5 (Buildroot 2010.11)
) #1 Thu Feb 17 19:04:48 PST 2011
bootconsole [udbg0] enabled
setup_arch: bootmem
mpc832x_rdb_setup_arch()
arch: exit
Zone PFN ranges:
DMA 0x00000000 -> 0x00004000
Normal empty
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0: 0x00000000 -> 0x00004000
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: root=/dev/mtdblock2 rootfstype=jffs2
mtdparts=nor:1152k(U-Boot),2176k(kernel),-(JFFS2) rw console=ttyS0,115200
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 60704k/65536k available (3984k kernel code, 4832k reserved, 140k
data, 98k bss, 184k init)
Kernel virtual memory layout:
* 0xfffdf000..0xfffff000 : fixmap
* 0xfdef9000..0xfe000000 : early ioremap
* 0xc5000000..0xfdef9000 : vmalloc & ioremap
Hierarchical RCU implementation.
RCU-based detection of stalled CPUs is disabled.
Verbose stalled-CPUs detection is disabled.
NR_IRQS:512 nr_irqs:512
IPIC (128 IRQ sources) at c5000700
clocksource: timebase mult[7800001] shift[22] registered
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
NET: Registered protocol family 16
PCI: Probing PCI hardware
bio: create slab <bio-0> at 0
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switching to clocksource timebase
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
msgmni has been set to 118
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xe0004500 (irq = 16) is a 16550A
console [ttyS0] enabled, bootconsole disabled
console [ttyS0] enabled, bootconsole disabled
serial8250.0: ttyS1 at MMIO 0xe0004600 (irq = 17) is a 16550A
brd: module loaded
loop: module loaded
Fixed MDIO Bus: probed
ucc_geth: QE UCC Gigabit Ethernet Controller
ucc_geth: UCC2 at 0xe0103000 (irq = 23)
ucc_geth: UCC3 at 0xe0102200 (irq = 34)
Freescale PowerQUICC MII Bus: probed
usbmon: debugfs is not available
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
i2c /dev entries driver
of:mpc-i2c e0003000.i2c: timeout 1000000 us
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
TCP cubic registered
NET: Registered protocol family 17
NET: Registered protocol family 15
Registering the dns_resolver key type
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
Root-NFS: No NFS server available, giving up.
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "mtdblock2" or unknown-block(2,0)
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(2,0)
Call Trace:
[c3823ed0] [c0008270] show_stack+0x48/0x168 (unreliable)
[c3823f10] [c03049c0] panic+0xa4/0x1e4
[c3823f60] [c03b6de4] mount_block_root+0x198/0x240
[c3823fb0] [c03b70e0] prepare_namespace+0x13c/0x1d0
[c3823fd0] [c03b6258] kernel_init+0x138/0x174
[c3823ff0] [c000f21c] kernel_thread+0x4c/0x68
Rebooting in 180 seconds..
Charles Krinke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20110221/b81b21ec/attachment.html>
^ permalink raw reply [flat|nested] 13+ messages in thread* [Buildroot] booting JFFS2 or UBIFS created with buildroot
2011-02-21 22:29 ` Charles Krinke
@ 2011-02-21 22:42 ` Thomas Petazzoni
2011-02-21 23:12 ` Charles Krinke
0 siblings, 1 reply; 13+ messages in thread
From: Thomas Petazzoni @ 2011-02-21 22:42 UTC (permalink / raw)
To: buildroot
Hello,
On Mon, 21 Feb 2011 14:29:35 -0800
Charles Krinke <charles.krinke@gmail.com> wrote:
> First of all, I appreciate greatly the time you are taking to discuss this
> issue. Thank you very much.
You're welcome!
> My flash layout is:
>
> 0xFE340000 to top of flash rootfs.jffs2 programmed here
> 0xFE120000 uImage here
> 0xFE080000 deviceTree here (1 sector)
> 0xFE000000 u-boot here
>
> Now with that said, here are my recipes assuming I counted the number of
> 128k sectors properly for the offset to get to JFFS2 in the bootargs line.
Ok, sounds correct.
> Linux version 2.6.36.1 (ckrinke at Yin) (gcc version 4.3.5 (Buildroot 2010.11)
> ) #1 Thu Feb 17 19:04:48 PST 2011
The problem seems to be in your kernel: there are no lines indicating
that a MTD device has been detected. So maybe the MTD device is not
described in your device tree, or improperly described, or the
corresponding kernel driver is missing.
Here are the messages you typically see when a NAND device is being
detected by the kernel (on an ARM AT91 platform) :
NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 464 at 0x03a00000
Bad eraseblock 1694 at 0x0d3c0000
Bad eraseblock 3101 at 0x183a0000
Bad eraseblock 3199 at 0x18fe0000
Bad eraseblock 3866 at 0x1e340000
Bad eraseblock 5478 at 0x2acc0000
Bad eraseblock 6473 at 0x32920000
Bad eraseblock 6606 at 0x339c0000
3 cmdlinepart partitions found on MTD device atmel_nand
Creating 3 MTD partitions on "atmel_nand":
0x00000000-0x00100000 : "bootloader"
0x00100000-0x00400000 : "kernel"
0x00400000-0x40000000 : "rootfs"
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] booting JFFS2 or UBIFS created with buildroot
2011-02-21 22:42 ` Thomas Petazzoni
@ 2011-02-21 23:12 ` Charles Krinke
2011-02-21 23:31 ` Yann E. MORIN
0 siblings, 1 reply; 13+ messages in thread
From: Charles Krinke @ 2011-02-21 23:12 UTC (permalink / raw)
To: buildroot
Dear Thomas:
This gives me a couple of clues.
I also see that there is no mention at all of JFFS2 in
u-boot-2010.06/include/configs/MPC8323ERDB.h, so I added:
#define CONFIG_JFFS2_CMDLINE
#define MTDIDS_DEFAULT "nor0"
#define MTDPARTS_DEFAULT "mtdparts=nor:1152k(U-Boot),2176k(kernel),-(JFFS2)
And this gets me to a buildroot question.
When I change this file in the output/build/u-boot-2010.06 directory, I
would normally expect 'make' to find it, but it does not make a new u-boot.
"What is the proper incantation from the top of the buildroot tree to make a
new u-boot and can I do a clean in just the u-boot directory also".
I am trying to avoid make clean at the top of the buildroot tree so I dont
get all the sources again from the repositories *and* build the toolchain
again.
Additionally, on the Linux question, I *believe* there is indeed no
description of the NOR flash in the device tree source (.dts file) from
Freescale and maybe that is at the root of the problem.
I did look at the dotconfig and I can see that CONFIG_MTD=y and
CONFIG_MTD_PARTITIONS=y are both defined.
Unfortunately, I am only a tiny bit familiar with device tree and dont yet
know what the exact syntax is for adding NOR flash to the .dts file, but
that becomes my next area of research.
Charles
On Mon, Feb 21, 2011 at 2:42 PM, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Mon, 21 Feb 2011 14:29:35 -0800
> Charles Krinke <charles.krinke@gmail.com> wrote:
>
> > First of all, I appreciate greatly the time you are taking to discuss
> this
> > issue. Thank you very much.
>
> You're welcome!
>
> > My flash layout is:
> >
> > 0xFE340000 to top of flash rootfs.jffs2 programmed here
> > 0xFE120000 uImage here
> > 0xFE080000 deviceTree here (1 sector)
> > 0xFE000000 u-boot here
> >
> > Now with that said, here are my recipes assuming I counted the number of
> > 128k sectors properly for the offset to get to JFFS2 in the bootargs
> line.
>
> Ok, sounds correct.
>
> > Linux version 2.6.36.1 (ckrinke at Yin) (gcc version 4.3.5 (Buildroot
> 2010.11)
> > ) #1 Thu Feb 17 19:04:48 PST 2011
>
> The problem seems to be in your kernel: there are no lines indicating
> that a MTD device has been detected. So maybe the MTD device is not
> described in your device tree, or improperly described, or the
> corresponding kernel driver is missing.
>
> Here are the messages you typically see when a NAND device is being
> detected by the kernel (on an ARM AT91 platform) :
>
> NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V
> 8-bit)
> Scanning device for bad blocks
> Bad eraseblock 464 at 0x03a00000
> Bad eraseblock 1694 at 0x0d3c0000
> Bad eraseblock 3101 at 0x183a0000
> Bad eraseblock 3199 at 0x18fe0000
> Bad eraseblock 3866 at 0x1e340000
> Bad eraseblock 5478 at 0x2acc0000
> Bad eraseblock 6473 at 0x32920000
> Bad eraseblock 6606 at 0x339c0000
> 3 cmdlinepart partitions found on MTD device atmel_nand
> Creating 3 MTD partitions on "atmel_nand":
> 0x00000000-0x00100000 : "bootloader"
> 0x00100000-0x00400000 : "kernel"
> 0x00400000-0x40000000 : "rootfs"
>
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
--
Charles Krinke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20110221/e8eca693/attachment.html>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] booting JFFS2 or UBIFS created with buildroot
2011-02-21 23:12 ` Charles Krinke
@ 2011-02-21 23:31 ` Yann E. MORIN
0 siblings, 0 replies; 13+ messages in thread
From: Yann E. MORIN @ 2011-02-21 23:31 UTC (permalink / raw)
To: buildroot
Charles, Thomas, All,
On Tuesday 22 February 2011 00:12:23 Charles Krinke wrote:
> I did look at the dotconfig and I can see that CONFIG_MTD=y and
> CONFIG_MTD_PARTITIONS=y are both defined.
As you are passing the partition table on the kernel command line, you will
also need to set CONFIG_MTD_CMDLINE_PARTS=y or the kernel will not parse it.
Wild guess... ;-)
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] booting JFFS2 or UBIFS created with buildroot
2011-02-21 21:30 ` Charles Krinke
2011-02-21 21:40 ` Thomas Petazzoni
2011-02-21 22:09 ` Thomas Petazzoni
@ 2011-02-21 23:29 ` ANDY KENNEDY
2011-02-21 23:35 ` Charles Krinke
2011-02-22 8:08 ` Guillaume Gardet
3 siblings, 1 reply; 13+ messages in thread
From: ANDY KENNEDY @ 2011-02-21 23:29 UTC (permalink / raw)
To: buildroot
> From: Charles Krinke [mailto:charles.krinke at gmail.com]
> Sent: Monday, February 21, 2011 3:30 PM
> To: ANDY KENNEDY
> Cc: buildroot at busybox.net
> Subject: Re: [Buildroot] booting JFFS2 or UBIFS created with buildroot
>
> Dear Andy et.al.:
>
> When I boot a jffs2 image created with buildroot with its associated
> kernel, I get a kernel panic when trying to mount the jffs2 image that
> looks like this:
>
> VFS: Cannot open root device "mtdblock2" or unknown-block(2,0)
> 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(2,0)
> Call Trace:
> [c3823ed0] [c0008270] show_stack+0x48/0x168 (unreliable)
> [c3823f10] [c03049c0] panic+0xa4/0x1e4
> [c3823f60] [c03b6de4] mount_block_root+0x198/0x240
> [c3823fb0] [c03b70e0] prepare_namespace+0x13c/0x1d0
> [c3823fd0] [c03b6258] kernel_init+0x138/0x174
> [c3823ff0] [c000f21c] kernel_thread+0x4c/0x68
> Rebooting in 180 seconds..
>
> My bootcmd and bootargs in u-boot looks like this:
>
> bootcmd=bootm 0xfe120000 - 0xfe080000
> bootargs=root=/dev/mtdblock2 rootfstype=jffs2
> mtdparts=nor:1152k(U-Boot),2176k(kernel),-(JFFS2) rw console=ttyS0,115200
>
> As I recall, this was working the last time I did it 5 years ago, but
> again, I probably have forgotten a few details or there are some
> config options not yet turned on. I am working with buildroot defaults
> so far.
>
> Charles
This looks like you don't have your NAND/NOR flash configured in the kernel.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] booting JFFS2 or UBIFS created with buildroot
2011-02-21 23:29 ` ANDY KENNEDY
@ 2011-02-21 23:35 ` Charles Krinke
0 siblings, 0 replies; 13+ messages in thread
From: Charles Krinke @ 2011-02-21 23:35 UTC (permalink / raw)
To: buildroot
Thanks Andy:
I think I need to go do some research on kernel config of nand/nor,
something I havent looked at for a few years. I just glibly accepted all the
defaults the testing I did so the "cheap shot" got me a fur piece, but there
is some homework to be done.
I'll go do that homework and report back.
Charles
On Mon, Feb 21, 2011 at 3:29 PM, ANDY KENNEDY <ANDY.KENNEDY@adtran.com>wrote:
> > From: Charles Krinke [mailto:charles.krinke at gmail.com]
> > Sent: Monday, February 21, 2011 3:30 PM
> > To: ANDY KENNEDY
> > Cc: buildroot at busybox.net
> > Subject: Re: [Buildroot] booting JFFS2 or UBIFS created with buildroot
> >
> > Dear Andy et.al.:
> >
> > When I boot a jffs2 image created with buildroot with its associated
> > kernel, I get a kernel panic when trying to mount the jffs2 image that
> > looks like this:
> >
> > VFS: Cannot open root device "mtdblock2" or unknown-block(2,0)
> > 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(2,0)
> > Call Trace:
> > [c3823ed0] [c0008270] show_stack+0x48/0x168 (unreliable)
> > [c3823f10] [c03049c0] panic+0xa4/0x1e4
> > [c3823f60] [c03b6de4] mount_block_root+0x198/0x240
> > [c3823fb0] [c03b70e0] prepare_namespace+0x13c/0x1d0
> > [c3823fd0] [c03b6258] kernel_init+0x138/0x174
> > [c3823ff0] [c000f21c] kernel_thread+0x4c/0x68
> > Rebooting in 180 seconds..
> >
> > My bootcmd and bootargs in u-boot looks like this:
> >
> > bootcmd=bootm 0xfe120000 - 0xfe080000
> > bootargs=root=/dev/mtdblock2 rootfstype=jffs2
> > mtdparts=nor:1152k(U-Boot),2176k(kernel),-(JFFS2) rw console=ttyS0,115200
> >
> > As I recall, this was working the last time I did it 5 years ago, but
> > again, I probably have forgotten a few details or there are some
> > config options not yet turned on. I am working with buildroot defaults
> > so far.
> >
> > Charles
>
> This looks like you don't have your NAND/NOR flash configured in the
> kernel.
>
--
Charles Krinke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20110221/79c658ec/attachment-0001.html>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] booting JFFS2 or UBIFS created with buildroot
2011-02-21 21:30 ` Charles Krinke
` (2 preceding siblings ...)
2011-02-21 23:29 ` ANDY KENNEDY
@ 2011-02-22 8:08 ` Guillaume Gardet
3 siblings, 0 replies; 13+ messages in thread
From: Guillaume Gardet @ 2011-02-22 8:08 UTC (permalink / raw)
To: buildroot
Did you enable JFFS2 support and the drivers needed for your NOR memory in the kernel?
Guillaume
Le 21/02/2011 22:30, Charles Krinke a ?crit :
> Dear Andy et.al <http://et.al>.:
>
> When I boot a jffs2 image created with buildroot with its associated kernel, I get a kernel panic when trying to mount the jffs2 image that looks like this:
>
> VFS: Cannot open root device "mtdblock2" or unknown-block(2,0)
> 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(2,0)
> Call Trace:
> [c3823ed0] [c0008270] show_stack+0x48/0x168 (unreliable)
> [c3823f10] [c03049c0] panic+0xa4/0x1e4
> [c3823f60] [c03b6de4] mount_block_root+0x198/0x240
> [c3823fb0] [c03b70e0] prepare_namespace+0x13c/0x1d0
> [c3823fd0] [c03b6258] kernel_init+0x138/0x174
> [c3823ff0] [c000f21c] kernel_thread+0x4c/0x68
> Rebooting in 180 seconds..
>
> My bootcmd and bootargs in u-boot looks like this:
>
> bootcmd=bootm 0xfe120000 - 0xfe080000
> bootargs=root=/dev/mtdblock2 rootfstype=jffs2 mtdparts=nor:1152k(U-Boot),2176k(kernel),-(JFFS2) rw console=ttyS0,115200
>
> As I recall, this was working the last time I did it 5 years ago, but again, I probably have forgotten a few details or there are some config options not yet turned on. I am working with buildroot defaults so far.
>
> Charles
>
>
>
>
> On Mon, Feb 21, 2011 at 1:19 PM, ANDY KENNEDY <ANDY.KENNEDY at adtran.com <mailto:ANDY.KENNEDY@adtran.com>> wrote:
>
>
>
> From: buildroot-bounces at busybox.net <mailto:buildroot-bounces@busybox.net> [mailto:buildroot-bounces at busybox.net <mailto:buildroot-bounces@busybox.net>] On Behalf Of Charles Krinke
> Sent: Monday, February 21, 2011 2:54 PM
> To: buildroot at busybox.net <mailto:buildroot@busybox.net>
> Subject: [Buildroot] booting JFFS2 or UBIFS created with buildroot
>
> Thanks guys for bearing with my first two questions. I believe I can compile u-boot, linux and various file systems such as cpio, jffs2, ubifs so now I get to a new puzzle.
>
> When I create a jffs2 image, I am used to giving u-boot a bootargs line that looks somewhat like:
>
> root=/dev/mtdblock2 rootfstype=jffs2 rw mtdparts=nor:1162k(U-boot),1536k(kernel),-(JFFS2)
>
> Which I believe essentially means that I have created mtdparts partitions on the fly and that the root filesystem should boot at the offset of JFFS2 and that the dynamic creation on the fly of the number of partitions doesnt matter as long as the jffs2 lines up with the last incantation.
>
> But, ... this doesnt work anymore.
>
>
>
>
> Define "doesn't work anymore". The problem I'm seeing in linux-2.6.36.1 is that the kernel panics when attempting to create the devices on the fly (I think I have seen the panic around the function call add_device IIRC). If this is a similar issue you are having, give me another week and I'll have it fixed as the MTD guys have ignored/not known the answer to my question from about a month ago.
>
>
>
>
>
> --
> Charles Krinke
>
>
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20110222/41158cec/attachment.html>
^ permalink raw reply [flat|nested] 13+ messages in thread