2012年03月14日

KZM-A9-DualでDebianのDesktopを動かす

前回はnetinstallでDebianのsshサーバが動くところまでを紹介しました。

今回はSDカードから起動して、DebianのDesktopを動せるようにしてみます。

DSC01249



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

DebianのDesktopをインストールするのに、4GBのSDカードではぎりぎり足りないので、8GB以上のSDカードを使います。

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

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

Debianのnetinstallを起動

KZM-A9-DualでDebianをnetinstallする にしたがってnetinstall用のinitrdでLinuxカーネルを起動します。

私はPARTNER-JetをつないでKZM-A9-Dualボードのメモリにカーネルをinitrdを書き込んで起動しました。

netinstall用のinitrdをinitramfsで組み込んだカーネルを作り、そのuImageをSDカードに書き込んで、そこから起動するという方法もあります。

インストールするパーティションの選択

インストールするディスクを選択するところで、自動でなく手動を選択します。

mmcblk1のパーティションは切り直さないようにします。

mmcblk1p1, mmcblk1p2はそのまま使用するようにし、mmcblk1p3は再フォーマットしてルート (/) を置くようにします。

swapのパーティションが無いので警告が出ますがそのまま続行します。

インストールするSoftwareの選択

 Choose software to install:                                             x
  x                                                                         x
  x                    [*] Graphical desktop environment                    x
  x                    [ ] Web server                                       x
  x                    [ ] Print server                 a                   x
  x                    [ ] DNS server                   a                   x
  x                    [ ] File server                  a                   x
  x                    [ ] Mail server                  a                   x
  x                    [ ] SQL database                 a                   x
  x                    [*] SSH server                   a                   x
  x                    [ ] Laptop

Graphical desktop environment にチェックを入れます。ネット経由でログインできるように、SSH serverにもチェックを入れておきます。

インストールするパッケージ数が膨大なので3時間くらいかかります。

uImageの置き換え

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

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

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

起動

SDカードからAndroidを起動したときのカーネルブートパラメータには root=/dev/mmcblk1p3 がついているはずなので、変更せずにそのままで大丈夫です。

USBのマウスとキーボードをつないでおきます。

ブートログ



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

   ...

中略

   ...
[    1.460000] TCP cubic registered
[    1.460000] NET: Registered protocol family 17
[    1.460000] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 1
[    1.470000] emxx-rtc 0-0051: setting system clock to 2000-01-01 00:00:06 UTC (946684806)
[    1.480000] Waiting for root device /dev/mmcblk1p3...
[    1.550000] mmc0: new high speed MMC card at address 0001
[    1.550000] mmcblk0: mmc0:0001 000000 3.82 GiB
[    1.560000]  mmcblk0: p1 p2 p3
[    1.620000] usb 1-1: new high speed USB device using emxx-ehci-driver and address 2
[    1.650000] mmc1: new high speed SDHC card at address 0001
[    1.650000] mmcblk1: mmc1:0001 00000 7.60 GiB
[    1.660000]  mmcblk1: p1 p2 p3
[    1.710000] EXT3-fs: barriers not enabled
[    1.770000] hub 1-1:1.0: USB hub found
[    1.770000] hub 1-1:1.0: 4 ports detected
[    2.060000] usb 1-1.3: new high speed USB device using emxx-ehci-driver and address 3
[    2.170000] hub 1-1.3:1.0: USB hub found
[    2.170000] hub 1-1.3:1.0: 4 ports detected
[    2.260000] usb 1-1.4: new high speed USB device using emxx-ehci-driver and address 4
[    2.370000] hub 1-1.4:1.0: USB hub found
[    2.370000] hub 1-1.4:1.0: 4 ports detected
[    2.460000] usb 1-1.3.4: new full speed USB device using emxx-ehci-driver and address 5
[    2.580000] hub 1-1.3.4:1.0: USB hub found
[    2.680000] hub 1-1.3.4:1.0: 3 ports detected
[    2.960000] usb 1-1.3.4.1: new full speed USB device using emxx-ehci-driver and address 6
[    3.170000] input: Chicony PFU-65 USB Keyboard as /devices/platform/emxx-ehci-driver/usb1/1-1/1-1.3/1-1.3.4/1-1.3.4.1/1-1.3.4.1:1.0/input/input2
[    3.190000] generic-usb 0003:04FE:0006.0001: input: USB HID v1.00 Keyboard [Chicony PFU-65 USB Keyboard] on usb-emxx_ehci-1.3.4.1/input0
[   24.980000] kjournald starting.  Commit interval 5 seconds
[   25.000000] EXT3-fs (mmcblk1p3): using internal journal
[   25.010000] EXT3-fs (mmcblk1p3): 4 orphan inodes deleted
[   25.010000] EXT3-fs (mmcblk1p3): recovery complete
[   25.070000] EXT3-fs (mmcblk1p3): mounted filesystem with writeback data mode
[   25.080000] VFS: Mounted root (ext3 filesystem) on device 179:11.
[   25.080000] Freeing init memory: 128K
[   25.080000] Failed to execute /init.  Attempting defaults...
INIT: version 2.88 booting
Using makefile-style concurrent boot in runlevel S.
.udev/ already exists on the static /dev! ... (warning).
Starting the hotplug events dispatcher: udevd.
Synthesizing the initial hotplug events...done.
Waiting for /dev to be fully populated...done.
Setting parameters of disc: (none).
Setting preliminary keymap...done.
Activating swap...done.
Checking root file system...fsck from util-linux-ng 2.17.2
/dev/mmcblk1p3: clean, 127624/494832 files, 768242/1978389 blocks
done.
[   33.800000] EXT3-fs (mmcblk1p3): using internal journal
Cleaning up ifupdown....
Setting up networking....
Loading kernel modules...done.
Activating lvm and md swap...done.
Checking file systems...fsck from util-linux-ng 2.17.2
done.
Mounting local filesystems...done.
Activating swapfile swap...done.
Cleaning up temporary files....
Configuring network interfaces...done.
Starting portmap daemon....
Starting NFS common utilities: statd.
Cleaning up temporary files....
Setting up ALSA...warning: 'alsactl restore' failed with error message 'alsactl: set_control:1388: Cannot write control '2:0:0:Playback Volume:0' : Invalid argument
alsactl: set_control:1388: Cannot write control '2:0:0:Capture Volume:0' : Invalid argument
alsactl: set_control:1388: Cannot write control '2:0:0:Capture Source Switch:0' : Invalid argument
alsactl: set_control:1388: Cannot write control '2:0:0:Capture Channel Mode Switch:0' : Invalid argument
alsactl: set_control:1388: Cannot write control '2:0:0:Sampling Rate Switch:0' : Invalid argument
alsactl: set_control:1388: Cannot write control '2:0:0:Playback Switch:0' : Invalid argument'...amixer: Invalid command!
done.
Setting console screen modes.
cannot (un)set powersave mode
Skipping font and keymap setup (handled by console-setup).
Setting up console font and keymap...done.
Setting sensors limits.
Setting kernel variables ...done.
INIT: Entering runlevel: 2
Using makefile-style concurrent boot in runlevel 2.
Starting portmap daemon...Already running..
Enabling additional executable binary formats: binfmt-supportFATAL: Could not load /lib/modules/2.6.35.7/modules.dep: No such file or directory
mount: mount point /proc/sys/fs/binfmt_misc does not exist
Starting NFS common utilities: statd.
Starting enhanced syslogd: rsyslogd.
Starting anac(h)ronistic cron: anacron.
Starting deferred execution scheduler: atd.
Loading cpufreq kernel modules...done (none).
Starting periodic command scheduler: cron.
Starting kerneloops:
Starting system message bus: dbus.
Starting OpenBSD Secure Shell server: sshd.
Starting network connection manager: NetworkManager.
[   40.390000] net eth0: SMSC911x/921x identified at 0xe0840000, IRQ: 167
Starting MTA: exim4.
ALERT: exim paniclog /var/log/exim4/paniclog has non-zero size, mail system possibly broken ... failed!
Starting GNOME Display Manager: gdm3CPUFreq Utilities: Setting ondemand CPUFreq governor...disabled, governor not available...done.
[   41.250000] mlock error -1
Starting bluetooth: bluetoothd.
Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
.
saned disabled; edit /etc/default/saned
Starting Common Unix Printing System: cupsdFATAL: Could not load /lib/modules/2.6.35.7/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.35.7/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.35.7/modules.dep: No such file or directory
.

Debian GNU/Linux 6.0 debian ttyS1

debian login:

DSC01249DSC01250DSC01251

DHCPでIPアドレスを取得し、ブラウザで外のWEBページを閲覧できます。

ディスクの使用量

$ df /
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mmcblk1p3         7789288   2948772   4444840  40% /


トラックバックURL

コメントする

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

QRコード
QRコード