MPC8349-mITXへLinux 2.6.26.5をインストールした記録です。
2008年 9月 27(土曜日)
MPC8349E-mITXに Linux 2.6.26.5 をインストール
環境
MPC8349E-mITXに u-boot-2008.10-rc2 をインストール
で生成したpowerpc用のクロスコンパイル環境を利用します。
ソースコード
MPC8349Eで使えそうなlinux kernelはいくつかあるようです。
- オリジナルのkernel.orgのカーネル
- freescaleのカーネル http://opensource.freescale.com/git (最近あまり更新されていない?)
- DENXのカーネル http://git.denx.de/linux-2.6-denx.git/
DENXのカーネルが比較的安定しているらしいのでこれを使うことにします。
以下のようにカーネルのソースを取得します。
これを展開し、コンパイルします。
arch/powerpc/boot/cuImage.mpc8349emitx
がu-bootからbootできるカーネルです。tftpで取得できる場所にコピーします。
u-boot起動後にこのカーネルをロードします。
以下boot時のログです。
まずは、tftpで転送したカーネルを起動できるようになりました。
- host OS: Linux/i386 (Ubuntu Hardy)
- host Kernel: 2.6.24-21
MPC8349E-mITXに u-boot-2008.10-rc2 をインストール
で生成したpowerpc用のクロスコンパイル環境を利用します。
ソースコード
MPC8349Eで使えそうなlinux kernelはいくつかあるようです。
- オリジナルのkernel.orgのカーネル
- freescaleのカーネル http://opensource.freescale.com/git (最近あまり更新されていない?)
- DENXのカーネル http://git.denx.de/linux-2.6-denx.git/
DENXのカーネルが比較的安定しているらしいのでこれを使うことにします。
以下のようにカーネルのソースを取得します。
$ git-clone git://www.denx.de/git/linux-2.6-denx.git linux-2.6-denx
$ cd linux-2.6-denx
$ git-pull (git-cloneした直後であれば不要)
$ git-tag -l |grep DENX
.
.
DENX-v2.6.26.3
DENX-v2.6.26.4
DENX-v2.6.26.5
$ git-archive --format=tar --prefix=linux-2.6.26.5-denx/ DENX-v2.6.26.5 | bzip2 > ../linux-2.6.26.5-denx.tar.bz2
$ cd ..
これを展開し、コンパイルします。
$ tar jxf linux-2.6.26.5-denx.tar.bz2
$ cd linux-2.6.26.5-denx
$ cp arch/powerpc/configs/83xx/mpc834x_itx_defconfig .config
$ make ARCH=powerpc CROSS_COMPILE=/usr/bin/powerpc-linux-gnu- menuconfig
Kernel options>High memory supportを有効にする <--1GB memoryを有効にするため
Device Drivers>DMA Engine support> Freescale MPC85xx/MPC83xx DMA supportを有効にする
Device Drivers>Serial ATA ... > ATA SFF support>Generic platform device PATA supportを無効にする
$ make ARCH=powerpc CROSS_COMPILE=/usr/bin/powerpc-linux-gnu- zImage
.
.
HOSTCC arch/powerpc/boot/dtc-src/srcpos.o
HOSTCC arch/powerpc/boot/dtc-src/treesource.o
HOSTLD arch/powerpc/boot/dtc
WRAP arch/powerpc/boot/uImage
Image Name: Linux-2.6.26.5
Created: Sat Sep 27 17:48:32 2008
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 1579162 Bytes = 1542.15 kB = 1.51 MB
Load Address: 00000000
Entry Point: 00000000
arch/powerpc/boot/dtc -O dtb -o arch/powerpc/boot/mpc8349emitx.dtb -b 0 /home/ono/archives/ppc/linux-2.6.26.5-denx/arch/powerpc/boot/dts/mpc8349emitx.dts
DTC: dts->dtb on file "/home/ono/archives/ppc/linux-2.6.26.5-denx/arch/powerpc/boot/dts/mpc8349emitx.dts"
WRAP arch/powerpc/boot/cuImage.mpc8349emitx
Image Name: Linux-2.6.26.5
Created: Sat Sep 27 17:48:33 2008
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 1602573 Bytes = 1565.01 kB = 1.53 MB
Load Address: 00400000
Entry Point: 0040059c
arch/powerpc/boot/dtc -O dtb -o arch/powerpc/boot/mpc8349emitxgp.dtb -b 0 /home/ono/archives/ppc/linux-2.6.26.5-denx/arch/powerpc/boot/dts/mpc8349emitxgp.dts
DTC: dts->dtb on file "/home/ono/archives/ppc/linux-2.6.26.5-denx/arch/powerpc/boot/dts/mpc8349emitxgp.dts"
WRAP arch/powerpc/boot/cuImage.mpc8349emitxgp
Image Name: Linux-2.6.26.5
Created: Sat Sep 27 17:48:34 2008
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 1602292 Bytes = 1564.74 kB = 1.53 MB
Load Address: 00400000
Entry Point: 0040059c
rm arch/powerpc/boot/mpc8349emitx.dtb arch/powerpc/boot/mpc8349emitxgp.dtb
arch/powerpc/boot/cuImage.mpc8349emitx
がu-bootからbootできるカーネルです。tftpで取得できる場所にコピーします。
u-boot起動後にこのカーネルをロードします。
(IPアドレス等は設定している状態で)
MPC8349E-mITX> tftp 200000 cuImage.mpc8349emitx
Speed: 1000, full duplex
Using TSEC0 device
TFTP from server 192.168.111.2; our IP address is 192.168.111.20
Filename 'cuImage.mpc8349emitx'.
Load address: 0x200000
Loading: #################################################################
#############################################
done
Bytes transferred = 1610159 (1891af hex)
MPC8349E-mITX> setenv bootargs root=/dev/sda1 rw console=ttyS0,115200
MPC8349E-mITX> bootm 200000
以下boot時のログです。
## Booting kernel from Legacy Image at 00200000 ...
Image Name: Linux-2.6.26.5
Created: 2008-09-27 9:35:29 UTC
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 1610095 Bytes = 1.5 MB
Load Address: 00400000
Entry Point: 0040059c
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
WARNING: adjusting available memory to 10000000
Using MPC834x ITX machine description
Linux version 2.6.26.5 (ono@example.org) (gcc version 4.2.4 (Debian 4.2.4-3)) #12 Sat Sep 27 18:35:20 JST 2008
Found MPC83xx PCI host bridge at 0x00000000e0008500. Firmware bus number: 0->0
PCI host bridge /pci@e0008500 (primary) ranges:
MEM 0x0000000080000000..0x000000008fffffff -> 0x0000000080000000 Prefetch
MEM 0x0000000090000000..0x000000009fffffff -> 0x0000000090000000
IO 0x00000000e2000000..0x00000000e2ffffff -> 0x0000000000000000
Found MPC83xx PCI host bridge at 0x00000000e0008600. Firmware bus number: 0->0
PCI host bridge /pci@e0008600 ranges:
MEM 0x00000000a0000000..0x00000000afffffff -> 0x00000000a0000000 Prefetch
MEM 0x00000000b0000000..0x00000000bfffffff -> 0x00000000b0000000
IO 0x00000000e3000000..0x00000000e3ffffff -> 0x0000000000000000
Zone PFN ranges:
DMA 0 -> 196608
Normal 196608 -> 196608
HighMem 196608 -> 262144
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0: 0 -> 262144
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 260096
Kernel command line: root=/dev/sda1 rw console=ttyS0,115200
IPIC (128 IRQ sources) at fd7fc700
PID hash table entries: 4096 (order: 12, 16384 bytes)
clocksource: timebase mult[3c00001] shift[22] registered
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 1035216k/1048576k available (3144k kernel code, 12724k reserved, 116k data, 117k bss, 168k init)
SLUB: Genslabs=12, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Mount-cache hash table entries: 512
net_namespace: 192 bytes
NET: Registered protocol family 16
PCI: Probing PCI hardware
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
NET: Registered protocol family 1
highmem bounce pool size: 64 pages
msgmni has been set to 1511
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xe0004500 (irq = 19) is a 16550A
console [ttyS0] enabled
serial8250.0: ttyS1 at MMIO 0xe0004600 (irq = 20) is a 16550A
brd: module loaded
loop: module loaded
Gianfar MII Bus: probed
eth0: Gianfar Ethernet Controller Version 1.2, XX:XX:XX:XX:XX:XX
eth0: Running with NAPI enabled
eth0: 256/256 RX/TX BD ring size
eth1: Gianfar Ethernet Controller Version 1.2, XX:XX:XX:XX:XX:XX
eth1: Running with NAPI enabled
eth1: 256/256 RX/TX BD ring size
Driver 'sd' needs updating - please use bus_type methods
sata_sil 0000:00:10.0: Applying R_ERR on DMA activate FIS errata fix
scsi0 : sata_sil
scsi1 : sata_sil
scsi2 : sata_sil
scsi3 : sata_sil
ata1: SATA max UDMA/100 mmio m1024@0x90000000 tf 0x90000080 irq 22
ata2: SATA max UDMA/100 mmio m1024@0x90000000 tf 0x900000c0 irq 22
ata3: SATA max UDMA/100 mmio m1024@0x90000000 tf 0x90000280 irq 22
ata4: SATA max UDMA/100 mmio m1024@0x90000000 tf 0x900002c0 irq 22
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
ata1.00: ATA-7: Hitachi HDS721616PLA380, P22OABEA, max UDMA/133
ata1.00: 312581808 sectors, multi 0: LBA48 NCQ (depth 0/32)
ata1.00: configured for UDMA/100
ata2: SATA link down (SStatus 0 SControl 310)
ata3: SATA link down (SStatus 0 SControl 310)
ata4: SATA link down (SStatus 0 SControl 310)
scsi 0:0:0:0: Direct-Access ATA Hitachi HDS72161 P22O PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 312581808 512-byte hardware sectors (160042 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 0:0:0:0: [sda] 312581808 512-byte hardware sectors (160042 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sda: sda1
sd 0:0:0:0: [sda] Attached SCSI disk
sd 0:0:0:0: Attached scsi generic sg0 type 0
physmap platform flash device: 01000000 at fe000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
physmap-flash.0: Found 1 x16 devices at 0x800000 in 16-bit bank
Amd/Fujitsu Extended Query Table at 0x0040
physmap-flash.0: Swapping erase regions for broken CFI table.
number of CFI chips: 2
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
usbmon: debugfs is not available
fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller
fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus number 1
fsl-ehci fsl-ehci.0: irq 39, io base 0xe0022000
fsl-ehci fsl-ehci.0: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
USB Universal Host Controller Interface driver v3.0
Initializing USB Mass Storage driver...
usb 1-1: new high speed USB device using fsl-ehci and address 2
usb 1-1: configuration #1 chosen from 1 choice
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 4 ports detected
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
i2c /dev entries driver
WDT driver for MPC83xx initialized. mode:reset timeout=65535 (16 seconds)
md: linear personality registered for level -1
md: raid0 personality registered for level 0
md: raid1 personality registered for level 1
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
md: Autodetecting RAID arrays.
md: Scanned 0 and added 0 devices.
md: autorun ...
md: ... autorun DONE.
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
VFS: Mounted root (ext2 filesystem).
Freeing unused kernel memory: 168k init
Setting the hostname to mpc8349e-mitx
Mounting filesystems
rootfs / rootfs rw 0 0
/dev/root / ext2 rw,errors=continue 0 0
proc /proc proc rw 0 0
rwfs /mnt/rwfs tmpfs rw,size=512k 0 0
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
Starting syslogd and klogd
Running depmod
WARNING: Couldn't open directory /lib/modules/2.6.26.5: No such file or directory
FATAL: Could not open /lib/modules/2.6.26.5/modules.dep.temp for writing: No such file or directory
Setting up networking on loopback device:
Setting up networking on eth0:
udhcpc (v0.9.9-pre) started
Sending discover...
Sending select for 192.168.1.20...
Lease of 192.168.1.20 obtained, lease time 300
deleting routers
SIOCDELRT: No such process
adding dns 192.168.1.2
adding dns 192.168.1.8
Setting up networking on eth1:
0:01 not found
eth1: Could not attach to PHY
SIOCSIFFLAGS: No such device
Starting inetd:
Starting SMB services: PHY: e0024520:1c - Link is Up - 1000/Full
/sbin/ip
Starting dhcpd
Internet Systems Consortium DHCP Server V3.0.3b1
Copyright 2004-2005 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
Wrote 0 leases to leases file.
No subnet declaration for eth1 (0.0.0.0).
** Ignoring requests on eth1. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface eth1 is attached. **
Not configured to listen on any interfaces!
If you did not get this software from ftp.isc.org, please
get the latest from ftp.isc.org and install that before
requesting help.
If you did get this software from ftp.isc.org and have not
yet read the README, please read it before requesting help.
If you intend to request help from the dhcp-server@isc.org
mailing list, please read the section on the README about
submitting bug reports and requests for help.
Please do not under any circumstances send requests for
help directly to the authors of this software - please
send them to the appropriate mailing list as described in
the README file.
exiting.
FAILED
Welcome to Freescale Semiconductor Embedded Linux Environment
mpc8349e-mitx login:
まずは、tftpで転送したカーネルを起動できるようになりました。
yellowback's blog 日時 : MPC8349E-mITX Linuxで1GBメモリを認識させる方法
yellowback's blog 日時 : MPC8349E-mITX LinuxでRTCの時刻を取得する方法