相关步骤可以参考MIT-6.828-JOS-环境搭建 - gatsby123 - 博客园
我这里仅作一些补充:
install: cannot change permissions of ‘/usr/local/share/qemu’: No such file or directory
报这个错的时候 make没sudo
改成sudo make && sudo make install即可
一直报这个错:cc1:all warnings being treated as errors
taking address of packed member of ‘struct virtio_console_config’ may result in an unaligned pointer
error: assignment to expression with array type
进configure文件,长这样
随便挑一行,加入CFLAGS="-Wno-error",就再也不会报错了
strncpy’ output truncated before terminating nul copying 8 bytes from a string of the same length
return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
像这个错,把strncpy换成memcpy吧,别折磨自己了
还有个啥: error: implicit declaration of function ‘majo
这个是少了个头文件,不过我懒得找了,如果真有人遇到这个问题了解决不了,再搜几下也能找到