わこうメモ

  • (by K, 2006.03.05)
  • Kがわこう氏からもらった覚え書きをそのまま掲載したものです。
  • Makefileパッチは、 harib24 あたりからのディレクトリ変更には対応しきれていないそうです。

覚え書き

-- 覚書 --

o patch ファイル

正常に動作する Makefile.mod を作成

$ diff -u Makefile Makefile.mod > Makefile.patch

パッチをあてる

$ patch -b Makefile ../z_tools/Makefile.patch


chapter 1

o フロッピーディスクへのインストール

 $ dd if=helloos.img of=/dev/fd0

o QEMU での起動方法

 $ qemu -m 32 -localtime -std-vga -fda helloos.img

o nask でのアセンブル

あらかじめ ../z_tools に nask をコピーしておく。

 $ ../z_tools/nask.exe helloos.nas helloos.img

リストファイルを出力。

 $ ../z_tools/nask.exe ipl.nas ipl.bin ipl.lst

nask が出力する ipl.lst の改行コードが windows(CRLF) になってしまう。
unix (LF) に直すには、

 $ nkf -Lu ipl.lst > ipl.lst.lf

リストファイル ipl.lst.lf を vi で読む時、 

:set ts=4
:set nowrap

を指定すると読みやすい。

chapter 2

o イメージファイルの作成

 $ dd if=/dev/zero of=helloos.img bs=512  count=2880

o sartol

http://user.ecc.u-tokyo.ac.jp/~t40370/osask/index.html から
「sartol0i for Linux」(2004.11.11) をダウンロード。

次のコマンドで展開。

 $ sarsh xf a.sar -C destdir

o edimg

http://www.afis.to/~mone/osask/osask_ml/200412/msg00008.html から edimg0h.sar
をダウンロード。

edimg.c を編集。

 $ vi edimg.c

コンパイル。

 $ gcc -o edimg edimg.c autodec_.c

o makeimg.bat の処理

 $ ../z_tools/edimg.exe imgin:../z_tools/fdimg0at.tek wbinimg src:ipl.bin len:512 from:0 to:0 imgout:helloos.img

o シンボリックリンクにより make.exe ファイルを用意する

t_tools ディレクトリ内で

 $ ln -s /usr/bin/make make.exe

o "make run" 用に Makefile を修正

run :
        ../z_tools/make.exe img
        qemu -m 32 -localtime -std-vga -fda helloos.img 

o "make install" 用に Makefile を修正 (未確認)

install :
	dd if=helloos.img of=/dev/fd0 


chapter 3

o cc1.exe

http://www2.hideyosi.com/~hideyosi/age/goset/goset-006.tgz から goset を入手。

gocc1 を cc1.exe にリネーム。
gas2nask を gas2nask.exe にリネーム。

o obj2bim.exe と bim2hrb.exe をソースからコンパイル。

o copy コマンドの代わりに cat を使う。Makefile を次のように修正。

haribote.sys : asmhead.bin bootpack.hrb Makefile
        cat asmhead.bin bootpack.hrb > haribote.sys

-- Makefile の編集内容 --

#COPY     = copy
#DEL      = del
COPY     = cp
DEL      = rm

#haribote.sys : asmhead.bin bootpack.hrb Makefile
#       copy /B asmhead.bin+bootpack.hrb haribote.sys
haribote.sys : asmhead.bin bootpack.hrb Makefile
        cat asmhead.bin bootpack.hrb > haribote.sys 

#run :
#       $(MAKE) img
#       $(COPY) haribote.img ..\z_tools\qemu\fdimage0.bin
#       $(MAKE) -C ../z_tools/qemu
run :
        ../z_tools/make.exe img
        qemu -m 32 -localtime -std-vga -fda haribote.img
run :
        $(MAKE) img
        qemu -m 32 -localtime -std-vga -fda haribote.img

こめんと欄

  • http://www.afis.to/~mone/osask/osask_ml/200412/msg00008.html はサーバが落ちていてつながらないので、 http://osask.marokun.net/ml/7128 をご利用ください。 -- K 2006-03-05 (日) 17:30:04
  • naskの出力する改行コードがCRLFになるという指摘がありますが、naskはソースプログラムの改行コードと同じものを出力しています。したがってソースをLFにしておけば、リスト出力もLFになります。参考まで。 -- K 2006-03-05 (日) 17:37:59
  • 未確認ですが、Makefileのパッチは序盤の章にも対応していないと思います。Makefileの修正箇所は少ないので、手動で修正した方が良いかもしれません。修正したMakefileのdiffからパッチを作り、しばらく使いまわして、合わなくなったらまた作りなおす、という風に対応するのが良いのではないかと思います。パッチの作り方や当て方は上を参考にしてください。 -- wako 2006-03-22 (水) 01:36:08
  • 今日、やっと『30日でできる!OS自作入門』初版第6刷が、我が家に届きました。今、ゼロ日目を読みはじめたところです。私のOS環境はPlamo LinuxですのでhariboteOSが何とかLinux上でテストできないものかと思っていましたら、7ページにこちらのURLが書いてありましたので一言コメントを入れさせて頂きました。この著書が多くの人達に読まれる事を願っている者として、まずは御挨拶させて頂きました。 -- sank 2006-07-23 (日) 19:46:24
  • あれから一週間が経ちました。Linuxでwineの中のqemuにおいてhariboteOSが順調に立ち上がってます! wineのテストも兼ねるので好都合です。感謝 (名前を変えましたsank → hanpenになりました) -- hanpen 2006-08-01 (火) 23:07:12
  • 実際にLinuxで挑戦してくださってありがとうございます。 -- K 2006-08-01 (火) 23:43:24
  • はじめまして、リナックスでOSを作っていきたいと思います。よろしくお願いします -- リックス 2006-08-21 (月) 22:14:07
  • 今日、本を読破しました。実りある有意義で、苦しくもあり楽しくもあった一ヶ月でした。Kさん、そして、わこうさんThanks -- hanpen 2006-08-30 (水) 23:01:45
  • (hanpenさんやリックスさんにお返事を書きたいところですが、ここはLinux固有の問題で盛り上がるところで、おめでとうございます系の話題はあまり適当ではないので、お返事を省略させていただきます。はじめましてや奮闘ぶりの報告は、以降は(たとえLinux上の開発であっても)impressionsにお願いします。ここは、わこうメモの改善点などを指摘する場合に活用してください。) -- K 2006-09-01 (金) 20:16:38
  • 追加情報:Linuxのバイナリディタは? http://www.tatsuyoshi.net/toyota/hi/http://emacs-21.ki.nu/application/hexl.html を参考にしてください。 -- K 2009-11-18 (水) 08:14:06
  • 特にLINUXで開発する必要はございませんけど、本当にありがとうございました。ぜひ、ためしてみます〜 -- シ コウヒ 2015-02-15 (日) 00:51:37
  • でも、LINUXで直接に.exeのファイルを作動さすることができますか? -- シ コウヒ 2015-02-15 (日) 00:54:05
  • wineを使用すれば実行できるようになります。 -- skyblue 2015-02-15 (日) 10:49:41
  • ツール使いたいなら omakeフォルダにあるソースをLinux上でコンパイルすればいいと思います -- yuki 2015-03-18 (水) 13:08:12
  • ツール使いたいなら omakeフォルダにあるソースをLinux上でコンパイルすればいいと思います -- yuki 2015-03-18 (水) 13:20:35
  • I've got a part-time job http://femjoy.in.net/ femjoy angels Michael King, left, shown with his mother, Bernice was arrested by Queens, N.Y., narcotics cops â?? and eventually cleared of all charges. 'I donâ??t know what Iâ??m charging you with ... I might charge you with attempted murder. I havenâ??t figured it out yet,' he says of the purportedly overzealous officers. He later filed suit and won a $15,000 settlement from the city. -- Laurence 2019-06-29 (土) 21:03:17
  • We were at school together http://ampland.fun/ amp land The agreement was being considered a day after U.S. andEuropean officials announced they had reached a deal on how tojointly oversee the market. Their agreement broke a deadlock onthe reach of the CFTCâ??s rules, which generated opposition fromEuropean and Asian regulators for more than two years. -- Coolman 2019-06-30 (日) 03:16:11
  • I'd like to cancel a cheque http://ampland.fun/ ampland movies After 11 seasons in the NBA and six postseasons, Kirilenko is claiming this as his first championship opportunity â?? speaking to his belief in a roster that will cost Prokhorov nearly $200 million (for just one season). -- Chance 2019-06-30 (日) 03:31:44
  • Just over two years http://imagefap.in.net/ beta imagefap Manningâ??s game has always been defined by its gutsiness, and thatâ??s exactly what the Giants need now. This is a QB who carved his niche by routinely pushing plays past that point of no return (remember David Tyree?), and now, the Giants need every bit of that gambling moxie. -- Walker 2019-06-30 (日) 03:38:10
  • What company are you calling from? http://boobs.pet/ huge boobs "You're a monster," Peggy sneers at Don toward the end of Sunday's episode of "Mad Men," titled "The Quality of Mercy." Don is not just getting burned by his protégé but by his daughter as well. -- Isidro 2019-06-30 (日) 03:38:11
  • I live here http://silverdaddies.fun/ www.silverdaddies.com Quantum physicists at the University of Hamburg have finally worked out how to read and write data usingÂ?skyrmions — tiny twisted knots of magnetism that could allow for storage densities 20 times greater than today’s hard drives — allowing for hard drives that might one day store hundreds of terabytes of data, or alternatively finger-tip-sized drives that can carry a few terabytes. -- Chloe 2019-06-30 (日) 03:38:12
  • My battery's about to run out http://ghettotube.in.net/ ghettotube The last two seasons that wasn't much of a pulse at all â?? except for six weeks late in the 2011 season when Tuck magically looked like his old self. In a six-game span he had 5 1/2 sacks and was a dominant presence on defense. The Giants didn't lose any of those games â?? including a 21-17 win over New England behind Tuck's two sacks in Super Bowl XLVI. -- Isabel 2019-06-30 (日) 03:56:42
  • Stolen credit card http://madthumbs.fun/ mad thumb Itâ??s a real change of pace for Cranston, who plays teacher-turned-meth maker Walter White on AMCâ??s â??Breaking Bad.â?? The series, which won a best drama Emmy Award last weekend, airs its season finale on Sunday. -- Benny 2019-06-30 (日) 03:56:45
  • I'm a housewife http://trannytube.fun/ trannytube And, after Judge Christopher Batty told him the case was going to be adjourned, Ferreira said to him: ‘Can you just not sentence me? I can’t keep coming back.Â?Just give me anything and move on.’ -- Sylvester 2019-06-30 (日) 04:24:03
  • Do you need a work permit? http://madthumbs.fun/ madthumbs.com But that would be a huge risk, considering how much the Yankees have at stake. The selling of their brand, based on expensive tickets and TV ratings, currently depends on the expectation that theyâ??ll be in contention every season. -- Dewitt 2019-06-30 (日) 05:24:09
  • Sorry, I ran out of credit http://xnxx.photography/ xnxx porn Colon told the Daily News this week that â??I just hateâ?? the Patriots and said that â??I think sometimes when the Patriots lose or things go wrong, it seems as if there's excuses for why they didn't have a good game. Sometimes that rubs people the wrong way. I feel that way. If you lose, you take it.â?? -- Ronald 2019-07-07 (日) 18:35:48
  • How many more years do you have to go? http://egotastic.in.net/ egotastic Heine was up early on Sunday, working on his computer when he heard two distinct gunshots. He noted the time â?? 5:11 a.m. â?? but didn't think much more about it until a few hours later when he learned what happened. -- Roland 2019-07-07 (日) 18:35:49
  • Will I have to work shifts? http://ampland.fun/ amp land Spokesmen for the military services said that when an individual goes AWOL, the name and other identifying information are sent to the Defense Manpower Data Center, an office under the secretary of defense. A spokeswoman for the secretary of defenseâ??s office said the center does not check with DFAS to make sure that pay to AWOL personnel is stopped. Itâ??s up to the individual services to notify DFAS, she said, which â??is a proven means of doing business.â?? -- Emerson 2019-07-07 (日) 18:35:51
  • I've got a full-time job http://yuvututube.fun/ yuvutu videos Steve Connor is the Science Editor of The Independent. He has won many awards for his journalism, including five-times winner of the prestigious British science writersâ?? award; the David Perlman Award of the American Geophysical Union; twice commended as specialist journalist of the year in the UK Press Awards; UK health journalist of the year and a special merit award of the European School of Oncology for his investigative journalism. He has a degree in zoology from the University of Oxford and has a special interest in genetics and medical science, human evolution and origins, climate change and the environment. -- Anderson 2019-07-08 (月) 10:09:43
  • Do you know what extension he's on? http://kratom.in.net/ is kratom an opioid Saturday in St. Louis, Darling would be in TBSâ?? booth working Dodgers-Cardinals NLCS Game 2 with the Juniors, Ernie Johnson and Cal Ripken. Up in Boston, T-Mac was getting set for Detroit-Boston ALCS Game 1 with Joe Buck. -- Lynwood 2019-07-08 (月) 11:06:48
  • I didn't go to university http://tube8.in.net tube8.com There remains an undercurrent that Rodriguezâ??s plan has been to rehab, but never play as part of a bigger scheme to protect as much of his future salary as possible in case he is suspended for ties to the Biogenesis case. But it was believed that was tied to him proving to insurance companies that he simply could not perform due to two major hip surgeries, not a quad problem. -- Claud 2019-07-08 (月) 11:20:13
  • I live here http://planetsuzy.fun/ planetsuzy hd For many of us, the definition of Â?”private communication” is straightforward: Private communication is that which only you and the person you’re communicating with can read. That expectation, however, is completely out of sync with the basic way that e-mail (and just about any other digital communication) works:Â?E-mail is neither completely secure nor completely private, and it was never designed to be either. -- Antonio 2019-07-08 (月) 11:20:14
  • Could you give me some smaller notes? http://boobs.pet/ boobs out â??Some FSA figures probably view a conflict with Al Qaeda â?? or at least the impression of one â?? as something that would help their public relations work in the West,â?? Lund said,Â?adding that Al Qaeda-affiliated groups may view the escalation as a way of pulling Western states into the conflict. -- Diana 2019-07-08 (月) 11:20:15
  • I'd like to cancel a cheque http://xtube.in.net/ x-tube Indian academics perched on well-endowed chairs andjournalists hired by the American Enterprise and Cato institutescould be trusted to recite the mantra of privatization andderegulation in tune. Right-wing bloggers and tweetersperennially lurking in a shadow intellectual economy helpedentrench Ayn Randian pieties, increasingly discarded orchallenged in the U.S. and Europe, in Indiaâ??s influentialEnglish-language press. -- Arnold 2019-07-08 (月) 11:57:49
  • I like watching TV http://planetsuzy.fun/ planetsuzy hd â??I was really proud that came out,â?? she said, eating a plate of eggs and fries and drinking Coke for breakfast. â??Thatâ??s one of the things I really like about [my mom]. It was definitely troubling to see that political cartoon. It was hurtful to me when there are these negative things. . . . Iâ??m just concerned these things will hurt my parents.â?? -- Edmond 2019-07-08 (月) 11:57:50
  • How many would you like? http://youjizz.in.net youjiz Before the question, Girardi did acknowledge that the Yankees are going to be trying â??to start something new. I think thatâ??s what weâ??re going to try to do. Obviously try to develop in your own system, try to get a core group of players and hopefully one day you can compare them to these guys and what they accomplished. Thatâ??s what as an organization weâ??re trying to do.â?? -- Forest 2019-07-08 (月) 18:47:28

コメントお名前NameLink

リロード   新規 編集 差分 添付   トップ 一覧 検索 最終更新 バックアップ   ヘルプ   最終更新のRSS
Last-modified: 2019-07-08 (月) 18:47:28 (154d)