diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2006-06-07 23:59:04 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2006-06-07 23:59:04 +0000 |
commit | 9f1c46026440e9954a88ee8843362d9cffd8ad87 (patch) | |
tree | e729abf7b4d3fdcd056cd7b07d586a3739c08c7d /target/linux/kernel.mk | |
parent | d953b29fb3944a7381c7398f8eb51347d63714ed (diff) |
make ramdisk support generic, some cleanups
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@3911 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/kernel.mk')
-rw-r--r-- | target/linux/kernel.mk | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/target/linux/kernel.mk b/target/linux/kernel.mk index 4b8bf139d4..b54fbd5972 100644 --- a/target/linux/kernel.mk +++ b/target/linux/kernel.mk @@ -1,4 +1,4 @@ -LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.bz2 +LINUX_SOURCE:=$(LINUX_NAME).tar.bz2 LINUX_SITE=http://www.us.kernel.org/pub/linux/kernel/v$(KERNEL) \ http://www.us.kernel.org/pub/linux/kernel/v$(KERNEL) \ http://www.kernel.org/pub/linux/kernel/v$(KERNEL) \ @@ -43,7 +43,22 @@ $(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched touch $@ endif -$(LINUX_DIR)/vmlinux: $(STAMP_DIR)/.linux-compile pkg-install +ramdisk-config: $(LINUX_DIR)/.configured FORCE + mv $(LINUX_DIR)/.config $(LINUX_DIR)/.config.old + grep -v INITRAMFS $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config +ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) + echo 'CONFIG_INITRAMFS_SOURCE="../../root"' >> $(LINUX_DIR)/.config + echo 'CONFIG_INITRAMFS_ROOT_UID=0' >> $(LINUX_DIR)/.config + echo 'CONFIG_INITRAMFS_ROOT_GID=0' >> $(LINUX_DIR)/.config + mkdir -p $(BUILD_DIR)/root/etc/init.d + $(CP) ../generic-2.6/files/init $(BUILD_DIR)/root/ + $(CP) ../generic-2.6/files/init.d/S00initramfs $(BUILD_DIR)/root/etc/init.d/ +else + rm -f $(BUILD_DIR)/root/init $(BUILD_DIR)/root/etc/init.d/S00initramfs + echo 'CONFIG_INITRAMFS_SOURCE=""' >> $(LINUX_DIR)/.config +endif + +$(LINUX_DIR)/vmlinux: $(STAMP_DIR)/.linux-compile pkg-install ramdisk-config $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH=$(TARGET_PATH) $(LINUX_KERNEL): $(LINUX_DIR)/vmlinux @@ -72,6 +87,7 @@ $(KERNEL_IPKG): $(BUILD_DIR)/kernel.mk: $(LINUX_DIR) FORCE echo "BOARD:=$(BOARD)" > $@ + echo "LINUX_NAME:=$(LINUX_NAME)" >> $@ echo "LINUX_VERSION:=$(LINUX_VERSION)" >> $@ echo "LINUX_RELEASE:=$(LINUX_RELEASE)" >> $@ |