More pwlconfig stuff

Adi Linden [email protected]
Thu, 27 Jan 2000 01:02:40 -0600 (CST)


Hi again...

> The limit is about 100,000 ...don't think loading the file system will be a
> problem, its not until you start using the flash for run-time file storage...
> DOC has wear leveling that helps too...

So how long would a flash last if it's running a 'regular' read-write
filesystem? I did a hybrid solution at one point where part of the
filsystem was copied into a ramdisk at boot. It worked soso. I much prefer
the all ramdisk solution, as long as it fits into ram...

> > Then it's possible to create a ramdisk image. The ramdisk image on it's
> > own doesn't do much. It needs a kernel (seperate) and a bootloader, lilo
> > for an ext2 filesystem on flash, syslinux for a FAT filesystem on flash
> > and loadlin if the DOS operating system is on flash, too. The last one
> > wouldn't make sense but its on option (I don't care about supporting it
> > though).
> > 
> > If I am right, here are the steps required for each setup.
> > 
> > 'Live' filesystem on flash (no ramdisk)
> > ---------------------------------------
> > 1. Erase the flash (IDE or DOC)
> > 2. Make ext2 filesystem on flash
> > 3. Copy the filesystem to flash
> > 4. Run lilo (plilo for DOC, normal lilo for IDE FLASH)
> > 
> 
> Ok..I think these are handled now with the "xxx Disk-On-Chip" main menu
> items...

Yup...

> > Ramdisk with LILO
> > -----------------
> > 1. Create ramdisk from filesystem (w/o kernel)
> > 2. Make ext2 filesystem on FLASH or DOC
> > 3. Copy necessary files to FLASH or DOC
> >     - Kernel
> >     - Ramdisk image
> >     - lilo & support files
> > 4. Run lilo (plilo for DOC)
> > 
> 
> 
> What I was thinking for the compressed system:
> 
> 1. configure your project file system, independent of ram disk
> 2. Configure the compressed file system...ie specify files that are not
> compressed, all others will be compressed
> 3. Extract will extract the file system as it does now..THEN it will compress
> all the required files.  The compressed image and the uncompressed files will
> be  loaded into another location.  The compress will actually use the "dd"
> command stuff you have in one of your shell scripts already...
> 
> After this step, files will be stored as follows:
> 
> projects/ralph/mnt     <<--normal uncompressed files
> projects/ralph/cmpmnt  <<--final disk image with compressed file + others
> 
> Now, when you load the Disk-On-Chip, the files will be copied from the "cmpmnt"
> point, not the "mnt" directory.
> 
> 4. run Lilo as before, but insert some ram disk parameters if required, in the
> "lilo.conf.doc" file

Yup, that would do.

> > Ramdisk with SYSLINUX
> > ---------------------
> > 1. Create ramdisk from filesystem (w/o kernel)
> > 2. Make FAT12 or FAT16 filesystem on FLASH or DOC
> > 3. Install bootloader (syslinux)
> > 4. Copy necessary files to FLASH or DOC
> >     - Kernel
> >     - Ramdisk image
> >     - syslinux.cfg
> > 
> > The above covers an original install. If you change the ramdisk image or
> > kernel the syslinux solution just shine. All you need to do is copy the
> > new kernel and/or ramdisk to the FLASH or DOC. That's it. No running lilo
> > or anything else!
> 
> Ok..haven't played with syslinux yet...

It's easier than the ext2 filesystem on flash with lilo...

> > The bootable CD is fairly easy. Unfortunaltely the 'easy' solution
> > requires a floppy image with MS-DOS 6.22 and CD-ROM drives. A tough
> > solution for anything but personal use. Thinking about it in retrospect it
> > might be an idea not to support it until we figure out how to do it
> > without MS-DOS.
> > 
> 
> There's a how-to on building CD-ROMS that boot, and I know someone who has done
> this...this is lowest on my priority list, something to shoot for though.

The problem is booting without dos. With booteable CD's the bios loads a
floppy image from the CD and redirects system calls to the image instead
of the physical floppy. Unfortunately the Linux kernel doesn't use the
bios to access drives after it has booted. Soooo... the kernel boots and
then it can't find the ramdisk because there is no real floppy drive
there. Considering that syslinux loads the kernel and the ramdisk it
should work with a bootable CD, too. But then there needs to be a way to
probe for the place the CD is connected to.

I think with the newer boxes and booteable ATAPI drives there is point in
supporting it. But I don't have any need for it now. There isn't any time
in my life to work on the syslinux bootable CD business right now.

> > The above solutions assume the FLASH or DOC is available on the running
> > development platform. In my case this doesn't work. I boot the target
> > system using a floppy and then ftp the files onto the target drive. 
> 
> Hmmmm....I hadn't thought of this...perhaps if the target is mounted with nfs,
> then the copy from "projects/ralph/mnt" (or "projects/ralph/cmpmnt") would just
> work..I guess this assumes that a working file system is already on the
> target...not sure if LILO works over this method either...hmmmmm

Like I mentioned, I am bringing the target system up with a floppy that
has networking and a ftp client. It uses dhcp for a network number and
goes about downloading the image and installing it on flash. Depending on
the RAM/flash configuration its possible to download a .tgz file with all
the files into the ramdisk and then uncompress them onto flash.

This works great with 8MB flash and 64MB RAM. It even squeezes into 32MB
RAM. Booting from a floppy the filesystem expands to about 3MB. If the
ramdisk was build to be 20MB in size that leaves 17MB to buffer the
downloaded file(s) to be installed. 12MB to run a minimal networked Linux
is plenty... 

> > So I think there needs to be an immediate step that allows you to create a
> > tar.gz archive, as an example, which contains everything to be transferred
> > to the target drive.
> 
> Ahhh...just archiving (tar/zipping) the entire file structure...hmmmm... this
> is a seperate issue from just archiving a project...more to do...

See below:

 > projects/ralph/mnt     <<--normal uncompressed files
 > projects/ralph/cmpmnt  <<--final disk image with compressed file + others
 > 
 > Now, when you load the Disk-On-Chip, the files will be copied from the"cmpmnt"
 > point, not the "mnt" directory.

A step to compress the 'projects/ralph/cmpmnt' directory. So there is on
file that contains everything that needs to go onto the target device.

One more note about the syslinux - lilo thing. If you use a ramdisk the
files required on the target are VERY different between lilo and syslinux.
The only thing in common are the ramdisk image and the kernel image.

> Anyhow, seeing something working is a lot better than just me gassing (and
> guessing) about what *I* think should happen :-)  

This is defenitely so. I am hoping to start this ramdisk script first
thing in the morning. My original plan of doing it this evening just
didn't fly.

My little brother (14 year old) decided to format the drive on his
computer and do some partitioning to do a dual boot Windows/Linux box.
When he was visiting he thought the Gnome desktop was sooo cool. He just
had to have. I burned him copies of all the important Linux stuff...

It was a loooong phonecall walking him through a Win98 install first and
then a Redhat 6.1 Gnome workstation. I guess the first time in his live
he installed an operating system and had to use fdisk and format. Now he
needs a new modem since his box has a Winmodem. Oh well...

He lives out in BC so walking over there to show him isn't really an
option...

TTYL,
Adi

---------------------------------------------------
See the list archives at http://adis.on.ca/archives/
See the PWL homepage at  http://embedded.adis.on.ca
---------------------------------------------------