LS-GL:debian:USB PRINTER をサポートしたカーネル


CONFIG_USB_PRINTER をセットしたカーネルを作る

.config の保存

気休めに
yasunari@hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8$ mv .config .config_061014
yasunari@hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8$ cp .config_061014 .config

make menuconfig

make menuconfig を実行し CONFIG_USB_PRINTER をセットする
yasunari@hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8$ make menuconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/basic/split-include
  HOSTCC  scripts/basic/docproc
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/kxgettext.o
  HOSTCC  scripts/kconfig/mconf.o
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/mconf
/usr/bin/ld: cannot find -lncurses
collect2: ld returned 1 exit status

>> Unable to find the Ncurses libraries.
>>
>> You must install ncurses-devel in order
>> to use 'make menuconfig'

make[2]: *** [scripts/lxdialog/ncurses] Error 1
make[1]: *** [menuconfig] Error 2
make: *** [menuconfig] Error 2
yasunari@hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8$
あぁ〜あ。

ncurses-devel のインストール

まずは apt-get update
hackkit:~# apt-get update
Get:1 http://ftp.jp.debian.org sarge/main Packages [4351kB]
Get:2 http://security.debian.org sarge/updates/main Packages [372kB]
Get:3 http://security.debian.org sarge/updates/main Release [109B]
Hit http://security.debian.org sarge/updates/contrib Packages
Get:4 http://security.debian.org sarge/updates/contrib Release [112B]
	:
	:
Hit http://ftp.jp.debian.org sarge/non-US/non-free Release
Fetched 6046kB in 29s (203kB/s)
Reading Package Lists... Done
hackkit:~#
ncurses-devel をインストールする
hackkit:~# apt-get install ncurses-devel
Reading Package Lists... Done
Building Dependency Tree... Done
E: Couldn't find package ncurses-devel
hackkit:~#
どのパッケージをインストールすればいいの?
hackkit:~# apt-cache search ncurses
abook - A text-based ncurses address book application
	:
libaca-dev - The Advanced nCurses API
libaca0 - The Advanced nCurses API -- development files
libcurses-perl - Curses interface for Perl
libcurses-widgets-perl - Curses widget interface for Perl
libggi-target-terminfo - General Graphics Interface TermInfo display target
libncurses-ruby - ruby Extension for the ncurses C library
libncurses-ruby1.8 - ruby Extension for the ncurses C library
libncurses4 - Shared libraries for terminal handling
libncurses5 - Shared libraries for terminal handling
libncurses5-dbg - Debugging/profiling libraries for ncurses
libncurses5-dev - Developer's libraries and docs for ncurses
libncursesw5 - Shared libraries for terminal handling (wide character support)
libncursesw5-dbg - Debugging/profiling libraries for ncurses
libncursesw5-dev - Developer's libraries for ncursesw
	:
hackkit:~#
libncurses5 libncurses5-dev あたりかなぁ、、、
hackkit:~# apt-get install libncurses5 libncurses5-dev
Reading Package Lists... Done
Building Dependency Tree... Done
libncurses5 is already the newest version.
The following NEW packages will be installed:
  libncurses5-dev
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 1058kB of archives.
After unpacking 5337kB of additional disk space will be used.
Get:1 http://ftp.jp.debian.org sarge/main libncurses5-dev 5.4-4 [1058kB]
Fetched 1058kB in 4s (220kB/s)
Selecting previously deselected package libncurses5-dev.
(Reading database ... 11153 files and directories currently installed.)
Unpacking libncurses5-dev (from .../libncurses5-dev_5.4-4_arm.deb) ...
Setting up libncurses5-dev (5.4-4) ...
hackkit:~#

make menuconfig の再実行

yasunari@hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8$ make menuconfig
  HOSTCC  scripts/lxdialog/checklist.o
  HOSTCC  scripts/lxdialog/inputbox.o
  HOSTCC  scripts/lxdialog/lxdialog.o
  HOSTCC  scripts/lxdialog/menubox.o
	:
	:
コンフィギュレーション画面(?)が起動してきた。

Device Drivers ---> USB support ---> USB Printer support を M にする

yasunari@hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8$ diff -c .config_061014 .config
*** .config_061014      Sat Oct 14 01:43:07 2006
--- .config     Wed Nov 22 23:05:05 2006
***************
*** 1,7 ****
  #
  # Automatically generated make config: don't edit
  # Linux kernel version: 2.6.12.6-arm1
! # Sat Oct 14 01:43:07 2006
  #
  CONFIG_ARM=y
  CONFIG_MMU=y
--- 1,7 ----
  #
  # Automatically generated make config: don't edit
  # Linux kernel version: 2.6.12.6-arm1
! # Wed Nov 22 23:05:05 2006
  #
  CONFIG_ARM=y
  CONFIG_MMU=y
***************
*** 809,815 ****
  #
  # CONFIG_USB_BLUETOOTH_TTY is not set
  # CONFIG_USB_ACM is not set
! # CONFIG_USB_PRINTER is not set

  #
  # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
--- 809,815 ----
  #
  # CONFIG_USB_BLUETOOTH_TTY is not set
  # CONFIG_USB_ACM is not set
! CONFIG_USB_PRINTER=m

  #
  # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
***************
*** 905,910 ****
--- 905,921 ----
  # USB Gadget Support
  #
  # CONFIG_USB_GADGET is not set
+ # CONFIG_USB_GADGET_NET2280 is not set
+ # CONFIG_USB_GADGET_PXA2XX is not set
+ # CONFIG_USB_GADGET_GOKU is not set
+ # CONFIG_USB_GADGET_LH7A40X is not set
+ # CONFIG_USB_GADGET_OMAP is not set
+ # CONFIG_USB_GADGET_DUMMY_HCD is not set
+ # CONFIG_USB_ZERO is not set
+ # CONFIG_USB_ETH is not set
+ # CONFIG_USB_GADGETFS is not set
+ # CONFIG_USB_FILE_STORAGE is not set
+ # CONFIG_USB_G_SERIAL is not set

  #
  # MMC/SD Card support
yasunari@hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8$
メニューを散歩したので本題以外も追加されたが、まあええか。

make uImage の実行

yasunari@hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8$ make uImage
  CHK     include/linux/version.h
  SPLIT   include/linux/autoconf.h -> include/config/*
  CC      scripts/mod/empty.o
  HOSTCC  scripts/mod/mk_elfconfig
	:

	:
  Kernel: arch/arm/boot/Image is ready
  Kernel: arch/arm/boot/zImage is ready
  UIMAGE  arch/arm/boot/uImage
Image Name:   Linux-2.6.12.6-arm1
Created:      Thu Nov 23 00:37:02 2006
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    1816004 Bytes = 1773.44 kB = 1.73 MB
Load Address: 0x00008000
Entry Point:  0x00008000
  Image arch/arm/boot/uImage is ready
yasunari@hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8$ ls -l arch/arm/boot/uImage
-rw-r--r--  1 yasunari yamasita 1816068 Nov 23 00:37 arch/arm/boot/uImage
yasunari@hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8$ mkimage -l arch/arm/boot/uImage
Image Name:   Linux-2.6.12.6-arm1
Created:      Thu Nov 23 00:37:02 2006
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    1816004 Bytes = 1773.44 kB = 1.73 MB
Load Address: 0x00008000
Entry Point:  0x00008000
yasunari@hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8$
なんか、えらい時計狂ってるな

カーネルモジュールの make

yasunari@hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8$ make modules
  CHK     include/linux/version.h
make[1]: `arch/arm/kernel/asm-offsets.s' is up to date.
make[1]: `include/asm-arm/mach-types.h' is up to date.
  CC [M]  fs/fat/cache.o
	:
	:
  CC      net/802/psnap.mod.o
  LD [M]  net/802/psnap.ko
  CC      net/appletalk/appletalk.mod.o
  LD [M]  net/appletalk/appletalk.ko
  CC      net/llc/llc.mod.o
  LD [M]  net/llc/llc.ko

カーネルモジュールのインストール

yasunari@hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8$ su
Password:
hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8# make modules_install
/bin/sh: line 1: /kernel26tool/sbin/depmod: No such file or directory
Warning: you may need to install module-init-tools
See http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt
  INSTALL crypto/ocf/ocf-bench.ko
  INSTALL drivers/i2c/i2c-core.ko
  INSTALL drivers/net/tun.ko
  INSTALL drivers/usb/class/usblp.ko
  INSTALL drivers/usb/input/usbhid.ko
  INSTALL fs/fat/fat.ko
  INSTALL fs/msdos/msdos.ko
	:
	:
  INSTALL net/appletalk/appletalk.ko
  INSTALL net/llc/llc.ko
if [ -r System.map -a -x /kernel26tool/sbin/depmod ]; then /kernel26tool/sbin/depmod -ae -F System.map -b binaries -r 2.6.1
2.6-arm1; fi
hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8#
depmod がないと言っている。
hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8# which depmod
/sbin/depmod
/sbin にあるので、、、Makefile を書き換える
hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8# diff -c Makefile.orig Makefile
*** Makefile.orig       Mon Jun  5 14:45:51 2006
--- Makefile    Thu Nov 23 01:08:44 2006
***************
*** 192,198 ****

  ARCH          ?= arm
  #CROSS_COMPILE        ?= arm-linux-
! CROSS_COMPILE=arm-none-linux-gnueabi-

  # Architecture as present in compile.h
  UTS_MACHINE := $(ARCH)
--- 192,198 ----

  ARCH          ?= arm
  #CROSS_COMPILE        ?= arm-linux-
! #CROSS_COMPILE=arm-none-linux-gnueabi-

  # Architecture as present in compile.h
  UTS_MACHINE := $(ARCH)
***************
*** 328,335 ****
  OBJDUMP               = $(CROSS_COMPILE)objdump
  AWK           = awk
  GENKSYMS      = scripts/genksyms/genksyms
! #DEPMOD               = /sbin/depmod
! DEPMOD                = /kernel26tool/sbin/depmod
  KALLSYMS      = scripts/kallsyms
  PERL          = perl
  CHECK         = sparse
--- 328,335 ----
  OBJDUMP               = $(CROSS_COMPILE)objdump
  AWK           = awk
  GENKSYMS      = scripts/genksyms/genksyms
! DEPMOD                = /sbin/depmod
! #DEPMOD               = /kernel26tool/sbin/depmod
  KALLSYMS      = scripts/kallsyms
  PERL          = perl
  CHECK         = sparse
hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8#
再度実行
hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8# make modules_install
depmod: QM_MODULES: Function not implemented

Warning: you may need to install module-init-tools
See http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt
  INSTALL crypto/ocf/ocf-bench.ko
  INSTALL drivers/i2c/i2c-core.ko
  INSTALL drivers/net/tun.ko
  INSTALL drivers/usb/class/usblp.ko
  INSTALL drivers/usb/input/usbhid.ko
  INSTALL fs/fat/fat.ko
  INSTALL fs/msdos/msdos.ko
  INSTALL fs/nls/nls_ascii.ko
  INSTALL fs/nls/nls_cp1250.ko
  INSTALL fs/nls/nls_cp1251.ko
  INSTALL fs/nls/nls_cp1255.ko
  INSTALL fs/nls/nls_cp737.ko
  INSTALL fs/nls/nls_cp775.ko
  INSTALL fs/nls/nls_cp850.ko
  INSTALL fs/nls/nls_cp852.ko
  INSTALL fs/nls/nls_cp855.ko
  INSTALL fs/nls/nls_cp857.ko
  INSTALL fs/nls/nls_cp860.ko
  INSTALL fs/nls/nls_cp861.ko
  INSTALL fs/nls/nls_cp862.ko
  INSTALL fs/nls/nls_cp863.ko
  INSTALL fs/nls/nls_cp864.ko
  INSTALL fs/nls/nls_cp865.ko
  INSTALL fs/nls/nls_cp866.ko
  INSTALL fs/nls/nls_cp869.ko
  INSTALL fs/nls/nls_cp874.ko
  INSTALL fs/nls/nls_cp936.ko
  INSTALL fs/nls/nls_cp949.ko
  INSTALL fs/nls/nls_cp950.ko
  INSTALL fs/nls/nls_iso8859-1.ko
  INSTALL fs/nls/nls_iso8859-13.ko
  INSTALL fs/nls/nls_iso8859-14.ko
  INSTALL fs/nls/nls_iso8859-15.ko
  INSTALL fs/nls/nls_iso8859-2.ko
  INSTALL fs/nls/nls_iso8859-3.ko
  INSTALL fs/nls/nls_iso8859-4.ko
  INSTALL fs/nls/nls_iso8859-5.ko
  INSTALL fs/nls/nls_iso8859-6.ko
  INSTALL fs/nls/nls_iso8859-7.ko
  INSTALL fs/nls/nls_iso8859-9.ko
  INSTALL fs/nls/nls_koi8-r.ko
  INSTALL fs/nls/nls_koi8-ru.ko
  INSTALL fs/nls/nls_koi8-u.ko
  INSTALL fs/ntfs/ntfs.ko
  INSTALL fs/vfat/vfat.ko
  INSTALL net/802/p8022.ko
  INSTALL net/802/psnap.ko
  INSTALL net/appletalk/appletalk.ko
  INSTALL net/llc/llc.ko
if [ -r System.map -a -x /sbin/depmod ]; then /sbin/depmod -ae -F System.map -b binaries -r 2.6.12.6-arm1; fi
depmod: *** Unresolved symbols in binaries/lib/modules/2.6.12.6-arm1/kernel/fs/msdos/msdos.ko
depmod:         fat_scan
depmod:         fat_fs_panic
depmod:         fat_free_clusters
depmod:         fat_dir_empty
depmod:         fat_get_dotdot_entry
depmod:         fat_add_entries
depmod:         fat_notify_change
depmod:         fat_date_unix2dos
depmod:         fat_build_inode
depmod:         fat_detach
depmod:         fat_sync_inode
depmod:         fat_attach
depmod:         fat_fill_super
depmod:         fat_remove_entries
depmod:         fat_alloc_new_dir
depmod: *** Unresolved symbols in binaries/lib/modules/2.6.12.6-arm1/kernel/fs/vfat/vfat.ko
depmod:         fat_scan
depmod:         fat_fs_panic
depmod:         fat_free_clusters
depmod:         fat_dir_empty
depmod:         fat_get_dotdot_entry
depmod:         fat_add_entries
depmod:         fat_notify_change
depmod:         fat_date_unix2dos
depmod:         fat_build_inode
depmod:         fat_search_long
depmod:         fat_detach
depmod:         fat_sync_inode
depmod:         fat_attach
depmod:         fat_fill_super
depmod:         fat_remove_entries
depmod:         fat_alloc_new_dir
depmod: *** Unresolved symbols in binaries/lib/modules/2.6.12.6-arm1/kernel/net/802/p8022.ko
depmod:         llc_sap_close
depmod:         llc_sap_open
depmod:         llc_build_and_send_ui_pkt
depmod: *** Unresolved symbols in binaries/lib/modules/2.6.12.6-arm1/kernel/net/802/psnap.ko
depmod:         llc_sap_close
depmod:         llc_sap_open
depmod:         llc_build_and_send_ui_pkt
depmod: *** Unresolved symbols in binaries/lib/modules/2.6.12.6-arm1/kernel/net/appletalk/appletalk.ko
depmod:         register_snap_client
depmod:         unregister_snap_client
hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8#
なんだかエラーいっぱい
hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8# ls -l /lib/modules/2.6.12.6-arm1/kernel/drivers/usb/
total 4
drwxr-xr-x  2 root root 4096 Sep 30 04:29 input
モジュールも置かれていない。

module-init-tools のインストール

you may need to install module-init-tools と言われているので、 module-init-tools をインストールする
hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8# apt-get install module-init-tools
Reading Package Lists... Done
Building Dependency Tree... Done
The following NEW packages will be installed:
  module-init-tools
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 70.2kB of archives.
After unpacking 291kB of additional disk space will be used.
Get:1 http://ftp.jp.debian.org sarge/main module-init-tools 3.2-pre1-2 [70.2kB]
Fetched 70.2kB in 3s (22.4kB/s)
Selecting previously deselected package module-init-tools.
(Reading database ... 12068 files and directories currently installed.)
Unpacking module-init-tools (from .../module-init-tools_3.2-pre1-2_arm.deb) ...
Setting up module-init-tools (3.2-pre1-2) ...
Configuration for arm not found, trying arm.generic
Architecture-specific config file not found

hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8#

カーネルモジュールの再インストール

hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8# make modules_install
  INSTALL crypto/ocf/ocf-bench.ko
  INSTALL drivers/i2c/i2c-core.ko
  INSTALL drivers/net/tun.ko
  INSTALL drivers/usb/class/usblp.ko
  INSTALL drivers/usb/input/usbhid.ko
  INSTALL fs/fat/fat.ko
  INSTALL fs/msdos/msdos.ko
  INSTALL fs/nls/nls_ascii.ko
  INSTALL fs/nls/nls_cp1250.ko
  INSTALL fs/nls/nls_cp1251.ko
  INSTALL fs/nls/nls_cp1255.ko
  INSTALL fs/nls/nls_cp737.ko
  INSTALL fs/nls/nls_cp775.ko
  INSTALL fs/nls/nls_cp850.ko
  INSTALL fs/nls/nls_cp852.ko
  INSTALL fs/nls/nls_cp855.ko
  INSTALL fs/nls/nls_cp857.ko
  INSTALL fs/nls/nls_cp860.ko
  INSTALL fs/nls/nls_cp861.ko
  INSTALL fs/nls/nls_cp862.ko
  INSTALL fs/nls/nls_cp863.ko
  INSTALL fs/nls/nls_cp864.ko
  INSTALL fs/nls/nls_cp865.ko
  INSTALL fs/nls/nls_cp866.ko
  INSTALL fs/nls/nls_cp869.ko
  INSTALL fs/nls/nls_cp874.ko
  INSTALL fs/nls/nls_cp936.ko
  INSTALL fs/nls/nls_cp949.ko
  INSTALL fs/nls/nls_cp950.ko
  INSTALL fs/nls/nls_iso8859-1.ko
  INSTALL fs/nls/nls_iso8859-13.ko
  INSTALL fs/nls/nls_iso8859-14.ko
  INSTALL fs/nls/nls_iso8859-15.ko
  INSTALL fs/nls/nls_iso8859-2.ko
  INSTALL fs/nls/nls_iso8859-3.ko
  INSTALL fs/nls/nls_iso8859-4.ko
  INSTALL fs/nls/nls_iso8859-5.ko
  INSTALL fs/nls/nls_iso8859-6.ko
  INSTALL fs/nls/nls_iso8859-7.ko
  INSTALL fs/nls/nls_iso8859-9.ko
  INSTALL fs/nls/nls_koi8-r.ko
  INSTALL fs/nls/nls_koi8-ru.ko
  INSTALL fs/nls/nls_koi8-u.ko
  INSTALL fs/ntfs/ntfs.ko
  INSTALL fs/vfat/vfat.ko
  INSTALL net/802/p8022.ko
  INSTALL net/802/psnap.ko
  INSTALL net/appletalk/appletalk.ko
  INSTALL net/llc/llc.ko
if [ -r System.map -a -x /sbin/depmod ]; then /sbin/depmod -ae -F System.map -b binaries -r 2.6.12.6-arm1; fi
hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8#
今度はすんなり。
と思ったら、
hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8# ls -l /lib/modules/2.6.12.6-arm1/kernel/drivers/usb/
total 4
drwxr-xr-x  2 root root 4096 Sep 30 04:29 input
hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8# ls -l /lib/modules/2.6.12.6-arm1/kernel/drivers/usb/input/
total 40
-rw-r--r--  1 root root 39476 Aug  8 17:16 usbhid.ko
hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8#
インストールされていない(汗)

Makefile を見てみると binaries 以下にインストールするように なっていた(汗)

hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8# diff -c Makefile.orig Makefile
*** Makefile.orig       Mon Jun  5 14:45:51 2006
--- Makefile    Thu Nov 23 01:21:43 2006
***************
*** 192,198 ****

  ARCH          ?= arm
  #CROSS_COMPILE        ?= arm-linux-
! CROSS_COMPILE=arm-none-linux-gnueabi-

  # Architecture as present in compile.h
  UTS_MACHINE := $(ARCH)
--- 192,198 ----

  ARCH          ?= arm
  #CROSS_COMPILE        ?= arm-linux-
! #CROSS_COMPILE=arm-none-linux-gnueabi-

  # Architecture as present in compile.h
  UTS_MACHINE := $(ARCH)
***************
*** 328,335 ****
  OBJDUMP               = $(CROSS_COMPILE)objdump
  AWK           = awk
  GENKSYMS      = scripts/genksyms/genksyms
! #DEPMOD               = /sbin/depmod
! DEPMOD                = /kernel26tool/sbin/depmod
  KALLSYMS      = scripts/kallsyms
  PERL          = perl
  CHECK         = sparse
--- 328,335 ----
  OBJDUMP               = $(CROSS_COMPILE)objdump
  AWK           = awk
  GENKSYMS      = scripts/genksyms/genksyms
! DEPMOD                = /sbin/depmod
! #DEPMOD               = /kernel26tool/sbin/depmod
  KALLSYMS      = scripts/kallsyms
  PERL          = perl
  CHECK         = sparse
***************
*** 558,564 ****
  # relocations required by build roots.  This is not defined in the
  # makefile but the arguement can be passed to make if needed.
  #
! INSTALL_MOD_PATH=binaries
  MODLIB        := $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
  export MODLIB

--- 558,565 ----
  # relocations required by build roots.  This is not defined in the
  # makefile but the arguement can be passed to make if needed.
  #
! #INSTALL_MOD_PATH=binaries
! INSTALL_MOD_PATH=
  MODLIB        := $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
  export MODLIB

hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8#
今度こそ
hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8# make modules_install
  INSTALL crypto/ocf/ocf-bench.ko
  INSTALL drivers/i2c/i2c-core.ko
  INSTALL drivers/net/tun.ko
  INSTALL drivers/usb/class/usblp.ko
  INSTALL drivers/usb/input/usbhid.ko
  INSTALL fs/fat/fat.ko
  INSTALL fs/msdos/msdos.ko
  INSTALL fs/nls/nls_ascii.ko
  INSTALL fs/nls/nls_cp1250.ko
  INSTALL fs/nls/nls_cp1251.ko
  INSTALL fs/nls/nls_cp1255.ko
  INSTALL fs/nls/nls_cp737.ko
  INSTALL fs/nls/nls_cp775.ko
  INSTALL fs/nls/nls_cp850.ko
  INSTALL fs/nls/nls_cp852.ko
  INSTALL fs/nls/nls_cp855.ko
  INSTALL fs/nls/nls_cp857.ko
  INSTALL fs/nls/nls_cp860.ko
  INSTALL fs/nls/nls_cp861.ko
  INSTALL fs/nls/nls_cp862.ko
  INSTALL fs/nls/nls_cp863.ko
  INSTALL fs/nls/nls_cp864.ko
  INSTALL fs/nls/nls_cp865.ko
  INSTALL fs/nls/nls_cp866.ko
  INSTALL fs/nls/nls_cp869.ko
  INSTALL fs/nls/nls_cp874.ko
  INSTALL fs/nls/nls_cp936.ko
  INSTALL fs/nls/nls_cp949.ko
  INSTALL fs/nls/nls_cp950.ko
  INSTALL fs/nls/nls_iso8859-1.ko
  INSTALL fs/nls/nls_iso8859-13.ko
  INSTALL fs/nls/nls_iso8859-14.ko
  INSTALL fs/nls/nls_iso8859-15.ko
  INSTALL fs/nls/nls_iso8859-2.ko
  INSTALL fs/nls/nls_iso8859-3.ko
  INSTALL fs/nls/nls_iso8859-4.ko
  INSTALL fs/nls/nls_iso8859-5.ko
  INSTALL fs/nls/nls_iso8859-6.ko
  INSTALL fs/nls/nls_iso8859-7.ko
  INSTALL fs/nls/nls_iso8859-9.ko
  INSTALL fs/nls/nls_koi8-r.ko
  INSTALL fs/nls/nls_koi8-ru.ko
  INSTALL fs/nls/nls_koi8-u.ko
  INSTALL fs/ntfs/ntfs.ko
  INSTALL fs/vfat/vfat.ko
  INSTALL net/802/p8022.ko
  INSTALL net/802/psnap.ko
  INSTALL net/appletalk/appletalk.ko
  INSTALL net/llc/llc.ko
if [ -r System.map -a -x /sbin/depmod ]; then /sbin/depmod -ae -F System.map  2.6.12.6-arm1; fi
hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8# ls /lib/modules/2.6.12.6-arm1/kernel/drivers/usb/
class  input
hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8# ls /lib/modules/2.6.12.6-arm1/kernel/drivers/usb/class/
usblp.ko
hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8# ls -l /lib/modules/2.6.12.6-arm1/kernel/drivers/usb/class/
total 16
-rw-r--r--  1 root root 16171 Nov 23 01:22 usblp.ko
hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8#
OK

カーネル交換

hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8# ls -l /boot
total 7844
-rw-r--r--  1 root root 4376965 Sep 30 04:29 initrd.buffalo
drwx------  2 root root   12288 Sep 30 04:26 lost+found
-rw-r--r--  1 root root 1816016 Oct 14 08:03 uImage.buffalo
-rw-r--r--  1 root root 1790760 Sep 21 21:33 uImage.buffalo.orig
hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8# mv /boot/uImage.buffalo /boot/uImage.buffalo_061014
hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8# cp arch/arm/boot/uImage /boot/uImage.buffalo
hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8# ls -l /boot
total 9626
-rw-r--r--  1 root root 4376965 Sep 30 04:29 initrd.buffalo
drwx------  2 root root   12288 Sep 30 04:26 lost+found
-rw-r--r--  1 root root 1816068 Nov 23 01:01 uImage.buffalo
-rw-r--r--  1 root root 1790760 Sep 21 21:33 uImage.buffalo.orig
-rw-r--r--  1 root root 1816016 Oct 14 08:03 uImage.buffalo_061014
hackkit:/mnt/kernel/linux-2.6.12_lsp.1.7.8# 

再起動

再起動する。
Debian GNU/Linux 3.1 hackkit
hackkit login: yasunari
Password:
Last login: Wed Nov 22 22:31:43 2006 from muramasal.yamasita.jp on pts/0
Linux hackkit 2.6.12.6-arm1 #2 Thu Nov 23 00:19:31 JST 2006 armv5tejl GNU/Linux

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
yasunari@hackkit:~$ dmesg | head
Linux version 2.6.12.6-arm1 (yasunari@hackkit) (gcc version 3.3.5 (Debian 1:3.3.5-13)) #2 Thu Nov 23 00:19:31 JST 2006
CPU: ARM926EJ-Sid(wb) [41069260] revision 0 (ARMv5TEJ)
	:
OK。ちゃんと入れ替わっている

プリンタの接続

USB プリンタを刺してみた。
hackkit:~# tail -f /var/log/messages
	:
	:
Nov 23 01:27:35 hackkit kernel: usb 2-1: new full speed USB device using ehci_platform and address 2
これだけ?
モジュールはロードされている?
hackkit:~# lsmod
Module                  Size  Used by
hackkit:~# 
ロードされていないので、手動でロードしてみる
hackkit:~# insmod /lib/modules/2.6.12.6-arm1/kernel/drivers/usb/class/usblp.ko
hackkit:~# tail /var/log/messages
Nov 23 01:27:35 hackkit kernel: usb 2-1: new full speed USB device using ehci_platform and address 2
Nov 23 01:28:31 hackkit kernel: drivers/usb/class/usblp.c: usblp0: USB Bidirectional printer dev 2 if 0 alt 0 proto 2 vid 0x04B8 pid 0x0005
Nov 23 01:28:31 hackkit kernel: usbcore: registered new driver usblp
Nov 23 01:28:31 hackkit kernel: drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
ようやくプリンタとして認識された。

さて、自動で認識させるには、、、、 モジュールにせんと組み込んどいたらよかった




LS-GL:debian:プリンタの接続
ハックの記録
LinkStation/玄箱 をハックしよう

玄箱/HG:Vine 4.0

Copyright (C) 2006 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp 山下康成@京都府向日市