* [PATCH] mips: fixed MIPS Makefile
@ 2004-10-19 15:33 Yoichi Yuasa
2004-10-19 17:37 ` Maciej W. Rozycki
0 siblings, 1 reply; 3+ messages in thread
From: Yoichi Yuasa @ 2004-10-19 15:33 UTC (permalink / raw)
To: Andrew Morton; +Cc: yuasa, ralf, linux-kernel
The MIPS Makefile was changed so that the offset of data section
may not be dependent on a specific machine header file.
Signed-off-by: Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
diff -urN -X dontdiff a-orig/arch/mips/Makefile a/arch/mips/Makefile
--- a-orig/arch/mips/Makefile Tue Oct 19 06:53:06 2004
+++ a/arch/mips/Makefile Tue Oct 19 23:33:51 2004
@@ -527,6 +527,7 @@
#load-$(CONFIG_SGI_IP27) += 0xa80000000001c000
ifdef CONFIG_MAPPED_KERNEL
load-$(CONFIG_SGI_IP27) += 0xc001c000
+dataoffset-$(CONFIG_SGI_IP27) += 0x01000000
else
load-$(CONFIG_SGI_IP27) += 0x8001c000
endif
@@ -625,6 +626,15 @@
endif
#
+# If you need data offset, please set up as follows.
+#
+# dataoffset-$(CONFIG_FOO) := <data offset value>
+#
+
+DATAOFFSET := $(shell if [ -z $(dataoffset-y) ] ; then echo "0"; \
+ else echo $(dataoffset-y); fi ;)
+
+#
# Some machines like the Indy need 32-bit ELF binaries for booting purposes.
# Other need ECOFF, so we build a 32-bit ELF binary for them which we then
# convert to ECOFF using elf2ecoff.
@@ -644,7 +654,7 @@
CPPFLAGS_vmlinux.lds := \
-D"LOADADDR=$(load-y)" \
-D"JIFFIES=$(JIFFIES)" \
- -imacros $(srctree)/include/asm-$(ARCH)/sn/mapped_kernel.h
+ -D"DATAOFFSET=$(DATAOFFSET)"
AFLAGS += $(cflags-y)
CFLAGS += $(cflags-y)
diff -urN -X dontdiff a-orig/arch/mips/kernel/vmlinux.lds.S a/arch/mips/kernel/vmlinux.lds.S
--- a-orig/arch/mips/kernel/vmlinux.lds.S Tue Oct 19 06:53:46 2004
+++ a/arch/mips/kernel/vmlinux.lds.S Tue Oct 19 23:08:15 2004
@@ -49,7 +49,7 @@
/* writeable */
.data : { /* Data */
- . = . + MAPPED_OFFSET; /* for CONFIG_MAPPED_KERNEL */
+ . = . + DATAOFFSET; /* for CONFIG_MAPPED_KERNEL */
*(.data.init_task)
*(.data)
diff -urN -X dontdiff a-orig/include/asm-mips/sn/mapped_kernel.h a/include/asm-mips/sn/mapped_kernel.h
--- a-orig/include/asm-mips/sn/mapped_kernel.h Tue Oct 19 06:54:07 2004
+++ a/include/asm-mips/sn/mapped_kernel.h Tue Oct 19 23:08:15 2004
@@ -39,13 +39,11 @@
#define MAPPED_KERN_RW_TO_PHYS(x) \
((unsigned long)MAPPED_ADDR_RW_TO_PHYS(x) | \
MAPPED_KERN_RW_PHYSBASE(get_compact_nodeid()))
-#define MAPPED_OFFSET 16777216
#else /* CONFIG_MAPPED_KERNEL */
#define MAPPED_KERN_RO_TO_PHYS(x) (x - CKSEG0)
#define MAPPED_KERN_RW_TO_PHYS(x) (x - CKSEG0)
-#define MAPPED_OFFSET 0
#endif /* CONFIG_MAPPED_KERNEL */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mips: fixed MIPS Makefile
2004-10-19 15:33 [PATCH] mips: fixed MIPS Makefile Yoichi Yuasa
@ 2004-10-19 17:37 ` Maciej W. Rozycki
2004-10-20 15:27 ` [PATCH update] " Yoichi Yuasa
0 siblings, 1 reply; 3+ messages in thread
From: Maciej W. Rozycki @ 2004-10-19 17:37 UTC (permalink / raw)
To: Yoichi Yuasa; +Cc: Andrew Morton, ralf, linux-kernel
On Wed, 20 Oct 2004, Yoichi Yuasa wrote:
> #
> +# If you need data offset, please set up as follows.
> +#
> +# dataoffset-$(CONFIG_FOO) := <data offset value>
> +#
> +
> +DATAOFFSET := $(shell if [ -z $(dataoffset-y) ] ; then echo "0"; \
> + else echo $(dataoffset-y); fi ;)
Ugh, please consider using $(if ...).
Maciej
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH update] mips: fixed MIPS Makefile
2004-10-19 17:37 ` Maciej W. Rozycki
@ 2004-10-20 15:27 ` Yoichi Yuasa
0 siblings, 0 replies; 3+ messages in thread
From: Yoichi Yuasa @ 2004-10-20 15:27 UTC (permalink / raw)
To: akpm; +Cc: yuasa, ralf, linux-kernel, macro
Hello Andrew,
I had updated my patch.
Please apply latest one.
On Tue, 19 Oct 2004 18:37:12 +0100 (BST)
"Maciej W. Rozycki" <macro@linux-mips.org> wrote:
> On Wed, 20 Oct 2004, Yoichi Yuasa wrote:
>
> > #
> > +# If you need data offset, please set up as follows.
> > +#
> > +# dataoffset-$(CONFIG_FOO) := <data offset value>
> > +#
> > +
> > +DATAOFFSET := $(shell if [ -z $(dataoffset-y) ] ; then echo "0"; \
> > + else echo $(dataoffset-y); fi ;)
>
> Ugh, please consider using $(if ...).
Maciej,
Thank you for your comment.
My patch is updated.
The MIPS Makefile was changed so that the offset of data section
may not be dependent on a specific machine header file.
Signed-off-by: Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
diff -urN -X dontdiff a-orig/arch/mips/Makefile a/arch/mips/Makefile
--- a-orig/arch/mips/Makefile Tue Oct 19 06:53:06 2004
+++ a/arch/mips/Makefile Wed Oct 20 23:47:05 2004
@@ -527,6 +527,7 @@
#load-$(CONFIG_SGI_IP27) += 0xa80000000001c000
ifdef CONFIG_MAPPED_KERNEL
load-$(CONFIG_SGI_IP27) += 0xc001c000
+dataoffset-$(CONFIG_SGI_IP27) += 0x01000000
else
load-$(CONFIG_SGI_IP27) += 0x8001c000
endif
@@ -644,7 +645,7 @@
CPPFLAGS_vmlinux.lds := \
-D"LOADADDR=$(load-y)" \
-D"JIFFIES=$(JIFFIES)" \
- -imacros $(srctree)/include/asm-$(ARCH)/sn/mapped_kernel.h
+ -D"DATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)"
AFLAGS += $(cflags-y)
CFLAGS += $(cflags-y)
diff -urN -X dontdiff a-orig/arch/mips/kernel/vmlinux.lds.S a/arch/mips/kernel/vmlinux.lds.S
--- a-orig/arch/mips/kernel/vmlinux.lds.S Tue Oct 19 06:53:46 2004
+++ a/arch/mips/kernel/vmlinux.lds.S Wed Oct 20 23:46:31 2004
@@ -49,7 +49,7 @@
/* writeable */
.data : { /* Data */
- . = . + MAPPED_OFFSET; /* for CONFIG_MAPPED_KERNEL */
+ . = . + DATAOFFSET; /* for CONFIG_MAPPED_KERNEL */
*(.data.init_task)
*(.data)
diff -urN -X dontdiff a-orig/include/asm-mips/sn/mapped_kernel.h a/include/asm-mips/sn/mapped_kernel.h
--- a-orig/include/asm-mips/sn/mapped_kernel.h Tue Oct 19 06:54:07 2004
+++ a/include/asm-mips/sn/mapped_kernel.h Wed Oct 20 23:46:32 2004
@@ -39,13 +39,11 @@
#define MAPPED_KERN_RW_TO_PHYS(x) \
((unsigned long)MAPPED_ADDR_RW_TO_PHYS(x) | \
MAPPED_KERN_RW_PHYSBASE(get_compact_nodeid()))
-#define MAPPED_OFFSET 16777216
#else /* CONFIG_MAPPED_KERNEL */
#define MAPPED_KERN_RO_TO_PHYS(x) (x - CKSEG0)
#define MAPPED_KERN_RW_TO_PHYS(x) (x - CKSEG0)
-#define MAPPED_OFFSET 0
#endif /* CONFIG_MAPPED_KERNEL */
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-10-20 15:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-19 15:33 [PATCH] mips: fixed MIPS Makefile Yoichi Yuasa
2004-10-19 17:37 ` Maciej W. Rozycki
2004-10-20 15:27 ` [PATCH update] " Yoichi Yuasa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).