All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <50EBC74C.6070602@openwrt.org>

diff --git a/a/2.txt b/N1/2.txt
index 395829a..0997cc0 100644
--- a/a/2.txt
+++ b/N1/2.txt
@@ -1,4 +1,4 @@
->From 40fd1ec80a4396faf85013c66004f8d95ed3c554 Mon Sep 17 00:00:00 2001
+From 40fd1ec80a4396faf85013c66004f8d95ed3c554 Mon Sep 17 00:00:00 2001
 From: Gabor Juhos <juhosg@openwrt.org>
 Date: Thu, 3 Jan 2013 21:19:11 +0100
 Subject: [PATCH] MIPS: bootm.c: add support for passing device-tree to Linux
diff --git a/a/content_digest b/N1/content_digest
index 9c45f51..329fa10 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -195,7 +195,7 @@
  "\01:2\0"
  "fn\00001-MIPS-bootm.c-add-support-for-passing-device-tree-to-.patch\0"
  "b\0"
- ">From 40fd1ec80a4396faf85013c66004f8d95ed3c554 Mon Sep 17 00:00:00 2001\n"
+ "From 40fd1ec80a4396faf85013c66004f8d95ed3c554 Mon Sep 17 00:00:00 2001\n"
  "From: Gabor Juhos <juhosg@openwrt.org>\n"
  "Date: Thu, 3 Jan 2013 21:19:11 +0100\n"
  "Subject: [PATCH] MIPS: bootm.c: add support for passing device-tree to Linux\n"
@@ -376,4 +376,4 @@
  "-- \n"
  1.7.10
 
-9226aa8d383bc9350e331bf612170c9e671e5b99ebbc8096f2ae500f95dec2fe
+0ef1a07b8eb7534fb93b041149306e577db6c51a5577492fff022a0f5b8f9f4a

diff --git a/a/1.txt b/N2/1.txt
index 4ba158e..1125a0d 100644
--- a/a/1.txt
+++ b/N2/1.txt
@@ -70,7 +70,7 @@ Gabor
 > 
 > Starting kernel ...
 > 
-> Linux version 3.8.0-rc2 (juhosg@mag2) (gcc version 4.6.4 20121106 (prerelease) (Linaro GCC 4.6-2012.11) ) #456 Mon Jan 7 20:53:57 CET 2013
+> Linux version 3.8.0-rc2 (juhosg at mag2) (gcc version 4.6.4 20121106 (prerelease) (Linaro GCC 4.6-2012.11) ) #456 Mon Jan 7 20:53:57 CET 2013
 > ath79: using Device Tree passed by bootloader
 > bootconsole [early0] enabled
 > CPU revision is: 00019374 (MIPS 24Kc)
@@ -115,7 +115,7 @@ Gabor
 > UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
 > NET: Registered protocol family 1
 > squashfs: version 4.0 (2009/01/31) Phillip Lougher
-> jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
+> jffs2: version 2.2. (NAND) (SUMMARY)  ?? 2001-2006 Red Hat, Inc.
 > msgmni has been set to 52
 > io scheduler noop registered
 > io scheduler deadline registered (default)
@@ -176,4 +176,13 @@ Gabor
 >   * 1 1/2 oz Dark Rum       with crushed ice. Stir.
 >   * 2 tsp. Creme de Cacao
 >  -----------------------------------------------------
-> root@OpenWrt:/#
+> root at OpenWrt:/#
+
+
+-------------- next part --------------
+A non-text attachment was scrubbed...
+Name: 0001-MIPS-bootm.c-add-support-for-passing-device-tree-to-.patch
+Type: text/x-patch
+Size: 4510 bytes
+Desc: not available
+URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130108/8f159bfb/attachment.bin>
diff --git a/a/2.hdr b/a/2.hdr
deleted file mode 100644
index f47e922..0000000
--- a/a/2.hdr
+++ /dev/null
@@ -1,6 +0,0 @@
-Content-Type: text/x-patch;
- name="0001-MIPS-bootm.c-add-support-for-passing-device-tree-to-.patch"
-Content-Transfer-Encoding: 7bit
-Content-Disposition: attachment;
- filename*0="0001-MIPS-bootm.c-add-support-for-passing-device-tree-to-.pa";
- filename*1="tch"
diff --git a/a/2.txt b/a/2.txt
deleted file mode 100644
index 395829a..0000000
--- a/a/2.txt
+++ /dev/null
@@ -1,180 +0,0 @@
->From 40fd1ec80a4396faf85013c66004f8d95ed3c554 Mon Sep 17 00:00:00 2001
-From: Gabor Juhos <juhosg@openwrt.org>
-Date: Thu, 3 Jan 2013 21:19:11 +0100
-Subject: [PATCH] MIPS: bootm.c: add support for passing device-tree to Linux
-
-Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
----
- arch/mips/include/asm/config.h |    1 +
- arch/mips/lib/bootm.c          |  121 +++++++++++++++++++++++++++++++++++++++-
- 2 files changed, 120 insertions(+), 2 deletions(-)
-
-diff --git a/arch/mips/include/asm/config.h b/arch/mips/include/asm/config.h
-index 02fbfb3..82c4148 100644
---- a/arch/mips/include/asm/config.h
-+++ b/arch/mips/include/asm/config.h
-@@ -22,5 +22,6 @@
- #define _ASM_CONFIG_H_
- 
- #define CONFIG_NEEDS_MANUAL_RELOC
-+#define CONFIG_LMB
- 
- #endif
-diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
-index a36154a..e57066c 100644
---- a/arch/mips/lib/bootm.c
-+++ b/arch/mips/lib/bootm.c
-@@ -27,6 +27,9 @@
- #include <u-boot/zlib.h>
- #include <asm/byteorder.h>
- #include <asm/addrspace.h>
-+#include <fdt.h>
-+#include <libfdt.h>
-+#include <fdt_support.h>
- 
- DECLARE_GLOBAL_DATA_PTR;
- 
-@@ -43,7 +46,36 @@ static int linux_env_idx;
- static void linux_params_init(ulong start, char *commandline);
- static void linux_env_set(char *env_name, char *env_val);
- 
--static void boot_prep_linux(bootm_headers_t *images)
-+static ulong arch_get_sp(void)
-+{
-+	ulong ret;
-+
-+	asm("move %0, $sp" : "=r"(ret) : );
-+	return ret;
-+}
-+
-+void arch_lmb_reserve(struct lmb *lmb)
-+{
-+	ulong sp;
-+
-+	/*
-+	 * Booting a (Linux) kernel image
-+	 *
-+	 * Allocate space for command line and board info - the
-+	 * address should be as high as possible within the reach of
-+	 * the kernel (see CONFIG_SYS_BOOTMAPSZ settings), but in unused
-+	 * memory, which means far enough below the current stack
-+	 * pointer.
-+	 */
-+	sp = arch_get_sp();
-+	debug("## Current stack ends at 0x%08lx\n", sp);
-+
-+	/* adjust sp by 4K to be safe */
-+	sp -= 4096;
-+	lmb_reserve(lmb, sp, CONFIG_SYS_SDRAM_BASE + gd->ram_size - sp);
-+}
-+
-+static void boot_prep_linux_legacy(bootm_headers_t *images)
- {
- 	char *commandline = getenv("bootargs");
- 	char env_buf[12];
-@@ -83,9 +115,90 @@ static void boot_prep_linux(bootm_headers_t *images)
- 		linux_env_set("eth1addr", cp);
- }
- 
-+#ifdef CONFIG_OF_LIBFDT
-+static int boot_get_ft_len(bootm_headers_t *images)
-+{
-+	return images->ft_len;
-+}
-+
-+static char *boot_get_ft_addr(bootm_headers_t *images)
-+{
-+	return images->ft_addr;
-+}
-+
-+static int create_fdt(bootm_headers_t *images)
-+{
-+	ulong of_size = images->ft_len;
-+	char **of_flat_tree = &images->ft_addr;
-+	ulong *initrd_start = &images->initrd_start;
-+	ulong *initrd_end = &images->initrd_end;
-+	struct lmb *lmb = &images->lmb;
-+	ulong rd_len;
-+	int ret;
-+
-+	boot_fdt_add_mem_rsv_regions(lmb, *of_flat_tree);
-+
-+	ret = boot_relocate_fdt(lmb, of_flat_tree, &of_size);
-+	if (ret)
-+		return ret;
-+
-+	fdt_chosen(*of_flat_tree, 1);
-+	fdt_fixup_memory(*of_flat_tree, CONFIG_SYS_SDRAM_BASE, gd->ram_size);
-+	fdt_fixup_ethernet(*of_flat_tree);
-+	fdt_initrd(*of_flat_tree, *initrd_start, *initrd_end, 1);
-+
-+#ifdef CONFIG_OF_BOARD_SETUP
-+	ft_board_setup(*of_flat_tree, gd->bd);
-+#endif
-+
-+	return 0;
-+}
-+
-+static int boot_prep_linux_fdt(bootm_headers_t *images)
-+{
-+	if (!images->ft_len)
-+		return -1;
-+
-+	debug("using: FDT\n");
-+	if (create_fdt(images)) {
-+		printf("FDT creation failed! hanging...");
-+		hang();
-+	}
-+
-+	return 0;
-+}
-+#else
-+static inline int boot_get_ft_len(bootm_headers_t *images)
-+{
-+	return 0;
-+}
-+
-+static inline char **boot_get_ft_addr(bootm_headers_t *images)
-+{
-+	return 0;
-+}
-+
-+static inline int boot_prep_linux_fdt(bootm_headers_t *images)
-+{
-+	return -1;
-+}
-+#endif /* CONFIG_OF_LIBFDT */
-+
-+static void boot_prep_linux(bootm_headers_t *images)
-+{
-+	int ret;
-+
-+	ret = boot_prep_linux_fdt(images);
-+	if (!ret)
-+		return;
-+
-+	boot_prep_linux_legacy(images);
-+}
-+
- static void boot_jump_linux(bootm_headers_t *images)
- {
- 	void (*theKernel) (int, char **, char **, int *);
-+	ulong ft_len;
- 
- 	/* find kernel entry point */
- 	theKernel = (void (*)(int, char **, char **, int *))images->ep;
-@@ -98,7 +211,11 @@ static void boot_jump_linux(bootm_headers_t *images)
- 	/* we assume that the kernel is in place */
- 	printf("\nStarting kernel ...\n\n");
- 
--	theKernel(linux_argc, linux_argv, linux_env, 0);
-+	ft_len = boot_get_ft_len(images);
-+	if (ft_len)
-+		theKernel(FDT_MAGIC, boot_get_ft_addr(images), NULL, 0);
-+	else
-+		theKernel(linux_argc, linux_argv, linux_env, 0);
- }
- 
- int do_bootm_linux(int flag, int argc, char * const argv[],
--- 
-1.7.10
diff --git a/a/content_digest b/N2/content_digest
index 9c45f51..0c8ffe2 100644
--- a/a/content_digest
+++ b/N2/content_digest
@@ -1,17 +1,8 @@
  "From\0Gabor Juhos <juhosg@openwrt.org>\0"
- "Subject\0Proposal for an interface to pass a DT to the kernel on MIPS\0"
+ "Subject\0[U-Boot] Proposal for an interface to pass a DT to the kernel on MIPS\0"
  "Date\0Tue, 08 Jan 2013 08:14:20 +0100\0"
- "To\0Ralf Baechle <ralf@linux-mips.org>\0"
- "Cc\0Grant Likely <grant.likely@secretlab.ca>"
-  John Crispin <blogic@openwrt.org>
-  Thomas Gleixner <tglx@linutronix.de>
-  Dezhong Diao <dediao@cisco.com>
-  Geert Uytterhoeven <geert@linux-m68k.org>
-  David Daney <ddaney@caviumnetworks.com>
-  linux-mips@linux-mips.org
-  Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
- " u-boot@lists.denx.de\0"
- "\01:1\0"
+ "To\0u-boot@lists.denx.de\0"
+ "\00:1\0"
  "b\0"
  "Sorry for the duplicated post. The first version did not go through to the\n"
  "e-mail addresses at the linux-mips.org domain due to problems with the SMTP server.\n"
@@ -85,7 +76,7 @@
  "> \n"
  "> Starting kernel ...\n"
  "> \n"
- "> Linux version 3.8.0-rc2 (juhosg@mag2) (gcc version 4.6.4 20121106 (prerelease) (Linaro GCC 4.6-2012.11) ) #456 Mon Jan 7 20:53:57 CET 2013\n"
+ "> Linux version 3.8.0-rc2 (juhosg at mag2) (gcc version 4.6.4 20121106 (prerelease) (Linaro GCC 4.6-2012.11) ) #456 Mon Jan 7 20:53:57 CET 2013\n"
  "> ath79: using Device Tree passed by bootloader\n"
  "> bootconsole [early0] enabled\n"
  "> CPU revision is: 00019374 (MIPS 24Kc)\n"
@@ -130,7 +121,7 @@
  "> UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)\n"
  "> NET: Registered protocol family 1\n"
  "> squashfs: version 4.0 (2009/01/31) Phillip Lougher\n"
- "> jffs2: version 2.2. (NAND) (SUMMARY)  \303\202\302\251 2001-2006 Red Hat, Inc.\n"
+ "> jffs2: version 2.2. (NAND) (SUMMARY)  ?? 2001-2006 Red Hat, Inc.\n"
  "> msgmni has been set to 52\n"
  "> io scheduler noop registered\n"
  "> io scheduler deadline registered (default)\n"
@@ -191,189 +182,15 @@
  ">   * 1 1/2 oz Dark Rum       with crushed ice. Stir.\n"
  ">   * 2 tsp. Creme de Cacao\n"
  ">  -----------------------------------------------------\n"
- > root@OpenWrt:/#
- "\01:2\0"
- "fn\00001-MIPS-bootm.c-add-support-for-passing-device-tree-to-.patch\0"
- "b\0"
- ">From 40fd1ec80a4396faf85013c66004f8d95ed3c554 Mon Sep 17 00:00:00 2001\n"
- "From: Gabor Juhos <juhosg@openwrt.org>\n"
- "Date: Thu, 3 Jan 2013 21:19:11 +0100\n"
- "Subject: [PATCH] MIPS: bootm.c: add support for passing device-tree to Linux\n"
+ "> root at OpenWrt:/#\n"
  "\n"
- "Signed-off-by: Gabor Juhos <juhosg@openwrt.org>\n"
- "---\n"
- " arch/mips/include/asm/config.h |    1 +\n"
- " arch/mips/lib/bootm.c          |  121 +++++++++++++++++++++++++++++++++++++++-\n"
- " 2 files changed, 120 insertions(+), 2 deletions(-)\n"
  "\n"
- "diff --git a/arch/mips/include/asm/config.h b/arch/mips/include/asm/config.h\n"
- "index 02fbfb3..82c4148 100644\n"
- "--- a/arch/mips/include/asm/config.h\n"
- "+++ b/arch/mips/include/asm/config.h\n"
- "@@ -22,5 +22,6 @@\n"
- " #define _ASM_CONFIG_H_\n"
- " \n"
- " #define CONFIG_NEEDS_MANUAL_RELOC\n"
- "+#define CONFIG_LMB\n"
- " \n"
- " #endif\n"
- "diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c\n"
- "index a36154a..e57066c 100644\n"
- "--- a/arch/mips/lib/bootm.c\n"
- "+++ b/arch/mips/lib/bootm.c\n"
- "@@ -27,6 +27,9 @@\n"
- " #include <u-boot/zlib.h>\n"
- " #include <asm/byteorder.h>\n"
- " #include <asm/addrspace.h>\n"
- "+#include <fdt.h>\n"
- "+#include <libfdt.h>\n"
- "+#include <fdt_support.h>\n"
- " \n"
- " DECLARE_GLOBAL_DATA_PTR;\n"
- " \n"
- "@@ -43,7 +46,36 @@ static int linux_env_idx;\n"
- " static void linux_params_init(ulong start, char *commandline);\n"
- " static void linux_env_set(char *env_name, char *env_val);\n"
- " \n"
- "-static void boot_prep_linux(bootm_headers_t *images)\n"
- "+static ulong arch_get_sp(void)\n"
- "+{\n"
- "+\tulong ret;\n"
- "+\n"
- "+\tasm(\"move %0, $sp\" : \"=r\"(ret) : );\n"
- "+\treturn ret;\n"
- "+}\n"
- "+\n"
- "+void arch_lmb_reserve(struct lmb *lmb)\n"
- "+{\n"
- "+\tulong sp;\n"
- "+\n"
- "+\t/*\n"
- "+\t * Booting a (Linux) kernel image\n"
- "+\t *\n"
- "+\t * Allocate space for command line and board info - the\n"
- "+\t * address should be as high as possible within the reach of\n"
- "+\t * the kernel (see CONFIG_SYS_BOOTMAPSZ settings), but in unused\n"
- "+\t * memory, which means far enough below the current stack\n"
- "+\t * pointer.\n"
- "+\t */\n"
- "+\tsp = arch_get_sp();\n"
- "+\tdebug(\"## Current stack ends at 0x%08lx\\n\", sp);\n"
- "+\n"
- "+\t/* adjust sp by 4K to be safe */\n"
- "+\tsp -= 4096;\n"
- "+\tlmb_reserve(lmb, sp, CONFIG_SYS_SDRAM_BASE + gd->ram_size - sp);\n"
- "+}\n"
- "+\n"
- "+static void boot_prep_linux_legacy(bootm_headers_t *images)\n"
- " {\n"
- " \tchar *commandline = getenv(\"bootargs\");\n"
- " \tchar env_buf[12];\n"
- "@@ -83,9 +115,90 @@ static void boot_prep_linux(bootm_headers_t *images)\n"
- " \t\tlinux_env_set(\"eth1addr\", cp);\n"
- " }\n"
- " \n"
- "+#ifdef CONFIG_OF_LIBFDT\n"
- "+static int boot_get_ft_len(bootm_headers_t *images)\n"
- "+{\n"
- "+\treturn images->ft_len;\n"
- "+}\n"
- "+\n"
- "+static char *boot_get_ft_addr(bootm_headers_t *images)\n"
- "+{\n"
- "+\treturn images->ft_addr;\n"
- "+}\n"
- "+\n"
- "+static int create_fdt(bootm_headers_t *images)\n"
- "+{\n"
- "+\tulong of_size = images->ft_len;\n"
- "+\tchar **of_flat_tree = &images->ft_addr;\n"
- "+\tulong *initrd_start = &images->initrd_start;\n"
- "+\tulong *initrd_end = &images->initrd_end;\n"
- "+\tstruct lmb *lmb = &images->lmb;\n"
- "+\tulong rd_len;\n"
- "+\tint ret;\n"
- "+\n"
- "+\tboot_fdt_add_mem_rsv_regions(lmb, *of_flat_tree);\n"
- "+\n"
- "+\tret = boot_relocate_fdt(lmb, of_flat_tree, &of_size);\n"
- "+\tif (ret)\n"
- "+\t\treturn ret;\n"
- "+\n"
- "+\tfdt_chosen(*of_flat_tree, 1);\n"
- "+\tfdt_fixup_memory(*of_flat_tree, CONFIG_SYS_SDRAM_BASE, gd->ram_size);\n"
- "+\tfdt_fixup_ethernet(*of_flat_tree);\n"
- "+\tfdt_initrd(*of_flat_tree, *initrd_start, *initrd_end, 1);\n"
- "+\n"
- "+#ifdef CONFIG_OF_BOARD_SETUP\n"
- "+\tft_board_setup(*of_flat_tree, gd->bd);\n"
- "+#endif\n"
- "+\n"
- "+\treturn 0;\n"
- "+}\n"
- "+\n"
- "+static int boot_prep_linux_fdt(bootm_headers_t *images)\n"
- "+{\n"
- "+\tif (!images->ft_len)\n"
- "+\t\treturn -1;\n"
- "+\n"
- "+\tdebug(\"using: FDT\\n\");\n"
- "+\tif (create_fdt(images)) {\n"
- "+\t\tprintf(\"FDT creation failed! hanging...\");\n"
- "+\t\thang();\n"
- "+\t}\n"
- "+\n"
- "+\treturn 0;\n"
- "+}\n"
- "+#else\n"
- "+static inline int boot_get_ft_len(bootm_headers_t *images)\n"
- "+{\n"
- "+\treturn 0;\n"
- "+}\n"
- "+\n"
- "+static inline char **boot_get_ft_addr(bootm_headers_t *images)\n"
- "+{\n"
- "+\treturn 0;\n"
- "+}\n"
- "+\n"
- "+static inline int boot_prep_linux_fdt(bootm_headers_t *images)\n"
- "+{\n"
- "+\treturn -1;\n"
- "+}\n"
- "+#endif /* CONFIG_OF_LIBFDT */\n"
- "+\n"
- "+static void boot_prep_linux(bootm_headers_t *images)\n"
- "+{\n"
- "+\tint ret;\n"
- "+\n"
- "+\tret = boot_prep_linux_fdt(images);\n"
- "+\tif (!ret)\n"
- "+\t\treturn;\n"
- "+\n"
- "+\tboot_prep_linux_legacy(images);\n"
- "+}\n"
- "+\n"
- " static void boot_jump_linux(bootm_headers_t *images)\n"
- " {\n"
- " \tvoid (*theKernel) (int, char **, char **, int *);\n"
- "+\tulong ft_len;\n"
- " \n"
- " \t/* find kernel entry point */\n"
- " \ttheKernel = (void (*)(int, char **, char **, int *))images->ep;\n"
- "@@ -98,7 +211,11 @@ static void boot_jump_linux(bootm_headers_t *images)\n"
- " \t/* we assume that the kernel is in place */\n"
- " \tprintf(\"\\nStarting kernel ...\\n\\n\");\n"
- " \n"
- "-\ttheKernel(linux_argc, linux_argv, linux_env, 0);\n"
- "+\tft_len = boot_get_ft_len(images);\n"
- "+\tif (ft_len)\n"
- "+\t\ttheKernel(FDT_MAGIC, boot_get_ft_addr(images), NULL, 0);\n"
- "+\telse\n"
- "+\t\ttheKernel(linux_argc, linux_argv, linux_env, 0);\n"
- " }\n"
- " \n"
- " int do_bootm_linux(int flag, int argc, char * const argv[],\n"
- "-- \n"
- 1.7.10
+ "-------------- next part --------------\n"
+ "A non-text attachment was scrubbed...\n"
+ "Name: 0001-MIPS-bootm.c-add-support-for-passing-device-tree-to-.patch\n"
+ "Type: text/x-patch\n"
+ "Size: 4510 bytes\n"
+ "Desc: not available\n"
+ URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130108/8f159bfb/attachment.bin>
 
-9226aa8d383bc9350e331bf612170c9e671e5b99ebbc8096f2ae500f95dec2fe
+4b3234e7561693941bc5e429fca51d19249a3a805f00175b0c7c6bb220e2f930

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.