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

Re: Debian on the Ionics Stratus plug computer



On 02/12/14 19:30, Lennart Sorensen wrote:
> On Tue, Dec 02, 2014 at 02:29:29PM -0500, Lennart Sorensen wrote:
>> On Fri, Nov 28, 2014 at 10:20:01AM +0000, Nick wrote:
>>> A related question...
>>>
>>> I have created a kernel package with the procedure described before;
>>> installing this on the plug gets an error saying that the packages
>>> arch (arm) doesn't match the system's (armel).
>> Well if the system is armel, that's good since that's still in Debian.
>> Not sure how you managed to make a kernel package for the old arm
>> architecture.  If you are cross compiling, remember that -aarm is not
>> the same as -aarmel in Debian when doing dpkg-buildpackage and such.

Thanks. dpkg-buildpackage must be yet another way to build debian kernels that I
haven't discovered!

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.

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.

>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).

Cheers,

Nick


Reply to: