summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* x86: dts: switch spi-flash to jedec, spi-nor compatibleNeil Armstrong2019-04-1213-13/+13
| | | | | | | | | | The x86 code and DT uses "spi-flash" to detect a flash node, switch to "jedec,spi-nor" in the DTS files and in fdtdec by switching the GENERIC_SPI_FLASH value to to jedec,spi-nor. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
* dts: switch spi-flash to jedec, spi-nor compatibleNeil Armstrong2019-04-12116-147/+147
| | | | | | | | | | | | | | | | | | | | There is no reason not to use the Linux "jedec,spi-nor" binding in U-Boot dts files. This compatible has been added in sf_probe, let use it. This patch switches to jedec,spi-nor when spi-flash is used in the DTS and DTSI files, and removed spi-flash when jedec,spi-nor is already present. The x86 dts are switched in a separate commit since it depends on a change in fdtdec. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Acked-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Reviewed-by: Evgeniy Paltsev <paltsev@synopsys.com> Reviewed-by: Rick Chen <rick@andestech.com> Reviewed-by: Patrick Delaunay <Patrick.delaunay@st.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
* mtd: add spi flash id s25fl064lHeiko Schocher2019-04-121-0/+1
| | | | | | | | Add support for SPANSION s25fl064l Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Jagan Teki <jagan@openedev.com> Acked-by: Vignesh R <vigneshr@ti.com>
* mtd: spinand: Sync GigaDevice GD5F1GQ4UExxG with latest Linux versionStefan Roese2019-04-121-32/+47
| | | | | | | | | | | | | | | | | | | This patch sync's the U-Boot SPI NAND GigaDevice GD5F1GQ4UExxG support with the latest Linux version (v5.0-rc3) plus the chip supported posted on the MTD list. Only the currently in U-Boot available chip is supported with this sync. The changes for the GD5F1GQ4UExxG are: - Name of NAND device changed to better reflect the real part - OOB layout changed to only reserve 1 byte for BBT - Use ECC caps 8bits/512bytes instead of 8bits/2048bytes - Enhanced ecc_get_status() function to determine and report a more fine grained bit error status Signed-off-by: Stefan Roese <sr@denx.de> Cc: Boris Brezillon <bbrezillon@kernel.org> Cc: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Jagan Teki <jagan@openedev.com>
* spi: cadence_qspi: Add quad write supportLey Foon Tan2019-04-123-3/+8
| | | | | | | | | | Use quad write if SPI_TX_QUAD flag is set. Tested quad write on Stratix 10 SoC board (Micron serial NOR flash, mt25qu02g) Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
* Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini2019-04-114-48/+29
|\
| * usb: ehci-mx6: Use common code to extract dr_modeAdam Ford2019-04-091-14/+15
| | | | | | | | | | | | | | | | There exists code in drivers/common/common.c to read the dr_mode from the device tree. This patch converts this driver to use that function to initialize the driver. Signed-off-by: Adam Ford <aford173@gmail.com>
| * usb: Make portspeed return a read-only stringIsmael Luceno Cortes2019-04-092-26/+10
| | | | | | | | | | | | | | Current code is plain wrong, and there's no need to have a mutable string, so fix function type and remove the intermediate variable. Signed-off-by: Ismael Luceno <ismael.luceno@silicon-gears.com>
| * usb: host: Print device name when scanningIsmael Luceno Cortes2019-04-091-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop the counter, it has no meaning other than being the order in which the interface is found; the name assigned to the USB host controller interface is a better indicator. Example of the original output: > USB0: USB EHCI 1.10 > scanning bus 0 for devices... 2 USB Device(s) found > scanning usb for storage devices... 1 Storage Device(s) found Patched output: > Bus usb@ee080100: USB EHCI 1.10 > scanning bus usb@ee080100 for devices... 2 USB Device(s) found > scanning usb for storage devices... 1 Storage Device(s) found Signed-off-by: Ismael Luceno <ismael.luceno@silicon-gears.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-shTom Rini2019-04-11100-2673/+13741
|\ \ | | | | | | | | | - Various rmobile fixes
| * | ARM: rmobile: rcar-common: Zap arch_preboot_os()Eugeniu Rosca2019-04-091-53/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | v2018.01 commit e23eb942ad103f ("ARM: rmobile: Stop using rcar-common/common.c on Gen3") removed board/renesas/rcar-common/common.c from the build chain with the reasoning that calling arch_preboot_os() is no longer needed. However, it left the arch_preboot_os() in place. Get rid of it. This is done in preparation of resurrecting rcar-common/common.c. NOTE: The three removed header includes (io.h, sys_proto.h, rcar-mstp.h) are in direct relationship with the dropped arch_preboot_os() hook. The other headers (common.h, rmobile.h) are going to be needed by pretty much anything that is going to appear in the rcar common code. So, keep the two in place. Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
| * | ARM: dts: rmobile: Enable USB on E2 AltMarek Vasut2019-04-091-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | The E2 Alt board has two USB ports, add missing DT nodes to make the USB available. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * | ARM: rmobile: alt: Increase USB power-good delayMarek Vasut2019-04-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Increase the USB power good delay on Alt, this is required with certain USB sticks, otherwise they might not be detected. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * | net: sh_eth: Initialize PHY in probe() onceMarek Vasut2019-04-091-14/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reset and initialize the PHY once in the probe() function rather than doing it over and over again is start() function. This requires us to keep the clock enabled while the driver is in use. This significantly reduces the time between transfers as the PHY doesn't have to restart autonegotiation between transfers, which takes forever. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Joe Hershberger <joe.hershberger@ni.com>
| * | ARM: dts: rmobile: Synchronize Gen3 DTs with Linux 5.0Marek Vasut2019-04-0927-769/+4075
| | | | | | | | | | | | | | | | | | | | | | | | Synchronize R-Car Gen3 device trees with Linux 5.0, commit 1c163f4c7b3f621efff9b28a47abb36f7378d783 . Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * | ARM: dts: rmobile: Synchronize Gen2 DTs with Linux 5.0Marek Vasut2019-04-0911-20/+66
| | | | | | | | | | | | | | | | | | | | | | | | Synchronize R-Car Gen2 device trees with Linux 5.0, commit 1c163f4c7b3f621efff9b28a47abb36f7378d783 . Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * | pinctrl: renesas: Synchronize Gen3 tables with Linux 5.0Marek Vasut2019-04-097-1496/+2511
| | | | | | | | | | | | | | | | | | | | | | | | Synchronize R-Car Gen3 pin control tables with Linux 5.0, commit 1c163f4c7b3f621efff9b28a47abb36f7378d783 . Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * | pinctrl: renesas: Synchronize Gen2 tables with Linux 5.0Marek Vasut2019-04-093-62/+81
| | | | | | | | | | | | | | | | | | | | | | | | Synchronize R-Car Gen2 pin control tables with Linux 5.0, commit 1c163f4c7b3f621efff9b28a47abb36f7378d783 . Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * | pinctrl: renesas: Add TDSEL fixup for H2/E2 ES1.0 SoCsMarek Vasut2019-04-092-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux 5.0, commit 1c163f4c7b3f621efff9b28a47abb36f7378d783, has a TDSEL fix for R8A7790 H2 and R8A7794 E2 SoCs, implement similar fix for U-Boot. The difference here is that the SoC ES matching has to be implemented manually. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * | clk: renesas: Synchronize Gen3 tables with Linux 5.0Marek Vasut2019-04-0911-152/+226
| | | | | | | | | | | | | | | | | | | | | | | | Synchronize R-Car Gen3 clock tables with Linux 5.0, commit 1c163f4c7b3f621efff9b28a47abb36f7378d783 . Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * | clk: renesas: Synchronize Gen2 tables with Linux 5.0Marek Vasut2019-04-0911-62/+28
| | | | | | | | | | | | | | | | | | | | | | | | Synchronize R-Car Gen2 clock tables with Linux 5.0, commit 1c163f4c7b3f621efff9b28a47abb36f7378d783 . Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * | ARM: rmobile: Add R8A77965 M3NULCB supportMarek Vasut2019-04-096-2/+75
| | | | | | | | | | | | | | | | | | | | | Add defconfig and board specific adjustments for the R8A77965 M3N ULCB. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * | ARM: dts: rmobile: Import R8A77965 M3NULCB DTsMarek Vasut2019-04-093-0/+77
| | | | | | | | | | | | | | | | | | | | | | | | Import R8A77965 M3N ULCB device trees from Linux 5.0 , commit 1c163f4c7b3f621efff9b28a47abb36f7378d783 . Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * | pinctrl: renesas: Add R8A77965 pin control tablesMarek Vasut2019-04-096-12/+5992
| | | | | | | | | | | | | | | | | | | | | Add pin control tables for R8A77965 from Linux 5.0 . Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * | clk: renesas: Add R8A77965 clock tablesMarek Vasut2019-04-095-20/+347
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add clock tables for R8A77965 from Linux 5.0 , except for the crit, R and Z clock, which are neither used nor supported by the U-Boot clock framework yet. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * | ARM: rmobile: Add dedicated R8A77965 SoC supportMarek Vasut2019-04-091-0/+7
| | | | | | | | | | | | | | | | | | | | | Add dedicated entry for R8A77965 M3N SoC. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * | ARM: rmobile: Enable multi-DTB fit LZO compressionMarek Vasut2019-04-096-6/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable LZO compression of the multi-DTB fitImages, since the U-Boot with multiple DTs enabled is becoming quite large and the DTs can be well compressed. The LZO compression saves almost 200 kiB on the Salvator-X(S) and ULCB targets. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * | lib: fdt: Allow LZO and GZIP DT compression in U-BootMarek Vasut2019-04-095-5/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add required Kconfig symbols, Makefile bits and macro fixes in a few places to support LZO and DT compression in U-Boot. This can save a lot of space with multi-DTB fitImages. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
| * | lib: fdt: Allow enabling both LZO and GZIP DT compressionMarek Vasut2019-04-091-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow enabling both LZO and GZIP DT compression in SPL and fix a bug where if the GZIP decompression failed, the LZO decompression would not even be attempted. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com>
| * | ARM: renesas: Save boot parameters passed in by ATFMarek Vasut2019-04-091-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ATF can pass additional information via the first four registers, x0...x3. The R-Car Gen3 with mainline ATF, register x1 contains pointer to a device tree with platform information. Save these registers for future use. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * | lib: fdt: Split fdtdec_setup_memory_banksize()Marek Vasut2019-04-092-6/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split fdtdec_setup_memory_banksize() into fdtdec_setup_memory_banksize_fdt(), which allows the caller to pass custom blob into the function and the original fdtdec_setup_memory_banksize(), which uses the gd->fdt_blob. This is useful when configuring the DRAM properties from a FDT blob fragment passed in by the firmware. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | lib: fdt: Split fdtdec_setup_mem_size_base()Marek Vasut2019-04-092-3/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split fdtdec_setup_mem_size_base() into fdtdec_setup_mem_size_base_fdt(), which allows the caller to pass custom blob into the function and the original fdtdec_setup_mem_size_base(), which uses the gd->fdt_blob. This is useful when configuring the DRAM properties from a FDT blob fragment passed in by the firmware. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | spl: ymodem: Move GZ handling out of YModem sessionMarek Vasut2019-04-091-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case the gunzip() call fails, it will print an error message. If that happens within the YModem session, the error message will not be displayed and would be useless. Move the gunzip() call out of the YModem session to make those possible error messages visible. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Tom Rini <trini@konsulko.com>
| * | spl: ymodem: Terminate YModem session on errorMarek Vasut2019-04-091-2/+3
| |/ | | | | | | | | | | | | | | In case spl_parse_image_header() errors out, terminate the YModem session, otherwise we won't get any further output. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Tom Rini <trini@konsulko.com>
* | Merge branch '2019-04-09-master-imports-fs'Tom Rini2019-04-1020-89/+646
|\ \ | | | | | | | | | | | | | | | - test.py tests for mmc - ext4 symlink support and other fixes - ext4 block group descriptor sizing
| * | test.py: Disable fsck for FAT tests for nowTom Rini2019-04-101-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently enabling fsck on FAT16/FAT32 exposes that we have problems with: TestFsBasic.test_fs13[fat16] TestFsBasic.test_fs11[fat32] TestFsBasic.test_fs12[fat32] TestFsBasic.test_fs13[fat32] TestFsExt.test_fs_ext1[fat32] TestFsExt.test_fs_ext2[fat32] TestFsExt.test_fs_ext3[fat32] TestFsExt.test_fs_ext4[fat32] TestFsExt.test_fs_ext5[fat32] TestFsExt.test_fs_ext6[fat32] TestFsExt.test_fs_ext7[fat32] TestFsExt.test_fs_ext8[fat32] TestFsExt.test_fs_ext9[fat32] TestMkdir.test_mkdir6[fat16] TestMkdir.test_mkdir1[fat32] TestMkdir.test_mkdir2[fat32] TestMkdir.test_mkdir3[fat32] TestMkdir.test_mkdir4[fat32] TestMkdir.test_mkdir5[fat32] TestMkdir.test_mkdir6[fat32] TestUnlink.test_unlink1[fat16] TestUnlink.test_unlink2[fat16] TestUnlink.test_unlink3[fat16] TestUnlink.test_unlink4[fat16] TestUnlink.test_unlink5[fat16] TestUnlink.test_unlink6[fat16] TestUnlink.test_unlink7[fat16] TestUnlink.test_unlink1[fat32] TestUnlink.test_unlink2[fat32] TestUnlink.test_unlink3[fat32] TestUnlink.test_unlink4[fat32] TestUnlink.test_unlink5[fat32] TestUnlink.test_unlink6[fat32] TestUnlink.test_unlink7[fat32] This is because we don't update the "information sector" on FAT32. While in the future we should resolve this problem and include that feature, we should enable fsck for ext4 to ensure that things remain in good shape there. Signed-off-by: Tom Rini <trini@konsulko.com>
| * | Fix ext4 block group descriptor sizingBenjamin Lim2019-04-091-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | Ext4 allows for arbitrarily sized block group descriptors when 64-bit addressing is enabled, which was previously not properly supported. This patch dynamically allocates a chunk of memory of the correct size. Signed-off-by: Benjamin Lim <jarsp.ctf@gmail.com>
| * | test/py: mmc: Add 'mmc read' performance checkMarek Vasut2019-04-091-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add option to the mmc rd test to check the duration of the execution of the mmc read command. This allows intercepting read performance regressions. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Tom Rini <trini@konsulko.com> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | test/py: mmc: Add 'mmc info' testMarek Vasut2019-04-091-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add test for 'mmc info' subcommand. This tests whether the card information is obtained correctly and verifies the device, bus speed, bus mode and bus width. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Tom Rini <trini@konsulko.com> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | test/py: mmc: Add 'mmc rescan' testMarek Vasut2019-04-091-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add test for 'mmc rescan' subcommand. This tests whether the system can switch to a specific card and then rescan the card. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Tom Rini <trini@konsulko.com> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | test/py: mmc: Add 'mmc dev' testMarek Vasut2019-04-091-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add separate test for 'mmc dev' subcommand. This tests whether the system can switch to a specific card. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Tom Rini <trini@konsulko.com> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | test/py: mmc: Factor out device selectionMarek Vasut2019-04-091-11/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | Factor out the 'mmc dev' call so it can be recycled by other tests. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Tom Rini <trini@konsulko.com> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | fs: fat: fix reading non-cluster-aligned root directoryAnssi Hannula2019-04-091-13/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A FAT12/FAT16 root directory location is specified by a sector offset and it might not start at a cluster boundary. It also resides before the data area (before cluster 2). However, the current code assumes that the root directory is located at a beginning of a cluster, causing no files to be found if that is not the case. Since the FAT12/FAT16 root directory is located before the data area and is not aligned to clusters, using unsigned cluster numbers to refer to the root directory does not work well (the "cluster number" may be negative, and even allowing it be signed would not make it properly aligned). Modify the code to not use the normal cluster numbering when referring to the root directory of FAT12/FAT16 and instead use a cluster-sized offsets counted from the root directory start sector. This is a relatively common case as at least the filesystem formatter on Win7 seems to create such filesystems by default on 2GB USB sticks when "FAT" is selected (cluster size 64 sectors, rootdir size 32 sectors, rootdir starts at half a cluster before cluster 2). dosfstools mkfs.vfat does not seem to create affected filesystems. Signed-off-by: Anssi Hannula <anssi.hannula@bitwise.fi> Reviewed-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com> Tested-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com>
| * | fs: ext4: Problem with ext4load and sparse filesGero Schumacher2019-04-091-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hi, when I try to load a sparse file via ext4load, I am getting the error message 'invalid extent' After a deeper look in the code, it seems to be an issue in the function ext4fs_get_extent_block in fs/ext4/ext4_common.c: The file starts with 1k of zeros. The blocksize is 1024. So the first extend block contains the following information: eh_entries: 1 eh_depth: 1 ei_block 1 When the upper layer (ext4fs_read_file) asks for fileblock 0, we are running in the 'invalid extent' error message. For me it seems, that the code is not prepared for handling a sparse block at the beginning of the file. The following change, solved my problem: I am really not an expert in ext4 filesystems. Can somebody please have a look at this issue and give me a feedback, if I am totally wrong or not?
| * | test: fs: Added tests for symlinksJean-Jacques Hiblot2019-04-093-0/+208
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test cases are: 1) basic link creation, verify it can be followed 2) chained links, verify it can be followed 3) replace exiting file a with a link, and a link with a link. verify it can be followed 4) create a broken link, verify it can't be followed Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
| * | fs: Add a new command to create symbolic linksJean-Jacques Hiblot2019-04-093-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The command line is: ln <interface> <dev[:part]> target linkname Currently symbolic links are supported only in ext4 and only if the option CMD_EXT4_WRITE is enabled. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
| * | fs: ext4: Add support for the creation of symbolic linksJean-Jacques Hiblot2019-04-094-11/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Re-use the functions used to write/create a file, to support creation of a symbolic link. The difference with a regular file are small: - The inode mode is flagged with S_IFLNK instead of S_IFREG - The ext2_dirent's filetype is FILETYPE_SYMLINK instead of FILETYPE_REG - Instead of storing the content of a file in allocated blocks, the path to the target is stored. And if the target's path is short enough, no block is allocated and the target's path is stored in ext2_inode.b.symlink As with regulars files, if a file/symlink with the same name exits, it is unlinked first and then re-created. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> [trini: Fix ext4 env code] Signed-off-by: Tom Rini <trini@konsulko.com>
| * | fs: ext4: constify the buffer passed to write functionsJean-Jacques Hiblot2019-04-094-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to modify the buffer passed to ext4fs_write_file(). The memset() call is not required here and was likely copied from the equivalent part of the ext4fs_read_file() function where we do need it. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
| * | test: fs: Add filesystem integrity checksJean-Jacques Hiblot2019-04-095-3/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to make sure that file writes,file creation, etc. are properly performed and do not corrupt the filesystem. To help with this, introduce the assert_fs_integrity() function that executes the appropriate fsck tool. It should be called at the end of any test that modify the content/organization of the filesystem. Currently only supports FATs and EXT4. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
| * | test: fs: disable the metadata checksums on ext4 filesystemsJean-Jacques Hiblot2019-04-091-0/+2
| | | | | | | | | | | | | | | | | | | | | If the metadata checksums are enabled, all write operations will fail. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>