| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
Linux defines this macro at multiple places. We define it once, but in
<common.h>, which is a bit heavy weight. Move it next to the
ARRAY_SIZE() definition.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211030141739.2207431-5-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
|
|
|
|
|
|
|
| |
No where do we define __BITS_PER_LONG, but we know about BITS_PER_LONG.
Fix it.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211030141739.2207431-2-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
|
|
|
|
|
|
|
|
| |
There are no definitions for __sw_hweight*, so no point in keeping the
prototypes around. The scripts version of the header also ultimately
tries to access non-existing normal headers, so fix that up as well.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211030141739.2207431-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
|
|
|
|
|
|
|
| |
Convert the files that licensecheck can determine to be licensed under
GPL-2.0-only or GPL-2.0-or-later and also convert the copyright statements
to SPDX.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
|
|
|
|
|
|
|
| |
To make code sharing between utilities in scripts/ and barebox easier,
define ALIGN in the scripts/include/linux/kernel.h as well for
compatibility with the barebox include/linux/kernel.h.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
|
|
|
|
|
|
|
|
| |
We can't assume <asm/errno.h> to be available on non-Linux hosts.
Furthermore, errno constants values aren't fixed and passing them
to libc perror(3)/strerror (3) would yield wrong results.
Fix this by using the standard <errno.h> header instead.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
|
|
|
|
|
|
| |
If we compile on non-Linux hosts, we can't assume this header to be
available. Thus typedef loff_t and [su](8|16|32|64) ourselves.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Defining strlcpy here clashes on macOS, which has some compiler magic
around their strlcpy declaration. Fix this by inverting the check
to declare the prototype only if we are on __GLIBC__. As uClibc may
define __GLIBC__ as well, check for absence of its __UCLIBC__.
This is in-line with what Linux has been doing since 0215d59b15
("tools lib: Reinstate strlcpy() header guard with __UCLIBC__").
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
|
|
|
|
|
|
|
|
|
| |
Add a flag to sort directory entries before recursing into them.
Since this part of lib/ is used inside barebox as well as in
scripts/bareboxenv.c, we cannot easily use stringlists from lib/, which
would have made the code a bit nicer.
Signed-off-by: Florian Bäuerle <florian.baeuerle@allegion.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
|
|
|
|
|
|
| |
The list implementation in scripts/ includes poison.h which doesn't
exist. Remove the inclusion and add the defines from poison.h that we
need.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
|
|
|
|
| |
Some programs need the big endian macros, add them to andian.h
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
|
|
|
|
|
| |
ARRAY_SIZE is another define commonly used in tools. Add it to the
kernel includes.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
This imports the tools/include dir from the Kernel as of 4.5-rc1 to
barebox.
The Kernel has many useful defines and helpers which are often
duplicated in the different tools. Let's create a copy of them
in a common place for all tools.
Some files have been skipped for now as I currently see no use for them:
include/linux/filter.h
include/linux/hash.h
include/linux/rbtree.h
include/linux/rbtree_augmented.h
They can be added later if needed.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|