Pintos

created : Tue, 07 Apr 2020 20:20:28 +0900
modified : Sat, 27 Jun 2020 14:54:37 +0900
pintos

설정하기 Configuration

프로젝트 기본 다운로드

$ git clone https://github.com/kumardeepakr3/PINTOS-Ubuntu.git
$ cd PINTOS-Ubuntu
$ bash ./pintos_ubuntu.sh

vim 설정하기

coc

{
    "languageserver": {
        "ccls": {
            "command": "ccls",
            "filetypes": [
                "c",
                "cpp",
                "objc",
                "objcpp"
            ],
            "rootPatterns": [
                ".ccls",
                "compile_commands.json",
                ".vim/",
                ".git/",
                ".hg/"
            ],
            "initializationOptions": {
                "cache": {
                    "directory": "/tmp/ccls"
                },
                "clang": {
                  "resourceDir": ".",
                  "extraArgs": ["-isystem./", "-isystem./lib/kernel", "-isystem./lib"]
                }
                
            }
        }
    }
}

tagbar, ale 설정

let g:ale_linters= { 'c' : ['g++'], 'cpp' : ['g++'] }
let g:ale_c_gcc_options="-I. -I./lib/kernel -I./lib -Wall"
let g:ale_cpp_gcc_options="-I. -I./lib/kernel -I./lib -Wall"
function! LoadCscope()
  let db = findfile("cscope.out", ".;")
  if (!empty(db))
    let path = strpart(db, 0, match(db, "/cscope.out$"))
    set nocscopeverbose " suppress 'duplicate connection' error
    exe "cs add " . db . " " . path
    set cscopeverbose
  " else add the database pointed to by environment variable
  elseif $CSCOPE_DB != ""
    cs add $CSCOPE_DB
  endif
endfunction
au BufEnter /* call LoadCscope()

shutdown 버그 수정

   /* This is a special power-off sequence supported by Bochs and
      QEMU, but not by physical hardware. */
   for (p = s; *p != '\0'; p++)
     outb (0x8900, *p);

+  outw (0x604, 0x0 | 0x2000); /* Fix shutdown */
+
   /* This will power off a VMware VM if "gui.exitOnCLIHLT = TRUE"
      is set in its configuration file.  (The "pintos" script does
      that automatically.)  */
   asm volatile ("cli; hlt" : : : "memory");

   /* None of those worked. */

로 추가해준다.

thread