Re: [Balloon] Problem loading fs tarball into balloon

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: balloon
CC: Wookey
Subject: Re: [Balloon] Problem loading fs tarball into balloon
On Wednesday 07 April 2010 01:04:14 Wookey wrote:
> +++ Charles Manning [2010-04-06 16:23 +1200]:
> > On Tuesday 06 April 2010 12:23:16 Wookey wrote:
> > > +++ Charles Manning [2010-04-06 09:33 +1200]:
> > > > Ballooners..
> > > >
> > > > I have successfully used bbl to load a new bootloader, fpga binary
> > > > and kernel, but things came unstuck when I tried to load the tarball
> > > > off the usb flash due to missing kernel modules.
> > > >
> > > > Hints please...
> > > > insmod: /drivers/usb/core/usbcore.ko: No such file or directory
> > >
> > > One of two problems is most likely. Either no modules have been copied
> > > into the tarball, or modules for a different version of the kernel to
> > > the one you are booting.
> > >
> > > The build process makes the modules and produces a modules.tgz in the
> > > build/kernel dir. That tarball is unpacked into the rootfs image
> > > before it is tarred up.
> > >
> > > There are 2MB of modules so we don't do it that way for the buildroot
> > > image - we just copy in a few selected modules - enough to run the USB
> > > host/client, mmc, clock, I2C, nand, pcmcia, ext2/fat USb sticks and
> > > USB/ethernet adaptors. Those are the ones that you seem to be missing
> > > (because this is what 'boot flash' boots into). Check inside the
> > > build/initrd/roofs.arm.cpio file to see if there are any modules in
> > > there, and if so for which kernel version.
> > >
> > > Now the default kernel is 2.6.31 and most users are using 2.6.29.1,
> > > which is what your boot log says so that should be OK. So long as
> > > KERNVER is set in Makefile.inc or makefile.local then it should match
> > > in kernel and initrd, but if you changed it after building one and
> > > before building the other then you could have this problem.
> > >
> > > I can't check my builds right now as my machine appears to have gone
> > > offline/been turned off over Easter.
> > >
> > > Wookey
> >
> > On further looking...
> > Looks like the problem is in the module definitions meaning modprobe
> > looks in the wrong places. modprobe fails but manual insmod works.
>
> That suggests that the modules.dep file generation has gone wrong.
> Have you got one in your modules.tgz or rootfs image?
>
> It looks fine in my build here.
>
> It is generated in the initrd/Makefile target: $(RES)/rootfs.arm.cpio
> with:
> /sbin/depmod -ae -b $(TARGETSKEL) -F
> $(BUILDDIR)/kernel/linux-$(KERNVER)/System.map $(KERNVER)-pxa270
>
> > # uname -a
> > Linux  2.6.29.1-pxa270 #8 Thu Mar 11 14:15:21 NZDT 2010 armv5tel unknown
> > # ls /lib/modules/2.6.29.1-pxa270/kernel/fs/fat -al
> > drwxr-xr-x    2 root     root            0 Mar 10  2010 .
> > drwxr-xr-x    5 root     root            0 Mar 10  2010 ..
> > -rw-r--r--    1 root     root        58654 Mar 10  2010 fat.ko
> > -rw-r--r--    1 root     root        13058 Mar 10  2010 vfat.ko# modprobe
> > vfat insmod: /fs/fat/fat.ko: No such file or directory
> > insmod: /fs/fat/vfat.ko: No such file or directory
> > modprobe: failed to load module vfat
> > # insmod /lib/modules/2.6.29.1-pxa270/kernel/fs/fat/fat.ko
> > # insmod /lib/modules/2.6.29.1-pxa270/kernel/fs/fat/vfat.ko

>
> Those are the right paths, but it looks like you have the 'kernel/'
> part missing in your modprobe.dep file.


Nope. On the balloonboard...
# pwd
/lib/modules/2.6.29.1-pxa270
# cat modules.dep
kernel/drivers/usb/gadget/g_ether.ko: kernel/drivers/usb/gadget/pxa27x_udc.ko
kernel/drivers/usb/gadget/g_serial.ko: kernel/drivers/usb/gadget/pxa27x_udc.ko
kernel/drivers/usb/gadget/pxa27x_udc.ko:
kernel/drivers/usb/core/usbcore.ko:
kernel/drivers/usb/host/ohci-hcd.ko: kernel/drivers/usb/core/usbcore.ko
kernel/drivers/usb/storage/libusual.ko: kernel/drivers/usb/core/usbcore.ko
kernel/drivers/usb/storage/usb-storage.ko: kernel/drivers/scsi/scsi_mod.ko
kernel/drivers/usb/storage/libusual.ko kernel/drivers/usb/core/usbcore.ko
kernel/drivers/pcmcia/pxa2xx_balloon3.ko: kernel/drivers/pcmcia/pxa2xx_core.ko
kernel/drivers/pcmcia/pcmcia_core.ko
kernel/drivers/pcmcia/pxa2xx_core.ko: kernel/drivers/pcmcia/pcmcia_core.ko
kernel/drivers/pcmcia/pcmcia_core.ko:
kernel/drivers/pcmcia/pcmcia.ko: kernel/drivers/pcmcia/pcmcia_core.ko
kernel/drivers/scsi/scsi_mod.ko:
kernel/drivers/scsi/sd_mod.ko: kernel/drivers/scsi/scsi_mod.ko
kernel/drivers/mmc/core/mmc_core.ko:
kernel/drivers/mmc/host/pxamci.ko: kernel/drivers/mmc/core/mmc_core.ko
kernel/drivers/i2c/i2c-core.ko:
kernel/drivers/i2c/busses/i2c-pxa.ko: kernel/drivers/i2c/i2c-core.ko
kernel/drivers/ide/ide-core.ko:
kernel/drivers/net/wireless/hostap/hostap_cs.ko:
kernel/drivers/net/wireless/hostap/hostap.ko kernel/drivers/pcmcia/pcmcia.ko
kernel/drivers/pcmcia/pcmcia_core.ko
kernel/drivers/net/wireless/hostap/hostap.ko:
kernel/drivers/net/wireless/libertas/usb8xxx.ko:
kernel/drivers/net/wireless/libertas/libertas.ko
kernel/drivers/usb/core/usbcore.ko
kernel/drivers/net/wireless/libertas/libertas_cs.ko:
kernel/drivers/net/wireless/libertas/libertas.ko
kernel/drivers/pcmcia/pcmcia.ko kernel/drivers/pcmcia/pcmcia_o
kernel/drivers/net/wireless/libertas/libertas.ko:
kernel/drivers/net/usb/asix.ko: kernel/drivers/net/usb/usbnet.ko
kernel/drivers/usb/core/usbcore.ko kernel/drivers/net/mii.ko
kernel/drivers/net/usb/usbnet.ko: kernel/drivers/usb/core/usbcore.ko
kernel/drivers/net/mii.ko
kernel/drivers/net/usb/dm9601.ko: kernel/drivers/net/usb/usbnet.ko
kernel/drivers/usb/core/usbcore.ko kernel/drivers/net/mii.ko
kernel/drivers/net/usb/pegasus.ko: kernel/drivers/usb/core/usbcore.ko
kernel/drivers/net/mii.ko
kernel/drivers/net/mii.ko:
kernel/fs/ext2/ext2.ko:
kernel/fs/fat/fat.ko:
kernel/fs/fat/vfat.ko: kernel/fs/fat/fat.ko
kernel/fs/nls/nls_cp437.ko:
kernel/fs/nls/nls_iso8859-1.ko:
kernel/fs/nls/nls_cp850.ko:
kernel/fs/nls/nso8859-3.ko:
kernel/fs/nls/nls_iso8859-13.ko:
kernel/fs/nls/nls_iso8859-5.ko:
kernel/fs/nls/nls_iso8859-9.ko:
kernel/fs/nls/nls_iso8859-7.ko:
kernel/fs/nls/nls_iso8859-14.ko:
kernel/fs/nls/nls_utf8.ko:
kernel/fs/nls/nls_iso8859-2.ko:
kernel/fs/nls/nls_iso8859-15.ko:
kernel/fs/nls/nls_iso8859-6.ko:
kernel/fs/nls/nls_iso8859-4.ko:
kernel/fs/nls/nls_cp1250.ko:

>
> > If I insmod all the modules that failed to load I get a lot further...
> > mount fails because it does not find the partition.
>
> The install USBstick needs to be ext2 formatted so that the unpacking
> and configuring works properly. Which partition is not found - the
> MTDblock ones for boot and root or the sda1 one on the USB stick?


The sda1 partition does not show up but the mtdblocks do. The USB stick is
formatted ext2 and shows up fine on the Ubuntu host as an ext2 partition
(sdc1 since I have 2 hard drives).

Once I've manually loaded up the kernel modules dmesg shows insertion events,
but sda1 does not show up which prevents mounting.

Charles