Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
とある帽子の大蛇料理Ⅱ
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Masami Ichikawa
May 22, 2011
Programming
110
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
とある帽子の大蛇料理Ⅱ
Masami Ichikawa
May 22, 2011
Transcript
25 slides
Twitter : @masami256 Mail :
[email protected]
Anaconda Overview • Stage1,2 の 2 段階でインストーラが起動 • Stage1 •
ブートオプション処理 • メディアチェック • ネットワーク設定(必要なら) • Stage2 の実行 • Stage2 • 言語、キーボード、パーティション設定などの 実際のインストール処理
これが出ると Stage1 完了
None
C(Stage1) と Python(Stage2) GUI は PyGtk Anaconda Programming
Anaconda UI • インストーラの機能( GUI を使う場合)は以 下のファイルにクラスを登録 • dispatch.py •
gui.py • installclass.py
dispatch.py • インストール手順に関するファイル • 各機能が動く順番を設定 • 次のステップに進む / 前のステップに戻るなど の処理を実施
installSteps = [ ("kernelvm_top", ), ("installTinyCoreNag", installTinyCoreNagScreen, ), キー名 関数名
gui.py • GUI に関する基本的な処理を実施 • 変数 stepToClass にキー名とファイル名、クラ ス名を設定 stepToClass
= { "kernelvm_top" : ("kernelvm_top_gui", "KernelvmTopWindow"),
installcalss.py • • dispatch クラスに dispath.py で登録したキー名を登録 dispatch.setStepList( "kernelvm_top", "installTinyCoreNag",
Anaconda UI and Logic • UI 周りの処理と、実際の処理はファイルが分 かれてます • pyanaconda/language.py
– 言語回りでの処理を実施 • pyanaconda/iw/language_gui.py – Langauge の画面に関する処理 • GUI のコード • PyGtk の場合は pyanaconda/iw • テキストの場合は pyanaconda/textw
class KernelvmTopWindow (InstallWindow): windowTitle = "Kernel/VM" #N_("KernelVM") def __init__ (self,
ics): InstallWindow.__init__ (self, ics) ics.setGrabNext (1) self.anaconda = None def getScreen (self, anaconda): self.anaconda = anaconda box = gtk.VBox (False, 10) pix = gui.readImageFromFile ("kernelvm.png") if pix: a = gtk.Alignment () a.add (pix) a.set (0.5, 0.5, 1.0, 1.0) a.set_size_request(200, -1) box.pack_start (a, False) box.pack_start(self.createHbox()) return box iw/kernelvm_top_gui.py
kerenelvm_top.py class kernelvm_top (object): def __init__ (self, display_mode = 'g'):
pass def write(self, instPath): pass def writeKS(self, f): pass
None
Anaonda Testing • iso イメージ作るのは大変です>< • 既存の iso イメージ弄るのも面倒 •
そこで updates.img の出番です!
updates.img • make updates するだけ • updates.img というファイルができます • 差分のあるファイルのみを抽出して
cpio でまと めて gzip したファイルです • .spec ファイルのリリースバージョン、 git の tag から差分を見ているようです • ブート時にオプションを渡します • updates=http://10.0.2.2/updates.img
Anaconda 弄りは割と手軽にできますね ^q^
ってことで作りました
Linux の代わりに自作カーネルのインストール
誰得?
変更箇所 • yuminstall.py • rpm ファイルのインストール部分 • bootloader.py • Grub
周りの処理 •
packages.py def doInstallTinyCore(self, anaconda): gzipImage = "/tmp/updates/tinycore.gz" f = gzip.open(gzipImage,
'rb') data = f.read() cpioFile = "/tmp/tinycore.cpio" w = open(cpioFile,'wb') w.write(data) w.close() f.close() cmd = "cd %(rootPath)s && cpio -id < %(cpiofile)s" % {'rootPath' : anaconda.rootPath, 'cpiofile' : cpioFile} os.system(cmd)
bootloader.py def installGrubForTinyCore(anaconda): Grub の rpm を /mnt/sysimage にインストール
grub-install –root-directroy=/mnt/sysimage /dev/sda grub –batch --device-map=/dev/null << EOF\ndevice (hd0)\t%(sda)s1\nroot (hd0)\nsetup (hd0)\nquit\nEOF カーネルを /mnt/sysimage/boot にコピー
bootloader.py def writeBootloader(anaconda): # for (version, arch, nick) in \
# anaconda.backend.kernelVersionList(anaconda.rootPath): # if plainLabelUsed: # kernelList.append(("%s-%s" %(kernelLabel, nick), # "%s-%s" %(kernelLongLabel, nick), # version)) # else: # kernelList.append((kernelLabel, kernelLongLabel, version)) # if nick != "base": # defkern = "kernel-%s" %(nick,) # plainLabelUsed = 1 kernelList.append(('miko', 'miko', '0'))
カーネル自作したら Anaconda でインストーラを作り 配布しましょう\ (^o^) /
URL • Fedora Anaconda repogitory • git://git.fedorahosted.org/git/anaconda.git • Anaconda for
Ore ore kernel • https://github.com/masami256/Anaconda-for- ore-ore-kernel
More Decks by Masami Ichikawa
See All by Masami Ichikawa
cgroupsとプロセス生成・終了処理
masami256
1
1.4k
Linux の Debug 機能
masami256
0
120
Linux Namespaces
masami256
0
100
slub: alloc and free
masami256
0
110
SLUB data structures
masami256
0
140
SystemV IPC
masami256
0
140
Linux Namespace
masami256
0
100
Gnomeとdogtail
masami256
0
110
x86 とコンテキストスイッチ
masami256
0
320
Other Decks in Programming
See All in Programming
複数ドメインを一つのアプリに統合するFlutterの設計と運用_FlutterKaigi2026登壇資料(須永高弘)
takahirosunaga
0
210
読みやすい!と評判(?)の発表の準備にかける私のこだわり
shoheimitani
0
160
Scalaの型でマルチテナントの認可を守る
nextbeatdev
0
180
AI時代のFlutter品質設計 — アプリ品質を守るQuality Layers
omatty198
0
390
疎結合とは何か?ソフトウェア設計における結合バランスについて考える #phpcon_niigata
kajitack
2
420
Agentic AI with the Power of Jakarta EE
ivargrimstad
0
180
どうしても Eloquent でリポジトリパターンをやりたいんだ #phpcon_niigata / phpcon-niigata-2026
shogogg
0
670
Math.sumPreciseから学ぶ、ECMAScript仕様の数値の種類
syumai
0
100
느린 네트워크와 저사양 디바이스 사용자를 위한 웹뷰 로딩 시간 개선기
kmkim
1
270
将来の標準フォーマッター?ktfmtを深堀る
t45k
0
250
まずはコードより業務と向き合う:テーブル解体のためにPdMを呼んだ話
sakawe_ee
0
270
Skills Are the New npm [AAIF Bengaluru]
shivamsaraswat
0
120
Featured
See All Featured
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
3k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.7k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
The Curious Case for Waylosing
cassininazir
1
630
The Cult of Friendly URLs
andyhume
79
7.1k
A better future with KSS
kneath
240
18k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.8k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.5k
Making Projects Easy
brettharned
120
6.9k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
68
61k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
350
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
670