[coreboot-gerrit] Patch merged into coreboot/master: 0572565 cbfstool: Fix ability to add files at offsets near the end of empty spaces

gerrit at coreboot.org gerrit at coreboot.org
Sat Apr 25 12:17:06 CEST 2015


the following patch was just integrated into master:
commit 057256541bd887e2fadcafdea3b3500cf27c343d
Author: Sol Boucher <solb at chromium.org>
Date:   Thu Apr 2 20:58:26 2015 -0700

    cbfstool: Fix ability to add files at offsets near the end of empty spaces
    
    Because cbfs_add_entry_at() previously *assumed* it would have to create a
    trailing empty entry, it was impossible to add files at exact offsets close
    enough to the end of an existing empty entry that they occupied the remainder
    of its space. This addresses the problem by skipping the step of creating the
    trailing empty entry if doing so would place it at the start offset of whatever
    already followed the original empty section.
    
    BUG=chromium:473511
    TEST=Run the following commands:
    $ ./cbfstool test.image create -s 0x100000 -m arm
    $ dd if=/dev/zero of=twok.bin bs=1 count=2048
    $ ./cbfstool test.image add -t 0x50 -f twok.bin -n at_end -b 0xff7c0
    $ ./cbfstool test.image add -t 0x50 -f twok.bin -n near_end -b 0xfef80
    $ ./cbfstool test.image print
    There shouldn't be any assertions, and the output should be:
    test.image: 1024 kB, bootblocksize 0, romsize 1048576, offset 0x40
    alignment: 64 bytes, architecture: arm
    
    Name                           Offset     Type         Size
    (empty)                        0x40       null         1044184
    near_end                       0xfef40    raw          2048
    at_end                         0xff780    raw          2048
    BRANCH=None
    
    Change-Id: Ic8a6c3dfa4f82346a067c0804afb6c5a5e89e6c8
    Signed-off-by: Sol Boucher <solb at chromium.org>
    Original-Commit-Id: 1bbd353fddc818f725e488e8f2fb6e967033539d
    Original-Change-Id: I15d25df80787a8e34c2237262681720203509c72
    Original-Signed-off-by: Sol Boucher <solb at chromium.org>
    Original-Reviewed-on: https://chromium-review.googlesource.com/263809
    Original-Reviewed-by: Hung-Te Lin <hungte at chromium.org>
    Original-Reviewed-by: Stefan Reinauer <reinauer at google.com>
    Reviewed-on: http://review.coreboot.org/9938
    Tested-by: build bot (Jenkins)
    Reviewed-by: Patrick Georgi <pgeorgi at google.com>
    Reviewed-by: Paul Menzel <paulepanter at users.sourceforge.net>


See http://review.coreboot.org/9938 for details.

-gerrit



More information about the coreboot-gerrit mailing list