mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
bitkeeper revision 1.960 (40cd7d81VzO6ptRUDTX_VC8yOFY9Ag)
Makefile cleanups. We now have a LINUX_SRC_PATH as well as LINUX_SRC in the top level makefile. New make targets 'linux_XXX_config' and 'linux_XXX' configure and build from the appropriate linux defconfig file. 'install' should install both xen, the tools, and linux-xen. Alson rename xen.dbg -> xen-syms
This commit is contained in:
1 parent
142fa293d0
commit
8019cf6ca1
6 files changed
+39
-27
No files matched your search
@@ -29,3 +29,4 @@ xen/tools/elf-reloc
|
||||
xen/tools/figlet/figlet
|
||||
xen/xen
|
||||
xen/xen.*
|
||||
xen/xen-syms
|
||||
@@ -18,34 +18,47 @@ dist: all
|
||||
$(MAKE) prefix=$(INSTALL_DIR) dist=yes -C tools install
|
||||
|
||||
LINUX_VER ?= $(shell ( /bin/ls -ld linux-*-xen-sparse ) 2>/dev/null | sed -e 's!^.*linux-\(.\+\)-xen-sparse!\1!' )
|
||||
LINUX_SRC ?= linux-$(LINUX_VER).tar.gz
|
||||
LINUX_CONFIG_DIR ?= $(INSTALL_DIR)/boot
|
||||
LINUX_SRC_PATH ?= .:..
|
||||
LINUX_SRC_X ?= $(firstword $(foreach dir,$(subst :, ,$(LINUX_SRC_PATH)),$(wildcard $(dir)/linux-$(LINUX_VER).tar.gz)))
|
||||
|
||||
pristine-linux-src:
|
||||
[ -e $(LINUX_SRC) ] || wget ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-$(LINUX_VER).tar.gz -O- > $(LINUX_SRC)
|
||||
pristine-linux-src:
|
||||
ifneq ($(LINUX_SRC),)
|
||||
@[ -r "$(LINUX_SRC)" ] || (echo "Can not find linux src at $(LINUX_SRC)" && false)
|
||||
LINUX_SRC_X = $(LINUX_SRC)
|
||||
else
|
||||
ifeq ($(LINUX_SRC_X),)
|
||||
@echo "Can not find linux-$(LINUX_VER).tar.gz in path $(LINUX_SRC_PATH)"
|
||||
@wget ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-$(LINUX_VER).tar.gz -O./linux-$(LINUX_VER).tar.gz
|
||||
LINUX_SRC_X = ./linux-$(LINUX_VER).tar.gz
|
||||
endif
|
||||
endif
|
||||
|
||||
linux-$(LINUX_VER)-xen: pristine-linux-src
|
||||
$(RM) -rf linux-$(LINUX_VER)-xen
|
||||
tar -x -z -f $(LINUX_SRC)
|
||||
tar -x -z -f $(LINUX_SRC_X)
|
||||
mv linux-$(LINUX_VER) linux-$(LINUX_VER)-xen
|
||||
( cd linux-$(LINUX_VER)-xen-sparse ; ./mkbuildtree ../linux-$(LINUX_VER)-xen )
|
||||
|
||||
config_%: linux-$(LINUX_VER)-xen
|
||||
linux_%_config:
|
||||
$(MAKE) -C linux-$(LINUX_VER)-xen ARCH=xen mrproper
|
||||
cp $(LINUX_CONFIG_DIR)/config-$(LINUX_VER)-$(subst config_,,$(@)) .config || $(MAKE) -C linux-$(LINUX_VER)-xen ARCH=xen $(subst config_,,$(@))_config
|
||||
cp $(LINUX_CONFIG_DIR)/config-$(LINUX_VER)-$(subst _config,,$(subst linux_,,$(@))) .config || $(MAKE) -C linux-$(LINUX_VER)-xen ARCH=xen $(subst linux_,,$(@))
|
||||
$(MAKE) -C linux-$(LINUX_VER)-xen ARCH=xen oldconfig
|
||||
$(MAKE) -C linux-$(LINUX_VER)-xen ARCH=xen dep
|
||||
|
||||
build_%:
|
||||
$(MAKE) -C linux-$(LINUX_VER)-xen ARCH=xen bzImage
|
||||
$(MAKE) -C linux-$(LINUX_VER)-xen ARCH=xen INSTALL_NAME=$(subst build_,$(LINUX_VER)-,$(@)) prefix=$(INSTALL_DIR) install
|
||||
linux:
|
||||
$(MAKE) -C linux-$(LINUX_VER)-xen ARCH=xen INSTALL_PATH=$(INSTALL_DIR) install
|
||||
|
||||
linux_%:
|
||||
$(MAKE) -C linux-$(LINUX_VER)-xen ARCH=xen INSTALL_NAME=$(subst linux_,$(LINUX_VER)-,$(@)) INSTALL_PATH=$(INSTALL_DIR) install
|
||||
|
||||
|
||||
world: dist
|
||||
$(MAKE) config_xenU
|
||||
$(MAKE) build_xenU
|
||||
$(MAKE) config_xen0
|
||||
$(MAKE) build_xen0
|
||||
$(MAKE) linux-$(LINUX_VER)-xen
|
||||
$(MAKE) linux_xenU_config
|
||||
$(MAKE) linux_xenU
|
||||
$(MAKE) linuc_xen0_config
|
||||
$(MAKE) linux_xen0
|
||||
|
||||
|
||||
clean: delete-symlinks
|
||||
|
||||
@@ -102,17 +102,15 @@ FORCE: ;
|
||||
bzImage: vmlinux
|
||||
@$(MAKEBOOT) bzImage
|
||||
|
||||
INSTALL_NAME ?= $(KERNELRELEASE)
|
||||
install: bzImage
|
||||
mkdir -p $(prefix)/boot
|
||||
install -m0644 arch/$(ARCH)/boot/bzImage $(prefix)/boot/vmlinuz-$(INSTALL_NAME)
|
||||
install -m0644 vmlinux $(prefix)/boot/vmlinux-syms-$(INSTALL_NAME)
|
||||
install -m0664 .config $(prefix)/boot/config-$(INSTALL_NAME)
|
||||
mkdir -p $(INSTALL_PATH)/boot
|
||||
install -m0644 arch/$(ARCH)/boot/bzImage $(INSTALL_PATH)/boot/vmlinuz-$(INSTALL_NAME)$(INSTALL_SUFFIX)
|
||||
install -m0644 vmlinux $(INSTALL_PATH)/boot/vmlinux-syms-$(INSTALL_NAME)$(INSTALL_SUFFIX)
|
||||
install -m0664 .config $(INSTALL_PATH)/boot/config-$(INSTALL_NAME)$(INSTALL_SUFFIX)
|
||||
|
||||
dist: bzImage
|
||||
mkdir -p ../install/boot
|
||||
install -m0644 arch/$(ARCH)/boot/bzImage ../install/boot/vmlinuz-$(INSTALL_NAME)
|
||||
install -m0644 vmlinux ../install/boot/vmlinux-syms-$(INSTALL_NAME)
|
||||
install -m0664 .config ../install/boot/config-$(INSTALL_NAME)
|
||||
dist:
|
||||
$(MAKE) INSTALL_PATH=../install install
|
||||
|
||||
%_config: arch/xen/defconfig-%
|
||||
rm -f .config arch/xen/defconfig
|
||||
|
||||
+1
-1
@@ -32,5 +32,5 @@ clean:
|
||||
$(MAKE) -C xentrace clean
|
||||
$(MAKE) -C xenctl clean
|
||||
$(MAKE) -C xend clean
|
||||
$(MAKE) -C xenmgr install
|
||||
$(MAKE) -C xenmgr clean
|
||||
|
||||
+2
-2
@@ -15,13 +15,13 @@ default: $(TARGET)
|
||||
gzip -f -9 < $(TARGET) > $(TARGET).gz
|
||||
|
||||
debug:
|
||||
objdump -D -S $(TARGET).dbg > $(TARGET).s
|
||||
objdump -D -S $(TARGET)-syms > $(TARGET).s
|
||||
|
||||
install: $(TARGET)
|
||||
gzip -f -9 < $(TARGET) > $(TARGET).gz
|
||||
mkdir -p $(prefix)/boot
|
||||
install -m0644 $(TARGET).gz $(prefix)/boot
|
||||
install -m0644 $(TARGET).dbg $(prefix)/boot
|
||||
install -m0644 $(TARGET)-syms $(prefix)/boot
|
||||
|
||||
dist: $(TARGET)
|
||||
$(MAKE) prefix=`pwd`/../../install dist=yes install
|
||||
|
||||
@@ -15,8 +15,8 @@ endif
|
||||
# wrapping that with a low-memory bootstrapper.)
|
||||
default: boot/boot.o $(OBJS)
|
||||
$(LD) -r -o arch.o $(OBJS)
|
||||
$(LD) $(LDFLAGS) boot/boot.o $(ALL_OBJS) -o $(TARGET).dbg
|
||||
objcopy -R .note -R .comment -S $(TARGET).dbg $(TARGET)
|
||||
$(LD) $(LDFLAGS) boot/boot.o $(ALL_OBJS) -o $(TARGET)-syms
|
||||
objcopy -R .note -R .comment -S $(TARGET)-syms $(TARGET)
|
||||
$(BASEDIR)/tools/elf-reloc $(MONITOR_BASE) $(LOAD_BASE) $(TARGET)
|
||||
|
||||
clean:
|
||||
|
||||