2012年05月17日

KZM-A9-DualボードでLinaro 12.04 ALIPを動かす

KZM-A9-DualでARM Ubuntu 12.04を動かしてみようと思ったのですが、せっかくなのでシンプルなGUIのついたALIP版を動かしてみることにします。

DSC01468



起動可能なSDカードの作成

今回は4GBのSDカードを使いましたが、2GBでも大丈夫そうです。

KZM-A9-Dualのブート可能なSDを作る方法 にしたがって、まずAndroidが起動するSDカードを作成します。

第一パーティションにあるsdboot.binとuboot-sd.binはこのまま使用します。uImageと第3パーティションのユーザーランドはこのあと書き換えます。

ルートファイルシステムのアーカイブの取得

Linaroのダウンロードサイトにあるものを利用しました。

$ mkdir alip
$ cd alip/
$ wget http://releases.linaro.org/12.04/ubuntu/precise-images/alip/linaro-precise-alip-20120426-84.tar.gz
$ sudo tar pxvf linaro-precise-alip-20120426-84.tar.gz

ルートファイルシステムのSDへの書き込み

SDカードの第3パーティションの内容を置き換えます。

$ cd binary/boot/filesystem.dir/
$ sudo mount /dev/sdb3 /mnt
$ sudo rm -rf /mnt/*
$ sudo cp -a * /mnt/
$ sudo umount /mnt

uImageの置き換え

Android用のカーネルでは、ANDROID_PARANOID_NETWORK=y になっているので、これを外したカーネルをビルドし、そのuImageをSDカードの第1パーティションに置きます。

make menuconfigでは以下の部分です。

  Networking support --->
    Networking options
       Only allow certain groups to create sockets  チェックを外す

ブートログ


U-Boot 2009.03-rc1 (Oct 03 2011 - 19:40:50)

Booted Device: SD
Board: EM/EV ES2 (Rev.ffffff20)
Core:  1.15v
DRAM:  512 MB
Flash: 64 MB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0
## Booting kernel from Legacy Image at 40007fc0 ...
   Image Name:   Linux-2.6.35.7
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4252864 Bytes =  4.1 MB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 2.6.35.7 (koba@koba-linux2) (gcc version 4.4.3 (GCC) ) #23 SMP PREEMPT Tue Mar 13 15:09:29 JST 2012
[    0.000000] CPU: ARMv7 Processor [411fc092] revision 2 (ARMv7), cr=10c57c7f
[    0.000000] CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[    0.000000] Machine: KZM9D
[    0.000000] Memory policy: ECC disabled, Data cache writealloc
[    0.000000]   Normal zone: 1 pages exceeds realsize 0
[    0.000000]   Normal zone: 1 pages exceeds realsize 0
[    0.000000] PERCPU: Embedded 7 pages/cpu @c062c000 s6432 r8192 d14048 u65536
[    0.000000] pcpu-alloc: s6432 r8192 d14048 u65536 alloc=16*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1
[    0.000000] Built 2 zonelists in Zone order, mobility grouping on.  Total pages: 107442
[    0.000000] Kernel command line: root=/dev/mmcblk1p3 noinitrd init=/init console=ttyS1,115200n8n androidboot.console=ttyS1 SELINUX_INIT=no mem=167M@0x40000000 mem=256M@0x50000000 rw video=qfb: ip=none rootfstype=ext3 rootwait
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 167MB 256MB = 423MB total
[    0.000000] Memory: 424348k/424348k available, 8804k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
[    0.000000]     vmalloc : 0xe0800000 - 0xf0000000   ( 248 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .init : 0xc0008000 - 0xc0028000   ( 128 kB)
[    0.000000]       .text : 0xc0028000 - 0xc03d5000   (3764 kB)
[    0.000000]       .data : 0xc03ec000 - 0xc04164c0   ( 170 kB)
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU-based detection of stalled CPUs is disabled.
[    0.000000]  Verbose stalled-CPUs detection is disabled.
[    0.000000] NR_IRQS:374
[    0.000000] Console: colour dummy device 80x30
[    0.000000] Calibrating delay loop... 1061.68 BogoMIPS (lpj=5308416)
[    0.260000] pid_max: default: 32768 minimum: 301
[    0.260000] Mount-cache hash table entries: 512
[    0.260000] Initializing cgroup subsys cpuacct
[    0.260000] Initializing cgroup subsys freezer
[    0.260000] CPU: Testing write buffer coherency: ok
[    0.280000] CPU1: Booted secondary processor
[    0.540000] Brought up 2 CPUs
[    0.540000] SMP: Total of 2 processors activated (2123.36 BogoMIPS).
[    0.540000] NET: Registered protocol family 16
[    0.540000] L310 cache controller enabled
[    0.540000] l2x0: 8 ways, CACHE_ID 0x410000c4, AUX_CTRL 0x40440000
[    0.540000] chip revision ffffff20
[    0.540000] hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available
[    0.550000] bio: create slab <bio-0> at 0
[    0.550000] SCSI subsystem initialized
[    0.550000] usbcore: registered new interface driver usbfs
[    0.550000] usbcore: registered new interface driver hub
[    0.550000] usbcore: registered new device driver usb
[    0.550000] Advanced Linux Sound Architecture Driver Version 1.0.23.
[    0.550000] Switching to clocksource sti
[    0.560000] NET: Registered protocol family 2
[    0.560000] IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.560000] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    0.560000] TCP bind hash table entries: 16384 (order: 5, 196608 bytes)
[    0.560000] TCP: Hash tables configured (established 16384 bind 16384)
[    0.560000] TCP reno registered
[    0.560000] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.560000] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.560000] NET: Registered protocol family 1
[    0.580000] RPC: Registered udp transport module.
[    0.580000] RPC: Registered tcp transport module.
[    0.580000] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.580000] PMU: registered new PMU device of type 0
[    0.580000] Power Management for EMXX.
[    0.580000] spi: registered device spi [spi]
[    0.580000] Starting pmu...
[    0.580000] ashmem: initialized
[    0.600000] msgmni has been set to 828
[    0.600000] io scheduler noop registered
[    0.600000] io scheduler deadline registered (default)
[    0.600000] io scheduler cfq registered
[    0.610000] emxx_fb: registered device fb
[    0.610000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.610000] serial8250.0: ttyS0 at MMIO 0xe1020000 (irq = 40) is a TI16750
[    0.610000] serial8250.0: ttyS1 at MMIO 0xe1030000 (irq = 41) is a TI16750
[    1.040000] console [ttyS1] enabled
[    1.050000] loop: module loaded
[    1.050000] i2c /dev entries driver
[    1.050000] Linux video capture interface: v2.00
[    1.060000] emxx_v4l2: registered device video0 [v4l2]
[    1.070000] PPP generic driver version 2.4.2
[    1.070000] PPP Deflate Compression module registered
[    1.080000] PPP BSD Compression module registered
[    1.080000] smsc911x: Driver version 2008-10-21.
[    1.090000] smsc911x-mdio: probed
[    1.090000] eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:01, irq=-1)
[    1.100000] net eth0: MAC Address: 00:0a:a3:02:12:ae
[    1.100000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.110000] emxx-ehci-driver emxx-ehci-driver: EMXX EHCI
[    1.110000] emxx-ehci-driver emxx-ehci-driver: new USB bus registered, assigned bus number 1
[    1.130000] emxx-ehci-driver emxx-ehci-driver: irq 115, io mem 0xe2701000
[    1.150000] emxx-ehci-driver emxx-ehci-driver: USB 2.0 started, EHCI 1.00
[    1.150000] hub 1-0:1.0: USB hub found
[    1.160000] hub 1-0:1.0: 1 port detected
[    1.170000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.170000] emxx-ohci-driver emxx-ohci-driver: EMXX OHCI
[    1.180000] emxx-ohci-driver emxx-ohci-driver: new USB bus registered, assigned bus number 2
[    1.190000] emxx-ohci-driver emxx-ohci-driver: irq 115, io mem 0xe2700000
[    1.270000] hub 2-0:1.0: USB hub found
[    1.280000] hub 2-0:1.0: 1 port detected
[    1.290000] Initializing USB Mass Storage driver...
[    1.290000] usbcore: registered new interface driver usb-storage
[    1.300000] USB Mass Storage support registered.
[    1.300000] udc: version Mar 13 2012
[    1.310000] android init
[    1.310000] android_probe pdata: c03ffa10
[    1.310000] android_bind
[    1.320000] android_usb gadget: android_usb ready
[    1.320000] udc:  ----- VBUS OFF
[    1.320000] f_adb init
[    1.330000] android_register_function adb
[    1.330000] f_mass_storage init
[    1.330000] fsg_probe pdev: c03ff7a8, pdata: c03ffa00
[    1.340000] android_register_function usb_mass_storage
[    1.350000] android_usb gadget: Mass Storage Function, version: 2009/09/11
[    1.350000] android_usb gadget: Number of LUNs=1
[    1.360000]  lun0: LUN: removable file: (no medium)
[    1.360000] adb_bind_config
[    1.360000] input: kzm9d_key as /devices/virtual/input/input0
[    1.370000] input: kzm9d_touch as /devices/virtual/input/input1
[    1.380000] using rtc device, rtc8564, for alarms
[    1.380000] emxx-rtc 0-0051: rtc core: registered rtc8564 as rtc0
[    1.390000] Battery probe...
[    1.390000] Starting wdt.
[    1.400000] usbcore: registered new interface driver usbhid
[    1.400000] usbhid: USB HID core driver
[    1.410000] logger: created 64K log 'log_main'
[    1.410000] logger: created 256K log 'log_events'
[    1.420000] logger: created 64K log 'log_radio'
[    1.420000] logger: created 64K log 'log_system'
[    1.430000] Starting sound codec.
[    1.430000] ALSA device list:
[    1.440000]   #0: sound codec (emxx mixer)
[    1.440000] oprofile: using arm/armv7-ca9
[    1.450000] TCP cubic registered
[    1.450000] NET: Registered protocol family 17
[    1.450000] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 1
[    1.460000] emxx-rtc 0-0051: setting system clock to 2000-01-01 00:00:06 UTC (946684806)
[    1.470000] Waiting for root device /dev/mmcblk1p3...
[    1.540000] mmc0: new high speed MMC card at address 0001
[    1.540000] mmcblk0: mmc0:0001 000000 3.82 GiB
[    1.550000]  mmcblk0: p1 p2 p3
[    1.640000] mmc1: new high speed SDHC card at address b368
[    1.640000] mmcblk1: mmc1:b368 LEXAR 3.73 GiB
[    1.650000]  mmcblk1: p1 p2 p3
[    1.700000] EXT3-fs: barriers not enabled
[    1.840000] usb 2-1: new full speed USB device using emxx-ohci-driver and address 2
[    2.020000] hub 2-1:1.0: USB hub found
[    2.030000] hub 2-1:1.0: 3 ports detected
[    2.340000] usb 2-1.1: new full speed USB device using emxx-ohci-driver and address 3
[    2.490000] input: Chicony PFU-65 USB Keyboard as /devices/platform/emxx-ohci-driver/usb2/2-1/2-1.1/2-1.1:1.0/input/input2
[    2.500000] generic-usb 0003:04FE:0006.0001: input: USB HID v1.00 Keyboard [Chicony PFU-65 USB Keyboard] on usb-emxx_ohci-1.1/input0
[   32.090000] kjournald starting.  Commit interval 5 seconds
[   32.550000] EXT3-fs (mmcblk1p3): using internal journal
[   32.550000] EXT3-fs (mmcblk1p3): 1 orphan inode deleted
[   32.550000] EXT3-fs (mmcblk1p3): recovery complete
[   33.030000] EXT3-fs (mmcblk1p3): mounted filesystem with writeback data mode
[   33.040000] VFS: Mounted root (ext3 filesystem) on device 179:11.
[   33.040000] Freeing init memory: 128K
[   33.050000] Failed to execute /init.  Attempting defaults...
modprobe: FATAL: Could not load /lib/modules/2.6.35.7/modules.dep: No such file or directory

modprobe: FATAL: Could not load /lib/modules/2.6.35.7/modules.dep: No such file or directory

 * Starting mDNS/DNS-SD daemon                                           [ OK ]
 * Starting bluetooth daemon                                             [ OK ]
[   52.280000] init: Failed to create pty - disabling logging for job
[   52.890000] init: Failed to create pty - disabling logging for job
[   52.910000] init: Failed to create pty - disabling logging for job
[   52.970000] init: Failed to create pty - disabling logging for job
[   53.100000] init: Failed to create pty - disabling logging for job
[   53.170000] init: Failed to create pty - disabling logging for job
[   53.190000] init: Failed to create pty - disabling logging for job
[   53.450000] init: Failed to create pty - disabling logging for job
[   53.460000] init: Failed to create pty - disabling logging for job
[   53.540000] init: Failed to create pty - disabling logging for job
[   53.840000] init: Failed to create pty - disabling logging for job
[   53.860000] init: Failed to create pty - disabling logging for job
[   53.880000] init: Failed to create pty - disabling logging for job
[   53.900000] init: Failed to create pty - disabling logging for job
[   53.920000] init: Failed to create pty - disabling logging for job
[   53.940000] init: Failed to create pty - disabling logging for job

[   53.980000] init: Failed to create pty - disabling logging for job
[   54.010000] init: Failed to create pty - disabling logging for job
[   54.030000] init: Failed to create pty - disabling logging for job
[   54.050000] init: Failed to create pty - disabling logging for job
[   54.080000] init: Failed to create pty - disabling logging for job
[   54.110000] init: Failed to create pty - disabling logging for job
Last login: Sat Jan  1 00:00:29 UTC 2000 on tty1
[   54.160000] init: Failed to create pty - disabling logging for job
[   54.190000] init: Failed to create pty - disabling logging for job
[   54.330000] init: Failed to create pty - disabling logging for job
Welcome to Linaro 12.04 (GNU/Linux 2.6.35.7 armv7l)

 * Documentation:  https://wiki.linaro.org/
root@linaro-alip:~#

何かエラーが出ていますが、なんとか起動できたようです。

root@linaro-alip:~# date
Sat Jan  1 00:01:08 UTC 2000
root@linaro-alip:~# ntpdate-debian
17 May 07:24:11 ntpdate[3946]: step time server 91.189.94.4 offset 390554565.252718 sec
root@linaro-alip:~# date
Thu May 17 07:24:25 UTC 2012

最初はLCD画面が真っ黒でしたが、このように時計を合わせたらスクリーンセイバーが動き出し、それ以降は画面が表示されました。GUIで操作ができます。

ディスクの使用量

root@linaro-alip:~# df /
Filesystem     1K-blocks   Used Available Use% Mounted on
/dev/root        3802436 932828   2676448  26% /

追記

"modprobe: FATAL: Could not load ... " というエラーメッセージはとりあえず以下のように空のファイルを作れば消えます。

root@linaro-alip:~# mkdir -p /lib/modules/`uname -r`
root@linaro-alip:~# touch /lib/modules/`uname -r`/modules.dep

"init: Failed to create pty - disabling logging for job" というメッセージはinitの中にあるようです。そのうちソースを見てみます。

root@linaro-alip:~# strings /sbin/init |grep 'create pty'
Failed to create pty - disabling logging for job

とりあえずカーネルのコンフィグで、 CONFIG_LEGACY_PTYS=y にしてリビルドしましたが、変りませんでした。

追記(2012.7.4)

init: Failed to create pty - disabling logging for job と出るのは既知のバグのようです。

https://bugs.launchpad.net/ubuntu/+source/upstart/+bug/980917

upstartが起動する前に/dev/pts がmount済みであることを想定しているそうです。通常は

initrdの中でこれを行うらしいのですが、今回のようにそれを省略するとこうなるようです。



トラックバックURL

コメントする

名前
URL
 
  絵文字
 
 
記事検索
最新コメント
アクセスカウンター
  • 今日:
  • 昨日:
  • 累計:

QRコード
QRコード