Tag: linux
Gentoo on a Libretto 70CT
Disclaimer
This article and all information and products in it are provided on an "as is" basis, without warranty of any kind, either express or implied. Your use of this article is at your own risk.
Introduction
This article describes an attempt to install modern stable Gentoo on quite an ancient laptop (actually a netbook according to the modern naming convention) – Toshiba Libretto 70CT. The device is almost 18 year old now. It was released on 29 Oct 1997 (in Japan). The specs of the notebook can be found here. Let me mention some facts to describe how really ancient it is:
- It does not have a PCI bus. Sound chip is connected via ISA. Video chip is connected via VLB. The PCMCIA slot supports only 16-bit cards (not CardBus).
- BIOS does not support ACPI, only APM.
The results of this attempt are described below. You will also find there the customized rootfs archive available for downloading.
Hardware support
- linux kernel version 4.0.5 supports almost all the Libretto hardware: keyboard, pointing stick, display, IDE storage device, PCMCIA controller and so on. The rootfs contains both the kernel sources and the config file in
/usr/src/linux. - There was a small issue with APM support, related to switching CPU from real mode to virtual mode. First of all, in case of using GRUB2 bootloader, the kernel must be loaded via linux16 command instead of linux. Besides that, I had to patch the kernel in order to make it detect APM support in BIOS. After that apm started working. Use
apmto see the battery status. Use commandapm --suspendto hibernate the device via built-in hibernate feature. - __hostap_cs__ driver provides support for WiFi cards. Even WPA2-networks are supported. Tested with Zonet ZCF1100.
- libapm program allows to configure BIOS settings like brightness of the LCD, standby time, power-on time, volume of beep sound, etc. In order to compile it with gcc-4, the following patch must be applied: patch.
- dispswitch program allows to enable external display connected via docking station. In order to compile it with gcc-4, the following patch must be applied: patch.
- ALSA supports the audio chip Yamaha OPL3-SA3 without any problems. The only thing that I had to configure was the kernel module parameters.
- X-server is installed and configured. It was quite tricky to make it work on the Libretto. First of all, VLB support was removed in xorg-server-1.8.2. My attempt to ‘frontport’ it to modern xorg failed, because I figured out, that VLB support was based on other subsystems, which were also removed long ago. That’s why I decided to compile
X11R6.9statically. It still works fine with modern client application, because the protocol is very stable.
The only thing I could not make work is the fullscreen 320x240 graphics mode. The driver for CT F65550 from X11R6.9 does not support it. Besides that, all the hardware I tried to configure works fine with modern GNU/Linux.
Not tested hardware
I haven’t tried to configure the hardware listed below. Therefore I can’t say whether this hardware is supported on modern Linux.
- IrDa port.
What packages are installed
Here is the full list of installed packages (equery l). It includes the following ones:
vim gcc gdb urxvt mplayer mpc mpd geeqie gftp pidgin openbox claws-mail netsurf stardict prboom
How to install
The rootfs tarball requires at least 4Gb of storage. The default HDD from Libretto 70CT is not enough. Besides that, it’s not trivial to connect an IDE HDD to modern computer. That’s why I recommend to use an IDE-to-CF adapter with 8Gb CF card. The instruction below assumes that a CF card with adapter is used.
- Remove CF card with IDE adapter from Libretto and connect the CF card to some other Linux computer, which will be used as a host environment for Gentoo installation.
- Create MBR partition table on your CF card. After that create two partitions on it. The second partition will be used for swap (I use 100Mb for swap). So let the first partition fill all the available space except swap. Format the first partition of your SD card as ext2 and the second one as swap.
This manual from gentoo wiki explains how to create partition table and partitions. - Download the rootfs tarball: gentoo-rootfs-20170316.tar.bz2 (1.4 Gb).
- Extract the rootfs to the first partition:
tar xvpf gentoo-rootfs-20170316.tar.bz2 -C /mnt/<your-mnt-dir> - Use this manual from gentoo wiki to chroot to the rootfs:
/mnt/<your-mnt-dir>. - Install GRUB2 bootloader on the CF card using this manual from
gentoo wiki. - Leave chroot environment and unmount rootfs partition from the host system.
- Insert the CF card with the adapter into your Libretto and reboot the machine.
The root password is 1.
Gentoo on a Zaurus PDA
Introduction
This is a Gentoo rootfs archive customized for SL-C1000 models. It may also be useful for owners of the C3x00, but some adjustments will probably be necessary to make it work on these models (like kernel recompilation).
This article and all information and products in it are provided on an "as is" basis, without warranty of any kind, either express or implied. Your use of this article is at your own risk.
Description
The distribution is originally based on stage3-armv5tel-20090623.tar.bz2. The following is configured:
- Added spitz keyboard layout (calendar key toggles langugage).
- All packages are recompiled with
-O2instead ofOs. - USB network.
- WiFi network.
- BlueTooth network (via ppp).
- IrDa network (via ppp).
- The kernel 2.6.24 is compiled with appropriate patches and config.
- The mail led indicates SD card activity.
- Locale is set to
ru_RU.UTF-8. - Timezone is set to GMT +3 (Moscow).
- procps is recompiled with the Debian patches, which fix the ‘Unknown HZ value’ error.
There are two ways to load the kernel: directly (without a bootloader) or via kexecboot. In the first case you need to flash the kernel (see the manual below). Both versions use the first partition of SD card as root.
The following packages are installed:
alsa-utils bluez-utils dhcpcd elinks (with the Debian patches) zgv gentoo-sources gentoolkit mpc mpd mutt pcmciautils pidgin ppp sdcv syslog-ng vim wireless-tools
Here is a complete list of packages (equery l).
Notes:
- There’s no Xorg, because Zaurus is too slow for running it in my opinion.
- The system works quite stable, but optimization for iwmmxt is disabled because of the kernel issue.
/usr/portageis removed from the tarball in order to reduce its size. You can download it from here.- The tarball contains the kernel sources with all the patches applied and the config file (in the
/usr/src/linuxdirectory).
How to install
Kernel (skip this part if you use the kexec bootloader).
- Format a CF or SD card with
mkfs.msdos -t vfat -F 16 /dev/<your-dev-name>. - Put the following files into the root directory of the card:
- zImage.bin (1.2 Mb)
- updater.sh (13 Kb)
- Turn your Zaurus off using
halt. - Connect the Zaurus to A/C power.
- Hold the ‘OK’ button and press the power on/off button.
- You should see a menu. Select the option #4 and then either 1 or 2 depending on your flash card type. Confirm the kernel installation by selecting Y.
- Wait till your Zaurus reboots and displays the error
Unable to mount root fs.
Rootfs
- Download the rootfs tarball: gentoo-rootfs-20100627.tar.bz2 (206 Mb).
- Format the first partition of your SD card as ext2 or ext3.
- Extract the rootfs to this partition (
tar xvpf gentoo-rootfs-20100627.tar.bz2 -C /mnt/<your-mnt-dir>). - Insert the SD card into the Zaurus and reboot the machine.
WPA2
The rootfs provided above uses the orinoco driver for Prism-based WiFi cards. I recently figured out, that the kernel 2.6.24 already contains a better one – hostap. This driver support WPA2 and the Master mode (for making WiFi AP).
So I recommend to disable CONFIG_HERMES and enable CONFIG_HOSTAP instead. This will be done in any future rootfs release.
Besides the hostap driver, WPA2 support also requires relatively new firmware. If your Prism-based WiFi card has too firmware version, you will need to update it. Here is a very detailed manual describing how to reflash Prism chipset. The utilities and the new firmware (version 1.8.2) can be downloaded from here.
WARNING: I haven’t tested flashing by myself. I use Zonet ZCF1100 with the firmware 1.8.0, and WPA2 works fine. Please read the manual very carefully and think twice before flashing.
Mirrors
Zaurus-dedicated websites are slowly dying. Therefore I decided to make a local mirror of some information I considered useful:
- Cacko (firmwares files, feed, sources, etc)
- pdaXrom (firmware files, fee, sources, etc)
- Datasheets for Zaurus’ hardware
- Yonggun’s kernel (zImages, modules, sources, config)
- Kexecboot bootloaders (installkits)
- Mplayer (sources, patches, ipk-packages)
- NAND backups
- OpenZaurus patches for linux-2.6
- OpenBSD port (manuals, kernel, packages, etc)
- NetBSD port (manuals, kernel, packages, etc)
Isses/ToDo
- Cpufreq – apply the
cpufreqpatch for pxa27x to enable frequency scaling. - QVGA – pdafb supports QVGA mode, try to configure it (may be useful for games).
- Touchscreen jittering – the problem seems to be caused by invalid hsync length received by the touchscreen driver from
pxafb. Need to investigate it. - Netsurf seems to be the most powerful web browser for framebuffer. Try it.
Changelog
- 16 Feb 2015
Added local mirrors.
Added note about WPA2.
Added ToDo/Issue list. - 27 Jun 2010
Packages are updated to the current date.
Returned from moc back to mpd, switched from ALSA to OSS to avoid freezing of the daemon.
fim is removed, because zgv is much faster. - 10 Jan 2010
Installed a simple drawing tool called zketcher.
Installed another image viewer called fim.
The kernel is slightly modified in order to block handling of the power key when lid is closed and make touch screen work a bit cleaner. - 04 Oct 2009
Packages are updated to the current date (including glibc).
GPM is installed, works through tslib, useful in elinks.
SDL is patched with the screen rotation support (viaSDL_VIDEO_FBCON_ROTATION).
fbi is replaced with zgv, which is faster, can zoom, etc. - 24 Jul 2009
First public release.
Gentoo on a Pandora
Introduction
This article describes a Gentoo rootfs archive customized for the Pandora handheld device.
This article and all information and products in it are provided on an "as is" basis, without warranty of any kind, either express or implied. Your use of this article is at your own risk.
What is configured
- All packages are recompiled with OMAP3-preferable flags.
- Added the Pandora keyboard layout. It’s a bit different from the official layout. Here‘s what it looks like.
- WiFi network. There is one annoying bug in the wl1251 modules described here. Fixed in a quite brutal way.
- The kernel is compiled with appropriate patches and config. The tarball contains both the kernel sources and the config file in
/usr/src/linux. - X.Org with all the relevant drivers: omapfb, keyboard (including DPad and power switch), touchscreen, nubs, external keyboard and mouse.
- OpenBox (a window manager). The key shortcuts include these two:
Pandora_keyshows menuFn+Pandora_keyshows status information
- Added few Pandora-related scripts: to control brightness, to change CPU clock, to reset nub, to emulate low power mode, etc.
- Added few eyecandies: wallpaper, cursor and themes.
- Locale is set to
ru_RU.UTF-8. - Timezone is set to GMT +3 (Moscow).
- The maximum CPU OPP is set to 5 by default.
- The default user is
vminko, no password. The root password is1.
What packages are installed
Here is the full list of installed packages (equery l). It includes the following ones:
vim urxvt midori pidgin sylpheed gftp mpd gimmix mplayer gpicview xournal stardict
epdfview xrick supertux numptyphysics
The local overlay includes the following packages:
games-action/openlierox– Differs from the default package in that the cursor drifting is fixed.games-arcade/supertux– Differs from the default package in that 800×480 resolution support is added.games-arcade/xrick– Differs from the default package in that joystick support is added, incorrect fullscreen mode and freezing on exit are fixed. See this bug for details.games-puzzle/numptyphysics– A drawing puzzle game (new package).media-video/mplayer– An mplayer package based on the source code from the Maemo repository. It works much better than the default one: plays everything (mp4/theora-vorbis/h264/flv) and does not crash.media-video/omap3-sgx-modules– Kernel drivers for the PowerVR SGX chipset (new package).net-wireless/pandora-firmware– Binary firmware for the Bluetooth and WiFi modules on the Pandora (new package).net-wireless/wl1251-modules– Kernel drivers for the TI WL1251 WiFi chip found on the Pandora (new package).sys-kernel/pandora-sources– Pandora kernel sources (new package).sys-process/procps– Differs from the default package in that the annoying ‘Unknown HZ value!’ error is fixed. See this bug for details.x11-base/xorg-drivers– Differs from the default package in that the omapfb video driver is added.x11-drivers/xf86-video-omapfb– X.Org driver for TI OMAP framebuffers (new package).
What does not work
DSP since it requires the kernel version 2.6.32+, but we’re currently stuck at 2.6.27.
PowerVR chip since the only driver we have is closed source and I decided not to use it. However, the appropriate ebuilds are available here.
How to install
- Download the rootfs tarball: gentoo-rootfs-20110115.tar.bz2 (317 Mb).
- Format the first partition of your SD card as ext2. The SD card capacity should be at least 4Gb.
- Extract the rootfs to this partition (
tar xvpf gentoo-rootfs-20110115.tar.bz2 -C /mnt/<your-mnt-dir>). - Insert the SD card into the Pandora and reboot the machine.
/usr/portage is removed from the tarball in order to reduce its size. The latest portage snapshot is available here (37 Mb).
Useful links
- If you are not familiar with the distribution, you may want find this helpful: Gentoo ARM handbook.
- Here is a video demonstration of Gentoo running on the Pandora.
- Neuvoo – a project focused on adaptation of the Gentoo to various OMAP3-based platforms including Pandora.










