怪奇!首なしビーグル犬:U-Bootアップグレード

  • 投稿日:
  • by
  • カテゴリ:

2年ぶりのBeagleBoardです。

ネットワークで遊ぼうというわけで、BeagleBoardを引っ張り出してきました。

 

 

久しぶりに↓↓↓辺りを眺めまして。

ARM-OMAP - Ubuntu Wiki

New with Natty Narwhal (11.04) is the release of headless images that can be configured and controlled via serial console. No keybord, mouse, or monitor is needed for these images to run.

シリアルコンソールのみにコンフィグされたイメージが提供されるなんてステキ。非力なボードでUSBのキーボードやマウスは要らんですよ。

 

なんとこれ、Rev.Bなので、要件を満たしているかチェキラ。

BeagleBoardUbuntu - eLinux.org

Required Beagle Software

Angstrom's X-loader/MLO & U-Boot

  • All Bx, C2/3/4 Boards are required to upgrade to atleast these MLO and U-Boot versions.
  • XM Boards have no NAND, so u-boot.bin is always required on the first partition
  • Directions: Upgrade X-loader and U-Boot

 

U-Bootのバージョンを上げないとだめだということで。

指示通りやってみたんですがね。

BeagleBoardUbuntu - eLinux.org

1: Place MMC card in Beagle

2: Push/Hold User Button Down

3: Apply Power

4: After U-boot loads, Let Off User Button

5: Wait for Flashing to end

6: Power down, remove/edit boot.scr from MMC card

どうにもおかしい感じ。

 

Texas Instruments X-Loader 1.5.0 (Jun 24 2011 - 01:31:59)
Beagle Rev Ax/Bx
Reading boot sector
Loading u-boot.bin from mmc


U-Boot 2010.03-dirty (Mar 11 2011 - 08:40:41)

OMAP3530-GP ES3.0, CPU-OPP2, L3-165MHz, Max clock-600Mhz
OMAP3 Beagle board + LPDDR/NAND
I2C:   ready
DRAM:  128 MB
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial

Probing for expansion boards, if none are connected you'll see a harmless I2C error.

timed out in wait_for_bb: I2C_STAT=1000
timed out in wait_for_pin: I2C_STAT=0
I2C read: I/O error
Unrecognized expansion board: 0
Beagle Rev Ax/Bx
Die ID #5c3600030000000004013f7903019017
Hit any key to stop autoboot:  3  2  1  0
Unknown command 'mmcinit' - try 'help'

** Unable to use mmc 0:1 for fatload **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
OMAP3 beagleboard.org #

手元の環境が古すぎてあかんのとちゃうか、という推測からMANUALでカキカキ。

手元:

Texas Instruments X-Loader 1.41
Starting OS Bootloader...


U-Boot 1.3.3 (Jul 10 2008 - 16:33:09)

 

 

8ビットPCで遊んでたころは、よくアドレス指定で、

メモリ←→フロッピー間

の読み書きしてたよなぁ。アドレス間違えて涙目とかね。いまどきはアドレスの桁が長いなぁ。と感慨にふけりつつ。

なんとなく新しいU-BootがNANDに書けた気がしたので、あらためてスクリプトでアップグレードを試みました。

# 自分のMANUAL操作を信用しない

 

Running bootscript from mmc ...
## Executing script at 80200000
Starting NAND UPGRADE, do not REMOVE SD CARD or POWER till Complete
reading MLO

23852 bytes read
HW ECC selected

NAND erase: device 0 offset 0x0, size 0x80000
Erasing at 0x0 --  25% complete.Erasing at 0x20000 --  50% complete.Erasing at 0x40000 --  75% complete.Erasing at 0x60000 -- 100% complete.
OK

NAND write: device 0 offset 0x0, size 0x20000
131072 bytes written: OK

NAND write: device 0 offset 0x20000, size 0x20000
131072 bytes written: OK

NAND write: device 0 offset 0x40000, size 0x20000
131072 bytes written: OK

NAND write: device 0 offset 0x60000, size 0x20000
131072 bytes written: OK
reading u-boot.bin

209988 bytes read
SW ECC selected

NAND erase: device 0 offset 0x80000, size 0x160000
Erasing at 0x80000 --   9% complete.Erasing at 0xa0000 --  18% complete.Erasing at 0xc0000 --  27% complete.Erasing at 0xe0000 --  36% complete.Erasing at 0x100000 --  45% complete.Erasing at 0x120000 --  54% complete.Erasing at 0x140000 --  63% complete.Erasing at 0x160000 --  72% complete.Erasing at 0x180000 --  81% complete.Erasing at 0x1a0000 --  90% complete.Erasing at 0x1c0000 -- 100% complete.
OK

NAND write: device 0 offset 0x80000, size 0x160000
1441792 bytes written: OK

NAND erase: device 0 offset 0x260000, size 0x20000
Erasing at 0x260000 -- 100% complete.
OK
FLASH UPGRADE Complete
OMAP3 beagleboard.org # reset
resetting ...

 

今度はうまくいきました。mmcinitがないわけですな。よくわからないですがSDからブートしててもコマンドはNAND上のを読みに行っちゃうんですね。

 

というわけでまとめ:

U-Boot1.3.3からU-Boot 2010.03-dirtyへのアップグレードは、

MANUALでやるかmmcinit←→mmc initを雰囲気で書き換えてスクリプトを叩くと良いかも

# BeagleBoardの機嫌が悪かっただけかもしれませんが

 

 

 

【送料無料】基礎から学ぶ組み込みAndroid

【送料無料】基礎から学ぶ組み込みAndroid
価格:4,410円(税込、送料別)

 

→この本はBeagleBoard xM対応