All Forums
 Embedded Linux
 Linux Downloads and Documents
 Debian CRAMFS 2006-05-26
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

jhess

135 Posts

Posted - 30 May 2006 :  12:53:12  Show Profile  Email Poster


Debian CRAMFS 2006-05-26 (Etch)

Debian CRAMFS 2006-05-26 is a root file system that is derived from the Debian (Etch) distribution and is trimmed down to fit (compressed) in a partition in on-board flash as small as 15MB. This size can be reduced further by removing the demo programs and associated data that are included in this distribution.

The ADS Debian CRAMFS image uses x11 (XFree86) as its GUI and includes several demo programs that run under x11. The media files for several of these demos are stored in the /root/demo_media directory. Many common x11 shared libraries are included in the JFFS2 root, including those necessary to run gtk programs.

Unlike the ramdisk and JFFS2 distributions, the CRAMFS is read- only with the exception of /var, /tmp and /etc which are loaded into RAMFS temporary filesystems. Attempts to change any other part of the filesystem will fail.

Since the CRAMFS distribution also includes a JFFS2 partition, you should try to shut it down cleanly before removing power from the board. The advantage to the CRAMFS distribution is that, in the event that the JFFS2 filesystem does get corrupted or otherwise become unmountable, the rest of the system will still be intact because it is read-only. Only the "shadowed" files will be reverted to their previous/default contents.

Debian CRAMFS-flashfs2 2006-05-26 is a second partition, in JFFS2 format, used for persistant storage of selected files. Debian CRAMFS-flashfs2-128k 2006-05-26 is a version of this second partition for boards that use 128k flash. See the README.txt for the 2006-05-26 release for information on using this JFFS2 partition to store persistant changes using 'altshadow'.

The following files are included in this release:
bitsyXb/hw_config.txt
bitsyXb/tty_config.txt
bitsyXb/root_config.txt
bitsyXb/start.txt
sphere/hw_config.txt
sphere/tty_config.txt
sphere/root_config.txt
sphere/start.txt
vix/hw_config.txt
vix/tty_config.txt
vix/root_config.txt
vix/start.txt
flashfs2
MD5SUMS
register.txt
register_vgx.txt
cramfs.img
portal/hw_config.txt
portal/tty_config.txt
portal/root_config.txt
portal/start.txt
register_agxepson.txt
cmdline.txt
README.txt
cmdline_bitsyx.txt
flashfs2-128k
debian-cramfs.tar.gz
700050-4104h.partno


Usage
Download the cramfs.img and flashfs2 images from the link above and copy them to an ATA flash card. If your board uses 128k flash, download the flashfs2-128k image and copy it to the card named "flashfs2". Also copy onto the card the kernel zImage file for the kernel you want to use.

For systems such as the BitsyXb, Sphere, VIX, and Portal, which use the u-boot bootloader, a set of u-boot configuration files is needed. See this topic for all the available files, download the appropriate files and copy them to the card. Note that you will need at a minimum start.txt, cramfs root_config.txt, and a tty_config.txt file for your system. A hw_config.txt file for your system's frame buffer is recommended for best performace of the video demonstration programs included in this distribution.

For PXA systems such as the BitsyX, AGX, GCX, and VGX, which do not use the u-boot bootloader, a kernel command line is required to direct the kernel to mount this file system during start up. Download a cmdline.txt file as shown below and copy it to the card, then create a file named ProgramFlash.ads! on the card. A register.txt file is recommended for best performace of the video demonstration programs included in this distribution. Download the register.txt file for your system's frame buffer as shown below and copy it to the card.

On your ADS System, set the first dip switch to ON (Flash Update Mode), insert the card, and boot your system. The bootloader will erase everything in on-board flash (except the bootloader itself) and program (copy) the images on the ATA card to on-board flash. The kernel will be loaded from on-board flash and the CRAMFS root file system will be mounted when Linux starts.

Remove the ATA flash card to prevent an unnecessary erase/reprogramming of on-board flash the next time you reboot. See the bootloader manual for more information on the dip switch settings and boot options.


Command lines
These command lines will eliminate the ramdisk partition and direct the kernel to mount the CRAMFS root file system in the third partition. See the bootloader manual for more examples.

On the BitsyX, use this cmdline.txt

On AGX, GCX, and VGX, use this cmdline.txt:


Register Settings
These register.txt files will change the default 8bpp color depth to 16bpp. The bootloader reads the register.txt file and changes the registers before the kernel starts. Download the one for the frame buffer that is used by your board.
register.txt for PXA frame buffer and LQ64343 LCD (BitsyX, GCX, or AGX without an Epson chip)

register.txt for Epson frame buffer and LQ64343 LCD (AGX with an Epson chip)

register.txt for SM501 frame buffer and LCD or CRT (VGX)


Tar Archive
Here is a tar archive of this file system.


Using altshadow
The CRAMFS distribution included a shell script called 'altshadow', which can be used to quickly "shadow" a file in /etc or /var with a file in the JFFS2 persistent storage. This JFFS2 partition is mounted as /alt on the system. To "shadow" a file in /etc, run
 altshadow /alt /etc/ 
This will copy the current /etc/ to the JFFS2 partition and replace /etc/ with a symlink to the "shadowed" version. This file will now retain changes across reboots. For example, to change the nameserver information in /etc/resolv.conf, run
 altshadow /alt /etc/resolv.conf 
You may now edit /etc/resolv.conf and the changes will remain when the system is rebooted.

SECURITY NOTE: Since the default root password is stored in the read-only CRAMFS filesystem, shadowing the file /etc/shadow in order to change the root password across reboots is not safe. If an attacker can cause your system to boot without mounting the JFFS2 partition (by modifying the kernel command line or corrupting the JFFS2 filesystem), THE DEFAULT ROOT PASSWORD WILL BE RESTORED! To truly change the root password, you must generate a new CRAMFS image with the new password encrypted into /etc/shadow.


Verification
MD5SUMS provides MD5 checksums for all files in this release.


History
This release of our CRAMFS root file system is derived from Debian and supersedes our previous 2006-01-27 release.

  Topic  
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Jump To:
Eurotech Support Forums © Eurotech Inc. Go To Top Of Page
This page was generated in 0.03 seconds. Snitz Forums 2000