Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


added MSR hook framework
[palacios.git] / kitten / arch / x86_64 / boot / Makefile
1 #
2 # arch/x86_64/boot/Makefile
3 #
4 # This file is subject to the terms and conditions of the GNU General Public
5 # License.  See the file "COPYING" in the main directory of this archive
6 # for more details.
7 #
8 # Copyright (C) 1994 by Linus Torvalds
9 #
10 # 2007 by Linus Torvalds
11 #
12 # 20070816  Kevin Pedretti <ktpedre@sandia.gov>
13 #           Modifications for Kitten. Remove unneeded stuff.
14 #
15
16 # ROOT_DEV specifies the default root-device when making the image.
17 # This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case
18 # the default of FLOPPY is used by 'build'.
19
20 ROOT_DEV := CURRENT
21
22 targets         := vmlwk.bin bootsect bootsect.o \
23                    setup setup.o bzImage
24
25 EXTRA_CFLAGS := -m32
26
27 hostprogs-y     := tools/build
28 HOST_EXTRACFLAGS += $(LWKINCLUDE)
29 subdir-         := compressed/  #Let make clean descend in compressed/
30 # ---------------------------------------------------------------------------
31
32 $(obj)/bzImage: IMAGE_OFFSET := 0x100000
33 $(obj)/bzImage: EXTRA_AFLAGS := -traditional -D__BIG_KERNEL__
34 $(obj)/bzImage: BUILDFLAGS   := -b
35
36 quiet_cmd_image = BUILD   $@
37 cmd_image = $(obj)/tools/build $(BUILDFLAGS) $(obj)/bootsect $(obj)/setup \
38             $(obj)/vmlwk.bin $(ROOT_DEV) > $@
39
40 $(obj)/bzImage: $(obj)/bootsect $(obj)/setup \
41                               $(obj)/vmlwk.bin $(obj)/tools/build FORCE
42         $(call if_changed,image)
43         @echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
44
45 $(obj)/vmlwk.bin: $(obj)/compressed/vmlwk FORCE
46         $(call if_changed,objcopy)
47
48 LDFLAGS_bootsect := -Ttext 0x0 -s --oformat binary
49 LDFLAGS_setup    := -Ttext 0x0 -s --oformat binary -e begtext
50
51 $(obj)/setup $(obj)/bootsect: %: %.o FORCE
52         $(call if_changed,ld)
53
54 $(obj)/compressed/vmlwk: FORCE
55         $(Q)$(MAKE) $(build)=$(obj)/compressed IMAGE_OFFSET=$(IMAGE_OFFSET) $@
56
57 # Set this if you want to pass append arguments to the isoimage kernel
58 FDARGS = console=serial debug_mptable=1 init_argv="one two three" init_envp="one=1 two=2 three=3"
59 # Set this if you want an initrd included with the isoimage kernel
60 ifdef CONFIG_V3VEE
61 FDINITRD = /opt/vmm-tools/isos/finnix.iso
62 else
63 FDINITRD = init_task
64 endif
65
66 image_cmdline = default lwk $(FDARGS) $(if $(FDINITRD),initrd=initrd.img,)
67
68 # This requires being root or having syslinux 2.02 or higher installed
69 isoimage: $(BOOTIMAGE) $(FDINITRD)
70         -rm -rf $(obj)/isoimage
71         mkdir $(obj)/isoimage
72         for i in lib lib64 share end ; do \
73                 if [ -f /usr/$$i/syslinux/isolinux.bin ] ; then \
74                         cp /usr/$$i/syslinux/isolinux.bin $(obj)/isoimage ; \
75                         break ; \
76                 fi ; \
77                 if [ $$i = end ] ; then exit 1 ; fi ; \
78         done
79         cp $(BOOTIMAGE) $(obj)/isoimage/lwk
80         echo '$(image_cmdline)' > $(obj)/isoimage/isolinux.cfg
81         if [ -f '$(FDINITRD)' ] ; then \
82                 cp '$(FDINITRD)' $(obj)/isoimage/initrd.img ; \
83         fi
84         mkisofs -J -r -o $(obj)/image.iso -b isolinux.bin -c boot.cat \
85                 -no-emul-boot -boot-load-size 4 -boot-info-table \
86                 $(obj)/isoimage
87         rm -rf $(obj)/isoimage
88