2 * (C) Copyright 2009 mGine co.
3 * unsik Kim <donari75@gmail.com>
5 * See file CREDITS for list of people who contributed to this
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
26 #include <environment.h>
27 #include <linux/stddef.h>
30 char *env_name_spec = "MG_DISK";
34 DECLARE_GLOBAL_DATA_PTR;
36 void env_relocate_spec(void)
38 char buf[CONFIG_ENV_SIZE];
43 set_default_env("!mg_disk_init error");
47 err = mg_disk_read(CONFIG_ENV_ADDR, buf, CONFIG_ENV_SIZE);
49 set_default_env("!mg_disk_read error");
60 env_ptr->crc = crc32(0, env_ptr->data, ENV_SIZE);
61 err = mg_disk_write(CONFIG_ENV_ADDR, (u_char *)env_ptr,
64 puts("*** Warning - mg_disk_write error\n\n");
72 gd->env_addr = (ulong)&default_environment[0];