Howto: Build a new Debian kernel with LED support September 04, 2010 04:40PM |
Admin Registered: 14 years ago Posts: 304 |
# Get the Kernel sources cd /usr/src apt-get install linux-source-2.6.32 tar -xjvf linux-source-2.6.32.tar.bz2 cd /usr/src/linux-source-2.6.32 # Get the config from your current Dockstar kernel scp root@YOUR.DOCKSTAR.IP.ADDRESS:/boot/config-2.6.32-5-kirkwood .config # Accept default options for any new kernel configs yes "" | make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- oldconfig # Add Dockstar patch cat<<EOF>dockstar-kernel.patch +++ a/arch/arm/mach-kirkwood/sheevaplug-setup.c +++ b/arch/arm/mach-kirkwood/sheevaplug-setup.c @@ -62,11 +62,17 @@ static struct gpio_led sheevaplug_led_pins[] = { { - .name = "plug:green:health", - .default_trigger = "default-on", - .gpio = 49, + .name = "dockstar:green:health", + .default_trigger = "none", + .gpio = 46, .active_low = 1, }, + { + .name = "dockstar:orange:health", + .default_trigger = "default-on", + .gpio = 47, + .active_low = 1, + } }; static struct gpio_led_platform_data sheevaplug_led_data = { @@ -84,7 +90,8 @@ static unsigned int sheevaplug_mpp_config[] __initdata = { MPP29_GPIO, /* USB Power Enable */ - MPP49_GPIO, /* LED */ + MPP46_GPIO, /* LED green */ + MPP47_GPIO, /* LED orange */ 0 }; EOF patch -p1 < dockstar-kernel.patch make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- oldconfig codesourcery-arm-2009q3.sh make-kpkg --rootcmd fakeroot --arch armel --cross-compile arm-none-linux-gnueabi- --append-to-version=-dockstar --revision=1.1 --initrd kernel_image
dpkg -i linux-image-2.6.32-dockstar_1.1_armel.deb cd /boot # Create the images for uBoot /usr/bin/mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-2.6.32-5 -d /boot/vmlinuz-2.6.32-dockstar /boot/uImage /usr/bin/mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs -d /boot/initrd.img-2.6.32-dockstar /boot/uInitrd # Configure rc.local to turn off the orange LED and turn on the green LED sed -i 's|^exit 0|echo none > /sys/class/leds/dockstar\:orange\:health/trigger\necho default-on > /sys/class/leds/dockstar\:green\:health/trigger\nexit 0|' /etc/rc.local
apt-get remove linux-image-2.6-kirkwood
Re: Building a patched Debian kernel September 04, 2010 05:37PM |
Registered: 14 years ago Posts: 107 |
Re: Building a patched Debian kernel September 04, 2010 06:05PM |
Admin Registered: 14 years ago Posts: 304 |
Oscam
Re: Howto: Build a new Debian kernel with LED support September 07, 2010 08:49AM |
Re: Howto: Build a new Debian kernel with LED support September 07, 2010 09:20AM |
Admin Registered: 14 years ago Posts: 304 |
hapeba
Re: Howto: Build a new Debian kernel with LED support September 07, 2010 12:42PM |
Re: Howto: Build a new Debian kernel with LED support September 07, 2010 01:37PM |
Admin Registered: 14 years ago Posts: 304 |
hapeba
Re: Howto: Build a new Debian kernel with LED support September 07, 2010 02:07PM |
Oscam
Re: Howto: Build a new Debian kernel with LED support September 07, 2010 03:08PM |
Re: Howto: Build a new Debian kernel with LED support September 07, 2010 03:17PM |
Registered: 14 years ago Posts: 107 |
Re: Howto: Build a new Debian kernel with LED support September 07, 2010 04:14PM |
Registered: 14 years ago Posts: 7 |
Re: Howto: Build a new Debian kernel with LED support September 07, 2010 07:01PM |
Registered: 14 years ago Posts: 107 |
Re: Howto: Build a new Debian kernel with LED support September 07, 2010 07:41PM |
Registered: 14 years ago Posts: 7 |
Re: Howto: Build a new Debian kernel with LED support September 07, 2010 11:59PM |
Registered: 14 years ago Posts: 7 |
Re: Howto: Build a new Debian kernel with LED support September 08, 2010 05:04AM |
Registered: 14 years ago Posts: 3 |
root@debian:/usr/src/linux-source-2.6.32# codesourcery-arm-2009q3.sh -bash: codesourcery-arm-2009q3.sh: command not found
root@debian:/usr/src/linux-source-2.6.32# ls -a . Documentation crypto kernel tools .. Kbuild dockstar-kernel.patch lib usr .config MAINTAINERS drivers mm version.Debian .config.old Makefile firmware net virt .gitignore README fs samples .mailmap REPORTING-BUGS include scripts COPYING arch init security CREDITS block ipc sound root@debian:/usr/src/linux-source-2.6.32#
Re: Howto: Build a new Debian kernel with LED support September 08, 2010 06:35AM |
Registered: 14 years ago Posts: 166 |
patch -Np1 -i ../*.patch
Re: Howto: Build a new Debian kernel with LED support September 08, 2010 11:03AM |
Registered: 14 years ago Posts: 7 |
mxspy
Re: Howto: Build a new Debian kernel with LED support September 11, 2010 07:36PM |
sysadmin@symbiosoft:~/linux-source-2.6.32$ codesourcery-arm-2009q3.sh Type 'exit' to return to non-crosscompile environment NOW in crosscompile environment for arm (arm-none-linux-gnueabi-) sysadmin@symbiosoft:~/linux-source-2.6.32$ make-kpkg --rootcmd fakeroot --arch armel --cross-compile arm-none-linux-gnueabi- --append-to-version=-dockstar --revision=1.1 --initrd kernel_image Warning: The file include/linux/version.h exists The contained UTS_VERSION string: "" does not match expectations: "2.6.32-dockstar" I'll try and recover exec debian/rules DEBIAN_REVISION=1.1 APPEND_TO_VERSION=-dockstar KPKG_ARCH=armel CROSS_COMPILE=arm-none-linux-gnueabi- INITRD=YES ROOT_CMD=fakeroot kernel_image dpkg-architecture: warning: Specified GNU system type arm-linux-gnueabi does not match gcc system type i486-linux-gnu. dpkg-architecture: warning: Specified GNU system type arm-linux-gnueabi does not match gcc system type i486-linux-gnu. dpkg-architecture: warning: Specified GNU system type arm-linux-gnueabi does not match gcc system type i486-linux-gnu. dpkg-architecture: warning: Specified GNU system type arm-linux-gnueabi does not match gcc system type i486-linux-gnu. [: 1: 2: unexpected operator [: 1: 2: unexpected operator [: 1: 2: unexpected operator [: 1: 2: unexpected operator [: 1: 2: unexpected operator [: 1: 2: unexpected operator [: 1: 2: unexpected operator [: 1: 2: unexpected operator [: 1: 2: unexpected operator [: 1: 2: unexpected operator Not in correct source directory make: *** [testdir] Error 1
mxspy
Re: Howto: Build a new Debian kernel with LED support September 14, 2010 04:23PM |
Re: Howto: Build a new Debian kernel with LED support September 15, 2010 12:19PM |
Registered: 14 years ago Posts: 7 |
Re: Howto: Build a new Debian kernel with LED support September 15, 2010 03:38PM |
Registered: 14 years ago Posts: 166 |
Re: Howto: Build a new Debian kernel with LED support September 15, 2010 06:09PM |
Registered: 14 years ago Posts: 107 |
Re: Howto: Build a new Debian kernel with LED support September 16, 2010 04:31AM |
Registered: 14 years ago Posts: 166 |
Re: Howto: Build a new Debian kernel with LED support September 16, 2010 06:51AM |
Registered: 14 years ago Posts: 107 |
Re: Howto: Build a new Debian kernel with LED support September 17, 2010 03:58AM |
Registered: 14 years ago Posts: 7 |
objcopy --add-gnu-debuglink=/usr/local/src/linux-2.6.35.4/debian/linux-image-2.6.35.4-dockstar/usr/lib/debug/lib/modules/2.6.35.4-dockstar _user.ko /usr/local/src/linux-2.6.35.4/debian/linux-image-2.6.35.4-dockstar/lib/modules/2.6.35.4-dockstar/kernel/net/xfrm/xfrm_user.ko objcopy: Unable to recognise the format of the input file `/usr/local/src/linux-2.6.35.4/debian/linux-image-2.6.35.4-dockstar/lib/modules/ nel/net/xfrm/xfrm_user.ko' make[1]: *** [debian/stamp/install/linux-image-2.6.35.4-dockstar] Error 1 make[1]: Leaving directory `/usr/local/src/linux-2.6.35.4' make: *** [kernel_image] Error 2 You have new mail in /var/mail/josen
Re: Howto: Build a new Debian kernel with LED support September 17, 2010 04:40AM |
Registered: 14 years ago Posts: 3 |
root@debian:/usr/src# apt-get install linux-source-2.6.32 Reading package lists... Done Building dependency tree Reading state information... Done linux-source-2.6.32 is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. root@debian:/usr/src# ls root@debian:/usr/src#
root@debian:/usr/src# scp root@192.168.2.88:/boot/config-2.6.32-5-kirkwood usage: scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [[user@]host1:]file1 ... [[user@]host2:]file2 root@debian:/usr/src# root@debian:/usr/src# ls /boot System.map-2.6.32-5-kirkwood initrd.img-2.6.32-5-kirkwood uImage-org vmlinuz-2.6.32-5-kirkwood config-2.6.32-5-kirkwood uImage uInitrd root@debian:/usr/src#
Re: Howto: Build a new Debian kernel with LED support September 17, 2010 06:00AM |
Registered: 14 years ago Posts: 7 |
scp root@YOUR.DOCKSTAR.IP.ADDRESS:/boot/config-2.6.32-5-kirkwood ./
Re: Howto: Build a new Debian kernel with LED support September 17, 2010 11:55AM |
Registered: 14 years ago Posts: 107 |
Re: Howto: Build a new Debian kernel with LED support September 17, 2010 02:30PM |
Registered: 14 years ago Posts: 17 |
Re: Howto: Build a new Debian kernel with LED support September 17, 2010 03:46PM |
Registered: 14 years ago Posts: 107 |