1. 06 Jul, 2018 1 commit
    • Luo Ji's avatar
      [iot] Support dual bootloader in SPL · 315674c6
      Luo Ji authored
      Move the A/B slot check to SPL, the A/B slot switch
      workflow is just like what we have in libavb_ab.
      
      Test: A/B select works fine on imx8m.
      
      Change-Id: Ie3d827a9be0298b491bf2bc8d48833597fd70e90
      Signed-off-by: 's avatarLuo Ji <ji.luo@nxp.com>
      315674c6
  2. 02 Nov, 2017 1 commit
  3. 05 Apr, 2017 1 commit
  4. 17 Feb, 2017 1 commit
    • Dalon Westergreen's avatar
      SPL: add support to boot from a partition type · f0fb4fa7
      Dalon Westergreen authored
      the socfpga bootrom supports mmc booting from either a raw image
      starting at 0x0, or from a partition of type 0xa2.  This patch
      adds support for locating the boot image in the first type 0xa2
      partition found.
      
      Assigned a partition number of -1 will cause a search for a
      partition of type CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE
      and use it to find the u-boot image
      Signed-off-by: 's avatarDalon Westergreen <dwesterg@gmail.com>
      f0fb4fa7
  5. 08 Feb, 2017 1 commit
  6. 28 Jan, 2017 8 commits
  7. 27 Dec, 2016 1 commit
  8. 02 Oct, 2016 3 commits
  9. 06 Aug, 2016 1 commit
  10. 25 Jul, 2016 1 commit
  11. 22 Jul, 2016 1 commit
  12. 27 May, 2016 1 commit
    • Patrick Delaunay's avatar
      disk: part_efi: fix check of the max partition size · a5653867
      Patrick Delaunay authored
      the last value acceptable value for offset is last_usable_lba + 1
      and not last_usable_lba - 1
      
      issue found with SDCARD partition commands on u-boot 2015.10
      but this part of code don't change
      
      1- create GPT partion on all the card
        > gpt write mmc 0 name=test,start=0,size=0
        > part list mmc 0
      
      Partition Map for MMC device 0  --   Partition Type: EFI
      
      Part      Start LBA          End LBA                       Name
                  Attributes
                  Type GUID
                  Partition GUID
        1        0x00000022       0x003a9fde       "test"
                  attrs:     0x0000000000000000
                  type:     ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
                  type:     data
                  guid:     b710eb04-45b9-e94a-8d0b-21458d596f54
      
      => Start = 0x22*512 = 0x4400
      => Size = (0x003a9fde-0x22+1) * 512  = 0x753F7A00
      
      2- try to recreate the same partition with the next command
         (block size:512 bytes = 0x200)
      
        > gpt write mmc 0 name=test,start=0x4400,size=0x753F7A00
          Writing GPT: Partitions layout exceds disk size
      
        > gpt write mmc 0 name=test,start=0x4400,size=0x753F7800
          Writing GPT: Partitions layout exceds disk size
      
        > gpt write mmc 0 name=test,start=0x4400,size=0x753F7600
          Writing GPT: success!
      
      Partition Map for MMC device 0  --   Partition Type: EFI
      
      Part      Start LBA          End LBA                       Name
                  Attributes
                  Type GUID
                  Partition GUID
        1        0x00000022       0x003a9fdc       "test"
                  attrs:     0x0000000000000000
                  type:     ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
                  type:     data
                  guid:     36ec30ef-7ca4-cd48-97cd-ea9fb95185d0
      
      the max LBA when the size is indicated (0x003a9fdc) is lower than
      when u-boot compute the max allowed value with size=0 (0x003a9fde)
      
      in the code :
      
           /* partition ending lba */
           if ((i == parts - 1) && (partitions[i].size == 0))
      		/* extend the last partition to maximuim */
      		gpt_e[i].ending_lba = gpt_h->last_usable_lba;
           else
      		gpt_e[i].ending_lba = cpu_to_le64(offset - 1);
      
      so offset = gpt_h->last_usable_lba + 1 is acceptable !
      but the test (offset >= last_usable_lba) cause the error
      
      END
      
      Signed-off-by: Patrick Delaunay <patrick.delaunay73@gmail.com>disk: part_efi: fix check of the max partition size
      the last value acceptable value for offset is (last_usable_lba + 1)
      and not (last_usable_lba - 1)
      
      issue found with SDCARD partition commands on u-boot 2015.10
      but this part of code don't change
      
      1- I create GPT partion on all the card (start and size undefined)
      
        > gpt write mmc 0 name=test,start=0,size=0
        > part list mmc 0
      
      Partition Map for MMC device 0  --   Partition Type: EFI
      
      Part      Start LBA          End LBA                       Name
                  Attributes
                  Type GUID
                  Partition GUID
        1        0x00000022       0x003a9fde       "test"
                  attrs:     0x0000000000000000
                  type:     ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
                  type:     data
                  guid:     b710eb04-45b9-e94a-8d0b-21458d596f54
      
      => Start = 0x22*512 = 0x4400
      => Size = (0x003a9fde-0x22+1) * 512  = 0x753F7A00
      
      2- I try to recreate the same partition with the command gpt write
         and with start and size values (block size:512 bytes = 0x200)
      
        > gpt write mmc 0 name=test,start=0x4400,size=0x753F7A00
          Writing GPT: Partitions layout exceds disk size
      
        > gpt write mmc 0 name=test,start=0x4400,size=0x753F7800
          Writing GPT: Partitions layout exceds disk size
      
        > gpt write mmc 0 name=test,start=0x4400,size=0x753F7600
          Writing GPT: success!
      
        I check the partition created :
      
        > part list mmc 0
      
      Partition Map for MMC device 0  --   Partition Type: EFI
      
      Part      Start LBA          End LBA                       Name
                  Attributes
                  Type GUID
                  Partition GUID
        1        0x00000022       0x003a9fdc       "test"
                  attrs:     0x0000000000000000
                  type:     ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
                  type:     data
                  guid:     36ec30ef-7ca4-cd48-97cd-ea9fb95185d0
      
      => but the max LBA when the size is indicated (0x003a9fdc) is lower than
         when u-boot compute the max allowed value with size=0 (0x003a9fde)
      
      3- in the code, just after my patch, line 446
      
           /* partition ending lba */
           if ((i == parts - 1) && (partitions[i].size == 0))
      		/* extend the last partition to maximuim */
      		gpt_e[i].ending_lba = gpt_h->last_usable_lba;
           else
      		gpt_e[i].ending_lba = cpu_to_le64(offset - 1);
      
        so offset = gpt_h->last_usable_lba + 1 is acceptable !
        (it the value used when size is 0)
      
        but today the test (offset >= last_usable_lba) cause the error
        my patch only solve this issue
      
      END
      Signed-off-by: 's avatarPatrick Delaunay <patrick.delaunay73@gmail.com>
      a5653867
  13. 17 May, 2016 12 commits
  14. 18 Apr, 2016 3 commits
  15. 14 Apr, 2016 1 commit
  16. 01 Apr, 2016 1 commit
    • Eric Nelson's avatar
      drivers: block: add block device cache · e40cf34a
      Eric Nelson authored
      Add a block device cache to speed up repeated reads of block devices by
      various filesystems.
      
      This small amount of cache can dramatically speed up filesystem
      operations by skipping repeated reads of common areas of a block
      device (typically directory structures).
      
      This has shown to have some benefit on FAT filesystem operations of
      loading a kernel and RAM disk, but more dramatic benefits on ext4
      filesystems when the kernel and/or RAM disk are spread across
      multiple extent header structures as described in commit fc0fc50f.
      
      The cache is implemented through a minimal list (block_cache) maintained
      in most-recently-used order and count of the current number of entries
      (cache_count). It uses a maximum block count setting to prevent copies
      of large block reads and an upper bound on the number of cached areas.
      
      The maximum number of entries in the cache defaults to 32 and the maximum
      number of blocks per cache entry has a default of 2, which has shown to
      produce the best results on testing of ext4 and FAT filesystems.
      
      The 'blkcache' command (enabled through CONFIG_CMD_BLOCK_CACHE) allows
      changing these values and can be used to tune for a particular filesystem
      layout.
      Signed-off-by: 's avatarEric Nelson <eric@nelint.com>
      e40cf34a
  17. 22 Mar, 2016 2 commits