Topic: kernel modules (and/or kernel compilation)

Hello once again,

It looks like our project would require the TUN/TAP virtual interface module. As far as I remember, this used to be available for the other Chumbies but it's not in the NeTV repository (opkg list doesn't show it).

Are there any instructions on how to compile a new kernel (and new modules) for the NeTV? I was able to find instructions for the older boards/devices, is there anything I can reuse from there?

Any chance you guys could add the TUN/TAP module to the repository?

Thank you,
Razvan

Re: kernel modules (and/or kernel compilation)

This is a question for xobs. I'll ping him.

7BAA 2E53 01C1 DCFF 497B  E7F0 9699 A303 78F0 D9B9

Re: kernel modules (and/or kernel compilation)

Hi Razvan,

Sure, I'll enable the TUN/TAP driver for NeTV.  It was disabled a while ago, along with many other modules, while we were still getting used to openembedded.

If you're using the Amazon AMI, there are steps for changing the kernel config.  It tells you how to compile a kernel and modules, then how to copy the compiled modules onto your device.

Re: kernel modules (and/or kernel compilation)

Thanks! I'm not using the AMI, I'm trying to reuse the ARM compiler and build tools that we used for the Chumby One and it appears to work fine so far (I was able to move the executables created with that toolchain to the NeTV and they work fine).

However, following the instructions from http://wiki.chumby.com/index.php/Hackin … mby_kernel I was unable to create the kernel modules - I mean they are created but they do not load on the NeTV, so I'm guessing the configuration or platform is different.

Any hints?

Thanks again,
Razvan

Re: kernel modules (and/or kernel compilation)

BTW, if you guys could post the kernel source and the config file used (similar to what you did here: http://wiki.chumby.com/index.php/Hackin … mby_kernel ) I guess I could compile it myself. I'm going to start up that AMI and see if I can extract it from over there, but it does seem just too complex for a simple kernel compilation (I don't want to mess with OpenEmbedded unless I really have to smile ).

Thanks,
Razvan

Re: kernel modules (and/or kernel compilation)

Ok, has anyone actually managed to compile some kernel modules using the d**n AMI image? I've been at it for 3 hours now and the modules it produces are not loadable on the NeTV.

First, it complained about a missing "version magic" - disabling modversions in the kernel got rid of that (or simply forcing the load of the module), but now it complains about an "undefined symbol: malloc_sizes".

Changing the kernel to use SLUB instead of SLAB (whatever those are) gets rid of the malloc_sizes problem, the module appears to load but doesn't work (no output in dmesg, device is not created, etc).

Is the config on the AMI the exact same one that was used to generate the current firmware? What am I missing? I'm trying to generate a module for the current kernel on the NeTV, not regenerate the entire kernel. This is driving me crazy! sad

Razvan

Re: kernel modules (and/or kernel compilation)

The AMI is a direct snapshot of our build, so it should work....

Do you have a spare microSD card around? If you do, try this.

1. Force a build on the AMI to update the opkg pointers to your AMI URL.

http://your_ami_url/waterfall , click on "netv" waterfall and click on the "rebuild" or "forcebuild" button. It should only take a few minutes to rebuild.

2. Grab the rebuilt ROM image and blast it onto your new microSD card

http://your_ami_url/output/images/chumby-silvermoon-netv/rom-chumby-silvermoon-netv-chumby-image.img.tgz

(see screenshot at bottom of http://wiki.chumby.com/index.php/Screen … _NeTV_AMI)

Do a 'zcat rom-chumby-silvermoon-netv-chumby-image.img.tgz | sudo dd of=/dev/sdX bs=8M'

to write your built image onto the card.

3. Now follow the instructions at

http://wiki.chumby.com/index.php/NeTV_AMI_Instance

See the section on building kernel modules and/or rebuilding the kernel

You should be able to take the new modules from there and manually load them in.

But, a better way to do it is to push the kernel changes back into the local cgit repo, and then modify meta-chumby/recipes/linux/linux-silvermoon-netv_2.6.28.bb -- look for a line that says something like 'PR = "rXX" ' and increment the XX, and push the file back into git. Once you do the push, the build system will pick it up and rebuild the kernel package automatically (you can track progress on the waterfall view).

When that's done, you should be able to just do an opkg update; opkg upgrade and have the modules auto-installed into your system.

Sorry for all the frustration -- we're working on trying to make this process easier...

7BAA 2E53 01C1 DCFF 497B  E7F0 9699 A303 78F0 D9B9

Re: kernel modules (and/or kernel compilation)

Bunnie, there is definitely something wrong with the build system. Here's my session on an AMI started from your image, from scratch (this is the first login):

========================================================

Linux ip-10-128-245-27 2.6.32-317-ec2 #36-Ubuntu SMP Fri Jul 8 17:53:11 UTC 2011 i686 GNU/Linux
Ubuntu 10.04.3 LTS

Welcome to Ubuntu!
* Documentation:  https://help.ubuntu.com/

  System information as of Wed Oct  5 16:52:08 UTC 2011

  System load:  0.41               Processes:           100
  Usage of /:   52.9% of 49.21GB   Users logged in:     0
  Memory usage: 3%                 IP address for eth0: 10.128.245.27
  Swap usage:   0%

  Graph this data and manage this system at https://landscape.canonical.com/
---------------------------------------------------------------------
At the moment, only the core of the system is installed. To tune the
system to your needs, you can choose to install one or more         
predefined collections of software by running the following         
command:                                                             
                                                                     
   sudo tasksel --section server                                     
---------------------------------------------------------------------

17 packages can be updated.
7 updates are security updates.

A newer build of the Ubuntu lucid server image is available.
It is named 'release' and has build serial '20110930'.
Last login: Sun Sep 11 09:22:28 2011 from 119.234.73.225
ubuntu@ip-10-128-245-27:~$ cd chumby-oe/
ubuntu@ip-10-128-245-27:~/chumby-oe$ source setup-chumby.sh
Chose a platform for OE:
    1) Falconwing
    2) Silvermoon (chumby8)
    3) Icecrown
    4) Wintergrasp
    5) Silvermoon (NeTV)
-> 5
Environment set up to build angstrom-2010.x for chumby-silvermoon-netv
ubuntu@ip-10-128-245-27:~/chumby-oe$
ubuntu@ip-10-128-245-27:~/chumby-oe$ bitbake chumby-image

Loading cache: 100% |###############################################################################################| Time: 00:00:06
Loaded 7225 entries from dependency cache.
Parsing recipes: 100% |#############################################################################################| Time: 00:00:19
Parsing of 7400 .bb files complete (6606 cached, 794 parsed). 8039 targets, 358 skipped, 0 masked, 0 errors.

Build Configuration:
BB_VERSION        = "1.12.0"
METADATA_BRANCH   = "org.openembedded.dev"
METADATA_REVISION = "96504d9"
TARGET_ARCH       = "arm"
TARGET_OS         = "linux-gnueabi"
MACHINE           = "chumby-silvermoon-netv"
DISTRO            = "angstrom"
DISTRO_VERSION    = "v20110703"
TARGET_FPU        = "soft"
DISTRO_TYPE       = "debug"
BB_NUMBER_THREADS = "3"
PARALLEL_MAKE     = "-j4"
CHUMBY_BUILD      = "1"
CHUMBY_BUILDER    = "localhost"
FEED_DEPLOYDIR_BASE_URI = "http://ec2-46-137-228-166.ap-southeast- … utput/ipk/"

NOTE: Resolving any missing task queue dependencies
NOTE: multiple providers are available for runtime libstdc++-dev (gcc, external-toolchain-csl, external-toolchain-generic, external-toolchain)
NOTE: consider defining a PREFERRED_PROVIDER entry to match libstdc++-dev
NOTE: preferred version 2.4 of libtool-sdk not available (for item libltdl-dev)
NOTE: multiple providers are available for runtime libltdl-dev (libtool, libtool-sdk)
NOTE: consider defining a PREFERRED_PROVIDER entry to match libltdl-dev
NOTE: Preparing runqueue
NOTE: Executing RunQueue Tasks
NOTE: Removing stamps: /home/ubuntu/chumby-oe/output-angstrom-.9/stamps/chumby-silvermoon-netv-angstrom-linux-gnueabi/chumby-image-1.0-r0.*
NOTE: Running task 4970 of 7851 (ID: 3103, /home/ubuntu/chumby-oe/meta-chumby/recipes/chumby-netvserver/chumby-netvserver_1.0.bb, do_setscene)
NOTE: Running task 5739 of 7851 (ID: 3122, /home/ubuntu/chumby-oe/meta-chumby/recipes/chumby-netvbrowser/chumby-netvbrowser_1.0.bb, do_setscene)
NOTE: package chumby-netvserver-1.0-r102: task do_setscene: Started
NOTE: Running task 6035 of 7851 (ID: 1391, /home/ubuntu/chumby-oe/meta-chumby/recipes/netv/netv-utils_0.bb, do_setscene)
NOTE: package chumby-netvbrowser-1.0-r65: task do_setscene: Started
NOTE: package netv-utils-0-r67: task do_setscene: Started
NOTE: package chumby-netvserver-1.0-r102: task do_setscene: Succeeded
NOTE: Running task 6036 of 7851 (ID: 3101, /home/ubuntu/chumby-oe/meta-chumby/recipes/chumby-netvserver/chumby-netvserver_1.0.bb, do_fetch)
NOTE: package chumby-netvserver-1.0-r102: task do_fetch: Started
NOTE: package chumby-netvbrowser-1.0-r65: task do_setscene: Succeeded
NOTE: Running task 6037 of 7851 (ID: 3120, /home/ubuntu/chumby-oe/meta-chumby/recipes/chumby-netvbrowser/chumby-netvbrowser_1.0.bb, do_fetch)
NOTE: package chumby-netvbrowser-1.0-r65: task do_fetch: Started
NOTE: package netv-utils-0-r67: task do_setscene: Succeeded
NOTE: Running task 6038 of 7851 (ID: 1389, /home/ubuntu/chumby-oe/meta-chumby/recipes/netv/netv-utils_0.bb, do_fetch)
NOTE: package netv-utils-0-r67: task do_fetch: Started
NOTE: package netv-utils-0-r67: task do_fetch: Succeeded
NOTE: Running task 6039 of 7851 (ID: 1381, /home/ubuntu/chumby-oe/meta-chumby/recipes/netv/netv-utils_0.bb, do_unpack)
NOTE: package netv-utils-0-r67: task do_unpack: Started
NOTE: package netv-utils-0-r67: task do_unpack: Succeeded
NOTE: Running task 6040 of 7851 (ID: 1382, /home/ubuntu/chumby-oe/meta-chumby/recipes/netv/netv-utils_0.bb, do_patch)
NOTE: package netv-utils-0-r67: task do_patch: Started
NOTE: package netv-utils-0-r67: task do_patch: Succeeded
NOTE: Running task 6041 of 7851 (ID: 1392, /home/ubuntu/chumby-oe/meta-chumby/recipes/netv/netv-utils_0.bb, do_configure)
NOTE: package netv-utils-0-r67: task do_configure: Started
NOTE: package netv-utils-0-r67: task do_configure: Succeeded
NOTE: Running task 6042 of 7851 (ID: 1393, /home/ubuntu/chumby-oe/meta-chumby/recipes/netv/netv-utils_0.bb, do_qa_configure)
NOTE: package netv-utils-0-r67: task do_qa_configure: Started
NOTE: package netv-utils-0-r67: task do_qa_configure: Succeeded
NOTE: Running task 6043 of 7851 (ID: 1394, /home/ubuntu/chumby-oe/meta-chumby/recipes/netv/netv-utils_0.bb, do_compile)
NOTE: package netv-utils-0-r67: task do_compile: Started
From http://git.chumby.com.sg/git/chumby-sg/ … etvbrowser
  * branch            master     -> FETCH_HEAD
fatal: Zero packs found!
NOTE: package netv-utils-0-r67: task do_compile: Succeeded
NOTE: Running task 6044 of 7851 (ID: 1383, /home/ubuntu/chumby-oe/meta-chumby/recipes/netv/netv-utils_0.bb, do_install)
NOTE: package netv-utils-0-r67: task do_install: Started
NOTE: package netv-utils-0-r67: task do_install: Succeeded
NOTE: Running task 6045 of 7851 (ID: 1395, /home/ubuntu/chumby-oe/meta-chumby/recipes/netv/netv-utils_0.bb, do_package)
NOTE: package netv-utils-0-r67: task do_package: Started
WARNING: /home/ubuntu/chumby-oe/bitbake-1.12.0/lib/bb/fetch/git.py:191: DeprecationWarning: Call to deprecated function bb.mkdirhier: Please use bb.utils.mkdirhier instead.
  bb.mkdirhier(codir)

NOTE: package chumby-netvbrowser-1.0-r65: task do_fetch: Succeeded
NOTE: Running task 6046 of 7851 (ID: 3112, /home/ubuntu/chumby-oe/meta-chumby/recipes/chumby-netvbrowser/chumby-netvbrowser_1.0.bb, do_unpack)
NOTE: package chumby-netvbrowser-1.0-r65: task do_unpack: Started
NOTE: package chumby-netvbrowser-1.0-r65: task do_unpack: Succeeded
NOTE: Running task 6047 of 7851 (ID: 3113, /home/ubuntu/chumby-oe/meta-chumby/recipes/chumby-netvbrowser/chumby-netvbrowser_1.0.bb, do_patch)
NOTE: package chumby-netvbrowser-1.0-r65: task do_patch: Started
NOTE: package chumby-netvbrowser-1.0-r65: task do_patch: Succeeded
NOTE: Running task 6048 of 7851 (ID: 3123, /home/ubuntu/chumby-oe/meta-chumby/recipes/chumby-netvbrowser/chumby-netvbrowser_1.0.bb, do_generate_qt_config_file)
NOTE: package chumby-netvbrowser-1.0-r65: task do_generate_qt_config_file: Started
NOTE: package chumby-netvbrowser-1.0-r65: task do_generate_qt_config_file: Succeeded
NOTE: Running task 6049 of 7851 (ID: 3124, /home/ubuntu/chumby-oe/meta-chumby/recipes/chumby-netvbrowser/chumby-netvbrowser_1.0.bb, do_configure)
NOTE: package chumby-netvbrowser-1.0-r65: task do_configure: Started
NOTE: package chumby-netvbrowser-1.0-r65: task do_configure: Succeeded
NOTE: Running task 6050 of 7851 (ID: 3125, /home/ubuntu/chumby-oe/meta-chumby/recipes/chumby-netvbrowser/chumby-netvbrowser_1.0.bb, do_qa_configure)
NOTE: package chumby-netvbrowser-1.0-r65: task do_qa_configure: Started
NOTE: package chumby-netvbrowser-1.0-r65: task do_qa_configure: Succeeded
NOTE: Running task 6051 of 7851 (ID: 3126, /home/ubuntu/chumby-oe/meta-chumby/recipes/chumby-netvbrowser/chumby-netvbrowser_1.0.bb, do_compile)
NOTE: package chumby-netvbrowser-1.0-r65: task do_compile: Started
From http://git.chumby.com.sg/git/chumby-sg/ … netvserver
  * branch            master     -> FETCH_HEAD
fatal: Zero packs found!
WARNING: /home/ubuntu/chumby-oe/bitbake-1.12.0/lib/bb/fetch/git.py:191: DeprecationWarning: Call to deprecated function bb.mkdirhier: Please use bb.utils.mkdirhier instead.
  bb.mkdirhier(codir)

NOTE: package netv-utils-0-r67: task do_package: Succeeded
NOTE: Running task 6052 of 7851 (ID: 3128, /home/ubuntu/chumby-oe/meta-chumby/recipes/chumby-netvbrowser/chumby-netvbrowser_1.0.bb, do_distribute_sources)
NOTE: package chumby-netvbrowser-1.0-r65: task do_distribute_sources: Started
NOTE: package chumby-netvserver-1.0-r102: task do_fetch: Succeeded
NOTE: Running task 6053 of 7851 (ID: 3093, /home/ubuntu/chumby-oe/meta-chumby/recipes/chumby-netvserver/chumby-netvserver_1.0.bb, do_unpack)
NOTE: package chumby-netvbrowser-1.0-r65: task do_distribute_sources: Succeeded
NOTE: Running task 6054 of 7851 (ID: 3109, /home/ubuntu/chumby-oe/meta-chumby/recipes/chumby-netvserver/chumby-netvserver_1.0.bb, do_distribute_sources)
NOTE: package chumby-netvserver-1.0-r102: task do_unpack: Started
NOTE: package chumby-netvserver-1.0-r102: task do_distribute_sources: Started
NOTE: package chumby-netvserver-1.0-r102: task do_unpack: Succeeded
NOTE: Running task 6055 of 7851 (ID: 3094, /home/ubuntu/chumby-oe/meta-chumby/recipes/chumby-netvserver/chumby-netvserver_1.0.bb, do_patch)
NOTE: package chumby-netvserver-1.0-r102: task do_patch: Started
NOTE: package chumby-netvserver-1.0-r102: task do_patch: Succeeded
NOTE: Running task 6056 of 7851 (ID: 3104, /home/ubuntu/chumby-oe/meta-chumby/recipes/chumby-netvserver/chumby-netvserver_1.0.bb, do_generate_qt_config_file)
NOTE: package chumby-netvserver-1.0-r102: task do_generate_qt_config_file: Started
NOTE: package chumby-netvserver-1.0-r102: task do_generate_qt_config_file: Succeeded
NOTE: Running task 6057 of 7851 (ID: 3105, /home/ubuntu/chumby-oe/meta-chumby/recipes/chumby-netvserver/chumby-netvserver_1.0.bb, do_configure)
NOTE: package chumby-netvserver-1.0-r102: task do_configure: Started
NOTE: package chumby-netvserver-1.0-r102: task do_distribute_sources: Succeeded
NOTE: Running task 6058 of 7851 (ID: 1384, /home/ubuntu/chumby-oe/meta-chumby/recipes/netv/netv-utils_0.bb, do_populate_sysroot)
NOTE: package netv-utils-0-r67: task do_populate_sysroot: Started
NOTE: package netv-utils-0-r67: task do_populate_sysroot: Succeeded
NOTE: Running task 6059 of 7851 (ID: 1398, /home/ubuntu/chumby-oe/meta-chumby/recipes/netv/netv-utils_0.bb, do_package_write_ipk)
NOTE: package chumby-netvserver-1.0-r102: task do_configure: Succeeded
NOTE: Running task 6060 of 7851 (ID: 3106, /home/ubuntu/chumby-oe/meta-chumby/recipes/chumby-netvserver/chumby-netvserver_1.0.bb, do_qa_configure)
NOTE: package chumby-netvserver-1.0-r102: task do_qa_configure: Started
NOTE: package chumby-netvserver-1.0-r102: task do_qa_configure: Succeeded
NOTE: Running task 6061 of 7851 (ID: 3107, /home/ubuntu/chumby-oe/meta-chumby/recipes/chumby-netvserver/chumby-netvserver_1.0.bb, do_compile)
NOTE: package chumby-netvserver-1.0-r102: task do_compile: Started
NOTE: package netv-utils-0-r67: task do_package_write_ipk: Started
Packaged contents of netv-utils-dbg into /home/ubuntu/chumby-oe/output-angstrom-.9/deploy/eglibc/ipk/chumby-silvermoon-netv/netv-utils-dbg_0-r67.9_chumby-silvermoon-netv.ipk
Packaged contents of netv-utils into /home/ubuntu/chumby-oe/output-angstrom-.9/deploy/eglibc/ipk/chumby-silvermoon-netv/netv-utils_0-r67.9_chumby-silvermoon-netv.ipk
Packaged contents of netv-utils-dev into /home/ubuntu/chumby-oe/output-angstrom-.9/deploy/eglibc/ipk/chumby-silvermoon-netv/netv-utils-dev_0-r67.9_chumby-silvermoon-netv.ipk
NOTE: package netv-utils-0-r67: task do_package_write_ipk: Succeeded
NOTE: Running task 6062 of 7851 (ID: 1386, /home/ubuntu/chumby-oe/meta-chumby/recipes/netv/netv-utils_0.bb, do_package_write)
NOTE: package netv-utils-0-r67: task do_package_write: Started
NOTE: package netv-utils-0-r67: task do_package_write: Succeeded
NOTE: Running task 6063 of 7851 (ID: 1385, /home/ubuntu/chumby-oe/meta-chumby/recipes/netv/netv-utils_0.bb, do_qa_staging)
NOTE: package netv-utils-0-r67: task do_qa_staging: Started
NOTE: package chumby-netvserver-1.0-r102: task do_compile: Succeeded
NOTE: Running task 6064 of 7851 (ID: 3095, /home/ubuntu/chumby-oe/meta-chumby/recipes/chumby-netvserver/chumby-netvserver_1.0.bb, do_install)
NOTE: package chumby-netvserver-1.0-r102: task do_install: Started
ERROR: Logfile of failure stored in: /home/ubuntu/chumby-oe/output-angstrom-.9/work/armv5te-angstrom-linux-gnueabi/chumby-netvserver-1.0-r102/temp/log.do_install.2108
Log data follows:
| + do_install
| + install -d /home/ubuntu/chumby-oe/output-angstrom-.9/work/armv5te-angstrom-linux-gnueabi/chumby-netvserver-1.0-r102/image/usr/bin
| + install -d /home/ubuntu/chumby-oe/output-angstrom-.9/work/armv5te-angstrom-linux-gnueabi/chumby-netvserver-1.0-r102/image/etc/init.d
| + install -d /home/ubuntu/chumby-oe/output-angstrom-.9/work/armv5te-angstrom-linux-gnueabi/chumby-netvserver-1.0-r102/image/usr/share/netvserver
| + install -d /home/ubuntu/chumby-oe/output-angstrom-.9/work/armv5te-angstrom-linux-gnueabi/chumby-netvserver-1.0-r102/image/usr/share/netvserver/cookies
| + install -d /home/ubuntu/chumby-oe/output-angstrom-.9/work/armv5te-angstrom-linux-gnueabi/chumby-netvserver-1.0-r102/image/usr/share/netvserver/docroot/scripts
| + install -d /home/ubuntu/chumby-oe/output-angstrom-.9/work/armv5te-angstrom-linux-gnueabi/chumby-netvserver-1.0-r102/image/usr/share/netvserver/docroot/html_test
| + install -d /home/ubuntu/chumby-oe/output-angstrom-.9/work/armv5te-angstrom-linux-gnueabi/chumby-netvserver-1.0-r102/image/usr/share/netvserver/docroot/html_remote
| + install -d /home/ubuntu/chumby-oe/output-angstrom-.9/work/armv5te-angstrom-linux-gnueabi/chumby-netvserver-1.0-r102/image/usr/share/netvserver/docroot/html_config
| + install -d /home/ubuntu/chumby-oe/output-angstrom-.9/work/armv5te-angstrom-linux-gnueabi/chumby-netvserver-1.0-r102/image/usr/share/netvserver/docroot/html_update
| + install -d /home/ubuntu/chumby-oe/output-angstrom-.9/work/armv5te-angstrom-linux-gnueabi/chumby-netvserver-1.0-r102/image/usr/share/netvserver/docroot/tests
| + install -d /home/ubuntu/chumby-oe/output-angstrom-.9/work/armv5te-angstrom-linux-gnueabi/chumby-netvserver-1.0-r102/image/usr/share/netvserver/docroot/tmp
| + ln -sf /tmp /home/ubuntu/chumby-oe/output-angstrom-.9/work/armv5te-angstrom-linux-gnueabi/chumby-netvserver-1.0-r102/image/usr/share/netvserver/docroot/tmp/netvserver
| + install -m 0755 /home/ubuntu/chumby-oe/output-angstrom-.9/work/armv5te-angstrom-linux-gnueabi/chumby-netvserver-1.0-r102/git/src/bin/NeTVServer /home/ubuntu/chumby-oe/output-angstrom-.9/work/armv5te-angstrom-linux-gnueabi/chumby-netvserver-1.0-r102/image/usr/bin
| + install -m 0755 /home/ubuntu/chumby-oe/output-angstrom-.9/work/armv5te-angstrom-linux-gnueabi/chumby-netvserver-1.0-r102/git/etc/NeTVServer.ini /home/ubuntu/chumby-oe/output-angstrom-.9/work/armv5te-angstrom-linux-gnueabi/chumby-netvserver-1.0-r102/image/etc
| + install -m 0755 /home/ubuntu/chumby-oe/output-angstrom-.9/work/armv5te-angstrom-linux-gnueabi/chumby-netvserver-1.0-r102/git/etc/chumby-netvserver.sh /home/ubuntu/chumby-oe/output-angstrom-.9/work/armv5te-angstrom-linux-gnueabi/chumby-netvserver-1.0-r102/image/etc/init.d/chumby-netvserver
| + install -m 0755 /home/ubuntu/chumby-oe/output-angstrom-.9/work/armv5te-angstrom-linux-gnueabi/chumby-netvserver-1.0-r102/git/etc/docroot/favicon.ico /home/ubuntu/chumby-oe/output-angstrom-.9/work/armv5te-angstrom-linux-gnueabi/chumby-netvserver-1.0-r102/image/usr/share/netvserver/docroot
| + install -m 0755 /home/ubuntu/chumby-oe/output-angstrom-.9/work/armv5te-angstrom-linux-gnueabi/chumby-netvserver-1.0-r102/git/etc/docroot/test.html /home/ubuntu/chumby-oe/output-angstrom-.9/work/armv5te-angstrom-linux-gnueabi/chumby-netvserver-1.0-r102/image/usr/share/netvserver/docroot
| install: cannot stat `/home/ubuntu/chumby-oe/output-angstrom-.9/work/armv5te-angstrom-linux-gnueabi/chumby-netvserver-1.0-r102/git/etc/docroot/test.html': No such file or directory
NOTE: package chumby-netvserver-1.0-r102: task do_install: Failed
ERROR: Function 'do_install' failed (see /home/ubuntu/chumby-oe/output-angstrom-.9/work/armv5te-angstrom-linux-gnueabi/chumby-netvserver-1.0-r102/temp/log.do_install.2108 for further information)
ERROR: Task 3095 (/home/ubuntu/chumby-oe/meta-chumby/recipes/chumby-netvserver/chumby-netvserver_1.0.bb, do_install) failed with exit code '1'
Waiting for 2 active tasks to finish:
0: chumby-netvbrowser-1.0-r65 do_compile (pid 1557)
1: netv-utils-0-r67 do_qa_staging (pid 1997)
Waiting for 1 active tasks to finish:
0: netv-utils-0-r67 do_qa_staging (pid 1997)
NOTE: package chumby-netvbrowser-1.0-r65: task do_compile: Succeeded
NOTE: package netv-utils-0-r67: task do_qa_staging: Succeeded
ERROR: '/home/ubuntu/chumby-oe/meta-chumby/recipes/chumby-netvserver/chumby-netvserver_1.0.bb' failed

========================================

This is just following the Getting Started section on the Wiki. I haven't modified anything on the AMI, just logged on as user "ubuntu" for the first time and and ran the commands you see.

Any ideas?

Razvan

Re: kernel modules (and/or kernel compilation)

Hi Razvan,

The chumby-netvserver recipe is out of sync with what's on the server.

Normally you specify a git revision in a bitbake recipe to ensure that it gets a consistent snapshot.  Because chumby-netvbrowser, chumby-netvserver, and netv-controlpanel are frequently updated (as they're our core apps), they all set to pull from git trunk.  If someone moves a file that's explicitly referred to, such as test.html, they'll also need to modify it in the recipe.  You can see the git log of the file moving here, and the corresponding recipe patch here.  As a workaround for this problem, the file was replaced here.

You have two options.

First, rebuild the chumby-netvserver package.  Run "bitbake chumby-netvserver -c clean", then re-run "bitbake chumby-image".  This is the path of least resistance, since packages are less likely to have changed.  If you encounter more problems, you'll want to try doing a "pull".

The second option is to update your copy of meta-chumby.  From anywhere in the meta-chumby directory, run "git pull", and then re-run "bitbake chumby-image".  You will not need to clean the chumby-netvserver recipe as its PR has been bumped, so it will be rebuilt anyway.

Re: kernel modules (and/or kernel compilation)

Ok, a "git pull" in the meta-chumby directory did the trick, the image compiles fine now.

But the kernel does not... the instructions on the Wiki are just not complete / non-working. First of all, you can't do "make menuconfig" on the kernel because the ncurses library is not installed. You need to do "apt-get install libncurses5-dev" as root, then configure the kernel.

Then, when you try to compile the kernel modules, the compilation fails with this:

  CC [M]  drivers/gpu/drm/drm_agpsupport.o
drivers/gpu/drm/drm_agpsupport.c:36:21: fatal error: asm/agp.h: No such file or directory
compilation terminated.
make[3]: *** [drivers/gpu/drm/drm_agpsupport.o] Error 1
make[2]: *** [drivers/gpu/drm] Error 2
make[1]: *** [drivers/gpu] Error 2
make: *** [drivers] Error 2
+ die 'oe_runmake failed'
+ oefatal 'oe_runmake failed'
+ echo FATAL: 'oe_runmake failed'
FATAL: oe_runmake failed
+ exit 1


I modified the build script and added "SUBDIRS=drivers/net" to only attempt to compile the modules in that directory and it did create the tun.ko module.

However, if I copy this to the NeTV and try to insmod it, I get

[   65.757791] tun: version magic '2.6.28 mod_unload modversions ARMv5 ' should be '2.6.28 mod_unload ARMv5 '

If I try to force the module to load with "modprobe -f" I get this

[  188.365403] tun: no version for "magic" found: kernel tainted.
[  188.380601] tun: Unknown symbol malloc_sizes

So once again, has anyone actually tested those instructions in the Wiki? Have an intern or someone take that Wiki page and follow it and see if the instructions actually work... I'm still unable to compile modules that work on the device sad.

Razvan

Re: kernel modules (and/or kernel compilation)

Hi drazvan,

I'm trying to get a copy of the image so I can see what you're seeing, but have you tried using the toolchain that's built by openembedded?  The steps on the wiki say to run:

~/chumby-oe/output-angstrom-.9/work/chumby-silvermoon-netv-angstrom-linux-gnueabi/linux-silvermoon-netv-2.6.28.local-r29/temp/run.do_compile_kernel*

There's a separate compiler located in the chumby-oe/output*/sysroots/ directory that gets used to build openembedded packages.  As it builds packages, openembedded will create shell scripts that set up the environment (including paths), then execute those scripts.  You can take advantage of that, and use the scripts to build your own modules.

The difference in compilers between the chumby One and NeTV might be an issue.  As there is no standard Linux ABI, you want to use the same compiler to build modules as was used to build the compiler.

Re: kernel modules (and/or kernel compilation)

I can't find another compiler under sysroots, I see 3 folders there:

armv5te-angstrom-linux-gnueabi
chumby-silvermoon-netv-angstrom-linux-gnueabi
i686-linux

but only i686-linux contains a compiler and that's the one that is used by the run.do_compile* scripts as far as I can tell.

I see there is another kernel source at

~/chumby-oe/output-angstrom-.9/sysroots/chumby-silvermoon-netv-angstrom-linux-gnueabi/kernel

that appears to be completely separate from the one that the Wiki points to. Any idea what's up with that? Is that the correct one for the NeTV?

R.

Re: kernel modules (and/or kernel compilation)

The actual compiler it uses is:

~/chumby-oe/output-angstrom-.9/sysroots/i686-linux/usr/armv5te/bin/arm-angstrom-linux-gnueabi-gcc

The kernel that's under sysroots/chumby-silvermoon-netv-angstrom-linux-gnueabi is mostly header files, and is used by recipes that link against the kernel, such as compat-wireless.  Once the kernel itself is built -- and the compilation takes place under ~/chumby-oe/output-angstrom-.9/work/chumby-silvermoon-netv-angstrom-linux-gnueabi/linux-silvermoon-netv-2.6.28.local-r29/ (or whatever PR is currently set to) -- the working files are removed and only the build scripts/build logs remain.

If you just want to build a toolchain suitable for use outside of the openembedded tree, you can run "bitbake meta-toolchain".  It will produce a tarball at ~/chumby-oe/output-angstrom-.9/deploy/eglibc/sdk/ that you can extract to /, set up your paths, and run.

When I do kernel work, I generally use the trick where I execute run.do_compile from the work directory, as the wiki article says.  But building the toolchain and running it separately might be more familiar to you.  Alternately, you can set your PATH to the same value as is in the run.do_compile scripts.  E.g.:

export PATH="/home/user/chumby-oe/meta-chumby-private/bin:/home/user/chumby-oe/meta-chumby/bin:/home/user/chumby-oe/openembedded/bin:/home/user/chumby-oe/output-angstrom-.9/sysroots/i686-linux/usr/armv5te/bin:/home/user/chumby-oe/output-angstrom-.9/sysroots/i686-linux/usr/sbin:/home/user/chumby-oe/output-angstrom-.9/sysroots/i686-linux/usr/bin:/home/user/chumby-oe/output-angstrom-.9/sysroots/i686-linux/sbin:/home/user/chumby-oe/output-angstrom-.9/sysroots/i686-linux//bin:/home/user/chumby-oe/bitbake-1.12.0/bin:/home/user/CodeSourcery/Sourcery_G++_Lite/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"

Re: kernel modules (and/or kernel compilation)

Ok, I'll give that a try, but could you please look into that AMI image and either update it or update the Wiki instructions? What do you guys use to build the kernel modules that are included in the current image?

I guess what I'm looking for is a simple kernel source + patches (or kernel source with patches already applied) and the .config file that was used to build firmware version 14 + a working compiler for the NeTV platform. That should be all that is needed to build the kernel. You know, like you did for the Chumby One and all the older Chumbies, I had a fully working toolchain on my Ubuntu for the Chumby One and didn't have any problems with it at all.  This whole OpenEmbedded thing looks like a mess, it's just way too complicated for most needs (or maybe our needs are uncommon... it seems to be very quiet on this forum, it's just me, you, bunnie and unwiredben smile ).

Razvan

Re: kernel modules (and/or kernel compilation)

To build the kernel modules that are included in the current image, we check the kernel out somewhere, run "make ARCH=arm menuconfig", configure everything, then run "cp .config ~/chumby-oe/meta-chumby/recipes/linux/linux-silvermoon-netv/defconfig", edit ~/chumby-oe/meta-chumby/recipes/linux/linux-silvermoon-netv_2.6.28.bb and increase the PR value by 1.

OpenEmbedded will then notice the package revision has increased, recompile the kernel, and create an individual package for each .ko.

I've uploaded the results of "bitbake meta-toolchain".  If you just want the plain compiler, installable on a Linux machine outside of the OpenEmbedded environment, grab angstrom-v20110703-i686-linux-armv5te-linux-gnueabi-toolchain.tar.bz2.  Extract it to /, then add /usr/local/angstrom/arm/bin to your PATH.

To check out our kernel from git, which includes all patches, run:

git clone -b netv http://git.chumby.com.sg/git/chumby-sg/linux-2.6.28-silvermoon.git

The toolchain approach is useful if you want to just get C code compiled such that it can be installed on the device.  The OpenEmbedded approach is useful if you want to build completely new images, replacing the chumby code with your own, or packaging your own code up in .ipk files that can be more easily installed on other users' devices.

Re: kernel modules (and/or kernel compilation)

There were a few steps the documentation omitted, and a few gotchas that weren't mentioned.  I've updated the wiki, but for anyone who's experiencing similar problems, you can run into the following issues:

1) libncurses-dev needs to be installed in order to run menuconfig:
    sudo apt-get install ncurses-dev

2) The kernel config from meta-chumby needs to be copied to the kernel directory:
    cp /home/ubuntu/chumby-oe/meta-chumby/recipes/linux/linux-silvermoon-netv/defconfig /home/ubuntu/git/linux-2.6.28-silvermoon/src/.config

3) You need to run do_compile before do_compile_kernelmodules, so the modules have something to link against:
    ~/chumby-oe/output-angstrom-.9/work/chumby-silvermoon-netv-angstrom-linux-gnueabi/linux-silvermoon-netv-2.6.28.local-r29/temp/run.do_compile.*
    ~/chumby-oe/output-angstrom-.9/work/chumby-silvermoon-netv-angstrom-linux-gnueabi/linux-silvermoon-netv-2.6.28.local-r29/temp/run.do_compile_kernelmodules.*

17 (edited by ChumbyLurker 2011-10-20 21:15:54)

Re: kernel modules (and/or kernel compilation)

Lots of modules should be enabled and available in firmware r19, including the ip tunneling module.  They are available but not installed by default.