Installing Linux on your MobilePro 900C – testers only

Version 0.4 06-november-2007

Version 0.5 12-november-2007 pointers to kernel and userlands changed

Version 0.6 12-november-2007 small changes added lines mkvfat and mkext2

Version 0.7 28-november-2007 small changes added lines mkdosfs and mke2fs, pointers to 

  DamnSmallLinux and VMware player.

Install guide with LOTS of pictures.

Written by Michel Bel – Michel (at nospam) belxs (dot nospam) com

Any comments/improvements  invited

Step -1: READ THIS FIRST

Disclaimer:


YOU WILL BE USING UNCOMPLETED SOFTWARE ON YOUR OWN HARDWARE. YOU WILL BE ALPHA TESTING!

YOUR HARDWARE MAY BECOME UNUSABLE. DO NOT CONTINUE IF YOU DO NOT WANT TO TAKE THAT RISK.

BY FOLLOWING THE STEPS BELOW YOU TAKE FULL PERSONAL RESPONSIBILITY FOR THE CONSEQUENCES.


Everything below is for testing only!! You take full responsibility for anything that happens to your system by following the steps detailed below, and any subsequent or related actions.

Your system may stop working if you experiment with writing to flash memory!!

I have tested everything, and have had no problems yet, but there is no guarantee.

By reading on you accept this.


DO NOT WRITE TO MTD DEVICES ON THE 900C!!! ( If you don’t know what this means, don’t try to find out yet)!!


That said, I have a nice, if not totally working Mobilepro 900 running linux at home thanks to cosmo0 and the jornada linux development people on jlime!!

Happy testing!


What is happening here:

This manual describes how to prepare a compact flash card for booting Linux on your NEC Mobilepro 900 or 900C system, and how to boot it.

This manual is written so that also non-sysadmins can use it. It will grow into a full installation manual as the software matures!!

Note that the current state of the software is for test only!!


What do I need?


You will need a PC with a cf card reader. This may be internal, plug in, a laptop and a compactflash adapter, or what have you.

The PC must have native linux, or a way to boot a stand-alone version of linux from a CD or USB Stick or so.

As an alternative, you can run VMware player on your Windows PC, and load a linux distribution from there.

Download VMware player from VMware from here : http://www.vmware.com/download/player/

and DamnSmallLinux from http://www.damnsmalllinux.org/download.html  select a mirror near you, and download 

  wherever  ...../damnsmalllinux/current/dsl-4.0-vmx.zip (or whatever the current is) . This gives you a small 50MB virtual machine running linux as a guest system under windows. You can connect  the CF card by clicking on top of the VMware window where it is displayed. It will then be disconnected from windows and connected to your linux virtual machine.

You need user experience on linux and a very limited knowledge of the linux commandline.

You need either the root password, or have a way to start a console or x-terminal as root directly.

You need a compact flash or PCMCIA card of about 256MB. 

And a Mobilepro 900 to run the linux on.

Step 0: Where is all that stuff?

Download locations: ( date 028-11-2007 or 11/28/2007 for US!!) update will come irregularly::


Start reading here:

 

http://www.hpcfactor.com/forums/forums/thread-view.asp?tid=8389&start=1


You will need:

a)      A program to start Linux from your WINCE box, and a file with info what to find where:  haret.exe + startup.txt

b)      A linux kernel capable of running on the Mobilepro 900:  zimage

c)      Programs to run once the kernel is loaded: A special built distribution  x-x-x.rootfs.tar.bz2


Download the Windows CE Linux bootloader HARET from here (latest version 0.4.8 ):


http://devfiles.jlime.com/900c_Henchman_1.0.0-Testing/haret-0.4.8.exe

 

Download the latest kernel from here:

http://devfiles.jlime.com/900c_Henchman_1.0.0-Testing/zImage-2.6.23mp900c

and the startup.txt file at 

http://devfiles.jlime.com/900c_Henchman_1.0.0-Testing/startup.txt

you’ll need zimage and startup.txt to work.


Load either of the following distribution files from jlime:




UPDATE:- OPIE Jlime Henchman Image.

For OPIE download all three files ( image, kernel and startup.txt ) from  

http://devfiles.jlime.com/900c_Henchman_1.0.0-Testing/Old_Opie_Userland+Kernel/opie-image-Henchman-mp900c.rootfs.tar.bz2

http://devfiles.jlime.com/900c_Henchman_1.0.0-Testing/Old_Opie_Userland+Kernel/startup.txt

http://devfiles.jlime.com/900c_Henchman_1.0.0-Testing/Old_Opie_Userland+Kernel/zImage-2.6.17.11-mp9xx


UPDATE:- IceWM Jlime Henchman Image.
 12 november


http://devfiles.jlime.com/900c_Henchman_1.0.0-Testing/icewm-image-Henchman-mp900c.rootfs.tar.bz2 

( This goes with the 2.6.23 kernel and startup!)

Note, these are the native 900C distributions as of November 12th 2007, and not everything works perfect yet. But most of it works already.

Check regularly at http://devfiles.jlime.com/900c_Henchman_1.0.0-Testing/ for new updates.

Hint: Download (one of) these bz2's  directly to the linux box you use to configure the CF card.


Everything downloaded somewhere? A linux distribution at hand?


Step 1: Formatting a CF (or PCMCIA)  card

Reading instruction: the # sign in the examples is the usual root prompt: do not type this in. 

The | symbol in some commands is the ‘pipe’ sign, upright bar, often direct under the backspace.

In this example the CF card is visible as sdb and adressed as /dev/sdb, this may be different in your case, but the example shows how to spot your card!

 

We assume you have a limited knowledge of Linux, and can boot up a form of Linux on your PC,

Either native, or a CD or USB stick distribution like Puppy, Knoppik of DamnSmallLinux (DSL)

 

What you need:

 

a)      A flash card of 256MB or larger

b)      Some courage.

 

-          Start up your Linux distribution and start a console window

-          Log in as root! / super user

HUH?

Logging in as root

Ok, some explanation: To address hardware and change it, you need sufficient privileges. That is called ‘super user’ or ‘root’ privileges.

You need that to change the CF card.

 

Fast track: Some linux distributions (like DSL) allow you to start a ‘terminal as Super User’ or ‘console as root’ , look for that. Often right-click on a monitor icon or so. Look on http://jlime.com/phpBB2/viewtopic.php?t=802 for the Puppy Linux example.

 

Damn Small Linux example (the whoami command I typed in tells me I am really root)


You can get DSL at http://www.damnsmalllinux.org

 

 

One step login:

Or: Log in as root from the start screen: ( SUSE 10.1 linux picture below)

 

Otherwise: Start up a terminal as user (you will need to know how to do that, and type >  su

( that’s for superuser). And optionally enter the root password:

( Example from Linux KDE below)

 

 

 

-          Insert the CF card, and enter # dmesg | tail    ( run dmesg, and show only the last output lines)

 

 

We see that a device sdb has been spotted ( in this case with a disk sdb1 on it)

If you use a USB device, the card is usually seen as sdx  for some x.

If you use an PCMCIA adapter, you most likely will see something like hdx  for some x.

 

, and check that it is NOT mounted, by entering

-          # mount

 


In the example we see no sdb1 mounted.

Otherwise: Type # umount /dev/sdb1 to really unload it – otherwise we cannot change the card.



Now enter #  cfdisk /dev/sdb



 

Note a few things:

-          Disk parameters are on the top of the screen

-          Comment on the currently selected option is on the bottom of the screen

-          Options to select above that, current option in reverse video.

-          Currently selected partition in reverse video in the middle



We see that it has an 256MB FAT16 layout. We are going to destroy this, and put on:


a)      an 8MB FAT16 partition

b)      the rest as a linux ext2 partition


tab to [ Delete ] and press enter



And yes, nothing there anymore:



Tab to [ New ]


And press enter



Stay in [Primary] , and press enter



Enter 8 in the Size (in MB) place:

And press enter



Leave at [Beginning] , press enter again



Presto, one 8MB partition, now we are going to make it FAT:


Tab to [  Type  ]



There’s  more, press a key to continue but remember the options.

We make an 8MB FAT partition, that’s type 04

First this appears, enter 04 at the ‘Enter filesystem type’


Ande presse enter.


Press  enter once more to set the ‘Bootable’ flag: for better recognition by your H/PC



Now we repeat the ‘new’ once more to make a large linux partition:


First press the ‘DOWN’ button to change to the empty space part:



And tab to [  New   ] and press enter:






Leave the default and press ‘enter’



Sof far, so good. Note that nothing has happened yet to the CF card, all changes are in memory, now we need to write the changes to the card:

Tab to [ Write  ]  and press enter:

Enter ‘yes’

And enter

Finished


Tab to [  Quit   ]  and press enter

A screen like this appears:



Just to make sure, we are going to format the disk partitions as required:


/dev/sdb1 becomes FAT16 with the command


#  mkfs.vfat /dev/sdb1

or

# mkdosfs /dev/sdb2

or 

 # mkvfat /dev/sdb1     ( all depending on your flavour of linux)

as follows:



And /dev/sdb2 becomes an ext2 partition (no need to know, just do it)


#  mkfs.ext2 /dev/sdb2

or

# mke2fs /dev/sdb2

or maybe

# mkext2 /dev/sdb2     ( all depending on your flavour of linux)


as follows:


Now your card is in the right format. Now we need to write the information on the card.


Step 2: Installing the linux distribution


We assume you have downloaded  a correct distribution in tar.bz2 format to your system.

Lets assume that you have it in /tmp, as



Now we need to be able to write to the card first. This is done by mounting the partition to a directory on your system:


First create a directory:             #  mkdir /tmpmount

Then mount the disk:                 #  mount /dev/sdb2 /tmpmount

And go there:                           #  cd /tmpmount



Now we are ready to unpack the distribution:


Enter the following and press TAB, the rest will be completed automatically:


#  tar –xjvf /tmp/opie<TAB>  

or alternatively 

#  tar –xjvf /tmp/icewm<TAB>

which will expand the commandline with the correct distribution name.
  


And press enter. Switches are :  x for extract (here), v for verbose (show me everything you do), j for un-bzip (decompress .bz2 file) and the f at the end says: the next string is the filename. The order of the letters is not important, except for the f at the end.


Lots of information scrolls along:



Once the commandline appears, it is ready. Two more things to do:


Leave the /tmpmount directory, otherwise you can not ‘unmount’ the disk.

And then unmount the disk:


Commands:


# cd /

# umount /tmpmount              à this may take a while, do not remove the disk until the prompt reappears!!.


 


Now you can remove the disk and put it in your Mobilepro 900C:


Step 3: Putting the bootloader in the DOS partition


Put the following programs on the DOS partition:


-          haret.exe  ( in my case haret-0.4.8 )    - the bootloader

-          zimage                                                -  the kernel

-          startup.txt                                            - the switches for the booting kernel

 

Important: If you have loaded either cmonex Rom V1.0 or V2.0, or already have a gx.dll loaded ( for example) put a dummy gx.dll in the DOS partition as well ( edit a small file, nothing in there, , and save as  gx.dll )!!!


Step 4: Starting Linux


Now doubleclick on the haret program...


If you did everything right, suddenly your screen goes black and a penguin appears in the top left corner.!!!!


The rest follows by itself!


Note: If you use an opie distribution, the system will start up in graphic mode.


If you use an icewm distro, you need to start the graphic mode yourself:

-          login as root

-          enter startx

-          start the stylus calibration: CTRL-ESC to start the menu, use arrows to start Utilities – Xcalibrate



Screenshots of the console and the icewm window manager are on RTFM's website:http://freeshells.ch/~wicked74/900c/linux 



One deeplinked shot of the icewm manager on the Mobilepro:

http://freeshells.ch/~wicked74/900c/linux/icewm-custom-config.png 

and another from  http://devfiles.jlime.com/900c_Henchman_1.0.0-Testing/900c-jlime-icewm.png

: deeplinked screenshot from jlime

where you can see in the lower right corner that some developers work very late indeed ;-)