summaryrefslogtreecommitdiff
path: root/lib_i386/zimage.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2008-03-26 10:41:48 +0100
committerWolfgang Denk <wd@denx.de>2008-03-26 10:41:48 +0100
commitb951f8d31711f3f10ad119ddcf5a3d0afe14d561 (patch)
tree950ca2e675ec92ea7b5610a3a2ea2b739f0aaab5 /lib_i386/zimage.c
parent218ca724c08ca8a649f0917cf201cf23d4b33f39 (diff)
parent27f33e9f45ef7f9685cbdc65066a1828e85dde4f (diff)
downloadu-boot-imx-b951f8d31711f3f10ad119ddcf5a3d0afe14d561.zip
u-boot-imx-b951f8d31711f3f10ad119ddcf5a3d0afe14d561.tar.gz
u-boot-imx-b951f8d31711f3f10ad119ddcf5a3d0afe14d561.tar.bz2
Merge branch 'master_merge_new-image' of /home/tur/git/u-boot
Diffstat (limited to 'lib_i386/zimage.c')
-rw-r--r--lib_i386/zimage.c50
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, &regs, &regs);
}
-
-
-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;
-}