OSDN Git Service

このプロジェクトでビルドができるようになりました。 construction
authorhideaki sago <hideaki sago@localhost>
Mon, 10 Oct 2011 16:18:44 +0000 (01:18 +0900)
committerhideaki sago <hideaki sago@localhost>
Mon, 10 Oct 2011 16:18:44 +0000 (01:18 +0900)
.cproject
.gitignore [new file with mode: 0644]
Debug/.gitignore [new file with mode: 0644]
Debug/Makefile

index 6e06036..88da776 100644 (file)
--- a/.cproject
+++ b/.cproject
                                </scannerConfigBuildInfo>
                        </storageModule>
                        <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
-                       <storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
                        <storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
                        <storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings">
                                <doc-comment-owner id="org.eclipse.cdt.ui.doxygen">
                                        <path value=""/>
                                </doc-comment-owner>
                        </storageModule>
+                       <storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
+                               <buildTargets>
+                                       <target name="run" path="Debug" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
+                                               <buildCommand>make</buildCommand>
+                                               <buildArguments/>
+                                               <buildTarget>run</buildTarget>
+                                               <stopOnError>true</stopOnError>
+                                               <useDefaultCommand>true</useDefaultCommand>
+                                               <runAllBuilders>true</runAllBuilders>
+                                       </target>
+                               </buildTargets>
+                       </storageModule>
                </cconfiguration>
                <cconfiguration id="0.1215660714.164616624">
                        <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.1215660714.164616624" moduleId="org.eclipse.cdt.core.settings" name="Release">
                                </scannerConfigBuildInfo>
                        </storageModule>
                        <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
-                       <storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
                        <storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>
                        <storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings">
                                <doc-comment-owner id="org.eclipse.cdt.ui.doxygen">
                                        <path value=""/>
                                </doc-comment-owner>
                        </storageModule>
+                       <storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
+                               <buildTargets>
+                                       <target name="run" path="Debug" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
+                                               <buildCommand>make</buildCommand>
+                                               <buildArguments/>
+                                               <buildTarget>run</buildTarget>
+                                               <stopOnError>true</stopOnError>
+                                               <useDefaultCommand>true</useDefaultCommand>
+                                               <runAllBuilders>true</runAllBuilders>
+                                       </target>
+                               </buildTargets>
+                       </storageModule>
                </cconfiguration>
        </storageModule>
        <storageModule moduleId="cdtBuildSystem" version="4.0.0">
diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..1de8aee
--- /dev/null
@@ -0,0 +1 @@
+/ISORoot
diff --git a/Debug/.gitignore b/Debug/.gitignore
new file mode 100644 (file)
index 0000000..218bd97
--- /dev/null
@@ -0,0 +1 @@
+/TryOS.iso
index 4fa17b5..3bffa4a 100644 (file)
@@ -9,48 +9,67 @@
 #
 #MODE = 
 
+# ビルド構成
 BUILD_CONFIG = Debug
 
 # 全般
 OS_NAME = TryOS
 TARGET = $(OS_NAME).iso
-ISO_ROOT_PATH = ../ISORoot
-OS_DIR = $(ISO_ROOT_PATH)$(OS_NAME)/
 
 # Boot
 BOOT_NAME = TryBoot
 BOOT_DIR = ../../Boot/
 BOOT_IMG_NAME = $(BOOT_NAME).img
 BOOT_IMG_PATH = $(BOOT_DIR)$(BUILD_CONFIG)/$(BOOT_IMG_NAME)
+BOOT_LOAD_SEGMENT = 0x0100
+BOOT_LOAD_SIZE = 4
 
 # Kernel
 KERNEL_NAME = TryKernel
 KERNEL_DIR = ../../Kernel/
 KERNEL_IMG_NAME = $(KERNEL_NAME).img
 KERNEL_IMG_PATH = $(KERNEL_DIR)$(BUILD_CONFIG)/$(KERNEL_IMG_NAME)
-KERNEL_IMG_ISO_PATH = $(OS_DIR)Kernel.img
 
 # CLib
-# TODO
+# TODO CLib関連の定義
 
 # API
-# TODO
+# TODO API関連の定義
 
 # ISOFSファイルツリー
-ISO_PATH_KERNEL = $(OS_DIR)Kernel/$(KERNEL_IMG_NAME)
-
-
-#ISO 9660ファイルシステムのイメージ作成オプション
-MKISOFS_OPTIONS                += -quiet
-MKISOFS_OPTIONS                += -d
-MKISOFS_OPTIONS                += -gui
-MKISOFS_OPTIONS                += -l
-MKISOFS_OPTIONS                += -J
-MKISOFS_OPTIONS                += -R
-MKISOFS_OPTIONS                += -no-bak
-MKISOFS_OPTIONS                += -V $(OS_NAME)
-MKISOFS_OPTIONS                += $(addprefix -m , $(DESELECTION))
-
+ISO_PATH_ROOT = ../ISORoot/
+ISO_PATH_OS_DIR = $(ISO_PATH_ROOT)$(OS_NAME)/
+ISO_PATH_BOOT_DIR = $(ISO_PATH_OS_DIR)Boot/
+ISO_PATH_BOOT_IMG = $(ISO_PATH_BOOT_DIR)$(BOOT_IMG_NAME)
+ISO_PATH_KERNEL_DIR = $(ISO_PATH_OS_DIR)Kernel/
+ISO_PATH_KERNEL_IMG = $(ISO_PATH_KERNEL_DIR)$(KERNEL_IMG_NAME)
+ISO_PATH_APPS_DIR = $(ISO_PATH_ROOT)Apps/
+
+
+# ISO 9660ファイルシステムのイメージ作成オプション
+MKISOFS_OPTIONS += -b $(OS_NAME)/Boot/$(BOOT_IMG_NAME)
+MKISOFS_OPTIONS += -no-emul-boot
+MKISOFS_OPTIONS += -boot-load-seg $(BOOT_LOAD_SEGMENT)
+MKISOFS_OPTIONS += -boot-load-size $(BOOT_LOAD_SIZE)
+MKISOFS_OPTIONS += -quiet
+MKISOFS_OPTIONS += -d
+MKISOFS_OPTIONS += -gui
+MKISOFS_OPTIONS += -l
+MKISOFS_OPTIONS += -J
+MKISOFS_OPTIONS += -R
+MKISOFS_OPTIONS += -no-bak
+MKISOFS_OPTIONS += -V $(OS_NAME)
+MKISOFS_OPTIONS += $(addprefix -m , $(DESELECTION))
+
+# イメージコピーオプション
+CP_OPTIONS += -a
+CP_OPTIONS += -f
+CP_OPTIONS += -p
+CP_OPTIONS += -u
+
+#QEMU実行オプション
+QEMU_OPTIONS           += -boot d
+QEMU_OPTIONS           += -usb
 
 
 
@@ -60,17 +79,10 @@ all: $(TARGET)
 PHONY += clean
 clean:
        rm -f $(OBJS) $(TARGET)
-       
-       
-$(TARGET): fsbuild
-
-
-# ファイルシステム構築
-# ISOに載せるファイルシステムを構築します。
-PHONY += fsbuild
-fsbuild: $(KERNEL_IMG_ISO_PATH)
-       mkdir -f $(ISO_ROOT_PATH)
 
+PHONY += run
+run:
+       qemu -cdrom $(TARGET) $(QEMU_OPTIONS)
 
 
 .PHONY: $(PHONY)
@@ -78,35 +90,48 @@ fsbuild: $(KERNEL_IMG_ISO_PATH)
 
 
 
+$(TARGET): $(ISO_PATH_BOOT_IMG) $(ISO_PATH_KERNEL_IMG)
+       mkisofs $(MKISOFS_OPTIONS) -o $@ $(ISO_PATH_ROOT)
 
 
+$(ISO_PATH_BOOT_IMG): $(BOOT_IMG_PATH)
+       -mkdir -p $(ISO_PATH_BOOT_DIR)
+       cp $(CP_OPTIONS) $^ $@
+       
+$(ISO_PATH_KERNEL_IMG): $(KERNEL_IMG_PATH)
+       -mkdir -p $(ISO_PATH_KERNEL_DIR)
+       cp $(CP_OPTIONS) $^ $@
 
 
-####################################################
-# ↓過去のもの
 
 
 
 
-PHONY += $(TARGET)
-$(TARGET):     $(FDD_IMG) fsbuild
-       mkisofs $(MKISOFS_OPTIONS) -b $(FDD_IMG) -c $(BOOT_CATALOG) -o $@ $(CD_ROOT_PATH)
+####################################################
+# ↓過去のもの
 
-# FDDイメージ作成
-# BootとKernelを結合して、FDD1.44MBのイメージを作成
-PHONY += $(FDD_IMG)
-$(FDD_IMG): $(BOOT_IMG) $(KERNEL_IMG)
-       cat $+ > $@
 
-# Bootイメージ作成
-# Bootのmakeを実行します。
-PHONY += $(BOOT_IMG)
-$(BOOT_IMG):
 
-# Kernelイメージ作成
-# Kernelのmakeを実行します。
-PHONY += $(KERNEL_IMG)
-$(KERNEL_IMG):
+#
+#PHONY += $(TARGET)
+#$(TARGET):    $(FDD_IMG) fsbuild
+#      mkisofs $(MKISOFS_OPTIONS) -b $(FDD_IMG) -c $(BOOT_CATALOG) -o $@ $(CD_ROOT_PATH)
+#
+## FDDイメージ作成
+## BootとKernelを結合して、FDD1.44MBのイメージを作成
+#PHONY += $(FDD_IMG)
+#$(FDD_IMG): $(BOOT_IMG) $(KERNEL_IMG)
+#      cat $+ > $@
+#
+## Bootイメージ作成
+## Bootのmakeを実行します。
+#PHONY += $(BOOT_IMG)
+#$(BOOT_IMG):
+#
+## Kernelイメージ作成
+## Kernelのmakeを実行します。
+#PHONY += $(KERNEL_IMG)
+#$(KERNEL_IMG):