LoginSignup
1
0

More than 1 year has passed since last update.

NetBSD/armのINSTALL

Last updated at Posted at 2022-11-22

MV2120_INSTALLなカーネルをビルドしてORIONでnetbsd.ubを起動してみました。

image.png

カーネルの中に以下のファイルが入っていて、mdにコピーされてmountされてsysinstが実行されるようです。

INSTALL.png

組み込まれているファイルはここにあります。

usr/src/distrib/evbarm/instkernel/ramdisk/obj/ramdisk.fs

fileで見ると

./usr/src/distrib/evbarm/instkernel/ramdisk/obj/ramdisk.fs:      Unix Fast File s
ystem [v1] (little-endian), last mounted on , last written at Wed Nov 23 12:48:02
 2022, clean flag 1, number of blocks 6144, number of data blocks 5863, number of
 cylinder groups 1, block size 4096, fragment size 512, minimum percentage of fre
e blocks 0, rotational delay 0ms, disk rotational speed 60rps, SPACE optimization

中身はこんなです

# ls -asl
total 4695
   1 drwxr-xr-x  14 root  wheel      512 Oct 27 11:27 .
   1 drwxr-xr-x  14 root  wheel      512 Oct 27 11:27 ..
   5 -r--r--r--   1 root  wheel     2438 Oct 27 11:27 .profile
   1 drwxr-xr-x   2 root  wheel      512 Oct 27 11:27 bin
  23 drwxr-xr-x   2 root  wheel    11776 Oct 27 11:27 dev
   1 drwxr-xr-x   2 root  wheel      512 Oct 27 11:27 etc
   1 dr-xr-xr-x   2 root  wheel      512 Oct 27 11:58 kern
   1 drwxr-xr-x   3 root  wheel      512 Oct 27 11:27 libexec
   1 drwxr-xr-x   2 root  wheel      512 Oct 27 11:27 mnt
   1 drwxr-xr-x   2 root  wheel      512 Oct 27 11:27 mnt2
   2 drwxr-xr-x   2 root  wheel     1024 Oct 27 11:27 sbin
4376 -r-xr-xr-x  67 root  wheel  2233372 Oct 27 11:27 sysinst
  72 -r--r--r--   1 root  wheel    36367 Oct 27 11:27 sysinstmsgs.de
  70 -r--r--r--   1 root  wheel    35362 Oct 27 11:27 sysinstmsgs.es
  71 -r--r--r--   1 root  wheel    36128 Oct 27 11:27 sysinstmsgs.fr
  64 -r--r--r--   1 root  wheel    32542 Oct 27 11:27 sysinstmsgs.pl
   1 drwxr-xr-x   2 root  wheel      512 Oct 27 11:27 targetroot
   1 drwxrwxrwt   2 root  wheel      512 Oct 27 11:27 tmp
   1 drwxr-xr-x   6 root  wheel      512 Oct 27 11:27 usr
   1 drwxr-xr-x   6 root  wheel      512 Oct 27 11:27 var
# df
Filesystem   512-blocks       Used      Avail %Cap Mounted on
/dev/md0a          5863       4756       1107  81% /
kernfs                2          2          0 100% /kern
# 

binの下のファイルはiノードが同じなので、実際は一つのファイルのようでbusyboxと同じようになっているのかもしれません。

かなり古いですが、概要はここにあるようです。

build.shのrelaseでreleasedirにramdisk.fsにも作れれるようだが関係は不明。

ramdisk.fsが正しくカーネル内にコピーされていないと止まります。

[   1.0698833] boot device: <unknown>
[   1.0698833] root on md0a dumps on md0b
[   1.0698833] Supported file systems: mfs lfs ffs ext2fs nfs umap procfs overlay null kernfs fdesc union tmpfs udf puffs ptyfs ntfs msdos hfs cd9660 coda
[   1.0698833] no file system for md0 (dev 0x1200)
[   1.0698833] cannot mount root, error = 79
[   1.0698833] root device (default md0a): 

sysinstは/.profileから実行されています。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0