Multiple Targets for PeeWee Linux
Ralph Stickley
[email protected]
Mon, 11 Sep 2000 08:01:12 -0700 (PDT)
David,
--- David Wood <[email protected]> wrote:
>
>
> >
> > Main menu changes:
> > ==================
> > ...
> > ---
> > Configure Target Device "CF 32Mb"-->
>
> How about: Manage Target Devices -->
> Select Target Device -->
>
> > Erase "Flash" -->
> of course, erase "flash" would be in the management,
> > Load Filesystem to Flash -->
> as well as the loading of the filesystem,
> > Lilo...
> and lilo ;)
> > ---
> > ...
> >
Hmmm...Adi mentioned an approach like this also. I think all the steps
involved should be evident from the main menu... My reasoning (however flawed
it may be) is something like this:
The main menu shows a progression of steps that must be followed to embed the
system software to the target. First pick and choose the files you want
embedded, next pick your target environment (new step now shown in proper order
:), erase all existing files from the target, load the selected system files
onto the target and then perform a Lilo operation on the target.
My initial justification for this was to show the steps involved. Its "bad"
enough to be hiding all the command line commands normally required for this
operation, much less hide the procedure that has to be done.
One of my original goals was to also be able to operate pwlconfig entirely from
the command line (or shell script) for a manufacturing environment, but this
has gone largely untested (we use a disk duplicator instead). Here each
commandline flag roughly corresponded to one of the steps - something like:
pwlconfig --erase --load --boot
So this may have had a driving effect on the user interface also - some
consistancy between the commandline and the GUI...
Maybe this argument doesn't make sense now that I actually understand what is
going on (as opposed to when I started this project and didn't know what had to
be done to embedd linux :-O). Hmmmmmm....more thoughts ???
>
> While I have the author's attention,
>
> The current version builds the filesystem into projects/<projectname>/mnt/.
> There's no note about where the filesystem is built (I discovered with
> find).
As you found, the custom files and extracted package files are combined
together under the /projects/prjname/mnt directory. In theory, the user should
not have to traverse the projects directory manually - thats what pwlconfig
does. While you can do this, if you find yourself doing it on a regular basis,
then pwlconfig should be extended.
Note: If pwlconfig is comprehensive then you should not have to manually go
into any of the Embedded_Build subdirectories.
> Also, if I mount a ramdisk/drive/device to the mountpoint, the
> filesystem build fails on a failure to make the directory. Could you
> possibly make that specific mkdir check to see if its a mountpoint first?
>
> -David
>
The offending code would be in pwlconfig, function extract_project(), in or
about line 320...
rm -rf $mntName
mkdir $mntName
Removing the directory removes all hidden files and everything....
However if $mntName directory is another device, then it won't disappear and
the mkdir fails.
Ok to fix this, the code should read (untested):
rm -rf $mntName
if [ -d $mntName ] ; then # check for directory
; # directory not deleted, may be mounted
.. . # could test for read/write access ??
else
mkdir $mntName
if [ ! "$?" = "0" ] ; then
... # same stuff...
fi
Give that a try and let me know if it works in your environment.
Thanks for the feedback...
Later,
Ralph
__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/
---------------------------------------------------
See the list archives at http://adis.on.ca/archives/
See the PWL homepage at http://peeweelinux.com
---------------------------------------------------