|
@@ -13,6 +13,7 @@
|
|
|
#include <stdint.h>
|
|
#include <stdint.h>
|
|
|
#include <stdio.h>
|
|
#include <stdio.h>
|
|
|
#include <stdlib.h>
|
|
#include <stdlib.h>
|
|
|
|
|
+#include "../../../../include/linux/sizes.h"
|
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
int main(int argc, char *argv[])
|
|
|
{
|
|
{
|
|
@@ -45,11 +46,11 @@ int main(int argc, char *argv[])
|
|
|
vmlinuz_load_addr = vmlinux_load_addr + vmlinux_size;
|
|
vmlinuz_load_addr = vmlinux_load_addr + vmlinux_size;
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
|
- * Align with 16 bytes: "greater than that used for any standard data
|
|
|
|
|
- * types by a MIPS compiler." -- See MIPS Run Linux (Second Edition).
|
|
|
|
|
|
|
+ * Align with 64KB: KEXEC needs load sections to be aligned to PAGE_SIZE,
|
|
|
|
|
+ * which may be as large as 64KB depending on the kernel configuration.
|
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
- vmlinuz_load_addr += (16 - vmlinux_size % 16);
|
|
|
|
|
|
|
+ vmlinuz_load_addr += (SZ_64K - vmlinux_size % SZ_64K);
|
|
|
|
|
|
|
|
printf("0x%llx\n", vmlinuz_load_addr);
|
|
printf("0x%llx\n", vmlinuz_load_addr);
|
|
|
|
|
|