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
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
110
Linux Namespaces
masami256
0
85
slub: alloc and free
masami256
0
100
SLUB data structures
masami256
0
130
SystemV IPC
masami256
0
140
Linux Namespace
masami256
0
96
Gnomeとdogtail
masami256
0
110
x86 とコンテキストスイッチ
masami256
0
310
Other Decks in Programming
See All in Programming
コンパウンドプロダクト開発のためのローカルプロセスマネージャー再発明 #layerxgo
izumin5210
0
660
Swift愛好会と私(ウホーイ) / Swift Fan Club and Uhooi
uhooi
0
150
AI × TiDD / 2026.09.05 Redmine 大阪
tokudiro
1
120
AgentCore CLI で進化した AWS での AI エージェントの作り方 : 必要な機能を必要な時に
icoxfog417
PRO
2
260
Building an Out-of-Order CPU
latte72
1
740
AWS DevOps Agentで インシデント対応をAIに任せたい
honmarkhunt
7
2.6k
AIを上手に使っていこうとしたら越境せざるを得なくなった話 〜実践1年で見えた境界を越えなければならない理由と進め方〜 / Crossing borders with AI
tomoyakitaura
4
1.1k
Hello, Hiroshima Geospatial Data! — Exploring DoboX with Python
ra0kley
0
180
Webの地図
yosuke_furukawa
PRO
4
3.7k
Snowflakeで業務アプリを作ろう。 Snowflakeのアプリ機能解説&実践ガイド
ayumu_yamaguchi
1
200
[GoCon2026] When Goroutines Are Not Enough: Runtime Locality in High-Throughput Go
takehaya
6
1.6k
初心者DevRelとして参加者だった私が、DevRel Talks!#2に登壇するまでにしてきたこと
sokohirai
0
360
Featured
See All Featured
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
680
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
270
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
210
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.9k
Color Theory Basics | Prateek | Gurzu
gurzu
0
460
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
4
610
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
310
Into the Great Unknown - MozCon
thekraken
41
2.7k
Building the Perfect Custom Keyboard
takai
2
870
How STYLIGHT went responsive
nonsquared
100
6.3k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
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