玄芝のカーネルを2.6.35にアップグレード(4)

この記事は2年以上前に書いたものです。
そのため情報が古い可能性があります。ご了承ください。m(_ _)m

玄芝のカーネルを2.6.35にアップグレード(3)の続き

4. NANDに反映

TFTPD + NFSブートで、ちゃんと起動するであることが分かったので、
本体のNANDに反映する。
(カーネルの更新 (SheevaPlug / 玄柴(KURO-SHEEVA)をハックしよう) を参考)
玄芝本体(rootfsはNFSサーバにあるもの)で作業。

# mount -t jffs2 /dev/mtdblock1 /mnt
# cp -pr /lib/modules/2.6.35 /mnt/lib/modules/
# umount /mnt

あ、uImageが玄芝本体に無い。
NFSサーバにあるuImageを、rootfs_customへコピー。

$ sudo cp /var/lib/tftpboot/uImage ~/KuroSheeva/rootfs_custom/

また戻って、玄芝本体(rootfsはNFSサーバにあるもの)で作業。
uImageをいったん消去した後、書き込み。

root@debian:/# ls -l uImage
-rw-r--r-- 1 root root 2844560 2010-08-08 13:51 uImage
root@debian:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00400000 00020000 "uImage"
mtd1: 1fb00000 00020000 "rootfs"
root@debian:/# flash_eraseall /dev/mtd0
Erasing 128 Kibyte @ 3e0000 -- 96 % complete.
root@debian:/# nandwrite -p /dev/mtd0 uImage
Writing data to block 0
Writing data to block 20000
Writing data to block 40000
Writing data to block 60000
Writing data to block 80000
Writing data to block a0000
Writing data to block c0000
Writing data to block e0000
Writing data to block 100000
Writing data to block 120000
Writing data to block 140000
Writing data to block 160000
Writing data to block 180000
Writing data to block 1a0000
Writing data to block 1c0000
Writing data to block 1e0000
Writing data to block 200000
Writing data to block 220000
Writing data to block 240000
Writing data to block 260000
Writing data to block 280000
Writing data to block 2a0000

再起動。

root@debian:/# reboot
root@debian:/#
Broadcast message from root@debian
        (/dev/tt * Stopping Samba daemons                                [ OK ]
 * Saving the system clock
Stopping unfs3: unfs3.
 * Asking all remaining processes to terminate...                        [ OK ]
 * All processes ended within 2 seconds....                              [ OK ]
 * Stopping portmap daemon...                                            [ OK ]
 * not deconfiguring network interfaces: network file systems still mounted.
 * Unmounting temporary filesystems...                                   [ OK ]
 * Deactivating swap...                                                  [ OK ]
 * Unmounting local filesystems...                                       [ OK ]
 * Stopping remaining crypto disks...                                    [ OK ]
 * Stopping early crypto disks...                                        [ OK ]
 * Will now restart
Restarting system.

         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
 \___/    |____/ \___/ \___/ \__|
 ** MARVELL BOARD: SHEEVA PLUG LE

U-Boot 1.1.4 (Sep  7 2009 - 20:21:09) Marvell version: 3.4.16

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CEE60

Soc: 88F6281 A0 (DDR2)
CPU running @ 1200Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz

DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 256MB
DRAM CS[1] base 0x10000000   size 256MB
DRAM Total size 512MB  16bit width
Flash:  0 kB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:512 MB

CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  0

NAND read: device 0 offset 0x100000, size 0x400000

Reading data from 0x4ff800 -- 100% complete.
 4194304 bytes read: OK
## Booting image at 00800000 ...
   Image Name:   Linux-2.6.35
   Created:      2010-08-06  18:48:15 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2844496 Bytes =  2.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 2.6.35 (user@kurosheeva-dev) (gcc version 4.2.1) #4 PREEMPT Sat Aug 7 03:48:11 JST 2010
CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Marvell eSATA SheevaPlug Reference Board
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
Kernel command line: rootfstype=jffs2 console=ttyS0,115200 mtdparts=orion_nand:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) rw root=/dev/mtdblock1 rw ip=10.4.50.4:10.4.50.5:10.4.50.5:255.255.255.0:DB88FXX81:eth0:none
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 256MB 256MB = 512MB total
Memory: 513356k/513356k available, 10932k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
    vmalloc : 0xe0800000 - 0xfe800000   ( 480 MB)
    lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .init : 0xc0008000 - 0xc002d000   ( 148 kB)
      .text : 0xc002d000 - 0xc0525000   (5088 kB)
      .data : 0xc0570000 - 0xc05a0040   ( 193 kB)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
        RCU-based detection of stalled CPUs is disabled.
        Verbose stalled-CPUs detection is disabled.
NR_IRQS:114
Console: colour dummy device 80x30
Calibrating delay loop... 1192.75 BogoMIPS (lpj=5963776)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
Kirkwood: MV88F6281-A0, TCLK=200000000.
Feroceon L2: Enabling L2
Feroceon L2: Cache support initialised.
bio: create slab <bio-0> at 0
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
cfg80211: Calling CRDA to update world regulatory domain
Switching to clocksource orion_clocksource
NET: Registered protocol family 2
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
TCP established hash table entries: 16384 (order: 5, 131072 bytes)
TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
JFFS2 version 2.2. (NAND) ツゥ 2001-2006 Red Hat, Inc.
JFS: nTxBlock = 4010, nTxLock = 32084
msgmni has been set to 1002
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
console [ttyS0] enabled
brd: module loaded
loop: module loaded
sata_mv sata_mv.0: version 1.28
sata_mv sata_mv.0: slots 32 ports 2
scsi0 : sata_mv
scsi1 : sata_mv
ata1: SATA max UDMA/133 irq 21
ata2: SATA max UDMA/133 irq 21
NAND device: Manufacturer ID: 0xec, Chip ID: 0xdc (Samsung NAND 512MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 1235 at 0x000009a60000
2 cmdlinepart partitions found on MTD device orion_nand
Creating 2 MTD partitions on "orion_nand":
0x000000100000-0x000000500000 : "uImage"
0x000000500000-0x000020000000 : "rootfs"
MV-643xx 10/100/1000 ethernet driver version 1.4
mv643xx_eth smi: probed
net eth0: port 0 with MAC address 00:50:43:01:44:67
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
orion-ehci orion-ehci.0: Marvell Orion EHCI
orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000
orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver ums-datafab
usbcore: registered new interface driver ums-freecom
usbcore: registered new interface driver ums-jumpshot
usbcore: registered new interface driver ums-sddr09
usbcore: registered new interface driver ums-sddr55
mice: PS/2 mouse device common for all mice
rtc-mv rtc-mv: rtc core: registered rtc-mv as rtc0
i2c /dev entries driver
cpuidle: using governor ladder
cpuidle: using governor menu
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
mmc0: mvsdio driver initialized, using GPIO 47 for card detection
mv_xor_shared mv_xor_shared.0: Marvell shared XOR driver
mv_xor_shared mv_xor_shared.1: Marvell shared XOR driver
mv_xor mv_xor.0: Marvell XOR: ( xor cpy )
mv_xor mv_xor.1: Marvell XOR: ( xor fill cpy )
mv_xor mv_xor.2: Marvell XOR: ( xor cpy )
ata1: SATA link down (SStatus 0 SControl F300)
mv_xor mv_xor.3: Marvell XOR: ( xor fill cpy )
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
oprofile: hardware counters not available
oprofile: using timer interrupt.
TCP cubic registered
NET: Registered protocol family 17
lib80211: common routines for IEEE802.11 drivers
rtc-mv rtc-mv: setting system clock to 2010-08-08 13:56:08 UTC (1281275768)
IP-Config: Complete:
     device=eth0, addr=10.4.50.4, mask=255.255.255.0, gw=10.4.50.5,
     host=DB88FXX81, domain=, nis-domain=(none),
     bootserver=10.4.50.5, rootserver=10.4.50.5, rootpath=
eth0: link up, 1000 Mb/s, full duplex, flow control disabled
ata2: link is slow to respond, please be patient (ready=0)
ata2: SRST failed (errno=-16)
ata2: link is slow to respond, please be patient (ready=0)
ata2: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
ata2.00: ATA-8: Hitachi HDS722020ALA330, JKAOA3EA, max UDMA/133
ata2.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata2.00: configured for UDMA/133
scsi 1:0:0:0: Direct-Access     ATA      Hitachi HDS72202 JKAO PQ: 0 ANSI: 5
sd 1:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
sd 1:0:0:0: Attached scsi generic sg0 type 0
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sda: sda1
sd 1:0:0:0: [sda] Attached SCSI disk
VFS: Mounted root (jffs2 filesystem) on device 31:1.
Freeing init memory: 148K
 * Filesystem type 'fusectl' is not supported. Skipping mount.
 * Setting preliminary keymap...                                         [ OK ]
 * Starting kernel event manager...                                      [ OK ]
 * Loading hardware drivers...                                           [ OK ]
 * Loading kernel modules...                                                     * Loading manual drivers...                                                       [ OK ]
 * Setting kernel variables (/etc/sysctl.conf)...                        [ OK ]
 * Setting kernel variables (/etc/sysctl.d/10-console-messages.conf)...  [ OK ]
 * Setting kernel variables (/etc/sysctl.d/10-network-security.conf)...  [ OK ]
 * Activating swap...                                                    [ OK ]
 * Starting early crypto disks...                                        [ OK ]
 * Starting remaining crypto disks...                                    [ OK ]
 * Checking file systems...                                                     fsck 1.41.4 (27-Jan-2009)
                                                                         [ OK ]
 * Mounting local filesystems...                                         [fail]
 * Activating swapfile swap...                                           [ OK ]
 * Configuring network interfaces...                                     [ OK ]
 * Starting portmap daemon...                                            [ OK ]
 * Starting NFS common utilities                                         [ OK ]
 * Setting up console font and keymap...                                 [ OK ]
 * Starting system log daemon...
Ubuntu 9.04 debian ttyS0

debian login:                                                            [ OK ]
                                                                                * Starting kernel log daemon...                                                    [ OK ]
                                                                                * Starting OpenBSD Secure Shell server sshd                                        [ OK ]
                                                                                * Starting NFS common utilities                                                    [ OK ]
                                                                               Starting unfs3: unfs3.
            * Starting periodic command scheduler crond                  [ OK ]
Ubuntu 9.04 debian ttyS0

debian login:

成功!!

# あまり関係ないけど、 10.04 LTSにアップグレードを試みたところlibc6の更新で失敗する。

カテゴリー: KURO-SHEEVA, 未分類 タグ: , , パーマリンク

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です