This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RedBoot 'ifdisk' command


On Sun, May 14, 2006 at 10:55:59AM -0400, Frank Pagliughi wrote:
> This patch adds a command to RedBoot called 'ifdisk'
> It allows for a command to be executed conditionally based on the 
> presence of a disk drive. It's included as an option to the RedBoot 
> disks package.

Hi Frank

I've not looked at the details yet, I don't think you actually need
this.

The exec command will not do anything if the previous load did not
work. So it should be possible to do something like:

mount -d /dev/hda1 -t ext2 /extern
load -m disk /extern/boot/zImage
exec
mount -d /dev/hdb1 -t ext2 /intern
load -m disk /intern/boot/zImage
exec

If the external disk exists, the load will work and the first exec
will happen. If the disk does not exist, the first load fails, the
first exec is a NOP and the second load and exec boots the internal
image.

        Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]