Can we boot directly from the MMC card

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

Re: Can we boot directly from the MMC card

by Terry Kemp-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

there won't be any conflict with kernel and / or modules unless you
_add_ different kernel options such as preempt in your initramfs kernel.
remember that even after switch_root you are still running the initramfs
kernel, the only thing that will catch you out is if you have taken out
anything in the kernel config that the original defconfig expects as
'compiled in' then you won't get modules built / installed to the
switch_rootfs  - so you may need rebuild using the original and making
sure that everything you need is selected as modular.

Terry
 
On Mon, 2008-01-14 at 18:18 -0800, Tom Hoffman wrote:

> Augh!  Just kicked of a bitbake of rev 129 from scratch to try a theory and
> now I find out the build is toast.  We'll, if it half works, it will be
> progress for me.  I'll copy the CF oriented init below.  I think I'm having
> an issue getting the modified kernel to play nicely with the modules on the
> roofs resident on the ext3 partition.  The mod kernel was built, tmp wiped,
> and then the rootfs for ext3 built with the original kernel config.  My
> current theory is that this is a no no due to the fact the modules built for
> the vanilla kernel aren't playing nicely with the kernel modified for
> initramfs after /sbin/init kicks off and starts loading things.
>
> #!/bin/sh
> # initramfs /init
>
> die()
> {
> echo ""
> echo "/init failed: $*"
> echo ""
> echo "ERROR! Dropping to a shell so you can figure it out"
> exec /bin/sh
> exit 0
> }
>
> find_module()
> {
> find /lib/modules -name "$1" | grep "$1" > /dev/null 2>&1
> return $?
> }
>
> load_module()
> {
> if find_module "$1.ko" ; then
> echo -n " [*] loading $1 module..."
> modprobe $1 || die "failed to load $1"
> echo "done"
> fi
> }
>
> echo "/init script running..."
>
> if [ ! -d /dev/pts ] ; then
> mkdir /dev/pts || die "failed to mkdir /dev/pts"
> fi
> if [ ! -d /dev/shm ] ; then
> mkdir /dev/shm || die "failed to mkdir /dev/shm"
> fi
>
> mount /dev/pts || die "failed to mount /dev/pts"
> echo "done"
>
> echo -n " [*] mounting /proc..."
> mount -t proc proc /proc || die "failed to mount /proc"
> echo "done"
>
> echo -n " [*] mounting /sys..."
> mount -t sysfs sysfs /sys || die "failed to mount /sys"
> echo "done"
>
> echo -n " [*] starting udevd..."
> /sbin/udevd &
> udevd_pid=$!
> echo "done"
>
> load_module pcmcia
> load_module pxa2xx_cs
> load_module ide-cs
> load_module ide-disk
>
> # Wait for device to be detected... (max 30 secs)
> i=0
> while ! [ -f /proc/ide/ide0/hda/media ] ; do
> /sbin/udevtrigger || die "udevtrigger failed"
> sleep 2
>                echo "Waiting for CF Card to Register. $i/15"
> if [ "$i" = "15" ] ; then
> die "too long waiting on CF card to register"
> fi
> i=`expr $i + 1`
> done
>        echo -n "[*] CF Card Registered"
>
> #echo -n " [*] running e2fsck on /dev/hda2..."
> #/sbin/e2fsck -y /dev/hda2
> #echo "done"
>
> echo -n " [*] mounting /dev/hda2 to /rfs..."
> mount -t ext3 -o rw /dev/hda2 /rfs || die "failed to mount rootfs on second
> CF partition"
> echo "done"
>
> echo -n " [*] Cleaning up..."
> # Clean up
> kill $udevd_pid
> umount -l /proc
> umount -l /sys
> umount -l /dev/pts
> echo "done"
>
> # Switch Root
> echo " [*] Switching to real root fs..."
> exec switch_root /rfs /sbin/init
>
> #shouldn't get here!
> die "switch_root must have failed"
>  


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Re: Can we boot directly from the MMC card

by sakoman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Terry,

Your modules file doesn't look right for 129.  It is missing pxa2xx_cs
and should not have smc911x.

Any idea how this might have happened?  Hope this doesn't mean that it
is time for a clean build.

Steve

On Jan 14, 2008 6:42 PM, Terry Kemp <klc@...> wrote:

> Note: this is on an initramfs switch_root. I could try a standard build
> image to flash - but I shouldn't need to.
>
> It was working on the Verdex - before you had the issues with the Connex
> I saw in another thread. Previously in this thread there is a full
> bootlog with everything OK.
>
> Now I get...
>
> cfio: module license 'unspecified' taints kernel.
> Before register driver
> After register driver
> Error for wireless request "Set ESSID" (8B1A) :
>     SET failed on device wlan0 ; No such device.
> Error for wireless request "Set Mode" (8B06) :
>     SET failed on device wlan0 ; No such device.
> SIOCGIFFLAGS: No such device
> wlan0     No such device
>
> heres /etc/modules...
>
> -------------------------------------------------------
> ### This file is automatically generated by update-modules"
> #
> # Please do not edit this file directly. If you want to change or add
> # anything please take a look at the files in /etc/modutils and read
> # the manpage for update-modules.
> #
> ### update-modules: start processing /etc/modutils/ethernet
> ethernet
>
>
> ### update-modules: end processing /etc/modutils/ethernet
>
> ### update-modules: start processing /etc/modutils/evdev
> evdev
>
> ### update-modules: end processing /etc/modutils/evdev
>
> ### update-modules: start processing /etc/modutils/hidp
> hidp
>
> ### update-modules: end processing /etc/modutils/hidp
>
> ### update-modules: start processing /etc/modutils/mmc_block
> mmc_block
>
> ### update-modules: end processing /etc/modutils/mmc_block
>
> ### update-modules: start processing /etc/modutils/ohci-hcd
> ohci-hcd
>
> ### update-modules: end processing /etc/modutils/ohci-hcd
>
> ### update-modules: start processing /etc/modutils/pcmcia
> pcmcia
>
> ### update-modules: end processing /etc/modutils/pcmcia
>
> ### update-modules: start processing /etc/modutils/proc_gpio
> proc_gpio
>
> ### update-modules: end processing /etc/modutils/proc_gpio
>
> ### update-modules: start processing /etc/modutils/pxamci
> pxamci
>
> ### update-modules: end processing /etc/modutils/pxamci
>
> ### update-modules: start processing /etc/modutils/rfcomm
> rfcomm
>
> ### update-modules: end processing /etc/modutils/rfcomm
>
> ### update-modules: start processing /etc/modutils/smc911x
> smc911x
>
> ### update-modules: end processing /etc/modutils/smc911x
>
> ### update-modules: start processing /etc/modutils/tsc2003
> tsc2003
>
> ### update-modules: end processing /etc/modutils/tsc2003
> ------------------------------------------------------
>
> and
> root@gumstix-custom-verdex:/etc$ lsmod
> Module                  Size  Used by
> i2c_dev                 5828  0
> i2c_pxa                 6912  0
> mcf25                 195600  0
> cfio                    4928  1 mcf25
> nls_iso8859_1           3808  1
> nls_cp437               5472  1
> vfat                    9824  1
> fat                    45532  1 vfat
> nls_base                6336  4 nls_iso8859_1,nls_cp437,vfat,fat
> tsc2003                 7408  0
> i2c_core               16816  3 i2c_dev,i2c_pxa,tsc2003
> rfcomm                 34428  0
> proc_gpio               9348  0
> pcmcia                 24968  1 cfio
> pcmcia_core            30416  3 mcf25,cfio,pcmcia
> firmware_class          7328  1 pcmcia
> ohci_hcd               19556  0
> usbcore               112764  2 ohci_hcd
> hidp                   14656  0
> hid                    26272  1 hidp
> l2cap                  18596  4 rfcomm,hidp
> bluetooth              46688  3 rfcomm,hidp,l2cap
> gumstix_bluetooth       1312  1 bluetooth
> evdev                   7872  0
> smc911x                18753  0
> mii                     4704  1 smc911x
> gumstix_smc911x         2720  1 smc911x
> pxamci                  6176  0
> mmc_block               6504  3
> mmc_core               21780  2 pxamci,mmc_block
>
> Terry
>
>
> On Mon, 2008-01-14 at 18:28 -0800, Steve Sakoman wrote:
> > Wifi should be working in 129
> >
> > If you are still having issues, could you send me a copy of your /etc/modules
> >
> > Steve
> >
> > On Jan 14, 2008 6:20 PM, Terry Kemp <klc@...> wrote:
> > >
> > > On Mon, 2008-01-14 at 17:48 -0800, Steve Sakoman wrote:
> > > > Terry,
> > > >
> > > > Which revision are you working from?
> > > >
> > > > Steve
> > > >
> > >
> > > Revision: 129
> > >
> > >
> > >
> > > > On Jan 14, 2008 5:31 PM, Terry Kemp <klc@...> wrote:
> > > > >
> > > > > On Tue, 2008-01-15 at 14:26 +1300, Terry Kemp wrote:
> > > > > > Seems Steve has broken something on Verdex at the moment (connex wifi
> > > > > > probs?).
> > > > > >
> > > > > Arrrrgh.
> > > > > Kicks himself for being impatient!
> > > > >
> > > > > It was initializing - boots through OK now.
> > > > > WIFI is broken though, must be a module issue.
> > > > >
> > > > >
> > > > > T
> > > > >
> > > > >
> > > > > -------------------------------------------------------------------------
> > > > > Check out the new SourceForge.net Marketplace.
> > > > > It's the best place to buy or sell services for
> > > > > just about anything Open Source.
> > > > > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> > > > > _______________________________________________
> > > > > gumstix-users mailing list
> > > > > gumstix-users@...
> > > > > https://lists.sourceforge.net/lists/listinfo/gumstix-users
> > > > >
> > > >
> > > > -------------------------------------------------------------------------
> > > > Check out the new SourceForge.net Marketplace.
> > > > It's the best place to buy or sell services for
> > > > just about anything Open Source.
> > > > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> > > > _______________________________________________
> > > > gumstix-users mailing list
> > > > gumstix-users@...
> > > > https://lists.sourceforge.net/lists/listinfo/gumstix-users
> > > >
> > > >
> > >
> > >
> > > -------------------------------------------------------------------------
> > > Check out the new SourceForge.net Marketplace.
> > > It's the best place to buy or sell services for
> > > just about anything Open Source.
> > > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> > > _______________________________________________
> > > gumstix-users mailing list
> > > gumstix-users@...
> > > https://lists.sourceforge.net/lists/listinfo/gumstix-users
> > >
> >
> > -------------------------------------------------------------------------
> > Check out the new SourceForge.net Marketplace.
> > It's the best place to buy or sell services for
> > just about anything Open Source.
> > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> > _______________________________________________
> > gumstix-users mailing list
> > gumstix-users@...
> > https://lists.sourceforge.net/lists/listinfo/gumstix-users
> >
> >
>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> gumstix-users mailing list
> gumstix-users@...
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Re: Can we boot directly from the MMC card

by Terry Kemp-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

yeah, checking against the build in flash which is working - I don't
have pxa2xx_core or pxa2xx_cs.
I will delete tmp and try again.

On Mon, 2008-01-14 at 19:04 -0800, Steve Sakoman wrote:

> Terry,
>
> Your modules file doesn't look right for 129.  It is missing pxa2xx_cs
> and should not have smc911x.
>
> Any idea how this might have happened?  Hope this doesn't mean that it
> is time for a clean build.
>
> Steve
>
> On Jan 14, 2008 6:42 PM, Terry Kemp <klc@...> wrote:
> > Note: this is on an initramfs switch_root. I could try a standard build
> > image to flash - but I shouldn't need to.
> >
> > It was working on the Verdex - before you had the issues with the Connex
> > I saw in another thread. Previously in this thread there is a full
> > bootlog with everything OK.
> >
> > Now I get...
> >
> > cfio: module license 'unspecified' taints kernel.
> > Before register driver
> > After register driver
> > Error for wireless request "Set ESSID" (8B1A) :
> >     SET failed on device wlan0 ; No such device.
> > Error for wireless request "Set Mode" (8B06) :
> >     SET failed on device wlan0 ; No such device.
> > SIOCGIFFLAGS: No such device
> > wlan0     No such device
> >
> > heres /etc/modules...
> >
> > -------------------------------------------------------
> > ### This file is automatically generated by update-modules"
> > #
> > # Please do not edit this file directly. If you want to change or add
> > # anything please take a look at the files in /etc/modutils and read
> > # the manpage for update-modules.
> > #
> > ### update-modules: start processing /etc/modutils/ethernet
> > ethernet
> >
> >
> > ### update-modules: end processing /etc/modutils/ethernet
> >
> > ### update-modules: start processing /etc/modutils/evdev
> > evdev
> >
> > ### update-modules: end processing /etc/modutils/evdev
> >
> > ### update-modules: start processing /etc/modutils/hidp
> > hidp
> >
> > ### update-modules: end processing /etc/modutils/hidp
> >
> > ### update-modules: start processing /etc/modutils/mmc_block
> > mmc_block
> >
> > ### update-modules: end processing /etc/modutils/mmc_block
> >
> > ### update-modules: start processing /etc/modutils/ohci-hcd
> > ohci-hcd
> >
> > ### update-modules: end processing /etc/modutils/ohci-hcd
> >
> > ### update-modules: start processing /etc/modutils/pcmcia
> > pcmcia
> >
> > ### update-modules: end processing /etc/modutils/pcmcia
> >
> > ### update-modules: start processing /etc/modutils/proc_gpio
> > proc_gpio
> >
> > ### update-modules: end processing /etc/modutils/proc_gpio
> >
> > ### update-modules: start processing /etc/modutils/pxamci
> > pxamci
> >
> > ### update-modules: end processing /etc/modutils/pxamci
> >
> > ### update-modules: start processing /etc/modutils/rfcomm
> > rfcomm
> >
> > ### update-modules: end processing /etc/modutils/rfcomm
> >
> > ### update-modules: start processing /etc/modutils/smc911x
> > smc911x
> >
> > ### update-modules: end processing /etc/modutils/smc911x
> >
> > ### update-modules: start processing /etc/modutils/tsc2003
> > tsc2003
> >
> > ### update-modules: end processing /etc/modutils/tsc2003
> > ------------------------------------------------------
> >
> > and
> > root@gumstix-custom-verdex:/etc$ lsmod
> > Module                  Size  Used by
> > i2c_dev                 5828  0
> > i2c_pxa                 6912  0
> > mcf25                 195600  0
> > cfio                    4928  1 mcf25
> > nls_iso8859_1           3808  1
> > nls_cp437               5472  1
> > vfat                    9824  1
> > fat                    45532  1 vfat
> > nls_base                6336  4 nls_iso8859_1,nls_cp437,vfat,fat
> > tsc2003                 7408  0
> > i2c_core               16816  3 i2c_dev,i2c_pxa,tsc2003
> > rfcomm                 34428  0
> > proc_gpio               9348  0
> > pcmcia                 24968  1 cfio
> > pcmcia_core            30416  3 mcf25,cfio,pcmcia
> > firmware_class          7328  1 pcmcia
> > ohci_hcd               19556  0
> > usbcore               112764  2 ohci_hcd
> > hidp                   14656  0
> > hid                    26272  1 hidp
> > l2cap                  18596  4 rfcomm,hidp
> > bluetooth              46688  3 rfcomm,hidp,l2cap
> > gumstix_bluetooth       1312  1 bluetooth
> > evdev                   7872  0
> > smc911x                18753  0
> > mii                     4704  1 smc911x
> > gumstix_smc911x         2720  1 smc911x
> > pxamci                  6176  0
> > mmc_block               6504  3
> > mmc_core               21780  2 pxamci,mmc_block
> >
> > Terry
> >
> >
> > On Mon, 2008-01-14 at 18:28 -0800, Steve Sakoman wrote:
> > > Wifi should be working in 129
> > >
> > > If you are still having issues, could you send me a copy of your /etc/modules
> > >
> > > Steve
> > >
> > > On Jan 14, 2008 6:20 PM, Terry Kemp <klc@...> wrote:
> > > >
> > > > On Mon, 2008-01-14 at 17:48 -0800, Steve Sakoman wrote:
> > > > > Terry,
> > > > >
> > > > > Which revision are you working from?
> > > > >
> > > > > Steve
> > > > >
> > > >
> > > > Revision: 129
> > > >
> > > >
> > > >
> > > > > On Jan 14, 2008 5:31 PM, Terry Kemp <klc@...> wrote:
> > > > > >
> > > > > > On Tue, 2008-01-15 at 14:26 +1300, Terry Kemp wrote:
> > > > > > > Seems Steve has broken something on Verdex at the moment (connex wifi
> > > > > > > probs?).
> > > > > > >
> > > > > > Arrrrgh.
> > > > > > Kicks himself for being impatient!
> > > > > >
> > > > > > It was initializing - boots through OK now.
> > > > > > WIFI is broken though, must be a module issue.
> > > > > >
> > > > > >
> > > > > > T
> > > > > >
> > > > > >
> > > > > > -------------------------------------------------------------------------
> > > > > > Check out the new SourceForge.net Marketplace.
> > > > > > It's the best place to buy or sell services for
> > > > > > just about anything Open Source.
> > > > > > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> > > > > > _______________________________________________
> > > > > > gumstix-users mailing list
> > > > > > gumstix-users@...
> > > > > > https://lists.sourceforge.net/lists/listinfo/gumstix-users
> > > > > >
> > > > >
> > > > > -------------------------------------------------------------------------
> > > > > Check out the new SourceForge.net Marketplace.
> > > > > It's the best place to buy or sell services for
> > > > > just about anything Open Source.
> > > > > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> > > > > _______________________________________________
> > > > > gumstix-users mailing list
> > > > > gumstix-users@...
> > > > > https://lists.sourceforge.net/lists/listinfo/gumstix-users
> > > > >
> > > > >
> > > >
> > > >
> > > > -------------------------------------------------------------------------
> > > > Check out the new SourceForge.net Marketplace.
> > > > It's the best place to buy or sell services for
> > > > just about anything Open Source.
> > > > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> > > > _______________________________________________
> > > > gumstix-users mailing list
> > > > gumstix-users@...
> > > > https://lists.sourceforge.net/lists/listinfo/gumstix-users
> > > >
> > >
> > > -------------------------------------------------------------------------
> > > Check out the new SourceForge.net Marketplace.
> > > It's the best place to buy or sell services for
> > > just about anything Open Source.
> > > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> > > _______________________________________________
> > > gumstix-users mailing list
> > > gumstix-users@...
> > > https://lists.sourceforge.net/lists/listinfo/gumstix-users
> > >
> > >
> >
> >
> > -------------------------------------------------------------------------
> > Check out the new SourceForge.net Marketplace.
> > It's the best place to buy or sell services for
> > just about anything Open Source.
> > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> > _______________________________________________
> > gumstix-users mailing list
> > gumstix-users@...
> > https://lists.sourceforge.net/lists/listinfo/gumstix-users
> >
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> gumstix-users mailing list
> gumstix-users@...
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>
>


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
gumstix-users mailing list
gumstix-users@...
https://lists.sourceforge.net/lists/listinfo/gumstix-users

Booting from the CF card via initramfs

by Tom Hoffman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Finally got booting from the CF card via the initramfs method to largely work.  It seems the wireless networking autoconfig decides to eject your CF card if it doesn't successfully detect and bring up the wlan0 interface.  Not very nice when you're in the middle of trying to boot from it.  Special thanks to Terry Kemp and Steve Sakoman for all their help in troubleshooting.  Other things I observed when following Terry's instructions he linked to previously:

1.  Your custom kernel can be bigger than 1MB and still work.
2.  You need to partition the CF card similar to how Terry outlined.  vfat for boot partition and ext3 for rootfs are confirmed to work
3.  Mixing custom kernels with rootfs modules compiled with the vanilla kernel config can possibly be problematic so you may want to build your kernel and rootfs with an identical kernel defconfig
4.  After the CF card is detected, it takes a few seconds to register as the /dev/hda1 and /dev/hda2 devices.  That's where the 4 second sleep in the init file came from.  If you don't wait long enough, the /dev/hda2 to /rfs mount fails.
5. alsa mixer is segfaulting - no idea
6.  Occasionally the boot locks up at:

i2c: msg_num: 1 msg_idx: 0 msg_ptr: 0
i2c: ICR: 000007e9 ISR: 00000004
i2c: log:
I2C: i2c-1: PXA I2C adapter
i2c /dev entries driver

Working on troubleshooting the remaining issues.  If anyone else would like to give this a whirl, here is the init file I'm working from:

#!/bin/sh
# initramfs /init

die()
{
        echo ""
        echo "/init failed: $*"
        echo ""
        echo "ERROR! Dropping to a shell so you can figure it out"
        exec /bin/sh
        exit 0
}

find_module()
{
        find /lib/modules -name "$1" | grep "$1" > /dev/null 2>&1
        return $?
}

load_module()
{
        if find_module "$1.ko" ; then
                echo -n " [*] loading $1 module..."
                modprobe $1 || die "failed to load $1"
                echo "done"
        fi
}

echo "/init script running..."

if [ ! -d /dev/pts ] ; then
        mkdir /dev/pts || die "failed to mkdir /dev/pts"
fi
if [ ! -d /dev/shm ] ; then
        mkdir /dev/shm || die "failed to mkdir /dev/shm"
fi

mount /dev/pts || die "failed to mount /dev/pts"
echo "done"

echo -n " [*] mounting /proc..."
mount -t proc proc /proc || die "failed to mount /proc"
echo "done"

echo -n " [*] mounting /sys..."
mount -t sysfs sysfs /sys || die "failed to mount /sys"
echo "done"

echo -n " [*] starting udevd..."
/sbin/udevd &
udevd_pid=$!
echo "done"

load_module pcmcia
load_module pxa2xx_cs
load_module ide-cs
load_module ide-disk

# Wait for device to be detected... (max 30 secs)
echo "[*] Checking to see if CF Card is registered..."
i=1
sleep 4
while ! [ -f /proc/ide/ide0/hda/media ] ; do
        /sbin/udevtrigger || die "udevtrigger failed"
        sleep 2
        echo "Waiting for CF Card to Register. $i/15"
        if [ "$i" = "15" ] ; then
                die "too long waiting on CF card to register"
        fi
        i=`expr $i + 1`
done
       echo "[*] CF Card Registered"

#echo -n " [*] running e2fsck on /dev/hda2..."
#/sbin/e2fsck -y /dev/hda2
#echo "done"

echo -n " [*] mounting /dev/hda2 to /rfs..."
mount -t ext3 -o rw /dev/hda2 /rfs || die "failed to mount rootfs on second CF partition"
echo "done"

echo -n " [*] Cleaning up..."
# Clean up
kill $udevd_pid
umount -l /proc
umount -l /sys
umount -l /dev/pts
echo "done"

# Switch Root
echo " [*] Switching to real root fs..."
exec switch_root /rfs /sbin/init

#shouldn't get here!
die "switch_root must have failed"


Re: Can we boot directly from the MMC card

by Levi Scott :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

First of all nice work on the initramfs howto. I have a couple
suggestions though. First of all when populating /dev on the ramdisk you
should add mmcblk0p2 to the list (for the ext3 partition on the uSD) and
secondly you might want to add a note that if you have a 64-bit build
environment the path to /tmp/staging/i686-linux/bin/mkimage will
be /tmp/staging/x86_64-linux/bin/mkimage. Keep up the good work.
On Sun, 2008-01-13 at 08:35 +1300, TDK wrote:

> On Sat, 2008-01-12 at 12:42 -0500, Marc Humphreys wrote:
> > Take a look at this.
> > http://docwiki.gumstix.org/Root_filesystems_initflash#Using_the_MMC_Card_as_the_Root_Filesystem
> >
> > Its worked for me in the past.
> >
> >  
> >
> > There is interesting data here
> > http://docwiki.gumstix.org/U-boot#Gumstix-factory.script  on the
> > mechanics behind it, but I think that gumstix-factory script is old.
> > The newer one supports mmc and cf. But it shows you the dirty details
> > of getting it working from scratch. I think a lot of this is no longer
> > necessary, but its been a while since I did it myself.
> >
>
> I have this working - verdex-xm4 booting from uSD.
> I have started documenting it here.
> Still got a lot to go (not fully tested and lots of mistakes) but it
> might assist. Wouldn't mind some feedback if someone gets it working
> with a screen - I don't have one yet.
>
> Terry
>
> >
>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> 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
< Prev | 1 - 2 | Next >