Skip to contentSkip to conversation

Confusion with building at91bootstrap

Buildroot Cameron Hutchison 2 participants 3 messages Feb 3, 2010

lore
Share & tools
lore
#0 lore raw

I am trying to build an image for an AT91SAM9260EK board and I'm getting a little confused with the build ot at91bootstrap. I'm using BR 2009.11

When at91bootstrap is configured, the buildroot makefile (at91bootstrap.mk) runs "make at91sam9260ek_defconfig" which sets up at91bootstrap for building for my specific board.

That config file defines IMG_SIZE to be 0x40000 and passes -DIMG_SIZE=0x40000 to the compiler.

The buildroot makefile passes -DIMG_SIZE=0x32000. This value comes from the buildroot config.

This causes a build warning that IMG_SIZE is redefined.

Apart from that I don't yet know what the correct image size should be, it looks like the at91bootstrap integration into buildroot is broken. The option to set the image size in the BR config cannot work, since the at91bootstrap (2.10) source will attempt to override it anyway. Am I missing something here?

Also, the at91bootstrap defconfig for this board adds the suffix of "card" to the output file, making that filename contain "dataflashcard" when I have configured for "dataflash" not "dataflashcard". I dont yet know what the difference is between these (my board does not appear to have any sort of card or slot for one), so I'm not sure what should be done here, but it appears inconsistent.

Finally, is this the best place to discuss at91bootstrap and other issues related to this board and buildroot, or is there a better forum?

Thanks

#1 lore raw

Cameron Hutchison skrev:

Quoted 7 lines

I am trying to build an image for an AT91SAM9260EK board and I'm getting a little confused with the build ot at91bootstrap. I'm using BR 2009.11

When at91bootstrap is configured, the buildroot makefile (at91bootstrap.mk) runs "make at91sam9260ek_defconfig" which sets up at91bootstrap for building for my specific board.

Quoted 7 lines

That config file defines IMG_SIZE to be 0x40000 and passes -DIMG_SIZE=0x40000 to the compiler.

The buildroot makefile passes -DIMG_SIZE=0x32000. This value comes from the buildroot config.

This causes a build warning that IMG_SIZE is redefined.

Ignore it.

Quoted 7 lines

Apart from that I don't yet know what the correct image size should be, it looks like the at91bootstrap integration into buildroot is broken. The option to set the image size in the BR config cannot work, since the at91bootstrap (2.10) source will attempt to override it anyway. Am I missing something here?

This is the size of the image which is loaded into SDRAM. Typically u-boot.
I think the idea is that buildroot can override the config file.

Quoted 6 lines

Also, the at91bootstrap defconfig for this board adds the suffix of "card" to the output file, making that filename contain "dataflashcard" when I have configured for "dataflash" not "dataflashcard". I dont yet know what the difference is between these (my board does not appear to have any sort of card or slot for one), so I'm not sure what should be done here, but it appears inconsistent.

dataflashcard = boot from NPCS0 dataflash = boot from NPCS1

Easy to understand, if you use the SAM9260EK.

You want to use the latest = 2.13. 2.13-rc# has some issues.
Need a modification of the recipe in buildroot.

BR
Ulf Samuelsson

Quoted 9 lines

Finally, is this the best place to discuss at91bootstrap and other issues related to this board and buildroot, or is there a better forum?

Thanks
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#2 lore raw
Quoted 5 lines · Ulf Samuelsson

Cameron Hutchison skrev:

Quoted 2 lines

This causes a build warning that IMG_SIZE is redefined.

Ignore it.

OK. I assumed the second definition of IMG_SIZE was ignored, but my little test program tells me otherwise. Since the BR config of IMG_SIZE comes last on the command line, that would be the definitive size.

Quoted 4 lines

This is the size of the image which is loaded into SDRAM. Typically u-boot.
I think the idea is that buildroot can override the config file.

I spent the rest of yesterday getting my head around the different storage on the 9260EK board and memory layout options, so I think I'll be ok there, but ...

Quoted 11 lines
Quoted 6 lines

Also, the at91bootstrap defconfig for this board adds the suffix of "card" to the output file, making that filename contain "dataflashcard" when I have configured for "dataflash" not "dataflashcard". I dont yet know what the difference is between these (my board does not appear to have any sort of card or slot for one), so I'm not sure what should be done here, but it appears inconsistent.

dataflashcard = boot from NPCS0 dataflash = boot from NPCS1

Easy to understand, if you use the SAM9260EK.

My concern was that I have configured everything in BR to produce an image for dataflash, but the output image for at91bootstrap was labelled dataflashcard. Since I am not using dataflashcard (I found the slot on the underside of the board :-)), I wanted to make sure I had not done something wrong. I can't see what, and it appears to build for dataflash, but just calls the image dataflashcard. I think that is only because CONFIG_CARD_SUFFIX="card" is in the defconfig.

I'm now trying to build for NAND flash since my final target will not have dataflash anyway, but that wont build because make MEMORY=nandflash doesnt #define AT91C_SPI_PCS_DATAFLASH, but the defconfig has CONFIG_DATAFLASH=y. It seems as well as "make MEMORY=nandflash" the ..config needs to be changed from the defconfig to build.

Quoted 3 lines

You want to use the latest = 2.13. 2.13-rc# has some issues.
Need a modification of the recipe in buildroot.

Ok, thanks. I'll try 2.13 shortly.