Skip to contentSkip to conversation

Compiling u-boot (sunxi/next)

U-Boot Olliver Schinagl 2 participants 3 messages Sep 18, 2015

lore
Share & tools
lore
#0 lore raw

Hey all,

just working on a _defconfig for our board and noticed that u-boot fails to compile if my defconfig doesn't have:
# CONFIG_CMD_IMLS is not set

What supprised me is that it has to be in there as a comment to unset it. I would have imaged that it would be unset by default and only be available if set in the defconfig, or rather, how can commenting it in the defconfig unset it?

I've added the u-boot list to the CC, but afaik it's not an open list and my registrations have failed on a number of occasions ...

Not that it should fail to compile either way, here's the output:

In file included from /home/oliver/Ultimaker/dev/sunxi-bsp/u-boot-sunxi/common/cmd_bootm.c:35:0:
/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot-sunxi/include/mtd/cfi_flash.h:168:22:
error: unknown type name ?flash_info_t?
void flash_write_cmd(flash_info_t * info, flash_sect_t sect,

                       ^
/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot-sunxi/include/mtd/cfi_flash.h:168:43: 
error: unknown type name ?flash_sect_t?
  void flash_write_cmd(flash_info_t * info, flash_sect_t sect,
                                            ^
/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot-sunxi/include/mtd/cfi_flash.h:172:22: 
error: unknown type name ?flash_info_t?
  void flash_cmd_reset(flash_info_t *info);
                       ^
/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot-sunxi/common/cmd_bootm.c:36:8: 
error: unknown type name ?flash_info_t?
  extern flash_info_t flash_info[]; /* info for FLASH chips */
         ^

/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot-sunxi/common/cmd_bootm.c: In function ?do_imls_nor?:
/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot-sunxi/common/cmd_bootm.c:321:2:
error: unknown type name ?flash_info_t?
flash_info_t *info;
^
/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot-sunxi/common/cmd_bootm.c:326:7:
error: ?CONFIG_SYS_MAX_FLASH_BANKS? undeclared (first use in this function)

    i < CONFIG_SYS_MAX_FLASH_BANKS; ++i, ++info) {
        ^

/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot-sunxi/common/cmd_bootm.c:326:7:
note: each undeclared identifier is reported only once for each function it appears in /home/oliver/Ultimaker/dev/sunxi-bsp/u-boot-sunxi/common/cmd_bootm.c:328:11:
error: request for member ?flash_id? in something not a structure or union

    if (info->flash_id == FLASH_UNKNOWN)
            ^
/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot-sunxi/common/cmd_bootm.c:328:25: 
error: ?FLASH_UNKNOWN? undeclared (first use in this function)
    if (info->flash_id == FLASH_UNKNOWN)
                          ^
/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot-sunxi/common/cmd_bootm.c:330:23: 
error: request for member ?sector_count? in something not a structure or 
union
    for (j = 0; j < info->sector_count; ++j) {
                        ^
/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot-sunxi/common/cmd_bootm.c:332:22: 
error: request for member ?start? in something not a structure or union
     hdr = (void *)info->start[j];

Olliver

#1 lore raw
Quoted 1 line · Olliver Schinagl

Hey all,

Did you CC the wrong Hans by mistake?

Quoted 8 lines

just working on a _defconfig for our board and noticed that u-boot fails to compile if my defconfig doesn't have:
# CONFIG_CMD_IMLS is not set

What supprised me is that it has to be in there as a comment to unset it. I would have imaged that it would be unset by default and only be available if set in the defconfig, or rather, how can commenting it in the defconfig unset it?

That's how Kconfig works, an option is either set =m or =y or is a comment saying "# FOO is not set", which is equivalent to the (nonexistent) =n state.

If a value isn't present at all then it takes on its default value, as specified in the Kconfig file (default default is off, "default y" makes it y etc), as modified by select from or depends on other options.

I'm not sure about the actual build failure. It's probably just a bug in either the code or the Kconfig, but I don't know what IMLS even is.

Ian.

Quoted 71 lines

I've added the u-boot list to the CC, but afaik it's not an open list and my registrations have failed on a number of occasions ...

Not that it should fail to compile either way, here's the output:

In file included from /home/oliver/Ultimaker/dev/sunxi-bsp/u-boot -sunxi/common/cmd_bootm.c:35:0:
/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot -sunxi/include/mtd/cfi_flash.h:168:22:
error: unknown type name ?flash_info_t?
void flash_write_cmd(flash_info_t * info, flash_sect_t sect,

                       ^

/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot -sunxi/include/mtd/cfi_flash.h:168:43:
error: unknown type name ?flash_sect_t?
void flash_write_cmd(flash_info_t * info, flash_sect_t sect,

                                            ^
/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot
-sunxi/include/mtd/cfi_flash.h:172:22: 
error: unknown type name ?flash_info_t?
  void flash_cmd_reset(flash_info_t *info);
                       ^

/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot -sunxi/common/cmd_bootm.c:36:8:
error: unknown type name ?flash_info_t?
extern flash_info_t flash_info[]; /* info for FLASH chips */

         ^

/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot-sunxi/common/cmd_bootm.c: In function ?do_imls_nor?:
/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot -sunxi/common/cmd_bootm.c:321:2:
error: unknown type name ?flash_info_t?

   flash_info_t *info;
   ^

/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot -sunxi/common/cmd_bootm.c:326:7:
error: ?CONFIG_SYS_MAX_FLASH_BANKS? undeclared (first use in this function)

    i < CONFIG_SYS_MAX_FLASH_BANKS; ++i, ++info) {
        ^

/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot -sunxi/common/cmd_bootm.c:326:7:
note: each undeclared identifier is reported only once for each function it appears in
/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot -sunxi/common/cmd_bootm.c:328:11:
error: request for member ?flash_id? in something not a structure or union

    if (info->flash_id == FLASH_UNKNOWN)
            ^
/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot
-sunxi/common/cmd_bootm.c:328:25: 
error: ?FLASH_UNKNOWN? undeclared (first use in this function)
    if (info->flash_id == FLASH_UNKNOWN)
                          ^

/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot -sunxi/common/cmd_bootm.c:330:23:
error: request for member ?sector_count? in something not a structure or union

    for (j = 0; j < info->sector_count; ++j) {
                        ^
/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot
-sunxi/common/cmd_bootm.c:332:22: 
error: request for member ?start? in something not a structure or union
     hdr = (void *)info->start[j];

Olliver

#2 lore raw

Hey Ian,

Quoted 3 lines · Ian Campbell
Quoted 1 line · Olliver Schinagl

Hey all,

Did you CC the wrong Hans by mistake?

Yeah, curse you auto-complete :S

Quoted 11 lines
Quoted 8 lines

just working on a _defconfig for our board and noticed that u-boot fails to compile if my defconfig doesn't have:
# CONFIG_CMD_IMLS is not set

What supprised me is that it has to be in there as a comment to unset it. I would have imaged that it would be unset by default and only be available if set in the defconfig, or rather, how can commenting it in the defconfig unset it?

That's how Kconfig works, an option is either set =m or =y or is a comment saying "# FOO is not set", which is equivalent to the (nonexistent) =n state.

ah, well I knew that the 'non-existant' variable would take the default value, maybe I just assumed the default value should be unset :)

Quoted 7 lines

If a value isn't present at all then it takes on its default value, as specified in the Kconfig file (default default is off, "default y" makes it y etc), as modified by select from or depends on other options.

I'm not sure about the actual build failure. It's probably just a bug in either the code or the Kconfig, but I don't know what IMLS even is.

IMLS, IMage LiSt, but only for NOR, the NAND variant has some more letters appended :)

Quoted 73 lines

Ian.

Quoted 70 lines

I've added the u-boot list to the CC, but afaik it's not an open list and my registrations have failed on a number of occasions ...

Not that it should fail to compile either way, here's the output:

In file included from /home/oliver/Ultimaker/dev/sunxi-bsp/u-boot -sunxi/common/cmd_bootm.c:35:0:
/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot -sunxi/include/mtd/cfi_flash.h:168:22:
error: unknown type name ?flash_info_t?
void flash_write_cmd(flash_info_t * info, flash_sect_t sect,

                        ^

/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot -sunxi/include/mtd/cfi_flash.h:168:43:
error: unknown type name ?flash_sect_t?
void flash_write_cmd(flash_info_t * info, flash_sect_t sect,

                                             ^
/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot
-sunxi/include/mtd/cfi_flash.h:172:22:
error: unknown type name ?flash_info_t?
   void flash_cmd_reset(flash_info_t *info);
                        ^

/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot -sunxi/common/cmd_bootm.c:36:8:
error: unknown type name ?flash_info_t?
extern flash_info_t flash_info[]; /* info for FLASH chips */

          ^

/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot-sunxi/common/cmd_bootm.c: In function ?do_imls_nor?:
/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot -sunxi/common/cmd_bootm.c:321:2:
error: unknown type name ?flash_info_t?

    flash_info_t *info;
    ^

/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot -sunxi/common/cmd_bootm.c:326:7:
error: ?CONFIG_SYS_MAX_FLASH_BANKS? undeclared (first use in this function)

     i < CONFIG_SYS_MAX_FLASH_BANKS; ++i, ++info) {
         ^

/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot -sunxi/common/cmd_bootm.c:326:7:
note: each undeclared identifier is reported only once for each function it appears in
/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot -sunxi/common/cmd_bootm.c:328:11:
error: request for member ?flash_id? in something not a structure or union

     if (info->flash_id == FLASH_UNKNOWN)
             ^
/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot
-sunxi/common/cmd_bootm.c:328:25:
error: ?FLASH_UNKNOWN? undeclared (first use in this function)
     if (info->flash_id == FLASH_UNKNOWN)
                           ^

/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot -sunxi/common/cmd_bootm.c:330:23:
error: request for member ?sector_count? in something not a structure or union

     for (j = 0; j < info->sector_count; ++j) {
                         ^
/home/oliver/Ultimaker/dev/sunxi-bsp/u-boot
-sunxi/common/cmd_bootm.c:332:22:
error: request for member ?start? in something not a structure or union
      hdr = (void *)info->start[j];

Olliver