More pwlconfig stuff

Ralph Stickley [email protected]
Wed, 26 Jan 2000 21:33:02 -0800 (PST)


Hey,
more thoughts...

--- Adi Linden <[email protected]> wrote:
> Hi,
> 
> > I wondered about that...I suppose including it is no problem (have to
> include
> > the source also ?)
> 
> Under GPL the sources have to be available. I would imagine them being
> part of the kernel source would be sufficient. Perhaps just indicate in
> the README.pwlconfig where the sources for lxdialog can be found.
> 
> > Where I'm headed now, the device is specified in the configuration file
> > deviceType="DOC" 
> > deviceName="Disk-On-Chip"
> > -or-
> > deviceTYPE="FLASH"
> > deviceName="Sandisk Flash Disk (IDE)"
> 
> Ok, there are several different possibilities in loading stuff into the
> machine. You can simply use the flash like a HD. The disadvantage is that
> with limited write cycles to the flash it has a predefined lifespan.
> 

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

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


> 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

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

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

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

> > where the Name is assigned by the user for their specific device.  So,
> > I am building the menu items as follows:
> > 
> >        Erase $deviceName --->
> >        Load File System onto $deviceName --->
> >        Install LInux LOader (LILO) to $deviceName
> 
> If you're using a ramdisk system the above wouldn't work...
> 
> > For the ram disk, I was planning on including another line in the main menu
> > (if the projectCompress parameter = "YES" )
> > 
> >       Configure Project File System --->
> >       Compress FIle System -->
> >       Extract File System for Project --->
> >       ----
> >
> > Selecting Compress File System will allow you to specify which files are
> > included in the compressed image and which ones get copied without change.
> > Then when you select "Extract the file system image gets built and 
> > then the compressed image gets made.
> 
> The ramdisk isn't just a tar file type of thing. The boot loader needs to
> be configured to support a ramdisk of the desired size (My router does a
> 12MB ramdisk but the kernel default is 4MB max). Then the process of
> creating the ramdisk determines the size of the ramdisk when it's loaded
> into memory.
> 

sounds like we might need more project parameters to define the ram disk
stuff...

> When I build the script for the router it was run like this:
>    build_router [site] [ramdisk size] [ live | ramdisk | cd ]
> This is a script for a very specific purpose, though and not what I am
> planning now.
> 
> I just think doing the ramdisk business should be a choice of menus all on
> its own. It's a process requiring different configurations options then
> the 'live' filesystem approach.
> 
> So what I'll do is build the script to create the ramdisk. I'll email it
> to you when it's done with usage instructions. I did want to use command
> line switches, though. Still got to figure out how to do that without
> requiring options to be passed in a specific order.
> 
The pwl_custom has some command line processing stuff for an example - I don't
use getopts, but that is a little more "standard"..

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


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

Later,
Ralph

__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
---------------------------------------------------
See the list archives at http://adis.on.ca/archives/
See the PWL homepage at  http://embedded.adis.on.ca
---------------------------------------------------