* [PATCH 1/2] pbl: fix IMAGE_COMPRESSION_LZO-enabled build on MIPS
@ 2013-02-04 22:36 Antony Pavlov
2013-02-04 22:36 ` [PATCH 2/2] pbl: factorise linux/decompress/mm.h inclusion Antony Pavlov
2013-02-05 8:58 ` [PATCH 1/2] pbl: fix IMAGE_COMPRESSION_LZO-enabled build on MIPS Sascha Hauer
0 siblings, 2 replies; 5+ messages in thread
From: Antony Pavlov @ 2013-02-04 22:36 UTC (permalink / raw)
To: barebox
Here's the error message:
LD arch/mips/pbl/zbarebox
pbl/built-in-pbl.o: In function `decompress_unlzo':
/home/antony/barebox.git.rebased.isp/pbl/decomp.c:35: undefined reference to `free'
pbl/built-in-pbl.o: In function `pbl_barebox_uncompress':
(.text.pbl_barebox_uncompress+0x6d0): relocation truncated to fit: R_MIPS_26 against `free'
pbl/built-in-pbl.o: In function `pbl_barebox_uncompress':
(.text.pbl_barebox_uncompress+0x6e0): undefined reference to `free'
pbl/built-in-pbl.o: In function `pbl_barebox_uncompress':
(.text.pbl_barebox_uncompress+0x6e0): relocation truncated to fit: R_MIPS_26 against `free'
make[1]: *** [arch/mips/pbl/zbarebox] Error 1
make: *** [zbarebox.bin] Error 2
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
lib/decompress_unlzo.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/decompress_unlzo.c b/lib/decompress_unlzo.c
index 776719c..1b2dc9d 100644
--- a/lib/decompress_unlzo.c
+++ b/lib/decompress_unlzo.c
@@ -26,14 +26,16 @@
*/
#include <common.h>
-#include <malloc.h>
#include <linux/types.h>
#include <errno.h>
#include <fs.h>
#include <xfuncs.h>
#ifdef STATIC
+#include <linux/decompress/mm.h>
#include "lzo/lzo1x_decompress.c"
+#else
+#include <malloc.h>
#endif
#include <lzo.h>
--
1.7.10.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] pbl: factorise linux/decompress/mm.h inclusion
2013-02-04 22:36 [PATCH 1/2] pbl: fix IMAGE_COMPRESSION_LZO-enabled build on MIPS Antony Pavlov
@ 2013-02-04 22:36 ` Antony Pavlov
2013-02-05 8:57 ` Sascha Hauer
2013-02-05 8:58 ` [PATCH 1/2] pbl: fix IMAGE_COMPRESSION_LZO-enabled build on MIPS Sascha Hauer
1 sibling, 1 reply; 5+ messages in thread
From: Antony Pavlov @ 2013-02-04 22:36 UTC (permalink / raw)
To: barebox
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
lib/decompress_inflate.c | 1 -
lib/decompress_unlzo.c | 1 -
pbl/decomp.c | 2 ++
3 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/decompress_inflate.c b/lib/decompress_inflate.c
index 5c1ebb6..526d6a1 100644
--- a/lib/decompress_inflate.c
+++ b/lib/decompress_inflate.c
@@ -4,7 +4,6 @@
/* prevent inclusion of _LINUX_KERNEL_H in pre-boot environment: lots
* errors about console_printk etc... on ARM */
#define _LINUX_KERNEL_H
-#include <linux/decompress/mm.h>
#include "zlib_inflate/inftrees.c"
#include "zlib_inflate/inffast.c"
diff --git a/lib/decompress_unlzo.c b/lib/decompress_unlzo.c
index 1b2dc9d..2b0fbed 100644
--- a/lib/decompress_unlzo.c
+++ b/lib/decompress_unlzo.c
@@ -32,7 +32,6 @@
#include <xfuncs.h>
#ifdef STATIC
-#include <linux/decompress/mm.h>
#include "lzo/lzo1x_decompress.c"
#else
#include <malloc.h>
diff --git a/pbl/decomp.c b/pbl/decomp.c
index aa6a31e..17fc01e 100644
--- a/pbl/decomp.c
+++ b/pbl/decomp.c
@@ -10,6 +10,8 @@
#define STATIC static
+#include <linux/decompress/mm.h>
+
#ifdef CONFIG_IMAGE_COMPRESSION_LZO
#include "../../../lib/decompress_unlzo.c"
#endif
--
1.7.10.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] pbl: factorise linux/decompress/mm.h inclusion
2013-02-04 22:36 ` [PATCH 2/2] pbl: factorise linux/decompress/mm.h inclusion Antony Pavlov
@ 2013-02-05 8:57 ` Sascha Hauer
2013-02-05 9:07 ` Antony Pavlov
0 siblings, 1 reply; 5+ messages in thread
From: Sascha Hauer @ 2013-02-05 8:57 UTC (permalink / raw)
To: Antony Pavlov; +Cc: barebox
On Tue, Feb 05, 2013 at 02:36:36AM +0400, Antony Pavlov wrote:
> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
> ---
> lib/decompress_inflate.c | 1 -
> lib/decompress_unlzo.c | 1 -
> pbl/decomp.c | 2 ++
> 3 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/decompress_inflate.c b/lib/decompress_inflate.c
> index 5c1ebb6..526d6a1 100644
> --- a/lib/decompress_inflate.c
> +++ b/lib/decompress_inflate.c
> @@ -4,7 +4,6 @@
> /* prevent inclusion of _LINUX_KERNEL_H in pre-boot environment: lots
> * errors about console_printk etc... on ARM */
> #define _LINUX_KERNEL_H
> -#include <linux/decompress/mm.h>
>
> #include "zlib_inflate/inftrees.c"
> #include "zlib_inflate/inffast.c"
> diff --git a/lib/decompress_unlzo.c b/lib/decompress_unlzo.c
> index 1b2dc9d..2b0fbed 100644
> --- a/lib/decompress_unlzo.c
> +++ b/lib/decompress_unlzo.c
> @@ -32,7 +32,6 @@
> #include <xfuncs.h>
>
> #ifdef STATIC
> -#include <linux/decompress/mm.h>
> #include "lzo/lzo1x_decompress.c"
> #else
> #include <malloc.h>
> diff --git a/pbl/decomp.c b/pbl/decomp.c
> index aa6a31e..17fc01e 100644
> --- a/pbl/decomp.c
> +++ b/pbl/decomp.c
> @@ -10,6 +10,8 @@
>
> #define STATIC static
>
> +#include <linux/decompress/mm.h>
> +
Any special reason for this patch? Normally the #include is in the file
requiring the declarations from the file. In this case decompress_* need
linux/decompress/mm.h, not pbl/decomp.c.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] pbl: fix IMAGE_COMPRESSION_LZO-enabled build on MIPS
2013-02-04 22:36 [PATCH 1/2] pbl: fix IMAGE_COMPRESSION_LZO-enabled build on MIPS Antony Pavlov
2013-02-04 22:36 ` [PATCH 2/2] pbl: factorise linux/decompress/mm.h inclusion Antony Pavlov
@ 2013-02-05 8:58 ` Sascha Hauer
1 sibling, 0 replies; 5+ messages in thread
From: Sascha Hauer @ 2013-02-05 8:58 UTC (permalink / raw)
To: Antony Pavlov; +Cc: barebox
On Tue, Feb 05, 2013 at 02:36:35AM +0400, Antony Pavlov wrote:
> Here's the error message:
>
> LD arch/mips/pbl/zbarebox
> pbl/built-in-pbl.o: In function `decompress_unlzo':
> /home/antony/barebox.git.rebased.isp/pbl/decomp.c:35: undefined reference to `free'
> pbl/built-in-pbl.o: In function `pbl_barebox_uncompress':
> (.text.pbl_barebox_uncompress+0x6d0): relocation truncated to fit: R_MIPS_26 against `free'
> pbl/built-in-pbl.o: In function `pbl_barebox_uncompress':
> (.text.pbl_barebox_uncompress+0x6e0): undefined reference to `free'
> pbl/built-in-pbl.o: In function `pbl_barebox_uncompress':
> (.text.pbl_barebox_uncompress+0x6e0): relocation truncated to fit: R_MIPS_26 against `free'
> make[1]: *** [arch/mips/pbl/zbarebox] Error 1
> make: *** [zbarebox.bin] Error 2
>
> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Applied, thanks
Sascha
> ---
> lib/decompress_unlzo.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/lib/decompress_unlzo.c b/lib/decompress_unlzo.c
> index 776719c..1b2dc9d 100644
> --- a/lib/decompress_unlzo.c
> +++ b/lib/decompress_unlzo.c
> @@ -26,14 +26,16 @@
> */
>
> #include <common.h>
> -#include <malloc.h>
> #include <linux/types.h>
> #include <errno.h>
> #include <fs.h>
> #include <xfuncs.h>
>
> #ifdef STATIC
> +#include <linux/decompress/mm.h>
> #include "lzo/lzo1x_decompress.c"
> +#else
> +#include <malloc.h>
> #endif
>
> #include <lzo.h>
> --
> 1.7.10.4
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] pbl: factorise linux/decompress/mm.h inclusion
2013-02-05 8:57 ` Sascha Hauer
@ 2013-02-05 9:07 ` Antony Pavlov
0 siblings, 0 replies; 5+ messages in thread
From: Antony Pavlov @ 2013-02-05 9:07 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox
On 5 February 2013 12:57, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> On Tue, Feb 05, 2013 at 02:36:36AM +0400, Antony Pavlov wrote:
>> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
>> ---
>> lib/decompress_inflate.c | 1 -
>> lib/decompress_unlzo.c | 1 -
>> pbl/decomp.c | 2 ++
>> 3 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/lib/decompress_inflate.c b/lib/decompress_inflate.c
>> index 5c1ebb6..526d6a1 100644
>> --- a/lib/decompress_inflate.c
>> +++ b/lib/decompress_inflate.c
>> @@ -4,7 +4,6 @@
>> /* prevent inclusion of _LINUX_KERNEL_H in pre-boot environment: lots
>> * errors about console_printk etc... on ARM */
>> #define _LINUX_KERNEL_H
>> -#include <linux/decompress/mm.h>
>>
>> #include "zlib_inflate/inftrees.c"
>> #include "zlib_inflate/inffast.c"
>> diff --git a/lib/decompress_unlzo.c b/lib/decompress_unlzo.c
>> index 1b2dc9d..2b0fbed 100644
>> --- a/lib/decompress_unlzo.c
>> +++ b/lib/decompress_unlzo.c
>> @@ -32,7 +32,6 @@
>> #include <xfuncs.h>
>>
>> #ifdef STATIC
>> -#include <linux/decompress/mm.h>
>> #include "lzo/lzo1x_decompress.c"
>> #else
>> #include <malloc.h>
>> diff --git a/pbl/decomp.c b/pbl/decomp.c
>> index aa6a31e..17fc01e 100644
>> --- a/pbl/decomp.c
>> +++ b/pbl/decomp.c
>> @@ -10,6 +10,8 @@
>>
>> #define STATIC static
>>
>> +#include <linux/decompress/mm.h>
>> +
>
> Any special reason for this patch? Normally the #include is in the file
> requiring the declarations from the file. In this case decompress_* need
> linux/decompress/mm.h, not pbl/decomp.c.
There is no special reason for this patch, just factorisation. If you
don't like this type of factorisation you can drop this patch :)
--
Best regards,
Antony Pavlov
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-02-05 9:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-04 22:36 [PATCH 1/2] pbl: fix IMAGE_COMPRESSION_LZO-enabled build on MIPS Antony Pavlov
2013-02-04 22:36 ` [PATCH 2/2] pbl: factorise linux/decompress/mm.h inclusion Antony Pavlov
2013-02-05 8:57 ` Sascha Hauer
2013-02-05 9:07 ` Antony Pavlov
2013-02-05 8:58 ` [PATCH 1/2] pbl: fix IMAGE_COMPRESSION_LZO-enabled build on MIPS Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox