Re: [U-Boot] uboot kernel rejects filesystem
Hi Bharat, Seems there was an issue with my kernel code that you correctly pointed out in previous mail. Now I could pass bootarg board='myboard'. For myboard, I have done relevent changes in kernel code, so kernel does init for my hardware. Earlier while choosing mips machine, it was choosing generic mips machine which did not mtdpartitions defined. Now with added support of myboard, everything seems to be good. Excellent - congratulations. Thanks for the promptly helps you have given. One problem down, so many to go ;) Cheers Detlev -- The latest code looks a bit similar to the old [linux] big-reader-locks hack (which got dropped for good many eons ago and with which i deny any involvement with, such as having authored it. [oh, did i say that out loud? crap.]), imple- mented cleanly and properly. -- Ingo Molnar 20090428124033.ga1...@elte.hu -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] uboot kernel rejects filesystem
Hi Detlev, Seems there was an issue with my kernel code that you correctly pointed out in previous mail. Now I could pass bootarg board='myboard'. For myboard, I have done relevent changes in kernel code, so kernel does init for my hardware. Earlier while choosing mips machine, it was choosing generic mips machine which did not mtdpartitions defined. Now with added support of myboard, everything seems to be good. Thanks for the promptly helps you have given. Regards, Bharat ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] uboot kernel rejects filesystem
Hi Bharat, I have modified in kernel for mtd support. in U_BOOT following is the info: Apart from the things which Wolfgang pointed out - I do *not* see any MTD related info in your Linux kernel log. Are you sure yoiu have mtd support? For example when I boot a sequoia (440epx amcc) board, I see this: 1fc00.nor_flash: Found 1 x16 devices at 0x0 in 16-bit bank Amd/Fujitsu Extended Query Table at 0x0040 1fc00.nor_flash: CFI does not contain boot bank location. Assuming top. number of CFI chips: 1 cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness. mtd: no closing ) found in partition name RedBoot partition parsing not available Creating 5 MTD partitions on 1fc00.nor_flash: 0x-0x0018 : kernel 0x0018-0x0038 : root 0x0038-0x03f2 : user 0x03f6-0x03fa : env 0x03fa-0x0400 : u-boot So recheck your kernel configuration. Cheers Detlev -- Less talking -- more hacking -- Olin Shivers -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] uboot kernel rejects filesystem
Hi Detlev, I have gone thru the kernel code. I could only figure out that m25p80 is spi driver which is register as spi-driver. Registration is done, which I could see from early printk's. But this module is never probed. Next, kernel iterates through the list of devices and tries to find out mtdpart, which it can not see. Since your mail gave very good pointer where to look for with ref to another nor flash. Regards, Bharat Seems I quoted text in previous mail which annoyed you. Sorry for being naive. I hope I will not repeat the same. -- Bharat ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] uboot kernel rejects filesystem
Hi Bharat, I have gone thru the kernel code. I could only figure out that m25p80 is spi driver which is register as spi-driver. Oh wow, an SPI NOR flash. In my opinion, this is a rare constellation, so you will probably need to debug MTD in Linux. Registration is done, which I could see from early printk's. But this module is never probed. Next, kernel iterates through the list of devices and tries to find out mtdpart, which it can not see. Since your mail gave very good pointer where to look for with ref to another nor flash. Ok, so the problem is really that the MTD layer does not know how to talk to your spi flash. I will not be of much help here, I'm afraid, so I'll advise to find a mailing list closer to the problem... Seems I quoted text in previous mail which annoyed you. Sorry for being naive. I hope I will not repeat the same. Well if one reads lots and lots of messages, it is basically important that everybody uses an e-mail style allowing efficient processing. There is a good FAQ on this: http://www.netmeister.org/news/learn2quote.html Cheers Detlev -- A statistician can have his head in an oven and his feet in ice, and he will say that on the average he feels fine. -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] uboot kernel rejects filesystem
Hi Detlev, On Tue, May 12, 2009 at 9:10 PM, Detlev Zundel d...@denx.de wrote: Hi Bharat, [re-adding the mailing list as others may also profit from the discussion] Thank you for the prompt reply. Unfortunately in linux tree, my board specific MTD partition info is not preset. Is there any quick way round. Yep - thinking some more, I see two possible (quick) solutions. M/M Layout: 0xBF00 : U-BOOT 0xBF04 : u_boot_config_area 0xBF06: vm_linux_image (with u-boot header : created by mkimage and LZMA) 0xBF26: root_fs area... Here I have flashed squashfs (without u-boot hdr) Should I? 0xBFFC: root_fs_data .. JFFS RW filesystem Just as a sidenote - are you able to use the JFFS (really JFFS, not JFFS2?) image? If so, then you _do_ have an MTD partition in Linux which you only need to tweak. I do following on u-boot prompt boardbootm 0xBF06 0xBF26 This command only makes sense, if the image at 0xbf26 is wrapped with mkimage. This is exactly the first solution that you can try, i.e. use mkimage with -T ramdisk to wrap your image and use the it with the two argument bootm version like you tried. Maybe you will need to specify rootfstype=squashfs on the command line also, you will have to check this. Having said this, if you are on an ARM platform, the above will very likely not work, so you will have to turn to the other solution I have in mind: NO SUCCESS again I try: with modification to include/configs/my_board.h file as #define MTDIDS_DEFAULT nor0=app #define MTDPARTS_DEFAULT \ mtdparts=app:64k(u-boot),64k(boot_config),64k(board_config),2048k (kernel),13696(rootfs),256kb(roots_data) #define CONFIG_BOOTARGS root=/dev/mtdblock4 rootfstype=squashfs console= ttyS1,115200 boardbootm 0xbf06 I have modified in kernel for mtd support. in U_BOOT following is the info: u-bflinfo Bank # 1: 256x64K=16MB, Spansion SL25FL128P (0x012018) u-bmtdparts device nor0 m25p80, # parts = 5 #: namesizeoffset mask_flags 0: boot0x0004 0x 0 1: boot_config 0x0001 0x0004 0 2: board_config0x0001 0x0005 0 3: kernel 0x0020 0x0006 0 4: filesystem 0x0040 0x0026 0 active partition: nor0,0 - (boot) 0x0004 @ 0x defaults: mtdids : nor0=m25p80 mtdparts: mtdparts=m25p80:256k(boot),64k(boot_config),64k(board_config),2048k(kernel),4m(filesystem) u-bbootm 0xbf06000 Log messages from kernel: ## Booting kernel from Legacy Image at bf06 ... Image Name: MIPS OpenWrt Linux-2.6.28.9 Image Type: MIPS Linux Kernel Image (lzma compressed) Data Size:767717 Bytes = 749.7 kB Load Address: 8006 Entry Point: 8006 Verifying Checksum ... OK ## No init Ramdisk ramdisk start = 0x, ramdisk end = 0x Uncompressing Kernel Image ... OK linux_argv[0]:NULL linux_env a3f9c3c0 theKernel 8006 Starting kernel ... Linux version 2.6.28.9 (bha...@debian) (gcc version 4.1.2) #5 Thu May 14 22:15:40 IST 2009 console [early0] enabled CPU revision is: 00019374 (MIPS 24Kc) Atheros AR7161 rev 2 (id:0xaa), CPU:680.000 MHz, AHB:170.000 MHz, DDR:340.000 MHz Determined physical RAM map: memory: 0400 @ (usable) Initrd not found or empty - disabling initrd Zone PFN ranges: Normal 0x - 0x4000 Movable zone start PFN for each node early_node_map[1] active PFN ranges 0: 0x - 0x4000 Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256 Kernel command line: root=/dev/mtdpart4 rootfstype=squashfs,yaffs,jffs2 noinitrd console=ttyS0,115200 init=/etc/preinit Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes. Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes Writing ErrCtl register=1c10 Readback ErrCtl register=1c10 PID hash table entries: 256 (order: 8, 1024 bytes) Dentry cache hash table entries: 8192 (order: 3, 32768 bytes) Inode-cache hash table entries: 4096 (order: 2, 16384 bytes) Memory: 62120k/65536k available (1820k kernel code, 3340k reserved, 330k data, 132k init, 0k highmem) SLUB: Genslabs=6, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 Calibrating delay loop... 452.19 BogoMIPS (lpj=2260992) Mount-cache hash table entries: 512 net_namespace: 480 bytes NET: Registered protocol family 16 MIPS: machine is Generic AR71xx board 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 NET: Registered protocol family 1 squashfs: version 3.0 (2006/03/15) Phillip Lougher Registering mini_fo version $Id$ JFFS2 version 2.2. (NAND) (SUMMARY) ©
Re: [U-Boot] uboot kernel rejects filesystem
Dear Bharat Bhushan, In message a29be8140905141245r10b62c47u3a27a28b93bdb...@mail.gmail.com you wrote: u-bmtdparts device nor0 m25p80, # parts =3D 5 #: namesizeoffset mask_flags 0: boot0x0004 0x 0 1: boot_config 0x0001 0x0004 0 2: board_config0x0001 0x0005 0 3: kernel 0x0020 0x0006 0 4: filesystem 0x0040 0x0026 0 active partition: nor0,0 - (boot) 0x0004 @ 0x defaults: mtdids : nor0=3Dm25p80 mtdparts: mtdparts=m25p80:256k(boot),64k(boot_config),64k(board_config),2048k(kernel),4m(filesystem) If this is what you want, you should let the kenrel know about that... Log messages from kernel: ... Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256 Kernel command line: root=/dev/mtdpart4 rootfstype=squashfs,yaffs,jffs2 noinitrd console=ttyS0,115200 init=/etc/preinit ... but your kernel's boot arguments show no trace of any mtdparts= argument. I am sure I am doing something wrong here.? It is MIPS Architecture + Linux 2.6.28... Indeed. You did not read what Detlev explained to you: So if you have this support in your Linux configuration, you can pass - the whole mtdpart=.. through the linux commandline. A nasty part here Seems you also didn't read Detlev's PS: PS: And please stop quoting the full text of the whole e-mail thread as this is considered to be impolite on mailing lists. :-( Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Anyone who isn't confused here doesn't really know what's going on. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] uboot kernel rejects filesystem
Hi All, I am very new to u-boot. I have kernel image, which I loaded to NOR of my board and with bootm, control passes to kernel and it starts booting. There is panic in kernel: since it can not find the file-system. I am afraid, I did make trivial mistake. I have flashed squashfs filesystem image to NOR @ address NOR1 I did not define any partition. I do not have MTD support. Now I tried booting like after setting setenv kernel_addr 0xBF06Note this has u-boot hdr generated form mkimage setenv ramdisk_addr 0xBF26Note this does not have u-boot hdr generated form mkimage setenv bootargs 'filesystem=squashfs' I do bootm ${kernel_addr} ${ramdisk_addr} I do get error from U_BOOT that : *Wrong Ramdisk Image Format Ramdisk image is corrupt or invalid *I am sure that I have done something wrong in this process: Few Questions which I could not find the answer: 1. Can I nor-flash the image without u-boot hdr. 2. Is it necessary to have MTD partition defined. 3. Do we have any document which specify the boot arguments in context of U_BOOT. I tried denx website. I could not figure out much. May be I do not what to search for. Any help would be highly appreciated. Regards, Bharat ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] uboot kernel rejects filesystem
Hi Bharat, I am very new to u-boot. Welcome aboard! I have kernel image, which I loaded to NOR of my board and with bootm, control passes to kernel and it starts booting. There is panic in kernel: since it can not find the file-system. I am afraid, I did make trivial mistake. I have flashed squashfs filesystem image to NOR @ address NOR1 I did not define any partition. I do not have MTD support. Now I tried booting like after setting setenv kernel_addr 0xBF06Note this has u-boot hdr generated form mkimage setenv ramdisk_addr 0xBF26Note this does not have u-boot hdr generated form mkimage setenv bootargs 'filesystem=squashfs' I do bootm ${kernel_addr} ${ramdisk_addr} This is not correct. The second argument for bootm is a real ramdisk or initrd in Linux speak. The squashfs filesystem that you use needs a MTD device and thus can not be passed in this way. I do get error from U_BOOT that : *Wrong Ramdisk Image Format Ramdisk image is corrupt or invalid That's to be expected, because U-Boot wants the initrd to be wrapped with mkimage also - which is irrelevant in your case though. *I am sure that I have done something wrong in this process: Few Questions which I could not find the answer: 1. Can I nor-flash the image without u-boot hdr. Sure you can. You should flash it to the address of a partition defined inside of the Linux MTD subsystem. 2. Is it necessary to have MTD partition defined. You will of course need to define MTD partitions inside of Linux - whereas in U-Boot this is optional. 3. Do we have any document which specify the boot arguments in context of U_BOOT. I tried denx website. I could not figure out much. May be I do not what to search for. What exactly do you mean by boot arguments? Any help would be highly appreciated. To solve your problem, do the following: 1. Find out which MTD device (in Linux) you want to use to hold the squashfs image. I'll assume mtd0 below. 2. If you do not want to use partitioning in U-Boot then determine the physical address that this device maps to 3. Flash the squasfs image to that address 4. Be sure to include root=/dev/mtdblock0 on the Linux command line so Linux knows where it finds its rootfs. Cheers Detlev -- We support democracy, but that doesn't mean we have to support governments that get elected as a result of democracy. -- George W. Bush - March 30, 2006 -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] uboot kernel rejects filesystem
Hi Bharat, [re-adding the mailing list as others may also profit from the discussion] Thank you for the prompt reply. Unfortunately in linux tree, my board specific MTD partition info is not preset. Is there any quick way round. Yep - thinking some more, I see two possible (quick) solutions. M/M Layout: 0xBF00 : U-BOOT 0xBF04 : u_boot_config_area 0xBF06: vm_linux_image (with u-boot header : created by mkimage and LZMA) 0xBF26: root_fs area... Here I have flashed squashfs (without u-boot hdr) Should I? 0xBFFC: root_fs_data .. JFFS RW filesystem Just as a sidenote - are you able to use the JFFS (really JFFS, not JFFS2?) image? If so, then you _do_ have an MTD partition in Linux which you only need to tweak. I do following on u-boot prompt boardbootm 0xBF06 0xBF26 This command only makes sense, if the image at 0xbf26 is wrapped with mkimage. This is exactly the first solution that you can try, i.e. use mkimage with -T ramdisk to wrap your image and use the it with the two argument bootm version like you tried. Maybe you will need to specify rootfstype=squashfs on the command line also, you will have to check this. Having said this, if you are on an ARM platform, the above will very likely not work, so you will have to turn to the other solution I have in mind: NO SUCCESS again I try: with modification to include/configs/my_board.h file as #define MTDIDS_DEFAULT nor0=app #define MTDPARTS_DEFAULT \ mtdparts=app:64k(u-boot),64k(boot_config),64k(board_config),2048k (kernel),13696(rootfs),256kb(roots_data) #define CONFIG_BOOTARGS root=/dev/mtdblock4 rootfstype=squashfs console= ttyS1,115200 boardbootm 0xbf06 The mtdparts variable in U-Boot has no automagic connection to the Linux kernel. It was designed however with connecting in Linux by using the following Linux config: drivers/mtd/Kconfig:106 Device Drivers config MTD_CMDLINE_PARTS bool Command line partition table parsing depends on MTD_PARTITIONS = y MTD = y ---help--- Allow generic configuration of the MTD partition tables via the kernel command line. Multiple flash resources are supported for hardware where different kinds of flash memory are available. So if you have this support in your Linux configuration, you can pass the whole mtdpart=.. through the linux commandline. A nasty part here is the beginning (you chose app) of the configuration - as you will need to find what your kernel thinks the name of the flash chip is. I think in second case it does make sense to pass mtdblock4 since my kernel (;;) does not recognize it. Is there any work around like adding mtd table in linux kernel from uboot via bootargs. Yes, like I stated above. Please try either method - if you are trying via MTD, be sure to include the contents of /proc/mtd and the relevant section of the Linux bootlog where the MTD layer registers in your next mail. Thanks Detlev PS: And please stop quoting the full text of the whole e-mail thread as this is considered to be impolite on mailing lists. -- Each language has its purpose, however humble. Each language expresses the Yin and Yang of software. Each language has its place within the Tao. But do not program in COBOL if you can avoid it. -- The Tao of Programming -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot