--- /dev/null
+#
+# src/kernel/Makefile
+#
+
+TARGET = arm-unknown-linux-gnu
+
+TOPDIR = $(shell pwd)
+WORK = $(PWD)/work
+CROSSTOOLS = $(TOPDIR)/../../toolchain/crosstools
+
+KERNEL_VERSION = 2.6.16-ipaq191x_20080323
+
+.PHONY: all clean image modules map config
+
+all: image modules map
+
+clean: image-clean modules-clean map-clean
+
+distclean: clean image-distclean modules-distclean map-distclean
+ rm -vrf $(WORK)/linux-$(KERNEL_VERSION)
+
+$(WORK)/linux-$(KERNEL_VERSION).tar.bz2:
+ wget -P $(WORK) http://crux-arm.nu/files/distfiles/linux-$(KERNEL_VERSION).tar.bz2
+
+$(WORK)/linux-$(KERNEL_VERSION): $(WORK)/linux-$(KERNEL_VERSION).tar.bz2
+ tar -C $(WORK) -xvjf $(WORK)/linux-$(KERNEL_VERSION).tar.bz2
+ touch $(WORK)/linux-$(KERNEL_VERSION)
+
+$(WORK)/zImage-$(KERNEL_VERSION): $(WORK)/linux-$(KERNEL_VERSION)
+ cd $(WORK)/linux-$(KERNEL_VERSION) && \
+ export PATH=$(CROSSTOOLS)/bin:$$PATH && \
+ export LD_LIBRARY_PATH=$(CROSSTOOLS)/lib:$$LD_LIBRARY_PATH && \
+ make pxa25x_defconfig ARCH=arm CROSS_COMPILE=$(TARGET)- zImage
+ cp -v $(WORK)/linux-$(KERNEL_VERSION)/arch/arm/boot/zImage $(WORK)/zImage-$(KERNEL_VERSION)
+ touch $(WORK)/zImage-$(KERNEL_VERSION)
+
+image: $(WORK)/zImage-$(KERNEL_VERSION)
+
+image-clean:
+ rm -vf $(WORK)/zImage-$(KERNEL_VERSION)
+
+image-distclean: image-clean
+
+$(WORK)/modules-$(KERNEL_VERSION): $(WORK)/linux-$(KERNEL_VERSION)
+ cd $(WORK)/linux-$(KERNEL_VERSION) && \
+ export PATH=$(CROSSTOOLS)/bin:$$PATH && \
+ export LD_LIBRARY_PATH=$(LD_LIBRARY_PATH)/lib:$$LD_LIBRARY_PATH && \
+ make ARCH=arm CROSS_COMPILE=$(TARGET)- modules && \
+ make ARCH=arm CROSS_COMPILE=$(TARGET)- INSTALL_MOD_PATH=$(WORK)/modules-$(KERNEL_VERSION) modules_install
+ rm -f $(WORK)/modules-$(KERNEL_VERSION)/lib/modules/$(KERNEL_VERSION)/{source,build}
+ touch $(WORK)/modules-$(KERNEL_VERSION)
+
+modules: $(WORK)/modules-$(KERNEL_VERSION)
+
+modules-clean:
+ rm -vrf $(WORK)/modules-$(KERNEL_VERSION)
+
+modules-distclean: modules-clean
+
+$(WORK)/System.map-$(KERNEL_VERSION): $(WORK)/linux-$(KERNEL_VERSION)
+ cp $(WORK)/linux-$(KERNEL_VERSION)/System.map $(WORK)/System.map-$(KERNEL_VERSION)
+ touch $(WORK)/System.map-$(KERNEL_VERSION)
+
+map: $(WORK)/System.map-$(KERNEL_VERSION)
+
+map-clean:
+ rm -vrf $(WORK)/System.map-$(KERNEL_VERSION)
+
+map-distclean: map-clean
+
+config: $(WORK)/linux-$(KERNEL_VERSION)
+ cd $(WORK)/linux-$(KERNEL_VERSION) && \
+ export PATH=$(CROSSTOOLS)/bin:$$PATH && \
+ export LD_LIBRARY_PATH=$(CROSSTOOLS)/lib:$$LD_LIBRARY_PATH && \
+ make ARCH=arm CROSS_COMPILE=$(TARGET)- menuconfig
+ touch $(WORK)/linux-$(KERNEL_VERSION)
+
+# End of file