build kernel and rootfs , now what ?

Hi

After building a first kernel image and booting it : apex> boot ARCH_ID: 390 (0x186) ATAG_HEADER ATAG_MEM: start 0xc0000000 size 0x02000000 ATAG_MEM: start 0xc4000000 size 0x02000000 ATAG_CMDLINE: (74 bytes) 'console=ttyAM1 root=/dev/hda1 mtdparts=phys_mapped_fla sh:2m(boot),-(root)' ATAG_END Booting kernel at 0xc0008000... Uncompressing Linux............................................................. .......................... done, booting the kernel. Linux version 2.6.16 (root@debian) (gcc version 3.4.4) #1 PREEMPT Sat Feb 28 20:

42:00 CET 2009 CPU: ARM922Tid(wb) [41029220] revision 0 (ARMv4T) .............. .............. Root-NFS: No NFS server available, giving up. VFS: Unable to mount root fs via NFS, trying floppy. VFS: Cannot open root device "hda1" or unknown-block(2,0) Please append a correct "root=" boot option Kernel panic - not syncing: VFS: Unable to mount root fs on unknown- block(2,0)

There was no rootfs at first, now i have build one, but what should i do now with the resulting rootfs.image ? My board has Flash, so i would like to put it there somewhere.

How do i tell the kernel how i should load the rootfs, and how do i store the rootfs in flash ? any hints ? (i am using a LH7a404 logicpd)

Johan

Reply to
bugkiller
Loading thread data ...

Please Goggle for "initramfs" and "u-boot"

-Michael

Reply to
Michael Schnell

do i need initramfs ?

ps I made a brick from my SDK kit, i corrupted the bootloader...., now i'm looking for a rope ...

Reply to
gates killer

You seem to be able to hand control over to the Linux kernel, so I dont think your bootloader is corrupt!! What may be corrupt is how you pass the arguments to the kernel.

  1. What is the bootloader you are using ?
  2. Have you read the manual for the bootloader and worked out what arguments you are currently passing on to Linux ?
  3. What are the arguments you pass on to linux ?
  4. Your kernel is looking for a root file system on a NFS export. Do you have a NFS server setup to export a root filesystem ?
  5. What are you intending to do with a brick and a rope ? :)
Reply to
Janaka

The preinstalled bootloader is lolo (from logicpd) then i loaded the APEX loader. from that one i loaded my comiled kernel. i saw this line : ATAG_CMDLINE: (74 bytes) 'console=3DttyAM1 root=3D/dev/hda1 mtdparts=3Dphys_mapped_flash:2m(boot),-(root)' but there is no hda1 device, in an order to change this i did

then in the apex bootloader id did:: apex> erase $env # erase nor:128k+64k this seems to have overwritten part of the original bootloader, i get no prompts anymore from the serial ports after reset, and the leds on my baseboard no longer blinks....

so i ended up here with a useless system.

I think i will look for something with a AT91SAM926x device, i think its more recent than the lh7a404 and better supported, and i have complete schematics of a module build with that cpu ( no hidden stuff in cpld's like in the logicpd lh7a404 module )

Johan

Reply to
gates killer

gates killer wrote:>

Not necessarily, but IMHO initramfs is the easiest way to boot most embedded devices, when, unlike with PCs, you just stay in the state with initramfs as the root file system:

The boot loader only needs to move a single file into RAM: the self extracting Kernel. Same includes the initramfs, which is automatically extracted and mounted by the Kernel after same extracted itself. Now initramfs is readable and writable.

If you need additional File systems you can create them in additional Flash partitions using MTD and jffs2.

-Michael

Reply to
Michael Schnell

Its hard to say without knowing your system. But as I can see it, you have two options. a) Use a JTAG device to program the original bootloader (assuming you have a JTAG pod and the old bootloader bin file handy) b) Manually program the flash/Eeprom (lot of work required) Good luck Janaka

Reply to
Janaka

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.