| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
The config_filename macro has been dropped from mainline in
b8c96a6b466c ("certs: simplify $(srctree)/ handling and remove
config_filename macro"). Adopt the mechanism it has been replaced with
for barebox.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
| |
Add -d option to generate output in dts format rather than C.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
Fixes:
scripts/rsatoc.c:189:5: warning: no previous prototype for ‘rsa_get_params’ [-Wmissing-prototypes]
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
barebox builds no tools with these names. The normal barebox-state
utility comes from dt-utils, so drop the unnecessary entries.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220318152851.729901-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
Buffer written is read-only, so align prototype with <libfile.h>.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220318144924.497993-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of rebuilding TF-A with a (newer) barebox, an existing image can
be repacked:
fiptool update fip.bin --nt-fw images/barebox-dt-2nd.img \
--hw-config build/arch/arm/dts/stm32mp157c-dk2.dtb
This may fail at runtime though, because the STM32MP default is to place
BL33 at the very start of RAM. The script introduced here offers
an alternative to rebuilding TF-A with adjust FW_CONFIG:
./scripts/fiptool_fwconfig -l 0xc0001000 mmcblk0p3
This will have barebox loaded 4096 bytes into the STM32MP SDRAM.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220220124736.3052502-7-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Posix does not mandate to have binaries within a certain path, but
rather that the utilities may be available. Use env to resolve and call
echo from PATH.
Fixes: 2ae7ac7ab2f1 ("kbuild: dtc: Allow adding device tree fragments via config")
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Link: https://lore.barebox.org/20220120074733.176041-1-r.czerwinski@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |/
| |
| |
| |
| |
| |
| |
| | |
Instead of hard coding /bin/echo, port the upstream printf formatting.
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Link: https://lore.barebox.org/20220120084650.183704-1-r.czerwinski@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using mmap in read_file doesn't work when the same file is written
afterwards with write_file. This problem was fixed in 738601e125
("scripts/common: fix write_file when opened with mmap"). Using mmap in
read_file was removed in 07b87a0908 ("scripts/common: Do not mmap in
read_file_2()") but then re-introduced for bareboximd in 013e8ea757
("scripts: bareboximd: Use mmap when possible"). I'll put my brown paper
bag on for this :(
This patch fixes the issue by explicitly avoiding mmap when the file
is written later as done with the -c option to bareboximd
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reported-by: Andrej Picej <andrej.picej@norik.com>
Tested-by: Andrej Picej <andrej.picej@norik.com>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ImageMagick will eventually support the qoi image format, in the
mean time add qoiconv, a png to qoi image conversion program.
Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu>
Link: https://lore.barebox.org/20220117230235.13549-4-jmaselbas@kalray.eu
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
A board has to select CONFIG_USE_COMPRESSED_DTB either directly or
through arch specific options when it uses compressed dtbs. This is
easily forgotten. barebox compiles fine, but during runtime the
decompression code is missing and barebox won't start. As this happens
in the PBL possibly without output this may be unnecessarily hard to
debug.
Make sure compilation fails when a board uses compressed dtbs but
didn't select CONFIG_USE_COMPRESSED_DTB.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
scripts/Kbuild.include defines 'pound', which is equivalent to 'H'.
pound := \#
Replace $(H) with $(pound), and remove the 'H' definition.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Link: https://lore.barebox.org/20220207134923.1775891-1-masahiroy@kernel.org
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It has been a long time since this script was updated.
Now resync it with Linux 5.16.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Link: https://lore.barebox.org/20220207134707.1775213-1-masahiroy@kernel.org
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
dts/include/ contains Kernel upstream dt-binding include files. includes
are searched for in this directory before our own include directories
are used. This becomes a problem when we have files existing in the
barebox include directory which then appear in dts/include/ due to a dts
update. Make sure that we still use the barebox files in this case so
that we can later drop the barebox custom file explicitly along with the
fixes that might be needed to use the upstream file.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
mmap() is no longer used in read_file_2(), so this patch is no longer
necessary.
This reverts commit 738601e1258c55953284ee10801b26b9977918c2.
Link: https://lore.barebox.org/20220211094230.1807262-3-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Using mmap() in read_file_2 was dropped in the last patch, bring it back
in a bareboximd specific function here.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://lore.barebox.org/20220211094230.1807262-2-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Using mmap() in read_file_2() leads to problems because there are
cases where the buffer returned from read_file_2() is modified and
then written back to the same file. This doesn't work when the
original file has been mmapped instead of being read into an allocated
buffer.
Using mmap() was introduced for a usecase where the system is very tight
in memory and bareboximd ran out of memory. Support for this usecase is
removed here, we'll bring it back in the next patch.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://lore.barebox.org/20220211094230.1807262-1-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Usage of bareboximd with -c option (Create checksum for FILE and write
it to the crc32 tag) was broken. Possibly by applying 2154de1cf36c
(bareboximd: Use mmap when possibly). The script fails with:
$ ./scripts/bareboximd -c images/<barebox-image.img>
Cannot write to images/<barebox-mage.img>: Bad address
CRC: write crc token to images/<barebox-image.img> failed: -14
Bad address
This has to do with the usage of "mmap" and "open" with O_TRUNC flag
which truncates the file length to 0. Writing to files fails with:
EFAULT (14) buf is outside your accessible address space.
Remove the truncate flag and truncate manually after writing the data.
This fixes the bareboximd script, which is now again usable with -c
option.
Signed-off-by: Anze Lesnik <anze.lesnik@norik.com>
Signed-off-by: Andrej Picej <andrej.picej@norik.com>
Link: https://lore.barebox.org/20220128080033.167251-1-andrej.picej@norik.com
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
Makes the files not appear when searching for files that lack
SPDX-License-Identifier.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220103120539.1730644-4-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To verify only Kconfig/Makefile is touched:
git show --numstat --format=oneline HEAD | grep -v 'Kconfig\|Makefile'
will print only arch/powerpc/Kbuild.
To verify nothing unexpected is added:
git show -U0 | grep '^-[^-]\|^+[^+]' | sort -u
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220103120539.1730644-3-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If tv.tv_usec is 1000000 the structure needs normalizing, too. So the
right check would be:
if (tv.tv_usec >= 1000000) {
...
But as normalizing doesn't destroy anything even for smaller values,
just do it unconditionally to simplify a bit.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.barebox.org/20211130160308.316863-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
| |
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Link: https://lore.barebox.org/20211115170505.1564052-1-u.oelmann@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Having rk-usb-loader as a target tool as well makes it easy to
cross-compile it. Add the boilerplate.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This adds a tool suitable for bootstrapping barebox on Rockchip RK3568
SoCs. It has been tested on this SoC only. It might or might not work
with minor adjustments on other SoCs.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Tested-by: Michael Riesch <michael.riesch@wolfvision.net>
|
| |
| |
| |
| |
| |
| |
| | |
We have different implementations of read_full() and write_full() in our
host tools, use a common implementation for these.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
write_file() is used once, but can be used in socfpga_mkimage.c as
well. Move function to a common place and use it in the SoCFPGA image
tool.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Several functions are duplicated in different host tools. This patch
starts collecting them in a single C file. We start with read_file()
and read_file_2(), others follow in separate commits.
It would be great to compile these functions in a separate library, but
I don't know how this can be archieved in Kbuild. Instead, the C file
is included where needed. Not nice, not beautiful, but at least enough
to get something going.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Host tools were often only compiled depending on the architecture which
needs them. This patch adds explicit options for most tools mainly to
be able to compile test them without having to compile for each
architecture.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We currently build the USB loader tools only for the host (build) system,
but it can be useful to cross compile them as well for the target.
We already have some target tools, but support for those is easier,
because they don't link against libraries. We use pkg-config to get
cc and ld flags, but we always assume that pkg-config is for the host
system and there is no well-defined way to request pkg-config for the
target system.
Support this by introducing a new CROSS_PKG_CONFIG. This will be
consulted only for target tools and default to
$(CROSS_COMPILE)pkgconfig.
Users can override it as necessary, for example, with Yocto, pkg-config
will be for the cross environment, so target tools can now be built
with:
export ARCH=sandbox CROSS_COMPILE=aarch64-linux-gnu-
export CROSS_PKG_CONFIG=pkg-config scripts
make targettools_defconfig
make scripts
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210917174127.23345-4-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
pkg-config --cflags libusb-1.0 should ensure <libusb.h> would be found.
Command's output is used to compile omap3-usb-loader.c, but because the
file does #include <libusb-1.0/libusb.h>, it will probably not find the
header in the directory added to search path by pkg-config and depend on
other directories in the search path. Fix this. We already expect users
to have proper pkg-config files, so linking works, so it's not too much
to ask to expect the pkg-config file that should already exist to yield
proper --cflags as well.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210917174127.23345-3-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We have four target tools and will add 3 more in a follow up commit.
Add a new menu to collect them.
Acked-by: Roland Hieber <rhi@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210917174127.23345-2-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This introduces a config variable that allows adding additional fragments
to the Barebox device tree(s).
Example uses are adjusting the flash partition layout, adding barebox
state variables, or adding an I2C device. These can be now be done with
build configuration only, without needing to patch the existing dts
files in the Barebox source.
The advantage is greater when an external build system, such as Yocto or
Buildroot, is being used to build Barebox. The build system can drop in
a dts fragment to partition flash and build from unaltered Barebox
source. This avoids the need for cumbersome maintenance of patch files
to modify Barebox's source for each flash partition layout.
Preprocessing the dts file gains another layer, where a generated dts
source consisting of an include directive for the original dts source is
followed by more includes for each fragment. This is piped to the
existing preprocessor call on stdin to avoid another temporary file.
cpp/dtc will correctly identify errors in the source files they occur
in. The -MT option is used so the cpp auto-dependencies reference the
original dts source and not the generated code passed on stdin.
A preprocessor macro named after the base dts file, e.g. foo-bar.dts
will define foo_bar_dts, will be defined so that the fragments can
possibly operate differently based on which image's dts is being built.
Signed-off-by: Trent Piepho <trent.piepho@igorinstitute.com>
Link: https://lore.barebox.org/20210922181336.1350460-1-trent.piepho@igorinstitute.com
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The commit a9b2e6089d82686564220013f14e9f0ffcc725e2 allowed generating
everything needed in one step. This was however a bit too ambitious.
The script now requires that the Altera Embedded SDK is always
installed. There are situations where this is unwanted.
Beef up the code a little bit to allow having the SDK as an optional
argument and make the other input parameters location independent.
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Link: https://lore.barebox.org/20210611080233.15141-1-s.trumtrar@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The bareboxenv behviour is different if used as host-tool. As host-tool
the erase is skipped which can confuse the user. Add a help note as hot
fix. In the long term we should add the host-tool erase support as well.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Link: https://lore.barebox.org/20210806093337.10153-1-m.felsch@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
While soc imx8mm in the imxcfg would work too, it's less surprising to
just tell imx-image about the new SoC.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211001100949.6891-8-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
| |
The Nano is basically a downsized mini. Add the necessary bits, so
driver and board support can be added.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211001100949.6891-2-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a tool for generating "RKNS" type booting image for newer
Rockchip SoCs. This image format is supported starting at least with
RK3568. Older image types are not (yet) supported.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://lore.barebox.org/20210615141641.31577-5-s.hauer@pengutronix.de
Link: https://lore.barebox.org/20210621092802.27275-5-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The previous sync was Linux 5.9-rc2.
Resync scripts/kconfig/ with Linux 5.13-rc1.
Highlights:
- make header names in include/config/ and CONFIG symbols match
(scripts/basic/fixdep.c was adjusted)
- remove all 'option' syntax
(common/Kconfig was adjusted)
- introduce KCONFIG_DEFCONFIG_LIST instead of 'option defconfig_list'
- bug fixes and cleanups of nconfig
- drop Qt4 support from xconfig
- bug fixes, improvements, cleanups of xconfig
- print a short log for syncconfig
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Link: https://lore.barebox.org/20210530145842.2610109-2-masahiroy@kernel.org
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|