From wookey@wookware.org Fri Apr 23 13:54:05 2010
Received: from dream ([213.165.225.113] helo=dream.aleph1.co.uk)
	by stoneboat.aleph1.co.uk with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.69) (envelope-from <wookey@wookware.org>)
	id 1O5IOP-00008K-3y; Fri, 23 Apr 2010 13:54:03 +0100
Received: from wookey by dream.aleph1.co.uk with local (Exim 4.69)
	(envelope-from <wookey@wookware.org>)
	id 1O5IdF-0005Us-OS; Fri, 23 Apr 2010 14:09:21 +0100
Date: Fri, 23 Apr 2010 14:09:19 +0100
From: Wookey <wookey@wookware.org>
To: Charles Manning <manningc2@actrix.gen.nz>
Message-ID: <20100423130917.GQ7110@dream.aleph1.co.uk>
Mail-Followup-To: Charles Manning <manningc2@actrix.gen.nz>,
	balloon@balloonboard.org
References: <201004060933.54586.manningc2@actrix.gen.nz>
	<201004061623.24951.manningc2@actrix.gen.nz>
	<20100406130412.GH7110@dream.aleph1.co.uk>
	<201004071007.33147.manningc2@actrix.gen.nz>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <201004071007.33147.manningc2@actrix.gen.nz>
Organization: Aleph One Ltd
User-Agent: Mutt/1.5.18 (2008-05-17)
X-SA-Exim-Connect-IP: 213.165.225.113
X-SA-Exim-Mail-From: wookey@wookware.org
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on
	stoneboat.aleph1.co.uk
X-Spam-Level: 
X-Spam-Status: No, score=-2.6 required=4.5 tests=AWL,BAYES_00 autolearn=no
	version=3.2.5
X-SA-Exim-Version: 4.2.1 (built Wed, 25 Jun 2008 17:14:11 +0000)
X-SA-Exim-Scanned: Yes (on stoneboat.aleph1.co.uk)
Cc: balloon@balloonboard.org
Subject: Re: [Balloon] Problem loading fs tarball into balloon
X-BeenThere: balloon@balloonboard.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: Balloon List <balloon.balloonboard.org>
List-Unsubscribe: <http://balloonboard.org/mailman/options/balloon>,
	<mailto:balloon-request@balloonboard.org?subject=unsubscribe>
List-Archive: <http://balloonboard.org/lurker/list/balloon.html>
List-Post: <mailto:balloon@balloonboard.org>
List-Help: <mailto:balloon-request@balloonboard.org?subject=help>
List-Subscribe: <http://balloonboard.org/mailman/listinfo/balloon>,
	<mailto:balloon-request@balloonboard.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Apr 2010 12:54:05 -0000

+++ Charles Manning [2010-04-07 10:07 +1200]:
> 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.
> > >
> > > 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.

> # 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:

OK. I've reproduced this and made some progress on what's going wrong.

Currently we do this to generate the depmod file 'offline' with 
/sbin/depmod -ae -b $(TARGETSKEL) -F $(BUILDDIR)/kernel/linux-$(KERNVER)/System.map $(KERNVER)-pxa270

which says 'run it in $TARGETSKEL but then strip that path from the
entries that actually go in the modules.dep file, do it for kernel
$(KERNVER)-pxa270 and check the symbols against
$(BUILDDIR)/kernel/linux-$(KERNVER)/System.map'

In a real run this expands to:
/sbin/depmod -aev -b ../../build/initrd/buildroot/target/generic/target_skeleton_balloon3_installer
 -F ../../build/kernel/linux-2.6.29.1/System.map 2.6.29.1-pxa270

which works just fine on Lenny with modules-init-tools 3.4-1, producing
a file like:
/lib/modules/2.6.29.1-pxa270/kernel/drivers/usb/gadget/g_ether.ko: /lib/modules/2.6.29.1-pxa270/kernel/drivers/usb/gadget/pxa27x_udc.ko                              
/lib/modules/2.6.29.1-pxa270/kernel/drivers/usb/gadget/g_serial.ko: /lib/modules/2.6.29.1-pxa270/kernel /drivers/usb/gadget/pxa27x_udc.ko

but on squeeze with modules-init-tools 3.11-1 (or the current
3.12~pre2-3), it fails, missing off the /lib/modules/2.6.29.1-pxa270/
from the front of each modules.dep entry. As modprobe strips
everything before the first / it starts looking for (for example)
drivers/usb/gadget/g_ether.ko, which fails.

Using realpath to get absolute instead of relative paths doesn't make any difference.

Downgrading to 3.4-1 makes it work again, which I suggest is the best
plan for the time being. I've reported this to Debian and will try and
work up a patch when I get a mo, but I need to make Pootle work this
afternoon.

Wookey
-- 
Principal hats:  iEndian - Balloonboard - Toby Churchill - Emdebian
http://wookware.org/


