setup qemu + VNC + monitor + gdb on WSL
This commit is contained in:
parent
5a001169cb
commit
eb33f2c35c
23
Makefile
23
Makefile
@ -1,8 +1,29 @@
|
||||
|
||||
AS := nasm
|
||||
CC := clang
|
||||
LD := clang
|
||||
LD := lld
|
||||
DAS := llvm-objdump
|
||||
|
||||
ifneq '$(AS_ENV)' ''
|
||||
AS := $(AS_ENV)
|
||||
endif
|
||||
$(info Using AS=$(AS))
|
||||
|
||||
ifneq '$(CC_ENV)' ''
|
||||
CC := $(CC_ENV)
|
||||
endif
|
||||
$(info Using CC=$(CC))
|
||||
|
||||
ifneq '$(LD_ENV)' ''
|
||||
LD := $(LD_ENV)
|
||||
endif
|
||||
$(info Using LD=$(LD))
|
||||
|
||||
ifneq '$(DAS_ENV)' ''
|
||||
DAS := $(DAS_ENV)
|
||||
endif
|
||||
$(info Using DAS=$(DAS))
|
||||
|
||||
INC_COMMON := inc
|
||||
MK := mk
|
||||
OUT := out
|
||||
|
@ -27,13 +27,13 @@ DUMP_FLAGS = -x86-asm-syntax=intel \
|
||||
-t \
|
||||
-triple=x86_64-pc-none-elf
|
||||
|
||||
LD_FLAGS = -fuse-ld=lld \
|
||||
LD_FLAGS = -fuse-ld=$(LD) \
|
||||
-nostdlib \
|
||||
-Wl,-T,$(LD_SCRIPT) \
|
||||
-Wl,--fatal-warnings
|
||||
|
||||
$(TGT): $(OBJ) $(LD_SCRIPT)
|
||||
$(LD) $(LD_FLAGS) -o $@ $^
|
||||
$(CC) $(LD_FLAGS) -o $@ $^
|
||||
|
||||
$(DMP): $(TGT)
|
||||
$(DAS) $(DUMP_FLAGS) $< > $@
|
||||
|
7
bootstrap_deb.sh
Normal file
7
bootstrap_deb.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
# Bootstrap debian 9 + clang-6.0 backport environment
|
||||
# Personal use only
|
||||
export CC_ENV=clang-6.0
|
||||
export LD_ENV=lld-6.0
|
||||
export DAS_ENV=llvm-objdump-6.0
|
||||
export AS_ENV=nasm
|
@ -1,8 +1,6 @@
|
||||
#define ASM_FILE
|
||||
#include "mlayout.h"
|
||||
|
||||
OUTPUT_FORMAT(elf64-x86-64)
|
||||
OUTPUT_ARCH(i386:x86-64)
|
||||
ENTRY(sys_entry)
|
||||
|
||||
SECTIONS
|
||||
|
Loading…
Reference in New Issue
Block a user