Re: [U-Boot] [rockchip/rk3399-rockpro64] Upstream doesn't have support for SD card/USB3.0?

2019-04-19 Thread Qu Wenruo
On 2019/4/19 下午2:08, Qu Wenruo wrote: > Hi, > > Sorry if the problem is too newbie, but I tried to build upstream U-boot > for RockPro64 (which uses RK3399 SoC) using the evb-rk3399 defconfig. > > My adventure starts good, it boots properly. However SDMMC doesn't work > (

[U-Boot] [rockchip/rk3399-rockpro64] Upstream doesn't have support for SD card/USB3.0?

2019-04-19 Thread Qu Wenruo
Hi, Sorry if the problem is too newbie, but I tried to build upstream U-boot for RockPro64 (which uses RK3399 SoC) using the evb-rk3399 defconfig. My adventure starts good, it boots properly. However SDMMC doesn't work ("Card did not respond to voltage select!"). USB only detects two USB2.0

[U-Boot] RK3399 boards (rockpi4 and rockpro64) kernel SError using upstream U-boot

2019-11-08 Thread Qu Wenruo
Hi, Although recent U-boot upstream has merged the rk3399 ram patchset to initial DDR4 properly, but strangely I can still trigger SError for RockPi4 and RockPro64 boards using upstream U-boot with upstream kernel (v5.4-rc). The dmesg is attached at the end. This is pretty easy to trigger if

Re: [U-Boot] RK3399 boards (rockpi4 and rockpro64) kernel SError using upstream U-boot

2019-11-09 Thread Qu Wenruo
On 2019/11/9 下午8:25, Jagan Teki wrote: > On Sat, Nov 9, 2019 at 12:08 PM Qu Wenruo wrote: >> >> Hi, >> >> Although recent U-boot upstream has merged the rk3399 ram patchset to >> initial DDR4 properly, but strangely I can still trigger SError for >> RockPi

Re: [U-Boot] RK3399 boards (rockpi4 and rockpro64) kernel SError using upstream U-boot

2019-11-09 Thread Qu Wenruo
On 2019/11/9 下午9:45, Jagan Teki wrote: > On Sat, Nov 9, 2019 at 6:48 PM Qu Wenruo wrote: >> >> >> >> On 2019/11/9 下午8:25, Jagan Teki wrote: >>> On Sat, Nov 9, 2019 at 12:08 PM Qu Wenruo wrote: >>>> >>>> Hi, >>>>

Re: [U-Boot] RK3399 boards (rockpi4 and rockpro64) kernel SError using upstream U-boot

2019-11-17 Thread Qu Wenruo
On 2019/11/18 上午10:51, Kever Yang wrote: > Hi Qu Wenruo, > > >     Please try with latest u-boot-rockchip with dram and board fix merged: > > https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip.git master branch Thanks, I'll take a try if it can compile on Arch, (as d

Re: [U-Boot] RK3399 boards (rockpi4 and rockpro64) kernel SError using upstream U-boot

2019-11-17 Thread Qu Wenruo
On 2019/11/18 上午10:51, Kever Yang wrote: > Hi Qu Wenruo, > > >     Please try with latest u-boot-rockchip with dram and board fix merged: > > https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip.git master branch Compiled and installed, and still the same SError try

Re: [U-Boot] RK3399 boards (rockpi4 and rockpro64) kernel SError using upstream U-boot

2019-11-15 Thread Qu Wenruo
t 6:48 PM Qu Wenruo wrote: >> >> >> >> On 2019/11/9 下午8:25, Jagan Teki wrote: >>> On Sat, Nov 9, 2019 at 12:08 PM Qu Wenruo wrote: >>>> >>>> Hi, >>>> >>>> Although recent U-boot upstream has merged the rk3399

Re: [U-Boot] RK3399 boards (rockpi4 and rockpro64) kernel SError using upstream U-boot

2019-11-15 Thread Qu Wenruo
On 2019/11/15 下午6:37, Qu Wenruo wrote: > A small update to this bug. > > I'm using mem=3584M kernel cmdline, to sacrifice 512M memory. > > And then surprise, memtest 3G works. (Originally it's 4G physical ram > and 3584M memtest. > > Hopes this could provide some

Re: [U-Boot] RK3399 boards (rockpi4 and rockpro64) kernel SError using upstream U-boot

2019-11-15 Thread Qu Wenruo
On 2019/11/15 下午10:07, Soeren Moch wrote: > >> On 2019/11/15 下午6:37, Qu Wenruo wrote: >>> A small update to this bug. >>> >>> I'm using mem=3584M kernel cmdline, to sacrifice 512M memory. >>> >>> And then surprise, memtest 3G works.

Re: [U-Boot] RK3399 boards (rockpi4 and rockpro64) kernel SError using upstream U-boot

2019-11-15 Thread Qu Wenruo
On 2019/11/16 下午1:16, Qu Wenruo wrote: > > > On 2019/11/15 下午10:59, Anand Moon wrote: >> Hi Qu Wenruo, >> >> On Fri, 15 Nov 2019 at 17:27, Qu Wenruo wrote: >>> >>> >>> >>> On 2019/11/15 下午6:37, Qu Wenruo wrote: >>>&g

Re: [U-Boot] RK3399 boards (rockpi4 and rockpro64) kernel SError using upstream U-boot

2019-11-15 Thread Qu Wenruo
On 2019/11/15 下午10:59, Anand Moon wrote: > Hi Qu Wenruo, > > On Fri, 15 Nov 2019 at 17:27, Qu Wenruo wrote: >> >> >> >> On 2019/11/15 下午6:37, Qu Wenruo wrote: >>> A small update to this bug. >>> >>> I'm using mem=3584M kernel

Re: [U-Boot] [PATCH v3 00/57] ram: rk3399: Add LPDDR4 support

2019-10-05 Thread Qu Wenruo
On 2019/7/16 下午7:56, Jagan Teki wrote: > This is next revison of lpddr4 support on rk3399 compared to > previous set[1]. It has some changes based on the commit orders > and squashing few patches together and rest is same. > > Thanks to > - YouMin Chen > - Akash Gajjar > - Kever Yang > for

Re: [U-Boot] [PATCH v3 00/57] ram: rk3399: Add LPDDR4 support

2019-10-05 Thread Qu Wenruo
On 2019/10/6 上午9:05, Qu Wenruo wrote: > > > On 2019/7/16 下午7:56, Jagan Teki wrote: >> This is next revison of lpddr4 support on rk3399 compared to >> previous set[1]. It has some changes based on the commit orders >> and squashing few patches together and

Re: [U-Boot] Uboot is rejecting valid initramfs (compressed cpio) with "Wrong Ramdisk Image Format"

2019-10-12 Thread Qu Wenruo
On 2019/10/12 下午6:52, Qu Wenruo wrote: > Hi, > > I'm using initramfs (gzipped cpio) to boot my board (RockPi4). > > The problem is, if initramfs is loaded other than old initrd, booti > command will just fail with "Wrong Ramdisk Image Format". Well, it looks like

Re: [U-Boot] [PATCH v3 00/57] ram: rk3399: Add LPDDR4 support

2019-10-12 Thread Qu Wenruo
it boots but could easily hit SError memory error. Great work! Thanks, Qu > > - Kever > > On 2019/10/6 上午9:30, Qu Wenruo wrote: >> >> On 2019/10/6 上午9:05, Qu Wenruo wrote: >>> >>> On 2019/7/16 下午7:56, Jagan Teki wrote: >>>> This is next revis

[U-Boot] Uboot is rejecting valid initramfs (compressed cpio) with "Wrong Ramdisk Image Format"

2019-10-12 Thread Qu Wenruo
Hi, I'm using initramfs (gzipped cpio) to boot my board (RockPi4). The problem is, if initramfs is loaded other than old initrd, booti command will just fail with "Wrong Ramdisk Image Format". I'm currently working it around by not using initramfs/initrd, and compile the fs module into the

Btrfs and endian convert

2020-04-09 Thread Qu Wenruo
Hi Marek, I respect your independent implementation of btrfs inside U-boot, but it looks like the code is too creative, other than follow the regular btrfs code. One of the biggest problem is, there is no convert of on-disk endian and in-memory endian. The most obvious proof is the lack of

Re: Btrfs and endian convert

2020-04-09 Thread Qu Wenruo
On 2020/4/9 下午2:27, Qu Wenruo wrote: > Hi Marek, > > I respect your independent implementation of btrfs inside U-boot, but it > looks like the code is too creative, other than follow the regular btrfs > code. > > One of the biggest problem is, there is no conv

Re: Btrfs and endian convert

2020-04-09 Thread Qu Wenruo
On 2020/4/9 下午9:24, Marek Behun wrote: > On Thu, 9 Apr 2020 14:53:47 +0800 > Qu Wenruo wrote: > >> On 2020/4/9 下午2:27, Qu Wenruo wrote: >>> Hi Marek, >>> >>> I respect your independent implementation of btrfs inside U-boot, but it >>> loo

[PATCH U-BOOT v2 0/3] fs: btrfs: Fix false LZO decompression error due to missing page boundary check

2020-03-25 Thread Qu Wenruo
tons of immediate codes. Changelog: v2: - Fix code style problems - Add a new patch to reject non-page-sized sector size Since kernel does the same thing, and non-4K page size u-boot boards are really rare, it shouldn't be a big problem. Qu Wenruo (3): fs: btrfs: Use LZO_LEN to replace

[PATCH U-BOOT v2 1/3] fs: btrfs: Use LZO_LEN to replace immediate number

2020-03-25 Thread Qu Wenruo
Just a cleanup. These immediate numbers make my eyes hurt. Signed-off-by: Qu Wenruo Cc: Marek Behun --- fs/btrfs/compression.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index 346875d45a1b

[PATCH U-BOOT v2 2/3] fs: btrfs: Reject fs with sector size other than PAGE_SIZE

2020-03-25 Thread Qu Wenruo
is also the most common sector size for btrfs, rejecting fs with non-page-sized sector size shouldn't cause much problem. This should only be a quick fix before we implement better sector size support. Signed-off-by: Qu Wenruo Cc: Marek Behun --- fs/btrfs/super.c | 8 1 file changed, 8

[PATCH U-BOOT v2 3/3] fs: btrfs: Fix LZO false decompression error caused by pending zero

2020-03-25 Thread Qu Wenruo
ng headers), and do proper page boundary skip to fix it. Please note that, current code base doesn't parse fs_info thus we can't grab sector size easily, so it uses PAGE_SIZE, and relying on fs open time check to exclude unsupported sector size. Signed-off-by: Qu Wenruo Cc: Marek Behun ---

Re: [PATCH 2/2] uboot: fs/btrfs: Fix LZO false decompression error caused by pending zero

2020-03-25 Thread Qu Wenruo
On 2020/3/25 下午4:09, Marek Behun wrote: > On Thu, 19 Mar 2020 20:33:19 +0800 > Qu Wenruo wrote: > >> [BUG] > > The subject line should not contain uboot keyword. If you check git log > for fs/btrfs, the commits always start with: > fs: btrfs: > > A

Re: [PATCH 2/2] uboot: fs/btrfs: Fix LZO false decompression error caused by pending zero

2020-03-25 Thread Qu Wenruo
On 2020/3/25 下午7:00, Marek Behun wrote: > On Wed, 25 Mar 2020 16:27:16 +0800 > Qu Wenruo wrote: > >> On 2020/3/25 下午4:09, Marek Behun wrote: >>> On Thu, 19 Mar 2020 20:33:19 +0800 >>> Qu Wenruo wrote: >>> >>>> [BUG] >>> >

[PATCH U-BOOT 02/26] fs: btrfs: Add More checksum algorithm support to btrfs

2020-04-22 Thread Qu Wenruo
for the following csums: - SHA256 - XXHASH Signed-off-by: Qu Wenruo --- fs/btrfs/Makefile | 2 +- fs/btrfs/btrfs.c | 3 ++- fs/btrfs/btrfs.h | 11 - fs/btrfs/crypto/hash.c | 55 ++ fs/btrfs/crypto/hash.h | 17 + fs/btrfs/dir

[PATCH U-BOOT 07/26] fs: btrfs: Cross port structure accessor into ctree.h

2020-04-22 Thread Qu Wenruo
-by: Qu Wenruo --- fs/btrfs/compat.h | 14 + fs/btrfs/ctree.h | 1136 fs/btrfs/disk-io.h |9 - 3 files changed, 1064 insertions(+), 95 deletions(-) diff --git a/fs/btrfs/compat.h b/fs/btrfs/compat.h index 376a035cd6db..64e8b8ab3dfb 100644

[PATCH U-BOOT 00/26] fs: btrfs: Re-implement btrfs support using the more widely used extent buffer base code

2020-04-22 Thread Qu Wenruo
the following 5 patches need extra review attention: - Patch 0017 - Patch 0018 - Patch 0022 - Patch 0023 - Patch 0024 Qu Wenruo (26): fs: btrfs: Sync btrfs_btree.h from kernel fs: btrfs: Add More checksum algorithm support to btrfs fs: btrfs: Cross-port btrfs_read_dev_super() from btrfs-progs fs

[PATCH U-BOOT 21/26] fs: btrfs: Rename btrfs_file_read() and its callees to avoid name conflicts

2020-04-22 Thread Qu Wenruo
Signed-off-by: Qu Wenruo --- fs/btrfs/btrfs.c | 2 +- fs/btrfs/btrfs.h | 6 +++--- fs/btrfs/extent-io.c | 4 ++-- fs/btrfs/inode.c | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/fs/btrfs/btrfs.c b/fs/btrfs/btrfs.c index 8d1dee2f73c4..3916696ab909 100644

[PATCH U-BOOT 19/26] fs: btrfs: Use btrfs_iter_dir() to replace btrfs_readdir()

2020-04-22 Thread Qu Wenruo
the unknown type If the DIR_ITEM is corrupted, at least don't try to access the memory out of bounday. Signed-off-by: Qu Wenruo --- fs/btrfs/btrfs.c| 157 +++- fs/btrfs/btrfs.h| 5 -- fs/btrfs/ctree.h| 5 ++ fs/btrfs/dir-item.c | 68

[PATCH U-BOOT 20/26] fs: btrfs: Use btrfs_lookup_path() to implement btrfs_exists() and btrfs_size()

2020-04-22 Thread Qu Wenruo
The remaining function that still utilize __btrfs_lookup_path() is btrfs_read(). Signed-off-by: Qu Wenruo --- fs/btrfs/btrfs.c | 65 +++- fs/btrfs/inode.c | 1 - 2 files changed, 48 insertions(+), 18 deletions(-) diff --git a/fs/btrfs/btrfs.c b/fs

[PATCH U-BOOT 22/26] fs: btrfs: Introduce btrfs_read_extent_inline() and btrfs_read_extent_reg()

2020-04-22 Thread Qu Wenruo
These two functions are used to do sector aligned read, which will be later used to implement btrfs_file_read(). Signed-off-by: Qu Wenruo --- fs/btrfs/ctree.h | 5 ++ fs/btrfs/disk-io.c | 36 ++ fs/btrfs/disk-io.h | 2 + fs/btrfs/inode.c | 162

[PATCH U-BOOT 17/26] fs: btrfs: Use btrfs_readlink() to implement __btrfs_readlink()

2020-04-22 Thread Qu Wenruo
The existing __btrfs_readlink() can be easily re-implemented using the extent buffer based btrfs_readlink(). This should be the first step to re-implement u-boot btrfs code. Signed-off-by: Qu Wenruo --- fs/btrfs/btrfs.h | 1 + fs/btrfs/inode.c | 100

[PATCH U-BOOT 23/26] fs: btrfs: Introduce lookup_data_extent() for later use

2020-04-22 Thread Qu Wenruo
Signed-off-by: Qu Wenruo --- fs/btrfs/inode.c | 101 +++ 1 file changed, 101 insertions(+) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 986b9347b012..3332055ff840 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -814,3 +814,104 @@ out

[PATCH U-BOOT 26/26] MAINTAINERS: Add btrfs mail list

2020-04-22 Thread Qu Wenruo
Since the current code base is mostly from btrfs-progs, anyone contributing to U-boot btrfs code could also help us to improve btrfs-progs and btrfs kernel module. Signed-off-by: Qu Wenruo --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index

Re: [PATCH U-BOOT 00/26] fs: btrfs: Re-implement btrfs support using the more widely used extent buffer base code

2020-04-22 Thread Qu Wenruo
On 2020/4/22 下午3:59, Marek Behun wrote: > Also there are some warnings when compiling for Mox and Omnia: > > > > > fs/btrfs/inode.c: In function ‘btrfs_lookup_path’: > fs/btrfs/inode.c:141:16: warning: ‘parent_root’ may be used uninitialized in > this function [-Wmaybe-uninitialized] >

[PATCH U-BOOT 18/26] fs: btrfs: Implement btrfs_lookup_path()

2020-04-22 Thread Qu Wenruo
, there is no need to check root backref, this make the code a little easier to read. Signed-off-by: Qu Wenruo --- fs/btrfs/ctree.h| 4 + fs/btrfs/dir-item.c | 106 +++ fs/btrfs/inode.c| 245 3 files changed, 355 insertions

[PATCH U-BOOT 09/26] fs: btrfs: Crossport read_tree_block() from btrfs-progs

2020-04-22 Thread Qu Wenruo
This is the one of the base stone function for btrfs, which will: - Do the chunk mapping resolve - Read data from disk - Do various sanity check WIth read_tree_block(), we can finally cross port needed btrfs btree operations to U-boot. Signed-off-by: Qu Wenruo --- fs/btrfs/ctree.c | 188

[PATCH U-BOOT 12/26] fs: btrfs: Cross port struct btrfs_root to ctree.h

2020-04-22 Thread Qu Wenruo
With write related members deleted. Signed-off-by: Qu Wenruo --- fs/btrfs/ctree.h | 17 + 1 file changed, 17 insertions(+) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index f068db6505e0..e8dcab1a0b5d 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -68,6 +68,23

[PATCH U-BOOT 06/26] fs: btrfs: Cross-port extent-io.[ch] from btrfs-progs

2020-04-22 Thread Qu Wenruo
This cross port brings the extent_io_tree infrastructure, with that we could finally bring in proper btrfs_fs_info structure to ctree.h. Also with read/write_extent_buffer() implemented, also backport read/write_eb_member() to ctree.h. Signed-off-by: Qu Wenruo --- fs/btrfs/Makefile| 2

[PATCH U-BOOT 05/26] fs: btrfs: Cross-port extent-cache.[ch] from btrfs-progs

2020-04-22 Thread Qu Wenruo
This patch implements an infrastructure to insert/search/merge an extent range (with variable length). This provides the basis for later extent buffer cache used in btrfs. Signed-off-by: Qu Wenruo --- fs/btrfs/extent-cache.c | 318 fs/btrfs/extent

[PATCH U-BOOT 10/26] fs: btrfs: Rename struct btrfs_path to struct __btrfs_path

2020-04-22 Thread Qu Wenruo
To avoid name conflicting between the extent buffer based btrfs_path from btrfs-progs. Also rename btrfs_free_path() to __btrfs_free_path() to avoid conflicts. Signed-off-by: Qu Wenruo --- fs/btrfs/btrfs.h | 4 ++-- fs/btrfs/chunk-map.c | 4 ++-- fs/btrfs/ctree.c | 16

[PATCH U-BOOT 08/26] fs: btrfs: Cross port volumes.[ch] from btrfs-progs

2020-04-22 Thread Qu Wenruo
btrfs device to the list. This is the main part of the multi-device btrfs assembling process. Although we're not going to support multiple devices until U-boot allows us to scan one device without actually opening it. Signed-off-by: Qu Wenruo --- fs/btrfs/Makefile | 2 +- fs/btrfs/compat.h

[PATCH U-BOOT 03/26] fs: btrfs: Cross-port btrfs_read_dev_super() from btrfs-progs

2020-04-22 Thread Qu Wenruo
created after btrfs. Just like kernel, we only check the primary super block. Signed-off-by: Qu Wenruo --- fs/btrfs/Makefile | 2 +- fs/btrfs/btrfs.c | 1 + fs/btrfs/compat.h | 56 ++ fs/btrfs/ctree.c | 32 ++ fs/btrfs/ctree.h | 67 fs/btrfs/disk-io.c | 213

[PATCH U-BOOT 04/26] fs: btrfs: Cross-port rbtree-utils from btrfs-progs

2020-04-22 Thread Qu Wenruo
This is needed for incoming extent-cache infrastructure. Signed-off-by: Qu Wenruo --- fs/btrfs/Makefile | 3 +- fs/btrfs/common/rbtree-utils.c | 83 ++ fs/btrfs/common/rbtree-utils.h | 53 ++ 3 files changed, 138 insertions(+), 1

Re: [PATCH U-BOOT 00/26] fs: btrfs: Re-implement btrfs support using the more widely used extent buffer base code

2020-04-22 Thread Qu Wenruo
On 2020/4/22 下午3:52, Qu Wenruo wrote: > > > On 2020/4/22 下午3:46, Marek Behun wrote: >> On Wed, 22 Apr 2020 14:49:43 +0800 >> Qu Wenruo wrote: >> >> Hi Qu, >> >>> The current btrfs code in U-boot is using a creative way to read on-disk >&

Re: [PATCH U-BOOT 03/26] fs: btrfs: Cross-port btrfs_read_dev_super() from btrfs-progs

2020-04-22 Thread Qu Wenruo
On 2020/4/22 下午4:26, Marek Behun wrote: > On Wed, 22 Apr 2020 14:49:46 +0800 > Qu Wenruo wrote: > >> +/* A simple wraper to for error() from btrfs-progs */ >> +#define error(...) { printf(__VA_ARGS__); printf("\n"); } > > Is this from btrfs-progs?

[PATCH U-BOOT 01/26] fs: btrfs: Sync btrfs_btree.h from kernel

2020-04-22 Thread Qu Wenruo
port. Signed-off-by: Qu Wenruo --- fs/btrfs/btrfs.c|3 +- fs/btrfs/btrfs_tree.h | 766 --- fs/btrfs/ctree.h| 214 + fs/btrfs/inode.c|5 +- fs/btrfs/kernel-shared/btrfs_tree.h | 1333

[PATCH U-BOOT 24/26] fs: btrfs: Implement btrfs_file_read()

2020-04-22 Thread Qu Wenruo
, then decompress the whole extent, then only copy the referred part. Signed-off-by: Qu Wenruo --- fs/btrfs/btrfs.c | 42 -- fs/btrfs/btrfs.h | 2 + fs/btrfs/inode.c | 146 +++ 3 files changed, 173 insertions(+), 17 deletions(-) diff --git

[PATCH U-BOOT 25/26] fs: btrfs: Cleanup the old implementation

2020-04-22 Thread Qu Wenruo
Signed-off-by: Qu Wenruo --- fs/btrfs/Makefile | 4 +- fs/btrfs/btrfs.c | 31 fs/btrfs/btrfs.h | 47 -- fs/btrfs/chunk-map.c | 177 -- fs/btrfs/compression.c | 2 +- fs/btrfs/ctree.c | 290 fs/btrfs

[PATCH U-BOOT 14/26] fs: btrfs: Crossport btrfs_read_sys_array() and btrfs_read_chunk_tree()

2020-04-22 Thread Qu Wenruo
These two functions play a big role in btrfs bootstrap. The following function is removed: - Seed device support Although in theory we can still support multiple devices, we don't have a facility in U-boot to do device scan without opening them. Signed-off-by: Qu Wenruo --- fs/btrfs/btrfs.c

[PATCH U-BOOT 15/26] fs: btrfs: Crossport open_ctree_fs_info()

2020-04-22 Thread Qu Wenruo
flags There will not be multiple open ctree modes in uboot. Otherwise the function structure are all kept the same. With open_ctree_fs_info() implemented, also introduce the global current_fs_info pointer to show the current opened btrfs. Signed-off-by: Qu Wenruo --- fs/btrfs/Makefile

[PATCH U-BOOT 11/26] fs: btrfs: Rename btrfs_root to __btrfs_root

2020-04-22 Thread Qu Wenruo
This is to avoid naming conflicts between extent buffer based btrfs_root. Signed-off-by: Qu Wenruo --- fs/btrfs/btrfs.c | 10 +- fs/btrfs/btrfs.h | 26 +- fs/btrfs/ctree.c | 2 +- fs/btrfs/ctree.h | 6 +++--- fs/btrfs/dir-item.c | 4 ++-- fs

[PATCH U-BOOT 13/26] fs: btrfs: Crossport btrfs_search_slot() from btrfs-progs

2020-04-22 Thread Qu Wenruo
. Remove it completely. With the core function in place, btrfs developers should feel at home now. This also crossports supportive codes like btrfs_previous_item() to ctree.[ch]. Signed-off-by: Qu Wenruo --- fs/btrfs/ctree.c | 536 ++- fs/btrfs/ctree.h

[PATCH U-BOOT 16/26] fs: btrfs: Rename path resolve related functions to avoid name conflicts

2020-04-22 Thread Qu Wenruo
Since the old code are all using __btrfs_path/__btrfs_root other than the regular extent buffer based one, adding "__" prefix for them to avoid name conflicts in the incoming cross ports. Signed-off-by: Qu Wenruo --- fs/btrfs/btrfs.c | 12 ++-- fs/btrfs/btrfs.

Re: [PATCH U-BOOT 00/26] fs: btrfs: Re-implement btrfs support using the more widely used extent buffer base code

2020-04-22 Thread Qu Wenruo
On 2020/4/22 下午3:46, Marek Behun wrote: > On Wed, 22 Apr 2020 14:49:43 +0800 > Qu Wenruo wrote: > > Hi Qu, > >> The current btrfs code in U-boot is using a creative way to read on-disk >> data. >> It's pretty simple, involving the least amount of code, but pre

[PATCH 1/2] uboot: fs/btrfs: Use LZO_LEN to replace immediate number

2020-03-19 Thread Qu Wenruo
Just a cleanup. The immediate number makes my eye hurt. Signed-off-by: Qu Wenruo --- fs/btrfs/compression.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index 346875d45a1b..4ef44ce11485 100644

[PATCH 2/2] uboot: fs/btrfs: Fix LZO false decompression error caused by pending zero

2020-03-19 Thread Qu Wenruo
ssed bytes (including headers), and do proper page boundary skip to fix it. Signed-off-by: Qu Wenruo --- fs/btrfs/compression.c | 20 1 file changed, 20 insertions(+) diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index 4ef44ce11485..2a6ac8bb1029 100644 ---

[PATCH 0/2] uboot: fs/btrfs: Fix read error on LZO compressed extents

2020-03-19 Thread Qu Wenruo
proper code from btrfs-progs, other than using tons of immediate numbers. Qu Wenruo (2): uboot: fs/btrfs: Use LZO_LEN to replace immediate number uboot: fs/btrfs: Fix LZO false decompression error caused by pending zero fs/btrfs/compression.c | 42

[PATCH 1/2] uboot: fs/btrfs: Use LZO_LEN to replace immediate number

2020-03-19 Thread Qu Wenruo
Just a cleanup. The immediate number makes my eye hurt. Signed-off-by: Qu Wenruo --- fs/btrfs/compression.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index 346875d45a1b..4ef44ce11485 100644

[PATCH 2/2] uboot: fs/btrfs: Fix LZO false decompression error caused by pending zero

2020-03-19 Thread Qu Wenruo
ssed bytes (including headers), and do proper page boundary skip to fix it. Signed-off-by: Qu Wenruo --- fs/btrfs/compression.c | 20 1 file changed, 20 insertions(+) diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index 4ef44ce11485..2a6ac8bb1029 100644 ---

[PATCH 0/2] uboot: fs/btrfs: Fix read error on LZO compressed extents

2020-03-19 Thread Qu Wenruo
proper code from btrfs-progs, other than using tons of immediate numbers. Qu Wenruo (2): uboot: fs/btrfs: Use LZO_LEN to replace immediate number uboot: fs/btrfs: Fix LZO false decompression error caused by pending zero fs/btrfs/compression.c | 42

Re: [PATCH 2/2] uboot: fs/btrfs: Fix LZO false decompression error caused by pending zero

2020-03-24 Thread Qu Wenruo
On 2020/3/20 上午12:28, David Sterba wrote: > On Thu, Mar 19, 2020 at 03:34:12PM +0100, Matthias Brugger wrote: >> >> >> On 19/03/2020 14:56, David Sterba wrote: >>> On Thu, Mar 19, 2020 at 02:33:28PM +0100, Matthias Brugger wrote: > dlen -= out_len; > > res +=

Re: [PATCH 2/2] uboot: fs/btrfs: Fix LZO false decompression error caused by pending zero

2020-03-24 Thread Qu Wenruo
On 2020/3/20 上午12:28, David Sterba wrote: > On Thu, Mar 19, 2020 at 03:34:12PM +0100, Matthias Brugger wrote: >> >> >> On 19/03/2020 14:56, David Sterba wrote: >>> On Thu, Mar 19, 2020 at 02:33:28PM +0100, Matthias Brugger wrote: > dlen -= out_len; > > res +=

Re: [PATCH U-BOOT v3 25/30] fs: btrfs: Implement btrfs_file_read()

2020-09-07 Thread Qu Wenruo
On 2020/9/8 上午6:35, Tom Rini wrote: > On Wed, Jun 24, 2020 at 06:03:11PM +0200, Marek Behún wrote: > >> From: Qu Wenruo >> >> This version of btrfs_file_read() has the following new features: >> - Tries all mirrors >> - More handling on unaligned size &g

Re: [PATCH U-BOOT v3 25/30] fs: btrfs: Implement btrfs_file_read()

2020-09-07 Thread Qu Wenruo
On 2020/9/8 上午8:56, Tom Rini wrote: > On Tue, Sep 08, 2020 at 08:26:27AM +0800, Qu Wenruo wrote: >> >> >> On 2020/9/8 上午6:35, Tom Rini wrote: >>> On Wed, Jun 24, 2020 at 06:03:11PM +0200, Marek Behún wrote: >>> >>>> From: Qu Wenruo >>&g

Re: [PATCH] fs: btrfs: Fix typo in error message

2020-10-12 Thread Qu Wenruo
On 2020/10/12 下午5:35, Naoki Hayama wrote: > %s/occured/occurred/ > > Signed-off-by: Naoki Hayama I'm definitely not the best guy to review, but this still looks good to me. Reviewed-by: Qu Wenruo BTW, if you're still looking into the spell problems, it would be better t

Using u-boot as arm64 uefi payload

2020-09-24 Thread Qu Wenruo
Hi, Is it possible to use U-boot as arm64 uefi payload? There are x86 uefi payload configs, but no for arm. It's rare to find a device with arm64 UEFI support, but if that's possible a lot of things can be simplified. Thanks, Qu

[PATCH U-BOOT v2 16/30] fs: btrfs: Rename path resolve related functions to avoid name conflicts

2020-05-25 Thread Qu Wenruo
Since the old code are all using __btrfs_path/__btrfs_root other than the regular extent buffer based one, adding "__" prefix for them to avoid name conflicts in the incoming cross ports. Signed-off-by: Qu Wenruo --- fs/btrfs/btrfs.c | 12 ++-- fs/btrfs/btrfs.

[PATCH U-BOOT v2 15/30] fs: btrfs: Crossport open_ctree_fs_info()

2020-05-25 Thread Qu Wenruo
flags There will not be multiple open ctree modes in uboot. Otherwise the function structure are all kept the same. With open_ctree_fs_info() implemented, also introduce the global current_fs_info pointer to show the current opened btrfs. Signed-off-by: Qu Wenruo --- fs/btrfs/Makefile

[PATCH U-BOOT v2 23/30] fs: btrfs: Introduce btrfs_read_extent_inline() and btrfs_read_extent_reg()

2020-05-25 Thread Qu Wenruo
These two functions are used to do sector aligned read, which will be later used to implement btrfs_file_read(). Signed-off-by: Qu Wenruo --- fs/btrfs/ctree.h | 5 ++ fs/btrfs/disk-io.c | 36 ++ fs/btrfs/disk-io.h | 2 + fs/btrfs/inode.c | 162

[PATCH U-BOOT v2 24/30] fs: btrfs: Introduce lookup_data_extent() for later use

2020-05-25 Thread Qu Wenruo
Signed-off-by: Qu Wenruo --- fs/btrfs/inode.c | 101 +++ 1 file changed, 101 insertions(+) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 36f6b90b058f..9a1b1d265bdd 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -819,3 +819,104 @@ out

[PATCH U-BOOT v2 26/30] fs: btrfs: Introduce function to reolve path in one subvolume

2020-05-25 Thread Qu Wenruo
This patch introduces a new function, get_path_in_subvolume(), which resolve inode number into path inside a subvolume. This function will be later used for btrfs subvolume list functionality. Signed-off-by: Qu Wenruo --- fs/btrfs/compat.h| 1 + fs/btrfs/subvolume.c | 68

[PATCH U-BOOT v2 25/30] fs: btrfs: Implement btrfs_file_read()

2020-05-25 Thread Qu Wenruo
, then decompress the whole extent, then only copy the referred part. Signed-off-by: Qu Wenruo --- fs/btrfs/btrfs.c | 48 +--- fs/btrfs/btrfs.h | 2 + fs/btrfs/inode.c | 146 +++ 3 files changed, 176 insertions(+), 20 deletions(-) diff

[PATCH U-BOOT v2 18/30] fs: btrfs: inode: Allow next_length() to return value > BTRFS_NAME_LEN

2020-05-25 Thread Qu Wenruo
ned-off-by: Qu Wenruo --- fs/btrfs/inode.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 007cf32c1603..da2a5e90a1bf 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -217,8 +217,12 @@ static u64 __get_parent_inode(str

[PATCH U-BOOT v2 03/30] fs: btrfs: Cross-port btrfs_read_dev_super() from btrfs-progs

2020-05-25 Thread Qu Wenruo
created after btrfs. Just like kernel, we only check the primary super block. Signed-off-by: Qu Wenruo --- fs/btrfs/Makefile | 2 +- fs/btrfs/btrfs.c | 1 + fs/btrfs/compat.h | 63 +++ fs/btrfs/ctree.c | 32 ++ fs/btrfs/ctree.h | 67 fs/btrfs/disk-io.c | 213

[PATCH U-BOOT v2 06/30] fs: btrfs: Cross-port extent-io.[ch] from btrfs-progs

2020-05-25 Thread Qu Wenruo
This cross port brings the extent_io_tree infrastructure, with that we could finally bring in proper btrfs_fs_info structure to ctree.h. Also with read/write_extent_buffer() implemented, also backport read/write_eb_member() to ctree.h. Signed-off-by: Qu Wenruo --- fs/btrfs/ctree.h | 55

[PATCH U-BOOT v2 08/30] fs: btrfs: Cross port volumes.[ch] from btrfs-progs

2020-05-25 Thread Qu Wenruo
btrfs device to the list. This is the main part of the multi-device btrfs assembling process. Although we're not going to support multiple devices until U-boot allows us to scan one device without actually opening it. Signed-off-by: Qu Wenruo --- fs/btrfs/Makefile | 2 +- fs/btrfs/compat.h

[PATCH U-BOOT v2 07/30] fs: btrfs: Cross port structure accessor into ctree.h

2020-05-25 Thread Qu Wenruo
-by: Qu Wenruo --- fs/btrfs/compat.h | 14 + fs/btrfs/ctree.h | 1136 fs/btrfs/disk-io.h |9 - 3 files changed, 1064 insertions(+), 95 deletions(-) diff --git a/fs/btrfs/compat.h b/fs/btrfs/compat.h index e7d7dc9f6e74..2bbe97779e99 100644

[PATCH U-BOOT v2 05/30] fs: btrfs: Cross-port extent-cache.[ch] from btrfs-progs

2020-05-25 Thread Qu Wenruo
This patch implements an infrastructure to insert/search/merge an extent range (with variable length). This provides the basis for later extent buffer cache used in btrfs. Signed-off-by: Qu Wenruo --- fs/btrfs/extent-cache.c | 318 fs/btrfs/extent

[PATCH U-BOOT v2 19/30] fs: btrfs: Implement btrfs_lookup_path()

2020-05-25 Thread Qu Wenruo
, there is no need to check root backref, this make the code a little easier to read. Signed-off-by: Qu Wenruo --- fs/btrfs/ctree.h| 4 + fs/btrfs/dir-item.c | 106 +++ fs/btrfs/inode.c| 245 3 files changed, 355 insertions

[PATCH U-BOOT v2 12/30] fs: btrfs: Cross port struct btrfs_root to ctree.h

2020-05-25 Thread Qu Wenruo
With write related members deleted. Signed-off-by: Qu Wenruo --- fs/btrfs/ctree.h | 17 + 1 file changed, 17 insertions(+) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index cad46b775807..ee42539a67c8 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -69,6 +69,23

[PATCH U-BOOT v2 10/30] fs: btrfs: Rename struct btrfs_path to struct __btrfs_path

2020-05-25 Thread Qu Wenruo
To avoid name conflicting between the extent buffer based btrfs_path from btrfs-progs. Also rename btrfs_free_path() to __btrfs_free_path() to avoid conflicts. Signed-off-by: Qu Wenruo --- fs/btrfs/btrfs.h | 4 ++-- fs/btrfs/chunk-map.c | 4 ++-- fs/btrfs/ctree.c | 16

[PATCH U-BOOT v2 01/30] fs: btrfs: Sync btrfs_btree.h from kernel

2020-05-25 Thread Qu Wenruo
port. Signed-off-by: Qu Wenruo --- fs/btrfs/btrfs.c|3 +- fs/btrfs/btrfs_tree.h | 766 --- fs/btrfs/ctree.h| 214 + fs/btrfs/inode.c|5 +- fs/btrfs/kernel-shared/btrfs_tree.h | 1333

[PATCH U-BOOT v2 09/30] fs: btrfs: Crossport read_tree_block() from btrfs-progs

2020-05-25 Thread Qu Wenruo
This is the one of the base stone function for btrfs, which will: - Do the chunk mapping resolve - Read data from disk - Do various sanity check WIth read_tree_block(), we can finally cross port needed btrfs btree operations to U-boot. Signed-off-by: Qu Wenruo --- fs/btrfs/ctree.c | 188

[PATCH U-BOOT v2 02/30] fs: btrfs: Add More checksum algorithm support to btrfs

2020-05-25 Thread Qu Wenruo
for the following csums: - SHA256 - XXHASH Signed-off-by: Qu Wenruo --- fs/btrfs/Makefile | 2 +- fs/btrfs/btrfs.c | 3 ++- fs/btrfs/btrfs.h | 11 - fs/btrfs/crypto/hash.c | 55 ++ fs/btrfs/crypto/hash.h | 17 + fs/btrfs/dir

[PATCH U-BOOT v2 04/30] fs: btrfs: Cross-port rbtree-utils from btrfs-progs

2020-05-25 Thread Qu Wenruo
This is needed for incoming extent-cache infrastructure. Signed-off-by: Qu Wenruo --- fs/btrfs/Makefile | 3 +- fs/btrfs/common/rbtree-utils.c | 83 ++ fs/btrfs/common/rbtree-utils.h | 53 ++ 3 files changed, 138 insertions(+), 1

[PATCH U-BOOT v2 17/30] fs: btrfs: Use btrfs_readlink() to implement __btrfs_readlink()

2020-05-25 Thread Qu Wenruo
The existing __btrfs_readlink() can be easily re-implemented using the extent buffer based btrfs_readlink(). This should be the first step to re-implement u-boot btrfs code. Signed-off-by: Qu Wenruo --- fs/btrfs/btrfs.h | 1 + fs/btrfs/inode.c | 101

[PATCH U-BOOT v2 13/30] fs: btrfs: Crossport btrfs_search_slot() from btrfs-progs

2020-05-25 Thread Qu Wenruo
. Remove it completely. With the core function in place, btrfs developers should feel at home now. This also crossports supportive codes like btrfs_previous_item() to ctree.[ch]. Signed-off-by: Qu Wenruo --- fs/btrfs/ctree.c | 536 ++- fs/btrfs/ctree.h

[PATCH U-BOOT v2 14/30] fs: btrfs: Crossport btrfs_read_sys_array() and btrfs_read_chunk_tree()

2020-05-25 Thread Qu Wenruo
These two functions play a big role in btrfs bootstrap. The following function is removed: - Seed device support Although in theory we can still support multiple devices, we don't have a facility in U-boot to do device scan without opening them. Signed-off-by: Qu Wenruo --- fs/btrfs/btrfs.c

[PATCH U-BOOT v2 11/30] fs: btrfs: Rename btrfs_root to __btrfs_root

2020-05-25 Thread Qu Wenruo
This is to avoid naming conflicts between extent buffer based btrfs_root. Signed-off-by: Qu Wenruo --- fs/btrfs/btrfs.c | 10 +- fs/btrfs/btrfs.h | 26 +- fs/btrfs/ctree.c | 2 +- fs/btrfs/ctree.h | 6 +++--- fs/btrfs/dir-item.c | 4 ++-- fs

[PATCH U-BOOT v2 20/30] fs: btrfs: Use btrfs_iter_dir() to replace btrfs_readdir()

2020-05-25 Thread Qu Wenruo
the unknown type If the DIR_ITEM is corrupted, at least don't try to access the memory out of bounday. Signed-off-by: Qu Wenruo --- fs/btrfs/btrfs.c| 157 +++- fs/btrfs/btrfs.h| 5 -- fs/btrfs/ctree.h| 5 ++ fs/btrfs/dir-item.c | 68

[PATCH U-BOOT v2 22/30] fs: btrfs: Rename btrfs_file_read() and its callees to avoid name conflicts

2020-05-25 Thread Qu Wenruo
Signed-off-by: Qu Wenruo --- fs/btrfs/btrfs.c | 2 +- fs/btrfs/btrfs.h | 6 +++--- fs/btrfs/extent-io.c | 4 ++-- fs/btrfs/inode.c | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/fs/btrfs/btrfs.c b/fs/btrfs/btrfs.c index aec91a57eceb..7eb01c4ff9b5 100644

[PATCH U-BOOT v2 21/30] fs: btrfs: Use btrfs_lookup_path() to implement btrfs_exists() and btrfs_size()

2020-05-25 Thread Qu Wenruo
The remaining function that still utilize __btrfs_lookup_path() is btrfs_read(). Signed-off-by: Qu Wenruo --- fs/btrfs/btrfs.c | 65 +++- fs/btrfs/inode.c | 1 - 2 files changed, 48 insertions(+), 18 deletions(-) diff --git a/fs/btrfs/btrfs.c b/fs

[PATCH U-BOOT v2 30/30] MAINTAINERS: Add btrfs mail list

2020-05-25 Thread Qu Wenruo
Since the current code base is mostly from btrfs-progs, anyone contributing to U-boot btrfs code could also help us to improve btrfs-progs and btrfs kernel module. Signed-off-by: Qu Wenruo --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index

[PATCH U-BOOT v2 29/30] fs: btrfs: Cleanup the old implementation

2020-05-25 Thread Qu Wenruo
Signed-off-by: Qu Wenruo --- fs/btrfs/Makefile | 4 +- fs/btrfs/btrfs.c | 31 fs/btrfs/btrfs.h | 47 -- fs/btrfs/chunk-map.c | 178 --- fs/btrfs/compression.c | 2 +- fs/btrfs/ctree.c | 290 fs/btrfs

[PATCH U-BOOT v2 28/30] fs: btrfs: Imeplement btrfs_list_subvols() using new infrastructure

2020-05-25 Thread Qu Wenruo
Signed-off-by: Qu Wenruo --- fs/btrfs/subvolume.c | 78 +--- 1 file changed, 73 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/subvolume.c b/fs/btrfs/subvolume.c index 258c3dafef60..6fc28d53e552 100644 --- a/fs/btrfs/subvolume.c +++ b/fs/btrfs

[PATCH U-BOOT v2 27/30] fs: btrfs: Introduce function to resolve the path of one subvolume

2020-05-25 Thread Qu Wenruo
This patch introduces a new function, list_one_subvol(), which will resolve the path to FS_TREE of one subvolume. Signed-off-by: Qu Wenruo --- fs/btrfs/subvolume.c | 81 1 file changed, 81 insertions(+) diff --git a/fs/btrfs/subvolume.c b/fs/btrfs

[PATCH U-BOOT v2 00/30] fs: btrfs: Re-implement btrfs support using the more widely used extent buffer base code

2020-05-25 Thread Qu Wenruo
to latest master Only minor conflicts due to header changes. - Allow next_legnth() to return value > BTRFS_NAME_LEN Qu Wenruo (30): fs: btrfs: Sync btrfs_btree.h from kernel fs: btrfs: Add More checksum algorithm support to btrfs fs: btrfs: Cross-port btrfs_read_dev_super() from btrfs-progs

  1   2   3   >