Welcome! Log In Create A New Profile

Advanced

Howto: Build a new Debian kernel with LED support

Posted by Jeff 
Re: Howto: Build a new Debian kernel with LED support
February 23, 2011 02:43PM
wil32 Wrote:
-------------------------------------------------------

> /sys/class/leds/dockstar:orange:health/trigger

I believe it should be /sys/class/leds/dockstar:orange:misc/trigger.
FlyinFistOfJuda
Re: Howto: Build a new Debian kernel with LED support
March 17, 2011 03:13AM
Hello,

I just wanted to mention that you can build the according kernel-headers by customizing the make-kpkg as follows:
make-kpkg --rootcmd fakeroot --arch armel  --cross-compile arm-none-linux-gnueabi- --append-to-version=-dockstar --revision=1.1 --initrd kernel_image kernel_headers

The additional attached 'kernel_headers' will build you a linux-headers deb package.
Re: Howto: Build a new Debian kernel with LED support
March 19, 2011 10:45AM
Has anyone tried building kernel 2.6.38? I am in the process of doing so. Does anyone know if I need the patches for the LEDs?
Re: Howto: Build a new Debian kernel with LED support
March 19, 2011 10:57AM
dazealex Wrote:
-------------------------------------------------------
> Has anyone tried building kernel 2.6.38? I am in
> the process of doing so. Does anyone know if I
> need the patches for the LEDs?


I did, it perfectly works!
No patch is needed if you change the arcNumber. For more information read my blog: http://dev.shyd.de/2011/03/kernel-2-6-38-ready-to-use/
Re: Howto: Build a new Debian kernel with LED support
March 19, 2011 11:07AM
Hi shyd,

I tried cross-compiling with Jeff's instructions and .config file, but got an error:

make[1]: Entering directory `/root/kernel/linux-2.6.38'
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[2]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CC [M] drivers/gpio/janz-ttl.o
drivers/gpio/janz-ttl.c: In function 'ttl_set_value':
drivers/gpio/janz-ttl.c:107: error: implicit declaration of function 'iowrite16be'
make[3]: *** [drivers/gpio/janz-ttl.o] Error 1
make[2]: *** [drivers/gpio] Error 2
make[1]: *** [drivers] Error 2
make[1]: Leaving directory `/root/kernel/linux-2.6.38'
make: *** [debian/stamp/build/kernel] Error 2

Can you provide me with the .config you used?

Thanks,

Daze
Re: Howto: Build a new Debian kernel with LED support
March 19, 2011 11:22AM
Sure, here it is.
Attachments:
open | download - config-2.6.38-dockstar-shyd (79.8 KB)
Re: Howto: Build a new Debian kernel with LED support
March 19, 2011 11:48AM
Hi shyd,

I am trying a fresh cross-compile. Let's see how it goes. I specified the -j 8 option so make-kpkg should run 8 threads on my Core i7 with Ubuntu.

Thanks for the .config file. I'll post the results.

Daze
Re: Howto: Build a new Debian kernel with LED support
March 19, 2011 04:35PM
Hi Daze,

good luck to you! Wow, Ubuntu on an i7, that has to be an incredible fast system... How long does a build process take? :-)

shyd
Re: Howto: Build a new Debian kernel with LED support
March 19, 2011 08:12PM
Shyd,

I didn't time it, but it took 5 minutes or so to complete the build. The error I was getting was due to objcopy running for X86 instead of ARM. So a sym link fixed that issue.

Thanks for your help.

By the way, I tried the Arch derivative for the DockStar, and it seems quite fast. I am not sure if that is because they used uclib or not. I have used Arch before, but I'm a Debian/Ubuntu fan at heart. :)

Take care,

Daze
Re: Howto: Build a new Debian kernel with LED support
March 20, 2011 01:33PM
Hi Shyd,

I have a working .deb file with the new kernel. Do I need to run these two commands after installing the .deb?

/usr/bin/mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-2.6.38-dockstar -d /boot/vmlinuz-2.6.38-dockstar /boot/uImage
/usr/bin/mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-2.6.38-dockstar -d /boot/initrd.img-3.6.38-dockstar /boot/uInitrd

Gorgone's package seems to only install the first. So I am note sure.

Also, I suppose I would need to set the arcNumber to 2998 for the LED to work? What if I don't change it, will there be a problem booting?

Thanks,

Daze
Re: Howto: Build a new Debian kernel with LED support
March 20, 2011 06:04PM
Hi Daze,
5 min, that's fast!
You do have to run these commands to boot the new kernel. I think it would boot the old kernel if you don't, because u-boot boots these files.
How gorgone made the installation run that way... I don't know yet, but I'll spend some time.
As I wrote on my blog, the kernel needs the arcNumber to identify the device as a dockstar to enable the right I/O ports with the LEDs. If you do not change it your device is identified as sheevaplug instead, so the LEDs won't work, because they are on different I/O ports.
You can leave the arcNumber untouched, it does't affect the boot process itself, nothing will brick. The only thing is that the LED will flash green and then go (and stay) off when the kernel is loaded. You can change it, when your kernel works the way it should.

cheers
shyd

--
shyd

Goflex Net 3.9.5 | Dockstar 3.9.5 | http://dev.shyd.de



Edited 1 time(s). Last edit at 03/20/2011 06:08PM by shyd.
Re: Howto: Build a new Debian kernel with LED support
April 13, 2011 01:10AM
^ Thank you jeff and shyd for the guide. I successfully compiled my first kernel with the realtek wifi drivers and its working great. :) :)

Gorgone's kernel didn't have support for 3G USB modems so I had to compile my own.

Thank you everyone.
Hi.
Is there someone out there who has got the onboard I2C interface working?
I tried the approach on this link but no luck. http://www.mikrocontroller.net/articles/Dockstar#Onboard_I2C
Compiled my own kernels with different configs but I can't get the kernel to register the device. This should show up in my bootlog: [i2c i2c-0: adapter [mv64xxx_i2c adapter] registered]
I've searched around the Internet for an answer but no luck so far.
I hope someone has an answer for this

Thanks
Peter
Re: Howto: Build a new Debian kernel with LED support
April 15, 2011 04:32PM
Hi Peter,

I think you are the one who posted on my blog and asked for I2C support. Some days ago I sent an email to you with a new version of my kernel. Did you try it?

--
shyd

Goflex Net 3.9.5 | Dockstar 3.9.5 | http://dev.shyd.de
Oh .. Sorry. Missed your mail. Found it though... Will try it out right away.
I come back to you when I have tested it.
Thanks for your effort :)

Peter
->Shyd

Still no luck with your new updated kernel.
I get: "i2c-core: driver [isl29003] using legacy suspend method" in my bootlog but I can't find any i2c entries in /dev

According to this : http://plugcomputer.org/plugforum/index.php?topic=28.5;wap2 and this : http://www.mikrocontroller.net/topic/187115#1852752
there might be an issue regarding MPP pin configuration but I really don't know how to proceed with this..

Peter
The onboard I2C is not enabled by default for the Dockstar in kernel so I
got it running after applying the following:

Edit the kernel source file: arch/arm/mach-kirkwood/dockstar-setup.c

static unsigned int sheevaplug_mpp_config[] __initdata = {
+        MPP8_TW0_SDA,
+        MPP9_TW0_SCK,

 
static void __init sheevaplug_init(void)
{
    :
    :
+    kirkwood_i2c_init();
}

I then recompiled the kernel (2.6.38) with the .config from Shyd using instruction from his site (dev.shyd.de)

Thank you Dennis

//Peter
Re: Howto: Build a new Debian kernel with LED support
April 20, 2011 04:08AM
Hi Peter,

great to hear that you finally got it running flawlessly!

--
shyd

Goflex Net 3.9.5 | Dockstar 3.9.5 | http://dev.shyd.de
Re: Howto: Build a new Debian kernel with LED support
April 29, 2011 11:29PM
Hi shyd,

After I installed your new 2.6.38 kernel, my wireless card stop working. I found there is no wireless driver comes with this kernel.
Would you please provide the driver for RTL8188S (AirLink 101, AWLL6075)?
Thanks!
Re: Howto: Build a new Debian kernel with LED support
April 30, 2011 04:48AM
Hi qingz,

I couldn't find a specific module for your WLAN-stick in gorgone's config. Can you tell me which module is loaded to make the stick work?
lsmod |grep rtl #or awll or sth fit to your wifi
Then I'll try to make a new build for you.

--
shyd

Goflex Net 3.9.5 | Dockstar 3.9.5 | http://dev.shyd.de
Re: Howto: Build a new Debian kernel with LED support
May 04, 2011 10:55AM
I found it is not just missing the wireless USB modules, it's missing the modules for USB webcams (pwc, uvc) which I need.
I gave up and went for 2.6.37 by gorgone.

Thanks for the effort.
Hello, Dazealex,

I met a problem the same as yours. Could you please tell me in details about how you fixed your problem?

Thank you!
i want to use the tp link wn821n V3.
with an atheros chip, but it doesnt work

can somebody help me

AR7010-based devices (e.g. Netgear WNDA3200, TP-Link TL-WN821N v3) operate in USB mass storage mode by default. Since Linux 2.6.39, the driver will send the necessary command to enable wireless LAN operation.1
Re: Howto: Build a new Debian kernel with LED support
July 06, 2011 04:22PM
"It doesn't work" isn't really a good error description for troubleshooting.
I happen to have that exact wlan stick and already tested it with kernel 2.6.39-2. Seemed to work when I tried.

Now one thing after the other:
What kernel did you use when it didn't work? And what was the dmesg/syslog output telling you that it indeed didn't work? And finally what firmware file did you use?
With the answers to these question it'll be much more likely to get some appropriate help.
Re: Howto: Build a new Debian kernel with LED support
August 22, 2011 01:08PM
After searching a bit for compiling myself the udlfb kernel driver (Display Link devices), I realized that I was missing the kernel headers for the kernel I had compiled.

It could be useful to add in your tutorial on the first post that one can add "kernel_headers" to the make-kpkg command to build a package containing the kernel headers, required to compile external kernel drivers...

It then becomes :
make-kpkg --rootcmd fakeroot --arch armel  --cross-compile arm-none-linux-gnueabi- --append-to-version=-dockstar --revision=1.1 --initrd kernel_image kernel_headers

At the end, we end up with two deb files, the first containing the kernel and its modules, the second containing the kernel headers.



Edited 1 time(s). Last edit at 08/22/2011 01:10PM by tsunulukai.
Re: Howto: Build a new Debian kernel with LED support
August 23, 2011 11:43AM
Out of curiousity I compiled a kernel at my GoFlex Home:

armdebian linux-3.0.3 # time make ARCH=arm
...
real 168m10.361s
user 146m17.770s
sys 8m29.180s

Looks pretty well for me for a vanilla linux kernel v3.0.3

There are no silly questions
fear_factory84
Re: Howto: Build a new Debian kernel with LED support
September 07, 2011 07:11PM
Does a vanilla kernel 3.0 work on the dockstar without patches?
Re: Howto: Build a new Debian kernel with LED support
September 09, 2011 02:34PM
Yes, it does.
Re: Howto: Build a new Debian kernel with LED support
January 10, 2012 05:58PM
Indeed it does, as I'm using the Debian 3.1 kernel from Wheezy/testing.

Thanks to you all who did the testing, coding and submitted the patch to kernel.org, all I had to do was a simple:

fw_setenv arcNumber 2998

Well done, and again, a hearty thanks!

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

CORRECTION made above (thanks to the diligence of laprjns).

fw_printenv | grep arc
arcNumber=2998

yes, that is correct, laprjns. I knew when I was typing it that something was transposed/wrong, and I changed it, but I must not have clicked through... :^/

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



Edited 1 time(s). Last edit at 01/10/2012 07:01PM by davygravy.
Re: Howto: Build a new Debian kernel with LED support
January 10, 2012 06:34PM
davygravy Wrote:
-------------------------------------------------------

> fw_setenv arcNumber 9228

Should that be arcNumber 2998?
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: