Good morning, all.

Thanks, Josh and Phil for your replies.  Turns out that when I was given 
the Linux PC a few months ago, several things were not properly installed. 
 There wasn't a ramdisk in my directory structure, but when I went back 
and searched for it (amazing what you can find when you know to look for 
them!), I found a ramdisk.gz file.  I'm now booting the linux kernel. 
YAYAY.

A couple of things, as a follow-on.

Josh,

I didn't want to remove the DHCP from the compilation, totally, because 
when I'm troubleshooting boards in the lab, I will want it, and I didn't 
want to change the compiler, just the environment vars.  I got the bootarg 
setting (to disable the DHCP) directly from an e-mail from my Texas 
Instruments contact.  It works, but I think there is still a minor syntax 
error.  If you can remember about the command line args, please let me 
know.  Thanks.

Phil, 

I knew when I was typing it, that gzip followed by zip wasn't needed, but 
I was doing a cut&paste from a wiki page.  I'm guessing, but it appears to 
be there mostly as a logic break, so that you can make mulitple rep's of 
the unzip-mount-mkdir-unmount-zip, as needed in the future.  Anyway, real 
follow-up question is:  If for whatever reason I want to do the whole 
"build ramdisk" in the future, what files do I need to add?  The same wiki 
page that said "Create whatever directories you want" also made a 
reference to 'busybox' (but not being a unix/linus type, I've never used 
it).  Would that be sufficient?  It's not on my Linux PC, so I would 
assume from the Net?  Hidden on one of the DVEVM install disks?

Again, thank you both for you help.  Major progress in a single 
afternoon!!!

Regards,
James Long



When I wanted to remove the very long time delay from DHCP (because I’m 
using a static IP address) I only removed DHCP from the kernel compilation 
and not the entire Ethernet. There is also a way I’ve seen mentioned on 
this list on how to not have it check DHCP from the command line arguments 
to the kernel but I have forgotten it.
 
I know that doesn’t answer your question at hand but it’s something you 
can try later.
 
Josh






Phil Quiney <[email protected]> 
12/18/2008 12:52 PM

To
James T Long <[email protected]>
cc
[email protected]
Subject
Re: Trying to boot with a RAMDISK






Hi

This step was pretty pointless...

     host > dd if=/dev/ram0 bs=1k count=8192 | gzip -v9 > ramdisk.gz

the next thing you do is unpack it again.

     host > gunzip ramdisk.gz
     host > mount -o loop ramdisk mnt/
     host > mkdir mnt/usr ; mkdir mnt/home ; mkdir mnt/home/jlong ; 
mkdir mnt/dev ; mkdir mnt/etc
     host > umount mnt

You have no root filesystem merely usr  home dev & etc directories. How 
exactly is the system supposed to boot as there are no executables! Can 
you try the ramdisk image that ships with the LSP. I forget exactly 
where it is located.

Did you make sure the kernel understands ext2?  Can you boot your kernel 
& check by looking for ext2 in the /proc/filesystems file.


Regards

Phil Q

James T Long wrote:

>
>
> Morning all,
>
> I am having trouble getting Linux (MonteVista 2.6.10) to boot.  It's 
> failing to create a file-system.
> My target board is a stand-alone DaVinci 6446, with only RS-232, 
> NAND-Flash, DDR-2 and Ethernet.
> I can get Ethernet running while in U-Boot so I can load the kernel, 
> but Ethernet won't work
> while Linux is trying to boot.  (I had to disable the ethernet in 
> Linux, because DHCP would
> timeout and fail.)
>
> I'm trying to create a RAMDISK, but Linux is rejecting it.  See end of 
> page for the error message.
> Please help on what I'm doing wrong.  If there is a better strategy, 
> please let me know.
>
> Thank you for your help.
> James Long
>
>
> I've done the following, based mostly on Wiki pages.
>
> On my Linux PC, I modified menuconfig, like so, and then did a clean 
> build:
>
>      CONFIG_MTD=y
>      CONFIG_MTD_PARTITIONS=y
> 
>      CONFIG_MTD_CHAR=y
>      CONFIG_MTD_BLKDEVS=y
>      CONFIG_MTD_BLOCK=y
> 
>      CONFIG_MTD_NAND=y
>      CONFIG_MTD_NAND_VERIFY_WRITE=y
>      CONFIG_MTD_NAND_IDS=y
>      CONFIG_MTD_NAND_DAVINCI=y
> 
>      CONFIG_YAFFS_FS=y
>      CONFIG_YAFFS_YAFFS1=y
>      CONFIG_YAFFS_YAFFS2=y
>      CONFIG_YAFFS_AUTO_YAFFS2=y
>      CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y
>
> On my Linux PC, logged in as superuser, I created a 8Meg RAMDISK, like 
> so:
>
>      host > cd /tftpboot
>      host > dd if=/dev/zero of=/dev/ram0 bs=1k count=8192
>      host > mke2fs -vm0 /dev/ram0 8192
>      host > tune2fs -c 0 /dev/ram0
>      host > dd if=/dev/ram0 bs=1k count=8192 | gzip -v9 > ramdisk.gz
>      host > mkdir mnt
>      host > gunzip ramdisk.gz
>      host > mount -o loop ramdisk mnt/
>      host > mkdir mnt/usr ; mkdir mnt/home ; mkdir mnt/home/jlong ; 
> mkdir mnt/dev ; mkdir mnt/etc
>      host > umount mnt
>      host > gzip -v9 ramdisk
>
> Then, from U-Boot, I load and burn the kernel and ramdisk.gz.
>
>      UBOOT # dhcp 0x80700000 192.186.0.100:/tftpboot/uImage
>      UBOOT # nand erase 0x100000   0x150000
>      UBOOT # nand write 0x80700000 0x100000 0x150000
>
>      UBOOT # tftp 0x87000000 ramdisk.gz
>      UBOOT # nand erase 0x280000   0x20000
>      UBOOT # nand write 0x87000000 0x280000 0x20000
>
>      UBOOT # setenv bootcmd 'nand read 0x87000000 0x280000 0x20000; 
> nboot 80700000 0 100000; bootm'
>      UBOOT # setenv bootargs  console=ttyS0,115200n8 root=/dev/ram0 rw 
> initrd=0x87000000,8M 
> ip=192.168.0.103:255.255.255.0:192.168.0.1:192.168.0.1:192.168.0.100:off 

> mem=120M
>      UBOOT # saveenv
>
> When I power-cycle, I get the following (On the second line, I added a 
> printf of the two magic numbers being compared):
>
> RAMDISK: Compressed image found at block 0
> EXT3-fs: Magic mismatch, very weird !   <00000000   0000ef53>
> yaffs: dev is 1048576 name is "ram0"
> yaffs: Attempting MTD mount on 1.0, "ram0"
> yaffs: dev is 1048576 name is "ram0"
> yaffs: Attempting MTD mount on 1.0, "ram0"
> Kernel panic - not syncing: VFS: Unable to mount root fs on 
> unknown-block(1,0)
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Davinci-linux-open-source mailing list
>[email protected]
>http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
> 
>





_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to