入口
    OF 1/2 の場合
    OF 3 の場合
      設置後すぐ
      CDROM 無で
    Mac OS の場合
    その他
  NetBSD
  Booting Media
Primary
  bootxx
Secondary
  xcf/elf
    release(7)
    /usr/mdec
ofwboot
  Locore.c
  boot.c
    main()
    boot-file
    chain()
    OF_chain()
kernel(1)
  locore.S
  machdep.c
    initppc()
kernel(2)
  init_main.c
    main()
その他
  installboot
    旧版
    新版
    実例
  DEFAULT CATCH
GENERIC_MD
  mdsetimage

NetBSD/macppc booting

Secondary

xcf/elf

ofwboot には ofwboot.xcf ofwboot.elf ofwboot の三つがある。 中身は全く同じで、外側の形が違うだけ。 例えば objdump を使うと、次のように表示される。
installation)> objdump -f ofwboot.*

ofwboot.elf:     file format elf32-powerpc
architecture: powerpc:common, flags 0x00000002:
EXEC_P
start address 0x00640000


ofwboot.xcf:     file format aixcoff-rs6000
architecture: rs6000:6000, flags 0x00000102:
EXEC_P, D_PAGED
start address 0x00640000
ただし最近僕が使っている ts 版では、次のように 0xc0000 つまり下から 768k Bytes, 0.75MByte に置くようになっている。 カーネルを置く番地より更に少し下ということである。
ttyqc:makoto@mini  19:51:00/050820(...pub/NetBSD)> cd snapshot/20050707ts/macppc/installation/
ttyqc:makoto@mini  19:51:18/050820(...macppc/installation)> objdump -f ofwboot.*

ofwboot.elf:     file format elf32-powerpc
architecture: powerpc:common, flags 0x00000002:
EXEC_P
start address 0x000c0000


ofwboot.xcf:     file format aixcoff-rs6000
architecture: rs6000:6000, flags 0x00000102:
EXEC_P, D_PAGED
start address 0x000c0000

ttyqc:makoto@mini  19:51:20/050820(...macppc/installation)> 

release(7)

release 形式の説明が release(7) にある。上の説明には、 その形式で用意されているものを使って調べた。

/usr/mdec

同様のものは (macppc の場合) /usr/mdec にも置いてある。
ttyp1:makoto@quick  8:36:29/020702(/usr/mdec)> ls -l
total 540
-r--r--r--  1 root  wheel   2271 Apr  9 06:04 bootxx
-r-xr-xr-x  1 root  wheel  89660 Apr  9 06:04 installboot*
-r--r--r--  1 root  wheel  59164 Apr  9 08:48 ofwboot
-r--r--r--  1 root  wheel  63176 Apr  9 08:48 ofwboot.elf
-r--r--r--  1 root  wheel  59400 Apr  9 08:48 ofwboot.xcf
ただし、これらは installboot 用で、起動時に実際にそのまま読まれる訳ではない。

最近、普通の実行形式は ELF (The Executable and Linking Format) になっているが、 起動に関しては、 .xcf を使っておけばどのような機種でも読めて起動可能ということで、 一部では「xcf だけにしておけば話が簡単」と理解されている。 (例えば INSTALL.html )

Last Update: Sat, 04 May 2019 00:45:20 GMT 1.66 2008/03/08