X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=common%2Fimage.c;h=60c21270398e649c7bb77a8bd04445769e22d127;hb=refs%2Ftags%2Fv2013.04;hp=69e888c5d507940b1318cb20c040dd65f8861ad7;hpb=ec8a252cd492a7a409d6912aebeff34bb9e1e1e1;p=u-boot diff --git a/common/image.c b/common/image.c index 69e888c5d5..60c2127039 100644 --- a/common/image.c +++ b/common/image.c @@ -43,10 +43,10 @@ #include #endif +#include #include #if defined(CONFIG_FIT) || defined(CONFIG_OF_LIBFDT) -#include #include #include #endif @@ -74,6 +74,8 @@ static const image_header_t *image_get_ramdisk(ulong rd_addr, uint8_t arch, #include #endif /* !USE_HOSTCC*/ +#include + static const table_entry_t uimage_arch[] = { { IH_ARCH_INVALID, NULL, "Invalid ARCH", }, { IH_ARCH_ALPHA, "alpha", "Alpha", }, @@ -106,6 +108,7 @@ static const table_entry_t uimage_os[] = { #endif { IH_OS_NETBSD, "netbsd", "NetBSD", }, { IH_OS_OSE, "ose", "Enea OSE", }, + { IH_OS_PLAN9, "plan9", "Plan 9", }, { IH_OS_RTEMS, "rtems", "RTEMS", }, { IH_OS_U_BOOT, "u-boot", "U-Boot", }, #if defined(CONFIG_CMD_ELF) || defined(USE_HOSTCC) @@ -160,8 +163,6 @@ static const table_entry_t uimage_comp[] = { { -1, "", "", }, }; -uint32_t crc32(uint32_t, const unsigned char *, uint); -uint32_t crc32_wd(uint32_t, const unsigned char *, uint, uint); #if defined(CONFIG_TIMESTAMP) || defined(CONFIG_CMD_DATE) || defined(USE_HOSTCC) static void genimg_print_time(time_t timestamp); #endif @@ -416,6 +417,26 @@ static const image_header_t *image_get_ramdisk(ulong rd_addr, uint8_t arch, /* Shared dual-format routines */ /*****************************************************************************/ #ifndef USE_HOSTCC +ulong load_addr = CONFIG_SYS_LOAD_ADDR; /* Default Load Address */ +ulong save_addr; /* Default Save Address */ +ulong save_size; /* Default Save Size (in bytes) */ + +static int on_loadaddr(const char *name, const char *value, enum env_op op, + int flags) +{ + switch (op) { + case env_op_create: + case env_op_overwrite: + load_addr = simple_strtoul(value, NULL, 16); + break; + default: + break; + } + + return 0; +} +U_BOOT_ENV_CALLBACK(loadaddr, on_loadaddr); + ulong getenv_bootm_low(void) { char *s = getenv("bootm_low");