概要 †2011/07/18 シリアル接続設定を追加 ブートシーケンス †2010/06/29
BootROM code †2010/06/29
ブートローダを探索するデバイスの順序は、omap3530のピン設定で変更可能になっています。 ブートローダ探索順序 †起動時にBootROMがブートローダを探索するデバイスの順序について、bc10はBeagleBoardと同様の設定になっており、以下の2パターンを選択することができます。
探索先のデバイスでブートローダが見つからなかった場合は、スキップして次のデバイスを探索します。 X-Loader †2010/06/29
X-Loaderをソースコードからビルドする方法はbc10/x-loaderを参照してください。 U-Boot †2010/06/29 Linux kernel †2010/12/24 起動用SDカードの作成 †2010/12/24
作業環境はLinuxを想定しています。
以下の説明は主にLinuxBootDiskFormat(code.google.com)から引用してアレンジしたものです。 SDカードのアンマウント †このあとパーティション操作やフォーマット作業をおこなうために、SDカードがマウントされている場合には、まずアンマウントをおこないます。 $ [df -h] Filesystem Size Used Avail Use% Mounted on ... /dev/sdc1 400M 94M 307M 24% /media/disk ... アンマウントをおこないます。 $ [umount /media/disk] パーティションの初期化・設定 †fdiskコマンドを実行します。 $ [sudo fdisk /dev/sdc] Command (m for help): [p] Disk /dev/sdc: 2021 MB, 2021654528 bytes 255 heads, 63 sectors/track, 245 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdc1 * 1 246 1974240+ c W95 FAT32 (LBA) Partition 1 has different physical/logical endings: phys=(244, 254, 63) logical=(245, 200, 19) パーティションを全て削除します。 Command (m for help): [d] Selected partition 1 エキスパートモードにモード変更します。 Command (m for help): [x] ヘッダ数を255に設定します。 Expert Command (m for help): [h] Number of heads (1-256, default xxx): [255] セクタ数を63に設定します。 Expert Command (m for help): [s] Number of sectors (1-63, default xxx): [63] シリンダ数の設定は使用するSDカードごとに異なります。 以下の計算式でシリンダ数を計算します。(小数点以下切り捨て) #シリンダ数 = 小数点以下切り捨て (SDカードのバイト数 / 255 / 63 / 512 ) 今回の例で使用しているSDカードでは以下のようになります。 2021654528 / 255 / 63 / 512 = 245.79 -> 245 シリンダ数を設定します。今回の例では245になります。 Expert Command (m for help): [c] Number of cylinders (1-256, default xxx): [上式で求めた値] ノーマルモードにモード変更します。 Expert Command (m for help): [r] FAT32パーティションを作成します。 Command (m for help): [n] Command action e extended p primary partition (1-4) [p] Partition number (1-4): [1] First cylinder (1-245, default 1): [(press Enter)] Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-245, default 245): [+50] Command (m for help): [t] Selected partition 1 Hex code (type L to list codes): [c] Changed system type of partition 1 to c (W95 FAT32 (LBA)) ブートフラグを設定します。 Command (m for help): [a] Partition number (1-4): [1] Linuxのファイルシステム用パーティションを作成します。 Command (m for help): [n] Command action e extended p primary partition (1-4) [p] Partition number (1-4): [2] First cylinder (52-245, default 52): [(press Enter)] Using default value 52 Last cylinder or +size or +sizeM or +sizeK (52-245, default 245): [(press Enter)] Using default value 245 パーティション設定を確認します。 Command (m for help): [p] Disk /dev/sdc: 2021 MB, 2021654528 bytes 255 heads, 63 sectors/track, 245 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdc1 * 1 51 409626 c W95 FAT32 (LBA) /dev/sdc2 52 245 1558305 83 Linux パーティションテーブルの変更を保存します。 Command (m for help): [w] The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error 16: Device or resource busy. The kernel still uses the old table. The new table will be used at the next reboot. WARNING: If you have created or modified any DOS 6.x partitions, please see the fdisk manual page for additional information. Syncing disks. ファイルシステムのフォーマット †FAT32パーティションとLinuxパーティションをそれぞれフォーマットします。 $ [sudo mkfs.msdos -F 32 /dev/sdc1 -n LABEL1] mkfs.msdos 2.11 (12 Mar 2005) $ [sudo mkfs.ext3 -L LABEL2 /dev/sdc2] mke2fs 1.40-WIP (14-Nov-2006) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 195072 inodes, 389576 blocks 19478 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=402653184 12 block groups 32768 blocks per group, 32768 fragments per group 16256 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912 Writing inode tables: done Creating journal (8192 blocks): done Writing superblocks and filesystem accounting information: ファイルの配置 †ブートローダのイメージファイルをSDカードに配置します。
$ [cp x-load.bin.ift /media/LABEL1/MLO] 続いて、2段目のブートローダであるU-Bootを配置します。
$ [cp u-boot.bin /media/LABEL1/u-boot.bin] Linux kernelを配置します。
$ [cp uImage /media/LABEL1/uImage] 配置する順序を間違えたり、手順に失敗したりした場合には、FAT32パーティションのフォーマットからやり直すのが確実です。 SDカードからの起動 †2010/06/29 シリアル接続設定 †bc10のシリアル接続の設定は以下のように設定してください。 ボー・レート 115200 データ 8bit パリティ none ストップ 1bit フロー制御 none |