summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rwxr-xr-xbuildkernel.sh9
l---------kernel_config1
-rwxr-xr-x[-rw-r--r--]mkramfs.sh0
4 files changed, 13 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 63360a3..39786f0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,6 @@
 kernel
 build
 sbuild
-a,out
+a.out
+init
+init.cpio
diff --git a/buildkernel.sh b/buildkernel.sh
new file mode 100755
index 0000000..f0f397e
--- /dev/null
+++ b/buildkernel.sh
@@ -0,0 +1,9 @@
+./mkramfs.sh
+# cd shel ../init/init
+INITPATH=$PWD/init.cpio
+cd init
+find . | cpio -o -H newc > ../init.cpio
+cd ../kernel
+make isoimage FDARGS="initrd=/init.cpio" FDINITRD=$INITPATH -j 4
+qemu-system-x86_64 -cdrom ./arch/x86/boot/image.iso #-s -S
+cd ..
\ No newline at end of file
diff --git a/kernel_config b/kernel_config
new file mode 120000
index 0000000..ef1beb1
--- /dev/null
+++ b/kernel_config
@@ -0,0 +1 @@
+kernel/.config
\ No newline at end of file
diff --git a/mkramfs.sh b/mkramfs.sh
index 642509d..642509d 100644..100755
--- a/mkramfs.sh
+++ b/mkramfs.sh