In my previous series of blog entries I described how to manually create a Debian Installation for your hx4700 and how you should configure it, to get an optimal result. I believe that some people might be interested in this, but fear to do everything on their own or just don’t have the time to do so. Due to some requests I created an (almost) ready to use image. It’s mostly the result you would get by going through all the chapters from 0 to 4, with some little enhancements. Please keep in mind that I may not have enough time to provide all new findings as updates to the image and that you may need to follow some steps from the tutorial to get the best experience.
1. General information about the image
If you didn’t take a look at the last chapters, I will give you a short summary about the image in a Q&A style.
No, this image is based on a debootstraped debian wheezy installation which uses only lightweight packages (whenever it’s possible). I manually selected most of the installed packages and created an own desktop enviroment instead of just using a common one. The limited hardware (64 MB RAM, slow disk access) is not powerfull enough to use a standard desktop enviroments like LXDE or XFCE.
You can run any open source linux software on it (if the hardware is not too limited for it) and you will still get updates for your system. There are also some hardware enhancements, because the hardware is capable to provide more features than windows supports natively. The main enhancements are a high screen resolution (480×640 pixel), support for SDHC cards (SD cards >4 GB) and the possibility to use modern wifi encryption standards (WPA 1/2 and even WPA (2) Enterprise).
Debian is not optimized for touchscreens and you sometimes need some tricks to access all functions (like the emulation of a right click), but this is not a big problem. More problematic is the fact that Windows CE/Mobile software was optimized for small screen sizes, but debian software was written for desktop PCs. Some programs will take a long time to load, are very slow or simply don't fit on the screen.
Well, the main difference is that the other projects are created from source which is heavily patched to get the optimal experience on the hx4700. This is good for the user experience, but has many disadvantages if you want to use software, which is not supplied in the prepared image. You need to compile other programs on your own and they may require some patching as the available libraries are sometimes different than the ones used on desktop distributions. The other disadvantage is that you won't get any updates if their development freezes, which happens quite often. When using my image you can still use the normal debian package system to keep your software up-to-date and I doubt that debian will stop existing in some months .
Take a look at chapter 0.
There is a nice overview in chapter 0.
The image has only a small set of programs installed, so you can decide on your own, how you are using your remaining disk space. The installed programs are:
- Dillo (configured as default browser)
- netsurf (another browser)
- Xfe, Xfwrite, Xfview, Xfpack (Filemanager, Texteditor/viewer, tool to create/extract archive files)
- SpeedCrunch (an advanced calculator)
- Alsamixergui (a tool to configure the channels of the audio device)
- DeadBeef (an advanced audio player)
- urxvt (configured as default terminal)
- some smaller utilities like htop, xcalc, …
This should give you the possibility to do the most important things without installing additional software.
- MD5: 54ccb2b0f9625a70f35ccda9d9810d4dSHA256: 964ad1afd549f12e74d28fdfae8d4777d21c2bac2e95f7af4514b2872ceb6380Size: 2,0 MBKernel zImage
- MD5: 0eac75ea04a9d7cd2dc079329297b69aSHA256: 19251884297818382e2e59f79cfdce4610b082b1d884e6afbd5d1667aacee14bSize: 153.41 MBimage with clean apt-cache
- MD5: 9ef68e73c66ade2cd5826697486425e8SHA256: f8567a09a56917c728be0165a877f36d4e85dbf91f5f7eb731f3e9544babee01Size: 327.47 MBimage with full apt-cache
2.2. Installation of the bootloader
If you want to keep your windows installation, you can try to use the haret bootloader. Find a copy of haret and follow an (untested!) comment of mine below this article.
2.3. Format your SD/CF Card
My image is too big for the internal storage and must be installed to a SD/CF card. Before we can do this, we need to format the card. Follow this tutorial to find out how. Don’t forget to setup a swap partition as the memory of the device is too small to run Debian without swap.
2.4. Copy image to SD/CF card
Download one of the images and copy it to your card by executing:
sudo tar -C MOUNTPOINT -xvpJf IMAGENAME
Replace MOUNTPOINT with the mountpoint of the system partition on your SD/CF card and IMAGENAME with either image.tar.xz or image-clean.tar.xz.
2.5. Correct Mountpoints
I configured the image for using a SD card, but you just need to do change two files to use it on a CF card. My image expects the swap partition to be the second partition of a SD card. To use the second partition of a CF card, open /etc/fstab and change it to:
rootfs / auto defaults 1 1 /dev/sda2 none swap sw 0 0
You should also change /etc/udev/rules.d/automount.rules, if you are using a CF card as root file system, to automatically mount SD cards:
ACTION=="add",KERNEL=="mmcblk0*", RUN+="/usr/sbin/automount.sh %k" ACTION=="remove", KERNEL=="mmcblk0*", RUN+="/usr/sbin/autounmount.sh %k"
2.6. Wifi firmware
For legal reasons I can not include the wifi firmware in the image. To use wifi, you need to download RADIO0d.BIN, RADIO11.BIN and WLANGEN.BIN from the SDG website and copy the files (as root) to /lib/firmware on your card.
2.7. First Boot
Now you are ready to boot the system for the first time (put the SD/CF card in the device and reset it). After the SDG Bootloader screen, you should see the kernel messages scroll down.
If you are using a SD card and getting the error “Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)“, then you may need to increase the rootdelay option in your bootloader. The SD card is accessed asynchronously: The kernel sends a command to read the partition table and does not wait for the answer. If the answers takes too long, the kernel will tell you that it can’t find the root filesystem. The respond time may differ, so it just might work if you reset the device.
The first boot might take a bit longer as normal, because the prepared image has never been booted and may create some new files on the first boot. When you start the image for the first time (and only for the first time), a quick&dirty written installer will guide you through the necessary steps to enable all functions.
This may take some minutes, but otherwise you are missing some fundamental stuff (like an ssh server). Most of the setup routines, can be used by tapping on the required field, but some programs require you to use the on-screen-keyboard (it will appear 2-3 seconds later). To alter the time/date, tap on the field you want to change and use the up and down keys on the keyboard to manipulate the values.
There is a bug when activating wifi for the first time, which prevents it from working, so take a look at the known bug list at the end of the page. After completing all steps, you can start using programs or connect to your pda via ssh. If you want to use the usb wired connection as ethernet device, you may need to change the settings of the network manager (it expects a dhcp server running on the remote usb host). Please don’t forget to change all passwords!
3. Speicific details about the image
3.1. Passwords and keys
You should definitely change them before connecting to an insecure network. The dropbear (ssh-server) private keyfiles were removed from the image and will be generated during the installer process.
3.2. Additional libraries
Some libraries, which are necessary to use all preinstalled software, were not included in the image, because they may be covered by patents and illegal to distribute in some countries. At the moment this is only problematic for DeadBeef (audio player). The installer will install the necessary libraries for you. If you prefer to do it manually, use:
apt-get install libfaad2 libavcodec53 libavutil51 libavformat53 libmad0
to install them.
3.3. Manually running the installer again
If you want to run the installer again just execute:
If you want to run the installer on the next boot just delete (as root) the file /etc/hx4700_setup.
The installer allows the configuration of important system functions and creates a hole in the security concept of debian, so you may want to prevent a normal user to start the installer by removing it from the sudoers file /etc/sudoers.
3.4. Enable sound
The sound is muted after the installation. You must start the alsamixergui and tap on the speakers above “Mono 2 Enable”, “Left Out”, “Right Out” to enable the internal speakers and headphones (only one is active at a time). You should also raise the master volume level, because the sound is only noticeable (at least with the internal speakers) if the master volume is above ~65%. You can click on the padlock above the text, to control both channels (left & right) at the same time.
3.5. Known bugs and problems
If you activate wifi for the first time, the network manager does not find any wifi hotspots. You can simply solve this problem by re-enabling the wifi device by executing twice: Menu -> hx4700 -> Toggle Wifi.
I don’t have any workaround yet. The long time solution should be to patch randr support into the framebuffer driver instead of restarting the xserver.
Obviously there is a bug since kernel 3.6, which turns the screen white instead of turning it off after some time. We should take a look at the changes from kernel 3.5 to kernel 3.6 to find the regression.
If you try to put the device into sleep mode (as root: echo “mem” > /sys/power/state) the kernel is unable to recover the filesystem if you are using a SD card. The kernel is not able to wake up the SD card and will fail with a kernel panic. The backlight of the screen didn’t turn on either (I am not sure, but i thought this worked with kernel 3.6), so it may be hard to see the errors (you only see them if you are not running a xserver). I cannot test it myself with a CF card, because I dont have one, which would be big enough for the image.
- The wifi driver is not completely stable yet. The image contains a patched version of wpasupplicant (see my previous blog entries), but this doesn’t guarantee that everything works always.
- Bluetooth doesn’t work. I found a solution for this problem after creating the Image, sou may need to manually follow the steps in chapter 3 to get bluetooth working.
- Fast Infrared (FIR) might not work as I couldn’t test it. This may only affect the speed, normal IrDA works.
- Video hardware acceleration not supported yet
- There is no way to control the brightness of the backlight
The image is not intended to be used as a multiuser setup, because there is no way to choose a user during the boot process. You would also need to change the sudoers file by replacing the allowed user with a user group. Additionally the bash scripts should be checked again to ensure, that they cannot be used to get root rights.
4. Additional Information & Questions
If you want to get more information about this image, take a look at the project info page, which contains links to the hx4700 related articles. The chapters 0 - 4 will describe the parts of the system much more precisely than this summary. If you have any questions, tips or just want to share your experience with this image, feel free to write a comment.