[syslinux:elflink] elflink: make linux kernel booting
syslinux-bot for Feng Tang
feng.tang at intel.com
Thu Aug 12 21:03:19 PDT 2010
Commit-ID: 63f0469c9012fde38c91bf22252b93c3af24b2af
Gitweb: http://syslinux.zytor.com/commit/63f0469c9012fde38c91bf22252b93c3af24b2af
Author: Feng Tang <feng.tang at intel.com>
AuthorDate: Mon, 21 Jun 2010 17:21:12 +0800
Committer: Feng Tang <feng.tang at intel.com>
CommitDate: Tue, 20 Jul 2010 11:10:04 +0800
elflink: make linux kernel booting
* modify execute.c to not using __com32.cs_bounce but lmalloc/lfree
* give core/malloc 32M memory
Now the kernel is loading ok, but "memdisk initrd=doshd.img" is not
working, need ask hpa if he has a new doshd.img
---
core/elflink/execute.c | 12 +++++++++++-
core/mem/init.c | 3 ++-
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/core/elflink/execute.c b/core/elflink/execute.c
index 1a7ce79..08946aa 100644
--- a/core/elflink/execute.c
+++ b/core/elflink/execute.c
@@ -21,7 +21,8 @@ void execute(const char *cmdline, enum kernel_type type)
{
com32sys_t ireg;
const char *p, *const *pp;
- char *q = __com32.cs_bounce;
+ //char *q = __com32.cs_bounce;
+ char *q;
const char *kernel, *args;
/* work around for spawn_load parameter */
@@ -29,6 +30,13 @@ void execute(const char *cmdline, enum kernel_type type)
memset(&ireg, 0, sizeof ireg);
+ q = lmalloc(128);
+ if (!q) {
+ printf("%s(): Fail to lmalloc a buffer to exec %s\n",
+ __func__, cmdline);
+ return;
+ }
+
kernel = q;
p = cmdline;
while (*p && !my_isspace(*p))
@@ -81,5 +89,7 @@ void execute(const char *cmdline, enum kernel_type type)
__intcall(0x22, &ireg, NULL);
}
+ lfree(kernel);
+
/* If this returns, something went bad; return to menu */
}
diff --git a/core/mem/init.c b/core/mem/init.c
index 497c213..cf45104 100644
--- a/core/mem/init.c
+++ b/core/mem/init.c
@@ -8,7 +8,8 @@
struct free_arena_header __core_malloc_head[NHEAP];
//static __hugebss char main_heap[128 << 10];
-static __hugebss char main_heap[128 << 13];
+/* change it to 32M */
+static __hugebss char main_heap[32 << 20];
extern char __lowmem_heap[];
void mem_init(void)
More information about the Syslinux-commits
mailing list