소스 검색

add a new kernel ld with no paging virt addr mapping

main
chyyuu 12 년 전
부모
커밋
2450681a6a
1개의 변경된 파일16개의 추가작업 그리고 2개의 파일을 삭제
  1. +16
    -2
      code/lab2/Makefile

+ 16
- 2
code/lab2/Makefile 파일 보기

@ -3,7 +3,7 @@ EMPTY :=
SPACE := $(EMPTY) $(EMPTY)
SLASH := /
V := @
#V := @
# try to infer the correct GCCPREFX
ifndef GCCPREFIX
@ -148,6 +148,20 @@ $(kernel): $(KOBJS)
$(call create_target,kernel)
# create kernel_nopage target
kernel_nopage = $(call totarget,kernel_nopage)
$(kernel_nopage): tools/kernel_nopage.ld
$(kernel_nopage): $(KOBJS)
@echo + ld $@
$(V)$(LD) $(LDFLAGS) -T tools/kernel_nopage.ld -o $@ $(KOBJS)
@$(OBJDUMP) -S $@ > $(call asmfile,kernel_nopage)
@$(OBJDUMP) -t $@ | $(SED) '1,/SYMBOL TABLE/d; s/ .* / /; /^$$/d' > $(call symfile,kernel_nopage)
$(call create_target,kernel)
# -------------------------------------------------------------------
# create bootblock
@ -176,7 +190,7 @@ $(call create_target_host,sign,sign)
# create ucore.img
UCOREIMG := $(call totarget,ucore.img)
$(UCOREIMG): $(kernel) $(bootblock)
$(UCOREIMG): $(kernel) $(bootblock) $(kernel_nopage)
$(V)dd if=/dev/zero of=$@ count=10000
$(V)dd if=$(bootblock) of=$@ conv=notrunc
$(V)dd if=$(kernel) of=$@ seek=1 conv=notrunc

불러오는 중...
취소
저장