I've struggled quite a long time setting up the pdaXrom builder. Since building from within other distributions (I've tried Ununtu and Redhat) didn't work, I started a while back with pdaX86. I'm now finally able to build a complete personalised ROM. It's much easier to cross-compile software from pdaX86 because all host libraries are compatible with the target-Zaurus libraries.
In the good tradition of open source hereby my findings and detailed documentation written down along the way. Hopefully this helps others to setup a development environment quickly, being able to build an even better pdaXrom
I use Windows XP as my host system, and the
VirtualBox virtual machine running
pdaX86 as guest.
1. Setup VirtualBox in combination with pdaX86 - Create 2(!) virtual harddisks with 25Gb space each (dynamically expanding)
- Mount pdaXrom.iso as CD-ROM
- Start virtual machine and login to pdaXrom with 'root'
# fdisk /dev/hda -> Create new partition
# fdisk /dev/hdb -> Create new partition
# mkfs.ext3 /dev/hda1
# mkswap /dev/hdb1
# mount /dev/hda1 /mnt/hd
2. pdaX86 harddisk installation # setup-hd /mnt/hd
# reboot
IMPORTANT: unmount CD before reboot (in VirtualBox)
* On error: "Warning: unable to open an initial console." reboot with CD (mount in VirtualBox)
* Using Midnight Commander (mc from console), copy /dev into /mnt/hd/dev
* Reboot without CD (unmount in VirtualBox)
3. Initial setup # mkdir ~/zip
# mkdir ~/src
# mkdir ~/pdaXrom-builder
# mkdir ~/work
# startx
Now download some source packages to build the Subversion client, which we'll need to get the latest pdaXrom-builder.
- Download
Apache httpd-2.2.4 in ~/zip
- Download
openssl.org in ~/zip
- Download
Subversion and the dependencies package (
subversion-deps) in ~/zip
Extract the source code as follows:
# cd ~/src
# tar xjf ~/zip/httpd-2.2.4
# tar xzf ~/zip/openssl-0.9.8e.tar.gz
# tar xjf ~/zip/subversion-1.4.4.tar.bz2
# cd ~/src/subversion-1.4.4
# tar xjf ~/zip/subversion-deps-1.4.4.tar.bz2
4. Build OpenSSL # cd ~/src/openssl-0.9.8e
# ./config
# make
# make test
# make install
5. Build Apache # cd ~/src/httpd-2.2.4
# ./configure --enable-ssl --with-ssl=/usr/local/ssl
# make
# make install
6. Build Subversion # cd ~/src/subversion-1.4.4
# ./configure --with-ssl
# make
# make install
# make clean
# ./configure --with-neon=/usr/local
# make
# make install
7. Preparing the PdaXrom-builder environment # cd ~/pdaXrom-builder
# svn co https://pdaxrom.svn.sourceforge.net/svnroot/pdaxrom/trunk
8. Preparations for building the VirtualBox Linux Additions # cd ~/pdaXrom-builder/trunk
# ./configure i686-livecd-bootstrap ~/work http://distro.ibiblio.org/pub/linux/distributions/pdaxrom/src
The building system is now setup for pdaXrom livecd, target bootstrap
# cd ~/work
# uname -a
- Write down the exact kernel version
- Edit ~/work/.config
- Mark out the current kernel (in my case 2.6.17=y) and select the kernel version you just wrote down (in my case 2.6.15=y)
# make kernel_prepare
Answer all questions with the default option (just press Enter)
Select only drivers expected to compile cleanly (CLEAN_COMPILE) [Y/n/?] (NEW)
Legacy /proc/pci interface (PCI_LEGACY_PROC) [N/y/?] (NEW)
IP tables support (required for filtering/masq/NAT) (IP_NF_IPTABLES) [N/y/?] (NEW)
ARP tables support (IP_NF_ARPTABLES) [N/m/y/?] (NEW)
... lots more ...
# cd /opt/native/i686/3.4.6-2.2.5/bin
# ln -s ld i686-cacko-linux-gnu-ld
# ln -s as i686-cacko-linux-gnu-as
# ln -s ar i686-cacko-linux-gnu-ar
# ln -s nm i686-cacko-linux-gnu-nm
# ln -s objcopy i686-cacko-linux-gnu-objcopy
# cd ~/work
# make kernel_compile (on error try again)
# cd /usr
# mkdir src
# cd src
# ln -s ~/local/work/build/linux-2.6.15 linux
9. Install VirtualBox Guest Additions9a. Mount VBoxGuestAdditions.iso (in VirtualBox)
9b. Create file /etc/debian_verion which contains the text "4.0" (without parenthesis)
# mount /dev/cdroms/cdrom0 /mnt/cdrom
# cp /mnt/cdrom/VBoxLinuxAdditions.run ~/zip
# ~/zip/VBoxLinuxAdditions.run
Strangely enough, at this point I had to run following command manually, I don't know if this is normally needed:
# ~/zip/vboxadd.sh
10. Building the Cross Compile Toolchain # cd ~/pdaXrom-builder/trunk
# ./configure corgi-kernel-2.6-xtools ~/work http://distro.ibiblio.org/pub/linux/distributions/pdaxrom/src
The building system is now Setup for SHARP ZAURUS SL-C7x0/7500/860 pdaXrom, target xtools
# cd ~/work
# make virtual-xchain_install
# make archive-toolchain
# make clean
11. Building the ROM and all packages # ./configure corgi-kernel-2.6-rom
The building system is now Setup for SHARP ZAURUS SL-C7x0/7500/860 pdaXrom, target rom
# make world
Answer all questions with the default option
Support long options (--hctosys,...) (CONFIG_FEATURE_HWCLOCK_LONGOPTIONS) [N/y/?] (NEW) -> N
... lots more ...
# make image
That's all folks, have fun ...