Topic: Compiling new modules and kernel source for Infocast Insignia 8"

I need to compile a new module for the Infocast Insignia 8"
I'm assuming that the best way to do that is to cross-compile via a toolchain on a faster host using the original kernel source.

My problem is that on the various chumby sites I found several different kernel sources but it was not clear which one is the right one for the Infocast Insignia 8"

Note that 'uname -a' gives:
Linux chumby-18-19-09 2.6.28-M2.1.8.12 #1 Thu Dec 9 13:04:27 PST 2010 armv5tejl GNU/Linux

So any suggestions where I can find the corresponding kernel source?

Note: I am using a toolchain from codesourcery which I had previously used successfully on various plugcomputers. Specifically,
         http://www.codesourcery.com/sgpp/lite/a … nu.tar.bz2

My make command is:
         make ARCH=arm CROSS_COMPILE=../sourcery/arm-2010q1/bin/arm-none-eabi-

Should this all work ok or do I need a special chumby-specific cross compiler?

Thanks

2 (edited by RunningLight 2011-05-16 08:08:13)

Re: Compiling new modules and kernel source for Infocast Insignia 8"

puterboy:

I'm not going to complain, because I've contributed to it too, but the Wiki is terribly disorganized. There's useful information spread over it and also throughout the forum.

http://wiki.chumby.com/index.php/Hackin … for_chumby gives the link for the source of the kernel that shipped with the Infocast 8 as well as one way to compile it.

Last fall, I was asking about development environments. I settled on ScratchBox2 and the 2008q3 toolchain from Chumby. See my thread "what development environment do you suggest" http://forum.chumby.com/viewtopic.php?id=5460 in which I was advised that using later compilers from CodeSourcery could get me into trouble.

I never tried to recompile the kernel with it but it should have gone ok with the source noted above.

Now, I'm switching over to the OpenEmbedded framework as described in http://wiki.chumby.com/index.php/Buildi … ded_(Beta)

Other than time spent twiddling my thumbs while everything downloaded and built on a mid-range PC, this was a breeze to install. There are bitbake recipes in it for building starter images including silvermoon (aka the Infocast 8).

Regards,
Kent

Re: Compiling new modules and kernel source for Infocast Insignia 8"

RunningLight wrote:

puterboy:


http://wiki.chumby.com/index.php/Hackin … for_chumby gives the link for the source of the kernel that shipped with the Infocast 8 as well as one way to compile it.

Regards,
Kent

Ahh thanks - that is actually one of the sites that I had looked at BUT the page gives several different kernel versions and being a Chumby newbie it wasn't at all clear to me that "silvermoon 1.03" = kernel that infocast 8" ships with. In fact, looking at this page in conjunction with others referencing still other kernel sources is what prompted me to reach out for help to figure out which is the right kernel...

But I gathered that now from your helpful reply since you referenced silvermoon... but please confirm that this is correct.

BTW, I did have trouble compiling another kernel version using my codesourcery toolchain but I will try it again on the silvermoon kernel to see what happens...

Re: Compiling new modules and kernel source for Infocast Insignia 8"

And part of the confusion is that uname -a gave a string "Linux chumby-18-19-09 2.6.28-M2.1.8.12 #1 Thu Dec 9 13:04:27 PST 2010 armv5tejl GNU/Linux" that didn't seem to match any of the wiki source versions.

It would be nice if the chumby kernel source versions had names that matched the 'uname -a' result...

Re: Compiling new modules and kernel source for Infocast Insignia 8"

I just tried compiling the silvermoon kernel and I get the following errror:

  CC      fs/binfmt_aout.o
fs/binfmt_aout.c: In function 'load_aout_binary':
fs/binfmt_aout.c:317: error: 'SEGMENT_SIZE' undeclared (first use in this function)
fs/binfmt_aout.c:317: error: (Each undeclared identifier is reported only once
fs/binfmt_aout.c:317: error: for each function it appears in.)
make[1]: *** [fs/binfmt_aout.o] Error 1
make: *** [fs] Error 2

Any ideas what might be causing it and how to fix it?

6 (edited by RunningLight 2011-05-16 19:48:48)

Re: Compiling new modules and kernel source for Infocast Insignia 8"

puterboy:

What helped me get straight on the different kernels was the illustrated table of Chumby and Chumby-enabled devices on the wiki. It identifies most of the product codenames such as silvermoon, ironforge, etc. Still, it would be nice to have those names reflected in the kernel name or vv.

I'm away from my cross-compiler installations at the moment, but errors like the one you report typically mean there is a missing or inaccessible header file in which the reported identifier is declared. I'll bet the root cause is something simple.

Sorry I can't be more definitive for now.

Regards,
Kent

Re: Compiling new modules and kernel source for Infocast Insignia 8"

puterboy:

So I said-

I'm away from my cross-compiler installations at the moment, but errors like the one you report typically mean there is a missing or inaccessible header file in which the reported identifier is declared. I'll bet the root cause is something simple.

Then I remembered I did have my Infocast 8.

I ssh'd to it. I invoked gcc, which brought down the GNU toolchain.

Then I ran the procedure I previously pointed out, first creating and cd'ing to /mnt/storage/kernel, then wget'ing the kernel source from Chumby and compiling it (well, ok, so I had to use CROSS_COMPILE=arm-angstrom-linux-gnueabi- because that's how the downloaded toolchain binaries are named).

About 12 minutes into the compile, I saw the line "CC         fs/binfmt_aout.o" fly by. It's now 25 minutes into the compile and all I've seen are warnings, no errors. It's still chewing through the fs subdirectory, so I'm going to bed.

Do you have any idea what you've changed in your compilation?

Regards,
Kent

Re: Compiling new modules and kernel source for Infocast Insignia 8"

Yikes!

Three minutes later, it died with an internal compiler error while processing fs/ramfs/inode.c

So much for any smugness I might have been harboring!

I'm going to be away tomorrow, so I'll try to look at this Wednesday.

Regards,
Kent

Re: Compiling new modules and kernel source for Infocast Insignia 8"

RunningLight wrote:

puterboy:
Then I remembered I did have my Infocast 8.

I ssh'd to it. I invoked gcc, which brought down the GNU toolchain.

Then I ran the procedure I previously pointed out, first creating and cd'ing to /mnt/storage/kernel, then wget'ing the kernel source from Chumby and compiling it (well, ok, so I had to use CROSS_COMPILE=arm-angstrom-linux-gnueabi- because that's how the downloaded toolchain binaries are named).

About 12 minutes into the compile, I saw the line "CC         fs/binfmt_aout.o" fly by. It's now 25 minutes into the compile and all I've seen are warnings, no errors. It's still chewing through the fs subdirectory, so I'm going to bed.

Do you have any idea what you've changed in your compilation
Kent

A couple of things are different.
First, I am doing a true cross-compile on an x86 machine.
Second, I am using the code sourcery cross compiler and toolchain. It has worked fine for me in the past compiling kernels for various arm-based NAS devices and plugcomputers.

I could of course try downloading other toolchains but I would prefer not to maintain multiple versions... plus it's not clear to me that that is the root cause of the problem

Re: Compiling new modules and kernel source for Infocast Insignia 8"

puterboy:

I've been away taking care of family. I hope you've sorted your difficulties while I was off the air.

I've just successfully compiled all of the kernel files on my Infocast 8 using the gcc and associated tools that download upon their first invocation. I again suffered one instance of the process dying with an internal compiler error but when I restarted it, it completed. I haven't investigated the problem but I suspect it's due to some internal overflow in the memory-constrained device.

I've also successfully run the OpenEmbedded compile of the silvermoon starter image on a PC running Ubuntu 10.04LTS, as described on the Wiki. This is based on the Angstrom toolchain.

Unfortunately, I've managed to munge up my previous stand-alone CodeSourcery toolchain, as well as my previous scratchbox2 installation which included the CS toolchain, so I can't test with them, but it seems like the source is ok if everything is consistent.

Whenever I start with a new tarball of anything that has to be cross compiled I have to flail around for awhile until I've gotten into the mindset of the provider. I wish there were more uniformity in the setups of the different toolchain offerings.

Regards,
Kent

Re: Compiling new modules and kernel source for Infocast Insignia 8"

RunningLight,

Would it be possible to get a working oe image from you for the infocast (silvermoon)?

I've tried using the various toolchains to build an image but I've never had any luck.

It seems like that the more time that goes by the less likely that a properly built image is possible.

thx