make grade导致jos.out无内容的解决办法

111 views
Skip to first unread message

Chunis Deng

unread,
May 13, 2012, 11:43:23 PM5/13/12
to xv6-jos
进入lab3后,无意中发现make grade报错:no jos.out
检查发现jos.out的内容为空

对比lab2,发现差别在于:
lab2: qemu -nographic -hda obj/kern/kernel.img -serial file:jos.out -monitor null -no-reboot -S -gdb tcp::26000
lab3: qemu -nographic -hda obj/kern/kernel.img -serial file:jos.out -monitor null -no-reboot -S

原来是因为lab3里对GNUmakefile做了修改,删除了定义QEMUGDB,但是grade-functions.sh里面仍然需要用到。
添加被删除的内容后make grade就正常了:
diff --git a/GNUmakefile b/GNUmakefile
index 6fb6bfa..cb9b4ce 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -63,6 +63,10 @@ endif
 
 # try to generate a unique GDB port
 GDBPORT        := $(shell expr `id -u` % 5000 + 25000)
+# QEMU's gdb stub command line changed in 0.11
+QEMUGDB = $(shell if $(QEMU) -nographic -help | grep -q '^-gdb'; \
+       then echo "-gdb tcp::$(GDBPORT)"; \
+       else echo "-s -p $(GDBPORT)"; fi)
 
 CC     := $(GCCPREFIX)gcc -pipe
 AS     := $(GCCPREFIX)as

黄攀

unread,
Nov 19, 2013, 3:01:38 AM11/19/13
to xv6...@googlegroups.com
正解,多谢大侠。这个问题折磨死我一天了。。。。


在 2012年5月14日星期一UTC+8上午11时43分23秒,Chunis Deng写道:

Chunis Deng

unread,
Nov 20, 2013, 9:24:46 PM11/20/13
to xv6-jos
呵呵,有什么问题尽管提出来,一般都会得到答复的。
你也可以查看以前的消息,大部分问题都已经已经解决过了。
虽然邮件列表近乎沉寂,但我想大家都只是无心灌水而已吧,有问题还是会积极帮助的。 :-)


2013/11/19 黄攀 <hpan2...@gmail.com>
--
You received this message because you are subscribed to the Google Groups "xv6-jos" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xv6-jos+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

sunus

unread,
Nov 21, 2013, 2:39:40 AM11/21/13
to xv6...@googlegroups.com
哈哈, 楼主你是做12年FALL的吗? 我现在也在做着.
我上周完成了lab2的前两个exercise. 有空也可以多交流哈哈:)
Sunus Lee
Best Wishes



Chunis Deng

unread,
Nov 23, 2013, 3:00:01 AM11/23/13
to xv6-jos
我做的是2011年FALL的,Readme里有链接. 2012是我做的时间。
后来还花了点精力在chunix上;最近忙着看魔幻小说,有段时间没折腾osdev了。 :-(
有问题的话大家可以多交流交流,学习是需要有人推动的,呵呵
Reply all
Reply to author
Forward
0 new messages