diff options
author | Bartlomiej Sieka <tur@semihalf.com> | 2008-03-26 09:38:06 +0100 |
---|---|---|
committer | Bartlomiej Sieka <tur@semihalf.com> | 2008-03-26 09:38:06 +0100 |
commit | 27f33e9f45ef7f9685cbdc65066a1828e85dde4f (patch) | |
tree | 5828044d71e5caa3bec4d05c6c48793df0cd17a3 /lib_i386/zimage.c | |
parent | 18e69a35efbb078403db0c0063986470dad7d082 (diff) | |
parent | 388b82fddc7c05596f3f615f190da0448227dc82 (diff) | |
download | u-boot-imx-27f33e9f45ef7f9685cbdc65066a1828e85dde4f.zip u-boot-imx-27f33e9f45ef7f9685cbdc65066a1828e85dde4f.tar.gz u-boot-imx-27f33e9f45ef7f9685cbdc65066a1828e85dde4f.tar.bz2 |
Merge branch 'new-image' of git://www.denx.de/git/u-boot-testing
Conflicts:
common/cmd_bootm.c
cpu/mpc8xx/cpu.c
Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
Diffstat (limited to 'lib_i386/zimage.c')
-rw-r--r-- | lib_i386/zimage.c | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/lib_i386/zimage.c b/lib_i386/zimage.c index 3510f2f..c3b4e59 100644 --- a/lib_i386/zimage.c +++ b/lib_i386/zimage.c @@ -212,7 +212,6 @@ void *load_zimage(char *image, unsigned long kernel_size, return setup_base; } - void boot_zimage(void *setup_base) { struct pt_regs regs; @@ -224,52 +223,3 @@ void boot_zimage(void *setup_base) regs.eflags = 0; enter_realmode(((u32)setup_base+SETUP_START_OFFSET)>>4, 0, ®s, ®s); } - - -image_header_t *fake_zimage_header(image_header_t *hdr, void *ptr, int size) -{ - /* There is no way to know the size of a zImage ... * - * so we assume that 2MB will be enough for now */ -#define ZIMAGE_SIZE 0x200000 - - /* load a 1MB, the loaded will have to be moved to its final - * position again later... */ -#define ZIMAGE_LOAD 0x100000 - - ulong checksum; - - if (KERNEL_MAGIC != *(u16*)(ptr + BOOT_FLAG_OFF)) { - /* not a zImage or bzImage */ - return NULL; - } - - if (-1 == size) { - size = ZIMAGE_SIZE; - } -#if 0 - checksum = crc32 (0, ptr, size); -#else - checksum = 0; -#endif - memset(hdr, 0, sizeof(image_header_t)); - - /* Build new header */ - hdr->ih_magic = htonl(IH_MAGIC); - hdr->ih_time = 0; - hdr->ih_size = htonl(size); - hdr->ih_load = htonl(ZIMAGE_LOAD); - hdr->ih_ep = 0; - hdr->ih_dcrc = htonl(checksum); - hdr->ih_os = IH_OS_LINUX; - hdr->ih_arch = IH_CPU_I386; - hdr->ih_type = IH_TYPE_KERNEL; - hdr->ih_comp = IH_COMP_NONE; - - strncpy((char *)hdr->ih_name, "(none)", IH_NMLEN); - - checksum = crc32(0,(const char *)hdr,sizeof(image_header_t)); - - hdr->ih_hcrc = htonl(checksum); - - return hdr; -} |