Browse Source

Update mm0 repository and fix little things.

Giovanni Mascellani 4 years ago
parent
commit
a22a334b7c
5 changed files with 11 additions and 8 deletions
  1. 1 0
      .gitlab-ci.yml
  2. 1 1
      Makefile
  3. 1 1
      asmg/main.g
  4. 1 1
      contrib/mm0
  5. 7 5
      diskfs/stdlib/fcntl.h

+ 1 - 0
.gitlab-ci.yml

@@ -36,6 +36,7 @@ mm0:
   script:
     - eatmydata apt-get install -y --no-upgrade python3 qemu-system-x86
     - "qemu-system-i386 -hda artifacts/mm0/boot_asmg.x86.qcow2 -serial file:/dev/stdout -display none -m 256M -enable-kvm | ./test/decode_tests.py just_malloc"
+  allow_failure: true
 
 tinycc:
   stage: test

+ 1 - 1
Makefile

@@ -51,7 +51,7 @@ build/full-asmg.asm: lib/mb_header.asm lib/kernel.asm lib/io.asm lib/shutdown.as
 	cat $^ | sed -e 's|section .bss|section .data|' > $@
 	#cat $^ > $@
 
-build/initrd-asmg.list: asmg/*.g diskfs/mm0/set.mm0
+build/initrd-asmg.list: asmg/*.g diskfs/mm0/examples/set.mm0
 	ls $^ | sed -e 's|\(.*\)/\([^/]*\)|\2 \1/\2|g' > $@
 
 build/initrd-asmg.diskfs: build/initrd-asmg.list

+ 1 - 1
asmg/main.g

@@ -319,7 +319,7 @@ fun main 0 {
   }
 
   if RUN_TINYCC {
-   "Compiling tinycc.g... " log ;
+    "Compiling tinycc.g... " log ;
     "tinycc.g" platform_g_compile ;
     "done!\n" log ;
 

+ 1 - 1
contrib/mm0

@@ -1 +1 @@
-Subproject commit 94a504f49c863432200d600434dcce9f26a30b37
+Subproject commit cdf4f7cfd75c44e00cd7a69a6d1789519967e75c

+ 7 - 5
diskfs/stdlib/fcntl.h

@@ -1,17 +1,19 @@
 #ifndef __FCNTL_H
 #define __FCNTL_H
 
-#include "asmc.h"
-#include "errno.h"
-#include "assert.h"
-#include "sys/stat.h"
-
 #define O_RDONLY (1 << 0)
 #define O_WRONLY (1 << 1)
 #define O_RDWR (O_RDONLY || O_WRONLY)
 #define O_CREAT (1 << 2)
 #define O_TRUNC (1 << 3)
 
+int open(const char *path, int oflag, ...);
+
+#include "asmc.h"
+#include "errno.h"
+#include "assert.h"
+#include "sys/stat.h"
+
 int open(const char *path, int oflag, ...) {
     // Technically vfs_open returns a pointer; here we assume that the
     // pointer fits in an int and it does not have a sign