From: Wolfgang Wegner <wolfgang@leila.ping.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [OT] initrd problem with m68k linux
Date: Wed, 7 Apr 2010 13:30:55 +0200 [thread overview]
Message-ID: <20100407113055.GC23389@leila.ping.de> (raw)
In-Reply-To: <20100406133840.GA23389@leila.ping.de>
Hi,
I found the problem: the linux kernel 2.6.25 from the freescale LTIB
is missing support for initrd via U-Boot.
With the patch below I was able to use an initramfs from a seperate
image, I suppose initrd should work, too. It is a quick hack, but it
works for me and I wanted to give the solution after having asked
here.
Regards,
Wolfgang
diff -ur linux-2.6.25_orig_for_diff/arch/m68k/coldfire/config.c linux-2.6.25/arch/m68k/coldfire/config.c
--- linux-2.6.25_orig_for_diff/arch/m68k/coldfire/config.c 2010-01-25 17:27:29.000000000 +0100
+++ linux-2.6.25/arch/m68k/coldfire/config.c 2010-04-07 11:53:56.000000000 +0200
@@ -33,6 +33,7 @@
#include <asm/movs.h>
#include <asm/page.h>
#include <asm/pgalloc.h>
+#include <linux/initrd.h>
#include <asm/mcfsim.h>
@@ -128,6 +129,14 @@
uboot_info.cmd_line_start = (*(u32 *)(uboot_info_stk+12)) + offset;
uboot_info.cmd_line_stop = (*(u32 *)(uboot_info_stk+16)) + offset;
+ if(uboot_info.initrd_start && uboot_info.initrd_end &&
+ (uboot_info.initrd_end > uboot_info.initrd_start)) {
+ initrd_start = uboot_info.initrd_start;
+ initrd_end = uboot_info.initrd_end;
+ printk(KERN_INFO "initrd at 0x%lx:0x%lx\n",
+ initrd_start, initrd_end);
+ }
+
/* copy over mac addresses */
memcpy(uboot_enet0, uboot_info.bdi->bi_enet0addr, 6);
memcpy(uboot_enet1, uboot_info.bdi->bi_enet1addr, 6);
diff -ur linux-2.6.25_orig_for_diff/arch/m68k/kernel/setup.c linux-2.6.25/arch/m68k/kernel/setup.c
--- linux-2.6.25_orig_for_diff/arch/m68k/kernel/setup.c 2010-01-25 17:27:29.000000000 +0100
+++ linux-2.6.25/arch/m68k/kernel/setup.c 2010-04-07 11:53:30.000000000 +0200
@@ -341,6 +341,19 @@
paging_init();
+#if defined(CONFIG_COLDFIRE)
+ if (initrd_start && initrd_end &&
+ (initrd_end > initrd_start)) {
+ unsigned long initrd_size = initrd_end - initrd_start;
+ reserve_bootmem_node(__virt_to_node(phys_to_virt(initrd_start)),
+ initrd_start, initrd_size,
+ BOOTMEM_DEFAULT);
+ initrd_start = (unsigned long)phys_to_virt(initrd_start);
+ initrd_end = initrd_start + initrd_size;
+ printk("initrd: %08lx - %08lx\n", initrd_start, initrd_end);
+ }
+#endif
+
#if !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE)
for (i = 1; i < m68k_num_memory; i++)
free_bootmem_node(NODE_DATA(i), m68k_memory[i].addr,
prev parent reply other threads:[~2010-04-07 11:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-06 13:38 [U-Boot] [OT] initrd problem with m68k linux Wolfgang Wegner
2010-04-07 11:30 ` Wolfgang Wegner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100407113055.GC23389@leila.ping.de \
--to=wolfgang@leila.ping.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox