- 23 8月, 2019 1 次提交
-
-
由 Urja Rannikko 提交于
There were 3 copies of the same sequence, make it into a function. Signed-off-by: NUrja Rannikko <urjaman@gmail.com> Reviewed-by: NKever Yang <kever.yang@rock-chips.com>
-
- 17 7月, 2019 1 次提交
-
-
由 Heinrich Schuchardt 提交于
When building with GCC 9.1 an error occurs: disk/part_efi.c: In function ‘gpt_verify_partitions’: disk/part_efi.c:737:49: error: taking address of packed member of ‘struct _gpt_entry’ may result in an unaligned pointer value [-Werror=address-of-packed-member] 737 | gpt_convert_efi_name_to_char(efi_str, gpt_e[i].partition_name, | ~~~~~~~~^~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[1]: *** [scripts/Makefile.build:279: disk/part_efi.o] Error 1 make: *** [Makefile:1594: disk] Error 2 Adjust gpt_convert_efi_name_to_char() to accept unaligned strings. Reported-by: NRamon Fried <rfried.dev@gmail.com> Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de>
-
- 07 7月, 2019 1 次提交
-
-
由 Heinrich Schuchardt 提交于
In part_get_info_efi() we use the output of print_efiname() to set info->name[]. The size of info->name is PART_NAME_LEN = 32 but print_efiname() returns a string with a maximum length of PARTNAME_SZ + 1 = 37. Use snprintf() instead of sprintf() to avoid buffer overflow. Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de>
-
- 03 5月, 2019 2 次提交
-
-
由 Eugeniu Rosca 提交于
Below is what happens on R-Car H3ULCB-KF using clean U-Boot v2019.04-00810-g6aebc0d1 and r8a7795_ulcb_defconfig: => ### interrupt autoboot => gpt verify mmc 1 No partition list provided - only basic check Verify GPT: success! => ### keep calling 'gpt verify mmc 1' => ### on 58th call, we are out of memory: => gpt verify mmc 1 alloc_read_gpt_entries: ERROR: Can't allocate 0X4000 bytes for GPT Entries GPT: Failed to allocate memory for PTE gpt_verify_headers: *** ERROR: Invalid Backup GPT *** Verify GPT: error! This is caused by calling is_gpt_valid() twice (hence allocating pte also twice via alloc_read_gpt_entries()) while freeing pte only _once_ in the caller of gpt_verify_headers(). Fix that by freeing the pte allocated and populated for primary GPT _before_ allocating and populating the pte for backup GPT. The latter will be freed by the caller of gpt_verify_headers(). With the fix applied, the reproduction scenario [1-2] has been run hundreds of times in a loop w/o running into OOM. [1] gpt verify mmc 1 [2] gpt verify mmc 1 $partitions Fixes: cef68bf9 ("gpt: part: Definition and declaration of GPT verification functions") Signed-off-by: NEugeniu Rosca <erosca@de.adit-jv.com> Reviewed-by: NHeinrich Schuchardt <xypron.glpk@gmx.de>
-
由 Eugeniu Rosca 提交于
Below is what happens on R-Car H3ULCB-KF using clean U-Boot v2019.04-00810-g6aebc0d1 and r8a7795_ulcb_defconfig: => ### interrupt autoboot => gpt guid mmc 1 21200400-0804-0146-9dcc-a8c51255994f success! => ### keep calling 'gpt guid mmc 1' => ### on 59th call, we are out of memory: => gpt guid mmc 1 alloc_read_gpt_entries: ERROR: Can't allocate 0X4000 bytes for GPT Entries GPT: Failed to allocate memory for PTE get_disk_guid: *** ERROR: Invalid GPT *** alloc_read_gpt_entries: ERROR: Can't allocate 0X4000 bytes for GPT Entries GPT: Failed to allocate memory for PTE get_disk_guid: *** ERROR: Invalid Backup GPT *** error! After some inspection, it looks like get_disk_guid(), added via v2017.09 commit 73d6d18b ("GPT: add accessor function for disk GUID"), unlike other callers of is_gpt_valid(), doesn't free the memory pointed out by 'gpt_entry *gpt_pte'. The latter is allocated by is_gpt_valid() via alloc_read_gpt_entries(). With the fix applied, the reproduction scenario has been run hundreds of times ('while true; do gpt guid mmc 1; done') w/o running into OOM. Fixes: 73d6d18b ("GPT: add accessor function for disk GUID") Signed-off-by: NEugeniu Rosca <erosca@de.adit-jv.com> Reviewed-by: NHeinrich Schuchardt <xypron.glpk@gmx.de>
-
- 18 1月, 2019 1 次提交
-
-
由 Heinrich Schuchardt 提交于
Make system_guid const. Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 09 10月, 2018 1 次提交
-
-
由 Simon Glass 提交于
The current name conflicts with the Chrome OS verified boot library, which prevents it being built. That library uses a string whereas U-Boot uses a 64-bit hex value. Rename this in U-Boot. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 11 9月, 2018 1 次提交
-
-
由 Masahiro Yamada 提交于
In int-ll64.h, we always use the following typedefs: typedef unsigned int u32; typedef unsigned long uintptr_t; typedef unsigned long long u64; This does not need to match to the compiler's <inttypes.h>. Do not include it. The use of PRI* makes the code super-ugly. You can simply use "l" for printing uintptr_t, "ll" for u64, and no modifier for u32. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
-
- 14 6月, 2018 1 次提交
-
-
由 Heinrich Schuchardt 提交于
When building with -pedantic the current definition of EFI_GUID() causes an error 'initializer element is not constant'. Currently EFI_GUID() is used both as an anonymous constant and as an intializer. A conversion to efi_guid_t is not allowable when using EFI_GUID() as an initializer. But it is needed when using it as an anonymous constant. We should not use EFI_GUID() for anything but an initializer. So let's introduce a variable where needed and remove the conversion. Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: NAlexander Graf <agraf@suse.de>
-
- 05 6月, 2018 1 次提交
-
-
由 Sam Protsenko 提交于
In commit e163a931 ("cmd: gpt: backup boot code before writing MBR") there was added the procedure for storing old boot code when doing "gpt write". But instead of storing just backup code, the whole MBR was stored, and only specific fields were replaced further, keeping everything else intact. That's obviously not what we want. Fix the code to actually store only old boot code and zero out everything else. This fixes next testing case: => mmc write $loadaddr 0x0 0x7b => gpt write mmc 1 $partitions In case when $loadaddr address and further memory contains 0xff, the board was bricked (ROM-code probably didn't like partition entries that were clobbered with 0xff). With this patch applied, commands above don't brick the board. Signed-off-by: NSam Protsenko <semen.protsenko@linaro.org> Cc: Alejandro Hernandez <ajhernandez@ti.com> Tested-by: NAndy Shevchenko <andy.shevchenko@gmail.com>
-
- 07 5月, 2018 1 次提交
-
-
由 Tom Rini 提交于
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: NTom Rini <trini@konsulko.com>
-
- 09 2月, 2018 1 次提交
-
-
由 Adam Ford 提交于
config_fallbacks.h has some logic that sets HAVE_BLOCK_DEVICE based on a list of enabled options. Moving HAVE_BLOCK_DEVICE to Kconfig allows us to drastically shrink the logic in config_fallbacks.h Signed-off-by: NAdam Ford <aford173@gmail.com> [trini: Rename HAVE_BLOCK_DEVICE to CONFIG_BLOCK_DEVICE] Signed-off-by: NTom Rini <trini@konsulko.com>
-
- 30 11月, 2017 1 次提交
-
-
由 Patrick Delaunay 提交于
use ALLOC_CACHE_ALIGN_BUFFER_PAD for mbr header allocation in stack to fix alloc issue in is_gpt_valid() this patch fix also issue for GPT partition handling with blocksize != 512 in set_protective_mbr() Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com>
-
- 06 11月, 2017 1 次提交
-
-
由 Lukasz Majewski 提交于
Before this patch one could receive following errors when executing "gpt write" command on machine with cache enabled: display5 factory > gpt write mmc ${mmcdev} ${partitions} Writing GPT: CACHE: Misaligned operation at range [4ef8f7f0, 4ef8f9f0] CACHE: Misaligned operation at range [4ef8f9f8, 4ef939f8] CACHE: Misaligned operation at range [4ef8f9f8, 4ef939f8] CACHE: Misaligned operation at range [4ef8f7f0, 4ef8f9f0] success! To alleviate this problem - the calloc()s have been replaced with malloc_cache_aligned() and memset(). After those changes the buffers are properly aligned (with both start address and size) to SoC cache line. Signed-off-by: NLukasz Majewski <lukma@denx.de>
-
- 24 10月, 2017 1 次提交
-
-
由 Patrick Delaunay 提交于
the partition starting at 0x4400 is refused with overlap error: $> gpt write mmc 0 "name=test,start=0x4400,size=0" Writing GPT: Partition overlap error! even if the 0x4400 is the first available offset for LBA35 with default value: - MBR=LBA1 - GPT header=LBA2 - PTE= 32 LBAs (128 entry), 3 to 34 And the command to have one partition for all the disk failed also : $> gpt write mmc 0 "name=test,size=0" After the patch : $> gpt write mmc 0 "name=test,size=0" Writing GPT: success! $> 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 0x01ce9fde "test" attrs: 0x0000000000000000 type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 type: data guid: b4b84b8a-04e3-4000-0036-aff5c9c495b1 And 0x22 = 34 LBA => offset = 0x4400 is accepted as expected Reviewed-by: NŁukasz Majewski <lukma@denx.de> Tested-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com>
-
- 16 10月, 2017 1 次提交
-
-
由 Tom Rini 提交于
While this goes somewhat against normal coding style we should ensure that dev_desc is not NULL before we dereference it in allocation of legacy_mbr. Reported-by: Coverity (CID: 167292) Signed-off-by: NTom Rini <trini@konsulko.com>
-
- 04 10月, 2017 1 次提交
-
-
由 Masahiro Yamada 提交于
U-Boot widely uses error() as a bit noisier variant of printf(). This macro causes name conflict with the following line in include/linux/compiler-gcc.h: # define __compiletime_error(message) __attribute__((error(message))) This prevents us from using __compiletime_error(), and makes it difficult to fully sync BUILD_BUG macros with Linux. (Notice Linux's BUILD_BUG_ON_MSG is implemented by using compiletime_assert().) Let's convert error() into now treewide-available pr_err(). Done with the help of Coccinelle, excluing tools/ directory. The semantic patch I used is as follows: // <smpl> @@@@ -error +pr_err (...) // </smpl> Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: NSimon Glass <sjg@chromium.org> [trini: Re-run Coccinelle] Signed-off-by: NTom Rini <trini@konsulko.com>
-
- 20 9月, 2017 1 次提交
-
-
由 Peter Jones 提交于
EFI client programs need the signature information from the partition table to determine the disk a partition is on, so we need to fill that in here. Signed-off-by: NPeter Jones <pjones@redhat.com> [separated from efi_loader part, and fixed build-errors for non- CONFIG_EFI_PARTITION case] Signed-off-by: NRob Clark <robdclark@gmail.com> Signed-off-by: NAlexander Graf <agraf@suse.de>
-
- 03 9月, 2017 4 次提交
-
-
由 Maxime Ripard 提交于
The current code checks that no partitions overlap with the GPT partition table using the offset of the first LBA usable for that partition. This works fine, unless you have a partition entry that is further away than it usually is and you want to create partitions in the gap between the GPT header and the GPT partition entries, for example to reflash a bootloader that needs to be set there. Rework the test to something a bit smarter that checks whether a partition would overlap with either the GPT header or the partition entries, no matter where it is on the disk. Partitions that do not have a start LBA specified will still start at the first LBA usable set in the GPT header, to avoid weird behaviours. Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: NTom Rini <trini@konsulko.com>
-
由 Maxime Ripard 提交于
The gpt_fill_pte will need to access the device block size. Let's pass the device descriptor as an argument. Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: NTom Rini <trini@konsulko.com>
-
由 Maxime Ripard 提交于
The start variable is only used inside a loop, and is never affected inside it, so it's a purely local variable. In the same way the partition size is accessed several times, so we can store it in a variable. Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: NTom Rini <trini@konsulko.com>
-
由 Maxime Ripard 提交于
Both the config option and the DT options specify the offset to set the GPT at in bytes, yet the code treats those values as block numbers. Fix that. Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: NTom Rini <trini@konsulko.com> Reviewed-by: NPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
-
- 04 8月, 2017 2 次提交
-
-
由 Alison Chaiken 提交于
In order to read the GPT, modify the partition name strings, and then write out a new GPT, the disk GUID is needed. While there is an existing accessor for the partition UUIDs, there is none yet for the disk GUID. Changes since v6: none. Signed-off-by: NAlison Chaiken <alison@peloton-tech.com>
-
由 Alison Chaiken 提交于
Changes since v6: none. Signed-off-by: NAlison Chaiken <alison@peloton-tech.com>
-
- 21 3月, 2017 1 次提交
-
-
由 Philipp Tomsich 提交于
Some architectures require their SPL loader at a fixed address within the first 16KB of the disk. To avoid an overlap with the partition entries of the EFI partition table, the first safe offset (in bytes, from the start of the device) for the entries can be set through CONFIG_EFI_PARTITION_ENTRIES_OFF (via Kconfig) When formatting a device with an EFI partition table, we may need to leave a gap between the GPT header (always in LBA 1) and the partition entries. The GPT header already contains a field to specify the on-disk location, which has so far always been set to LBA 2. With this change, a configurable offset will be translated into a LBA address indicating where to put the entries. Now also allows an override via device-tree using a config-node (see doc/device-tree-bindings/config.txt for documentation). Tested (exporting an internal MMC formatted with this) against Linux, MacOS X and Windows. Signed-off-by: NPhilipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: NSimon Glass <sjg@chromium.org> [trini: __maybe_unused on config_offset to avoid warning] Signed-off-by: NTom Rini <trini@konsulko.com>
-
- 18 3月, 2017 1 次提交
-
-
由 Vincent Tinelli 提交于
Change GPT UUID string format from UUID to GUID per specification. Signed-off-by: NVincent Tinelli <vincent.tinelli@intel.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 09 2月, 2017 1 次提交
-
-
由 Vincent Tinelli 提交于
On some cases the first 440 bytes of MBR are used to keep an additional information for ROM boot loader. 'gpt write' command doesn't preserve that area and makes boot code gone. Preserve boot code area when run 'gpt write' command. Signed-off-by: NVincent Tinelli <vincent.tinelli@intel.com> Signed-off-by: NBrennan Ashton <brn@deako.com> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 28 1月, 2017 2 次提交
-
-
由 Patrick Delaunay 提交于
We convert CONFIG_PARTITION_UUIDS to Kconfig first. But in order to cleanly update all of the config files we must also update CMD_PART and CMD_GPT to also be in Kconfig in order to avoid complex logic elsewhere to update all of the config files. Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com> Signed-off-by: NPatrick Delaunay <patrick.delaunay73@gmail.com> Signed-off-by: NTom Rini <trini@konsulko.com>
-
由 Patrick Delaunay 提交于
Signed-off-by: NPatrick Delaunay <patrick.delaunay@st.com> Signed-off-by: NPatrick Delaunay <patrick.delaunay73@gmail.com>
-
- 02 10月, 2016 1 次提交
-
-
由 Petr Kulhavy 提交于
So far partition search by name has been supported only on the EFI partition table. This patch extends the search to all partition tables. Rename part_get_info_efi_by_name() to part_get_info_by_name(), move it from part_efi.c into part.c and make it a generic function which traverses all part drivers and searches all partitions (in the order given by the linked list). For this a new variable struct part_driver.max_entries is added, which limits the number of partitions searched. For EFI this was GPT_ENTRY_NUMBERS. Similarly the limit is defined for DOS, ISO, MAC and AMIGA partition tables. Signed-off-by: NPetr Kulhavy <brain@jikos.cz> Reviewed-by: NTom Rini <trini@konsulko.com> Acked-by: NSteve Rae <steve.rae@raedomain.com>
-
- 06 8月, 2016 1 次提交
-
-
由 Kever Yang 提交于
The calculation of "dev_desc->lba - 34 - 1 - offset" is not correct for size '-', because both fist_usable_lba and last_usable_lba will remain 34 sectors. We can simply use 0 for size '-' because the part_efi module will decode the size and auto extend the size to maximum available size. Signed-off-by: NKever Yang <kever.yang@rock-chips.com>
-
- 26 7月, 2016 1 次提交
-
-
由 Simon Glass 提交于
This fixes a mismatch between the %zu format and the type used on sandbox. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NTom Rini <trini@konsulko.com>
-
- 27 5月, 2016 1 次提交
-
-
由 Patrick Delaunay 提交于
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: NPatrick Delaunay <patrick.delaunay73@gmail.com>
-
- 23 3月, 2016 2 次提交
-
-
由 Simon Glass 提交于
This cannot be NULL since part_get_info() calls this function and requires it to be non-NULL. Reported-by: Coverity (CID: 138497) Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NTom Rini <trini@konsulko.com>
-
由 Simon Glass 提交于
This cannot be NULL since part_print() calls this function and requires it to be non-NULL. Reported-by: Coverity (CID: 138498) Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NTom Rini <trini@konsulko.com>
-
- 15 3月, 2016 5 次提交
-
-
由 Simon Glass 提交于
Rename these functions so that part_ is at the start. This more clearly identifies these functions as partition functions. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
To ease conversion to driver model, add helper functions which deal with calling each block device method. With driver model we can reimplement these functions with the same arguments. Use inline functions to avoid increasing code size on some boards. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NBin Meng <bmeng.cn@gmail.com> Tested-by: NStephen Warren <swarren@nvidia.com>
-
由 Simon Glass 提交于
This is a device number, and we want to use 'dev' to mean a driver model device. Rename the member. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NBin Meng <bmeng.cn@gmail.com> Tested-by: NStephen Warren <swarren@nvidia.com>
-
由 Simon Glass 提交于
Rename three partition functions so that they start with part_. This makes it clear what they relate to. Signed-off-by: NSimon Glass <sjg@chromium.org> Tested-by: NStephen Warren <swarren@nvidia.com>
-
由 Simon Glass 提交于
We can use linker lists instead of explicitly declaring each function. This makes the code shorter by avoiding switch() statements and lots of header file declarations. While this does clean up the code it introduces a few code issues with SPL. SPL never needs to print partition information since this all happens from commands. SPL mostly doesn't need to obtain information about a partition either, except in a few cases. Add these cases so that the code will be dropped from each partition driver when not needed. This avoids code bloat. I think this is still a win, since it is not a bad thing to be explicit about which features are used in SPL. But others may like to weigh in. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NTom Rini <trini@konsulko.com> Tested-by: NStephen Warren <swarren@nvidia.com>
-