[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tyndur-devel] [PATCH 1/3] =?UTF-8?q?mein=20Buildsystem=20f=C3=BCr=20GRUB=202=20f=C3=BCr=20CDROM



From: Johannes Pfeiffer <johannes@pc-oben.(none)>

---
 Makefile                     |   17 ++++++++++++-----
 build/config/grub2_cdrom.cfg |   19 +++++++++++++++++++
 build/scripts/grub2_cdrom    |   35 +++++++++++++++++++++++++++++++++++
 3 files changed, 66 insertions(+), 5 deletions(-)
 create mode 100644 build/config/grub2_cdrom.cfg
 create mode 100755 build/scripts/grub2_cdrom

diff --git a/Makefile b/Makefile
index 9b63409..93ddf9b 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ PPC=fpc -n -Cn -CX -Ttyndur  -Fu../lib/units -Fu../units
 ASM_ELF=nasm -felf -O99 
 ASM_BIN=nasm -fbin -O99
 
-BUILD_ROOT=/home/kevin/entwicklung/tyndur/build/output
+BUILD_ROOT=/home/johannes/Programme/Tyndur/tyndur/build/output
 BUILD_DIR=$(BUILD_ROOT)
 
 AS=as -32
@@ -22,14 +22,18 @@ obj:
 
 subdirs:
 	$(MAKE) --no-print-directory -sC doc
-	$(MAKE) --no-print-directory -sC patches
 	$(MAKE) --no-print-directory -sC src
 
-clean:
-	rm -f *.o *.a *.mod
+clean_objs:
+	rm -f *.o *.a *.mod *.ppu link.res ppas.sh tyndur
+
+softclean: clean_objs
+	for file in *; do if [ -f "$$file/Makefile" -a \( ! -f "$$file/.nobuild" -o -f "$$file/.ignorenobuild" \) ]; then $(MAKE) -sC "$$file" softclean; fi done
+
+clean: clean_objs
 	for file in *; do if [ -f "$$file/Makefile" -a \( ! -f "$$file/.nobuild" -o -f "$$file/.ignorenobuild" \) ]; then $(MAKE) -sC "$$file" clean; rm "$$file/Makefile"; fi done  
 
-.SILENT: all makefiles subdirs obj clean clean_root updateroot image-floppy image-hd test-qemu test-qemu-hd
+.SILENT: all makefiles subdirs obj clean softclean clean_objs clean_root updateroot image-floppy image-hd test-qemu test-qemu-hd
 clean: clean_root
 
 clean_root:
@@ -49,6 +53,9 @@ image-hd: updateroot
 image-cdrom: updateroot
 	build/scripts/image_cdrom
 
+grub2-cdrom: updateroot
+	build/scripts/grub2_cdrom
+
 test-qemu: image-floppy
 	qemu -serial stdio -fda build/images/floppy.img -boot a -net user -net nic,model=rtl8139 | tee qemu-serial.log
 
diff --git a/build/config/grub2_cdrom.cfg b/build/config/grub2_cdrom.cfg
new file mode 100644
index 0000000..1b034bd
--- /dev/null
+++ b/build/config/grub2_cdrom.cfg
@@ -0,0 +1,19 @@
+#Boot timeout
+set timeout = 10
+
+#boote standardmäßig die deutsche Version
+set default = 0
+
+#deutsche Version
+menuentry "Tyndur (Deutsch)" {
+	multiboot /boot/tyndur
+	module /modules/init
+	module /modules/pci
+	module /modules/ata
+	module /modules/iso9660
+	module /modules/ramoverlay
+	module /modules/ext2
+	module /modules/console
+	module /modules/servmgr
+boot
+}
diff --git a/build/scripts/grub2_cdrom b/build/scripts/grub2_cdrom
new file mode 100755
index 0000000..6fbb908
--- /dev/null
+++ b/build/scripts/grub2_cdrom
@@ -0,0 +1,35 @@
+# Copyright (c) 20010 The tyndur Project. All rights reserved.
+#
+# This code is derived from software contributed to the tyndur Project
+# by Johannes Pfeiffer.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. All advertising materials mentioning features or use of this software
+#    must display the following acknowledgement:
+#     This product includes software developed by the tyndur Project
+#     and its contributors.
+# 4. Neither the name of the tyndur Project nor the names of its
+#    contributors may be used to endorse or promote products derived
+#    from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cp build/config/grub2_cdrom.cfg build/root/boot/grub/grub.cfg
+grub-mkrescue --output=build/images/grub2-cdrom-tyndur.iso build/root/
-- 
1.7.1