トップ «前の日記(2007-06-29) 最新 次の日記(2007-07-01)» 編集

Pyon's Diary

[はてなブックマーク登録数] [Google に登録] [RSS フィード] Gourmet Hardware Programming Society Software
Amazon
成る可くJIS X 0213:2004對應MSフォント(5.0)、IPAフォント(003.01)で御覽下さい

2007-06-30 舊 平成拾玖年皐月拾陸日 (土・曇) [長年日記]

[節] KURO-BOX/PRO (No.22) 外附 USB に書込みが出來た。

以前 2.5 吋の HDD を USB 經由で外付けした際、書込みが出來無かつた事が有つた。

原因が良く判ら無つたので、其乃手の事に詳しい職場の同僚(し○めさん)に相談してみると「外附の筐體が惡いのでは?」と助言して呉れたので、彼の持つてゐる外附 USB の筐體(型番不明)を借りて來た。

結果として「出來た」。

  • パーティション作成。
  • EXT3 / XFS でパーティションを初期化。
  • 母艦に繋ぎ變へて hddrootfs.tar.gz を複寫。
  • KURO-BOX/PRO に繋ぎ變へて hddrootfs.tar.gz を解凍・展開。

全てすんなりと出來た。

と云ふ事は自分の所有している CENTURY CAC25U2 は理由は良く判ら無いけど KURO-BOX/PRO とは合性が惡いのか。

Flash 起動環境で外附 UDB HDD での開發環境を構築する。

一度 fdisk で舊いパーティションを全て削除する。

# fdisk /dev/sdb

The number of cylinders for this disk is set to 19077.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sdb: 20.0 GB, 20003880960 bytes
64 heads, 32 sectors/track, 19077 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sdb1               1          49       50160   83  Linux
/dev/sdb2              50        2911     2930688   83  Linux
/dev/sdb3            2912        3034      125952   82  Linux swap
/dev/sdb4            3035       19077    16428032   83  Linux

Command (m for help): d
Partition number (1-4): 1

Command (m for help): d
Partition number (1-4): 2

Command (m for help): d
Partition number (1-4): 3

Command (m for help): d
Selected partition 4

Command (m for help): p

Disk /dev/sdb: 20.0 GB, 20003880960 bytes
64 heads, 32 sectors/track, 19077 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

   Device Boot    Start       End    Blocks   Id  System

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.
Syncing disks.

其れから新しいパーティションを作成する。

# fdisk /dev/sdb < /usr/local/bin/PartitionDefinition

The number of cylinders for this disk is set to 19077.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): Command action
   e   extended
   p   primary partition (1-4)
Partition number (1-4): First cylinder (1-19077, default 1): Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-19077, default 19077):
Command (m for help): Command action
   e   extended
   p   primary partition (1-4)
Partition number (1-4): First cylinder (50-19077, default 50): Using default value 50
Last cylinder or +size or +sizeM or +sizeK (50-19077, default 19077):
Command (m for help): Command action
   e   extended
   p   primary partition (1-4)
Partition number (1-4): First cylinder (2912-19077, default 2912): Using default value 2912
Last cylinder or +size or +sizeM or +sizeK (2912-19077, default 19077):
Command (m for help): Partition number (1-4): Hex code (type L to list codes): Changed system type of partition 3 to 82 (Linux swap)

Command (m for help): Command action
   e   extended
   p   primary partition (1-4)
Selected partition 4
First cylinder (3035-19077, default 3035): Value out of range.
First cylinder (3035-19077, default 3035): Using default value 3035
Last cylinder or +size or +sizeM or +sizeK (3035-19077, default 19077): Using default value 19077

Command (m for help): 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.
Syncing disks.

/dev/sdb1 を EXT3 で、/dev/sdb[24] を XFS で初期化する。

# mkfs.ext3 /dev/sdb1
mke2fs 1.27 (8-Mar-2002)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
12544 inodes, 50160 blocks
2508 blocks (5.00%) reserved for the super user
First data block=1
7 block groups
8192 blocks per group, 8192 fragments per group
1792 inodes per group
Superblock backups stored on blocks:
        8193, 24577, 40961

Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 33 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
# mkfs.xfs /dev/sdb2 -f
meta-data=/dev/sdb2              isize=256    agcount=8, agsize=91584 blks
         =                       sectsz=512
data     =                       bsize=4096   blocks=732672, imaxpct=25
         =                       sunit=0      swidth=0 blks, unwritten=1
naming   =version 2              bsize=4096
log      =internal log           bsize=4096   blocks=2560, version=1
         =                       sectsz=512   sunit=0 blks
realtime =none                   extsz=65536  blocks=0, rtextents=0
# mkfs.xfs /dev/sdb4 -f
meta-data=/dev/sdb4              isize=256    agcount=16, agsize=262144 blks
         =                       sectsz=512
data     =                       bsize=4096   blocks=4107008, imaxpct=25
         =                       sunit=0      swidth=0 blks, unwritten=1
naming   =version 2              bsize=4096
log      =internal log           bsize=4096   blocks=2560, version=1
         =                       sectsz=512   sunit=0 blks
realtime =none                   extsz=65536  blocks=0, rtextents=0

/dev/sdb3 にスワップ領域を作成する。

# mkswap /dev/sdb3                                                            
Setting up swapspace version 1, size = 128970752 bytes

此處で一旦 KURO-BOX/PRO から外して母艦に繋ぎ變へ、

  • ChangeMeDevHDD
  • ChangeMyUbootEnv
  • hddrootfs.tar.gz
  • uImage.buffalo

を /dev/sdb4 に複寫して再度 KURO-BOX/PRO に接續する。

hddrootfs.tar.gz を解凍して /dev/sdb2 に展開する。

# mount /dev/sdb2 /mnt/usbdisk1/
XFS mounting filesystem sdb2
# mount /dev/sdb4 /mnt/usbdisk2/
XFS mounting filesystem sdb4
# cd /mnt/usbdisk1
# tar zxvf /mnt/usbdisk2/hddrootfs.tar.gz
./bin
./bin/bash
./bin/bash2
./bin/sh
(中略)
./var/lock/subsys
./var/proftpd
./var/www

最後に chroot をして gcc のバージョンが表示出來れば完了。

# chroot /mnt/usbdisk1


BusyBox v1.1.1 (2006.11.29-02:37+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

# gcc -v
Reading specs from /usr/lib/gcc/arm-none-linux-gnueabi/3.4.4/specs
Configured with: ../gcc-2005q3/configure --host=arm-none-linux-gnueabi --target=arm-none-linux-gnueabi --build=i386-pc-linux-gnu --enable-languages=c,c++ --prefix=/usr
Thread model: posix
gcc version 3.4.4 (release) (CodeSourcery ARM 2005q3-2)

此で外附 USB HDD で開發環境が動く事が確認出來た。

Tags: Hardware | del.icio.usに追加 | はてなブックマークに追加 | livedoor クリップに追加 | Yahoo! ブックマークに追加 | Google ブックマークに追加 | Permalink

[節] BRUSSELS (神樂坂)

ち○し○が宝塚へ觀劇に行つたので、夜一緒に神樂坂の BRUSSELS に行つた。行つたらカウンターが常連に占領されてゐた。

「蝦の夏野菜のフリット」を食べて歸つて來た。

Tags: Gourmet | del.icio.usに追加 | はてなブックマークに追加 | livedoor クリップに追加 | Yahoo! ブックマークに追加 | Google ブックマークに追加 | Permalink
[]

正當なXHTML1.1です! 正當なCSSです! BlogScouter Pyon's Land (MyMiniCity)
© pyon