Help - Search - Members - Calendar
Full Version: Pdaxrom Builder Setup Guide On Windows Host
OESF Forums > Distros, Development, and Model Specific Forums > Distro Support and Discussion > pdaXrom
cortez
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 tongue.gif

I use Windows XP as my host system, and the VirtualBox virtual machine running pdaX86 as guest.

1. Setup VirtualBox in combination with pdaX86
CODE
- 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
CODE
# 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
CODE
  # 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:
CODE
  # 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
CODE
  # cd ~/src/openssl-0.9.8e
  # ./config
  # make
  # make test
  # make install

5. Build Apache
CODE
  # cd ~/src/httpd-2.2.4
  # ./configure --enable-ssl --with-ssl=/usr/local/ssl
  # make
  # make install

6. Build Subversion
CODE
  # 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
CODE
  # cd ~/pdaXrom-builder
  # svn co https://pdaxrom.svn.sourceforge.net/svnroot/pdaxrom/trunk

8. Preparations for building the VirtualBox Linux Additions
CODE
  # 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 Additions
9a. Mount VBoxGuestAdditions.iso (in VirtualBox)
9b. Create file /etc/debian_verion which contains the text "4.0" (without parenthesis)
CODE
  # 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:
CODE
  # ~/zip/vboxadd.sh

10. Building the Cross Compile Toolchain
CODE
  # 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
CODE
  # ./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 wink.gif ...
pelrun
I used the beta4 pdaX86 iso at: ftp://ftp.ibiblio.org/pub/Linux/distribut...aXrom-nosmp.iso

No need to go through all that hassle (building Apache? Seriously?) to get svn, it's included. Still has that /dev bug though...

(It's also fine for the 2.4 toolchains too, that's what I'm using it for)
kkazakov13
Building was always so painfully slow on my system ... now that I upgraded to core2duo + 2gb ram ... soon i might reserve some time to install the builder again.
shula
I remember running a Zaurus real ARM virtual-machine on QEMU or on VirtualBox, but i might as well just dreamt it :-) as i sometimes dream of technical desires.

Is there such thing as virtual zaurus machine running in x86 host?
Meanie
when I get time, I will build a vmware image with pdaXrom builder and cross-compilers ready to go.
my company just bought me a Toshiba Tecra M5 with Centrino Duo processor, 4GB RAM and 100GB HDD, etc...
damn thing is so heavy compared to my Z, but it got lots of RAM and other useful features...not sure what I am gonna do with it. maybe just leave it at under my bed or carry it around everywhere...
desertrat
[quote=cortez,Jul 9 2007, 11:26 AM]
1. Setup VirtualBox in combination with pdaX86
CODE
- Create 2(!) virtual harddisks with 25Gb space each (dynamically expanding)
Presumably you've used this setup for a little while now, how much space does it actually use? I want to setup something similar but can only spare about 10GB of space.
cortez
QUOTE(desertrat @ Jul 11 2007, 10:22 AM)
Presumably you've used this setup for a little while now, how much space does it actually use? I want to setup something similar but can only spare about 10GB of space.


Currently roughly 1Gb for the first partition and 1Mb for the swap partition. Make sure you reserve enough space, because there's nothing more frustrating than a "no space left on device" error sad.gif
cortez
Just to make sure we understand each other correctly:
In Windows the virtual image file currently is rougly 1.5Gb in size
The Virtual machine (linux) reports a disksize of 25Gb, from which 10Gb is in use.
desertrat
QUOTE(cortez @ Jul 12 2007, 08:44 AM)
Just to make sure we understand each other correctly:
In Windows the virtual image file currently is rougly 1.5Gb in size
The Virtual machine (linux) reports a disksize of 25Gb, from which 10Gb is in use.

Does that mean the virtual image file is compressed? Anyway I've setup a vmware virtual machine with 4GB virtual drive - 3.5GB for the system and 500MB for swap. I've just completed the "setup-hd" part and rebooted, df inside the newly booted pdaxrom shows 613MB being used. I'll post an update when I've progressed further.
Meanie
QUOTE(desertrat @ Jul 12 2007, 07:07 PM)
QUOTE(cortez @ Jul 12 2007, 08:44 AM)
Just to make sure we understand each other correctly:
In Windows the virtual image file currently is rougly 1.5Gb in size
The Virtual machine (linux) reports a disksize of 25Gb, from which 10Gb is in use.

Does that mean the virtual image file is compressed? Anyway I've setup a vmware virtual machine with 4GB virtual drive - 3.5GB for the system and 500MB for swap. I've just completed the "setup-hd" part and rebooted, df inside the newly booted pdaxrom shows 613MB being used. I'll post an update when I've progressed further.
*



usually there are two modes, one the space for the virtual disk is preallocated at creation time, ie if you create a 10GB virtual disk, that much space is used to create it from your HDD. alternatively, a virtual disk can also dynamically allocate the space and only does so when it is needed. in this mode, a 10GB virtual disk will only consume as much from the real HDD as is actually used by the files on it and when it needs more space, it is dynamically allocated, so if you create a 10GB virtual disk and put 1GB of files onto it, only 1GB is allocated to it from the physical disk. the os in the virtual machine will always say that the disk is has is 10GB in size.
desertrat
QUOTE(Meanie @ Jul 12 2007, 12:50 PM)
... a 10GB virtual disk will only consume as much from the real HDD as is actually used by the files on it and when it needs more space, it is dynamically allocated ...
I knew all that smile.gif But my reading of this:
QUOTE
The Virtual machine (linux) reports a disksize of 25Gb, from which 10Gb is in use.
Is that the guest OS, ie inside pdaxrom, it is already using 10GB out of the allocated/pre-allocated 25GB. However the host OS is reporting that only 1.5GB of real disk space is being used:
QUOTE
In Windows the virtual image file currently is rougly 1.5Gb in size
Which implies some real heavy duty compression is taking place or something. But that's not important right now, since I already installed it I'm going to play around with it and see if I eventually run out of space smile.gif

But my immediate concerns right now is that pdaxrom under vmware has a tendency to lose my mouse pointer. I've got a Win98 and WinXP running under vmware and have tried loads of different linux distros using it and have never come across a disappearing mouse pointer before sad.gif I think I'll just stick to the console for the moment - no scratch that, I'll use ssh.

Meanie, when you get round to making an updated pdaxrom ISO, could you please add some essential utils to it? At least add less and vim. Using more is a pita, and all versions of vi that I've used on practically all manners of systems suffer from corrupt display - after a little bit of editing the display does not reflect the actual contents of the file.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.