nvflash は Tegra 向けのイメージデータ読み書きツール。Advent vega や ux100 の発売元から提供されている ROM Update Utility は nvflash によって ROM アップデートを実現している。
nvflash はパーティションの読み書きが自由にできる事から、システムのバックアップとリストアに使用できそうだが、system が正常に読み取りできない事が確認されており、P10AN01 では、今のところ、バックアップツールとして使用する方法が確立されていない。
注意
nvflash は操作にミスにより、システムが破壊される恐れがあります。
P10AN01 を PC に認識させる(P10AN01 の APX モード移行)
- 電源を落とす
- AC アダプターを接続する(必須)
- USB ケーブル(両端 USB A オス)で PC と接続する
- Back ボタンを1秒押す
- Back ボタンを押したまま、power ボタンを一秒押す
PC でうまく認識できた場合、それぞれの OS 上で次の通り確認できる。
Windows
PC のデバイスコントローラーで APX デバイスとして認識された事を確認する。
Linux
$ lsusb | grep -i nvidia Bus 002 Device 004: ID 0955:7820 NVidia Corp.
Windows で認識がうまくいかない場合、NVIDIA Developer Zone の Operating System Images & Support Packs のドライバか p10an01 の発売元から提供されているドライバを適用する必要があるかもしれない。Linux は別途ドライバの導入は必要無い。
コマンドの実行方法
後述のコマンドはパスなどは省略しているので、事前に nvflash へのパスを通しておくこと。Windows、Linux 共にオプションの差異は無いが、Linux では sudo や su で root 権限を取得してから実行する必要がある。(一般ユーザで実行する場合、恐らく udev の設定が必要)
RAM にブートローダーをロードする
このコマンドは後述のコマンドを実行する前に必ず一度実行する必要がある。ここでロードされるブートローダは、ROM Update Utility や NVIDIA のサポートパックから入手しておく必要がある。
> nvflash --bl bootloader.bin --go
パーティションの読み込み
--read の引数に読み取りたいパーティション番号を指定する
読み取りたいパーティションとその番号は、後述の方法で確認できる。
読み取りたいパーティションとその番号は、後述の方法で確認できる。
> nvflash -r --read 1 1.img
パーティションの書き込み
--download の引数に書き込ませるパーティション番号を指定する
> nvflash -r --download 1 1.img
パーティションテーブルを取得する
--getpartitiontable の引数にパーティションテーブルの情報を保存する。
> nvflash -r --getpartitiontable partitiontable.txt
nvflash のヘルプ
--help (or -h) displays this page --cmdhelp cmd(or -ch) displays command help --resume (or -r) send the following commands to an already-running bootloader --quiet (or -q) surpress excessive console output --wait (or -w) waits for a device connection (currently a USB cable) --create full initialization of the target device using the config file --download N filename download partition filename to N --setboot N sets the boot partition to partition N --format_partition N formats contents of partition N --read N filename reads back partition N into filename --getpartitiontable filename reads back the partition table into filename --getbit filename reads back BIT into filename --getbct reads back the BCT from mass storage --odm C Data ODM custom 32bit command 'C' with associated 32bit data --go continues normal execution of the downloaded bootloader options = --configfile filename indicates the configuration file used with the following commands: --create, --format_all --bct filename indicates the file containing the BCT --sbk 0x00000000 00000000 00000000 00000000 indicates the secure boot key for the target device --bl filename downloads and runs the bootloader specified by filename --odmdata N sets 32bit customer data into a field in the BCT, either hex or decimal --diskimgopt N sets 32bit data required for disk image convertion tool --format_all formats all existing partitions on the target device using the config file, including partitions and the bct --setbootdevtype S sets the boot device type fuse value for the device name. allowed device name string mentioned below: emmc, nand_x8, nand_x16, nor, spi --setbootdevconfig N sets the boot device config fuse value either hex or decimal --verifypart N verifies data for partition id = N specified. N=-1 indicates all partitions Intended to be used with --create command only. --setbct updates the chip specific settings of the BCT in mass storage to the bct supplied,used with --create, should not be with --read,and --format(delete)_all,format(delete)_partition,--download, and--read --sync issues force sync commad --rawdeviceread S N filename reads back N sectors starting from sector S into filename --rawdevicewrite S N filename writes back N sectors from filename to device starting from sector S