デスクトップとして使う(2)udlfb モジュールのコンパイル

Debian LS-VL

まるしすなうぇぶろぐ(仮): 玄柴/ディスプレイの接続で 紹介いただいている手順を LinkStation LS-VL で検証する。

1.カーネルにマージされたモジュールを試す

yasunari@vl:/mnt/src/linux-2.6.31.8$ make menuconfig
でコンフィグ画面を出して
Device Drivers→Staging driversにある Displaylink USB Framebuffer support をモジュールで選択、
Device Drivers→Graphics support→Support for frame buffer devicesにある Virtual Frame Buffer support もモジュールで選択します
 .config - Linux Kernel v2.6.31.8 Configuration
 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
  lqqqqqqqqqqqqqqqqqqqqqqqqqqqq Device Drivers qqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
  x  Arrow keys navigate the menu.  <Enter> selects submenus --->.          x
  x  Highlighted letters are hotkeys.  Pressing <Y> includes, <N> excludes, x
  x  <M> modularizes features.  Press <Esc><Esc> to exit, <?> for Help, </> x
  x  for Search.  Legend: [*] built-in  [ ] excluded  <M> module  < >       x
  x lqqqq^(-)qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
  x x        Sonics Silicon Backplane  --->                               x x
  x x        Multifunction device drivers  --->                           x x
  x x    < > Multimedia support  --->                                     x x
  x x        Graphics support  --->                                       x x
  x x    < > Sound card support  --->                                     x x
  x x    [*] HID Devices  --->                                            x x
  x x    [*] USB support  --->                                            x x
  x x    < > Ultra Wideband devices (EXPERIMENTAL)  --->                  x x
  x x    < > MMC/SD/SDIO card support  --->                               x x
  x x    < > Sony MemoryStick card support (EXPERIMENTAL)  --->           x x
  x x    [ ] Accessibility support  --->                                  x x
  x x    [ ] LED Support  --->                                            x x
  x x    <*> Real Time Clock  --->                                        x x
  x x    [ ] DMA Engine support  --->                                     x x
  x x    [ ] Auxiliary Display support  --->                              x x
  x x    [ ] Voltage and Current Regulator Support  --->                  x x
  x x    < > Userspace I/O drivers  --->                                  x x
  x x    [*] Staging drivers  --->                                        x x
  x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj x
  tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu
  x                    <Select>    < Exit >    < Help >                     x
  mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj


Staging drivers を選んで、、
 .config - Linux Kernel v2.6.31.8 Configuration
 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
  lqqqqqqqqqqqqqqqqqqqqqqqqqqqq Staging drivers qqqqqqqqqqqqqqqqqqqqqqqqqqqqk
  x  Arrow keys navigate the menu.  <Enter> selects submenus --->.          x
  x  Highlighted letters are hotkeys.  Pressing <Y> includes, <N> excludes, x
  x  <M> modularizes features.  Press <Esc><Esc> to exit, <?> for Help, </> x
  x  for Search.  Legend: [*] built-in  [ ] excluded  <M> module  < >       x
  x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
  x x    --- Staging drivers                                              x x
  x x    [ ]   Exclude Staging drivers from being built                   x x
  x x    < >     Agere ET-1310 Gigabit Ethernet support (NEW)             x x
  x x    < >     Meilhaus ME-4000 support (NEW)                           x x
  x x    < >     Meilhaus support (NEW)  --->                             x x
  x x    < >     USB IP support (EXPERIMENTAL) (NEW)                      x x
  x x    < >     Line Echo Canceller support (NEW)                        x x
  x x    < >     Data acquisition support (comedi) (NEW)                  x x
  x x    < >     Asus OLED driver (NEW)                                   x x
  x x    < >     Altera PCI Express Chaining DMA driver (NEW)             x x
  x x    < >     Mimio Xi interactive whiteboard support (NEW)            x x
  x x    < >     Frontier Tranzport and Alphatrack support (NEW)          x x
  x x            Android  --->                                            x x
  x x    < >     Distributed storage (NEW)                                x x
  x x    < >     POHMELFS filesystem support (NEW)                        x x
  x x    < >     Brontes 3d Frame Framegrabber (NEW)                      x x
  x x    < >     Plan 9 style capability device implementation (NEW)      x x
  x x    < >     Intel Management Engine Interface (MEI) Support (NEW)    x x
  x x    < >     VIA Technologies VT6655 support (NEW)                    x x
  x x    < >     CPC CAN USB driver (NEW)                                 x x
  x x                                                                     x x
  x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj x
  tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu
  x                    <Select>    < Exit >    < Help >                     x
  mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
んー。Displaylink USB Framebuffer support がない。

いきなりつまづいた。
もう一つの
Device Drivers→Graphics support→Support for frame buffer devicesにある Virtual Frame Buffer support もモジュールで選択します
こちらは、

 .config - Linux Kernel v2.6.31.8 Configuration
 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
  lqqqqqqqqqqqqqqqqqqq Support for frame buffer devices qqqqqqqqqqqqqqqqqqqqk
  x  Arrow keys navigate the menu.  <Enter> selects submenus --->.          x
  x  Highlighted letters are hotkeys.  Pressing <Y> includes, <N> excludes, x
  x  <M> modularizes features.  Press <Esc><Esc> to exit, <?> for Help, </> x
  x  for Search.  Legend: [*] built-in  [ ] excluded  <M> module  < >       x
  x lqqqq^(-)qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
  x x          *** Frame buffer hardware drivers ***                      x x
  x x    < >   Cirrus Logic support (NEW)                                 x x
  x x    < >   Permedia2 support (NEW)                                    x x
  x x    < >   CyberPro 2000/2010/5000 support (NEW)                      x x
  x x    [ ]   Asiliant (Chips) 69000 display support (NEW)               x x
  x x    [ ]   IMS Twin Turbo display support (NEW)                       x x
  x x    < >   Epson S1D13XXX framebuffer support (NEW)                   x x
  x x    < >   nVidia Framebuffer Support (NEW)                           x x
  x x    < >   nVidia Riva support (NEW)                                  x x
  x x    < >   Matrox acceleration (NEW)                                  x x
  x x    < >   ATI Radeon display support (NEW)                           x x
  x x    < >   ATI Rage128 display support (NEW)                          x x
  x x    < >   ATI Mach64 display support (NEW)                           x x
  x x    < >   S3 Trio/Virge support (NEW)                                x x
  x x    < >   S3 Savage support (NEW)                                    x x
  x x    < >   SiS/XGI display support (NEW)                              x x
  x x    < >   VIA UniChrome (Pro) and Chrome9 display support (NEW)      x x
  x x    < >   NeoMagic display support (NEW)                             x x
  x x    < >   IMG Kyro support (NEW)                                     x x
  x x    < >   3Dfx Banshee/Voodoo3/Voodoo5 display support (NEW)         x x
  x x    < >   3Dfx Voodoo Graphics (sst1) support (NEW)                  x x
  x x    < >   VIA VT8623 support (NEW)                                   x x
  x x    < >   Trident/CyberXXX/CyberBlade support (NEW)                  x x
  x x    < >   ARK 2000PV support (NEW)                                   x x
  x x    < >   Permedia3 support (EXPERIMENTAL) (NEW)                     x x
  x x    < >   Fujitsu carmine frame buffer support (NEW)                 x x
  x x    <M>   Virtual Frame Buffer support (ONLY FOR TESTING!)           x x
  x x    < >   E-Ink Metronome/8track controller support (NEW)            x x
  x x    < >   Fujitsu MB862xx GDC support (NEW)                          x x
  x mqqqqv(+)qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj x
  tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu
  x                    <Select>    < Exit >    < Help >                     x
  mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj


こちらはあった。
もう一度 Device Drivers→Staging drivers を見てみると、、、
 .config - Linux Kernel v2.6.31.8 Configuration
 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
  lqqqqqqqqqqqqqqqqqqqqqqqqqqqq Staging drivers qqqqqqqqqqqqqqqqqqqqqqqqqqqqk
  x  Arrow keys navigate the menu.  <Enter> selects submenus --->.          x
  x  Highlighted letters are hotkeys.  Pressing <Y> includes, <N> excludes, x
  x  <M> modularizes features.  Press <Esc><Esc> to exit, <?> for Help, </> x
  x  for Search.  Legend: [*] built-in  [ ] excluded  <M> module  < >       x
  x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
  x x    --- Staging drivers                                              x x
  x x    [ ]   Exclude Staging drivers from being built                   x x
  x x    < >     Agere ET-1310 Gigabit Ethernet support                   x x
  x x    < >     Meilhaus ME-4000 support                                 x x
  x x    < >     Meilhaus support  --->                                   x x
  x x    < >     USB IP support (EXPERIMENTAL)                            x x
  x x    < >     Line Echo Canceller support                              x x
  x x    < >     Data acquisition support (comedi)                        x x
  x x    < >     Asus OLED driver                                         x x
  x x    < >     Altera PCI Express Chaining DMA driver                   x x
  x x    < >     Mimio Xi interactive whiteboard support                  x x
  x x    < >     Frontier Tranzport and Alphatrack support                x x
  x x            Android  --->                                            x x
  x x    < >     Distributed storage                                      x x
  x x    < >     POHMELFS filesystem support                              x x
  x x    < >     Brontes 3d Frame Framegrabber                            x x
  x x    < >     Plan 9 style capability device implementation            x x
  x x    < >     Intel Management Engine Interface (MEI) Support          x x
  x x    < >     VIA Technologies VT6655 support                          x x
  x x    < >     CPC CAN USB driver                                       x x
  x x    < >     Displaylink USB Framebuffer support (NEW)                x x
  x x                                                                     x x
  x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj x
  tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu
  x                    <Select>    < Exit >    < Help >                     x
  mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj


あるやん。
早速 Module に。

コンパイル

yasunari@vl:/mnt/src/linux-2.6.31.8$ make dep
scripts/kconfig/conf -s arch/arm/Kconfig
*** Warning: make dep is unnecessary now.
yasunari@vl:/mnt/src/linux-2.6.31.8$ make uImage
  CHK     include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
  CHK     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-arm
	:
	:
Image Name:   Linux-2.6.31.8
Created:      Sat Mar 10 10:15:00 2012
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    2748204 Bytes = 2683.79 kB = 2.62 MB
Load Address: 0x00008000
Entry Point:  0x00008000
  Image arch/arm/boot/uImage is ready
yasunari@vl:/mnt/src/linux-2.6.31.8$
yasunari@vl:/mnt/src/linux-2.6.31.8$ make modules
  CHK     include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
  CHK     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-arm
  CALL    scripts/checksyscalls.sh
<stdin>:1351:2: warning: #warning syscall migrate_pages not implemented
<stdin>:1407:2: warning: #warning syscall pselect6 not implemented
<stdin>:1411:2: warning: #warning syscall ppoll not implemented
<stdin>:1451:2: warning: #warning syscall epoll_pwait not implemented
  CC [M]  drivers/staging/udlfb/udlfb.o
  CC [M]  drivers/video/sysfillrect.o
  CC [M]  drivers/video/syscopyarea.o
  CC [M]  drivers/video/sysimgblt.o
  CC [M]  drivers/video/fb_sys_fops.o
  CC [M]  drivers/video/vfb.o
  Building modules, stage 2.
  MODPOST 107 modules
ERROR: "cfb_imageblit" [drivers/staging/udlfb/udlfb.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
yasunari@vl:/mnt/src/linux-2.6.31.8$
ふげー。

トラブルシュート

ぐぐってみると、 SheevaPlugでの類似事例を見つけた。 VGA か VESA のフレームバッファを組み込めとのことなのだが、、、

「VGA か VESA のフレームバッファ」が何なのかよくわからない。
このあたり、カーネル素人の辛いところ。

ソースや Makefile を見て、 CONFIG_FB_CFB_IMAGEBLIT を m にすれば良いことはわかったのだが、
どうやったら m にできるのかがわからない。
このあたり、カーネル素人の辛いところ。

hidden な項目はどうやったら編集できるの?

禁断の .config 手修正

yasunari@vl:/mnt/src/linux-2.6.31.8$ diff -u .config.old .config
--- .config.old 2012-03-10 13:42:59.385751293 +0900
+++ .config     2012-03-10 13:43:52.716132735 +0900
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.31.8
-# Sat Mar 10 13:41:38 2012
+# Sat Mar 10 13:43:52 2012
 #
 CONFIG_ARM=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -1078,7 +1078,7 @@
 # CONFIG_FB_BOOT_VESA_SUPPORT is not set
 # CONFIG_FB_CFB_FILLRECT is not set
 # CONFIG_FB_CFB_COPYAREA is not set
-CONFIG_FB_CFB_IMAGEBLIT=m
+# CONFIG_FB_CFB_IMAGEBLIT is not set
 # CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
 CONFIG_FB_SYS_FILLRECT=m
 CONFIG_FB_SYS_COPYAREA=m
yasunari@vl:/mnt/src/linux-2.6.31.8$
make する
yasunari@vl:/mnt/src/linux-2.6.31.8$ make modules
scripts/kconfig/conf -s arch/arm/Kconfig
#
# configuration written to .config
#
  CHK     include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
  CHK     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-arm
  CALL    scripts/checksyscalls.sh
<stdin>:1351:2: warning: #warning syscall migrate_pages not implemented
<stdin>:1407:2: warning: #warning syscall pselect6 not implemented
<stdin>:1411:2: warning: #warning syscall ppoll not implemented
<stdin>:1451:2: warning: #warning syscall epoll_pwait not implemented
  Building modules, stage 2.
  MODPOST 107 modules
ERROR: "cfb_imageblit" [drivers/staging/udlfb/udlfb.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
yasunari@vl:/mnt/src/linux-2.6.31.8$ grep CONFIG_FB_CFB_IMAGEBLIT .config
# CONFIG_FB_CFB_IMAGEBLIT is not set
yasunari@vl:/mnt/src/linux-2.6.31.8$
.config は戻されてしまうし、、、

カーネルのインストール

手に負えないので、まずはカーネルだけ上げる。

まずは、カーネルを

yasunari@vl:/mnt/src/linux-2.6.31.8$ su - root
Password:
root@vl:~# cd /mnt/src/linux-2.6.31.8
root@vl:/mnt/src/linux-2.6.31.8# rm /boot/uImage.buffalo
root@vl:/mnt/src/linux-2.6.31.8# cp arch/arm/boot/uImage /boot/uImage.buffalo
root@vl:/mnt/src/linux-2.6.31.8# 

リブート

root@vl:/mnt/src/linux-2.6.31.8# reboot

Linux 2.6.31.8 (x60l.yamasita.jp) (pts/0)

vl login: yasunari
Password:
Last login: Sat Mar 10 16:40:03 JST 2012 from x60l.yamasita.jp on pts/3
Linux vl 2.6.31.8 #8 Sat Mar 10 18:43:22 JST 2012 armv5tel

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@vl:~$
#8 というところが、ここに書いていない試行錯誤を表す(藁

LS-VL

楽天市場
Amazon
livedoor デパート
バッファローダイレクト
Yahoo!ショッピング


デスクトップとして使う(1)再度カーネル 2.6.31.8 コンパイル環境の準備
ハックの記録
LinkStation/玄箱 をハックしよう

デスクトップとして使う(3)udlfb モジュールのコンパイル(2)

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