Topic: Kernel rebuild / INSTALL howto on hackerboard w/o LCD

Information at http://wiki.chumby.com/mediawiki/index. … mby_kernel is quite outdated.
Kernel update steps require clicking something on LCD (which hackerboard doesn't have).

I've got zImage built based on http://files.chumby.com/source/ + http://files.chumby.com/source/falconwi … .mx233.tgz

so how do I make that boot now?
Old instructions say something about cramfs, but i think that's old?
How about some up-to-date instructions?
I need to patch in my own modules into the kernel and rebuild + boot off that.

Re: Kernel rebuild / INSTALL howto on hackerboard w/o LCD

I tried to get just the modules for my drivers built (they depend on something that's not enabled by default in chumby kernel, so I made that module as well and rebuilt, and now the modules don't load.

I get [13334.250000] module: no symbol version for struct_module.

But I've used latest version on website, and /proc/config.gz off current running kernel.
Cross-compiled using 4.3.2 toolchain linked off wiki.

3

Re: Kernel rebuild / INSTALL howto on hackerboard w/o LCD

Generally that error means the module was configured without CONFIG_MODVERSIONS=y or something similar.  check that your .config is the same as the original.

I too would appreciate up to date instructions (and you could update the wiki stuff either in a post here or on the ladyada site).

I'm getting two new wifi modules that will need updated drivers - I either need to update the kernel or backport the modules

Re: Kernel rebuild / INSTALL howto on hackerboard w/o LCD

Of course I did the obvious.
New kernel/modules are compiled from /proc/config.gz from the target, so I would assume they should be identical.

I found some 'instruction' somewhere that dd'ing kernel to offset 3072 of block1 on mmc would work, but that sounds dodgy, since i looked at that area and it looks like bootloader and stuff there. plus there's the talk about kernelA and kernelB, etc.

anyhow, some proper instructions are in order.

Re: Kernel rebuild / INSTALL howto on hackerboard w/o LCD

I am in a similar position. Have rebuilt the kernel to utilize NFS4. Now need to transfer to SD device.

Along the way it would be nice:
   1. Be able to generate the compilation tools. I regularly rebuild the GNU tools for various targets and
       find the time to rebuild faster than the download/manual unpack method. Plus it would be nice to
       use a single ARM tool chain.
   2. How to rebuild the Linux utilities. I have downloaded the src/pacth files. Now need to compile and
        generate a usable SD device.
   3. Is the a write up of the boot sequence?

George

Re: Kernel rebuild / INSTALL howto on hackerboard w/o LCD

I did a quick writeup on the wiki detailing the boot sequence, as well as a quick note on how to write a new kernel.  Let me know if you'd like more information.

7 (edited by timecop 2010-10-31 16:58:42)

Re: Kernel rebuild / INSTALL howto on hackerboard w/o LCD

ChumbyLurker wrote:

I did a quick writeup on the wiki detailing the boot sequence, as well as a quick note on how to write a new kernel.  Let me know if you'd like more information.

Thanks.
Now I've got a bricked board.
Followed the following instructions:

1) cross-compile kernel using wiki instructions
2) copied zImage + modules set to usb stick
3) untar'd modules on target
4) did config_util stuff.
5) rebooted
6) result

[    1.030000] power/linux.c - bc_sm_restart():914 - Returning from sm_restart()
[    1.350000] Unable to handle kernel NULL pointer dereference at virtual address 00000010
[    1.360000] pgd = c0004000
[    1.360000] [00000010] *pgd=00000000
[    1.360000] Internal error: Oops: 805 [#1] PREEMPT
[    1.360000] Modules linked in:
[    1.360000] CPU: 0    Not tainted  (2.6.28-chumby #2)
[    1.360000] PC is at mutex_lock+0x10/0x24
[    1.360000] LR is at dcp_perform_op+0x150/0x254
[    1.360000] pc : [<c032ac48>]    lr : [<c0252040>]    psr: 00000013
[    1.360000] sp : c3883ea0  ip : c3883eb0  fp : c3883eac
[    1.360000] r10: 00000010  r9 : 00000001  r8 : 00000000
[    1.360000] r7 : 00000000  r6 : 00000001  r5 : c3819b30  r4 : 43819bb0
[    1.360000] r3 : 00000000  r2 : 00000000  r1 : c3819bd0  r0 : 00000010
[    1.360000] Flags: nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
[    1.360000] Control: 0005317f  Table: 40004000  DAC: 00000017
[    1.360000] Process cryptomgr_test (pid: 308, stack limit = 0xc3882268)
[    1.360000] Stack: (0xc3883ea0 to 0xc3884000)
[    1.360000] 3ea0: c3883ed4 c3883eb0 c0252040 c032ac48 43819b50 c3819b30 00000010 c388f000
[    1.360000] 3ec0: c3819b00 00000000 c3883efc c3883ed8 c02523a8 c0251f00 c049b670 c388f000
[    1.360000] 3ee0: c3819b00 c388f000 00000001 00000000 c3883f1c c3883f00 c01d30c8 c0252290
[    1.360000] 3f00: 00000000 c0490634 c3819b00 c388f000 c3883f5c c3883f20 c01d87e8 c01d308c
[    1.360000] 3f20: 00000101 00000003 c049b6d8 c043a9b6 c01d2f0c c385fa00 c0341534 c3819b00
[    1.360000] 3f40: 0000000b 00000400 00000000 00000001 c3883fc4 c3883f60 c01d9eb4 c01d8704
[    1.360000] 3f60: 28626365 29736561 c005c200 c005be40 00000000 c003b1f0 c38c201c c38fcc00
[    1.360000] 3f80: c3883fa4 c3883f90 c005c334 c005c2c4 00000000 c047b470 c3883fdc c3883fa8
[    1.360000] 3fa0: c385f9c0 c01d83c8 00000000 00000000 00000000 00000000 c3883fdc c3883fc8
[    1.360000] 3fc0: c01d8400 c01d9e08 c385f9c0 c01d83c8 c3883ff4 c3883fe0 c0056d70 c01d83d8
[    1.360000] 3fe0: 00000000 00000000 00000000 c3883ff8 c0043a90 c0056d2c 00000000 00000000
[    1.360000] Backtrace:
[    1.360000] [<c032ac38>] (mutex_lock+0x0/0x24) from [<c0252040>] (dcp_perform_op+0x150/0x254)
[    1.360000] [<c0251ef0>] (dcp_perform_op+0x0/0x254) from [<c02523a8>] (dcp_aes_encrypt+0x128/0x13c)
[    1.360000] [<c0252280>] (dcp_aes_encrypt+0x0/0x13c) from [<c01d30c8>] (cipher_encrypt_unaligned+0x4c/0x50)
[    1.360000] [<c01d307c>] (cipher_encrypt_unaligned+0x0/0x50) from [<c01d87e8>] (test_cipher+0xf4/0x1a0)
[    1.360000]  r7:c388f000 r6:c3819b00 r5:c0490634 r4:00000000
[    1.360000] [<c01d86f4>] (test_cipher+0x0/0x1a0) from [<c01d9eb4>] (alg_test+0xbc/0x16c)
[    1.360000] [<c01d9df8>] (alg_test+0x0/0x16c) from [<c01d8400>] (cryptomgr_test+0x38/0x58)
[    1.360000] [<c01d83c8>] (cryptomgr_test+0x0/0x58) from [<c0056d70>] (kthread+0x54/0x80)
[    1.360000]  r5:c01d83c8 r4:c385f9c0
[    1.360000] [<c0056d1c>] (kthread+0x0/0x80) from [<c0043a90>] (do_exit+0x0/0x800)
[    1.360000]  r5:00000000 r4:00000000
[    1.360000] Code: e1a0c00d e92dd800 e24cb004 e3a03000 (e1002093)
[    1.620000] ---[ end trace f000102cfbd91e6d ]---
[    1.650000] mmc0: new SD card at address 0002
[    1.660000] mmcblk0: mmc0:0002 00000 971 MiB
[    1.660000]  mmcblk0: p1 p2 p3 p4 < p5 p6 >

booting into krnB and figuring it out meanwhile.

Re: Kernel rebuild / INSTALL howto on hackerboard w/o LCD

I am looking for the elftobs2 code. I would like to build on Linux and write directly to the SD card. Then plug the SD cad into the chumby.

9 (edited by tz 2010-11-07 11:22:41)

Re: Kernel rebuild / INSTALL howto on hackerboard w/o LCD

I need to build ONE module for the EXISTING kernel, but it needs the tree, specifically Modules.symvers.

The HB has a link in /lib/modules/(kernel)/build, but there is no directory - would it be possible to get that?

It is for the RTLink 8188 (8192).  If you want to try building, it is at http://www.zdez.org/rtl8192CU.tgz

It is a micro WiFi N adapter http://www.dealextreme.com/details.dx/sku.48166 - there is a similar one from Meritline which I will be trying shortly, but it works on my linux laptop.

It compiles, but I can't load a module because I don't have a kernel

And although there are a lot of random archives that claim to be kernel source, I have no idea which actually builds the precise version - including the correct module versions - in the hackerboard (which is required under the GPL), and I don't want to wait a day recompiling the kernel and modules.

Update - I did try compiling the kernel, but it says the module isn't valid.  Is there a .config for the actual chumby hacker board?

Re: Kernel rebuild / INSTALL howto on hackerboard w/o LCD

I remember my cross-compiler was making "invalid" modules until I did make clean / make mrproper (forget which) in the i.mx kernel tree provided by chumby and copying /proc/config.gz into .config and rerunning make menuconfig/make.

if you do make modules (cross compiling) and "install" them, you should have Modules.sym etc.
It doesn't really help my case because board locks up with my hardware anyway...