- Oct 24, 2015
-
-
Hans de Goede authored
Add generic fs support, so that commands like ls, load and test -e can be used on ubifs. Signed-off-by:
Hans de Goede <hdegoede@redhat.com> Reviewed-by:
Heiko Schocher <hs@denx.de>
-
Hans de Goede authored
This is not necessary / useful when not building with CONFIG_SANDBOX and with the addition of ubifs support to the generic fs commands it actually gets in the way, since both operate on a fake / NULL blkdev. Signed-off-by:
Hans de Goede <hdegoede@redhat.com> Acked-by:
Stephen Warren <swarren@nvidia.com>
-
- Sep 11, 2015
-
-
Simon Glass authored
Now that we have a new header file for cache-aligned allocation, we should move the stack-based allocation macro there also. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Jan 08, 2015
-
-
Maxime Ripard authored
According to the UEFI Spec (Table 16, section 5.2.3 of the version 2.4 Errata B), the protective MBR partition record size must be set to the size of the disk minus one, in LBAs. However, the current code was setting the size as the total number of LBAs on the disk, resulting in an off-by-one error. This confused the AM335x ROM code, and will probably confuse other tools as well. Signed-off-by:
Maxime Ripard <maxime.ripard@free-electrons.com>
-
- Dec 18, 2014
-
-
Steve Rae authored
Implement a feature to allow fastboot to write the downloaded image to the space reserved for the Protective MBR and the Primary GUID Partition Table. Additionally, prepare and write the Backup GUID Partition Table. Signed-off-by:
Steve Rae <srae@broadcom.com> Tested-by:
Lukasz Majewski <l.majewski@samsung.com> [Test HW: Exynos4412 - Trats2]
-
Steve Rae authored
Signed-off-by:
Steve Rae <srae@broadcom.com> Tested-by:
Lukasz Majewski <l.majewski@samsung.com> [Test HW: Exynos4412 - Trats2]
-
- Nov 27, 2014
-
-
Simon Glass authored
Now that we have inttypes.h, use it in a few more places to avoid compiler warnings on sandbox when building on 64-bit machines. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Oct 25, 2014
-
-
Jeroen Hofstee authored
Signed-off-by:
Jeroen Hofstee <jeroen@myspectrum.nl>
-
- Sep 24, 2014
-
-
Pavel Machek authored
Cleanup disk/part.c Signed-off-by:
Pavel Machek <pavel@denx.de>
-
- Jul 22, 2014
-
-
Pavel Machek authored
Whitespace cleanups. Signed-off-by:
Pavel Machek <pavel@denx.de>
-
- Jun 23, 2014
-
-
Stephen Warren authored
Commit 95fac6ab "sandbox: Use os functions to read host device tree" removed the ability for get_device_and_partition() to handle the "host" device type, and redirect accesses to it to the host filesystem. This broke some unit tests that use this feature. So, revert that change. The code added back by this patch is slightly different to pacify checkpatch. However, we're then left with "host" being both: - A pseudo device that accesses the hosts real filesystem. - An emulated block device, which accesses "sectors" inside a file stored on the host. In order to resolve this discrepancy, rename the pseudo device from host to hostfs, and adjust the unit-tests for this change. The "help sb" output is modified to reflect this rename, and state where the host and hostfs devices should be used. Signed-off-by:
Stephen Warren <swarren@nvidia.com> Tested-by:
Josh Wu <josh.wu@atmel.com> Acked-by:
Simon Glass <sjg@chromium.org> Tested-by:
Simon Glass <sjg@chromium.org>
-
- Jun 12, 2014
-
-
Stephen Warren authored
Currently, get_device()/get_dev_hwpart() for MMC devices does not select an explicit HW partition unless the user explicitly requests one, i.e. by requesting device "mmc 0.0" rather than just "mmc 0". I think it makes more sense if the default is to select HW partition 0 (main data area) if the user didn't request a specific partition. Otherwise, the following happens, which feels wrong: Select HW partition 1 (boot0): mmc dev 0 1 Attempts to access SW partition 1 on HW partition 1 (boot0), rather than SW partition 1 on HW partition 0 (main data area): ls mmc 0:1 / With this patch, the second command above re-selects the main data area. Many device types don't support HW partitions at all, so if HW partition 0 is selected (either explicitly or as the default) and there's no select_hwpart function, we simply skip attempting to select a HW partition. Some MMC devices (i.e. SD cards) don't support HW partitions. However, this patch still works, since mmc_start_init() sets the current partition number to 0, and mmc_select_hwpart() succeeds if the requested partition is already selected. Signed-off-by:
Stephen Warren <swarren@nvidia.com> Acked-by:
Pantelis Antoniou <panto@antoniou-consulting.com>
-
- Jun 11, 2014
-
-
Darwin Dingel authored
Bug: SDCard with a messed up partition but still has a FAT signature intact is readable in Linux but unreadable in uboot with 'fatls'. Fix: When partition info checking fails, there is no checking for a FAT signature (DOS_PBR) which will fail 'fatls'. FAT signature checking is done when no valid partition is found in partition table. If FAT signature is found, the disk will be read as PBR and continue processing. Signed-off-by:
Darwin Dingel <darwin.dingel@alliedtelesis.co.nz>
-
- Jun 05, 2014
-
-
Steve Rae authored
Add function to find a GPT table entry by name. Tested on little endian ARMv7 and ARMv8 configurations Signed-off-by:
Steve Rae <srae@broadcom.com>
-
Steve Rae authored
- update the comments regarding lbaint_t usage - cleanup casting of values related to the lbaint_t type - cleanup of a type that requires a u64 Tested on little endian ARMv7 and ARMv8 configurations Signed-off-by:
Steve Rae <srae@broadcom.com>
-
Steve Rae authored
Tested on little endian ARMv7 and ARMv8 configurations Signed-off-by:
Steve Rae <srae@broadcom.com>
-
- May 23, 2014
-
-
Stephen Warren authored
This enables specifying which eMMC HW partition to target for any U-Boot command that uses the generic get_partition() function to parse its command-line arguments. Acked-by:
Pantelis Antoniou <panto@antoniou-consulting.com> Signed-off-by:
Stephen Warren <swarren@nvidia.com>
-
Stephen Warren authored
Some device types (e.g. eMMC) have hardware-level partitions (for eMMC, separate boot and user data partitions). This change allows the user to specify the HW partition they wish to access when passing a device ID to U-Boot Commands such as part, ls, load, ums, etc. The syntax allows an optional ".$hwpartid" to be appended to the device name string for those commands. Existing syntax, for MMC device 0, default HW partition ID, SW partition ID 1: ls mmc 0:1 / New syntax, for MMC device 0, HW partition ID 1 (boot0), SW partition ID 2: ls mmc 0.1:2 / For my purposes, this is most useful for the ums (USB mass storage gadget) command, but there's no reason not to allow the new syntax globally. This patch adds the core support infra-structure. The next patch will provide the implementation for MMC. Acked-by:
Pantelis Antoniou <panto@antoniou-consulting.com> Signed-off-by:
Stephen Warren <swarren@nvidia.com>
-
- May 12, 2014
-
-
Steve Rae authored
Check the Backup GPT table if the Primary GPT table is invalid. Renamed "Secondary GPT" to "Backup GPT" as per: UEFI Specification (Version 2.3.1, Errata A) Signed-off-by:
Steve Rae <srae@broadcom.com>
-
- Apr 02, 2014
-
-
Przemyslaw Marczak authored
Changes in lib/uuid.c to: - uuid_str_to_bin() - uuid_bin_to_str() New parameter is added to specify input/output string format in listed functions This change allows easy recognize which UUID type is or should be stored in given string array. Binary data of UUID and GUID is always stored in big endian, only string representations are different as follows. String byte: 0 36 String char: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx string UUID: be be be be be string GUID: le le le be be This patch also updates functions calls and declarations in a whole code. Signed-off-by:
Przemyslaw Marczak <p.marczak@samsung.com> Cc: Stephen Warren <swarren@nvidia.com> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: trini@ti.com
-
Przemyslaw Marczak authored
This commit introduces cleanup for uuid library. Changes: - move uuid<->string conversion functions into lib/uuid.c so they can be used by code outside part_efi.c. - rename uuid_string() to uuid_bin_to_str() for consistency with existing uuid_str_to_bin() - add an error return code to uuid_str_to_bin() - update existing code to the new library functions. Signed-off-by:
Przemyslaw Marczak <p.marczak@samsung.com> Cc: Stephen Warren <swarren@nvidia.com> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: trini@ti.com
-
- Mar 18, 2014
-
-
Simon Glass authored
At present we use U-Boot's filesystem layer to read the sandbox device tree, but this is problematic since it relies on a temporary feauture added there. Since we plan to implement proper block layer support for sandbox, change this code to use the os layer functions instead. Also use the new fdt_create_empty_tree() instead of our own code. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Feb 24, 2014
-
-
Hector Palacios authored
The calloc() call was allocating space for the sizeof the struct pointer rather than for the struct contents. Besides, since this buffer is passed to mmc for writing and some platforms may use cache, the legacy_mbr struct should be cache-aligned. Signed-off-by:
Hector Palacios <hector.palacios@digi.com> Tested-by:
Lukasz Majewski <l.majewski@samsung.com>
-
- Feb 19, 2014
-
-
Masahiro Yamada authored
Now we are ready to switch over to real Kbuild. This commit disables temporary scripts: scripts/{Makefile.build.tmp, Makefile.host.tmp} and enables real Kbuild scripts: scripts/{Makefile.build,Makefile.host,Makefile.lib}. This switch is triggered by the line in scripts/Kbuild.include -build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build.tmp obj +build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj We need to adjust some build scripts for U-Boot. But smaller amount of modification is preferable. Additionally, we need to fix compiler flags which are locally added or removed. In Kbuild, it is not allowed to change CFLAGS locally. Instead, ccflags-y, asflags-y, cppflags-y, CFLAGS_$(basetarget).o, CFLAGS_REMOVE_$(basetarget).o are prepared for that purpose. Signed-off-by:
Masahiro Yamada <yamada.m@jp.panasonic.com> Tested-by:
Gerhard Sittig <gsi@denx.de>
-
- Jan 09, 2014
-
-
Henrik Nordström authored
Provide a way to use any host file or device as a block device in U-Boot. This can be used to provide filesystem access within U-Boot to an ext2 image file on the host, for example. The support is plumbed into the filesystem and partition interfaces. We don't want to print a message in the driver every time we find a missing device. Pass the information back to the caller where a message can be printed if desired. Signed-off-by:
Henrik Nordström <henrik@henriknordstrom.net> Signed-off-by:
Simon Glass <sjg@chromium.org> - Removed change to part.c get_device_and_partition() Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
- Oct 31, 2013
-
-
Masahiro Yamada authored
Signed-off-by:
Masahiro Yamada <yamada.m@jp.panasonic.com>
-
- Oct 14, 2013
-
-
Wolfgang Denk authored
Signed-off-by:
Wolfgang Denk <wd@denx.de>
-
- Sep 20, 2013
-
-
Mark Langsdorf authored
the gpt_pte wasn't being freed if it was checked against an invalid partition. The resulting memory leakage could make it impossible to repeatedly attempt to load non-existent files in a script. Also, downgrade the message for not finding an invalid partition from a printf() to a debug() so as to minimize message spam in perfectly normal situations. Signed-off-by:
Mark Langsdorf <mark.langsdorf@calxeda.com>
-
- Jul 24, 2013
-
-
Wolfgang Denk authored
Signed-off-by:
Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by:
Tom Rini <trini@ti.com>
-
- Jul 22, 2013
-
-
Lan Yixun (dlan) authored
The problem here is that uboot can't mount ext4 filesystem with commit "50ce4c07" applied. We use hard-coded "SECTOR_SIZE"(512) before this commit, now we introduce (block_dev_desc_t *)->log2blksz to replace this macro. And after we calling do_ls()->fs_set_blk_dev(), the variable log2blksz is not initialized, which it's not correct. And this patch try to solve the problem by caculating the value of log2blksz from variable blksz.
-
- Jul 15, 2013
-
-
Frederic Leroy authored
With CONFIG_SYS_64BIT_LBA, lbaint_t gets defined as a 64-bit type, which is required to represent block numbers for storage devices that exceed 2TiB (the block size usually is 512B), e.g. recent hard drives We now use lbaint_t for partition offset to reflect the lbaint_t change, and access partitions beyond or crossing the 2.1TiB limit. This required changes to signature of ext4fs_devread(), and type of all variables relatives to block sector. ext2/ext4 fs uses logical block represented by a 32 bit value. Logical block is a multiple of device block sector. To avoid overflow problem when calling ext4fs_devread(), we need to cast the sector parameter. Signed-off-by:
Frédéric Leroy <fredo@starox.org>
-
- Jun 04, 2013
-
-
Marek Vasut authored
Make sure to never access beyond bounds of either EFI partition name or DOS partition name. This situation is happening: part.h: disk_partition_t->name is 32-byte long part_efi.h: gpt_entry->partition_name is 36-bytes long The loop in part_efi.c copies over 36 bytes and thus accesses beyond the disk_partition_t->name . Fix this by picking the shortest of source and destination arrays and make sure the destination array is cleared so the trailing bytes are zeroed-out and don't cause issues with string manipulation. Signed-off-by:
Marek Vasut <marex@denx.de> Cc: Tom Rini <trini@ti.com> Cc: Simon Glass <sjg@chromium.org>
-
- May 01, 2013
-
-
Egbert Eich authored
For ISO we check the block size of the device if this is != the CD sector size we assume that the device has no ISO partition. Signed-off-by:
Egbert Eich <eich@suse.com>
-
Egbert Eich authored
Disks beyond 2T in size use blocksizes of 4096 bytes. However a lot of code in u-boot still assumes a 512 byte blocksize. This patch fixes the handling of GPTs. Signed-off-by:
Egbert Eich <eich@suse.com>
-
Egbert Eich authored
Devices that used to have a whole disk FAT filesystem but got then partitioned will most likely still have a FAT or FAT32 signature in the first sector as this sector does not get overwritten by a partitioning tool (otherwise the tool would risk to kill the mbr). The current partition search algorithm will erronously detects such a device as a raw FAT device. Instead of looking for the FAT or FAT32 signatures immediately we use the same algorithm as used by the Linux kernel and first check for a valid boot indicator flag on each of the 4 partitions. If the value of this flag is invalid for the first entry we then do the raw partition check. If the flag for any higher partition is wrong we assume the device is neiter a MBR nor PBR device. Signed-off-by:
Egbert Eich <eich@suse.com>
-
- Apr 02, 2013
-
-
Marc Dietrich authored
start_sect is not aligned to a 4 byte boundary thus causing exceptions on ARM platforms. Access this field via the get_unaligned_le32 macro. Signed-off-by:
Marc Dietrich <marvin24@gmx.de>
-
- Mar 14, 2013
-
-
Stephen Warren authored
This set of ifdefs is used in a number of places. Move its definition somewhere common so it doesn't have to be repeated. Signed-off-by:
Stephen Warren <swarren@nvidia.com> Acked-by:
Simon Glass <sjg@chromium.org> Acked-by:
Tom Rini <trini@ti.com> Signed-off-by:
Tom Warren <twarren@nvidia.com>
-
- Mar 04, 2013
-
-
Simon Glass authored
This allows reading of files from the host filesystem in sandbox. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Tom Rini <trini@ti.com>
-
- Dec 13, 2012
-
-
Łukasz Majewski authored
The restoration of GPT table (both primary and secondary) is now possible. Function 'gpt_restore' presents example of partition restoration process. Signed-off-by:
Lukasz Majewski <l.majewski@samsung.com> Signed-off-by:
Piotr Wilczek <p.wilczek@samsung.com> Signed-off-by:
Kyungmin Park <kyungmin.park@samsung.com>
-
Chang Hyun Park authored
Custom definitions of le_XX_to_int functions have been replaced with standard ones, defined at <compiler.h> Replacement of several GPT related structures members with ones indicating its endianness and proper size. Signed-off-by:
Chang Hyun Park <heartinpiece@outlook.com> Signed-off-by:
Lukasz Majewski <l.majewski@samsung.com> Signed-off-by:
Kyungmin Park <kyungmin.park@samsung.com>
-