1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-27 17:55:55 +02:00

make ramdisk support generic, some cleanups

git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@3911 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2006-06-07 23:59:04 +00:00
parent d953b29fb3
commit 9f1c460264
8 changed files with 27 additions and 1529 deletions

View File

@ -20,7 +20,10 @@ LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \
)
KERNEL_BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)
LINUX_DIR := $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)
ifeq ($(LINUX_NAME),)
LINUX_NAME:=linux-$(LINUX_VERSION)
endif
LINUX_DIR := $(KERNEL_BUILD_DIR)/$(LINUX_NAME)
KMOD_BUILD_DIR := $(KERNEL_BUILD_DIR)/linux-modules
MODULES_DIR := $(KERNEL_BUILD_DIR)/modules/$(MODULES_SUBDIR)

View File

@ -14,10 +14,6 @@ include ../kernel.mk
$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
[ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE)
[ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches $(MAKE_TRACE)
ifeq ($(CONFIG_ARUBA_RAMDISK),y)
@$(CP) config-ramdisk $(LINUX_DIR)/.config
else
@$(CP) config $(LINUX_DIR)/.config
endif
touch $@

File diff suppressed because it is too large Load Diff

View File

@ -16,7 +16,7 @@ endef
define Image/Prepare
cat $(KDIR)/vmlinux | $(STAGING_DIR)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma
$(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) compile
$(MAKE) -C ../generic/lzma-loader $(LOADER_MAKEOPTS) clean compile
endef
define Image/Build

View File

@ -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)" >> $@

View File

@ -9,7 +9,10 @@ endif
MODULES_SUBDIR:=lib/modules/$(LINUX_VERSION)
LINUX_BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)
LINUX_DIR := $(LINUX_BUILD_DIR)/linux-$(LINUX_VERSION)
ifeq ($(LINUX_NAME),)
LINUX_NAME:=linux-$(LINUX_VERSION)
endif
LINUX_DIR := $(LINUX_BUILD_DIR)/$(LINUX_NAME)
LINUX_KERNEL:=$(LINUX_BUILD_DIR)/vmlinux
LINUX_TARGET_DIR:=$(LINUX_BUILD_DIR)/root