Build breakage in qemu-mips
Hi All,
I cloned the git tree of Wolfgang and tried compilation of qemu_mips_config. But the build breaks with following error:
zlib.c:31:27: error: asm/unaligned.h: No such file or directory zlib.c: In function ?inflate_fast?:
zlib.c:641: warning: implicit declaration of function ?get_unaligned? make[1]: *** [zlib.o] Error 1
make[1]: Leaving directory `/home/hschauhan/Development/u-boot/lib_generic'
make: *** [lib_generic/libgeneric.a] Error 2
I see that in include directory asm points to asm-mips. Inside asm-mips there is another link arch->arch-mips which is a dead link. THere is no directory named arch-mips there.
Whats the problem here? Should I pull only the MIPS custodian tree?
Thanks
Best Regards
Himanshu
PATCH 1/1 MIPS: qemu_mips: Fix a build failure caused by missing <asm/unaligned.h>
make -C lib_generic/
zlib.c:31:27: error: asm/unaligned.h: No such file or directory zlib.c: In function 'inflate_fast':
zlib.c:641: warning: implicit declaration of function 'get_unaligned' make[1]: *** [zlib.o] Error 1
make[1]: Leaving directory `/home/skuribay/git/u-boot.git/lib_generic'
make: *** [lib_generic/libgeneric.a] Error 2
Import relevant header file from LMO tree (slightly modified to U-Boot).
---
Quoted 3 lines · Himanshu Chauhan
I see that in include directory asm points to asm-mips. Inside asm-mips there is another link arch->arch-mips which is a dead link. THere is no directory named arch-mips there.
This is another topic, let's ignore here.
Quoted 1 line
Whats the problem here? Should I pull only the MIPS custodian tree?
I confirmed that this patch fixes the build error, but not sure it works or not. Just build tested. And note that there there's nothing interesting in the u-boot-mips tree, sorry.
include/asm-mips/unaligned.h | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 deletions(-) create mode 100644 include/asm-mips/unaligned.h
include/asm-mips/unaligned.h new file +26 -0
@@ -0,0 +1,26 @@ +/* +* This file is subject to the terms and conditions of the GNU General Public +* License. See the file "COPYING" in the main directory of this archive +* for more details. +* +* Copyright (C) 2007 Ralf Baechle (ralf at linux-mips.org) +*/ +#ifndef _ASM_MIPS_UNALIGNED_H +#define _ASM_MIPS_UNALIGNED_H + +#include <compiler.h> +#if defined(__MIPSEB__) +# define get_unaligned __get_unaligned_be +# define put_unaligned __put_unaligned_be +#elif defined(__MIPSEL__) +# define get_unaligned __get_unaligned_le +# define put_unaligned __put_unaligned_le +#else +# error "MIPS, but neither __MIPSEB__, nor __MIPSEL__???" +#endif + +# include <linux/unaligned/le_byteshift.h> +# include <linux/unaligned/be_byteshift.h> +# include <linux/unaligned/generic.h> + +#endif /* _ASM_MIPS_UNALIGNED_H */
Signature · 1 line
1.6.5.7
PATCH 1/1 MIPS: qemu_mips: Fix a build failure caused by missing <asm/unaligned.h>
Quoted 55 lines · Shinya Kuribayashi
make -C lib_generic/
zlib.c:31:27: error:asm/unaligned.h: No such file or directoryzlib.c: In function 'inflate_fast':
zlib.c:641: warning: implicit declaration of function 'get_unaligned' make[1]: *** [zlib.o] Error 1
make[1]: Leaving directory `/home/skuribay/git/u-boot.git/lib_generic'
make: *** [lib_generic/libgeneric.a] Error 2Import relevant header file from LMO tree (slightly modified to U-Boot).
Reported-by Himanshu Chauhan <[email protected]>Signed-off-by Shinya Kuribayashi <[email protected]>---
Quoted 3 lines · Himanshu Chauhan
I see that in include directory asm points to asm-mips. Inside asm-mips there is another link arch->arch-mips which is a dead link. THere is no directory named arch-mips there.
This is another topic, let's ignore here.
Quoted 1 line
Whats the problem here? Should I pull only the MIPS custodian tree?
I confirmed that this patch fixes the build error, but not sure it works or not. Just build tested. And note that there there's nothing interesting in the u-boot-mips tree, sorry.
include/asm-mips/unaligned.h| 26 ++++++++++++++++++++++++++1 files changed, 26 insertions(+), 0 deletions(-)create mode 100644
include/asm-mips/unaligned.hinclude/asm-mips/unaligned.h new file +2
-0@@ -0,0 +1,26 @@ +/* +* This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2007 Ralf Baechle (ralf at linux-mips.org)
+ */include/asm-mips/unaligned.h new file +9
-0+#ifndef _ASM_MIPS_UNALIGNED_H +#define _ASM_MIPS_UNALIGNED_H + +#include <compiler.h> +#if defined(__MIPSEB__) +# define get_unaligned __get_unaligned_be +# define put_unaligned __put_unaligned_be +#elif defined(__MIPSEL__) +# define get_unaligned __get_unaligned_le
include/asm-mips/unaligned.h line 26
Quoted 10 lines
include/asm-mips/unaligned.h new file +10
-0+# define put_unaligned __put_unaligned_le +#else +# error "MIPS, but neither __MIPSEB__, nor __MIPSEL__???" +#endif + +# include <linux/unaligned/le_byteshift.h> +# include <linux/unaligned/be_byteshift.h> +# include <linux/unaligned/generic.h> + +#endif /* _ASM_MIPS_UNALIGNED_H */
Thanks for sending this patch across. I will try this.
- Himanshu
PATCH 1/1 MIPS: qemu_mips: Fix a build failure caused by missing <asm/unaligned.h>
In reply to Shinya KuribayashiQuoted 9 lines · On Friday 18 December 2009 11:32:13 Shinya Kuribayashi wrote:
make -C lib_generic/
zlib.c:31:27: error:asm/unaligned.h: No such file or directoryzlib.c: In function 'inflate_fast':
zlib.c:641: warning: implicit declaration of function 'get_unaligned' make[1]: *** [zlib.o] Error 1
make[1]: Leaving directory `/home/skuribay/git/u-boot.git/lib_generic'
make: *** [lib_generic/libgeneric.a] Error 2Import relevant header file from LMO tree (slightly modified to U-Boot).
Why don't you import this file from the Linux tree? This should work without modifications. And that's what we've done for PPC and ARM as well.
Cheers,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH 1/1 MIPS: qemu_mips: Fix a build failure caused by missing <asm/unaligned.h>
Quoted 14 lines · Stefan Roese
Quoted 9 lines · On Friday 18 December 2009 11:32:13 Shinya Kuribayashi wrote:
make -C lib_generic/
zlib.c:31:27: error:asm/unaligned.h: No such file or directoryzlib.c: In function 'inflate_fast':
zlib.c:641: warning: implicit declaration of function 'get_unaligned' make[1]: *** [zlib.o] Error 1
make[1]: Leaving directory `/home/skuribay/git/u-boot.git/lib_generic'
make: *** [lib_generic/libgeneric.a] Error 2Import relevant header file from LMO tree (slightly modified to U-Boot).
Why don't you import this file from the Linux tree? This should work without modifications. And that's what we've done for PPC and ARM as well.
Quoted 8 lines
Cheers,
Stefan--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
I think thats what it is. Both are same.
-Himanshu
PATCH 1/1 MIPS: qemu_mips: Fix a build failure caused by missing <asm/unaligned.h>
Quoted 9 lines · On Friday 18 December 2009 13:04:59 Himanshu Chauhan wrote:
Quoted 9 lines
Quoted 1 line
Import relevant header file from LMO tree (slightly modified to U-Boot).
Why don't you import this file from the Linux tree? This should work without modifications. And that's what we've done for PPC and ARM as well.
Cheers,
Stefan
Quoted 6 lines
Quoted 4 lines
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.deI think thats what it is. Both are same.
No, not exactly. They're nearly identical. But there are differences. Not sure if these differences are important though.
Don't get me wrong. I'm not NACK'ing the patch. I'm just pointing out that it's different from the Linux version.
Cheers,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH 1/1 MIPS: qemu_mips: Fix a build failure caused by missing <asm/unaligned.h>
Quoted 7 lines · On Friday 18 December 2009 13:20:56 Stefan Roese wrote:
Quoted 1 line
I think thats what it is. Both are same.
No, not exactly. They're nearly identical. But there are differences. Not
sure if these differences are important though.Don't get me wrong. I'm not NACK'ing the patch. I'm just pointing out that it's different from the Linux version.
Just to make it clear. Here a diff between both versions:
linus/arch/mips/include/asm/unaligned.h renamed from include/asm-mips/unaligned.h +5 -3
@@ -8,19 +8,21 @@#ifndef _ASM_MIPS_UNALIGNED_H#define _ASM_MIPS_UNALIGNED_H -#include <compiler.h> +#include <linux/compiler.h> #if defined(__MIPSEB__) +# include <linux/unaligned/be_struct.h> +# include <linux/unaligned/le_byteshift.h> # define get_unaligned __get_unaligned_be# define put_unaligned __put_unaligned_be#elif defined(__MIPSEL__) +# include <linux/unaligned/le_struct.h> +# include <linux/unaligned/be_byteshift.h> # define get_unaligned __get_unaligned_le# define put_unaligned __put_unaligned_le#else # error "MIPS, but neither __MIPSEB__, nor __MIPSEL__???"#endif -# include <linux/unaligned/le_byteshift.h> -# include <linux/unaligned/be_byteshift.h> # include <linux/unaligned/generic.h> #endif /* _ASM_MIPS_UNALIGNED_H */
PATCH 1/1 MIPS: qemu_mips: Fix a build failure caused by missing <asm/unaligned.h>
Quoted 28 lines · Stefan Roese
Quoted 6 lines · On Friday 18 December 2009 13:20:56 Stefan Roese wrote:
Quoted 1 line
I think thats what it is. Both are same.
No, not exactly. They're nearly identical. But there are differences. Not
sure if these differences are important though.Don't get me wrong. I'm not NACK'ing the patch. I'm just pointing out that it's different from the Linux version.
Just to make it clear. Here a diff between both versions:
linus/arch/mips/include/asm/unaligned.h renamed from include/asm-mips/unaligned.h +5
-1@@ -8,19 +8,21 @@#ifndef _ASM_MIPS_UNALIGNED_H#define _ASM_MIPS_UNALIGNED_H -#include <compiler.h> +#include <linux/compiler.h> #if defined(__MIPSEB__) +# include <linux/unaligned/be_struct.h> +# include <linux/unaligned/le_byteshift.h> # define get_unaligned __get_unaligned_be# define put_unaligned __put_unaligned_be#elif defined(__MIPSEL__) +# include <linux/unaligned/le_struct.h> +# include <linux/unaligned/be_byteshift.h> # define get_unaligned __get_unaligned_le
linus/arch/mips/include/asm/unaligned.h line 28
Quoted 10 lines
linus/arch/mips/include/asm/unaligned.h renamed from include/asm-mips/unaligned.h +0
-2# define put_unaligned __put_unaligned_le#else # error "MIPS, but neither __MIPSEB__, nor __MIPSEL__???"#endif -# include <linux/unaligned/le_byteshift.h> -# include <linux/unaligned/be_byteshift.h> # include <linux/unaligned/generic.h> #endif /* _ASM_MIPS_UNALIGNED_H */
I think whatever Shinya sent was modified version of linux's unaligned.h and its working.
- Himanshu
PATCH 1/1 MIPS: qemu_mips: Fix a build failure caused by missing <asm/unaligned.h>
In reply to Stefan RoeseQuoted 5 lines · Stefan Roese
Quoted 4 lines · On Friday 18 December 2009 13:04:59 Himanshu Chauhan wrote:
Quoted 4 lines
Quoted 1 line
Import relevant header file from LMO tree (slightly modified to U-Boot).
Why don't you import this file from the Linux tree? This should work without modifications. And that's what we've done for PPC and ARM as well.
[...]
Quoted 4 lines
Quoted 1 line
I think thats what it is. Both are same.
No, not exactly. They're nearly identical. But there are differences. Not sure if these differences are important though.
Hm, the original header is (lmo = linux-mips.org):
http://git.kernel.org/?p=linux/kernel/git/ralf/linux.git;a=blob;f=arch/mips/include/asm/unaligned.h;h=42f66c311473abb98fe7a845e360e365ccfed837;hb=master
Are you referring to another one?
Quoted 2 lines
Don't get me wrong. I'm not NACK'ing the patch. I'm just pointing out that it's different from the Linux version.
I'm afraid 'LMO' needlessly makes you confused. Or am I missing something?
PATCH 1/1 : U-Boot build failure with CONFIG_SYS_NO_FLASH defined for qemu-mips.
In reply to Shinya KuribayashiU-Boot hangs with qemu-system-mips with ##unknown flash error. Disabling flash using CONFIG_SYS_NO_FLASH breaks the build. This patch fixes the issue. Don't know if its okay.
common/cmd_bootm.c +2 -2
@@ -76,7 +76,7 @@ extern void bz_internal_error(int);static int image_info (unsigned long addr);#endif -#if defined(CONFIG_CMD_IMLS ) +#if !defined(CONFIG_SYS_NO_FLASH ) && defined(CONFIG_CMD_IMLS )#include <flash.h> extern flash_info_t flash_info[];/* info for FLASH chips */ static int do_imls (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]);
@@ -1153,7 +1153,7 @@ U_BOOT_CMD(/*******************************************************************/ /* imls - list all images found in flash */ /*******************************************************************/ -#if defined(CONFIG_CMD_IMLS ) +#if !defined(CONFIG_SYS_NO_FLASH ) && defined(CONFIG_CMD_IMLS )int do_imls (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) {flash_info_t *info;
drivers/mtd/cfi_flash.c +3 -0
@@ -41,6 +41,7 @@#include <environment.h> #include <mtd/cfi_flash.h> +#ifndef CONFIG_SYS_NO_FLASH /* * This file implements a Common Flash Interface (CFI) driver for * U-Boot.
@@ -2020,3 +2021,5 @@ unsigned long flash_init (void) return (size); } + +#endif
include/configs/qemu-mips.h +0 -0
:q
@@ -142,6 +142,7 @@
#define CONFIG_SYS_INIT_SP_OFFSET 0x400000
/* We boot from this flash, selected with dip switch */
+#define CONFIG_SYS_NO_FLASH
#define CONFIG_SYS_FLASH_BASE 0xbfc00000
#define CONFIG_SYS_MAX_FLASH_BANKS 1
#define CONFIG_SYS_MAX_FLASH_SECT 128
@@ -149,7 +150,8 @@
#define CONFIG_FLASH_CFI_DRIVER 1
#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1
-#define CONFIG_ENV_IS_IN_FLASH 1
+#define CONFIG_ENV_IS_IN_FLASH 0
+#define CONFIG_ENV_IS_NOWHERE
#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN)
/* Address and size of Primary Environment Sector */
include/mtd/cfi_flash.h +3 -2
@@ -151,7 +151,8 @@ struct cfi_pri_hdr {u8 minor_version; } __attribute__((packed)); -void flash_write_cmd (flash_info_t * info,flash_sect_t sect, -uint offset,u32 cmd); +#ifndef CONFIG_SYS_NO_FLASH +void flash_write_cmd (flash_info_t * info,flash_sect_t sect,uint offset,u32 cmd); +#endif #endif /* __CFI_FLASH_H__ */
PATCH 1/1 MIPS: qemu_mips: Fix a build failure caused by missing <asm/unaligned.h>
In reply to Shinya KuribayashiQuoted 11 lines · On Friday 18 December 2009 14:02:01 Shinya Kuribayashi wrote:
Quoted 4 lines
Quoted 1 line
I think thats what it is. Both are same.
No, not exactly. They're nearly identical. But there are differences. Not sure if these differences are important though.
Hm, the original header is (lmo = linux-mips.org):
http://git.kernel.org/?p=linux/kernel/git/ralf/linux.git;a=blob;f=arch/mips
/include/asm/unaligned.h;h=42f66c311473abb98fe7a845e360e365ccfed837;hb=mast erAre you referring to another one?
I just took the one from the latest Linux tree (Linus from today).
Quoted 5 lines
Quoted 2 lines
Don't get me wrong. I'm not NACK'ing the patch. I'm just pointing out that it's different from the Linux version.
I'm afraid 'LMO' needlessly makes you confused. Or am I missing something?
Yes, "LMO" was confusing me.
Cheers,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH 1/1 MIPS: qemu_mips: Fix a build failure caused by missing <asm/unaligned.h>
In reply to Shinya KuribayashiQuoted 12 lines · Shinya Kuribayashi
make -C lib_generic/
zlib.c:31:27: error:asm/unaligned.h: No such file or directoryzlib.c: In function 'inflate_fast':
zlib.c:641: warning: implicit declaration of function 'get_unaligned' make[1]: *** [zlib.o] Error 1
make[1]: Leaving directory `/home/skuribay/git/u-boot.git/lib_generic'
make: *** [lib_generic/libgeneric.a] Error 2Import relevant header file from LMO tree (slightly modified to U-Boot).
Reported-by Himanshu Chauhan <[email protected]>Signed-off-by Shinya Kuribayashi <[email protected]>
Quoted 9 lines
---
Quoted 3 lines · Himanshu Chauhan
I see that in include directory asm points to asm-mips. Inside asm-mips there is another link arch->arch-mips which is a dead link. THere is no directory named arch-mips there.
This is another topic, let's ignore here.
Is arch-mips scheduled to be added?
Himanshu
PATCH 1/1 MIPS: qemu_mips: Fix a build failure caused by missing <asm/unaligned.h>
Quoted 7 lines · Himanshu Chauhan
Quoted 5 lines
Quoted 3 lines · Himanshu Chauhan
I see that in include directory asm points to asm-mips. Inside asm-mips there is another link arch->arch-mips which is a dead link. THere is no directory named arch-mips there.
This is another topic, let's ignore here.
Is arch-mips scheduled to be added?
Not at the moment. I'm not sure how it works, in the first place.
PATCH 1/1 MIPS: qemu_mips: Fix a build failure caused by missing <asm/unaligned.h>
In reply to Himanshu ChauhanDear Himanshu Chauhan,
Quoted 37 lines · In message <[email protected]> you wrote:
Quoted 36 lines · Stefan Roese
Quoted 6 lines · On Friday 18 December 2009 13:20:56 Stefan Roese wrote:
Quoted 1 line
I think thats what it is. Both are same.
No, not exactly. They're nearly identical. But there are differences. Not
sure if these differences are important though.Don't get me wrong. I'm not NACK'ing the patch. I'm just pointing out that it's different from the Linux version.
Just to make it clear. Here a diff between both versions:
linus/arch/mips/include/asm/unaligned.h renamed from include/asm-mips/unaligned.h +5
-3@@ -8,19 +8,21 @@#ifndef _ASM_MIPS_UNALIGNED_H#define _ASM_MIPS_UNALIGNED_H -#include <compiler.h> +#include <linux/compiler.h> #if defined(__MIPSEB__) +# include <linux/unaligned/be_struct.h> +# include <linux/unaligned/le_byteshift.h> # define get_unaligned __get_unaligned_be# define put_unaligned __put_unaligned_be#elif defined(__MIPSEL__) +# include <linux/unaligned/le_struct.h> +# include <linux/unaligned/be_byteshift.h> # define get_unaligned __get_unaligned_le# define put_unaligned __put_unaligned_le#else # error "MIPS, but neither __MIPSEB__, nor __MIPSEL__???"#endif -# include <linux/unaligned/le_byteshift.h> -# include <linux/unaligned/be_byteshift.h> # include <linux/unaligned/generic.h>
Quoted 5 lines
linus/arch/mips/include/asm/unaligned.h line 28
Quoted 2 lines
linus/arch/mips/include/asm/unaligned.h renamed from include/asm-mips/unaligned.h +0
-0#endif /* _ASM_MIPS_UNALIGNED_H */ I think whatever Shinya sent was modified version of linux's
unaligned.hand its working.
Hm... has this really been tested on both big endian and on little endian MIPS systems?
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "Beware of bugs in the above code; I have only proved it correct, not tried it." - Donald Knuth
PATCH 1/1 MIPS: qemu_mips: Fix a build failure caused by missing <asm/unaligned.h>
Quoted 18 lines · Wolfgang Denk
Dear Himanshu Chauhan,
Quoted 6 lines · In message <[email protected]> you wrote:
Quoted 5 lines · Stefan Roese
Quoted 4 lines · On Friday 18 December 2009 13:20:56 Stefan Roese wrote:
Quoted 1 line
I think thats what it is. Both are same.
No, not exactly. They're nearly identical. But there are differences. Not
sure if these differences are important though.Quoted 8 lines
linus/arch/mips/include/asm/unaligned.h
Quoted 6 lines
Quoted 2 lines
Don't get me wrong. I'm not NACK'ing the patch. I'm just pointing out that it's different from the Linux version.
Just to make it clear. Here a diff between both versions:
linus/arch/mips/include/asm/unaligned.h renamed from include/asm-mips/unaligned.h +0
-0I think whatever Shinya sent was modified version of linux's
unaligned.hand its working.
Quoted 7 lines
Hm... has this really been tested on both big endian and on little endian MIPS systems?
Best regards,
Wolfgang Denk
Dear Wolfgang,
I am using MIPS emulation on QEMU for my U-Boot. This patch works on big-endian emulation. I haven't tested it on little endian emulation. My statement of "its working" was for the build fix. So I won't say its ready for commit before being *actually* tested thoroughly.
Best Regards
Himanshu
PATCH RESEND 1/1 : Fix for U-Boot build failure with CONFIG_SYS_NO_FLASH defined for qemu-mips.
In reply to Shinya KuribayashiU-Boot hangs with qemu-system-mips with ##unknown flash error. Disabling flash using CONFIG_SYS_NO_FLASH breaks the build. This patch fixes the issue. Don't know if its okay.
common/cmd_bootm.c +2 -2
@@ -76,7 +76,7 @@ extern void bz_internal_error(int);static int image_info (unsigned long addr);#endif -#if defined(CONFIG_CMD_IMLS ) +#if !defined(CONFIG_SYS_NO_FLASH ) && defined(CONFIG_CMD_IMLS )#include <flash.h> extern flash_info_t flash_info[];/* info for FLASH chips */ static int do_imls (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]);
@@ -1153,7 +1153,7 @@ U_BOOT_CMD(/*******************************************************************/ /* imls - list all images found in flash */ /*******************************************************************/ -#if defined(CONFIG_CMD_IMLS ) +#if !defined(CONFIG_SYS_NO_FLASH ) && defined(CONFIG_CMD_IMLS )int do_imls (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) {flash_info_t *info;
drivers/mtd/cfi_flash.c +3 -0
@@ -41,6 +41,7 @@#include <environment.h> #include <mtd/cfi_flash.h> +#ifndef CONFIG_SYS_NO_FLASH /* * This file implements a Common Flash Interface (CFI) driver for * U-Boot.
@@ -2020,3 +2021,5 @@ unsigned long flash_init (void) return (size); } + +#endif
include/configs/qemu-mips.h +0 -0
:q
@@ -142,6 +142,7 @@
#define CONFIG_SYS_INIT_SP_OFFSET 0x400000
/* We boot from this flash, selected with dip switch */
+#define CONFIG_SYS_NO_FLASH
#define CONFIG_SYS_FLASH_BASE 0xbfc00000
#define CONFIG_SYS_MAX_FLASH_BANKS 1
#define CONFIG_SYS_MAX_FLASH_SECT 128
@@ -149,7 +150,8 @@
#define CONFIG_FLASH_CFI_DRIVER 1
#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1
-#define CONFIG_ENV_IS_IN_FLASH 1
+#define CONFIG_ENV_IS_IN_FLASH 0
+#define CONFIG_ENV_IS_NOWHERE
#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN)
/* Address and size of Primary Environment Sector */
include/mtd/cfi_flash.h +3 -2
@@ -151,7 +151,8 @@ struct cfi_pri_hdr {u8 minor_version; } __attribute__((packed)); -void flash_write_cmd (flash_info_t * info,flash_sect_t sect, -uint offset,u32 cmd); +#ifndef CONFIG_SYS_NO_FLASH +void flash_write_cmd (flash_info_t * info,flash_sect_t sect,uint offset,u32 cmd); +#endif #endif /* __CFI_FLASH_H__ */
[U-Boot] [OT] List for sending patches
In reply to Wolfgang DenkHi
Do the patches have to be sent at different list than this? I am wondering this because I sent a patch (good or bad is different story :D) for which I didn't hear back. Was it delivered?
Thanks & Regards
Himanshu
[U-Boot] [OT] List for sending patches
Quoted 3 lines · On Saturday 19 December 2009 07:52:01 Himanshu Chauhan wrote:
Do the patches have to be sent at different list than this? I am wondering
this because I sent a patch (good or bad is different story :D) for which I didn't hear back.
there is only one list for questions/patches/etc...
Quoted 1 line
Was it delivered?
check the archives to find out
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20091219/08e6f81c/attachment.pgp
[U-Boot] [OT] List for sending patches
In reply to Himanshu ChauhanDear Himanshu Chauhan,
Quoted 3 lines · In message <[email protected]> you wrote:
Do the patches have to be sent at different list than this? I am wondering this because I sent a patch (good or bad is different story :D) for which I didn't hear back. Was it delivered?
When did you send it? More than a week or two ago?
Or just yesterday? If you expect response times of a premium support contract I have to ask you 1) to sign a premium support contract and
2) to pay premium rates.
Please see http://www.catb.org/~esr/faqs/smart-questions.html#urgent
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de You are in a maze of UUCP connections, all alike.
PATCH RESEND 1/1 : Fix for U-Boot build failure with CONFIG_SYS_NO_FLASH defined for qemu-mips.
In reply to Himanshu ChauhanHi,
Quoted 1 line · Himanshu Chauhan
U-Boot hangs with qemu-system-mips with ##unknown flash error.
Do you have any idea what's the root cause of that unknown flash error? Is this U-Boot CFI driver issue, or Qemu-side problem?
Using CONFIG_SYS_NO_FLASH is a quick, enough workaround for your trial, but does not fix anything. Could you sort out the issue? I don't think I can help regarding debugging Qemu (sorry!), but u-boot/doc/README.qemu_mips and U-Boot/Qemu community will help.
Quoted 4 lines
Disabling flash using
CONFIG_SYS_NO_FLASHbreaks the build. This patch fixes the issue. Don't know if its okay.Signed-off-by Himanshu Chauhan<[email protected]>
Heh, let's use git-format-patch when preparing patches.
$ git format-patch HEAD^.. $ git format-patch --no-thread HEAD^^.. $ mkdir foo && git format-patch -o foo/ HEAD~3.. and so on.
Quoted 14 lines
common/cmd_bootm.c +1
-1@@ -76,7 +76,7 @@ extern void bz_internal_error(int);static int image_info (unsigned long addr);#endif -#if defined(CONFIG_CMD_IMLS ) +#if !defined(CONFIG_SYS_NO_FLASH )&& defined(CONFIG_CMD_IMLS )#include <flash.h> extern flash_info_t flash_info[];/* info for FLASH chips */ static int do_imls (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]);
common/cmd_bootm.c U_BOOT_CMD( · line 1159
Quoted 8 lines
common/cmd_bootm.c +1
-1@@ -1153,7 +1153,7 @@ U_BOOT_CMD(/*******************************************************************/ /* imls - list all images found in flash */ /*******************************************************************/ -#if defined(CONFIG_CMD_IMLS ) +#if !defined(CONFIG_SYS_NO_FLASH )&& defined(CONFIG_CMD_IMLS )int do_imls (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) {flash_info_t *info;
Disabling IMLS command in configs/qemu_mips.h?
Quoted 13 lines
drivers/mtd/cfi_flash.c +1
-0@@ -41,6 +41,7 @@#include <environment.h> #include <mtd/cfi_flash.h> +#ifndef CONFIG_SYS_NO_FLASH /* * This file implements a Common Flash Interface (CFI) driver for * U-Boot.
drivers/mtd/cfi_flash.c unsigned long flash_init (void) · line 2025
Quoted 5 lines
drivers/mtd/cfi_flash.c +2
-0@@ -2020,3 +2021,5 @@ unsigned long flash_init (void) return (size); } + +#endif
Removing CONFIG_CFI_DRIVER from configs/qemu_mips.h?
Quoted 23 lines
include/configs/qemu-mips.h +0
-0:q
include/configs/qemu-mips.h +3
-1@@ -142,6 +142,7 @@#define CONFIG_SYS_INIT_SP_OFFSET 0x400000/* We boot from this flash, selected with dip switch */ +#define CONFIG_SYS_NO_FLASH #define CONFIG_SYS_FLASH_BASE 0xbfc00000#define CONFIG_SYS_MAX_FLASH_BANKS 1#define CONFIG_SYS_MAX_FLASH_SECT 128@@ -149,7 +150,8 @@#define CONFIG_FLASH_CFI_DRIVER 1#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1 -#define CONFIG_ENV_IS_IN_FLASH 1 +#define CONFIG_ENV_IS_IN_FLASH 0 +#define CONFIG_ENV_IS_NOWHERE #define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN)/* Address and size of Primary Environment Sector */
[...]
Quoted 5 lines
include/mtd/cfi_flash.h +0
-0
include/mtd/cfi_flash.h struct cfi_pri_hdr { · line 158
Quoted 10 lines
include/mtd/cfi_flash.h +3
-2@@ -151,7 +151,8 @@ struct cfi_pri_hdr {u8 minor_version; } __attribute__((packed)); -void flash_write_cmd (flash_info_t * info,flash_sect_t sect, -uint offset,u32 cmd); +#ifndef CONFIG_SYS_NO_FLASH +void flash_write_cmd (flash_info_t * info,flash_sect_t sect,uint offset,u32 cmd); +#endif #endif /* __CFI_FLASH_H__ */
Removing CONFIG_CFI_DRIVER from configs/qemu_mips.h?
Anyway, I'd like to leave this issue as-is for now, and look forward to the read bug fix.
Shinya
PATCH 1/1 MIPS: qemu_mips: Fix a build failure caused by missing <asm/unaligned.h>
In reply to Stefan RoeseQuoted 7 lines · Stefan Roese
Quoted 5 lines
Quoted 2 lines
Don't get me wrong. I'm not NACK'ing the patch. I'm just pointing out that it's different from the Linux version.
I'm afraid 'LMO' needlessly makes you confused. Or am I missing something?
Yes, "LMO" was confusing me.
Sorry for that, and thanks for trying to check the diff. I'll respin the patch during the merge window, with proper words.
PATCH RESEND 1/1 : Fix for U-Boot build failure with CONFIG_SYS_NO_FLASH defined for qemu-mips.
In reply to Shinya KuribayashiQuoted 5 lines · Shinya Kuribayashi
Hi,
Quoted 1 line · Himanshu Chauhan
U-Boot hangs with qemu-system-mips with ##unknown flash error.
Quoted 7 lines
Do you have any idea what's the root cause of that unknown flash error? Is this U-Boot CFI driver issue, or Qemu-side problem?
Using
CONFIG_SYS_NO_FLASHis a quick, enough workaround for your trial, but does not fix anything. Could you sort out the issue? I don't think I can help regarding debugging Qemu (sorry!), but u-boot/doc/README.qemu_mips and U-Boot/Qemu community will help.
May be I really want that CONFIG_SYS_NO_FLASH defined then build should at least not break. Isn't it?
Quoted 4 lines
Quoted 4 lines
Disabling flash using
CONFIG_SYS_NO_FLASHbreaks the build. This patch fixes the issue. Don't know if its okay.
Quoted 9 lines
Quoted 1 line
Signed-off-by Himanshu Chauhan<[email protected]>Heh, let's use git-format-patch when preparing patches.
$ git format-patch HEAD^.. $ git format-patch --no-thread HEAD^^.. $ mkdir foo && git format-patch -o foo/ HEAD~3.. and so on.
Thanks, I will take care of that next time.
Quoted 17 lines
Quoted 17 lines
common/cmd_bootm.c +1
-1@@ -76,7 +76,7 @@ extern void bz_internal_error(int);static int image_info (unsigned long addr);#endif -#if defined(CONFIG_CMD_IMLS ) +#if !defined(CONFIG_SYS_NO_FLASH )&& defined(CONFIG_CMD_IMLS )#include <flash.h> extern flash_info_t flash_info[];/* info for FLASH chips */ static int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char*argv[]);
common/cmd_bootm.c +0
-0@@ -1153,7 +1153,7 @@ U_BOOT_CMD(/*******************************************************************/ /* imls - list all images found in flash */
Quoted 8 lines
common/cmd_bootm.c U_BOOT_CMD( · line 1159
Quoted 6 lines
common/cmd_bootm.c +1
-1/*******************************************************************/ -#if defined(CONFIG_CMD_IMLS ) +#if !defined(CONFIG_SYS_NO_FLASH )&& defined(CONFIG_CMD_IMLS )int do_imls (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) {flash_info_t *info;Disabling IMLS command in
configs/qemu_mips.h?
This should have been disabled anyways if this patch was applied:
http://www.mail-archive.com/u-boot at lists.denx.de/msg07407.html
Quoted 15 lines
Quoted 15 lines
drivers/mtd/cfi_flash.c +1
-0@@ -41,6 +41,7 @@#include <environment.h> #include <mtd/cfi_flash.h> +#ifndef CONFIG_SYS_NO_FLASH /* * This file implements a Common Flash Interface (CFI) driver for * U-Boot. @@ -2020,3 +2021,5 @@ unsigned long flash_init (void)
Quoted 6 lines
drivers/mtd/cfi_flash.c unsigned long flash_init (void) · line 2025
Quoted 4 lines
drivers/mtd/cfi_flash.c +2
-0return (size); } + +#endif Removing
CONFIG_CFI_DRIVERfromconfigs/qemu_mips.h?
If CONFIG_SYS_NO_FLASH is defined should it be compiled?
Regards
Himanshu
PATCH RESEND 1/1 : Fix for U-Boot build failure with CONFIG_SYS_NO_FLASH defined for qemu-mips.
Quoted 1 line · Himanshu Chauhan
May be I really want that
CONFIG_SYS_NO_FLASHdefined then build should at least not break. Isn't it?
Correct, it should build even with CONFIG_SYS_NO_FLASH.
Quoted 24 lines
Quoted 8 lines
Quoted 8 lines
common/cmd_bootm.c +0
-0@@ -76,7 +76,7 @@ extern void bz_internal_error(int);static int image_info (unsigned long addr);#endif Quoted 16 lines
Quoted 7 lines
common/cmd_bootm.c +1
-1-#if defined(CONFIG_CMD_IMLS ) +#if !defined(CONFIG_SYS_NO_FLASH )&& defined(CONFIG_CMD_IMLS )#include <flash.h> extern flash_info_t flash_info[];/* info for FLASH chips */ static int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char*argv[]);
common/cmd_bootm.c U_BOOT_CMD( · line 1159
Quoted 8 lines
common/cmd_bootm.c +1
-1@@ -1153,7 +1153,7 @@ U_BOOT_CMD(/*******************************************************************/ /* imls - list all images found in flash */ /*******************************************************************/ -#if defined(CONFIG_CMD_IMLS ) +#if !defined(CONFIG_SYS_NO_FLASH )&& defined(CONFIG_CMD_IMLS )int do_imls (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) {flash_info_t *info;Disabling IMLS command in
configs/qemu_mips.h?
Quoted 2 lines
This should have been disabled anyways if this patch was applied:
http://www.mail-archive.com/u-boot at lists.denx.de/msg07407.html
The patch is applied.
|diff --git a/include/configs/qemu-mips.h b/include/configs/qemu-mips.h |index cbacdf9..49a1a1c 100644 |--- a/include/configs/qemu-mips.h |+++ b/include/configs/qemu-mips.h |:q |@@ -142,6 +142,7 @@ | #define CONFIG_SYS_INIT_SP_OFFSET 0x400000 | | /* We boot from this flash, selected with dip switch */ |+#define CONFIG_SYS_NO_FLASH | #define CONFIG_SYS_FLASH_BASE 0xbfc00000 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 | #define CONFIG_SYS_MAX_FLASH_SECT 128
FWIW, how about putting CONFIG_SYS_NO_FLASH prior to <config_cmd_ default.h>?
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
drivers/mtd/cfi_flash.c +1
-0@@ -41,6 +41,7 @@#include <environment.h> #include <mtd/cfi_flash.h> +#ifndef CONFIG_SYS_NO_FLASH /* * This file implements a Common Flash Interface (CFI) driver for * U-Boot. @@ -2020,3 +2021,5 @@ unsigned long flash_init (void)
Quoted 6 lines
Quoted 5 lines
drivers/mtd/cfi_flash.c unsigned long flash_init (void) · line 2025
Quoted 4 lines
drivers/mtd/cfi_flash.c +2
-0return (size); } + +#endif Removing
CONFIG_CFI_DRIVERfromconfigs/qemu_mips.h?If
CONFIG_SYS_NO_FLASHis defined should it be compiled?
No. In U-Boot, in general, drivers should be predefined through configs/<boardname>.h. If we don't use CFI driver, just disable it in top-level board config file. This is to avoid #ifdef mess, and prevent the drivers from being clobbered.
Signature · 2 lines
Shinya Kuribayashi NEC Electronics
PATCH RESEND 1/1 : Fix for U-Boot build failure with CONFIG_SYS_NO_FLASH defined for qemu-mips.
In reply to Himanshu ChauhanDear Himanshu Chauhan,
I apologize for the long delay (I could try and claim I was waiting for anybody else to comment first, but it seems noodu feels addessed).
Quoted 11 lines · In message <[email protected]> you wrote:
U-Boot hangs with qemu-system-mips with ##unknown flash error. Disabling flash using
CONFIG_SYS_NO_FLASHbreaks the build. This patch fixes the issue. Don't know if its okay.Signed-off-by Himanshu Chauhan <[email protected]>common/cmd_bootm.c +0
-0
common/cmd_bootm.c extern void bz_internal_error(int); · line 79
Quoted 5 lines
common/cmd_bootm.c +1
-1@@ -76,7 +76,7 @@ extern void bz_internal_error(int);static int image_info (unsigned long addr);#endif -#if defined(CONFIG_CMD_IMLS ) +#if !defined(CONFIG_SYS_NO_FLASH ) && defined(CONFIG_CMD_IMLS )
I don't like this approach - CONFIG_CMD_IMLS and CONFIG_SYS_NO_FLASH should not be combined like that. Assume somebody wants to extend the functionality of the "imls" command to check for images in NAND flash (or other similar storage devices) as well.
Disabling NOR flash on a system should be just a matter of system configuration. If you have no NOR flash on your board (so you select CONFIG_SYS_NO_FLASH), then why do you select CONFIG_CMD_IMLS which obviously attempts to access NOR flash?
drivers/mtd/cfi_flash.c line 44
Quoted 9 lines
drivers/mtd/cfi_flash.c +1
-0@@ -41,6 +41,7 @@#include <environment.h> #include <mtd/cfi_flash.h> +#ifndef CONFIG_SYS_NO_FLASH
Same here. Why do you enable the CFI driver at all when you don't have NOR flash on your system?
Quoted 12 lines
include/configs/qemu-mips.h +0
-0:q
include/configs/qemu-mips.h +1
-0@@ -142,6 +142,7 @@#define CONFIG_SYS_INIT_SP_OFFSET 0x400000/* We boot from this flash, selected with dip switch */ +#define CONFIG_SYS_NO_FLASH #define CONFIG_SYS_FLASH_BASE 0xbfc00000#define CONFIG_SYS_MAX_FLASH_BANKS 1#define CONFIG_SYS_MAX_FLASH_SECT 128
include/configs/qemu-mips.h line 155
Quoted 7 lines
include/configs/qemu-mips.h +2
-1@@ -149,7 +150,8 @@#define CONFIG_FLASH_CFI_DRIVER 1#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1 -#define CONFIG_ENV_IS_IN_FLASH 1 +#define CONFIG_ENV_IS_IN_FLASH 0 +#define CONFIG_ENV_IS_NOWHERE #define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN)
Here you should disable NOR related features - like the CFI driver or the imls command.
Sorry, but I reject this patch.
Best regards,
Wolfgang Denk
Signature · 7 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de PROGRAM - n. A magic spell cast over a computer allowing it to turn one's input into error messages. v. tr. - To engage in a pastime similar to banging one's head against a wall, but with fewer opportunities for reward.