ユーザ用ツール

サイト用ツール


mae3xx_ope:boot_nfsroot:start

差分

この文書の現在のバージョンと選択したバージョンの差分を表示します。

この比較画面にリンクする

mae3xx_ope:boot_nfsroot:start [2016/01/15 14:14]
admin 作成
mae3xx_ope:boot_nfsroot:start [2016/01/15 14:22] (現在)
admin
ライン 1: ライン 1:
 +====== NFS root での起動 ======
  
 +PC上に開発環境を導入したクロスの root filesystem(ARM用) を用意し、PCでコンパイルしたプログラムを\\
 +実機で即((プログラムを転送せずに))確認したい場合などには、NFS rootでの起動が便利です。
 +
 +『[[mae3xx_ope:​boot_select:​start]]』による方法では選択できませんが、\\
 +bootloader のメニューから選択し、起動することができます。
 +
 +\\
 +
 +===== サーバ側の設定 =====
 +
 +NFSサーバ、DHCPサーバを導入し、設定を行います。
 +
 +==== NFSサーバの設定 ====
 +
 +NFS root のファイルシステムを提供するサーバの設定を行います。
 +
 +"/​home/​exports/​ARM_trusty"​ というディレクトリを提供する場合の例です。\\
 +NFS-serverをインストールし、/​etc/​exports に下記のようなエントリを追加します。
 +
 +<file generic exports>
 +/​home/​exports/​ARM_trusty    ​192.168.253.0/​255.255.255.0(rw,​no_root_squash,​insecure,​async,​subtree_check)
 +</​file>​
 +
 +\\
 +
 +追加したエントリを有効化します。
 +
 +<​code>​
 +# exportfs -a
 +</​code>​
 +
 +export されているか確認しておきます。
 +
 +<​code>​
 +# exportfs |grep trusty
 +/​home/​exports/​ARM_trusty
 +</​code>​
 +
 +\\
 +
 +==== DHCPサーバの設定 ====
 +
 +ISC DHCP の例です。\\
 +/​etc/​dhcp/​dhcpd.conf を設定します。
 +
 +<file generic dhcpd.conf>​
 +default-lease-time 86400;
 +max-lease-time 86400;
 +allow bootp;
 +#​ddns-update-style ad-hoc;
 +
 +subnet 192.168.253.0 netmask 255.255.255.0 {
 +  option subnet-mask 255.255.255.0;​
 +  option broadcast-address 192.168.253.255;​
 +  option routers 192.168.253.5;​
 +  option ntp-servers 192.168.253.5;​
 +  option domain-name-servers 192.168.253.5;​
 +
 +  range 192.168.253.200 192.168.253.249;​
 +
 +  group {
 +    host mae3xx {
 +      hardware ethernet 00:​80:​6d:​xx:​xx:​xx;​
 +      fixed-address 192.168.253.47;​
 +      option root-path "​192.168.253.5:/​home/​exports/​ARM_trusty";​
 +    }
 +  }
 +}
 +</​file>​
 +
 +\\
 +
 +===== NFS root での起動 =====
 +
 +MA-E3xx のコンソールで、起動時にキーを入力し自動起動を停止させます。
 +
 +<​code>​
 +barebox 2013.12.0-gc51c3f4 #3 Tue Mar 11 18:24:49 JST 2014
 +
 +
 +Board: plum-ma[512MiB]
 +m25p80 m25p800: m25p16 (2048 Kbytes)
 +booting from SPI
 +
 +
 +barebox 2013.12.0-00373-g5307ee1-dirty #706 Tue Jan 12 10:16:15 JST 2016
 +
 +
 +Board: plum-ma[512MiB]
 +nand: ONFI param page 0 valid
 +nand: ONFI flash detected
 +nand: NAND device: Manufacturer ID: 0x01, Chip ID: 0xda (AMD/​Spansion S34ML02G1), 256MiB, page size: 2048, OOB
 + size: 64
 +omap-hsmmc omap4-hsmmc0:​ registered as omap4-hsmmc0
 +m25p80 m25p800: m25p16 (2048 Kbytes)
 +i2c-omap i2c-am33xx0:​ bus 0 rev0.11 at 100 kHz
 +cpsw cpsw0: detected phy mask 0xc
 +mdio_bus: miibus0: probed
 +eth0: got preset MAC address: D0:​39:​72:​3D:​75:​08
 +malloc space: 0x8e000000 -> 0x9dffffff (size 256 MiB)
 +Reset is caused by "​PowerOnReset"​ (0x00000001).
 +envfs: wrong magic on /dev/env0
 +no valid environment found on /dev/env0. Using default environment
 +running /​env/​bin/​init...
 +filetype: No such file or directory
 +UBI: attaching mtd0 to ubi0
 +UBI: scanning is finished
 +registering /dev/ubi0
 +registering kernel.0 as /​dev/​ubi0.kernel.0
 +registering kernel.1 as /​dev/​ubi0.kernel.1
 +registering initramfs.0 as /​dev/​ubi0.initramfs.0
 +registering initramfs.1 as /​dev/​ubi0.initramfs.1
 +registering kmod.0 as /​dev/​ubi0.kmod.0
 +registering kmod.1 as /​dev/​ubi0.kmod.1
 +registering rootfs.0 as /​dev/​ubi0.rootfs.0
 +registering rootfs.1 as /​dev/​ubi0.rootfs.1
 +registering opt as /​dev/​ubi0.opt
 +registering overlay as /​dev/​ubi0.overlay
 +UBI: attached mtd0 (name "​nand0.UBI",​ size 255 MiB) to ubi0
 +UBI: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
 +UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 512
 +UBI: VID header offset: 512 (aligned 512), data offset: 2048
 +UBI: good PEBs: 2040, bad PEBs: 0, corrupted PEBs: 0
 +UBI: user volume: 10, internal volumes: 1, max. volumes count: 128
 +UBI: max/mean erase counter: 9/6, WL threshold: 4096, image sequence number: 4024
 +UBI: available PEBs: 0, total reserved PEBs: 2040, PEBs reserved for bad PEB handling: 40
 +
 +Hit m for menu or any other key to stop autoboot: ​ 1
 +
 +type exit to get to the menu
 +barebox@plum-ma[512MiB]:/ ​
 +</​code>​
 +
 +\\
 +
 +"​exit"​ と入力することで、bootloader のメニューを表示させます。
 +
 +<​code>​
 +type exit to get to the menu
 +barebox@plum-ma[512MiB]:/​ exit
 +</​code>​
 +
 +{{:​mae3xx_ope:​boot_nfsroot:​nfsroot_bootloader_00.png|bootloader MENU}}
 +
 +\\
 +
 +カーソルの上下で "3: Boot: NFS root (Kernel, dtb on Flash)"​ を選択し、Enter で実行します。
 +
 +{{:​mae3xx_ope:​boot_nfsroot:​nfsroot_bootloader_01.png|select NFS root}}
 +
 +\\
 +
 +起動しました。
 +
 +{{:​mae3xx_ope:​boot_nfsroot:​nfsroot_bootloader_02.png|boot with NFS root}}
mae3xx_ope/boot_nfsroot/start.1452834875.txt.bz2 · 最終更新: 2016/01/15 14:14 by admin