[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian on the Ionics Stratus plug computer



On Tue, Dec 02, 2014 at 11:04:59PM +0000, Nick wrote:
> Thanks. dpkg-buildpackage must be yet another way to build debian kernels that I
> haven't discovered!

Well it only works if you have a debian kernel source package.

> make-kpkg was only accepting --arch=arm, then creating an arm .deb.  Using
> --subarch=armel didn't work any better, nor did setting various environment
> variables (ARCH, SUBARCH, DPKG_ARCH).  I don't have the details to hand so I
> have to be a bit vague. Ultimately with some help on IRC from ukleinek I got
> past these problems and tried make deb-pkg again, which I had abandoned (it
> seemed to insist on re-configuring).  And it worked this time.

If make-kpkg doesn't accept armel, then it is probably too old.  Or rather
too new and "broken".  it appears it was fixed in May of this year.

They do have a workaround though here:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=664854#10

It seems to indicate the thing that works is: DEB_HOST_ARCH=armel fakeroot
make-kpkg --arch arm ...

> I'd like to point out, that the description on Debian's own wiki is apparently
> obsolete, and this certainly contributed to the mess I was in:
> 
>     https://wiki.debian.org/HowToRebuildAnOfficialDebianKernelPackage
> 
> It failed for me at step #7 of section "Add a patch to linux and build new
> kernel packages", where it says to run "make -f debian/rules source-all",
> because there is no such target any more. Next I tried the "source" target,
> which exists, but having kernel-package installed (on ubuntu at least) seems to
> stop it working correctly, I got an error "source and diff are obsolete - use
> dpkg-source -b".  Uninstalling kernel-package allows the target to complete, but
> then I cannot get any further because I seem to have no debian/stamps directory,
> and I cannot find a way to get the tool to build it.
> 
> Basically I'm trying to convey the idea that this is a bit confusing for a
> newcomer, and the wiki would benefit from a review.    Perhaps direct the reader
> to the README.source file in the debian/ directory checked out from subversion
> as an early step, as this seems to be more accurate.
> 
> What I actually found worked in the end was something along the lines of
> 
>  ARCH=arm
>  CROSS_COMPILE=arm-linux-gnueabi-
>  DPKG_ARCH=armel
>  make clean
>  make deb-pkg uImage
> 
> My arm-linux-gnueabi-gcc version is 4.6.3, on Ubuntu Precise.  Details to follow.

That should be fine.

> From (I think) reading the debian-administrator handbook I get the impression
> that make deb-pkg is the modern way of doing it, please correct me if I am mistaken.
> 
> And then installing this package on the plug computer to get me an initrd via
> mkinitramfs -o initrd (I am still assuming the initrd is actually required but I
> am not certain).
> 
> I got a modules.tar.gz by archiving debian/tmp/lib, and I created a root
> filesystem via debootstrap as per here.  This may have also been another means
> to build an initrd.
>   
> http://olimex.wordpress.com/2014/07/21/how-to-create-bare-minimum-debian-wheezy-rootfs-from-scratch/
> 
> The result is essentially a debian 3.2.64 kernel.  I assume make deb-pkg applied
> the standard debian patches - can't tell for sure yet.  But when flashed it
> boots and runs mostly ok.  Wifi is one thing that doesn't  - libertas_sdio is
> loaded but can't find any firmware.
> 
> That's my next step; I am going to go looking for prior art at xilka.com.  Any
> pointers are appreciated (such as whether libertas_sdio module is an appropriate
> one - the 2.6.x kernel used a libertas_uap module).

Well try with the environment set as above.  Hopefully that solves it.

-- 
Len Sorensen


Reply to: