Re: [uCsimm] date and getbenv()

From: Donald J Dionne (jdionne@ns1.rt-control.com)
Date: Mon Jan 24 2000 - 02:16:30 EST


> Thanks, David.
>
> > In various directories in the uClinux tree you'll find a header
> > file called "bootstd.h" of which there appear to be several
> > variants.
> >
> > They define a number of calls, but getbenv isn't among them. They
> > map to numeric arguments, so I simply took a guess that the calls
> > were in the order given in the manual and added a defition for
> > getbenv() in my own bootstd.h and it worked!

Here is the relevant stuff in the latest bootstd.h. This corresponds to
the Rev2.0 uCsimm (the one everyone has up to now). The bootstd.h on the
CD and in the uClinux kernel is a little older. Not all of these functions
are implemented of course ;^)

#define NR_BSC 21 /* last used bootloader system call */

#define __BN_reset 0 /* reset and start the bootloader */
#define __BN_test 1 /* tests the system call interface */
#define __BN_exec 2 /* executes a bootloader image */
#define __BN_exit 3 /* terminates a bootloader image */
#define __BN_program 4 /* program FLASH from a chain */
#define __BN_erase 5 /* erase sector(s) of FLASH */
#define __BN_open 6
#define __BN_write 7
#define __BN_read 8
#define __BN_close 9
#define __BN_mmap 10 /* map a file descriptor into memory */
#define __BN_munmap 11 /* remove a file to memory mapping */
#define __BN_gethwaddr 12 /* get the hardware address of my interfaces */
#define __BN_getserialnum 13 /* get the serial number of this board */
#define __BN_getbenv 14 /* get a bootloader envvar */
#define __BN_setbenv 15 /* get a bootloader envvar */
#define __BN_setpmask 16 /* set the protection mask */
#define __BN_readenv 17 /* read environment variables */
#define __BN_flash_chattr_range 18
#define __BN_flash_erase_range 19
#define __BN_flash_write_range 20

Jeff.

>
> I see!
> I'll try later. I think "getbenv()" is very useful to set Ethernet parameters.
>
> ----
> Dai Katoh
> This message resent by the ucsimm@uclinux.com list server http://www.uClinux.com/
>

This message resent by the ucsimm@uclinux.com list server http://www.uClinux.com/



This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:34 EST