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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Masami Ichikawa
May 22, 2011
Programming
100
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
とある帽子の大蛇料理Ⅱ
Masami Ichikawa
May 22, 2011
More Decks by Masami Ichikawa
See All by Masami Ichikawa
cgroupsとプロセス生成・終了処理
masami256
1
1.4k
Linux の Debug 機能
masami256
0
120
Linux Namespaces
masami256
0
95
slub: alloc and free
masami256
0
100
SLUB data structures
masami256
0
140
SystemV IPC
masami256
0
140
Linux Namespace
masami256
0
97
Gnomeとdogtail
masami256
0
110
x86 とコンテキストスイッチ
masami256
0
320
Other Decks in Programming
See All in Programming
自作Discord音声botをLambda MicroVMsに移行した話 / Migrating My Discord Voice Bot to Lambda MicroVMs
akihisaikeda
0
140
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
AmebaブログはKMPから卒業します
kmars0605
0
220
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
130
golang-bob.pdf
iwatsukayura
0
130
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
5
4.3k
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
820
気持ちぃ〜角丸 Squircle
ryu1013
0
330
ChromeでローカルLLM
ryu1013
0
160
作って学ぶSpring BootのAuto Configuration / JJUG Night Seminar 2026-10-19
rshindo
0
200
🇪🇸 React Alicante 2026 (Workshop)
ythecombinator
PRO
0
100
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
17k
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
610
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
740
Utilizing Notion as your number one productivity tool
mfonobong
4
620
Practical Orchestrator
shlominoach
192
12k
What does AI have to do with Human Rights?
axbom
PRO
1
2.5k
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
540
The browser strikes back
jonoalderson
0
1.8k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
630
Transcript
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