bc10-router/arago-project(danny)/NAND Boot
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
]
開始行:
[[bc10-router]] ~
#contents
* bc10-router/arago-project(danny)/NAND boot [#u70d679b]
bc10 の NAND から[[bc10-router/arago-project(danny)/Ubunt...
arago-console-image を起動させるための手順について記載し...
~
NAND Boot用イメージの作成、設定の手順は大きく3つあります。~
~
それぞれの手順で使用する環境は異なり、 ~
[[bc10-router/arago-project(danny)/Ubuntu12.04LTS]] に~
記載しています以下の3つの環境を使用します。 ~
- Ubuntu 12.04 LTS ~
- bc10 arago-cosole-image ~
- bc10 u-boot ~
** Ubuntu 12.04 LTS part [#aff46499]
Ubuntu 12.04 LTS 上で以下の作業を行います。~
~
[[bc10-router/arago-project(danny)/Ubuntu12.04LTS]] で作...
ubiファイルを NAND Boot 可能なように ubi ファイルの設定...
~
ubi ファイルを再作成する理由は [[bc10-router/arago-projec...
ubi ファイルに一部 ubi dataではないものがあり NAND Boot ...
~
再作成のため mtd-utils を導入します。 ~
$ sudo apt-get install mtd-utils
arago-console-image の ubi ファイルを rootfs.ubi に変更し...
$ cd /home/beat/tisdk/build/arago-tmp-external-linaro-to...
$ cp arago-console-image-beagleboard-20140131034334.root...
ubi ファイル作成のため以下のように ubinize.cfg を変更し u...
SD カードの Ext3 の領域(本稿では /media/EXT3 と記載)にコ...
$ diff -upN __ubinize.cfg_orig ubinize.cfg
--- __ubinize.cfg_orig 2014-02-06 14:52:27.473188696 +0...
+++ ubinize.cfg 2014-02-06 14:52:48.297189782 +0900
@@ -3,5 +3,5 @@ mode=ubi
image=/home/beat/tisdk/build/arago-tmp-external-linaro-...
vol_id=0
vol_type=dynamic
-vol_name=beagleboard-rootfs
+vol_name=rootfs
vol_flags=autoresize
$ sudo ubinize -v -o rootfs.ubi -m 2048 -p 128KiB -s 512...
$ sudo cp rootfs.ubi /media/EXT3/.
** bc10 arago-console-image part [#za554dce]
rootfs.ubi をコピーした SD で bc10 を起動します。~
その際 NAND のパーティションを確認し、そのサイズに合わせ...
uImage、rootfs.ubi を NAND に書き込みます。 ~
NAND パーティションの確認
# cat /proc/mtd
dev: size erasesize name
mtd0: 00080000 00020000 "X-Loader"
mtd1: 001e0000 00020000 "U-Boot"
mtd2: 00020000 00020000 "U-Boot Env"
mtd3: 00400000 00020000 "Kernel"
mtd4: 1f980000 00020000 "File System"
uImage の書き込み
# cd /boot/
root@beagleboard:/boot# ls
uImage uImage-3.3.7
root@beagleboard:/boot# flash_erase /dev/mtd3 0 0
Erasing 128 Kibyte @ 3e0000 -- 100 % complete
# nandwrite -p /dev/mtd3 uImage
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
...<snip>
Writing data to block 26 at offset 0x340000
rootfs.ubi の書き込み
# ubiformat -y /dev/mtd4 -f rootfs.ubi
ubiformat: mtd4 (nand), size 530055168 bytes (505.5 MiB)...
libscan: scanning eraseblock 4043 -- 100 % complete
ubiformat: 4039 eraseblocks are supposedly empty
ubiformat: 5 bad eraseblocks found, numbers: 89, 107, 73...
ubiformat: flashing eraseblock 321 -- 100 % complete
ubiformat: formatting eraseblock 4043 -- 100 % complete
完了後 bc10 を再起動し u-boot のプロンプトを起動します。~
** bc10 u-boot part [#b0de5176]
u-boot プロンプト上で MLO、u-boot.img を NAND に書き込み...
MLO の書き込み
OMAP3 beagleboard.org # mmc rescan 0
OMAP3 beagleboard.org # fatload mmc 0 ${loadaddr} MLO
reading MLO
44580 bytes read
OMAP3 beagleboard.org # nandecc hw
HW ECC selected
OMAP3 beagleboard.org # nand erase 0 80000
NAND erase: device 0 offset 0x0, size 0x80000
Erasing at 0x60000 -- 100% complete.
OK
OMAP3 beagleboard.org # nand write ${loadaddr} 0 ${files...
NAND write: device 0 offset 0x0, size 0xae24
44580 bytes written: OK
OMAP3 beagleboard.org # nand write ${loadaddr} 20000 ${f...
NAND write: device 0 offset 0x20000, size 0xae24
44580 bytes written: OK
OMAP3 beagleboard.org # nand write ${loadaddr} 40000 ${f...
NAND write: device 0 offset 0x40000, size 0xae24
44580 bytes written: OK
OMAP3 beagleboard.org # nand write ${loadaddr} 60000 ${f...
NAND write: device 0 offset 0x60000, size 0xae24
44580 bytes written: OK
u-boot.img の書き込み
OMAP3 beagleboard.org # mmc rescan 0
OMAP3 beagleboard.org # fatload mmc 0 ${loadaddr} u-boot...
reading u-boot.img
336184 bytes read
OMAP3 beagleboard.org # nandecc hw
HW ECC selected
OMAP3 beagleboard.org # nand erase 80000 1c0000
NAND erase: device 0 offset 0x80000, size 0x1c0000
Erasing at 0x220000 -- 100% complete.
OK
OMAP3 beagleboard.org # nand write ${loadaddr} 80000 ${f...
NAND write: device 0 offset 0x80000, size 0x52138
336184 bytes written: OK
OMAP3 beagleboard.org #
以上で NAND Bootの書き込みは完了です。 ~
~
一度電源を落として SD カードを抜き、再度 bc10 を起動しま...
bc10 が SD カード無し(NAND Boot)できることを確認します。 ~
~
注:まれに正しく書き込めている状態でも、Boot時に以下のメッ...
uncorrectable error :
その際は再起動もしくは電源の入れなおしをおこなってくださ...
*** NAND への書き込みを失敗時と SD Boot への戻し方 [#k3dc...
仮に NAND への書き込みに失敗した場合とSD Boot への戻し方...
bc10 を再起動後 u-boot プロンプトを起動し、~
以下のコマンドを実行し NAND の全データを消去します。 ~
# nand erase.chip
削除後電源を落とし再度電源を入れた際、以下の表示で止まれ...
削除は成功です。~
40w
* bc10 NAND Boot Log [#ccdfeb6e]
bc10 NAND Boot 時の Log の一部を以下に記載します。~
U-Boot SPL 2012.04.01 (Jan 28 2014 - 19:49:35)
...<snip>...
Booting from nand ...
NAND read: device 0 offset 0x280000, size 0x400000
4194304 bytes read: OK
## Booting kernel from Legacy Image at 80007fc0 ...
Image Name: Linux-3.3.7
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3413048 Bytes = 3.3 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
XIP Kernel Image ... OK
OK
Starting kernel ...
...<snip>...
[ 0.944183] NAND device: Manufacturer ID: 0x2c, Chip ...
[ 0.954223] Creating 5 MTD partitions on "omap2-nand....
[ 0.959808] 0x000000000000-0x000000080000 : "X-Loader"
[ 0.966796] 0x000000080000-0x000000260000 : "U-Boot"
[ 0.974029] 0x000000260000-0x000000280000 : "U-Boot E...
[ 0.980926] 0x000000280000-0x000000680000 : "Kernel"
[ 0.989013] 0x000000680000-0x000020000000 : "File Sys...
[ 1.199310] UBI: attaching mtd4 to ubi0
[ 1.203338] UBI: physical eraseblock size: 131072 b...
[ 1.209960] UBI: logical eraseblock size: 129024 b...
[ 1.215667] UBI: smallest flash I/O unit: 2048
[ 1.220642] UBI: sub-page size: 512
[ 1.225494] UBI: VID header offset: 512 (ali...
[ 1.231628] UBI: data offset: 2048
[ 2.183929] UBI: max. sequence number: 10
[ 2.202484] UBI: attached mtd4 to ubi0
[ 2.206512] UBI: MTD device name: "File Sy...
[ 2.212310] UBI: MTD device size: 505 MiB
[ 2.217529] UBI: number of good PEBs: 4039
[ 2.222473] UBI: number of bad PEBs: 5
[ 2.227142] UBI: number of corrupted PEBs: 0
[ 2.231842] UBI: max. allowed volumes: 128
[ 2.236694] UBI: wear-leveling threshold: 4096
[ 2.241638] UBI: number of internal volumes: 1
[ 2.246337] UBI: number of user volumes: 1
[ 2.251007] UBI: available PEBs: 0
[ 2.255676] UBI: total number of reserved PEBs: 4039
[ 2.260925] UBI: number of PEBs reserved for bad PEB ...
[ 2.267333] UBI: max/mean erase counter: 1/0
[ 2.271820] UBI: image sequence number: 86612789
[ 2.277465] usbcore: registered new interface driver ...
...<snip>...
[ 5.085510] drivers/rtc/hctosys.c: unable to open rtc...
[ 5.126647] UBIFS: recovery needed
[ 5.227508] UBIFS: recovery completed
[ 5.231384] UBIFS: mounted UBI device 0, volume 0, na...
[ 5.237731] UBIFS: file system size: 256112640 byte...
[ 5.246185] UBIFS: journal size: 9033728 bytes ...
[ 5.253875] UBIFS: media format: w4/r0 (latest ...
[ 5.260040] UBIFS: default compressor: lzo
[ 5.264343] UBIFS: reserved for root: 0 bytes (0 KiB)
[ 5.270599] VFS: Mounted root (ubifs filesystem) on d...
[ 5.277740] devtmpfs: mounted
[ 5.281372] Freeing init memory: 216K
INIT: version 2.88 booting
...<snip>...
Stopping Bootlog daemon: bootlogd.
_____ _____ _ _
| _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_
| | _| .'| . | . | | __| _| . | | | -_| _| _|
|__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_|
|___| |___|
Arago Project http://arago-project.org beagleboard ttyO2
Arago 2013.06 beagleboard ttyO2
beagleboard login:
* 更新履歴 [#s2c9f05c]
2014/02/06 初稿公開 ~
RIGHT:syariten
終了行:
[[bc10-router]] ~
#contents
* bc10-router/arago-project(danny)/NAND boot [#u70d679b]
bc10 の NAND から[[bc10-router/arago-project(danny)/Ubunt...
arago-console-image を起動させるための手順について記載し...
~
NAND Boot用イメージの作成、設定の手順は大きく3つあります。~
~
それぞれの手順で使用する環境は異なり、 ~
[[bc10-router/arago-project(danny)/Ubuntu12.04LTS]] に~
記載しています以下の3つの環境を使用します。 ~
- Ubuntu 12.04 LTS ~
- bc10 arago-cosole-image ~
- bc10 u-boot ~
** Ubuntu 12.04 LTS part [#aff46499]
Ubuntu 12.04 LTS 上で以下の作業を行います。~
~
[[bc10-router/arago-project(danny)/Ubuntu12.04LTS]] で作...
ubiファイルを NAND Boot 可能なように ubi ファイルの設定...
~
ubi ファイルを再作成する理由は [[bc10-router/arago-projec...
ubi ファイルに一部 ubi dataではないものがあり NAND Boot ...
~
再作成のため mtd-utils を導入します。 ~
$ sudo apt-get install mtd-utils
arago-console-image の ubi ファイルを rootfs.ubi に変更し...
$ cd /home/beat/tisdk/build/arago-tmp-external-linaro-to...
$ cp arago-console-image-beagleboard-20140131034334.root...
ubi ファイル作成のため以下のように ubinize.cfg を変更し u...
SD カードの Ext3 の領域(本稿では /media/EXT3 と記載)にコ...
$ diff -upN __ubinize.cfg_orig ubinize.cfg
--- __ubinize.cfg_orig 2014-02-06 14:52:27.473188696 +0...
+++ ubinize.cfg 2014-02-06 14:52:48.297189782 +0900
@@ -3,5 +3,5 @@ mode=ubi
image=/home/beat/tisdk/build/arago-tmp-external-linaro-...
vol_id=0
vol_type=dynamic
-vol_name=beagleboard-rootfs
+vol_name=rootfs
vol_flags=autoresize
$ sudo ubinize -v -o rootfs.ubi -m 2048 -p 128KiB -s 512...
$ sudo cp rootfs.ubi /media/EXT3/.
** bc10 arago-console-image part [#za554dce]
rootfs.ubi をコピーした SD で bc10 を起動します。~
その際 NAND のパーティションを確認し、そのサイズに合わせ...
uImage、rootfs.ubi を NAND に書き込みます。 ~
NAND パーティションの確認
# cat /proc/mtd
dev: size erasesize name
mtd0: 00080000 00020000 "X-Loader"
mtd1: 001e0000 00020000 "U-Boot"
mtd2: 00020000 00020000 "U-Boot Env"
mtd3: 00400000 00020000 "Kernel"
mtd4: 1f980000 00020000 "File System"
uImage の書き込み
# cd /boot/
root@beagleboard:/boot# ls
uImage uImage-3.3.7
root@beagleboard:/boot# flash_erase /dev/mtd3 0 0
Erasing 128 Kibyte @ 3e0000 -- 100 % complete
# nandwrite -p /dev/mtd3 uImage
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
...<snip>
Writing data to block 26 at offset 0x340000
rootfs.ubi の書き込み
# ubiformat -y /dev/mtd4 -f rootfs.ubi
ubiformat: mtd4 (nand), size 530055168 bytes (505.5 MiB)...
libscan: scanning eraseblock 4043 -- 100 % complete
ubiformat: 4039 eraseblocks are supposedly empty
ubiformat: 5 bad eraseblocks found, numbers: 89, 107, 73...
ubiformat: flashing eraseblock 321 -- 100 % complete
ubiformat: formatting eraseblock 4043 -- 100 % complete
完了後 bc10 を再起動し u-boot のプロンプトを起動します。~
** bc10 u-boot part [#b0de5176]
u-boot プロンプト上で MLO、u-boot.img を NAND に書き込み...
MLO の書き込み
OMAP3 beagleboard.org # mmc rescan 0
OMAP3 beagleboard.org # fatload mmc 0 ${loadaddr} MLO
reading MLO
44580 bytes read
OMAP3 beagleboard.org # nandecc hw
HW ECC selected
OMAP3 beagleboard.org # nand erase 0 80000
NAND erase: device 0 offset 0x0, size 0x80000
Erasing at 0x60000 -- 100% complete.
OK
OMAP3 beagleboard.org # nand write ${loadaddr} 0 ${files...
NAND write: device 0 offset 0x0, size 0xae24
44580 bytes written: OK
OMAP3 beagleboard.org # nand write ${loadaddr} 20000 ${f...
NAND write: device 0 offset 0x20000, size 0xae24
44580 bytes written: OK
OMAP3 beagleboard.org # nand write ${loadaddr} 40000 ${f...
NAND write: device 0 offset 0x40000, size 0xae24
44580 bytes written: OK
OMAP3 beagleboard.org # nand write ${loadaddr} 60000 ${f...
NAND write: device 0 offset 0x60000, size 0xae24
44580 bytes written: OK
u-boot.img の書き込み
OMAP3 beagleboard.org # mmc rescan 0
OMAP3 beagleboard.org # fatload mmc 0 ${loadaddr} u-boot...
reading u-boot.img
336184 bytes read
OMAP3 beagleboard.org # nandecc hw
HW ECC selected
OMAP3 beagleboard.org # nand erase 80000 1c0000
NAND erase: device 0 offset 0x80000, size 0x1c0000
Erasing at 0x220000 -- 100% complete.
OK
OMAP3 beagleboard.org # nand write ${loadaddr} 80000 ${f...
NAND write: device 0 offset 0x80000, size 0x52138
336184 bytes written: OK
OMAP3 beagleboard.org #
以上で NAND Bootの書き込みは完了です。 ~
~
一度電源を落として SD カードを抜き、再度 bc10 を起動しま...
bc10 が SD カード無し(NAND Boot)できることを確認します。 ~
~
注:まれに正しく書き込めている状態でも、Boot時に以下のメッ...
uncorrectable error :
その際は再起動もしくは電源の入れなおしをおこなってくださ...
*** NAND への書き込みを失敗時と SD Boot への戻し方 [#k3dc...
仮に NAND への書き込みに失敗した場合とSD Boot への戻し方...
bc10 を再起動後 u-boot プロンプトを起動し、~
以下のコマンドを実行し NAND の全データを消去します。 ~
# nand erase.chip
削除後電源を落とし再度電源を入れた際、以下の表示で止まれ...
削除は成功です。~
40w
* bc10 NAND Boot Log [#ccdfeb6e]
bc10 NAND Boot 時の Log の一部を以下に記載します。~
U-Boot SPL 2012.04.01 (Jan 28 2014 - 19:49:35)
...<snip>...
Booting from nand ...
NAND read: device 0 offset 0x280000, size 0x400000
4194304 bytes read: OK
## Booting kernel from Legacy Image at 80007fc0 ...
Image Name: Linux-3.3.7
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3413048 Bytes = 3.3 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
XIP Kernel Image ... OK
OK
Starting kernel ...
...<snip>...
[ 0.944183] NAND device: Manufacturer ID: 0x2c, Chip ...
[ 0.954223] Creating 5 MTD partitions on "omap2-nand....
[ 0.959808] 0x000000000000-0x000000080000 : "X-Loader"
[ 0.966796] 0x000000080000-0x000000260000 : "U-Boot"
[ 0.974029] 0x000000260000-0x000000280000 : "U-Boot E...
[ 0.980926] 0x000000280000-0x000000680000 : "Kernel"
[ 0.989013] 0x000000680000-0x000020000000 : "File Sys...
[ 1.199310] UBI: attaching mtd4 to ubi0
[ 1.203338] UBI: physical eraseblock size: 131072 b...
[ 1.209960] UBI: logical eraseblock size: 129024 b...
[ 1.215667] UBI: smallest flash I/O unit: 2048
[ 1.220642] UBI: sub-page size: 512
[ 1.225494] UBI: VID header offset: 512 (ali...
[ 1.231628] UBI: data offset: 2048
[ 2.183929] UBI: max. sequence number: 10
[ 2.202484] UBI: attached mtd4 to ubi0
[ 2.206512] UBI: MTD device name: "File Sy...
[ 2.212310] UBI: MTD device size: 505 MiB
[ 2.217529] UBI: number of good PEBs: 4039
[ 2.222473] UBI: number of bad PEBs: 5
[ 2.227142] UBI: number of corrupted PEBs: 0
[ 2.231842] UBI: max. allowed volumes: 128
[ 2.236694] UBI: wear-leveling threshold: 4096
[ 2.241638] UBI: number of internal volumes: 1
[ 2.246337] UBI: number of user volumes: 1
[ 2.251007] UBI: available PEBs: 0
[ 2.255676] UBI: total number of reserved PEBs: 4039
[ 2.260925] UBI: number of PEBs reserved for bad PEB ...
[ 2.267333] UBI: max/mean erase counter: 1/0
[ 2.271820] UBI: image sequence number: 86612789
[ 2.277465] usbcore: registered new interface driver ...
...<snip>...
[ 5.085510] drivers/rtc/hctosys.c: unable to open rtc...
[ 5.126647] UBIFS: recovery needed
[ 5.227508] UBIFS: recovery completed
[ 5.231384] UBIFS: mounted UBI device 0, volume 0, na...
[ 5.237731] UBIFS: file system size: 256112640 byte...
[ 5.246185] UBIFS: journal size: 9033728 bytes ...
[ 5.253875] UBIFS: media format: w4/r0 (latest ...
[ 5.260040] UBIFS: default compressor: lzo
[ 5.264343] UBIFS: reserved for root: 0 bytes (0 KiB)
[ 5.270599] VFS: Mounted root (ubifs filesystem) on d...
[ 5.277740] devtmpfs: mounted
[ 5.281372] Freeing init memory: 216K
INIT: version 2.88 booting
...<snip>...
Stopping Bootlog daemon: bootlogd.
_____ _____ _ _
| _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_
| | _| .'| . | . | | __| _| . | | | -_| _| _|
|__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_|
|___| |___|
Arago Project http://arago-project.org beagleboard ttyO2
Arago 2013.06 beagleboard ttyO2
beagleboard login:
* 更新履歴 [#s2c9f05c]
2014/02/06 初稿公開 ~
RIGHT:syariten
ページ名:
BC::labsへの質問は、bc9-dev @ googlegroups.com までお願い致します。