[U-Boot] SYS_HAVE_*CACHE_MAINTENANCE

2018-05-08 Thread AKASHI Takahiro
Emmanuel, # Since I haven't subscribed the ML, I can't reply to your post directly. You haven't enabled those configs on armv8/ARM64 (and other arch's as well). So if your patch is merged "as it is," I'm afraid that it will break some functions/commands on such architectures that already have

Re: [U-Boot] inappropriate PCI configuration on arm64 qemu?

2018-05-30 Thread AKASHI Takahiro
Simon, On Wed, May 30, 2018 at 01:18:30PM -0600, Simon Glass wrote: > +Tuomas > > Hi Akashi, > > On 28 May 2018 at 01:59, AKASHI Takahiro wrote: > > When I tried to add a SD card to qemu's virt machine (2.10.0) as, > > -- > > -device sdhci-

Re: [U-Boot] [RFC 3/3] efi_selftest: test writing to file

2018-06-01 Thread AKASHI, Takahiro
Heinrich, On Sat, May 26, 2018 at 10:34:47AM +0200, Heinrich Schuchardt wrote: > Signed-off-by: Heinrich Schuchardt > --- > lib/efi_selftest/efi_selftest_block_device.c | 56 > 1 file changed, 56 insertions(+) > > diff --git a/lib/efi_selftest/efi_selftest_block_device.c

Re: [U-Boot] inappropriate PCI configuration on arm64 qemu?

2018-06-01 Thread AKASHI Takahiro
Tuomas, On Thu, May 31, 2018 at 01:32:20PM +0300, Tuomas Tynkkynen wrote: > Hi Akashi, > > On 05/31/2018 08:05 AM, AKASHI Takahiro wrote: > >Simon, > > > >On Wed, May 30, 2018 at 01:18:30PM -0600, Simon Glass wrote: > >>+Tuomas > >> > >&

[U-Boot] inappropriate PCI configuration on arm64 qemu?

2018-05-28 Thread AKASHI Takahiro
When I tried to add a SD card to qemu's virt machine (2.10.0) as, -- -device sdhci-pci \ -device sd-card,drive=my_sd \ -drive if=none,id=my_sd,format=raw,file=/path/my/sd.img -- u-boot doesn't configure a SDHCI controller properly and an attached

Re: [U-Boot] [PATCH 17/17] fs-test: fix false positive error at Test Case 12

2018-07-31 Thread AKASHI Takahiro
On Sun, Jul 29, 2018 at 09:02:00AM +0200, Heinrich Schuchardt wrote: > On 07/20/2018 04:57 AM, AKASHI Takahiro wrote: > > The error message to be matched is wrong. Fix it. > > > > Signed-off-by: AKASHI Takahiro > > --- > > test/fs/fs-test.sh | 2 +- >

Re: [U-Boot] [RFC] efi_loader: workaround for EDK2's shell.efi

2018-08-09 Thread AKASHI Takahiro
On Thu, Aug 09, 2018 at 07:55:06AM +0100, Alexander Graf wrote: > > > On 09.08.18 07:15, AKASHI Takahiro wrote: > > The commit 21b3edfc964 ("efi_loader: check parameters of CreateEvent") > > enforces a strict parameter check at CreateEvent(). Unfortunately, >

[U-Boot] [PATCH] efi_loader: execute image's unload function

2018-08-09 Thread AKASHI Takahiro
Currently, unload function in EFI_LOADED_IMAGE_PROTOCOL is never called at UnloadImage Boot Service. This is not compliant to UEFI specification. See chapter "9.1 EFI Loaded Image Protocol." Signed-off-by: AKASHI Takahiro --- include/efi_api.h | 4 +++- lib/efi_loader/efi_

[U-Boot] [PATCH] efi_loader: set image_base and image_size to correct values

2018-08-09 Thread AKASHI Takahiro
t; since newly added fields are no longer needed. Signed-off-by: AKASHI Takahiro --- include/efi_api.h | 2 -- lib/efi_loader/efi_image_loader.c | 17 ++--- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/include/efi_api.h b/include/efi_api.h index b280

[U-Boot] [RFC] efi_loader: workaround for EDK2's shell.efi

2018-08-09 Thread AKASHI Takahiro
and yet we might want a workaround allowing for running un-modified version of EDK2 in short-term solution. The patch provides a minimum mitigation of parameter check. Signed-off-by: AKASHI Takahiro --- lib/efi_loader/efi_boottime.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -

Re: [U-Boot] [PATCH 00/17] fs: fat: extend FAT write operations

2018-08-06 Thread AKASHI Takahiro
On Tue, Aug 07, 2018 at 12:34:28AM +0200, Heinrich Schuchardt wrote: > On 07/23/2018 04:46 PM, Tom Rini wrote: > > On Sun, Jul 22, 2018 at 08:44:39AM +0200, Heinrich Schuchardt wrote: > >> Hello Tom, hello Alex, > >> > >> I have been testing the patches. They are working fine for ASCII file > >>

Re: [U-Boot] [PATCH 00/17] fs: fat: extend FAT write operations

2018-08-06 Thread AKASHI Takahiro
On Tue, Aug 07, 2018 at 02:38:34PM +0900, AKASHI Takahiro wrote: > On Tue, Aug 07, 2018 at 12:34:28AM +0200, Heinrich Schuchardt wrote: > > On 07/23/2018 04:46 PM, Tom Rini wrote: > > > On Sun, Jul 22, 2018 at 08:44:39AM +0200, Heinrich Schuchardt wrote: > >

[U-Boot] [PATCH] efi_loader: fix a parameter check at CreateEvent()

2018-08-10 Thread AKASHI Takahiro
b3edfc9644 ("efi_loader: check parameters of CreateEvent") Signed-off-by: AKASHI Takahiro --- lib/efi_loader/efi_boottime.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index ac8f484507bd..f3fba3190

Re: [U-Boot] [RFC] efi_loader: workaround for EDK2's shell.efi

2018-08-09 Thread AKASHI Takahiro
Leif, Heinrich, Thank you for your comments. I should have been more careful in reading UEFI specification :) On Thu, Aug 09, 2018 at 02:08:32PM +0100, Leif Lindholm wrote: > On Thu, Aug 09, 2018 at 03:15:38PM +0900, AKASHI Takahiro wrote: > > The commit 21b3edfc964 ("efi

Re: [U-Boot] [PATCH 03/17] fs: fat: make directory iterator global for write use

2018-08-19 Thread AKASHI Takahiro
On Sat, Aug 11, 2018 at 03:34:20PM +0200, Heinrich Schuchardt wrote: > On 07/20/2018 04:57 AM, AKASHI Takahiro wrote: > > Directory iterator was introduced in major re-work of read operation by > > Rob. We want to use it for write operation extensively as well. > > This

[U-Boot] [RFC 0/3] test/py: add filesystem test scripts

2018-08-23 Thread AKASHI Takahiro
h welcomed. The code itself was tested on v2018.09-rc with my patch set above. [1] https://lists.denx.de/pipermail/u-boot/2018-July/335415.html Thanks, -Takahiro AKASHI AKASHI Takahiro (3): test/py: convert fs-test.sh to pytest test/py: fs: add extended write operation test test/py: fs:

[U-Boot] [RFC 1/3] test/py: convert fs-test.sh to pytest

2018-08-23 Thread AKASHI Takahiro
uot; variant; So it is not a replacement of fs-test.sh for now. Simple usage: $ py.test test/py/tests/test_fs [] You may also specify filesystem types to be tested: $ py.test test/py/tests/test_fs --fs-type fat32 [] Signed-off-by: AKASHI Takahiro --- test/py/tests/test_fs/conftest.py

[U-Boot] [RFC 2/3] test/py: fs: add extended write operation test

2018-08-23 Thread AKASHI Takahiro
In this commit and the next one, test scripts for new filesystem functionalities introduced by my patch set, "fs: fat: extend FAT write operations," are provided. In particular, this patch adds test cases for sub-directory write and write with non-zero offset. Signed-off-by: AKASH

[U-Boot] [RFC 3/3] test/py: fs: add fstest/mkdir test

2018-08-23 Thread AKASHI Takahiro
In this commit, test cases for mkdir interfaces are added as part of "test_fs" test suite. Signed-off-by: AKASHI Takahiro --- test/py/tests/test_fs/conftest.py | 31 test/py/tests/test_fs/test_mkdir.py | 77 + 2 files changed, 108 insertions(

[U-Boot] [PATCH 15/17] efi_loader: file: support creating a directory

2018-07-19 Thread AKASHI Takahiro
ot's mkdir interface for expected action. Signed-off-by: AKASHI Takahiro --- lib/efi_loader/efi_file.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/efi_loader/efi_file.c b/lib/efi_loader/efi_file.c index e6a15bcb52..6ec98c8022 100644 --- a/lib/efi_loader/

[U-Boot] [PATCH 13/17] fs: fat: support mkdir

2018-07-19 Thread AKASHI Takahiro
In this patch, mkdir support is added to FAT file system. A newly created directory contains only "." and ".." entries. Signed-off-by: AKASHI Takahiro --- fs/fat/fat_write.c | 138 + fs/fs.c| 3 +- include/fat.h

[U-Boot] [PATCH 09/17] fs: fat: support write with non-zero offset

2018-07-19 Thread AKASHI Takahiro
. This is an intended behavior in order to maitain compatibility with the current interface. Signed-off-by: AKASHI Takahiro --- fs/fat/fat_write.c | 287 ++--- 1 file changed, 272 insertions(+), 15 deletions(-) diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c index

[U-Boot] [PATCH 07/17] fs: fat: support write with sub-directory path

2018-07-19 Thread AKASHI Takahiro
file name specified must contain an absolute directory path. Otherwise, "/" (root directory) is assumed. Signed-off-by: AKASHI Takahiro --- fs/fat/fat.c | 9 - fs/fat/fat_write.c | 469 +++-- 2 files changed, 157 insertions(+), 321 deletions

[U-Boot] [PATCH 10/17] cmd: fat: add offset parameter to fatwrite

2018-07-19 Thread AKASHI Takahiro
In this patch, fatwrite command is extended so as to accept an additional parameter of file offset. Signed-off-by: AKASHI Takahiro --- cmd/fat.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cmd/fat.c b/cmd/fat.c index 03de5d11af..2a5f7bfc26 100644 --- a/cmd/fat.c

[U-Boot] [PATCH 16/17] efi_loader: implement a pseudo "file delete"

2018-07-19 Thread AKASHI Takahiro
This patch is necessary to run SCT.efi (UEFI Self-Certification Test). Returning EFI_SUCCESS can cheat SCT execution. Signed-off-by: AKASHI Takahiro --- lib/efi_loader/efi_file.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/efi_loader/efi_file.c b/lib

[U-Boot] [PATCH 12/17] fs: fat: remember the starting cluster number of directory

2018-07-19 Thread AKASHI Takahiro
The starting cluster number of directory is needed to initialize ".." (parent directory) entry when creating a new directory. Signed-off-by: AKASHI Takahiro --- fs/fat/fat.c | 2 ++ include/fat.h | 1 + 2 files changed, 3 insertions(+) diff --git a/fs/fat/fat.c b/fs/fat/fat.c index

[U-Boot] [PATCH 17/17] fs-test: fix false positive error at Test Case 12

2018-07-19 Thread AKASHI Takahiro
The error message to be matched is wrong. Fix it. Signed-off-by: AKASHI Takahiro --- test/fs/fs-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/fs/fs-test.sh b/test/fs/fs-test.sh index 2e8d5ee4df..7b0c5ea56f 100755 --- a/test/fs/fs-test.sh +++ b/test/fs/fs

[U-Boot] [PATCH 14/17] cmd: fat: add fatmkdir command

2018-07-19 Thread AKASHI Takahiro
In this patch, a new command, fatmkdir, is added. Please note that, as there is no notion of "current directory" on u-boot, a directory name specified must contains an absolute directory path as a parent directory. Otherwise, "/" (root directory) is assumed. Signed-off

[U-Boot] [PATCH 06/17] fs: fat: write returns error code instead of -1

2018-07-19 Thread AKASHI Takahiro
It would be good that FAT write function return error code instead of just returning -1 as fat_read_file() does. This patch attempts to address this issue although it is 'best effort (or estimate)' for now. Signed-off-by: AKASHI Takahiro --- fs/fat/fat_write.c | 19 +++ 1 file

[U-Boot] [PATCH 03/17] fs: fat: make directory iterator global for write use

2018-07-19 Thread AKASHI Takahiro
Directory iterator was introduced in major re-work of read operation by Rob. We want to use it for write operation extensively as well. This patch makes relevant functions, as well as iterator defition, visible outside of fat.c. Signed-off-by: AKASHI Takahiro --- fs/fat/fat.c | 39

[U-Boot] [PATCH 08/17] fs: fat: refactor write interface for a file offset

2018-07-19 Thread AKASHI Takahiro
to accept an additional parameter, file offset and further re-factored so that, in the next patch, all the necessary code will be put into set_contents(). Signed-off-by: AKASHI Takahiro --- fs/fat/fat_write.c | 178 + 1 file changed, 65 insertions

[U-Boot] [PATCH 05/17] fs: fat: check and normailze file name

2018-07-19 Thread AKASHI Takahiro
, however, that this function is yet to be extended to fully comply with the standard. Signed-off-by: AKASHI Takahiro --- fs/fat/fat_write.c | 52 +++--- 1 file changed, 44 insertions(+), 8 deletions(-) diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c

[U-Boot] [PATCH 04/17] fs: fat: assure iterator's ->dent belongs to ->clust

2018-07-19 Thread AKASHI Takahiro
ncing a cluster chain. Signed-off-by: AKASHI Takahiro --- fs/fat/fat.c | 24 include/fat.h | 1 + 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/fs/fat/fat.c b/fs/fat/fat.c index 0f82cbe1bd..d9bfb08d97 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -64

[U-Boot] [PATCH 02/17] fs: fat: handle "." and ".." of root dir correctly with fat_itr_resolve()

2018-07-19 Thread AKASHI Takahiro
FAT's root directory does not have "." nor ".." So care must be taken when scanning root directory with fat_itr_resolve(). Without this patch, any file path starting with "." or ".." will not be resolved at all. Signed-off-by: AKASHI Takahiro --- fs/fat/

[U-Boot] [PATCH 11/17] fs: add mkdir interface

2018-07-19 Thread AKASHI Takahiro
"mkdir" interface is added to file operations. This is a preparatory change as mkdir support for FAT file system will be added in next patch. Signed-off-by: AKASHI Takahiro --- fs/fs.c | 45 + include/fs.h | 10 ++ 2 files c

[U-Boot] [PATCH 01/17] fs: fat: extend get_fs_info() for write use

2018-07-19 Thread AKASHI Takahiro
get_fs_info() was introduced in major re-work of read operation by Rob. We want to reuse this function in write operation by extending it with additional members in fsdata structure. Signed-off-by: AKASHI Takahiro --- fs/fat/fat.c | 3 +++ include/fat.h | 2 ++ 2 files changed, 5 insertions

[U-Boot] [PATCH 00/17] fs: fat: extend FAT write operations

2018-07-19 Thread AKASHI Takahiro
://uefi.org/testtools AKASHI Takahiro (17): fs: fat: extend get_fs_info() for write use fs: fat: handle "." and ".." of root dir correctly with fat_itr_resolve() fs: fat: make directory iterator global for write use fs: fat: assure iterator's ->dent belongs to -

Re: [U-Boot] [PATCH 11/17] fs: add mkdir interface

2018-07-23 Thread AKASHI Takahiro
On Fri, Jul 20, 2018 at 07:35:18PM +0200, Heinrich Schuchardt wrote: > On 07/20/2018 04:57 AM, AKASHI Takahiro wrote: > > "mkdir" interface is added to file operations. > > This is a preparatory change as mkdir support for FAT file system > > will be added in

Re: [U-Boot] [PATCH 11/17] fs: add mkdir interface

2018-07-23 Thread AKASHI Takahiro
On Mon, Jul 23, 2018 at 07:56:58PM -0400, Tom Rini wrote: > On Mon, Jul 23, 2018 at 05:48:13PM -0600, Simon Glass wrote: > > Hi, > > > > On 20 July 2018 at 11:35, Heinrich Schuchardt wrote: > > > On 07/20/2018 04:57 AM, AKASHI Takahiro wrote: > > >> &qu

Re: [U-Boot] [PATCH 14/17] cmd: fat: add fatmkdir command

2018-07-23 Thread AKASHI Takahiro
On Fri, Jul 20, 2018 at 07:09:17PM +0200, Heinrich Schuchardt wrote: > On 07/20/2018 04:57 AM, AKASHI Takahiro wrote: > > In this patch, a new command, fatmkdir, is added. > > > > Please note that, as there is no notion of "current directory" on u-boot, >

Re: [U-Boot] [PATCH 13/17] fs: fat: support mkdir

2018-07-23 Thread AKASHI Takahiro
On Fri, Jul 20, 2018 at 07:14:21PM +0200, Heinrich Schuchardt wrote: > On 07/20/2018 04:57 AM, AKASHI Takahiro wrote: > > In this patch, mkdir support is added to FAT file system. > > A newly created directory contains only "." and ".." entries. >

Re: [U-Boot] [RFC 1/1] efi_loader: check parameters of efi_file_open()

2018-07-24 Thread AKASHI, Takahiro
On Sun, Jul 22, 2018 at 01:34:13PM +0200, Heinrich Schuchardt wrote: > Check the parameters of efi_file_open(). > > Signed-off-by: Heinrich Schuchardt > --- > Hello Takahiro, > > this patch is necessary to become more UEFI compliant. But it interferes > with your FAT patch series. > > You

Re: [U-Boot] [PATCH 00/17] fs: fat: extend FAT write operations

2018-07-23 Thread AKASHI Takahiro
On Sun, Jul 22, 2018 at 08:44:39AM +0200, Heinrich Schuchardt wrote: > Hello Tom, hello Alex, > > I have been testing the patches. They are working fine for ASCII file > names. To support Unicode file names extra work will be needed. But > probably we should postpone this to a later patch series.

Re: [U-Boot] [PATCH v3 2/3] rtc: pl031: convert the driver to driver model

2018-07-23 Thread AKASHI Takahiro
On Sat, Jul 21, 2018 at 06:53:16AM +0200, Heinrich Schuchardt wrote: > On 07/11/2018 11:06 AM, AKASHI Takahiro wrote: > > With this patch, PL031 driver is converted to driver-model-compliant > > driver. In addition, CONFIG_SYS_RTC_PL031_BASE is no longer valid. > > >

Re: [U-Boot] [PATCH 02/17] fs: fat: handle "." and ".." of root dir correctly with fat_itr_resolve()

2018-07-23 Thread AKASHI Takahiro
On Fri, Jul 20, 2018 at 08:09:00PM +0200, Heinrich Schuchardt wrote: > On 07/20/2018 04:57 AM, AKASHI Takahiro wrote: > > FAT's root directory does not have "." nor ".." > > So care must be taken when scanning root directory with fat_itr_resolve(). > > W

Re: [U-Boot] [PATCH 03/17] fs: fat: make directory iterator global for write use

2018-07-23 Thread AKASHI Takahiro
On Fri, Jul 20, 2018 at 08:02:57PM +0200, Heinrich Schuchardt wrote: > On 07/20/2018 04:57 AM, AKASHI Takahiro wrote: > > Directory iterator was introduced in major re-work of read operation by > > Rob. We want to use it for write operation extensively as well. > > This

Re: [U-Boot] [PATCH 09/17] fs: fat: support write with non-zero offset

2018-07-23 Thread AKASHI Takahiro
On Fri, Jul 20, 2018 at 07:46:49PM +0200, Heinrich Schuchardt wrote: > On 07/20/2018 04:57 AM, AKASHI Takahiro wrote: > > In this patch, all the necessary code for allowing for a file offset > > at write is implemented. What plays a major roll here is get_set_cluster(), > &g

Re: [U-Boot] [PATCH 03/17] fs: fat: make directory iterator global for write use

2018-07-23 Thread AKASHI Takahiro
On Mon, Jul 23, 2018 at 05:06:46PM +0900, AKASHI Takahiro wrote: > On Fri, Jul 20, 2018 at 08:02:57PM +0200, Heinrich Schuchardt wrote: > > On 07/20/2018 04:57 AM, AKASHI Takahiro wrote: > > > Directory iterator was introduced in major re-work of read operation by > &g

Re: [U-Boot] [PATCH 06/17] fs: fat: write returns error code instead of -1

2018-07-23 Thread AKASHI Takahiro
On Fri, Jul 20, 2018 at 07:55:06PM +0200, Heinrich Schuchardt wrote: > On 07/20/2018 04:57 AM, AKASHI Takahiro wrote: > > It would be good that FAT write function return error code instead of > > just returning -1 as fat_read_file() does. > > This patch attempts to addres

Re: [U-Boot] [PATCH v2 01/23] fs: fat: guard the content of include/fat.h

2018-09-04 Thread AKASHI Takahiro
On Tue, Sep 04, 2018 at 10:52:20AM +0200, Alexander Graf wrote: > > > On 04.09.18 09:49, AKASHI Takahiro wrote: > > The whole content of include/fat.h is private to FAT implementation > > and then should be guarded with CONFIG_FS_FAT. > > > > Signed-off-by: AKAS

Re: [U-Boot] [PATCH v2 01/23] fs: fat: guard the content of include/fat.h

2018-09-04 Thread AKASHI Takahiro
Hi Heinrich, Alex, On Tue, Sep 04, 2018 at 12:46:58PM +0200, Heinrich Schuchardt wrote: > > > On 09/04/2018 10:52 AM, Alexander Graf wrote: > > > > > > On 04.09.18 09:49, AKASHI Takahiro wrote: > >> The whole content of include/fat.h is private to FAT

Re: [U-Boot] [PATCH v2 04/23] fs: fat: make directory iterator global for write use

2018-09-04 Thread AKASHI Takahiro
On Tue, Sep 04, 2018 at 12:57:54PM +0200, Alexander Graf wrote: > > > > Am 04.09.2018 um 12:50 schrieb Heinrich Schuchardt : > > > > > > > >> On 09/04/2018 11:01 AM, Alexander Graf wrote: > >> > >> > >>> On 04.09.18

Re: [U-Boot] [PATCH v2 18/23] efi_loader: implement a pseudo "file delete"

2018-09-04 Thread AKASHI Takahiro
On Tue, Sep 04, 2018 at 11:16:38AM +0200, Alexander Graf wrote: > > > On 04.09.18 09:49, AKASHI Takahiro wrote: > > This patch is necessary to run SCT.efi (UEFI Self-Certification Test). > > Returning EFI_SUCCESS can cheat SCT execution. > > > > Signed-off-b

Re: [U-Boot] [PATCH v3 2/3] rtc: pl031: convert the driver to driver model

2018-09-04 Thread AKASHI Takahiro
On Tue, Sep 04, 2018 at 07:18:18PM +0200, Heinrich Schuchardt wrote: > On 07/23/2018 09:17 AM, AKASHI Takahiro wrote: > > On Sat, Jul 21, 2018 at 06:53:16AM +0200, Heinrich Schuchardt wrote: > >> On 07/11/2018 11:06 AM, AKASHI Takahiro wrote: > >>> With this pa

Re: [U-Boot] [PATCH v2 18/23] efi_loader: implement a pseudo "file delete"

2018-09-05 Thread AKASHI Takahiro
On Wed, Sep 05, 2018 at 10:22:07AM +0200, Alexander Graf wrote: > > > On 05.09.18 04:51, AKASHI Takahiro wrote: > > On Tue, Sep 04, 2018 at 11:16:38AM +0200, Alexander Graf wrote: > >> > >> > >> On 04.09.18 09:49, AKASHI Takahiro wrote: > >>

Re: [U-Boot] [PATCH v2 04/23] fs: fat: make directory iterator global for write use

2018-09-05 Thread AKASHI Takahiro
On Wed, Sep 05, 2018 at 10:16:32AM +0200, Alexander Graf wrote: > > > On 05.09.18 04:14, AKASHI Takahiro wrote: > > On Tue, Sep 04, 2018 at 12:57:54PM +0200, Alexander Graf wrote: > >> > >> > >>> Am 04.09.2018 um 12:50 schrieb Heinrich Schuchardt : &g

Re: [U-Boot] [RFC 1/3] test/py: convert fs-test.sh to pytest

2018-08-31 Thread AKASHI Takahiro
Hi Tuomas, Thank you for interesting pointers. On Thu, Aug 30, 2018 at 01:56:41PM +0300, Tuomas Tynkkynen wrote: > Hi Heinrich, Takahiro > > On 08/30/2018 01:26 PM, AKASHI Takahiro wrote: > >On Thu, Aug 30, 2018 at 12:01:32PM +0200, Heinrich Schuchardt wrote: > >>On 08/

Re: [U-Boot] [RFC 1/3] test/py: convert fs-test.sh to pytest

2018-08-31 Thread AKASHI Takahiro
On Wed, Aug 29, 2018 at 11:36:51PM +0200, Heinrich Schuchardt wrote: > On 08/23/2018 09:25 AM, AKASHI Takahiro wrote: > > In this commit, the same set of test cases as in test/fs/fs-test.sh > > is provided using pytest framework. > > Actually, fs-test.sh provides three vari

Re: [U-Boot] [RFC 1/3] test/py: convert fs-test.sh to pytest

2018-08-30 Thread AKASHI Takahiro
On Wed, Aug 29, 2018 at 11:36:51PM +0200, Heinrich Schuchardt wrote: > On 08/23/2018 09:25 AM, AKASHI Takahiro wrote: > > In this commit, the same set of test cases as in test/fs/fs-test.sh > > is provided using pytest framework. > > Actually, fs-test.sh provides three vari

Re: [U-Boot] [RFC 1/3] test/py: convert fs-test.sh to pytest

2018-08-30 Thread AKASHI Takahiro
On Thu, Aug 30, 2018 at 12:01:32PM +0200, Heinrich Schuchardt wrote: > On 08/30/2018 08:52 AM, AKASHI Takahiro wrote: > > On Wed, Aug 29, 2018 at 11:36:51PM +0200, Heinrich Schuchardt wrote: > >> On 08/23/2018 09:25 AM, AKASHI Takahiro wrote: > >>> In this comm

[U-Boot] [PATCH v3 04/26] fs: fat: assure iterator's ->dent belongs to ->clust

2018-09-11 Thread Akashi, Takahiro
From: AKASHI Takahiro In my attempt to re-work write operation, it was revealed that iterator's "clust" does not always point to a cluster to which a current directory entry ("dent") belongs. This patch assures that it is always true by adding "next_clust" which is

[U-Boot] [PATCH v3 03/26] fs: fat: handle "." and ".." of root dir correctly with fat_itr_resolve()

2018-09-11 Thread Akashi, Takahiro
From: AKASHI Takahiro FAT's root directory does not have "." nor ".." So care must be taken when scanning root directory with fat_itr_resolve(). Without this patch, any file path starting with "." or ".." will not be resolved at all. Signed-off-by:

[U-Boot] [PATCH v3 11/26] cmd: fat: add offset parameter to fatwrite

2018-09-11 Thread Akashi, Takahiro
From: AKASHI Takahiro In this patch, fatwrite command is extended so as to accept an additional parameter of file offset. Signed-off-by: AKASHI Takahiro --- cmd/fat.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cmd/fat.c b/cmd/fat.c index 03de5d11afb4

[U-Boot] [PATCH v3 14/26] fs: fat: support mkdir

2018-09-11 Thread Akashi, Takahiro
From: AKASHI Takahiro In this patch, mkdir support is added to FAT file system. A newly created directory contains only "." and ".." entries. Signed-off-by: AKASHI Takahiro --- fs/fat/fat_write.c | 136 + fs/fs.c|

[U-Boot] [PATCH v3 24/26] test/py: fs: add extended write operation test

2018-09-11 Thread Akashi, Takahiro
From: AKASHI Takahiro In this commit and the following, test scripts for new filesystem functionalities introduced by my patch set, "fs: fat: extend FAT write operations," are provided. In particular, this patch adds test cases for sub-directory write and write with non-zero offset.

[U-Boot] [PATCH v3 25/26] test/py: fs: add fstest/mkdir test

2018-09-11 Thread Akashi, Takahiro
From: AKASHI Takahiro In this commit, test cases for mkdir interfaces are added as part of "test_fs" test suite. Signed-off-by: AKASHI Takahiro --- test/py/tests/test_fs/conftest.py | 29 +++ test/py/tests/test_fs/test_mkdir.py | 112 2 files ch

[U-Boot] [PATCH v3 16/26] efi_loader: file: support creating a directory

2018-09-11 Thread Akashi, Takahiro
From: AKASHI Takahiro In efi world, there is no obvious "mkdir" interface, instead, Open() with EFI_FILE_MODE_CREATE in mode parameter and EFI_FILE_DIRECTORY in attributes parameter creates a directory. In this patch, efi_file_open() is extended so as to accept such a combination of

[U-Boot] [PATCH v3 10/26] fs: fat: support write with non-zero offset

2018-09-11 Thread Akashi, Takahiro
From: AKASHI Takahiro In this patch, all the necessary code for allowing for a file offset at write is implemented. What plays a major roll here is get_set_cluster(), which, in contrast to its counterpart, set_cluster(), only operates on already-allocated clusters, overwriting with data. So

[U-Boot] [PATCH v3 13/26] fs: fat: remember the starting cluster number of directory

2018-09-11 Thread Akashi, Takahiro
From: AKASHI Takahiro The starting cluster number of directory is needed to initialize ".." (parent directory) entry when creating a new directory. Signed-off-by: AKASHI Takahiro --- fs/fat/fat.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/fat/fat.c b/fs/fat/f

[U-Boot] [PATCH v3 08/26] fs: fat: support write with sub-directory path

2018-09-11 Thread Akashi, Takahiro
From: AKASHI Takahiro In this patch, write implementation is overhauled and rewritten by making full use of directory iterator. The obvious bonus is that we are now able to write to a file with a directory path, like /A/B/C/FILE. Please note that, as there is no notion of "current dire

[U-Boot] [PATCH v3 07/26] fs: fat: write returns error code instead of -1

2018-09-11 Thread Akashi, Takahiro
From: AKASHI Takahiro It would be good that FAT write function return error code instead of just returning -1 as fat_read_file() does. This patch attempts to address this issue although it is 'best effort (or estimate)' for now. Signed-off-by: AKASHI Takahiro --- fs/fat/fat_write.c | 19

[U-Boot] [PATCH v3 21/26] fs-test: fix false positive error at Test Case 12

2018-09-11 Thread Akashi, Takahiro
From: AKASHI Takahiro The error message to be matched is wrong. Fix it. Signed-off-by: AKASHI Takahiro --- test/fs/fs-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/fs/fs-test.sh b/test/fs/fs-test.sh index 9482239562ea..e002b9105131 100755 --- a/test/fs/fs

[U-Boot] [PATCH v3 18/26] fs: fat: support unlink

2018-09-11 Thread Akashi, Takahiro
From: AKASHI Takahiro In this patch, unlink support is added to FAT file system. A directory can be deleted only if it is empty. In this implementation, only a directory entry for a short file name will be removed. So entries for a long file name can and should be reclaimed with fsck. Signed

[U-Boot] [PATCH v3 19/26] cmd: fat: add fatrm command

2018-09-11 Thread Akashi, Takahiro
From: AKASHI Takahiro In this patch, a new command, fatrm, is added so as to delete a file or directory. Signed-off-by: AKASHI Takahiro --- cmd/fat.c | 12 1 file changed, 12 insertions(+) diff --git a/cmd/fat.c b/cmd/fat.c index b685bf70a2b3..4b9a7eaab054 100644 --- a/cmd/fat.c

[U-Boot] [PATCH v3 06/26] fs: fat: check and normalize file name

2018-09-11 Thread Akashi, Takahiro
From: AKASHI Takahiro FAT file system's long file name support is a bit complicated and has some restrictions on its naming. We should be careful about it especially for write as it may easily end up with wrong file system. normalize_longname() check for the rules and normalize a file name

[U-Boot] [PATCH v3 09/26] fs: fat: refactor write interface for a file offset

2018-09-11 Thread Akashi, Takahiro
From: AKASHI Takahiro The current write implementation is quite simple: remove existing clusters and then allocating new ones and filling them with data. This, inevitably, enforces always writing from the beginning of a file. As the first step to lift this restriction, fat_file_write

[U-Boot] [PATCH v3 05/26] Revert "fs: fat: cannot write to subdirectories"

2018-09-11 Thread Akashi, Takahiro
From: AKASHI Takahiro This reverts commit 0dc1bfb7302d220a48364263d5632d6d572b069b. The succeeding patch series will supersede it. Signed-off-by: AKASHI Takahiro --- fs/fat/fat_write.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/fs/fat/fat_write.c b/fs

[U-Boot] [PATCH v3 12/26] fs: add mkdir interface

2018-09-11 Thread Akashi, Takahiro
From: AKASHI Takahiro "mkdir" interface is added to file operations. This is a preparatory change as mkdir support for FAT file system will be added in next patch. Signed-off-by: AKASHI Takahiro --- fs/fs.c | 45 + include

[U-Boot] [PATCH v3 23/26] test/py: convert fs-test.sh to pytest

2018-09-11 Thread Akashi, Takahiro
From: AKASHI Takahiro In this commit, the same set of test cases as in test/fs/fs-test.sh is provided using pytest framework. Actually, fs-test.sh provides three variants:"sb" (sb command), "nonfs" (fatxx and etc.) and "fs" (hostfs), and this patch currently sup

[U-Boot] [PATCH v3 26/26] test/py: fs: add fstest/unlink test

2018-09-11 Thread Akashi, Takahiro
In this commit, test cases for unlink interfaces are added as part of "test_fs" test suite. Signed-off-by: AKASHI Takahiro --- test/py/tests/test_fs/conftest.py| 62 +++ test/py/tests/test_fs/test_unlink.py | 109 +++ 2 files changed, 171

[U-Boot] [PATCH v3 20/26] efi_loader: implement a file delete

2018-09-11 Thread Akashi, Takahiro
From: AKASHI Takahiro 'Delete' will be implemented here by calling fs_unlink() which relies on underlying file system's implementation. Signed-off-by: AKASHI Takahiro --- lib/efi_loader/efi_file.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib

[U-Boot] [PATCH v3 00/26] subject: fs: fat: extend FAT write operations

2018-09-11 Thread Akashi, Takahiro
ipts with pytest, mostly the same as RFC, but removing "sudo" for ext4 case AKASHI Takahiro (25): fs: fat: guard the content of include/fat.h fs: fat: extend get_fs_info() for write use fs: fat: handle "." and ".." of root dir correctly with fat_itr_resolve()

[U-Boot] [PATCH v3 01/26] fs: fat: guard the content of include/fat.h

2018-09-11 Thread Akashi, Takahiro
From: AKASHI Takahiro The whole content of include/fat.h is private to FAT implementation and then should be guarded with CONFIG_FS_FAT. Signed-off-by: AKASHI Takahiro --- include/fat.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/fat.h b/include/fat.h index 09e142368585

[U-Boot] [PATCH v3 02/26] fs: fat: extend get_fs_info() for write use

2018-09-11 Thread Akashi, Takahiro
From: AKASHI Takahiro get_fs_info() was introduced in major re-work of read operation by Rob. We want to reuse this function in write operation by extending it with additional members in fsdata structure. Signed-off-by: AKASHI Takahiro --- fs/fat/fat.c | 7 +++ include/fat.h | 2 ++ 2

[U-Boot] [PATCH v3 15/26] cmd: fat: add fatmkdir command

2018-09-11 Thread Akashi, Takahiro
From: AKASHI Takahiro In this patch, a new command, fatmkdir, is added. Please note that, as there is no notion of "current directory" on u-boot, a directory name specified must contains an absolute directory path as a parent directory. Otherwise, "/" (root directory) is

[U-Boot] [PATCH v3 22/26] fs-test: update the test result as of v2018.09

2018-09-11 Thread Akashi, Takahiro
From: AKASHI Takahiro As far as this patch series has been applied, all the tests should pass. So update the test result summary. Signed-off-by: AKASHI Takahiro --- test/fs/fs-test.sh | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/test/fs/fs

[U-Boot] [PATCH v3 17/26] fs: add unlink interface

2018-09-11 Thread Akashi, Takahiro
From: AKASHI Takahiro "unlink" interface is added to file operations. This is a preparatory change as unlink support for FAT file system will be added in next patch. Signed-off-by: AKASHI Takahiro --- fs/fs.c | 40 include

Re: [U-Boot] [PATCH v2 2/2] arm: qemu-arm: enable PL031 (RTC) in defconfig

2018-07-05 Thread AKASHI Takahiro
On Wed, Jul 04, 2018 at 12:25:34PM +0200, Heinrich Schuchardt wrote: > On 07/04/2018 10:56 AM, Alexander Graf wrote: > > On 07/04/2018 09:36 AM, AKASHI Takahiro wrote: > >> Signed-off-by: AKASHI Takahiro > >> --- > >>   configs/qemu_arm64_defconfig | 2 ++ >

Re: [U-Boot] [PATCH v2 1/2] rtc: pl031: convert the driver to driver model

2018-07-05 Thread AKASHI Takahiro
On Wed, Jul 04, 2018 at 10:53:34AM +0200, Alexander Graf wrote: > On 07/04/2018 09:36 AM, AKASHI Takahiro wrote: > > This patch is missing a patch description. I'm not the maintainer of the rtc > code base so it's not my call, but I personally just reject all patches with &

Re: [U-Boot] [PATCH v2 1/2] rtc: pl031: convert the driver to driver model

2018-07-05 Thread AKASHI Takahiro
On Wed, Jul 04, 2018 at 02:35:19PM +0300, Tuomas Tynkkynen wrote: > Hi Akashi, > > Thank you for the DM conversion. > > On 07/04/2018 10:36 AM, AKASHI Takahiro wrote: > <..snip..> > >diff --git a/include/dm/platform_data/rtc_pl031.h > >b/include/dm/platfo

Re: [U-Boot] [PATCH v2 1/2] rtc: pl031: convert the driver to driver model

2018-07-05 Thread AKASHI Takahiro
On Wed, Jul 04, 2018 at 12:50:52PM +0200, Heinrich Schuchardt wrote: > On 07/04/2018 09:36 AM, AKASHI Takahiro wrote: > > Signed-off-by: AKASHI Takahiro > > --- > > drivers/rtc/Kconfig | 6 ++ > > drivers/rtc/pl0

[U-Boot] [PATCH v2 2/2] arm: qemu-arm: enable PL031 (RTC) in defconfig

2018-07-04 Thread AKASHI Takahiro
Signed-off-by: AKASHI Takahiro --- configs/qemu_arm64_defconfig | 2 ++ configs/qemu_arm_defconfig | 2 ++ 2 files changed, 4 insertions(+) diff --git a/configs/qemu_arm64_defconfig b/configs/qemu_arm64_defconfig index cdf5072fe4..f3e3963860 100644 --- a/configs/qemu_arm64_defconfig +++ b

[U-Boot] [PATCH v2 1/2] rtc: pl031: convert the driver to driver model

2018-07-04 Thread AKASHI Takahiro
Signed-off-by: AKASHI Takahiro --- drivers/rtc/Kconfig | 6 ++ drivers/rtc/pl031.c | 109 +-- include/dm/platform_data/rtc_pl031.h | 12 +++ 3 files changed, 87 insertions(+), 40 deletions(-) create mode 100644 include/dm

[U-Boot] [PATCH v2 0/2] arm: qemu-arm: enable PL031 (RTC)

2018-07-04 Thread AKASHI Takahiro
AKASHI Takahiro (2): rtc: pl031: convert the driver to driver model arm: qemu-arm: enable PL031 (RTC) in defconfig configs/qemu_arm64_defconfig | 2 + configs/qemu_arm_defconfig | 2 + drivers/rtc/Kconfig | 6 ++ drivers/rtc/pl031.c | 109

Re: [U-Boot] [PATCH v2 1/2] rtc: pl031: convert the driver to driver model

2018-07-08 Thread AKASHI Takahiro
On Thu, Jul 05, 2018 at 04:12:59PM +0900, AKASHI Takahiro wrote: > On Wed, Jul 04, 2018 at 02:35:19PM +0300, Tuomas Tynkkynen wrote: > > Hi Akashi, > > > > Thank you for the DM conversion. > > > > On 07/04/2018 10:36 AM, AKASHI Takahiro wrote: > >

[U-Boot] [PATCH v3 2/3] rtc: pl031: convert the driver to driver model

2018-07-11 Thread AKASHI Takahiro
With this patch, PL031 driver is converted to driver-model-compliant driver. In addition, CONFIG_SYS_RTC_PL031_BASE is no longer valid. Signed-off-by: AKASHI Takahiro --- drivers/rtc/Kconfig | 6 ++ drivers/rtc/pl031.c | 126 ++- scripts

[U-Boot] [PATCH v3 1/3] rtc: compile date.c if DM_RTC

2018-07-11 Thread AKASHI Takahiro
rtc_to_tm() and rtc_mktime() are required for some RTC drivers, at least PL031. Without this patch, we also need to enable CONFIG_CMD_DATE even if we don't want or need this command. Signed-off-by: AKASHI Takahiro --- drivers/rtc/date.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion

[U-Boot] [PATCH v3 0/3] subject: arm: qemu-arm: enable PL031 (RTC)

2018-07-11 Thread AKASHI Takahiro
config_whitelist.txt * enable RTC_PL031 for QEMU_ARM in arch/arm/Kconfig Changes in v2 (July 4, 2018) * based on Heinrich's comments, * remove legacy mode interface * enable the driver in defconfig AKASHI Takahiro (3): rtc: compile date.c if DM_RTC rtc: pl031: convert the driver to driver model arm

[U-Boot] [PATCH v3 3/3] arm: qemu-arm: enable RTC (PL031) by default

2018-07-11 Thread AKASHI Takahiro
Virtual machine provided by qemu-arm has a ARM PL031 Real Time Clock device. With this patch, the driver is enabled by default. Signed-off-by: AKASHI Takahiro --- arch/arm/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 00b28480b4

Re: [U-Boot] [PATCH v3 01/26] fs: fat: guard the content of include/fat.h

2018-09-11 Thread Akashi, Takahiro
On Tue, Sep 11, 2018 at 12:12:53PM +0200, Alexander Graf wrote: > > > On 11.09.18 08:58, Akashi, Takahiro wrote: > > From: AKASHI Takahiro > > > > The whole content of include/fat.h is private to FAT implementation > > and then should be guarded with C

  1   2   3   4   5   6   7   8   9   10   >