All Forums
 Embedded Linux
 Linux Downloads and Documents
 Debian CRAMFS 2010-01-07 (armel)
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

jhess

135 Posts

Posted - 08 Jan 2010 :  14:04:52  Show Profile  Email Poster

Debian CRAMFS 2010-01-07 (armel)

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

EABI is a new application binary interface (ABI) for Linux that offers performance improvements over the old ABI through use of softfloat instructions for floating point arithmetic, a more efficient syscall convention, and the option to use VFP hardware if the CPU has it. See the EABI FAQ for details.



The EuroTech 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 /usr/share/ads/demo_media directory. Many common x11 shared libraries are included in the CRAMFS 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.

The following files are included in this release:
cramfs.img - CRAMFS filesystem
flashfs2 - second partition, in JFFS2 format, used for persistant storage of selected files
flashfs2-128k - second partition, in 128k JFFS2 format, used for persistant storage of selected files
flashfs2-128k-nand - second partition, in 128k NAND JFFS2 format, used for persistant storage of selected files
snapshot.txt - output on debug port of a booting system
cmdline.txt - used to boot on systems not using the u-boot bootloader
cmdline_bitsyx.txt - used to boot the BitsyX
register.txt for PXA frame buffer and LQ64343 LCD (BitsyX, GCX, or AGX without an Epson chip)
register_agxepson.txt for Epson frame buffer and LQ64343 LCD (AGX with an Epson chip)
register_vgx.txt for SM501 frame buffer and LCD or CRT (VGX)
debian-cramfs.tar.gz - tar archive of the contents of the CRAMFS image
MD5SUMS - checksums of files in this release


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". If your board uses 128k NAND flash, instead download the flashfs2-128k-nand 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. Note that you must use an EABI version of the kernel, such as the one provided here.

For systems such as the BitsyXb, BitsyG5, TurboXb, Sphere, VIX, Portal, and VGX, 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, and GCX 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.

Now 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.


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 and GCX, 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)


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/<filename>
This will copy the current /etc/<filename> to the JFFS2 partition and replace /etc/<filename> 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 filesystem is derived from the Debian armel port and superscedes our previous 2009-03-09 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