xref: /rk3399_rockchip-uboot/tools/env/fw_env.h (revision 566e5cf451ae7e33e31bb62ae5b9b258e33f8609)
16aff3115Swdenk /*
2bc11756dSGrant Erickson  * (C) Copyright 2002-2008
36aff3115Swdenk  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
46aff3115Swdenk  *
56aff3115Swdenk  * See file CREDITS for list of people who contributed to this
66aff3115Swdenk  * project.
76aff3115Swdenk  *
86aff3115Swdenk  * This program is free software; you can redistribute it and/or
96aff3115Swdenk  * modify it under the terms of the GNU General Public License as
106aff3115Swdenk  * published by the Free Software Foundation; either version 2 of
116aff3115Swdenk  * the License, or (at your option) any later version.
126aff3115Swdenk  *
136aff3115Swdenk  * This program is distributed in the hope that it will be useful,
146aff3115Swdenk  * but WITHOUT ANY WARRANTY; without even the implied warranty of
156aff3115Swdenk  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
166aff3115Swdenk  * GNU General Public License for more details.
176aff3115Swdenk  *
186aff3115Swdenk  * You should have received a copy of the GNU General Public License
196aff3115Swdenk  * along with this program; if not, write to the Free Software
206aff3115Swdenk  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
216aff3115Swdenk  * MA 02111-1307 USA
226aff3115Swdenk  */
236aff3115Swdenk 
24d0fb80c3Swdenk /*
25d0fb80c3Swdenk  * To build the utility with the run-time configuration
26d0fb80c3Swdenk  * uncomment the next line.
27*566e5cf4SWolfgang Denk  * See included "fw_env.config" sample file
28d0fb80c3Swdenk  * for notes on configuration.
29d0fb80c3Swdenk  */
30d791b1dcSwdenk #define CONFIG_FILE     "/etc/fw_env.config"
31d0fb80c3Swdenk 
326aff3115Swdenk #define HAVE_REDUND /* For systems with 2 env sectors */
336aff3115Swdenk #define DEVICE1_NAME      "/dev/mtd1"
346aff3115Swdenk #define DEVICE2_NAME      "/dev/mtd2"
35d0fb80c3Swdenk #define DEVICE1_OFFSET    0x0000
366aff3115Swdenk #define ENV1_SIZE         0x4000
37d0fb80c3Swdenk #define DEVICE2_OFFSET    0x0000
386aff3115Swdenk #define ENV2_SIZE         0x4000
396aff3115Swdenk 
406aff3115Swdenk #define CONFIG_BAUDRATE		115200
416aff3115Swdenk #define CONFIG_BOOTDELAY	5	/* autoboot after 5 seconds	*/
426aff3115Swdenk #define CONFIG_BOOTCOMMAND							\
436aff3115Swdenk 	"bootp; "								\
44fe126d8bSWolfgang Denk 	"setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} "	\
45fe126d8bSWolfgang Denk 	"ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; "	\
466aff3115Swdenk 	"bootm"
476aff3115Swdenk 
48bc11756dSGrant Erickson extern int   fw_printenv(int argc, char *argv[]);
496de66b35SMarkus Klotzbücher extern char *fw_getenv  (char *name);
506aff3115Swdenk extern int fw_setenv  (int argc, char *argv[]);
51bd7b26f8SStefano Babic extern int fw_parse_script(char *fname);
52bd7b26f8SStefano Babic extern int fw_env_open(void);
53bd7b26f8SStefano Babic extern int fw_env_write(char *name, char *value);
54bd7b26f8SStefano Babic extern int fw_env_close(void);
556aff3115Swdenk 
566aff3115Swdenk extern unsigned	long  crc32	 (unsigned long, const unsigned char *, unsigned);
57