Move bindings under mtd. Do this in order to make davinci-nand
driver usable by keystone architecture.
Acked-by: Santosh Shilimkar
Reviewed-by: Grygorii Strashko
Reviewed-by: Taras Kondratiuk
Signed-off-by: Ivan Khoronzhuk
---
.../{arm/davinci/nand.txt => mtd/davinci-nand.txt} |0
1 f
There is not needed to use a lot of names for err handling.
It complicates code support and reading.
Acked-by: Santosh Shilimkar
Reviewed-by: Grygorii Strashko
Reviewed-by: Taras Kondratiuk
Signed-off-by: Ivan Khoronzhuk
---
drivers/mtd/nand/davinci_nand.c | 46
ified changeset description
- mtd: nand: davinci: reuse driver for Keystone arch
removed "ti,keystone-nand" compatible from driver
Ivan Khoronzhuk (9):
mtd: nand: davinci: fix driver registration
mtd: nand: davinci: return ENOMEM if memory allocation is failed
mtd: nand:
In case when memory allocation is failed the driver should return
ENOMEM instead of ENODEV.
Reviewed-by: Grygorii Strashko
Reviewed-by: Taras Kondratiuk
Signed-off-by: Ivan Khoronzhuk
---
drivers/mtd/nand/davinci_nand.c |5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
The property "ti,davinci-chipselect" is required. So we have to check
if it is set.
Reviewed-by: Grygorii Strashko
Reviewed-by: Taras Kondratiuk
Signed-off-by: Ivan Khoronzhuk
---
drivers/mtd/nand/davinci_nand.c |3 +++
1 file changed, 3 insertions(+)
diff --git a/driver
The Keystone arch has compatible nand device, so reuse it.
In case with Keystone it depends on TI_AEMIF because AEMIF
driver is responsible to set timings.
See http://www.ti.com/lit/ug/sprugz3a/sprugz3a.pdf
Reviewed-by: Grygorii Strashko
Reviewed-by: Taras Kondratiuk
Signed-off-by: Ivan
Nori
Signed-off-by: Ivan Khoronzhuk
---
v3..v2:
- rebased on following patch series:
[PATCH v3 0/9] Reuse davinci-nand driver for Keystone arch
http://www.spinics.net/lists/arm-kernel/msg291723.html
- removed AEMIF setup from next boards:
arch/arm/mach-davinci/board-dm355-
From: Sandeep Paulraj
It is needed for k2l keystone2 EVM which uses NAND flash with 4K page
size, hence add support for 4K page size nand devices.
Signed-off-by: Sandeep Paulraj
Signed-off-by: Ivan Khoronzhuk
---
Based on l2-mtd/master
v1..v2:
- fixed comment style, no functional changes
On 20.07.15 20:32, Brian Norris wrote:
On Tue, Aug 19, 2014 at 03:31:54PM +0300, Ivan Khoronzhuk wrote:
From: Sandeep Paulraj
It is needed for k2l keystone2 EVM which uses NAND flash with 4K page
size, hence add support for 4K page size nand devices.
Signed-off-by: Sandeep Paulraj
Signed
roposed by Jean Delvare.
Signed-off-by: Ivan Khoronzhuk
---
This patch is logical continuation of
"[dmidecode] [Patch v4] firmware: dmi-sysfs: add SMBIOS entry point area
attribute"
https://lkml.org/lkml/2015/2/4/475
Pay attention that this includes /sys/firmware/dmi for holding ta
Hi Matt,
On 02/04/2015 07:06 PM, Ivan Khoronzhuk wrote:
Some utils, like dmidecode and smbios, need to access SMBIOS entry
table area in order to get information like SMBIOS version, size, etc.
Currently it's done via /dev/mem. But for situation when /dev/mem
usage is disabled, the utils
sizes.
So move "end-of-table" check after it's handled by decode.
Signed-off-by: Ivan Khoronzhuk
---
v2..v1:
Move end of table check after it's handled instead of removing
Correct commit
drivers/firmware/dmi_scan.c | 13 +++--
1 file changed, 7
ent SMBIOS entry. So this patch adds SMBIOS area to
dmi-sysfs in order to allow utils in question to work correctly with
dmi sysfs interface.
Reviewed-by: Ard Biesheuvel
Signed-off-by: Ivan Khoronzhuk
---
v1: https://lkml.org/lkml/2015/1/23/643
v2: https://lkml.org/lkml/2015/1/26/345
v3: https://lkm
On 02/03/2015 12:49 PM, Matt Fleming wrote:
On Wed, 28 Jan, at 05:56:25PM, Ivan Khoronzhuk wrote:
diff --git a/drivers/firmware/dmi-sysfs.c b/drivers/firmware/dmi-sysfs.c
index e0f1cb3..61b6a38 100644
--- a/drivers/firmware/dmi-sysfs.c
+++ b/drivers/firmware/dmi-sysfs.c
@@ -29,6 +29,8
Hi, Mark
On 02/03/2015 04:58 PM, Mark Salter wrote:
On Wed, 2015-01-28 at 14:39 +0200, Ivan Khoronzhuk wrote:
Some utils, like dmidecode and smbios, needs to access SMBIOS entry
table area in order to get information like SMBIOS version, size, etc.
Currently it's done via /dev/mem. Bu
ntry sizes.
Of-course, it can be handled in newly introduced libdmifs by adding
end entry virtually, but it's brake backward compatibility and don't
correspond to SMBIOS DMI table size read from SMBIOS entry point
structure.
Signed-off-by: Ivan Khoronzhuk
---
drivers/firmware/dmi_scan.c |
On 02/04/2015 04:04 PM, Ard Biesheuvel wrote:
On 4 February 2015 at 13:57, Ivan Khoronzhuk wrote:
The dmi-sysfs should create "End of Table" entry, that is type 127.
But after adding initial SMBIOS v3 support the 127-0 entry is not
handled any more, as result it's not created
omparing, and it's obvious that 0x000208 is less
than 0x030201 for example.
Signed-off-by: Ivan Khoronzhuk
---
drivers/firmware/dmi_scan.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
index 952e95c..e
n that moment I cannot imagine dmi structure
count more than 65535 and it can require changing type of vars that
work with it. So I didn't correct it.
Signed-off-by: Ivan Khoronzhuk
---
drivers/firmware/dmi_scan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/f
There is no reason to pass static vars to function that can use
only them.
The dmi_table() can use only dmi_len and dmi_num static vars, so use
them directly. In this case we can freely change their type in one
place and slightly decrease redundancy.
Signed-off-by: Ivan Khoronzhuk
---
drivers
This series adds corrections to dmi_scan:
- extends version to be like 3.4.5 format
- fix dmi_len to be 32 bit wide
Ivan Khoronzhuk (3):
firmware: dmi_scan: use direct access to static vars
firmware: dmi_scan: fix dmi_len type
firmware: dmi_scan: use full dmi version for SMBIOS3
drivers
On 02/11/2015 11:55 AM, Ard Biesheuvel wrote:
On 11 February 2015 at 17:46, Ivan Khoronzhuk
wrote:
New SMBIOS3 spec adds additional field for versioning - docrev.
The docrev identifies the revision of a specification implemented in
the table structures, so display SMBIOS version > 3 in for
On 02/11/2015 11:53 AM, Ard Biesheuvel wrote:
On 11 February 2015 at 17:46, Ivan Khoronzhuk
wrote:
According to SMBIOSv3 specification the length of DMI table can be
up to 32bits wide. So use appropriate type to avoid overflow.
It's obvious that dmi_num theoretically can be more tha
On 02/11/2015 04:43 PM, Matt Fleming wrote:
On Wed, 11 Feb, at 02:17:03PM, Matt Fleming wrote:
On Tue, 10 Feb, at 11:51:44AM, Ivan Khoronzhuk wrote:
If you are Ok with this patch, could you please pickup it?
Applied, thanks Ivan!
Btw this patch doesn't apply cleanly, the reject looks
On 02/13/2015 06:12 PM, Matt Fleming wrote:
On Wed, 11 Feb, at 06:12:59PM, Ard Biesheuvel wrote:
Good point. Actually, I don't really see the need for patch #1, even
if I agree that it would have been better to write it like you have in
the first place.
But leaving the dmi_len as u16 is clearly
+ linux-...@vger.kernel.org
+ linux-...@vger.kernel.org
On 01/28/2015 02:39 PM, Ivan Khoronzhuk wrote:
Some utils, like dmidecode and smbios, needs to access SMBIOS entry
table area in order to get information like SMBIOS version, size, etc.
Currently it's done via /dev/mem. But for situ
There is no reason to translate guid number to string here.
So remove it in order to not do unneeded work.
Signed-off-by: Ivan Khoronzhuk
---
drivers/firmware/efi/efi.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index 9035c1b
Oh, sorry.
Just didn't note that it's picked up from linaro list.
On 01/29/2015 04:47 PM, Matt Fleming wrote:
On Thu, 2015-01-29 at 16:35 +0200, Ivan Khoronzhuk wrote:
There is no reason to translate guid number to string here.
So remove it in order to not do unneeded work.
Sig
Hi, Matt
Could you please pick up this patch.
On 02/05/2015 12:36 PM, Ard Biesheuvel wrote:
On 4 February 2015 at 14:22, Ivan Khoronzhuk wrote:
The dmi-sysfs should create "End of Table" entry, that is type 127.
But after adding initial SMBIOS v3 support the 127-0 entry is not
h
There is no reason to pass static vars to function that can use
only them.
The dmi_table() can use only dmi_len and dmi_num static vars, so use
them directly. In this case we can freely change their type in one
place and slightly decrease redundancy.
Signed-off-by: Ivan Khoronzhuk
---
drivers
SMBIOS3
- use shifted dmi_ver var for all versions
- display docrev version for 32 bit 3+ versions like 3.2.x
- don't display docrev for versions < 3
firmware: dmi_scan: use direct access to static vars
- move as the last patch and leave only correctio
n that moment I cannot imagine dmi structure
count more than 65535 and it can require changing type of vars that
work with it. So I didn't correct it.
Acked-by: Ard Biesheuvel
Signed-off-by: Ivan Khoronzhuk
---
drivers/firmware/dmi_scan.c | 4 ++--
1 file changed, 2 insertions(+), 2 deleti
like "3.22.x" as we don't know the docrev.
In other cases display version like it was.
Signed-off-by: Ivan Khoronzhuk
---
drivers/firmware/dmi_scan.c | 20
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmw
Ok, I'll correct commit msg like:
But after adding initial SMBIOS v3 support
(fc43026278b23b3515cf8f909ec29df94b3ae1a2)
the 127-0 entry is nothandled any more, as result it's not created in sysfs.
On 02/18/2015 03:04 PM, Matt Fleming wrote:
On Wed, 04 Feb, at 04:22:05PM, Ivan
portant because the size of
whole DMI table must correspond to sum of all DMI entry sizes.
So move the end-of-table check after it's handled by dmi_table.
Reviewed-by: Ard Biesheuvel
Signed-off-by: Ivan Khoronzhuk
---
v3..v2:
Include regression commit in commit msg
v2..v1:
On 02/18/2015 03:38 PM, Matt Fleming wrote:
On 18 February 2015 at 13:20, Ivan Khoronzhuk
wrote:
Ok, I'll correct commit msg like:
But after adding initial SMBIOS v3 support
(fc43026278b23b3515cf8f909ec29df94b3ae1a2)
the 127-0 entry is nothandled any more, as result it's not create
On Fri, Sep 06, 2019 at 04:31:39PM -0700, Alexei Starovoitov wrote:
On Thu, Sep 05, 2019 at 12:22:06AM +0300, Ivan Khoronzhuk wrote:
No need to set --target for native build, at least for arm, the
default target will be used anyway. In case of arm, for at least
clang 5 - 10 it causes error like
On Fri, Sep 06, 2019 at 05:04:08PM -0700, Alexei Starovoitov wrote:
On Fri, Sep 6, 2019 at 4:52 PM Ivan Khoronzhuk
wrote:
On Fri, Sep 06, 2019 at 04:31:39PM -0700, Alexei Starovoitov wrote:
>On Thu, Sep 05, 2019 at 12:22:06AM +0300, Ivan Khoronzhuk wrote:
>> No need to set --target f
On Fri, Sep 06, 2019 at 04:34:31PM -0700, Alexei Starovoitov wrote:
On Thu, Sep 05, 2019 at 12:22:12AM +0300, Ivan Khoronzhuk wrote:
+
+If need to use environment of target board, the SYSROOT also can be set,
+pointing on FS of target board:
+
+make samples/bpf/ LLC=~/git/llvm/build/bin/llc
For cross compiling the target triple can be inherited from
cross-compile prefix as it's done in CLANG_FLAGS from kernel makefile.
So copy-paste this decision from kernel Makefile.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 del
echo should be replaced on echo -e to handle \n correctly, but instead,
replace it on printf as some systems can't handle echo -e.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/bpf/Makefile b/sample
ts headers ofc.
Useful when working with NFC or virtual machine.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 5 +
samples/bpf/README.rst | 10 ++
2 files changed, 15 insertions(+)
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index 4edc5232cfc1..68ba78d1d
.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 8 +++-
tools/lib/bpf/Makefile | 11 ---
2 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index 79c9aa41832e..4edc5232cfc1 100644
--- a/samples/bpf/Makefile
+++ b
samples/bpf progs with CC while auxialry tools running on host built
with HOSTCC.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 138 +++
1 file changed, 73 insertions(+), 65 deletions(-)
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
The kernel headers are reused from samples bpf, and autoconf.h is not
enough to reflect complete arch configuration for clang. But CLANG-bpf
cmds are sensitive for assembler part taken from linux headers and -D
vars, usually used in CFLAGS, should be carefully added for each arch.
For that, for CLA
Drop inclusion for bpf_load -I$(objtree)/usr/include as it
is included for all objects anyway, with above line:
KBUILD_HOSTCFLAGS += -I$(objtree)/usr/include
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/bpf
No need in hacking HOSTCC to be cross-compiler any more, so drop
this trick and use CC for HDR_PROBE
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index 625a71f2e9d2
le.host. This allows later add
cross-compilation to samples/bpf with minimum changes.
Makefile.prog contains only stuff needed for samples/bpf, potentially
can be reused and extended for other prog sets later and now needed
only for unblocking tricky samples/bpf cross compilation.
Signed-off
obj build"
- limited -D option filter only for arm
- improved comments
- added couple instructions to verify cross compilation for arm and
arm64 arches based on TI am57xx and am65xx sdks.
- corrected include a little order
Ivan Khoronzhuk (11):
samples: bpf: makefile: fix HDR_PROBE "echo
t. So correct it, as it breaks cross-compiling at
least.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 1 -
1 file changed, 1 deletion(-)
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index f50ca852c2a8..43dee90dffa4 100644
--- a/samples/bpf/Makefile
+++ b/samples
It can overlap with CFLAGS used for libraries built with gcc if
not now then in next patches. Correct it here for simplicity.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/samples/bpf/Makefile b/samples/bpf
It's also convenient when debug is with NFC.
To cross-compile I've used:
export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabihf-
make -j4 samples/bpf/ SYSROOT="path/to/sysroot"
Sysroot contains correct headers installed ofc.
Signed-off-by: Ivan Khoronzhuk
---
sam
Smth related not only for cross-compilation and can have impact on other
archs and build environments, so might be good idea to verify it in order
to add appropriate changes, some warn options can be tuned, so comment.
Ivan Khoronzhuk (10):
samples: bpf: Makefile: use --target from cross-co
better.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 2 --
1 file changed, 2 deletions(-)
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index 61b7394b811e..a2953357927e 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -197,8 +197,6 @@ BTF_PAHOLE ?= pahole
echo should be replace on echo -e to handle \n correctly, but instead,
replace it on printf as some systems can't handle echo -e.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/bpf/Makefile b/sample
/tc_l2_redirect_kern.o
:1:2: error: invalid register/token name
rev16 r3, r0
This decision is arguable, probably there is another way, but
it doesn't have impact on samples/bpf, so it's easier just ignore
it for clang, at least for now.
Signed-off-by: Ivan Khoronzhuk
---
arch/arm/include/asm/swab.h
It can overlap with CFLAGS used for libraries built with gcc if
not now then in following patches. Correct it here for simplicity.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/samples/bpf/Makefile b/samples
eded for samples/bpf, potentially
can be reused and sophisticated for other prog sets later and now
needed only for unblocking tricky samples/bpf cross compilation.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile.prog | 77 +++
1 file changed, 77 insertions(+)
For cross compiling the target triple can be inherited from
cross-compile prefix as it's done in CLANG_FLAGS from kernel makefile.
So copy-paste this decision from kernel Makefile.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --
verified it on clang 5, 6 ,7, 8, 9, 10
as on native platform as for cross-compiling. This decision is
arguable, but it doesn't have impact on samples/bpf so it's easier
just ignore it for clang, at least for now...
Signed-off-by: Ivan Khoronzhuk
---
arch/arm/include/asm/unified.h | 6
In case of LDFLAGS and EXTRA_CC flags there is no way to pass them
correctly to build command, for instance when --sysroot is used or
external libraries are used, like -lelf. In follow patches this is
used for samples/bpf cross-compiling.
Signed-off-by: Ivan Khoronzhuk
---
tools/lib/bpf
The kernel headers are reused from samples bpf, and autoconf.h is not
enough to reflect complete configuration for clang. One of such
configurations is __LINUX_ARM_ARCH__ min version used as instruction
set selector. In another case an error like "SMP is not
supported" for arm and others errors are
On Wed, Aug 14, 2019 at 03:32:24PM +0200, Björn Töpel wrote:
On Wed, 14 Aug 2019 at 13:57, Ivan Khoronzhuk
wrote:
On Wed, Aug 14, 2019 at 12:24:05PM +0300, Ivan Khoronzhuk wrote:
>On Tue, Aug 13, 2019 at 04:38:13PM -0700, Andrii Nakryiko wrote:
>
>Hi, Andrii
>
>>On Tue, Au
e vmap along with page_address to avoid overkill
- define mmap syscall trace5 for mmap if defined
Ivan Khoronzhuk (3):
libbpf: use LFS (_FILE_OFFSET_BITS) instead of direct mmap2 syscall
xdp: xdp_umem: replace kmap on vmap for umem map
samples: bpf: syscal_nrs: use mmap2 i
block and should be used rather
for dynamic mm.
Signed-off-by: Ivan Khoronzhuk
---
net/xdp/xdp_umem.c | 36 ++--
1 file changed, 30 insertions(+), 6 deletions(-)
diff --git a/net/xdp/xdp_umem.c b/net/xdp/xdp_umem.c
index a0607969f8c0..d740c4f8810c 100644
--- a/net
For arm32 xdp sockets mmap2 is preferred, so use it if it's defined.
Declaration of __NR_mmap can be skipped and it breaks build.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/syscall_nrs.c | 6 ++
samples/bpf/tracex5_kern.c | 13 +
2 files changed, 19 insertions(+)
tems.
Signed-off-by: Ivan Khoronzhuk
---
tools/lib/bpf/Makefile | 1 +
tools/lib/bpf/xsk.c| 49 --
2 files changed, 15 insertions(+), 35 deletions(-)
diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile
index 9312066a1ae3..844f6cd79c03 100644
--- a/t
On Thu, Aug 15, 2019 at 11:23:16AM -0700, Jonathan Lemon wrote:
On 15 Aug 2019, at 5:13, Ivan Khoronzhuk wrote:
For 64-bit there is no reason to use vmap/vunmap, so use page_address
as it was initially. For 32 bits, in some apps, like in samples
xdpsock_user.c when number of pgs in use is
Fix mem leak caused by missed unpin routine for umem pages.
Fixes: 8aef7340ae9695 ("commit xsk: introduce xdp_umem_page")
Signed-off-by: Ivan Khoronzhuk
---
Based on bpf/master
net/xdp/xdp_umem.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/xdp/xdp_um
-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 2 --
1 file changed, 2 deletions(-)
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index 61b7394b811e..a2953357927e 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -197,8 +197,6 @@ BTF_PAHOLE ?= pahole
ifdef CROSS_COMPILE
For cross compiling the target triple can be inherited from
cross-compile prefix as it's done in CLANG_FLAGS from kernel makefile.
So copy-paste this decision from kernel Makefile.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --
The kernel headers are reused from samples bpf, and autoconf.h is not
enough to reflect complete configuration for clang. One of such
configurations is __LINUX_ARM_ARCH__ min version used as instruction
set selector. In another case an error like "SMP is not
supported" for arm and others errors are
In case of LDFLAGS and EXTRA_CC flags there is no way to pass them
correctly to build command, for instance when --sysroot is used or
external libraries are used, like -lelf. In follow up patches this is
used for samples/bpf cross-compiling getting elf lib from sysroot.
Signed-off-by: Ivan
eded for samples/bpf, potentially
can be reused and extended for other prog sets later and now needed
only for unblocking tricky samples/bpf cross compilation.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile.prog | 77 +++
1 file changed, 77 insertions(+)
create
echo should be replaced on echo -e to handle \n correctly, but instead,
replace it on printf as some systems can't handle echo -e.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/bpf/Makefile b/sample
xport ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabihf-
make samples/bpf/ SYSROOT="path/to/sysroot"
Sysroot contains correct headers installed ofc.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 164 -
samples/bpf/README.rst | 7 ++
It can overlap with CFLAGS used for libraries built with gcc if
not now then in next patches. Correct it here for simplicity.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/samples/bpf/Makefile b/samples/bpf
, some warn options could be
tuned also.
Ivan Khoronzhuk (8):
samples: bpf: Makefile: use --target from cross-compile
samples: bpf: Makefile: remove target for native build
libbpf: Makefile: add C/CXX/LDFLAGS to libbpf.so and test_libpf
targets
samples: bpf: use own EXTRA_CFLAGS for
On Tue, Sep 10, 2019 at 01:46:48PM +0300, Sergei Shtylyov wrote:
Hello!
On 10.09.2019 13:38, Ivan Khoronzhuk wrote:
echo should be replaced on echo -e to handle \n correctly, but instead,
s/on/with/?
s/echo/printf/ instead of s/echo/echo -e/
printf looks better.
replace it on printf
On Wed, Sep 11, 2019 at 02:02:11PM +0300, Sergei Shtylyov wrote:
On 10.09.2019 17:54, Ivan Khoronzhuk wrote:
Hello!
On 10.09.2019 13:38, Ivan Khoronzhuk wrote:
echo should be replaced on echo -e to handle \n correctly, but instead,
s/on/with/?
s/echo/printf/ instead of s/echo/echo -e
On Fri, Sep 13, 2019 at 09:12:01PM +, Yonghong Song wrote:
On 9/10/19 11:38 AM, Ivan Khoronzhuk wrote:
The kernel headers are reused from samples bpf, and autoconf.h is not
enough to reflect complete arch configuration for clang. But CLANG-bpf
cmds are sensitive for assembler part taken
On Fri, Sep 13, 2019 at 08:48:37PM +, Yonghong Song wrote:
On 9/10/19 11:38 AM, Ivan Khoronzhuk wrote:
Don't list userspace "cookie_uid_helper_example" object in list for
bpf objects.
per_socket_stats_example-opjs is used to list additional dependencies
s/opjs/objs
On Fri, Sep 13, 2019 at 09:33:58PM +, Yonghong Song wrote:
On 9/10/19 11:38 AM, Ivan Khoronzhuk wrote:
The makefile.prog is added only, will be used in sample/bpf/Makefile
later in order to switch cross-compiling on CC from HOSTCC.
The HOSTCC is supposed to build binaries and tools
On Fri, Sep 13, 2019 at 09:41:25PM +, Yonghong Song wrote:
On 9/10/19 11:38 AM, Ivan Khoronzhuk wrote:
The main reason for that - HOSTCC and CC have different aims.
It was tested for arm cross compilation, based on linaro toolchain,
but should work for others.
In order to split cross
On Fri, Sep 13, 2019 at 09:43:22PM +, Yonghong Song wrote:
On 9/10/19 11:38 AM, Ivan Khoronzhuk wrote:
In case of LDFLAGS and EXTRA_CC/CXX flags there is no way to pass them
correctly to build command, for instance when --sysroot is used or
external libraries are used, like -lelf, wich
On Fri, Sep 13, 2019 at 09:45:31PM +, Yonghong Song wrote:
On 9/10/19 11:38 AM, Ivan Khoronzhuk wrote:
Basically it only enables that was added by previous couple fixes.
For sure, just make tools/include to be included after sysroot
headers.
export ARCH=arm
export CROSS_COMPILE=arm-linux
;t be in 'always'.
Let us remove `always += cookie_uid_helper_example.o`, which avoids
breaking cross compilation due to mismatched includes.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 1 -
1 file changed, 1 deletion(-)
diff --git a/samples/bpf/Makefile b/samples/bpf/Make
echo should be replaced with echo -e to handle '\n' correctly, but
instead, replace it with printf as some systems can't handle echo -e.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/bpf/Makefil
compilation (CC) with host build (HOSTCC),
lets base samples on Makefile.target. It allows to cross-compile
samples/bpf programs with CC while auxialry tools running on host
built with HOSTCC.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 135 ++-
1
No need in hacking HOSTCC to be cross-compiler any more, so drop
this trick and use target CC for HDR_PROBE.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index
pf cross compilation.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile.target | 75 +
1 file changed, 75 insertions(+)
create mode 100644 samples/bpf/Makefile.target
diff --git a/samples/bpf/Makefile.target b/samples/bpf/Makefile.target
new fi
.
Signed-off-by: Ivan Khoronzhuk
---
tools/lib/bpf/Makefile | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile
index c6f94cffe06e..bccfa556ef4e 100644
--- a/tools/lib/bpf/Makefile
+++ b/tools/lib/bpf/Makefile
@@ -94,6
clean
configure and install headers:
make ARCH=arm defconfig
make ARCH=arm headers_install
build samples/bpf:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- samples/bpf/ \
SYSROOT="path/to/sysroot"
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 5 +
1 fi
Add couple preparation steps: clean and configuration. Also add newly
added sysroot support info to cross-compile section.
---
samples/bpf/README.rst | 41 -
1 file changed, 36 insertions(+), 5 deletions(-)
diff --git a/samples/bpf/README.rst b/samples/bpf/
For arm, -D__LINUX_ARM_ARCH__=X is min version used as instruction
set selector and is absolutely required while parsing some parts of
headers. It's present in KBUILD_CFLAGS but not in autoconf.h, so let's
retrieve it from and add to programs cflags. In another case errors
like "SMP is not supporte
In order to build libs using C/CXX/LD flags of target arch,
provide them to libbpf make.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 14 +++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index 18ec22e7b444
potential
option mistmatches for existent environments.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 9 +
1 file changed, 9 insertions(+)
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index 1579cc16a1c2..b5c87a8b8b51 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf
It can overlap with CFLAGS used for libraries built with gcc if
not now then in next patches. Correct it here for simplicity.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/samples/bpf/Makefile b/samples/bpf
Drop inclusion for bpf_load -I$(objtree)/usr/include as it is
included for all objects anyway, with above line:
KBUILD_HOSTCFLAGS += -I$(objtree)/usr/include
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/bpf
For cross compiling the target triple can be inherited from
cross-compile prefix as it's done in CLANG_FLAGS from kernel makefile.
So copy-paste this decision from kernel Makefile.
Signed-off-by: Ivan Khoronzhuk
---
samples/bpf/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 del
301 - 400 of 744 matches
Mail list logo