X-Git-Url: http://git.ipfire.org/?p=people%2Fteissler%2Fipfire-2.x.git;a=blobdiff_plain;f=lfs%2Fxen-image;h=1c2624e2e705e391cd629568e24da699279abb4a;hp=caef9725fcff60332758f086cf6a0d4ecff37829;hb=52a2f02f41d362b84d294a0b3239d93cd2010a14;hpb=c1cd3a8bf8b5e2df4faaaba39b32f7c40bffa638 diff --git a/lfs/xen-image b/lfs/xen-image index caef9725f..1c2624e2e 100644 --- a/lfs/xen-image +++ b/lfs/xen-image @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007 Michael Tremer & Christian Schmidt # +# Copyright (C) 2007-2012 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -29,6 +29,8 @@ VER = ipfire THISAPP = xen-image TARGET = $(DIR_INFO)/$(THISAPP) +KVER2 = `grep "^VER " $(DIR_SRC)/lfs/linux2 | sed "s| ||g" | cut -d"=" -f2` + ############################################################################### # Top-level Rules ############################################################################### @@ -44,7 +46,7 @@ md5 : ############################################################################### # Installation Details ############################################################################### -IMGinst := /install/images/$(SNAME)-$(VERSION).xen.$(MACHINE)-$(ED)-core$(CORE).tar.bz2 +IMGinst := /install/images/$(SNAME)-$(VERSION).xen.$(MACHINE)-full-core$(CORE).tar.bz2 MNThdd := /install/harddisk IMGboot := /install/images/$(SNAME)/$(SNAME)-boot.img @@ -89,8 +91,13 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) tar -C $(MNThdd)/ -xvf /install/cdrom/$(SNAME)-$(VERSION).tlz --lzma \ --exclude=lib/modules* --exclude=boot* - #Install Xen Kernel - tar -C $(MNThdd)/opt/pakfire/tmp -xvf /install/packages/linux-xen-$(KVER)-*.ipfire + #Install legacy Xen Kernel + tar -C $(MNThdd)/opt/pakfire/tmp -xvf /install/packages/linux-xen-$(KVER2)-*.ipfire + chroot $(MNThdd) /opt/pakfire/tmp/install.sh + rm -rf $(MNThdd)/opt/pakfire/tmp/* + + #Install pae Kernel + tar -C $(MNThdd)/opt/pakfire/tmp -xvf /install/packages/linux-pae-$(KVER)-*.ipfire chroot $(MNThdd) /opt/pakfire/tmp/install.sh rm -rf $(MNThdd)/opt/pakfire/tmp/* @@ -98,24 +105,30 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) mkdir $(MNThdd)/boot/grub echo "timeout 10" > $(MNThdd)/boot/grub/grub.conf echo "default 0" >> $(MNThdd)/boot/grub/grub.conf - echo "title IPFire (XEN-Kernel)" >> $(MNThdd)/boot/grub/grub.conf - echo " kernel /vmlinuz-$(KVER)-ipfire-xen root=/dev/xvda3 rootdelay=10 panic=10 console=xvc0 ro" \ + echo "title IPFire (legacy XEN-Kernel)" >> $(MNThdd)/boot/grub/grub.conf + echo " kernel /vmlinuz-$(KVER2)-ipfire-xen root=/dev/xvda3 rootdelay=10 panic=10 console=xvc0 ro" \ >> $(MNThdd)/boot/grub/grub.conf - echo " initrd /ipfirerd-$(KVER)-xen.img" >> $(MNThdd)/boot/grub/grub.conf + echo " initrd /ipfirerd-$(KVER2)-xen.img" >> $(MNThdd)/boot/grub/grub.conf echo "# savedefault 0" >> $(MNThdd)/boot/grub/grub.conf + echo "title IPFire (PAE-Kernel)" >> $(MNThdd)/boot/grub/grub.conf + echo " kernel /vmlinuz-$(KVER)-ipfire-pae root=/dev/xvda3 rootdelay=10 panic=10 console=xvc0 ro" \ + >> $(MNThdd)/boot/grub/grub.conf + echo " initrd /ipfirerd-$(KVER)-xen.img" >> $(MNThdd)/boot/grub/grub.conf + echo "# savedefault 1" >> $(MNThdd)/boot/grub/grub.conf ln -s grub.conf $(MNThdd)/boot/grub/menu.lst #Copy the meta-info of linux-xen package cp -f /install/packages/meta-linux-xen $(MNThdd)/opt/pakfire/db/installed cp -f /install/packages/meta-linux-xen $(MNThdd)/opt/pakfire/db/meta + cp -f /install/packages/meta-linux-pae $(MNThdd)/opt/pakfire/db/installed + cp -f /install/packages/meta-linux-pae $(MNThdd)/opt/pakfire/db/meta #Set default configuration echo "LANGUAGE=en" >> $(MNThdd)/var/ipfire/main/settings echo "HOSTNAME=$(SNAME)" >> $(MNThdd)/var/ipfire/main/settings echo "THEME=ipfire" >> $(MNThdd)/var/ipfire/main/settings - touch $(MNThdd)/lib/modules/$(KVER)-ipfire-xen/modules.dep - mv $(MNThdd)/bin/uname.bak $(MNThdd)/bin/uname + touch $(MNThdd)/lib/modules/$(KVER2)-ipfire-xen/modules.dep mkdir $(MNThdd)/proc mount --bind /proc $(MNThdd)/proc mount --bind /dev $(MNThdd)/dev @@ -128,7 +141,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) sed -i -e "s|FSTYPE|ext3|g" $(MNThdd)/etc/fstab - chroot $(MNThdd) /sbin/dracut --force --verbose /boot/ipfirerd-$(KVER)-xen.img $(KVER)-ipfire-xen + chroot $(MNThdd) /sbin/dracut --force --verbose /boot/ipfirerd-$(KVER2)-xen.img $(KVER2)-ipfire-xen + chroot $(MNThdd) /sbin/dracut --force --verbose /boot/ipfirerd-$(KVER)-pae.img $(KVER)-ipfire-pae #Remove root / fstab check rm -rf $(MNThdd)/etc/rc.d/rcsysinit.d/S19checkfstab @@ -155,18 +169,9 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) sed -i -e "s|^thermal|#thermal|g" $(MNThdd)/etc/sysconfig/modules sed -i -e "s|^video|#video|g" $(MNThdd)/etc/sysconfig/modules - #Change pakfire trunk - sed -i -e "s|$(VERSION)|$(VERSION)-xen|g" \ - $(MNThdd)/opt/pakfire/etc/pakfire.conf - - #Copy initramdisk, kernel and config - #cp -f $(MNThdd)/boot/ipfirerd-$(KVER)-xen.img \ - # /install/images/$(SNAME)/boot - #cp -f $(MNThdd)/boot/vmlinuz-$(KVER)-ipfire-xen \ - # /install/images/$(SNAME)/boot + # Copy readme and config cp $(DIR_SRC)/config/xen-image/* \ /install/images/$(SNAME) - sed -i -e "s|KVER|$(KVER)|g" /install/images/$(SNAME)/ipfire.cfg # Unmount umount $(MNThdd)/proc