mit-pdos/xv6-riscv

I was able to run xv6-x86 on my m1 mac running ubuntu arm64. Perform the following steps:

DRedDevil04 opened this issue · 2 comments

          I was able to run xv6-x86 on my m1 mac running ubuntu arm64. Perform the following steps:
  1. clone the xv6 from git
  2. Now you need to install a cross compiler: sudo apt install gcc-i686-linux-gnu
  3. Go to the directory and instead of make , type make TOLLPREFIX=i686-linux-gnu-
  4. Now, instead of make qemu-nox, type make TOLLPREFIX=i686-linux-gnu- qemu-nox
  5. Voilà!!

Originally posted by @Mazz84002 in #76 (comment)

          I was able to run xv6-x86 on my m1 mac running ubuntu arm64. Perform the following steps:
  1. clone the xv6 from git
  2. Now you need to install a cross compiler: sudo apt install gcc-i686-linux-gnu
  3. Go to the directory and instead of make , type make TOLLPREFIX=i686-linux-gnu-
  4. Now, instead of make qemu-nox, type make TOLLPREFIX=i686-linux-gnu- qemu-nox
  5. Voilà!!

Originally posted by @Mazz84002 in #76 (comment)

This solution leads to an error in the mpconfig file on my m1 mac:
14:
mp.c:83:10: error: array subscript -48806446 is outside array bounds of ‘void[2147483647]’ [-Werror=array-bounds=]
83 | if(conf->version != 1 && conf->version != 4)
| ~~~~^~~~~~~~~
mp.c:78:34: note: at offset -2147483648 into object ‘_119 = PHI <_86(14), _16(4), _63(6)>.physaddr’ of size [0, 2147483647]
78 | if((mp = mpsearch()) == 0 || mp->physaddr == 0)
| ~~^~~~~~~~~~
mp.c:85:28: error: array subscript -48806446 is outside array bounds of ‘void[2147483647]’ [-Werror=array-bounds=]
85 | if(sum((uchar
)conf, conf->length) != 0)
.
.
.
.
.
.
"

Please provide a solution to this

it seems your physical memory run out