Following up on this morning post explaining how to get the kernel and minimal rootfs to run debian in qemu emulating an ARM1176 processor, I’ll show how to make a minimal rootfs to run Chrome browser in this platform.
I tested it in QEMU, but this should also run on the Raspberry Pi hardware.
First, you’ll have to complete the step I provided in Raspberry Pi Emulator in Ubuntu with Qemu.
sudo qemu-system-arm -M versatilepb -cpu arm1176 -m 256 -hda rootfs.ext2 -kernel zImage -append “root=/dev/sda” -serial stdio
Once you login to the console as root, create a new user (e.g guest):
This user will be needed to login with the graphical interface and ssh.
In order to get an Internet Kiosk, we’ll need a web browser (Chromium) and a window manger. I chose fluxbox instead of gnome because of the size difference (8651 KB vs 1739 MB).
I installed the required package in qemu with apt-get:
apt-get install xorg gdm fluxbox chromium-browser chromium-browser-l10n
Here’s the installed size for each package (and dependencies) according to apt-get:
- xorg – 27 MB
- gdm – 66.6 MB
- fluxbox – 8651 KB
- chromium-browser and chromium-browser-l10n – 228 MB
I’ve also installed dropbear to be able to access qemu via ssh.
Once everything is installed, there is only 759MB used.
df -h | grep rootfs
rootfs 3.0G 759M 2.1G 27% /
If we were to run this in an SD card as it would be the case wit the Raspberry Pi board, we would just have to add the kernel (2MB) and reserve space for the web browser cache. So a 1 or 2 GB SD card would most probably be sufficient to run this system.
Once, everything is installed, shutdown qemu and restart it.
sudo qemu-system-arm -M versatilepb -cpu arm1176 -m 256 -hda rootfs.ext2 -kernel zImage -append “root=/dev/sda” -serial stdio -redir tcp:2222::22
Note I added the redir option. This is to access the board (qemu) via ssh:
ssh -p 2222 [email protected]
where hostip is the IP address of the host running qemu.
After the board boots, you should get the login screen below after a while.
Now logging as guest, (don’t be confused by the grey screen) and right click to access the menu. Select Applications->Network->Web Browsing->Chromium to start Chrome.
If we want to autostart Chromium after login, edit /home/guest/.fluxbox/init and change the line with session.screen0.rootCommand to:
session.screen0.rootCommand: chromium-browser &
Missing features and known issues:
- Color problem (as seen on screenshot above). I’m not sure exactly what may cause this, probably a wrong colorspace has been selected.
- No flash support. Adobe/ARM apparently only support Cortex A8/A9.
- No java support. I tried to install sun java runtime, but apt-get could not find a candidate. Maybe it would be possible to install another implementation of java.
- Only support English for now. For other languages, some language packs and fonts would have to be installed.
If you want the binaries to try it out:
- zImage: http://dl.dropbox.com/u/45842273/zImage
- rootfs.ext2: http://dl.dropbox.com/u/45842273/rootfs-chromium.ext2.gz
The root password is ‘raspberry’, guest user password is ‘guest’.
Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
|Support CNX Software - Donate via PayPal or become a Patron on Patreon|