bc10-router/arago-project(danny)/NAND boot
[
Front page
] [
New
|
List of pages
|
Search
|
Recent changes
]
Start:
[[bc10]]~
[[bc10-router]] ~
#contents
* bc10-router/arago-project(danny)/NAND boot [#d90c50be]
>
This article explains how to boot arago-console-image fro...
~
There are roughly three steps to crate and to configure t...
~
The different steps for creating and configuring processe...
- Ubuntu 12.04 LTS
- bc10 arago-console image
- bc10 u-boot
** Ubuntu 12.04 LTS part [#b5b15667]
>
The processes shown below are done on Ubuntu 12.04LTS.~
~
The ubi file should be configured and recreated for booti...
~
The reason why recreating the ubi file is that the origin...
~
To recreating the uni file, mtd-utils is added.~
$ sudo apt-get install mtd-utils
The ubi file of arago-console-image is renamed to rootfs....
$ cd /home/beat/tisdk/build/arago-tmp-external-linaro-to...
$ cp arago-console-image-beagleboard-20140131034334.root...
To recreate the ubi file, ubinize.cfg is modified as show...
$ 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 [#n02194e8]
>
Boot bc10 with the SD card, which rootfs.ubi has already ...
Checking NAND Partition
# 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"
Copying 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
Copying 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
After this process is completed, bc10 is rebooted and th...
** bc10 u-boot part [#ecd306bf]
>
To use the prompts of u-boot, write down MLO and uboot.im...
Copying 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
Copying 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 #
This is the end of writing down NAND Boot to bc10.~
~
Turn off bc10 and to remove the SD card, then, restart bc...
Make sure that bc10 can be booted without the SD card, wh...
~
Caution: If the file is copied to NAND correctly, the err...
uncorrectable error :
When the error message shows up, restart bc10. Or, turn o...
*** Failure of writing down to NAND and How to turn back ...
>
If you fail to write down to NAND or if you wish to turn ...
# nand erase.chip
To check whether the data in NAND is successfully removed...
40w
* bc10 NAND Boot Log [#h06e9e11]
>
These is a part of log, which is created when bc10 is boo...
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:
* Revision History [#q253018b]
>
- 2014/02/17 This article is initially published
End:
[[bc10]]~
[[bc10-router]] ~
#contents
* bc10-router/arago-project(danny)/NAND boot [#d90c50be]
>
This article explains how to boot arago-console-image fro...
~
There are roughly three steps to crate and to configure t...
~
The different steps for creating and configuring processe...
- Ubuntu 12.04 LTS
- bc10 arago-console image
- bc10 u-boot
** Ubuntu 12.04 LTS part [#b5b15667]
>
The processes shown below are done on Ubuntu 12.04LTS.~
~
The ubi file should be configured and recreated for booti...
~
The reason why recreating the ubi file is that the origin...
~
To recreating the uni file, mtd-utils is added.~
$ sudo apt-get install mtd-utils
The ubi file of arago-console-image is renamed to rootfs....
$ cd /home/beat/tisdk/build/arago-tmp-external-linaro-to...
$ cp arago-console-image-beagleboard-20140131034334.root...
To recreate the ubi file, ubinize.cfg is modified as show...
$ 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 [#n02194e8]
>
Boot bc10 with the SD card, which rootfs.ubi has already ...
Checking NAND Partition
# 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"
Copying 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
Copying 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
After this process is completed, bc10 is rebooted and th...
** bc10 u-boot part [#ecd306bf]
>
To use the prompts of u-boot, write down MLO and uboot.im...
Copying 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
Copying 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 #
This is the end of writing down NAND Boot to bc10.~
~
Turn off bc10 and to remove the SD card, then, restart bc...
Make sure that bc10 can be booted without the SD card, wh...
~
Caution: If the file is copied to NAND correctly, the err...
uncorrectable error :
When the error message shows up, restart bc10. Or, turn o...
*** Failure of writing down to NAND and How to turn back ...
>
If you fail to write down to NAND or if you wish to turn ...
# nand erase.chip
To check whether the data in NAND is successfully removed...
40w
* bc10 NAND Boot Log [#h06e9e11]
>
These is a part of log, which is created when bc10 is boo...
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:
* Revision History [#q253018b]
>
- 2014/02/17 This article is initially published
Page: