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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
89
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
310
Other Decks in Programming
See All in Programming
iOSDC2026登壇資料.pdf
riofujimon
0
200
Workers Cache を知る
syumai
0
320
App Storeの外へ──日本のiOSサイドローディング入門 for iOSDC Japan 2026
yuukiw00w
0
280
AWSに止められる覚悟してますか?
morizo_1984
2
490
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
450
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
460
TiDB Cloudのカスタムコントローラーによるオートスケール対応
takaidohigasi
0
140
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
4.7k
Turning Architecture into Unit Tests in the AI Era (NSSpain XIV)
steliosf
PRO
1
120
Omarchy Tokyo やると聞いて UMPC 買ってセットアップしてきた
mtsmfm
0
200
The Rails Doctrine Decade
koic
2
440
Agents on Rails - Rails at Scale 2026
irinanazarova
0
310
Featured
See All Featured
How to Ace a Technical Interview
jacobian
280
24k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
68
58k
First, design no harm
axbom
PRO
2
1.3k
What's in a price? How to price your products and services
michaelherold
247
13k
The Limits of Empathy - UXLibs8
cassininazir
1
690
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
500
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
490
KATA
mclloyd
PRO
35
16k
The untapped power of vector embeddings
frankvandijk
2
1.9k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
Into the Great Unknown - MozCon
thekraken
41
2.7k
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