Coder Social home page Coder Social logo

xv6-riscv-book's Introduction

This edition of the book has been converted to LaTeX. In order to build it, ensure you have a TeX distribution that contains the pdflatex command. With that, you should be able to build the book by running make, which will clone the OS itself and build the book to book.pdf in the main directory.

Figures are drawn using inkscape.

xv6-riscv-book's People

Contributors

0yhy avatar bford avatar binary141 avatar dato avatar edenhochbaum avatar haohaibo avatar kaashoek avatar kiyoakii avatar naoki-hayama avatar porglezomp avatar prettymeng avatar rsc avatar samwhitlock avatar sbrantq avatar sbshah97 avatar tchajed avatar vshenoy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xv6-riscv-book's Issues

Report 4 pieces of discrepancies between `lineref`s and C source files

When I try the following command in the main directory of this project:

$ rm -rf latex.out; make $(ls *.tex | sed 's/^/latex.out\//g') >/dev/null

I get the four unexpected error lines:

kernel/fs.c: cannot find pat re.compile('^..if.n.>.0.')
kernel/fs.c: cannot find pat re.compile('panic')
kernel/pipe.c: cannot find pat re.compile('myproc..-\\>killed')
kernel/proc.c: cannot find pat re.compile('DOC: sleeplock0')

Could you please correct the references in your latex files to your C codes to make the impressive book more rigorous?

This check is inspired by spotting an unterminated line on page 95 of the current book:

and if the write has extended the file, writei must update its size

Both readi and writei don't check T_DEV at first

In xv6's code, fileread and filewrite check FD_DEVICE and use struct devsw to read/write file. The check is removed from readi and writei. But the book still include that in fs.tex line 1080.

book.tex is pointing to wrong path of tex

Hi, in book.tex, it is "latex.out/acks", but "acks.tex" is in root folder. thanks

\input{latex.out/acks}
\input{latex.out/unix}
\input{latex.out/first}
\input{latex.out/mem}
\input{latex.out/trap}
\input{latex.out/interrupt}
\input{latex.out/lock}
\input{latex.out/sched}
\input{latex.out/fs}
\input{latex.out/lock2}
\input{latex.out/sum}

image

i got this error in latest ubuntu

please help

/home/peter/workspace/xv6-riscv-book>make
if [ ! -d xv6-riscv-src/ ]; then \
	#git clone [email protected]:mit-pdos/xv6-riscv.git xv6-riscv-src/ ; \
	git clone https://github.com/mit-pdos/xv6-riscv.git xv6-riscv-src/ ; \
else \
	git -C xv6-riscv-src/ pull ; \
fi; \
true
Already up to date.
pdflatex book.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./book.tex
LaTeX2e <2020-02-02> patch level 2
L3 programming layer <2020-02-14>
(/usr/share/texlive/texmf-dist/tex/latex/base/book.cls
Document Class: book 2019/12/20 v1.4l Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/bk12.clo))
(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty)
(/usr/share/texlive/texmf-dist/tex/latex/psnfss/times.sty)
(/usr/share/texlive/texmf-dist/tex/latex/listings/listings.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texlive/texmf-dist/tex/latex/listings/lstmisc.sty)
(/usr/share/texlive/texmf-dist/tex/latex/listings/listings.cfg))
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def)))
(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg))
(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty)

! LaTeX Error: File `imakeidx.sty' not found.

Error with Makefile

Any guidance?

[nix-shell:~/Development/xv6-riscv-book]$ pdflatex --version
pdfTeX 3.141592653-2.6-1.40.22 (TeX Live 2021/nixos.org)
kpathsea version 6.3.3
Copyright 2021 Han The Thanh (pdfTeX) et al.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.37; using libpng 1.6.37
Compiled with zlib 1.2.12; using zlib 1.2.12
Compiled with xpdf version 4.03

[nix-shell:~/Development/xv6-riscv-book]$ make
if [ ! -d xv6-riscv-src/ ]; then \
	git clone [email protected]:mit-pdos/xv6-riscv.git xv6-riscv-src/ ; \
else \
	git -C xv6-riscv-src/ pull ; \
fi; \
true
Already up to date.
pdflatex book.tex
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021/nixos.org) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./book.tex
LaTeX2e <2021-11-15> patch level 1
L3 programming layer <2022-02-24>
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/base/book.cls
Document Class: book 2021/10/04 v1.4n Standard LaTeX document class

(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/base/bk12.clo))
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/base/fontenc.sty)
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/psnfss/times.sty)
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/listings/listings.sty
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/graphics/keyval.sty)
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/listings/lstmisc.sty)
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/listings/listings.cfg))
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/graphics/graphicx.sty
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/graphics/graphics.sty
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/graphics/trig.sty)
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/graphics-cfg/graphics.cfg)
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/graphics-def/pdftex.def)))
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/xcolor/xcolor.sty
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/graphics-cfg/color.cfg))
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/url/url.sty)
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/imakeidx/imakeidx.sty
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/xkeyval/xkeyval.sty
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/generic/xkeyval/xkeyval.tex
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/generic/xkeyval/xkvutils.tex)))
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/generic/iftex/ifxetex.sty
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/generic/iftex/iftex.sty))
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/generic/iftex/ifluatex.sty)
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/tools/multicol.sty))
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/booktabs/booktabs.sty)
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/etoolbox/etoolbox.sty)
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/preprint/fullpage.sty)
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/generic/soul/soul.sty)
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/base/inputenc.sty)
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/hyperref/hyperref.sty
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/generic/ltxcmds/ltxcmds.sty)
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/generic/pdftexcmds/pdftexcmds.sty
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/generic/infwarerr/infwarerr.sty))
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/generic/kvsetkeys/kvsetkeys.sty)
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/generic/kvdefinekeys/kvdefinekeys.sty)
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/generic/pdfescape/pdfescape.sty)
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/hycolor/hycolor.sty)
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/letltxmacro/letltxmacro.sty)
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/auxhook/auxhook.sty)
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/kvoptions/kvoptions.sty)
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/hyperref/pd1enc.def)
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/generic/intcalc/intcalc.sty)
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/generic/etexcmds/etexcmds.sty)
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/hyperref/puenc.def)
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/generic/bitset/bitset.sty
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/generic/bigintcalc/bigintcalc.sty))
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/base/atbegshi-ltx.sty))
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/hyperref/hpdftex.def
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/base/atveryend-ltx.sty)
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/rerunfilecheck/rerunfilecheck.sty
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/generic/uniquecounter/uniquecounter.sty)))
Writing index file book.idx

(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/psnfss/t1ptm.fd)
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/l3backend/l3backend-pdftex.def) (./book.aux)
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
)
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/epstopdf-pkg/epstopdf-base.sty
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/latexconfig/epstopdf-sys.cfg))
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/hyperref/nameref.sty
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/latex/refcount/refcount.sty)
(/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-full-2021-final/s
hare/texmf/tex/generic/gettitlestring/gettitlestring.sty)) (./book.out)
(./book.out) [1{/nix/store/gbya287ay298wj93zpka8xbncw5wc09k-texlive-combined-fu
ll-2021-final/share/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] [2]
(./book.toc)

! LaTeX Error: File `latex.out/acks.tex' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: tex)

Enter file name: 

difference with the xv6-book(x86)

I was wondering that what is the actual difference between xv6-riscv implemention and xv6-x86 implemention.
I have already learn the old version, DO I still need to see the new version?

Update README

I foolishly followed the README to install heirloom troff before realizing that the build process no longer actually used troff!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.