]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
mtd: denali_spl: do not allocate page_buffer in .bss section
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 27 Aug 2015 09:52:36 +0000 (18:52 +0900)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 10 Sep 2015 09:29:52 +0000 (11:29 +0200)
commit9884c44a2c43dbcefa25f67316b9479412d36004
tree9745e85b46e7a9b489a01c58639a45cc2afb2c35
parent9ad92fea1c7a48b622663cf5bf171f718cc8bc7c
mtd: denali_spl: do not allocate page_buffer in .bss section

Since commit 2580a2a7e719 ("mtd: nand: Increase max sizes of OOB and
Page size"), three boards (ph1_ld4, ph1_pro4, ph1_sld8) fail to build
with the following error message:
  arm-linux-gnueabi-ld.bfd: SPL image plus BSS too big

They compile drivers/mtd/nand/denali_spl.c and it has a page_buffer
as static data:

    static uint8_t page_buffer[NAND_MAX_PAGESIZE];

This buffer required 8KB in .bss section before that commit and now
it has been increased to 16KB.  Given limited code/memory size for SPL,
it is not a good idea to allocate a page buffer statically.  In the
first place, the load address 'dst' can be used as a page buffer.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
drivers/mtd/nand/denali_spl.c