Boot OE from a CompactFlash card

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 | Next >

Boot OE from a CompactFlash card

by Scott Lerman-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I found http://docwiki.gumstix.org/index.php/Root_filesystems#Using_the_CompactFlash_Card_as_the_Root_Filesystem
for booting from a CF card. fw_printenv shows this:

bootcmd=icache on; setenv stderr nulldev; setenv stdout nulldev; if
pinit on && fatload ide 0 a2000000 gumstix-factory.script; then setenv
stdout serial; setenv stderr serial; echo Found gumstix-factory.script
on CF...; autoscr; else if mmcinit && fatload mmc 0 a2000000
gumstix-factory.script; then setenv stdout serial; setenv stderr
serial; echo Found gumstix-factory.script on MMC...; autoscr; else
setenv stdout serial; setenv stderr serial; fsload && bootm; fi; fi

That looks the same as the one on the wiki page, so my first question
is just to confirm, is it already looking at the CF card for a kernel
and file system to boot with? Second, where does the kernel and file
system image need to go?

--
Scott Lerman

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Re: Boot OE from a CompactFlash card

by Steve Sakoman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You also might want to check out:

http://www.gumstix.net/User/view/Developer-how-to-s/Booting-from-microSD/SD/MMC/CF/110.html

Steve


On Mon, May 12, 2008 at 8:57 AM, Scott Lerman <smlerman@...> wrote:

> I found http://docwiki.gumstix.org/index.php/Root_filesystems#Using_the_CompactFlash_Card_as_the_Root_Filesystem
>  for booting from a CF card. fw_printenv shows this:
>
>  bootcmd=icache on; setenv stderr nulldev; setenv stdout nulldev; if
>  pinit on && fatload ide 0 a2000000 gumstix-factory.script; then setenv
>  stdout serial; setenv stderr serial; echo Found gumstix-factory.script
>  on CF...; autoscr; else if mmcinit && fatload mmc 0 a2000000
>  gumstix-factory.script; then setenv stdout serial; setenv stderr
>  serial; echo Found gumstix-factory.script on MMC...; autoscr; else
>  setenv stdout serial; setenv stderr serial; fsload && bootm; fi; fi
>
>  That looks the same as the one on the wiki page, so my first question
>  is just to confirm, is it already looking at the CF card for a kernel
>  and file system to boot with? Second, where does the kernel and file
>  system image need to go?
>
>  --
>  Scott Lerman
>
>  -------------------------------------------------------------------------
>  This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
>  Don't miss this year's exciting event. There's still time to save $100.
>  Use priority code J8TL2D2.
>  http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>  _______________________________________________
>  gumstix-users mailing list
>  gumstix-users@...
>  https://lists.sourceforge.net/lists/listinfo/gumstix-users
>

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Re: Boot OE from a CompactFlash card

by Scott Lerman-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, May 12, 2008 at 12:15 PM, Steve Sakoman <sakoman@...> wrote:

> You also might want to check out:
>
>  http://www.gumstix.net/User/view/Developer-how-to-s/Booting-from-microSD/SD/MMC/CF/110.html
>
>  Steve
>
>
>
>
>  On Mon, May 12, 2008 at 8:57 AM, Scott Lerman <smlerman@...> wrote:
>  > I found http://docwiki.gumstix.org/index.php/Root_filesystems#Using_the_CompactFlash_Card_as_the_Root_Filesystem
>  >  for booting from a CF card. fw_printenv shows this:
>  >
>  >  bootcmd=icache on; setenv stderr nulldev; setenv stdout nulldev; if
>  >  pinit on && fatload ide 0 a2000000 gumstix-factory.script; then setenv
>  >  stdout serial; setenv stderr serial; echo Found gumstix-factory.script
>  >  on CF...; autoscr; else if mmcinit && fatload mmc 0 a2000000
>  >  gumstix-factory.script; then setenv stdout serial; setenv stderr
>  >  serial; echo Found gumstix-factory.script on MMC...; autoscr; else
>  >  setenv stdout serial; setenv stderr serial; fsload && bootm; fi; fi
>  >
>  >  That looks the same as the one on the wiki page, so my first question
>  >  is just to confirm, is it already looking at the CF card for a kernel
>  >  and file system to boot with? Second, where does the kernel and file
>  >  system image need to go?
>  >
>  >  --
>  >  Scott Lerman
>  >
>  >  -------------------------------------------------------------------------
>  >  This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
>  >  Don't miss this year's exciting event. There's still time to save $100.
>  >  Use priority code J8TL2D2.
>  >  http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>  >  _______________________________________________
>  >  gumstix-users mailing list
>  >  gumstix-users@...
>  >  https://lists.sourceforge.net/lists/listinfo/gumstix-users
>  >
>
>  -------------------------------------------------------------------------
>  This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
>  Don't miss this year's exciting event. There's still time to save $100.
>  Use priority code J8TL2D2.
>  http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>  _______________________________________________
>  gumstix-users mailing list
>  gumstix-users@...
>  https://lists.sourceforge.net/lists/listinfo/gumstix-users
>

That looks like it's pretty much exactly what I need. Thanks.

--
Scott Lerman

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Re: Boot OE from a CompactFlash card

by Scott Lerman-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The gumstix-factory.script from that wiki page has this:

if mmcinit; then
       setenv bootargs console=ttyS0,115200n8 rootdelay=1 root=/dev/mmcblk0p2
       if fatload mmc 0 a2000000 uimage; then
               set workedok Success
       fi
fi

Since I'm using CF instead of MMC, does this look right:

if pinit on; then
      setenv bootargs rw console=ttyS0,115200n8 reboot=cold,hard MEDIA=CF
       if fatload ide 0 a2000000 uimage; then
               set workedok Success
       fi
fi

--
Scott Lerman

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Re: Boot OE from a CompactFlash card

by Steve Sakoman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Take a look in your extras/cf-root directory for the script.

Steve

On Mon, May 12, 2008 at 11:34 AM, Scott Lerman <smlerman@...> wrote:

> The gumstix-factory.script from that wiki page has this:
>
>  if mmcinit; then
>        setenv bootargs console=ttyS0,115200n8 rootdelay=1 root=/dev/mmcblk0p2
>        if fatload mmc 0 a2000000 uimage; then
>                set workedok Success
>        fi
>  fi
>
>  Since I'm using CF instead of MMC, does this look right:
>
>  if pinit on; then
>       setenv bootargs rw console=ttyS0,115200n8 reboot=cold,hard MEDIA=CF
>        if fatload ide 0 a2000000 uimage; then
>                set workedok Success
>        fi
>  fi
>
>
>
>  --
>  Scott Lerman
>
>  -------------------------------------------------------------------------
>  This SF.net email is sponsored by: Microsoft
>  Defy all challenges. Microsoft(R) Visual Studio 2008.
>  http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>  _______________________________________________
>  gumstix-users mailing list
>  gumstix-users@...
>  https://lists.sourceforge.net/lists/listinfo/gumstix-users
>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Re: Boot OE from a CompactFlash card

by Steve Sakoman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Or even easier, pick up the tarballs from:

http://www.sakoman.net/oe/cf-boot/

Steve

On Mon, May 12, 2008 at 11:44 AM, Steve Sakoman <sakoman@...> wrote:

> Take a look in your extras/cf-root directory for the script.
>
>  Steve
>
>
>
>  On Mon, May 12, 2008 at 11:34 AM, Scott Lerman <smlerman@...> wrote:
>  > The gumstix-factory.script from that wiki page has this:
>  >
>  >  if mmcinit; then
>  >        setenv bootargs console=ttyS0,115200n8 rootdelay=1 root=/dev/mmcblk0p2
>  >        if fatload mmc 0 a2000000 uimage; then
>  >                set workedok Success
>  >        fi
>  >  fi
>  >
>  >  Since I'm using CF instead of MMC, does this look right:
>  >
>  >  if pinit on; then
>  >       setenv bootargs rw console=ttyS0,115200n8 reboot=cold,hard MEDIA=CF
>  >        if fatload ide 0 a2000000 uimage; then
>  >                set workedok Success
>  >        fi
>  >  fi
>  >
>  >
>  >
>  >  --
>  >  Scott Lerman
>  >
>  >  -------------------------------------------------------------------------
>  >  This SF.net email is sponsored by: Microsoft
>  >  Defy all challenges. Microsoft(R) Visual Studio 2008.
>  >  http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>  >  _______________________________________________
>  >  gumstix-users mailing list
>  >  gumstix-users@...
>  >  https://lists.sourceforge.net/lists/listinfo/gumstix-users
>  >
>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Re: Boot OE from a CompactFlash card

by Scott Lerman-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, May 12, 2008 at 2:48 PM, Steve Sakoman <sakoman@...> wrote:

> Or even easier, pick up the tarballs from:
>
>  http://www.sakoman.net/oe/cf-boot/
>
>  Steve
>
>
>
>  On Mon, May 12, 2008 at 11:44 AM, Steve Sakoman <sakoman@...> wrote:
>  > Take a look in your extras/cf-root directory for the script.
>  >
>  >  Steve
>  >
>  >
>  >
>  >  On Mon, May 12, 2008 at 11:34 AM, Scott Lerman <smlerman@...> wrote:
>  >  > The gumstix-factory.script from that wiki page has this:
>  >  >
>  >  >  if mmcinit; then
>  >  >        setenv bootargs console=ttyS0,115200n8 rootdelay=1 root=/dev/mmcblk0p2
>  >  >        if fatload mmc 0 a2000000 uimage; then
>  >  >                set workedok Success
>  >  >        fi
>  >  >  fi
>  >  >
>  >  >  Since I'm using CF instead of MMC, does this look right:
>  >  >
>  >  >  if pinit on; then
>  >  >       setenv bootargs rw console=ttyS0,115200n8 reboot=cold,hard MEDIA=CF
>  >  >        if fatload ide 0 a2000000 uimage; then
>  >  >                set workedok Success
>  >  >        fi
>  >  >  fi
>  >  >
>  >  >
>  >  >
>  >  >  --
>  >  >  Scott Lerman
>  >  >
>  >  >  -------------------------------------------------------------------------
>  >  >  This SF.net email is sponsored by: Microsoft
>  >  >  Defy all challenges. Microsoft(R) Visual Studio 2008.
>  >  >  http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>  >  >  _______________________________________________
>  >  >  gumstix-users mailing list
>  >  >  gumstix-users@...
>  >  >  https://lists.sourceforge.net/lists/listinfo/gumstix-users
>  >  >
>  >
>
>  -------------------------------------------------------------------------
>  This SF.net email is sponsored by: Microsoft
>  Defy all challenges. Microsoft(R) Visual Studio 2008.
>  http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>  _______________________________________________
>  gumstix-users mailing list
>  gumstix-users@...
>  https://lists.sourceforge.net/lists/listinfo/gumstix-users
>

Looks good, thanks. I noticed in the gumstix-factory.script that
there's a bunch of garbage characters at the top of the file. Is that
the uboot header that I vaguely remember reading about?

--
Scott Lerman

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Re: Boot OE from a CompactFlash card

by gordu :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The gumstix-factory.script  is the result of running mkimage against gumstix-factory.script.source. In gumstix/gumstix-oe/extras/cf-root you should also have a script makefactoryscript.sh that runs mkimage with the right parameters to produce gumstix-factory.script.

If you want to buid your own rootfs and kernel images I found the following
http://www.klc.net.nz/linux/?page_id=10
which mostly worked. I had to tweek a few things (I'll try find my notes)  but in the end it all worked.

gord

On Mon, May 12, 2008 at 1:25 PM, Scott Lerman <smlerman@...> wrote:
On Mon, May 12, 2008 at 2:48 PM, Steve Sakoman <sakoman@...> wrote:
> Or even easier, pick up the tarballs from:
>
>  http://www.sakoman.net/oe/cf-boot/
>
>  Steve
>
>
>
>  On Mon, May 12, 2008 at 11:44 AM, Steve Sakoman <sakoman@...> wrote:
>  > Take a look in your extras/cf-root directory for the script.
>  >
>  >  Steve
>  >
>  >
>  >
>  >  On Mon, May 12, 2008 at 11:34 AM, Scott Lerman <smlerman@...> wrote:
>  >  > The gumstix-factory.script from that wiki page has this:
>  >  >
>  >  >  if mmcinit; then
>  >  >        setenv bootargs console=ttyS0,115200n8 rootdelay=1 root=/dev/mmcblk0p2
>  >  >        if fatload mmc 0 a2000000 uimage; then
>  >  >                set workedok Success
>  >  >        fi
>  >  >  fi
>  >  >
>  >  >  Since I'm using CF instead of MMC, does this look right:
>  >  >
>  >  >  if pinit on; then
>  >  >       setenv bootargs rw console=ttyS0,115200n8 reboot=cold,hard MEDIA=CF
>  >  >        if fatload ide 0 a2000000 uimage; then
>  >  >                set workedok Success
>  >  >        fi
>  >  >  fi
>  >  >
>  >  >
>  >  >
>  >  >  --
>  >  >  Scott Lerman
>  >  >
>  >  >  -------------------------------------------------------------------------
>  >  >  This SF.net email is sponsored by: Microsoft
>  >  >  Defy all challenges. Microsoft(R) Visual Studio 2008.
>  >  >  http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>  >  >  _______________________________________________
>  >  >  gumstix-users mailing list
>  >  >  gumstix-users@...
>  >  >  https://lists.sourceforge.net/lists/listinfo/gumstix-users
>  >  >
>  >
>
>  -------------------------------------------------------------------------
>  This SF.net email is sponsored by: Microsoft
>  Defy all challenges. Microsoft(R) Visual Studio 2008.
>  http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>  _______________________________________________
>  gumstix-users mailing list
>  gumstix-users@...
>  https://lists.sourceforge.net/lists/listinfo/gumstix-users
>

Looks good, thanks. I noticed in the gumstix-factory.script that
there's a bunch of garbage characters at the top of the file. Is that
the uboot header that I vaguely remember reading about?

--
Scott Lerman

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Re: Boot OE from a CompactFlash card

by Scott Lerman-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I got the CF card partitioned and unzipped the kernel and rootfs
archives to the two partitions, but as far as I can tell, the gumstix
doesn't finish booting. /var/log on the CF card is empty, so I'm not
sure what would be wrong. I did notice in /boot on the file system
partition that there's a link uImage -> uImage-2.6.21, but that's the
only thing in the directory (there is no uImage-2.6.21 in the
directory). Not sure if that's a problem or not. Any other ideas?


--
Scott Lerman

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Re: Boot OE from a CompactFlash card

by gordu :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Scott
    Aas far as I know you need three files in the vfat partition,
        gumstix-factory.script
        uImage
        ramdisk.img

The ramdisk.img is a ramfs filesystem that gets mounted by the kernel (which was extracted from uImage) as /, used in the initial boot and then once everything is ready  the system executes the init file which then mounts the ext2 partition from CF onto a mount point in the ramfs (usually /rfs) and then does a  switch_root to /rfs making that the new /.

As to your observations about the files on the CF, the uimage in /boot is not used, and /var/log is empty because the system creates another tempfs in ram and mounts it under /var/log to save wear and tear on the flash.

gord u

On Wed, May 14, 2008 at 7:56 AM, Scott Lerman <smlerman@...> wrote:
I got the CF card partitioned and unzipped the kernel and rootfs
archives to the two partitions, but as far as I can tell, the gumstix
doesn't finish booting. /var/log on the CF card is empty, so I'm not
sure what would be wrong. I did notice in /boot on the file system
partition that there's a link uImage -> uImage-2.6.21, but that's the
only thing in the directory (there is no uImage-2.6.21 in the
directory). Not sure if that's a problem or not. Any other ideas?


--
Scott Lerman

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Re: Boot OE from a CompactFlash card

by Scott Lerman-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

What size does the ramdisk image need to be?

I found one email message that says that the ramdisk.img also needs to
be initialized with

/opt/gumstix-buildroot/build_arm-iwmmxt-linux-gnueabi/u-boot-1.2.0/tools/mkimage
-T ramdisk -C gzip -n "rootfs" -d ramdisk.img.gz -A ARM uRamdisk

If so, do you know offhand where the easiest place to find/get mkimage would be?

On Wed, May 14, 2008 at 1:56 PM, Gord Urquhart <gordurq@...> wrote:

> Scott
>     Aas far as I know you need three files in the vfat partition,
>         gumstix-factory.script
>         uImage
>         ramdisk.img
>
> The ramdisk.img is a ramfs filesystem that gets mounted by the kernel (which
> was extracted from uImage) as /, used in the initial boot and then once
> everything is ready  the system executes the init file which then mounts the
> ext2 partition from CF onto a mount point in the ramfs (usually /rfs) and
> then does a  switch_root to /rfs making that the new /.
>
> As to your observations about the files on the CF, the uimage in /boot is
> not used, and /var/log is empty because the system creates another tempfs in
> ram and mounts it under /var/log to save wear and tear on the flash.
>
> gord u
>
> On Wed, May 14, 2008 at 7:56 AM, Scott Lerman <smlerman@...> wrote:
>>
>> I got the CF card partitioned and unzipped the kernel and rootfs
>> archives to the two partitions, but as far as I can tell, the gumstix
>> doesn't finish booting. /var/log on the CF card is empty, so I'm not
>> sure what would be wrong. I did notice in /boot on the file system
>> partition that there's a link uImage -> uImage-2.6.21, but that's the
>> only thing in the directory (there is no uImage-2.6.21 in the
>> directory). Not sure if that's a problem or not. Any other ideas?
>>
>>
>> --
>> Scott Lerman
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> gumstix-users mailing list
>> gumstix-users@...
>> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> gumstix-users mailing list
> gumstix-users@...
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>
>



--
Scott Lerman

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Re: Boot OE from a CompactFlash card

by gordu :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Scott
   find is your friend, at least is was for me. Not knowing a lot about the OE directory layout I did a lot of finds.
  cd to your gumstix directory and type
      find . -name "*mkimage*"
 As to the size of the ramdisk, even though the name is ramdisk.img its actually a ramfs (see http://www.linuxdevices.com/articles/AT4017834659.html) which are dynamically sized as opposed to the old ramdisks which were of fixed size.

gord u

On Wed, May 14, 2008 at 11:52 AM, Scott Lerman <smlerman@...> wrote:
What size does the ramdisk image need to be?

I found one email message that says that the ramdisk.img also needs to
be initialized with

/opt/gumstix-buildroot/build_arm-iwmmxt-linux-gnueabi/u-boot-1.2.0/tools/mkimage
-T ramdisk -C gzip -n "rootfs" -d ramdisk.img.gz -A ARM uRamdisk

If so, do you know offhand where the easiest place to find/get mkimage would be?

On Wed, May 14, 2008 at 1:56 PM, Gord Urquhart <gordurq@...> wrote:
> Scott
>     Aas far as I know you need three files in the vfat partition,
>         gumstix-factory.script
>         uImage
>         ramdisk.img
>
> The ramdisk.img is a ramfs filesystem that gets mounted by the kernel (which
> was extracted from uImage) as /, used in the initial boot and then once
> everything is ready  the system executes the init file which then mounts the
> ext2 partition from CF onto a mount point in the ramfs (usually /rfs) and
> then does a  switch_root to /rfs making that the new /.
>
> As to your observations about the files on the CF, the uimage in /boot is
> not used, and /var/log is empty because the system creates another tempfs in
> ram and mounts it under /var/log to save wear and tear on the flash.
>
> gord u
>
> On Wed, May 14, 2008 at 7:56 AM, Scott Lerman <smlerman@...> wrote:
>>
>> I got the CF card partitioned and unzipped the kernel and rootfs
>> archives to the two partitions, but as far as I can tell, the gumstix
>> doesn't finish booting. /var/log on the CF card is empty, so I'm not
>> sure what would be wrong. I did notice in /boot on the file system
>> partition that there's a link uImage -> uImage-2.6.21, but that's the
>> only thing in the directory (there is no uImage-2.6.21 in the
>> directory). Not sure if that's a problem or not. Any other ideas?
>>
>>
>> --
>> Scott Lerman
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> gumstix-users mailing list
>> gumstix-users@...
>> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> gumstix-users mailing list
> gumstix-users@...
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>
>



--
Scott Lerman

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Re: Boot OE from a CompactFlash card

by Scott Lerman-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, May 14, 2008 at 7:36 PM, Gord Urquhart <gordurq@...> wrote:

> Scott
>    find is your friend, at least is was for me. Not knowing a lot about the
> OE directory layout I did a lot of finds.
>   cd to your gumstix directory and type
>       find . -name "*mkimage*"
>  As to the size of the ramdisk, even though the name is ramdisk.img its
> actually a ramfs (see
> http://www.linuxdevices.com/articles/AT4017834659.html) which are
> dynamically sized as opposed to the old ramdisks which were of fixed size.
>
> gord u
>
> On Wed, May 14, 2008 at 11:52 AM, Scott Lerman <smlerman@...> wrote:
>>
>> What size does the ramdisk image need to be?
>>
>> I found one email message that says that the ramdisk.img also needs to
>> be initialized with
>>
>>
>> /opt/gumstix-buildroot/build_arm-iwmmxt-linux-gnueabi/u-boot-1.2.0/tools/mkimage
>> -T ramdisk -C gzip -n "rootfs" -d ramdisk.img.gz -A ARM uRamdisk
>>
>> If so, do you know offhand where the easiest place to find/get mkimage
>> would be?
>>
>> On Wed, May 14, 2008 at 1:56 PM, Gord Urquhart <gordurq@...> wrote:
>> > Scott
>> >     Aas far as I know you need three files in the vfat partition,
>> >         gumstix-factory.script
>> >         uImage
>> >         ramdisk.img
>> >
>> > The ramdisk.img is a ramfs filesystem that gets mounted by the kernel
>> > (which
>> > was extracted from uImage) as /, used in the initial boot and then once
>> > everything is ready  the system executes the init file which then mounts
>> > the
>> > ext2 partition from CF onto a mount point in the ramfs (usually /rfs)
>> > and
>> > then does a  switch_root to /rfs making that the new /.
>> >
>> > As to your observations about the files on the CF, the uimage in /boot
>> > is
>> > not used, and /var/log is empty because the system creates another
>> > tempfs in
>> > ram and mounts it under /var/log to save wear and tear on the flash.
>> >
>> > gord u
>> >
>> > On Wed, May 14, 2008 at 7:56 AM, Scott Lerman <smlerman@...>
>> > wrote:
>> >>
>> >> I got the CF card partitioned and unzipped the kernel and rootfs
>> >> archives to the two partitions, but as far as I can tell, the gumstix
>> >> doesn't finish booting. /var/log on the CF card is empty, so I'm not
>> >> sure what would be wrong. I did notice in /boot on the file system
>> >> partition that there's a link uImage -> uImage-2.6.21, but that's the
>> >> only thing in the directory (there is no uImage-2.6.21 in the
>> >> directory). Not sure if that's a problem or not. Any other ideas?
>> >>
>> >>
>> >> --
>> >> Scott Lerman
>> >>
>> >>
>> >> -------------------------------------------------------------------------
>> >> This SF.net email is sponsored by: Microsoft
>> >> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> >> _______________________________________________
>> >> gumstix-users mailing list
>> >> gumstix-users@...
>> >> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>> >
>> >
>> >
>> > -------------------------------------------------------------------------
>> > This SF.net email is sponsored by: Microsoft
>> > Defy all challenges. Microsoft(R) Visual Studio 2008.
>> > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> > _______________________________________________
>> > gumstix-users mailing list
>> > gumstix-users@...
>> > https://lists.sourceforge.net/lists/listinfo/gumstix-users
>> >
>> >
>>
>>
>>
>> --
>> Scott Lerman
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> gumstix-users mailing list
>> gumstix-users@...
>> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> gumstix-users mailing list
> gumstix-users@...
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>
>

I've followed all the instructions from
http://www.klc.net.nz/linux/?page_id=10, and it looked like everything
worked, but it appears to be booting from the internal flash memory
instead of the CF card. Any suggestions on what to check?

--
Scott Lerman

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Re: Boot OE from a CompactFlash card

by gordu