日曜技術者のメモ

趣味でやった事のメモ書きです。

Terasic SoCKitでLinuxをブートしてみた

Terasic SoCKitを入手したのでLinuxをブートしてみました。

↓箱の写真。

f:id:ginnyu-tei:20131026162541j:plain

↓ボード写真 MicroSDスロットは裏側にあります。

f:id:ginnyu-tei:20131026163059j:plain

linuxブート方法はTerasicのページからRocketBoards.orgへの リンクがあったのでそのまま試しました。 Arrow SoCKIT Evaluation Board - How to Boot Linux

特に難しい操作はありませんが、MicroSDは付属していないので用意する必要があります。

以下ブートログ

U-Boot SPL 2012.10 (Apr 02 2013 - 18:25:57)
SDRAM : Initializing MMR registers
SDRAM : Calibrationg PHY
SEQ.C: Preparing to start memory calibration
SEQ.C: CALIBRATION PASSED
DESIGNWARE SD/MMC: 0


U-Boot 2012.10 (Feb 28 2013 - 21:33:41)

CPU   : Altera SOCFPGA Platform
BOARD : Altera SOCFPGA Cyclone 5 Board
DRAM:  1 GiB
MMC:   DESIGNWARE SD/MMC: 0
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   mii0
Warning: failed to set MAC address

Hit any key to stop autoboot:  0
reading uImage

2693576 bytes read
reading socfpga.dtb

7970 bytes read
## Booting kernel from Legacy Image at 00007fc0 ...
   Image Name:   Linux-3.7.0
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2693512 Bytes = 2.6 MiB
   Load Address: 00008000
   Entry Point:  00008000
## Flattened Device Tree blob at 00000100
   Booting using the fdt blob at 0x00000100
   XIP Kernel Image ... OK
OK
   Loading Device Tree to 0fffa000, end 0fffef21 ... OK

Starting kernel ...

Booting Linux on physical CPU 0
Initializing cgroup subsys cpuset
Linux version 3.7.0 (build@atull-linux1) (gcc version 4.7.3 20121106 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2012.11-20121123 - Linaro GCC 2012.11) ) #1 SMP Fri Feb 15 10:15:57 CST 2013
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=10c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: Altera SOCFPGA, model: Altera SOCFPGA Cyclone V
Memory policy: ECC disabled, Data cache writealloc
BUG: mapping for 0xfffec000 at 0xfffec000 out of vmalloc space
PERCPU: Embedded 8 pages/cpu @80d58000 s10816 r8192 d13760 u32768
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 260096
Kernel command line: console=ttyS0,57600 root=/dev/mmcblk0p2 rw rootwait
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 1024MB = 1024MB total
Memory: 1034040k/1034040k available, 14536k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xc0800000 - 0xff000000   (1000 MB)
    lowmem  : 0x80000000 - 0xc0000000   (1024 MB)
    modules : 0x7f000000 - 0x80000000   (  16 MB)
      .text : 0x80008000 - 0x804bcb2c   (4819 kB)
      .init : 0x804bd000 - 0x804e7a40   ( 171 kB)
      .data : 0x804e8000 - 0x80516e60   ( 188 kB)
       .bss : 0x80516e84 - 0x8054e664   ( 222 kB)
SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:16 nr_irqs:512 512
sched_clock: 32 bits at 100MHz, resolution 10ns, wraps every 42949ms
Console: colour dummy device 80x30
Calibrating delay loop... 1594.16 BogoMIPS (lpj=7970816)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x38eab8 - 0x38eb10
CPU1: Booted secondary processor
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated (3188.32 BogoMIPS).
devtmpfs: initialized
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
L310 cache controller enabled
l2x0: 8 ways, CACHE_ID 0x410030c9, AUX_CTRL 0x32060000, Cache size: 524288 B
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switching to clocksource timer3
NET: Registered protocol family 2
TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
TCP bind hash table entries: 65536 (order: 7, 524288 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP: reno registered
UDP hash table entries: 512 (order: 2, 16384 bytes)
UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
NTFS driver 2.1.30 [Flags: R/W].
jffs2: version 2.2. (NAND) 息 2001-2006 Red Hat, Inc.
msgmni has been set to 2019
io scheduler noop registered (default)
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
ffc02000.serial0: ttyS0 at MMIO 0xffc02000 (irq = 690) is a 8250
console [ttyS0] enabled
ffc03000.serial1: ttyS1 at MMIO 0xffc03000 (irq = 691) is a 8250
brd: module loaded
at24 0-0051: 4096 byte 24c32 EEPROM, writable, 32 bytes/write
cadence-qspi ff705000.spi: master is unqueued, this is deprecated
m25p80 spi2.0: unrecognized JEDEC id 905d10
m25p80 spi2.1: unrecognized JEDEC id ffffff
cadence-qspi ff705000.spi: Cadence QSPI controller driver
dw_spi_mmio fff00000.spi: master is unqueued, this is deprecated
dw_spi_mmio fff01000.spi: master is unqueued, this is deprecated
stmmac - user ID: 0x10, Synopsys ID: 0x37
 DMA HW capability register supported
 Enhanced/Alternate descriptors
 RX Checksum Offload Engine supported (type 2)
 TX Checksum insertion supported
libphy: stmmac: probed
eth0: PHY ID 00221611 at 1 IRQ 0 (stmmac-0:01) active
socfpga_phy_reset_mii writing extended registers to phyaddr 1
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
Dedicated Tx FIFOs mode
Using DMA mode
dwc_otg ffb40000.usb: DWC OTG Controller
dwc_otg ffb40000.usb: new USB bus registered, assigned bus number 1
dwc_otg ffb40000.usb: irq 656, io mem 0xffb40000
Init: Port Power? op_state=b_peripheral
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
Synopsys Designware Multimedia Card Interface Driver
dw_mmc ff704000.dwmmc0: couldn't determine pwr-en, assuming pwr-en = 0
dw_mmc ff704000.dwmmc0: Using internal DMA controller.
dw_mmc ff704000.dwmmc0: DW MMC controller at irq 667, 32 bit host data width, 1024 deep fifo
dw_mmc ff704000.dwmmc0: 1 slots initialized
dw_mmc ff704000.dwmmc0: Version ID is 240a
mmc_host mmc0: Bus speed (slot 0) = 12500000Hz (slot req 400000Hz, actual 390625HZ div = 16)
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
oprofile: no performance counters
oprofile: using timer interrupt.
TCP: cubic registered
NET: Registered protocol family 17
NET: Registered protocol family 15
Key type dns_resolver registered
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
ThumbEE CPU extension supported.
Registering SWP/SWPB emulation handler
Waiting for root device /dev/mmcblk0p2...
dw_mmc ff704000.dwmmc0: data FIFO error (status=00000800)
mmc0: problem reading SD Status register.
mmc_host mmc0: Bus speed (slot 0) = 12500000Hz (slot req 12500000Hz, actual 12500000HZ div = 0)
mmc0: new high speed SDHC card at address e624
mmcblk0: mmc0:e624 SU08G 7.40 GiB
 mmcblk0: p1 p2 p3
kjournald starting.  Commit interval 5 seconds
EXT3-fs (mmcblk0p2): warning: maximal mount count reached, running e2fsck is recommended
EXT3-fs (mmcblk0p2): using internal journal
EXT3-fs (mmcblk0p2): recovery complete
EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode
VFS: Mounted root (ext3 filesystem) on device 179:2.
devtmpfs: mounted
Freeing init memory: 168K
INIT: version 2.88 booting
Starting Bootlog daemon: bootlogd.
Configuring network interfaces... eth0: device MAC address xx:xx:xx:xx:xx:xx
udhcpc (v1.20.2) started
Sending discover...
libphy: stmmac-0:01 - Link is Up - 1000/Full
Sending discover...
Sending select for 192.168.21.9...
Lease of 192.168.21.9 obtained, lease time 3600
/etc/udhcpc.d/50default: Adding DNS 192.168.21.1
done.
Starting portmap daemon...
INIT: Entering runlevel: 5
Starting OpenBSD Secure Shell server: sshd
NET: Registered protocol family 10
done.
Starting syslogd/klogd: done
Starting Lighttpd Web Server: lighttpd.
Stopping Bootlog daemon: bootlogd.

Poky 8.0 (Yocto Project 1.3 Reference Distro) 1.3 socfpga_cyclone5 ttyS0

socfpga_cyclone5 login: