Revision: 5339 http://ipcop.svn.sourceforge.net/ipcop/?rev=5339&view=rev Author: gespinasse Date: 2011-01-15 13:10:00 +0000 (Sat, 15 Jan 2011)
Log Message: ----------- Compile a bzImage unhardened first for 486 as smaller enought to fit on floppy Use the modern path (i386=>x86) to retrieve the bzImage We now have 16 kb free (with the boot image include) Just need to check if that really boot as it should Modified Paths: -------------- ipcop/trunk/config/rootfiles/arch_i486/linux ipcop/trunk/lfs/boot.img ipcop/trunk/lfs/initramfs ipcop/trunk/lfs/linux Modified: ipcop/trunk/config/rootfiles/arch_i486/linux =================================================================== --- ipcop/trunk/config/rootfiles/arch_i486/linux 2011-01-13 07:48:45 UTC (rev 5338) +++ ipcop/trunk/config/rootfiles/arch_i486/linux 2011-01-15 13:10:00 UTC (rev 5339) @@ -2,6 +2,7 @@ boot/System.map-KVER boot/vmlinuz boot/vmlinuz-KVER +#boot/vmlinuz_unhardened-KVER #lib/firmware/3com #lib/firmware/3com/typhoon.bin #lib/firmware/acenic Modified: ipcop/trunk/lfs/boot.img =================================================================== --- ipcop/trunk/lfs/boot.img 2011-01-13 07:48:45 UTC (rev 5338) +++ ipcop/trunk/lfs/boot.img 2011-01-15 13:10:00 UTC (rev 5339) @@ -66,10 +66,9 @@ sed -e 's/boot IPCop/boot IPCop $(VERSION)/' $(DIR_SRC)/config/arch/$(MACHINE)/install-message \ | mcopy - i:message mcopy $(DIR_SRC)/config/arch/$(MACHINE)/syslinux-fdinitrd.cfg i:syslinux.cfg - mcopy /boot/vmlinuz-$(KVER) i:vmlinuz + mcopy /boot/vmlinuz_unhardened-$(KVER) i:vmlinuz mcopy /$(INSTALLER_DIR)/images/$(SNAME)-$(VERSION)-mini-initramfs.img i:initrd.img - # actually 3000 bytes to big to include the image - #mcopy $(DIR_SRC)/config/arch/$(MACHINE)/splash.rle i:splash.rle + mcopy $(DIR_SRC)/config/arch/$(MACHINE)/splash.rle i:splash.rle # show size used mdir i: Modified: ipcop/trunk/lfs/initramfs =================================================================== --- ipcop/trunk/lfs/initramfs 2011-01-13 07:48:45 UTC (rev 5338) +++ ipcop/trunk/lfs/initramfs 2011-01-15 13:10:00 UTC (rev 5339) @@ -693,18 +693,17 @@ cp /lib/modules/$(KVER)/kernel/drivers/block/floppy.ko.gz \ /$(INSTALLER_DIR)/mini-initramfs/lib/modules/$(KVER)/kernel/drivers/block - # actually, not enought space on boot floppy, so skip that # Copy the ide-core, ide-generic, and ide-cd modules into the mini-initramfs - #mkdir -p /$(INSTALLER_DIR)/mini-initramfs/lib/modules/$(KVER)/kernel/drivers/ide - #cp -a /lib/modules/$(KVER)/kernel/drivers/ide/ide-core.ko.gz \ - # /lib/modules/$(KVER)/kernel/drivers/ide/ide-generic.ko.gz \ - # /lib/modules/$(KVER)/kernel/drivers/ide/ide-cd_mod.ko.gz \ - # /$(INSTALLER_DIR)/mini-initramfs/lib/modules/$(KVER)/kernel/drivers/ide/ + mkdir -p /$(INSTALLER_DIR)/mini-initramfs/lib/modules/$(KVER)/kernel/drivers/ide + cp -a /lib/modules/$(KVER)/kernel/drivers/ide/ide-core.ko.gz \ + /lib/modules/$(KVER)/kernel/drivers/ide/ide-generic.ko.gz \ + /lib/modules/$(KVER)/kernel/drivers/ide/ide-cd_mod.ko.gz \ + /$(INSTALLER_DIR)/mini-initramfs/lib/modules/$(KVER)/kernel/drivers/ide/ # Copy the cdrom module - #mkdir -p /$(INSTALLER_DIR)/mini-initramfs/lib/modules/$(KVER)/kernel/drivers/cdrom - #cp -a /lib/modules/$(KVER)/kernel/drivers/cdrom/cdrom.ko.gz \ - # /$(INSTALLER_DIR)/mini-initramfs/lib/modules/$(KVER)/kernel/drivers/cdrom/ + mkdir -p /$(INSTALLER_DIR)/mini-initramfs/lib/modules/$(KVER)/kernel/drivers/cdrom + cp -a /lib/modules/$(KVER)/kernel/drivers/cdrom/cdrom.ko.gz \ + /$(INSTALLER_DIR)/mini-initramfs/lib/modules/$(KVER)/kernel/drivers/cdrom/ # Copy nls_cp437.ko.gz -- not mandatory but since it's so small it's ok to include it to avoid a warning # message when booting the mini-initramfs floppy Modified: ipcop/trunk/lfs/linux =================================================================== --- ipcop/trunk/lfs/linux 2011-01-13 07:48:45 UTC (rev 5338) +++ ipcop/trunk/lfs/linux 2011-01-15 13:10:00 UTC (rev 5339) @@ -128,8 +128,17 @@ cd $(DIR_APP) && make clean ifeq "$(MACHINE)" "i486" - cd $(DIR_APP) && make -j $(PARALLELISM) all - cd $(DIR_APP) && cp -f arch/i386/boot/bzImage /boot/vmlinuz-$(KVER) + # compile a non hardened vmlinuz for floppy as size is smaller unhardened + # CFLAGS_KERNEL is defined empty on Makefile, LDFLAGS value is not defined, only used + cd $(DIR_APP) && sed -i -e 's/^CFLAGS_KERNEL.*/CFLAGS_KERNEL = -fno-PIE -fno-PIC -fno-stack-protector -U_FORTIFY_SOURCE -nopie -norelro -nonow -nocombreloc/' Makefile + cd $(DIR_APP) && make -j $(PARALLELISM) bzImage + cd $(DIR_APP) && cp -f arch/x86/boot/bzImage /boot/vmlinuz_unhardened-$(KVER) + cd $(DIR_APP) && make clean + # and remove our special hack for normal compilation + cd $(DIR_APP) && sed -i 's/^CFLAGS_KERNEL.*/CFLAGS_KERNEL =/' Makefile + + cd $(DIR_APP) && make -j $(PARALLELISM) all + cd $(DIR_APP) && cp -f arch/x86/boot/bzImage /boot/vmlinuz-$(KVER) cd $(DIR_APP) && cp -f System.map /boot/System.map-$(KVER) ln -sf vmlinuz-$(KVER) /boot/vmlinuz ln -sf System.map-$(KVER) /boot/System.map This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Ipcop-svn mailing list Ipcop-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ipcop-svn