[U-Boot] [PATCH v3 8/9] sunxi: non-FEL SPL boot support for sun7i

Ian Campbell ijc at hellion.org.uk
Sun Apr 27 21:29:02 CEST 2014


On Sun, 2014-04-27 at 21:15 +0200, Marek Vasut wrote:
> On Sunday, April 27, 2014 at 08:38:52 PM, Ian Campbell wrote:
> > On Sun, 2014-04-27 at 20:07 +0200, Marek Vasut wrote:
> > > # git grep common.h tools/
> > > tools/patman/test.py: include/common.h    |    8 ++++++
> > > tools/patman/test.py:+#include <common.h>
> > > tools/scripts/define2mk.sed:# which preprocesses the common.h header
> > > files and outputs the final
> > 
> > I only got these three when I looked. I'm on v2014.04, but even with
> > current trunk I only see fit_common.h not the ones which you show below
> > (tools/updater isn't even in trunk). Perhaps this is some newer stuff
> > not yet in trunk?
> 
> Ah, darn. What errors do you get ?

All sorts...

  HOSTCC  tools/mksunxiboot
In file included from include/common.h:20:0,
                 from tools/mksunxiboot.c:18:
include/linux/bitops.h: In function ‘generic_set_bit’:
include/linux/bitops.h:141:23: error: ‘BITS_PER_LONG’ undeclared (first use in this function)
  unsigned long mask = BIT_MASK(nr);
                       ^
include/linux/bitops.h:141:23: note: each undeclared identifier is reported only once for each function it appears in
include/linux/bitops.h: In function ‘generic_clear_bit’:
include/linux/bitops.h:149:23: error: ‘BITS_PER_LONG’ undeclared (first use in this function)
  unsigned long mask = BIT_MASK(nr);
                       ^
In file included from include/part.h:177:0,
                 from include/common.h:92,
                 from tools/mksunxiboot.c:18:
include/part_efi.h: At top level:
include/part_efi.h:62:1: error: unknown type name ‘u16’
 typedef u16 efi_char16_t;
 ^
include/part_efi.h:65:2: error: unknown type name ‘u8’
  u8 b[16];
  ^
include/part_efi.h:70:2: error: unknown type name ‘u8’
  u8 boot_ind;  /* 0x80 - active */
  ^
include/part_efi.h:71:2: error: unknown type name ‘u8’
  u8 head;  /* starting head */
  ^
include/part_efi.h:72:2: error: unknown type name ‘u8’
  u8 sector;  /* starting sector */
  ^
include/part_efi.h:73:2: error: unknown type name ‘u8’
  u8 cyl;   /* starting cylinder */
  ^
include/part_efi.h:74:2: error: unknown type name ‘u8’
  u8 sys_ind;  /* What partition type */
  ^
include/part_efi.h:75:2: error: unknown type name ‘u8’
  u8 end_head;  /* end head */
  ^
include/part_efi.h:76:2: error: unknown type name ‘u8’
  u8 end_sector;  /* end sector */
  ^
include/part_efi.h:77:2: error: unknown type name ‘u8’
  u8 end_cyl;  /* end cylinder */
  ^
include/part_efi.h:98:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gpt_header’
 } __packed gpt_header;
            ^
include/part_efi.h:102:3: error: unknown type name ‘u64’
   u64 required_to_function:1;
   ^
include/part_efi.h:103:3: error: unknown type name ‘u64’
   u64 no_block_io_protocol:1;
   ^
include/part_efi.h:104:3: error: unknown type name ‘u64’
   u64 legacy_bios_bootable:1;
   ^
include/part_efi.h:105:3: error: unknown type name ‘u64’
   u64 reserved:45;
   ^
include/part_efi.h:105:3: error: width of ‘reserved’ exceeds its type
include/part_efi.h:106:3: error: unknown type name ‘u64’
   u64 type_guid_specific:16;
   ^
include/part_efi.h:109:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gpt_entry_attributes’
 } __packed gpt_entry_attributes;
            ^
include/part_efi.h:117:2: error: unknown type name ‘gpt_entry_attributes’
  gpt_entry_attributes attributes;
  ^
include/part_efi.h:119:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gpt_entry’
 } __packed gpt_entry;
            ^
include/part_efi.h:122:2: error: unknown type name ‘u8’
  u8 boot_code[440];
  ^
include/part_efi.h:127:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘legacy_mbr’
 } __packed legacy_mbr;
            ^
In file included from include/common.h:92:0,
                 from tools/mksunxiboot.c:18:
include/part.h:193:5: error: unknown type name ‘gpt_header’
     gpt_header *gpt_h, gpt_entry *gpt_e);
     ^
include/part.h:193:24: error: unknown type name ‘gpt_entry’
     gpt_header *gpt_h, gpt_entry *gpt_e);
                        ^
include/part.h:205:18: error: unknown type name ‘gpt_header’
 int gpt_fill_pte(gpt_header *gpt_h, gpt_entry *gpt_e,
                  ^
include/part.h:205:37: error: unknown type name ‘gpt_entry’
 int gpt_fill_pte(gpt_header *gpt_h, gpt_entry *gpt_e,
                                     ^
include/part.h:218:49: error: unknown type name ‘gpt_header’
 int gpt_fill_header(block_dev_desc_t *dev_desc, gpt_header *gpt_h,
                                                 ^
In file included from include/image.h:49:0,
                 from include/common.h:94,
                 from tools/mksunxiboot.c:18:
include/fdt_support.h:15:1: error: unknown type name ‘u32’
 u32 fdt_getprop_u32_default(const void *fdt, const char *path,
 ^
include/fdt_support.h:16:5: error: unknown type name ‘u32’
     const char *prop, const u32 dflt);
     ^
include/fdt_support.h:22:6: error: unknown type name ‘u32’
      u32 val, int create);
      ^
include/fdt_support.h:36:24: error: unknown type name ‘u32’
      const char *prop, u32 val, int create);
                        ^
include/fdt_support.h:40:26: error: unknown type name ‘u32’
        const char *prop, u32 val, int create);
                          ^
include/fdt_support.h:41:34: error: unknown type name ‘u64’
 int fdt_fixup_memory(void *blob, u64 start, u64 size);
                                  ^
include/fdt_support.h:41:45: error: unknown type name ‘u64’
 int fdt_fixup_memory(void *blob, u64 start, u64 size);
                                             ^
include/fdt_support.h:42:40: error: unknown type name ‘u64’
 int fdt_fixup_memory_banks(void *blob, u64 start[], u64 size[], int banks);
                                        ^
include/fdt_support.h:42:53: error: unknown type name ‘u64’
 int fdt_fixup_memory_banks(void *blob, u64 start[], u64 size[], int banks);
                                                     ^
include/fdt_support.h:51:49: error: unknown type name ‘bd_t’
 static inline void fdt_fixup_dr_usb(void *blob, bd_t *bd) {}
                                                 ^
include/fdt_support.h:65:33: error: unknown type name ‘bd_t’
 void ft_board_setup(void *blob, bd_t *bd);
                                 ^
include/fdt_support.h:66:31: error: unknown type name ‘bd_t’
 void ft_cpu_setup(void *blob, bd_t *bd);
                               ^
include/fdt_support.h:67:31: error: unknown type name ‘bd_t’
 void ft_pci_setup(void *blob, bd_t *bd);
                               ^
include/fdt_support.h:77:1: error: unknown type name ‘u64’
 u64 fdt_translate_address(void *blob, int node_offset, const __be32 *in_addr);
 ^
include/fdt_support.h:79:6: error: unknown type name ‘phys_addr_t’
      phys_addr_t compat_off);
      ^
include/fdt_support.h:86:10: error: unknown type name ‘u64’
          u64 addr);
          ^
include/fdt_support.h:87:1: error: unknown type name ‘u64’
 u64 fdt_get_base_address(void *fdt, int node);
 ^
In file included from include/common.h:94:0,
                 from tools/mksunxiboot.c:18:
include/image.h:322:13: error: field ‘lmb’ has incomplete type
  struct lmb lmb;  /* for memory mgmt */
             ^
include/image.h: In function ‘fit_image_check_target_arch’:
include/image.h:981:41: error: ‘IH_ARCH_DEFAULT’ undeclared (first use in this function)
  return fit_image_check_arch(fdt, node, IH_ARCH_DEFAULT);
                                         ^
In file included from /home/ijc/devel/u-boot.git/arch/arm/include/asm/u-boot.h:25:0,
                 from include/common.h:153,
                 from tools/mksunxiboot.c:18:
include/asm-generic/u-boot.h: At top level:
include/asm-generic/u-boot.h:29:2: error: unknown type name ‘phys_size_t’
  phys_size_t bi_memsize; /* size  of DRAM memory in bytes */
  ^
In file included from /home/ijc/devel/u-boot.git/arch/arm/include/asm/global_data.h:45:0,
                 from include/common.h:154,
                 from tools/mksunxiboot.c:18:
include/asm-generic/global_data.h:60:2: error: unknown type name ‘phys_size_t’
  phys_size_t ram_size; /* RAM size */
  ^
In file included from tools/mksunxiboot.c:18:0:
include/common.h:267:1: error: unknown type name ‘phys_size_t’
 phys_size_t initdram (int);
 ^
include/common.h:306:1: error: unknown type name ‘u8’
 extern u8 __dtb_dt_begin[]; /* embedded device tree blob */
 ^
include/common.h:352:14: error: unknown type name ‘cmd_tbl_t’
 int do_tftpb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
              ^
include/common.h:355:19: error: unknown type name ‘cmd_tbl_t’
 int do_fat_fsload(cmd_tbl_t *, int, int, char * const []);
                   ^
include/common.h:358:17: error: unknown type name ‘cmd_tbl_t’
 int do_ext2load(cmd_tbl_t *, int, int, char * const []);
                 ^
include/common.h:391:5: error: conflicting types for ‘setenv’
 int setenv      (const char *, const char *);
     ^
In file included from /home/ijc/devel/u-boot.git/include/compiler.h:23:0,
                 from /home/ijc/devel/u-boot.git/include/libfdt_env.h:12,
                 from <command-line>:0:
/usr/include/stdlib.h:584:12: note: previous declaration of ‘setenv’ was here
 extern int setenv (const char *__name, const char *__value, int __replace)
            ^
In file included from tools/mksunxiboot.c:18:0:
include/common.h:471:1: error: unknown type name ‘phys_size_t’
 phys_size_t get_effective_memsize(void);
 ^
include/common.h:635:1: error: unknown type name ‘u32’
 u32 cpu_mask      (void);
 ^
In file included from include/common.h:825:0,
                 from tools/mksunxiboot.c:18:
include/uuid.h:18:3: error: conflicting types for ‘__packed’
 } __packed;
   ^
In file included from include/part.h:177:0,
                 from include/common.h:92,
                 from tools/mksunxiboot.c:18:
include/part_efi.h:80:3: note: previous declaration of ‘__packed’ was here
 } __packed;
   ^
In file included from /home/ijc/devel/u-boot.git/include/compiler.h:25:0,
                 from /home/ijc/devel/u-boot.git/include/libfdt_env.h:12,
                 from <command-line>:0:
include/common.h:860:5: error: conflicting types for ‘_IO_getc’
 int getc(void);
     ^
In file included from /usr/include/stdio.h:74:0,
                 from /home/ijc/devel/u-boot.git/include/compiler.h:25,
                 from /home/ijc/devel/u-boot.git/include/libfdt_env.h:12,
                 from <command-line>:0:
/usr/include/libio.h:434:12: note: previous declaration of ‘_IO_getc’ was here
 extern int _IO_getc (_IO_FILE *__fp);
            ^
In file included from tools/mksunxiboot.c:18:0:
include/common.h:864:23: error: macro "putc" requires 2 arguments, but only 1 given
 void putc(const char c);
                       ^
include/common.h:864:6: error: ‘putc’ redeclared as different kind of symbol
 void putc(const char c);
      ^
include/common.h:865:6: error: conflicting types for ‘puts’
 void puts(const char *s);
      ^
include/common.h:883:5: error: conflicting types for ‘fprintf’
 int fprintf(int file, const char *fmt, ...)
     ^
include/common.h:885:6: error: conflicting types for ‘fputs’
 void fputs(int file, const char *s);
      ^
include/common.h:886:6: error: conflicting types for ‘fputc’
 void fputc(int file, const char c);
      ^
include/common.h:888:5: error: conflicting types for ‘fgetc’
 int fgetc(int file);
     ^
In file included from /home/ijc/devel/u-boot.git/include/compiler.h:25:0,
                 from /home/ijc/devel/u-boot.git/include/libfdt_env.h:12,
                 from <command-line>:0:
/usr/include/stdio.h:531:12: note: previous declaration of ‘fgetc’ was here
 extern int fgetc (FILE *__stream);
            ^
In file included from include/common.h:898:0,
                 from tools/mksunxiboot.c:18:
include/net.h:632:1: error: unknown type name ‘u8’
 static inline int is_zero_ether_addr(const u8 *addr)
 ^
include/net.h:644:1: error: unknown type name ‘u8’
 static inline int is_multicast_ether_addr(const u8 *addr)
 ^
include/net.h:655:1: error: unknown type name ‘u8’
 static inline int is_broadcast_ether_addr(const u8 *addr)
 ^
include/net.h:670:1: error: unknown type name ‘u8’
 static inline int is_valid_ether_addr(const u8 *addr)
 ^
In file included from tools/mksunxiboot.c:18:0:
include/common.h:933:32: error: unknown type name ‘phys_addr_t’
 static inline void *map_sysmem(phys_addr_t paddr, unsigned long len)
                                ^
include/common.h:942:1: error: unknown type name ‘phys_addr_t’
 static inline phys_addr_t map_to_sysmem(const void *ptr)
 ^
include/common.h: In function ‘map_to_sysmem’:
include/common.h:944:10: error: ‘phys_addr_t’ undeclared (first use in this function)
  return (phys_addr_t)(uintptr_t)ptr;
          ^
include/common.h:944:23: error: expected expression before ‘uintptr_t’
  return (phys_addr_t)(uintptr_t)ptr;
                       ^
include/common.h:944:33: error: expected ‘;’ before ‘ptr’
  return (phys_addr_t)(uintptr_t)ptr;
                                 ^
make[1]: *** [tools/mksunxiboot] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [tools] Error 2





More information about the U-Boot mailing list