imx-kobs icon indicating copy to clipboard operation
imx-kobs copied to clipboard

src: add --chip_0_size param

Open Gateworks opened this issue 8 years ago • 1 comments

Add --chip_0_size param to override the size of the mtd partition which is required if the SPL does not occupy the entire partition. For Gateworks Ventana boards the 'uboot' partition contains both the SPL and uboot.

Signed-off-by: Tim Harvey [email protected] Signed-off-by: Pushpal Sidhu [email protected]

Gateworks avatar May 11 '17 16:05 Gateworks

On Wed, Sep 20, 2017 at 9:09 AM, Stefan Agner [email protected] wrote:

@falstaff84 commented on this pull request.


In src/mtd.c:

@@ -889,6 +889,11 @@ struct mtd_data *mtd_open(const struct mtd_config *cfg, int flags) goto out; }

  • /* override MTD size */
  • if (md->cfg.chip_0_size) {
  • miu->size = md->cfg.chip_0_size;
  • }

I think this will apply for chip 0 and 1. It should be rather easy to actually make it chip 0/1 compatible, just check for i as it is done above with chip_[0|1]_device_path, e.g.

if (i == 0 && md->cfg.chip_0_size) miu->size = md->cfg.chip_0_size; else if (i == 1 && md->cfg.chip_1_size) miu->size = md->cfg.chip_1_size;

Sounds reasonable to me. I don't have any multi-chip boards to test with.

Tim

Gateworks avatar Sep 20 '17 16:09 Gateworks