wangzhike / hit-linux-0.11 Goto Github PK
View Code? Open in Web Editor NEW网易云课堂选的操作系统课实验的代码及相关记录
Home Page: http://mooc.study.163.com/course/HIT-1000002004?tid=2001329005#/info
网易云课堂选的操作系统课实验的代码及相关记录
Home Page: http://mooc.study.163.com/course/HIT-1000002004?tid=2001329005#/info
退出的时候不能直接点叉叉,要在Linux0.11的命令行里面输入exit
指令,才会有log。因为这个被卡了几天,log一直出不来..................
你好!我最经也在学这们课程,途中遇到一些问题不知能否向你请教(因为老师好像已经不再答疑了)
请问bootsect.s中的字符串长度是怎么计算的啊?
我更改输出字符串为
msg1: .byte 13,10 .ascii "ZZTos is running..." .byte 13,10,13,10
这个字符串长度只有19
可是我将98行语句更改为
mov cx,#20 ! 显示字符串长度
竟然不能输出完整字符串,请问这是什么问题
缺少文件为libSM.6.so
网上给了很多解决办法,都有尝试过,但是没有解决。
给你发了知乎私信,截止此issue发表之前没有收到回复。望解答,谢谢。本人邮箱为[email protected]
不知道为什么 有的时候mount-hdc会报错不能创建相应的loop device
但是如果我把bosch给run起来 在加载结束之前mount 就可以成功
很奇怪 如果有类似问题的可以尝试一下
系统:Ubuntu 20.04 LTS
目录:
aaron@razer:~/oslab$ ls
bochs files hdc hdc-0.11.img linux-0.11 linux-0.11.tar.gz mount-hdc run
错误信息:
aaron@razer:~/oslab$ ./run
========================================================================
Bochs x86 Emulator 2.6.11
Built from SVN snapshot on January 5, 2020
Timestamp: Sun Jan 5 08:36:00 CET 2020
========================================================================
00000000000i[ ] LTDL_LIBRARY_PATH not set. using compile time default '/usr/lib/bochs/plugins'
00000000000i[ ] BXSHARE not set. using compile time default '/usr/share/bochs'
00000000000i[ ] lt_dlhandle is 0x5634a680bca0
00000000000i[PLUGIN] loaded plugin libbx_unmapped.so
00000000000i[ ] lt_dlhandle is 0x5634a680cbc0
00000000000i[PLUGIN] loaded plugin libbx_biosdev.so
00000000000i[ ] lt_dlhandle is 0x5634a6810930
00000000000i[PLUGIN] loaded plugin libbx_speaker.so
00000000000i[ ] lt_dlhandle is 0x5634a6812700
00000000000i[PLUGIN] loaded plugin libbx_extfpuirq.so
00000000000i[ ] lt_dlhandle is 0x5634a6812ed0
00000000000i[PLUGIN] loaded plugin libbx_parallel.so
00000000000i[ ] lt_dlhandle is 0x5634a6814b30
00000000000i[PLUGIN] loaded plugin libbx_serial.so
00000000000i[ ] lt_dlhandle is 0x5634a6818f30
00000000000i[PLUGIN] loaded plugin libbx_gameport.so
00000000000i[ ] lt_dlhandle is 0x5634a6819760
00000000000i[PLUGIN] loaded plugin libbx_iodebug.so
00000000000i[ ] reading configuration from ./bochs/bochsrc.bxrc
00000000000i[ ] lt_dlhandle is (nil)
00000000000p[ ] >>PANIC<< dlopen failed for module 'vga_update_interval' (libbx_vga_update_interval.so): file not found
00000000000e[SIM ] notify called, but no bxevent_callback function is registered
00000000000e[SIM ] notify called, but no bxevent_callback function is registered
========================================================================
Bochs is exiting with the following message:
[ ] dlopen failed for module 'vga_update_interval' (libbx_vga_update_interval.so): file not found
========================================================================
00000000000i[SIM ] quit_sim called with exit code 1
尝试解决:
aaron@razer:~/oslab$ dpkg -S libbx_vga_update_interval.so
dpkg-query: 没有找到与 libbx_vga_update_interval.so 相匹配的路径
在setup之后需要自己在home/oslab/linux下make一下才能进行run,否则会找不到硬盘哦~ 建议up在setup.sh中补充上
为什么我在64位ubuntu16.04.1上按照说明安装之后,不仅没装上,还破坏了一堆依赖关系,比如libc6-dev,不知道是不是我的使用方式不对......
大神,研究完这个,你的后续学习计划是什么?目前从事哪方面工作呢?
明明在unistd.h中添加了#define __NR_iam 72,但是在应用iam.c编译时,显示未定义__NR_iam
【环境】
AMD64 的 win 10 WSL Ubuntu 18.04
【现象】
执行 cd ~/oslab/linux-0.11 && make
:
tony@LAPTOP-4GEHEVKJ:~/oslab/linux-0.11$ make
as86 -0 -a -o boot/bootsect.o boot/bootsect.s
ld86 -0 -s -o boot/bootsect boot/bootsect.o
as86 -0 -a -o boot/setup.o boot/setup.s
ld86 -0 -s -o boot/setup boot/setup.o
gcc-3.4 -m32 -g -I./include -traditional -c boot/head.s
mv head.o boot/
gcc-3.4 -march=i386 -m32 -g -Wall -O2 -fomit-frame-pointer
-nostdinc -Iinclude -c -o init/main.o init/main.c
init/main.c:23: warning: static declaration of 'fork' follows non-static declaration
include/unistd.h:210: warning: previous declaration of 'fork' was here
init/main.c:24: warning: static declaration of 'pause' follows non-static declaration
include/unistd.h:224: warning: previous declaration of 'pause' was here
init/main.c:26: warning: static declaration of 'sync' follows non-static declaration
include/unistd.h:235: warning: previous declaration of 'sync' was here
init/main.c:105: warning: return type of 'main' is not int' (cd kernel; make) make[1]: Entering directory '/home/tony/oslab/linux-0.11/kernel' gcc-3.4 -march=i386 -m32 -g -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../include \ -c -o sched.o sched.c as --32 -o system_call.o system_call.s system_call.s: Assembler messages: system_call.s:94: Warning: indirect call without
'
gcc-3.4 -march=i386 -m32 -g -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../include
-c -o traps.o traps.c
In file included from traps.c:13:
../include/string.h:129: warning: conflicting types for built-in function 'strchr'
../include/string.h:146: warning: conflicting types for built-in function 'strrchr'
../include/string.h:401: warning: conflicting types for built-in function 'memset'
as --32 -o asm.o asm.s
gcc-3.4 -march=i386 -m32 -g -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../include
-c -o fork.o fork.c
gcc-3.4 -march=i386 -m32 -g -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../include
-c -o panic.o panic.c
gcc-3.4 -march=i386 -m32 -g -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../include
-c -o printk.o printk.c
gcc-3.4 -march=i386 -m32 -g -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../include
-c -o vsprintf.o vsprintf.c
In file included from vsprintf.c:13:
../include/string.h:129: warning: conflicting types for built-in function 'strchr'
../include/string.h:146: warning: conflicting types for built-in function 'strrchr'
../include/string.h:401: warning: conflicting types for built-in function 'memset'
gcc-3.4 -march=i386 -m32 -g -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../include
-c -o sys.o sys.c
gcc-3.4 -march=i386 -m32 -g -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../include
-c -o exit.o exit.c
gcc-3.4 -march=i386 -m32 -g -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../include
-c -o signal.o signal.c
gcc-3.4 -march=i386 -m32 -g -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../include
-c -o mktime.o mktime.c
ld -m elf_i386 -r -o kernel.o sched.o system_call.o traps.o asm.o fork.o panic.o printk.o vsprintf.o sys.o exit.o signal.o mktime.o
sync
make[1]: Leaving directory '/home/tony/oslab/linux-0.11/kernel'
(cd mm; make)
make[1]: Entering directory '/home/tony/oslab/linux-0.11/mm'
gcc-3.4 -march=i386 -m32 -g -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../include
-c -o memory.o memory.c
as --32 -o page.o page.s
ld -m elf_i386 -r -o mm.o memory.o page.o
make[1]: Leaving directory '/home/tony/oslab/linux-0.11/mm'
(cd fs; make)
make[1]: Entering directory '/home/tony/oslab/linux-0.11/fs'
gcc-3.4 -march=i386 -m32 -g -Wall -fstrength-reduce -fomit-frame-pointer -nostdinc -I../include
-c -o open.o open.c
gcc-3.4 -march=i386 -m32 -g -Wall -fstrength-reduce -fomit-frame-pointer -nostdinc -I../include
-c -o read_write.o read_write.c
gcc-3.4 -march=i386 -m32 -g -Wall -fstrength-reduce -fomit-frame-pointer -nostdinc -I../include
-c -o inode.o inode.c
In file included from inode.c:7:
../include/string.h:129: warning: conflicting types for built-in function 'strchr'
../include/string.h:146: warning: conflicting types for built-in function 'strrchr'
../include/string.h:401: warning: conflicting types for built-in function 'memset'
gcc-3.4 -march=i386 -m32 -g -Wall -fstrength-reduce -fomit-frame-pointer -nostdinc -I../include
-c -o file_table.o file_table.c
gcc-3.4 -march=i386 -m32 -g -Wall -fstrength-reduce -fomit-frame-pointer -nostdinc -I../include
-c -o buffer.o buffer.c
gcc-3.4 -march=i386 -m32 -g -Wall -fstrength-reduce -fomit-frame-pointer -nostdinc -I../include
-c -o super.o super.c
gcc-3.4 -march=i386 -m32 -g -Wall -fstrength-reduce -fomit-frame-pointer -nostdinc -I../include
-c -o block_dev.o block_dev.c
gcc-3.4 -march=i386 -m32 -g -Wall -fstrength-reduce -fomit-frame-pointer -nostdinc -I../include
-c -o char_dev.o char_dev.c
gcc-3.4 -march=i386 -m32 -g -Wall -fstrength-reduce -fomit-frame-pointer -nostdinc -I../include
-c -o file_dev.o file_dev.c
gcc-3.4 -march=i386 -m32 -g -Wall -fstrength-reduce -fomit-frame-pointer -nostdinc -I../include
-c -o stat.o stat.c
gcc-3.4 -march=i386 -m32 -g -Wall -fstrength-reduce -fomit-frame-pointer -nostdinc -I../include
-c -o exec.o exec.c
In file included from exec.c:21:
../include/string.h:129: warning: conflicting types for built-in function 'strchr'
../include/string.h:146: warning: conflicting types for built-in function 'strrchr'
../include/string.h:401: warning: conflicting types for built-in function 'memset'
exec.c: In function copy_strings': exec.c:140: warning: use of cast expressions as lvalues is deprecated gcc-3.4 -march=i386 -m32 -g -Wall -fstrength-reduce -fomit-frame-pointer -nostdinc -I../include \ -c -o pipe.o pipe.c gcc-3.4 -march=i386 -m32 -g -Wall -fstrength-reduce -fomit-frame-pointer -nostdinc -I../include \ -c -o namei.o namei.c In file included from namei.c:15: ../include/string.h:129: warning: conflicting types for built-in function 'strchr' ../include/string.h:146: warning: conflicting types for built-in function 'strrchr' ../include/string.h:401: warning: conflicting types for built-in function 'memset' gcc-3.4 -march=i386 -m32 -g -Wall -fstrength-reduce -fomit-frame-pointer -nostdinc -I../include \ -c -o bitmap.o bitmap.c In file included from bitmap.c:8: ../include/string.h:129: warning: conflicting types for built-in function 'strchr' ../include/string.h:146: warning: conflicting types for built-in function 'strrchr' ../include/string.h:401: warning: conflicting types for built-in function 'memset' gcc-3.4 -march=i386 -m32 -g -Wall -fstrength-reduce -fomit-frame-pointer -nostdinc -I../include \ -c -o fcntl.o fcntl.c gcc-3.4 -march=i386 -m32 -g -Wall -fstrength-reduce -fomit-frame-pointer -nostdinc -I../include \ -c -o ioctl.o ioctl.c gcc-3.4 -march=i386 -m32 -g -Wall -fstrength-reduce -fomit-frame-pointer -nostdinc -I../include \ -c -o truncate.o truncate.c ld -m elf_i386 -r -o fs.o open.o read_write.o inode.o file_table.o buffer.o super.o block_dev.o char_dev.o file_dev.o stat.o exec.o pipe.o namei.o bitmap.o fcntl.o ioctl.o truncate.o make[1]: Leaving directory '/home/tony/oslab/linux-0.11/fs' (cd kernel/blk_drv; make) make[1]: Entering directory '/home/tony/oslab/linux-0.11/kernel/blk_drv' gcc-3.4 -march=i386 -m32 -g -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../../include \ -c -o ll_rw_blk.o ll_rw_blk.c gcc-3.4 -march=i386 -m32 -g -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../../include \ -c -o floppy.o floppy.c gcc-3.4 -march=i386 -m32 -g -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../../include \ -c -o hd.o hd.c gcc-3.4 -march=i386 -m32 -g -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../../include \ -c -o ramdisk.o ramdisk.c In file included from ramdisk.c:7: ../../include/string.h:129: warning: conflicting types for built-in function 'strchr' ../../include/string.h:146: warning: conflicting types for built-in function 'strrchr' ../../include/string.h:401: warning: conflicting types for built-in function 'memset' ar rcs blk_drv.a ll_rw_blk.o floppy.o hd.o ramdisk.o sync make[1]: Leaving directory '/home/tony/oslab/linux-0.11/kernel/blk_drv' (cd kernel/chr_drv; make) make[1]: Entering directory '/home/tony/oslab/linux-0.11/kernel/chr_drv' gcc-3.4 -march=i386 -m32 -g -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../../include \ -c -o tty_io.o tty_io.c tty_io.c: In function
copy_to_cooked':
tty_io.c:160: warning: subscript has type char' tty_io.c: In function
tty_write':
tty_io.c:316: warning: subscript has type char' gcc-3.4 -march=i386 -m32 -g -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../../include \ -c -o console.o console.c gcc-3.4 -m32 -g -E -nostdinc -I../../include -traditional keyboard.S -o keyboard.s as --32 -o keyboard.o keyboard.s keyboard.S: Assembler messages: keyboard.S:53: Warning: indirect call without
'
gcc-3.4 -march=i386 -m32 -g -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../../include
-c -o serial.o serial.c
as --32 -o rs_io.o rs_io.s
rs_io.s: Assembler messages:
rs_io.s:65: Warning: indirect call without *' gcc-3.4 -march=i386 -m32 -g -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../../include \ -c -o tty_ioctl.o tty_ioctl.c ar rcs chr_drv.a tty_io.o console.o keyboard.o serial.o rs_io.o tty_ioctl.o sync make[1]: Leaving directory '/home/tony/oslab/linux-0.11/kernel/chr_drv' (cd kernel/math; make) make[1]: Entering directory '/home/tony/oslab/linux-0.11/kernel/math' gcc-3.4 -march=i386 -m32 -g -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../../include \ -c -o math_emulate.o math_emulate.c ar rcs math.a math_emulate.o sync make[1]: Leaving directory '/home/tony/oslab/linux-0.11/kernel/math' (cd lib; make) make[1]: Entering directory '/home/tony/oslab/linux-0.11/lib' gcc-3.4 -march=i386 -m32 -g -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../include \ -c -o ctype.o ctype.c gcc-3.4 -march=i386 -m32 -g -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../include \ -c -o _exit.o _exit.c _exit.c: In function
_exit':
_exit.c:13: warning: noreturn' function does return gcc-3.4 -march=i386 -m32 -g -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../include \ -c -o open.o open.c gcc-3.4 -march=i386 -m32 -g -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../include \ -c -o close.o close.c gcc-3.4 -march=i386 -m32 -g -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../include \ -c -o errno.o errno.c gcc-3.4 -march=i386 -m32 -g -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../include \ -c -o write.o write.c gcc-3.4 -march=i386 -m32 -g -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../include \ -c -o dup.o dup.c gcc-3.4 -march=i386 -m32 -g -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../include \ -c -o setsid.o setsid.c gcc-3.4 -march=i386 -m32 -g -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../include \ -c -o execve.o execve.c gcc-3.4 -march=i386 -m32 -g -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../include \ -c -o wait.o wait.c gcc-3.4 -march=i386 -m32 -g -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../include \ -c -o string.o string.c In file included from string.c:14: ../include/string.h:129: warning: conflicting types for built-in function 'strchr' ../include/string.h:146: warning: conflicting types for built-in function 'strrchr' ../include/string.h:401: warning: conflicting types for built-in function 'memset' ../include/string.h:39: warning: 'strncpy' defined but not used ../include/string.h:69: warning: 'strncat' defined but not used ../include/string.h:108: warning: 'strncmp' defined but not used ../include/string.h:129: warning: 'strchr' defined but not used ../include/string.h:146: warning: 'strrchr' defined but not used ../include/string.h:369: warning: 'memcmp' defined but not used ../include/string.h:401: warning: 'memset' defined but not used gcc-3.4 -march=i386 -m32 -g -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../include \ -c -o malloc.o malloc.c malloc.c: In function
malloc':
malloc.c:156: warning: use of cast expressions as lvalues is deprecated
ar rcs lib.a ctype.o _exit.o open.o close.o errno.o write.o dup.o setsid.o execve.o wait.o string.o malloc.o
sync
make[1]: Leaving directory '/home/tony/oslab/linux-0.11/lib'
ld -m elf_i386 -Ttext 0 -e startup_32 boot/head.o init/main.o
kernel/kernel.o mm/mm.o fs/fs.o
kernel/blk_drv/blk_drv.a kernel/chr_drv/chr_drv.a
kernel/math/math.a
lib/lib.a
-o tools/system
nm tools/system | grep -v '(compiled)|(.o$)|( [aU] )|(..ng$)|(LASH[RL]DI)'| sort > System.map
gcc -m32 -g -Wall -O2 -fomit-frame-pointer
-o tools/build tools/build.c
cp -f tools/system system.tmp
strip system.tmp
objcopy -O binary -R .note -R .comment system.tmp tools/kernel
tools/build boot/bootsect boot/setup tools/kernel > Image
/bin/sh: 1: tools/build: Exec format error
Makefile:42: recipe for target 'Image' failed
make: *** [Image] Error 2
fatal error: bits/libc-header-start.h: No such file or directory
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.