INDEX: 1. BUILDING LINUX FOR PXA255 and PXA262 Development Platforms 2. BUILDING BLOB/PXA FOR PXA255 and PXA262 Development Platforms 3. LOADING AND RUNNING LINUX ON PXA255 and PXA262 Development Platforms 4. KERNEL SUSPEND AND RESUME 5. CONFIGURING THE NETWORK 6. MOUNTING A NFS PARTITION 7. MOUNTING A RAMFS PARTITION 8. CREATING A JFFS2 FILE SYSTEM IMAGE 9. CONFIGURING YOUR DEVELOPMENT ENVIRONMENT FOR TFTP FILE DOWNLOAD 10. RUNNING QT/E 11. CRAMFS/XIP 12. KNOWN PROBLEMS 13. UPDATE NOTES +++ NO WARRANTY! USE AT YOUR OWN RISK! +++ -------------------------------------------------------------- 1. BUILDING LINUX FOR PXA255 and PXA262 Development Platforms The following files are required: * linux-2.4.19.tar.gz - kernel sources from ftp://ftp.kernel.org * patch-2.4.19-rmk7.gz - patches by Russell King from ftp://ftp.arm.linux.org.uk * diff-2.4.19-rmk7-pxa1.gz - patches by Nicolas Pitre * diff-2.4.19-rmk7-pxa1-intc1 - patches by Intel WCCG PCG/SE Linux Team Kernel build steps: 1.1) Untar the Linux kernel sources (downloaded from ftp.kernel.org): % tar xvzf linux-2.4.19.tar.gz if the Linux sources were compressed with bzip2, use the following command: % bzip2 -dc linux-2.4.19.tar.bz2 | tar xvf - 1.2) Apply Russell's arm-linux patches: % gzip -dc patch-2.4.19-rmk7.gz | patch -p1 1.3) Apply Nicolas' PXA255 and PXA262 development platforms Linux patches: % gzip -dc diff-2.4.19-rmk7-pxa1.gz | patch -p1 1.4) Apply Intel WCCG PCG/SE Linux Team's patches: % cat diff-2.4.19-rmk7-pxa7-intc1 | patch -p1 Note : For PXA262, apply the "lubbock-K3-flash.diff" % cat lubbock-K3-flash.diff | patch -p1 1.5) Build the kernel (after patching): % make lubbock_config % make oldconfig % make dep % make zImage Note: You may want to install the development tools included in release packet. * Backup the orignal arm-linux toolchain(at /usr/local/arm-linux), recommended. * Install arm-linux-toolchain-bin-05-23-03.tgz, it will overwrite /usr/local/arm-linux. %tar xzf arm-linux-toolchain-bin-05-23-03.tgz -C /usr/local ------------------------------------------------------------- 2. BUILDING BLOB/PXA FOR the PXA255 and PXA262 Development Platforms You need the following files: * blob-lubbock-052903.tgz Unpack the snapshot tarball, % cd blob-xscale and edit "config-pxa" then, % ./config-pxa When it's done, you can find "blob" binary code under src/blob; -------------------------------------------------------------- 3. LOADING AND RUNNING LINUX ON PXA255 and PXA262 Development Platforms: You need the following files: * Bootloader - blob-pxa255 - provided with this distribution, It works with PXA255 daughter card - blob-pxa262 - provided with this distribution, It works with PXA262 daughter card * lubbock_PXA255_QTE_16M.jffs2 - flash file system for the PXA255 development platform, with GPL'ed QT/E * lubbock_PXA262_QTE_16M.jffs2 - flash file system for the PXA262 development platform, with GPL'ed QT/E * zImage - PXA255 and PXA262 Development Platform kernel Kernel loading steps: 3.1) Burn 'blob' onto flash starting at 0x0000_0000. You may use the JFlash utility for the PXA255 development platform: % jflash blob-pxa262 NOTE 1: Jflash-v2.10.000 for PXA262 is required to burn image into the PXA262 daughter card with a B0 stepping NOTE 2: Some earlier PXA255 development platforms do not support SDRAM clock speeds at 100 MHz. Please verify if your PXA255 development platform implements ECOs #1-8, 10-12, 14 and daughter card ECOs #3, 5-7, 9, 10, 12, 13 for SDRAM 100 MHz support. The recommended default switch setting is: - S23 No DOT showing - S24 DOT showing (run) - S25(rotary switch) 0x0 - S26 (rotary switch) 0xD Note 3: For the PXA255, before attempting to flash bootloader, verify if switches S14 and S15 are properly configured according to specification. Setting the S14 and S15 switches to display the dots (tiny holes) should work. Note 4: For PXA262, before attempting to flash bootloader, verify if the switches S1,S2,S3,S4,S5 on PXA262 daughter card is properly configured according to specifation. Setting S1,S2,S3 to display the dots(tiny holes), and the others to non-dots should work. 3.2) Start your favorite terminal emulator (i.e. Minicom) configured for 115200,8N1. 3.3) Reset the PXA255 or PXA262 Development Platform, and press any key when BLOB shows, "Autoboot in progess, press any key to stop ..". You will then be in BLOB commond console. Use "help" to show command lists. blob> help The following commands are supported: * reset * reboot * boot * download * xdownload * flash * speed * status * reload * reblob * fwrite * ferase * tftp * ifconfig * help Use "help command" to get help on a specific command. 3.4) Load the file system image 'lubbock_PXA262_QTE_16M.jffs2' to the PXA262 development platform's RAM: blob> tftp lubbock_PXA262_QTE_16M.jffs2 0xa0200000 Note: * For PXA255 development platforms, use lubbock_PXA255_QTE_16M.jff2 instead of lubbock_PXA262_QTE_16M.jffs2 3.5) Burn uploaded file system image onto flash. Before burning, erase the orignal images on flash. Note: To avoid warnings, it is better to erase all blocks until the end of the flash. On 32MB flash, the end of flash is 0x1ec0000. blob> ferase 0x140000 0x1ec0000 erase dirty block at 0x140000 erase dirty block at .... ... Burn the image in RAM to flash. blob> fwrite 0xa0200000 0x140000 0x1000000 blob> Note: It may take a few minutes to burn the image before returning to the BLOB command console. 3.6) At the BLOB prompt, type the following command to upload the kernel: blob> tftp zImage-pxa262 0xa0200000 To download the image through the XMODEM, please refer to command "xdownload" for details. 3.7) After the kernel image transfer is complete, burn the uploaded file system image onto flash. Before burning, erase the orignal images on flash. blob> ferase 0x40000 0x100000 erase dirty block at 0x40000 erase dirty block at .... ... Then burn the image in RAM to flash. blob> fwrite 0xa0200000 0x40000 0x100000 Note: It may take a few minutes to burn the image before return to the BLOB command console. 3.8) On every board RESET or power up, do not press any key on keyboard. You should see the following message on your terminal emulator: Uncompressing Linux..... < kernel displays a lot of debug messages > Linux login: root [root@Linux /root]$ NOTE 1: The kernel will take longer to boot up the first time it loads as it erases some JFFS2 flash blocks. Watch the LED 'D7' until it stops blinking. Subsequent kernel boot time should be faster. NOTE 2: Press any key to abort the autoboot, and then type the following command in BLOB. It should be faster than autoboot. blob> boot Start Kernel.... --------------------------------------------------------------- 4. KERNEL SUSPEND AND RESUME - Set switch S12 "GPIO1" to the "no dot" position before turning on the power. - Then, after kernel bootup, send any character to the PM driver as follows: % echo > /proc/sys/pm/suspend This will trigger the suspend procedure. - To wake up the kernel back to a normal run mode, flip the S12 "GPIO1" switch. This will cause the CPU to wake and trigger the kernel resume procedure. --------------------------------------------------------------- 5. CONFIGURING THE NETWORK: You may configure the network with the following commands: % /sbin/ifconfig eth0 IPADDR netmask NETMASK broadcast BROADCAST % /sbin/route add default gw GATEWAY metric 1 where IPADDR is your IP address, NETMASK is your network mask, BROADCAST is your broadcast address and GATEWAY is your gateway address. Add your DNS entries in /etc/resolv.conf Note, some DPXA250 development platforms should be powered up with the S13 ("GPIO0") switch in the "dot showing" position for the Ethernet port to function properly. --------------------------------------------------------------- 6. MOUNTING AN NFS PARTITION: Detailed information on setting up your NFS server and client can be obtained at http://www.linuxdoc.org/HOWTO/NFS-HOWTO/. This is just a list of commands that seem to work well for some people running RedHat 6.1: 6.1) Setting up an NFS server: a) Edit the file /etc/exports to share a volume: /a/home/chagas (rw,no_root_squash) b) Initialize NFS services (RedHat 6.1): % /etc/rc.d/init.d/nfs stop % /etc/rc.d/init.d/nfs start Note, you may optionaly follow the instructions in the NFS-HOWTO. c) After mofying the /etc/exports file, execute the following command: % exportfs -rav 6.2) Setting up an NFS client: % mount -o nolock :/home/foo /mnt --------------------------------------------------------------- 7. MOUNTING A RAMFS PARTITION: % mkdir -p /ram1 % mount -t ramfs none /ram1 --------------------------------------------------------------- 8. CREATING A JFFS2 FILE SYSTEM IMAGE You may use the following files to build a JFFS2 file image: * rootfs.tar.gz - root file tree * mkfs.jffs2 - JFFS2 make file system utility The mkfs.jffs2 binary executable utility included with this distribution is known to run on RedHat Linux v7.1 (Pentium). First, create a temporary subdirectory and expand the root file system into it. You _must_ login as 'root': % mkdir tmp % cd tmp % tar jvzf ../rootfs.tar.gz % cd .. Run 'mkfs.jffs2' to create the JFFS2 file image: % ./mkfs.jffs2 -r /home/chagas/jffs2/tmp -o lubbock_fs.jffs2 -e 0x40000 --pad=0x01000000 Note 1: '--pad=0x01000000' switch will generate a padded 16mb image to avoid those pesky "JFFS2: Erase block.." warning messages at kernel boot up. Note 2: Use '-e 0x40000' for the PXA255 development platform, and use '-e 0x20000' for the PXA262 development platform. --------------------------------------------------------------- 9. CONFIGURING YOUR DEVELOPMENT ENVIRONMENT FOR TFTP FILE DOWNLOAD: 9.1) Configuring TFTP server for RedHat Linux: To enable TFTP on RedHat v6.1: - Edit /etc/inetd.conf and uncomment the following line: tftp dgram udp wait root /usr/sbin/tcpd in.tftpd - Create the TFTP default directory % mkdir /tftpboot - Then re-start your network services or reboot the system. To enable TFTP on RedHat v7.2 edit '/etc/xinetd.d/tftp': service tftp { # enable , yes => no disable = no socket_type = dgram ... # set root directory for tftp you like,here is /tftproot/ server_args = -s /tftproot/ } 9.2) Use Lan91c96 NOTE : If you are using TPC/IP-over-USB, go to Section "9.3". Connect the PXA255 development platform to a HOST with CROSS-OVER twisted-cable, and use "ifconfig" on the HOST, % ifconfig eth1 192.1.1.1 9.3) Use TCP/IP-over-USB NOTE : If you are using Ethernet, go to Section "9.2". 9.3.1) Installing USB Ethernet on host, # tar xzf usbhost.tgz # cd usb # make # rmmod usbnet # insmod usbdnet.o NOTE: Remove kernel module "usbnet.o" before installing kernel module "usbdnet.o". 9.3.2) Configuring USB Ethernet EACH TIME after reseting the PXA255 development platform, you will enter BLOB command line (by stopping the autoboot progress). Now configure the USB Ethernet. - Reset USB Unplug the USB cable, and plug-in again - Configure USB Ethernet device on host % ifconfig -a You should find Ethernet interface named "usb0". % ifconfig usb0 192.1.1.1 - Configure USB Ethernet device on the PXA255 development platform BLOB has following default configuration, * IP address : 192.1.1.2 * Default TFTP server : 192.1.1.1 If you want to change the configuration, use command "ifconfig" on the BLOB command line. Note, the new configuration is not permanant before BLOB because it doesn't have a flash area to store the configuration. --------------------------------------------------------------- 10. RUNNING QT/E 10.1) Setting up the mouse driver: The mouse support in QTE is very good. To use mouse support under QTE, add mouse support in Linux kernel and create psaux file under /dev/. - Create psaux node under /dev/: % mknod /dev/psaux c 10 1 - Verify if prior operation was successful: % cat /dev/psaux Note, if the result is "cat: /dev/psaux: No such device", it could mean that your kernel does not support the PS/2 mouse. 10.2) Setting up the touchscreen driver: - The touchscreen device driver should be included in your kernel. You may vary it as follows: % cat /proc/interrupts If it lists 'UCB1x00', it could mean your kernel is loaded. - Create the touchscreen driver node: % mknod /dev/touchscreen/ucb1x00 c 10 14 10.3) Loading Qt/E demo application: % /usr/qt/examples/launcher start_demo --------------------------------------------------------------- 11. CRAMFS/XIP We also provide patches that enable XIP on CRAMFS, here are the steps to do it: 11.1) Apply patches following steps 1.1 - 1.5; 11.2) Apply cramfs-xip.patch; # cat cramfs-xip.patch | patch -p1 11.3) Configure the kernel #make lubbock_config #make menuconfig then, * from "General setup" menu, select "Kernel Execute-In-Place from ROM" to "Y", specify ".text physcal address" to be "0x00200000" * set Default kernel command string "root=/dev/null rootflags=physaddr=0x00400000 console=ttyS0,115200". * from "File systems" menu, then o) select "Compressed ROM file system support" to "Y", o) select "Use linear addressing system support" to "Y", o) select "Support XIP on linear cramfs" to "Y" o) select "Root file system on linear cramfs" to "Y" o) select "/dev file system support (ExPERIMENTAL)" to "Y", then select "Automaticly mount at boot" to "Y", to avoid warning messages when booting. * from "Memory Technology Device(MTD) ", select "Memory Technology Device (MTD) support" to "N". * save and exit 11.4) Build XIP kernel # make oldconfig # make dep # maek xipImage 11.5) Burn kernel image to flash blob> tftp xipImage 0xa0200000 blob> ferase 0x200000 0x200000 blob> fwrite 0xa0200000 0x200000 0x200000 11.6) Burn cramfs image to flash blob> tftp pxa250_cramfs_xip.img 0xa0200000 blob> ferase 0x400000 0x400000 blob> fwrite 0xa0200000 0x400000 0x400000 11.7) Run Linux when BLOB is up, stop the autoboot progress, then # go 0x200000 --------------------------------------------------------------- 12. KNOWN PROBLEMS: * reports have been received that "make xconfig" does not seem to work properly with the scritps. Use "make menuconfig" instead. * Driver and functionality have not yet fully tested or implemented: - Serial Hardware Flow Control - SSP - Backlight control - DVM * BLOB XMODEM(xdownload) is not functional to download large files, such as rootfs JFFS2 image. --------------------------------------------------------------- 13. UPDATE NOTES: BLOB: - Add commnad "go" to support XIP - TFTP fix - Lan91c96 support USBHOST: - Fix the problem of lost packet BSP Support: - PXA255 - PXA262 - Fix the PowerManager suspend/resume problem Driver Support: - LCD Controller - 640x480 - LCD 16bpp display support - LCD QVGA support - Touch Screen - UCB1400 touchscreen support (intended to be used in conjunction with tslib from http://www.arm.linux.org.uk/cvs) - Stereo Audio - PCMCIA controller - Product Ethernet support - 32-bit Flash EEPROM - PS/2 keyboard and mouse - Real Time Clock (RTC) - OS Timers - Interrupt controller - Memory Management Unit - Memory controller - Serial port - I2C - USB client - Power Management suspend/resume - IrDA