2011-01-30

【備忘録】ARM の話題あれこれ

世代の Windows では、ARM もサポートされるというニュースが今年になって報道されました[1]。今後、デスクトップ PC のような用途でも ARM 系の CPU を搭載したものがもっと発売されるようになるかもしれないと期待しています。ARM のプロセッサを搭載したデスクトップタイプの PC が利用できると、手軽に開発環境を構築できるので、市場に多く流通して手頃な価格まで下がって欲しいと思っています。既に、ARM 系 NVIDIA Tegra 2 ベースの超小型デスクトップコンピュータが発表されたりもしています[2]。実際の販売価格がどうなるか楽しみです。

ARM と言えば、アップル社 iPhone などの iOS がサポートしていることが有名です。一方 Linux の ARM への対応はどうかといえば、Google Android を Linux の一種と見做せば ARM をサポートしている Linux として、最近では最も有名でホットな OS かもしれません。ARM のモバイル端末だけでなくノート PC のようなタイプでも Android が搭載されています。東芝製 dynabook AZ は代表的な例でしょう。

もっと一般的な Linux ディストリビューションでも ARM をサポートしています。シャープ製のモバイル端末 NetWalker は、i.MX515 (ARM)プロセッサを搭載しており OS は、Ubuntu 9.04 のシャープ・カスタマイズ版です。

Ubuntu/ARM の QEMU 用イメージが入手できます[3]ので、Fedora (x86_64) 上で試してみました。ウィンドウマネージャーは含まれていませんが、ARM 用パッケージの作成に利用できそうです。


ところで、Fedora では、まだ ARM をサポートしていないのかと思っていましたが、ちゃんとありました[4]。QEMU 用のイメージも入手可能[5]なので、試してみたのですが、こちらはうまくいきませんでした。自分の環境で、QEMU の設定に不備があるのかもしれません。さらに ARM のクロスコンパイル用パッケージが入手できることもわかりました[6]。近い将来、ARM 対応の Windows SDK が公開されれば、MinGW クロスコンパイル環境の ARM 版を比較的容易に準備できるかもしれません。楽しみです。

参考サイト

[1] Microsoft、WindowsをSoCに拡大 - ARMシステムもサポート
[2] NVIDIA Tegra 2 搭載の超小型デスクトップ Trim Slice
[3] ARM RootfsFromScratch
[4] Architectures/ARM - FedoraProject
[5] Architectures/ARM/HowToQemu - FedoraProject
[6] Architectures/ARM/CrossToolchain - FedoraProject
[7] Linux Support for the ARM Architecture

2011-01-22

Apache Rivet

Apache Rivet は Apache HTTP Server のモジュールで、PHP のようにサーバ・サイドで動的な Web ページを作成できる Tcl システムです[1]。Tcl を応用した他の Apache のモジュールには、mod_tclWebsh がありますが、Rivet の最新パッケージのリリースが 25-Oct-2010 と一番新しく、もっとも活動が活発なように感じたので試用してみました。現バージョンの Rivet 2.0 系は Apache 1.3 と 2.x に対応しています。Tcl はバージョン 8.5 あるいは 8.4 を必要とします。
Linux の RPM パッケージを作成するのに必要な spec ファイルが下の参考サイト [1] のダウンロードページにあったので、最新の Rivet-2.0.2 に対応できるように編集して Fedora 14 用のパッケージを作成し、インストールしてみたところ、簡単にローカルの Web サーバの環境で動作確認ができました。

[2] の Example のページで紹介されている、カレンダーを表示するサンプルを紹介します。
<? set hello_message "Calendar" ?>
<html>
  <head>
    <title><? puts $hello_message ?></title>
  </head>
  <body><?
package require Calendar

proc ::cal_cell_attributes {day month year weekday} {
    if {$weekday == 3} {
        return [list class curr_wkday]
    }
}

set htmlc [HtmlCalendar #auto]
set html_txt [$htmlc emit \
        -container {table class calendar} \
        -current_weekday 3 \
        -cell_function cal_cell_attributes]
puts $html_txt
?></body>
</html>
これを calendar.rvt というように、拡張子 rvt のついたファイル名で保存し、保存したファイルを Web サーバー (Apache) からブラウザで読み込むと以下のようになります。

最近、SourceForge.jp では、個人向け開発支援ツール「PersonalForge」がリリースされたので[2]、早速、自分のアカウントで「Apache Rivet RPM」という作業部屋を作成し、作成した RPM パッケージを公開しました[3]
 

参考サイト

[1] Rivet - Webscripting for Tcl'ers
[2] SourceForge.JP、個人向けGitリポジトリ/ストレージサービス「PersonalForge」をリリース
[3] 作業部屋: bitwalk / Apache Rivet RPM のファイルダウンロード
[4] Apache 関連書籍

2011-01-09

Ubuntu にトライ!

発用途には使用していない、32bit の古いノート PC (ThinkPad X31) に、Ubuntu をインストールしてみました。そもそものキッカケは、このところ fedora-release パッケージだけを新しくして yum コマンドで Fedora のバージョンアップを済ませてしまっていたので、Fedora 14 のクリーンインストールをし直したところ、AVI 形式などのビデオが totem で見れなくなってしまったからです。RPM Fusion のレポジトリを加えても解決できなかったので、このノート PC だけ Ubuntu に乗り換えてみました。

Ubuntu は使いやすさを重視しており、Debian や Fedora ほど厳格にはプロプライエタリなソフトウェアやクローズドソースな機能を排除していません。したがって、ビデオにおけるポピュラーかつプロプライエタリな形式のデコードも当然できるだろうと考えたからです。

Debian 系の Linux を使うのは、15 年以上 Linux を使い続けている中で初めての経験です。

まず Ubuntu 10.10 のデスクトップ版のインストールイメージ ubuntu-ja-10.10-desktop-i386.iso をダウンロードして、(ダメもとで)Fedora 上で dd コマンドで USB メモリに書き込んではみました。が、やはりこれだけでは USB メモリで起動できません。そこで、やむなく手許にあった音楽用のブランクの CD-R に dvdrecord コマンドで iso イメージを焼いてインストール CD を作成し、もうほとんど使っていない古い外付け CD ドライブを接続してインストールをしました。なんとか成功です。

インストール時にルートのパスワードを設定する箇所がなかったので、なんだか不安でしたが、sudo を使うことを後で知り、作法の違いを感じました(Fedora で su を使っている自分は、単にやり方が古いだけなのかもしれません)。

Fedora でもずいぶんインストールが簡単になってきたと感じていましたが、Ubuntu はさらにシンプルです。これであれば、Linux 初心者にも勧められそうです、コミュニティの活動の成果、特に Ubuntu Japanese Team の努力に感謝です。ビデオも問題なく totem で見れて満足です。Fedora の時と同じ Gnome のデスクトップなので、寒色系か暖色系かの差はあっても、操作性に大きな違いは感じません。しかし内部の deb パッケージの構成は rpm とは違うはずなので、これからゆっくり覚えていこうを思います。

なお 64bit の開発環境は、当面 Fedora のままでいこうと考えています。こっちはビデオが見れなくとも全然問題無いからです。

2011-01-04

The Cross Compiler Framework (Win32+Win64)

Fedora 15 から変更される予定の話題です。

mingw-w64 ツールチェインは win32 と win64 のターゲット両方をサポートしており、また本家 mingw.org よりも活発であることから、Fedora で採用されるクロスコンパイル環境は mingw-w64 プロジェクトベースのパッケージに統一されます。したがってパッケージ名のトリプレット 'i686-pc-mingw32' は、'i686-w64-mingw32' へ揃えられます。

さらに、次のステップとして 'mingw32-...' から 'cross-...' へパッケージ名が変更されるようです。

ちなみに、Fedora 15 のリリース予定は、現在のところ 2001 年 5 月 10 日です。【スケジュール

Subject: Announcing the Cross Compiler Framework (Win32+Win64)
From: Erik van Pienbroek <erik at vanpienbroek.nl>
To: mingw at lists.fedoraproject.org
Date: Mon, 03 Jan 2011 23:30:34 +0100
X-Mailer: Evolution 2.91.4 (2.91.4-1.fc15) 
Reply-To: "Fedora MinGW (Windows cross-compiler) project"
<mingw at lists.fedoraproject.org>
Sender: mingw-bounces at lists.fedoraproject.org

Hi everybody,

In the last few weeks I worked on creating a method to easily build and
maintain RPM packages for both Win32 as well as Win64 targets. Adding
support for the Mac OS X target should also be easily possible. This has
resulted in a set of RPM packages which I would like to call the Cross
Compiler Framework.

This set of RPM packages brings various changes to the Fedora MinGW
world. The most important one is that the mingw-w64 toolchain is now
used instead of the mingw.org toolchain. The reason behind this change
is that the mingw-w64 toolchain provides support for both win32 and
win64 targets and is more actively maintained than the mingw.org one.

So what does this mean for all users and packagers of the current
mingw32 packages which are already in Fedora? First of all, the name of
the triplet has changed from 'i686-pc-mingw32' to 'i686-w64-mingw32'.
This means that commands like for example gcc are now named
'i686-w64-mingw32-gcc'. All mingw32 files are now also saved in the
folder /usr/i686-w64-mingw32 instead of /usr/i686-pc-mingw32. Helper
scripts like 'mingw32-configure' also still work and refer to the new
set of commands and paths.

Next to this, various packages have been renamed from 'mingw32-...' to
'cross-...'. This is used to indicate that the package in question
contain binaries for multiple targets. If a package has been renamed
from 'mingw32-...' to 'cross-...' then the original 'mingw32-...'
package will be obsoleted by the 'cross-...' one.

All current mingw32 packages should build just fine against this new
framework (or with minor patching)

There are two repositories published at the moment containing the
packages belonging to the cross compiler framework. One contains
binaries for both win32 and win64 targets while the other one also
contains binaries for Mac OS X. The Mac OS X pieces can't be added to
Fedora at the moment because of legal issues and the fact that some
binary blobs (from the Mac OS X SDK) were used.

All current mingw32 packages which have been in Fedora as of December 30
2010 have been added to the testing repositories. About 32 packages have
been ported entirely to the new cross compiler framework.

More details about this cross compiler framework including information
about the testing repositories and a porting guide can be found at
http://fedoraproject.org/wiki/MinGW/CrossCompilerFramework

My plan is to get all the packages belonging to the cross compiler
framework in Fedora 15, rebuild all current mingw32 packages and
rename/port various packages in order to have win32/win64 support. On
the link mentioned above there's a plan indicating the steps required to
get everything in Fedora. I'll open review requests for the 5 base
packages soon and I hope that somebody can review them quickly so we can
still make it in time for the Fedora 15 feature freeze (which is about 5
weeks from now).

Feel free to test the testing repositories and report back any issues
you might find. Other feedback about the cross compiler framework is
welcome too. Help with the reviews is very much appreciated as well!

Kind regards,

Erik van Pienbroek


_______________________________________________
mingw mailing list
mingw at lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/mingw

2011-01-02

Linux 用プリンタドライバ(2)

年ほど前に調べた情報があるのですが、調べ直しました。価格.com のサイトで、「プリンタ 製品一覧 売れ筋ランキングの高い順」で表示されるトップ 100 ぐらのプリンタから、メーカーをピックアップして、Linux 用のプリンタドライバが公開されているかどうか調べました。全部の機種を確認していませんが、最近の売れ筋プリンタのドライバもカバーされているようです。

[1] Epson Inkjet Printer Driver (ESC/P) for Linux | アヴァシス株式会社
[2] キヤノン:サポート|ソフトウエアダウンロード
[3] Linux プリンタードライバーのダウンロード|サポート|ブラザー
[4] RICOH Pro/IPSiO SP/imagio MP用 Linux CUPS用 PPDファイル / 製品情報 | リコー
[5] Linux対応について: OS対応状況: サポート: レーザプリンタ: プリンタ: 周辺機器: 製品 | NEC
[6] Printers by Manufacturer | OpenPrinting - The Linux Foundation (HP)