Q19: I am using a C3x00, and I want to use kernel 2.6.23.1 yonggun with uboot. How can I install Debian EABI on SD?
From OESF
Q19: I am using a C3x00, and I want to use kernel 2.6.23.1 yonggun with uboot. How can I install Debian EABI on SD?
A19: The installation comes in five parts:
- Prepare the SD;
- Install the EABI rootfs;
- Install uboot;
- Flash the kernel
- System configurations
PREPARATION
1. Prepare the SD card
[Note: If you are already using the new pdaXrom versions using uboot, you can simply repartition and reformat the internal drive, without using the method below. Go directly to II)]
2. Boot into Linux Emergency Mode
a. Remove power sources,
b. Press B and D while putting back the battery & lock the cover switch & power on.
c. In the command prompt, login as root.
3. Repartition the internal drive using fdisk /dev/hda
( http://www.oesf.org/index.php?title=Multiple_partitions_on_a_CF_/_SD_card ). Create two partitions. /dev/hda1 is the root partition (ext3); /dev/hda2 is the swap partition (default ~180.9MB in Debian CD installation, but you can make a bigger swap partition if you want to run very resource-hungry programs, or do onboard compilation).
4. Reformat the two partitions:
mke2fs -j /dev/mmcblk0p1 mkswap /dev/mmcblk0p2
SYSTEM INSTALLATION
5. Extract the system rootfs tarball, kernel modules and after installation files to the SD card
mount /dev/mmcblk0p1 /mnt/card
Plug in the CF card with armel-root-fs.tar (first uncompress the .bz2 format), modules-2.6.23.1-yonggun.tar.gz, and zaurus-debian-eabi-afterinstall_1.1.tar.gz
cd /mnt/cf cp armel-root-fs.tar modules-2.6.23.1-yonggun.tar.gz zaurus-debian-eabi-afterinstall_1.1.tar.gz /mnt/card cd /mnt/card tar -xvpf armel-root-fs.tar cd armel-root-fs mv ./* ../ cd .. tar -xvpzf modules-2.6.23.1-yonggun.tar.gz tar -xvzf zaurus-debian-eabi-afterinstall_1.1.tar.gz rm -r armel-root-fs armel-root-fs.tar modules-2.6.23.1-yonggun.tar.gz zaurus-debian-eabi-afterinstall_1.1.tar.gz
UBOOT INSTALLATION
6. Install uboot (adapted from http://www.pdaxrom.org/?q=node/106 )
If your Zaurus is already using uboot, go directly to 7.
Fresh installation on Zaurus with Sharp bootloader (applicable to Sharp rom, Cacko rom, pdaXrom 1.1.0 Beta 1/Beta3, pdaXii, Angstrom)
a. Download and unzip the u-boot archive to CF, you will see FOUR files: emergenc.img, u-boot.bin, updater.pro and updater.sh
b. Remove baterry, wait 5 secs, place battery and attach AC power.
c. Press "OK" key and keep it pressed, then press "On/Off" button.
d. In the maintenance menu, choose "4" (Update) in the first screen, "1" (CF) in the second and "Y" in the third
e. The kernel will be flashed
f. Press and hold [OK] during reboot - emergency system will boot up
KERNEL INSTALLATION
7. Flash the kernel in the uboot emergency system
7.1 Eject the CF card and remove all the uboot installation files on the CF card.
7.2 Download and copy kernel.img-2.6.23.1-yonggun-eabi-cpufreq-hda1 (rename to kernel.img) and autoboot.sh (simply remove the tar.gz extension; it is just a plain text file) and put them on the CF card.
7.3 Reboot the Zaurus while pressing the [Ok] button.
7.4 In the uboot emergency system, you will be asked "Proceed with debian installation or boot to emergency system? [y/n]". Press [y] and [Enter]. The new kernel flashing process will start and complete very quickly.
After reboot, your Z will be running Debian EABI!
[NOTE: Press [1] when (re)booting]
FIRST BOOT & SYSTEM CONFIGURATIONS
Note: The first booting may fail and complain about being "unable to open an initial console". If that is the case, boot into the Linux Emergency mode and do this:
mount /dev/hda1 /mnt/cf cd /mnt/cf/dev MAKEDEV console
After that, reboot again. (Press [1] when boot starts)
8. First login
Login: root Root password : (no password)
9. Set up date and time
date MMDDHHMMYYYY ##Example: 102906572007
10. The first part of after installation configurations
The after installation process is divided into two parts. Now let's do the first part.
[Note: The after installation scripts (1st-cfg.sh and 2nd-cfg.sh) are intended to be applied only once to a clean, fresh install before any tweaking. Mixing any other different tweak with the application of these scripts may produce unexpected results.] Do this and follow the instructions:
cd ../afterinstall ## Use the [Tab] key to help you get "/" ../afterinstall/1st-cfg.sh
When the process completes, you will be reminded to set up a proper network connection before proceeding to the second part.
11. Set up network connection
11.1 Edit the network connection profile
nano /etc/network/interfaces.
For example, for my Symbol Spectrum 24 wifi CF with a static IP in a home network:
auto lo iface lo inet loopback auto eth2 # iface eth2 inet dhcp allow-hotplug eth2 iface eth2 inet static address 192.168.0.199 network 192.168.0.0 netmask 255.255.255.0 broadcast 192.168.0.255 gateway 192.168.0.1 wireless-essid DON'T_BE_STUPID wireless-key I_KNOW_YOU_KNOW_THAT wireless-mode managed dns-nameservers 192.168.0.1
11.2 Edit gateway
nano /etc/resolv.conf
Simply put down your router's IP, e.g.
192.168.0.1
11.3 Reload the network profile
/etc/init.d/networking restart
11.4 Plug in your wifi CF card if it isn't in the slot yet.
11.5 You can do a very simple test to see if your network connection is working:
For example, if your Zaurus is connecting to a wireless router, then do
ping 192.168.0.1 ##Or the correct IP address of the router ping www.google.com ##This will make sure that your Zaurus can connect to the internet
If ping doesn't report any package loss, then you are ready to proceed to 12.
12. Now we begin the second part of the after installation process.
Go to the afterinstallation directory again. Then
./2nd-cfg.sh
When asked to confirm whether you want to install anything, just type [y] and [Enter]. After this, a fully working EABI system is set up. Time to play!
That's it. Have fun!
CHANGE KERNELS
If you want to switch to other kernels,
a. First extract and copy the corresponding kernel modules to /lib/modules
b. Prepare the correct kernel image (zImage.bin) and updater.sh and install them in the Uboot Emergency Mode again.

