History

Support kernel_noload uImage type

Do not trigger an error when loading a uImage with the IH_TYPE_KERNEL_NOLOAD type. These images do not need to be copied to their load address before being executed. All archs (excepted PPC) do not use the uImage load and entry point parameters, so their current behavior needs not be changed further than just accepting the image type. Tested and validated on ARM.

Alexandre Courbot committed 14 years ago

Commit c423dc91 parent 0e4946b2 files · +7 −1Browse files

Unified · Split

2 files
  1. include/image.h +2 −0
  2. kexec/kexec-uImage.c +5 −1
include/image.h+2−0
@@ -129,6 +129,8 @@ · 128 unmodified lines
129129 #define IH_TYPE_FILESYSTEM 7 /* Filesystem Image (any type) */
130130 #define IH_TYPE_FLATDT 8 /* Binary Flat Device Tree Blob */
131131 #define IH_TYPE_KWBIMAGE 9 /* Kirkwood Boot Image */
132+#define IH_TYPE_KERNEL_NOLOAD 14 /* OS Kernel Image, can run */
133+ /* from any load address */
132134
133135 /*
134136 * Compression Types
kexec/kexec-uImage.c+5−1
@@ -39,7 +39,11 @@ int uImage_probe(const unsigned char *buf, off_t len, unsigned int arch) · 38 unmodified lines
3939 return -1;
4040 }
4141 #endif
42− if (header.ih_type != IH_TYPE_KERNEL) {
42+ switch (header.ih_type) {
43+ case IH_TYPE_KERNEL:
44+ case IH_TYPE_KERNEL_NOLOAD:
45+ break;
46+ default:
4347 printf("uImage type %d unsupported\n", header.ih_type);
4448 return -1;
4549 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t