| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
| |
The PATH environment variable is set at the shell prompt, but it is not
exported, so currently scripts can't execute other scripts in PATH
anymore. PATH used to be exported in the init script, but this part was
lost when converting the init script to C. Add it back.
Fixes: 90df2a955e ("defaultenv: Convert init script to C")
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
6748f466a3 made NAND_ECC_HW_SYNDROME mode optional by bailing out
with -ENOSYS when the mode is not enabled in Kconfig. Unfortunately
with NAND_ECC_HW mode the code falls through to this test, so with
NAND_ECC_HW_SYNDROME support disabled NAND_ECC_HW stopped working as
well. Fix this.
fixes: 6748f466a3 ("mtd: nand: Make support for syndrome hardware ecc optional")
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
When the checksum tag is disabled the CRC is most likely invalid.
And if the checksum tag is disabled and the CRC is actually invalid the
user doesn't care for it anyway.
This information only confuses the user so make it a debug message.
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
| |
barebox partition table parsing can be tested in sandbox using the
recently added ,blkdev flag. Extend the documentation to cover this.
Cc: Juergen Borleis <jbe@pengutronix.de>
Reported-by: Lucas Stach <lst@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
chunk_data_sz is set to the result of a __le32 * __le32 multiplication:
chunk_data_sz = si->sparse.blk_sz * si->chunk.chunk_sz;
This will overflow.
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
retlen can potentially overflow. Also, write_full() in
fastboot_handle_sparse() expects size_t anyway.
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
files in dts/ are overwritten with the next dts update. Move file that
was accidently committed there to a place where it doesn't get
overwritten.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
Add include missing in last commit.
Fixes: 616d942c3e mtd:nand_mxs:update get/set features legacy function call
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
update get/set features legacy function call to avoid NULL pointer crash.
Signed-off-by: zhengxiaojun <jameszxj at gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the overlay references a firmware, the overlay must not be applied if
the firmware cannot be loaded. However, if the target node of the
firmware (i.e., the firmware manager) was not found, the fragment was
ignored and the firmware not loaded, but the overlay applied anyway.
If the overlay does not reference a firmware, of_process_overlay must
succeed even if the target node cannot be found, because the overlay
might still apply to the Linux device tree.
Always call the process function on a fragment, even if the target node
was not found. This allows the caller to decide, if a missing target is
fatal or if the overlay can be applied anyway.
Fix load_firmware to fail if a overlay references a firmware and the
target is NULL. Also, rephrase and clarify the comment that documents
this behavior.
Reported-by: Matthias Fend <matthias.fend@wolfvision.net>
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have a generic at91sam9 reset driver, but it's unaware of the
erratum on the at91sam9x5, which can prevent reboot from NAND due to
interference from SDRAM. The workaround is packing the powering down
of the DDR and the system reset into a single cache line and executing
that. This would be a bit tedious to add into the device tree probed
driver, thus:
- Don't activate the work around if we are device-tree enabled, but
have a newer SoC
- Give the workaround a slightly higher priority, so it's taken instead
of the generic DT driver
This fixes an issue of failing reset with the at91_multi_defconfig,
because both reset drivers have the same priority of 100.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Converts 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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Converts 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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For all files in common/ that already have a license text:
- Replace with appropriate SPDX-License-Identifier
- Remove empty comment lines around replacement
- remove comment completely if only thing remaining is name
of file without description
Reviewed-by: Roland Hieber <rhi@pengutronix.de>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We have code imported from eCos that's licensed with this exception.
Replace instances of the exceptions with a SPDX-License-Identifier
referencing the exception in our LICENSES directory.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Apparently, the file should be GPL-2.0-only without exceptions:
On 24.11.20 09:44, Sascha Hauer wrote[1]:
> This looks like I accidently copied the wrong header. I don't think I
> did this on purpose. It doesn't make much sense to me when compiling
> against dummy malloc is different than compiling against tlsf malloc
> or dlmalloc.
As dropping exceptions is no relicense, it's ok to do here without
acknowledgement from all authors. Do so.
[1]: <20201124084434.GC14718@pengutronix.de>
Suggested-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| | |
s/Identifer/Identifier/
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As described in the UART configuration[1] article in the Raspberry Pi
Foundation documentation, Raspberry Pi 3 & 4 as well as Zero W use the
mini-uart as primary (easily user-accessible) UART. At least on the
Raspberry Zero W and CM3, we need to pass uart_2ndstage=1, so the
BootROM leaves the 8250 IP in a suitable state for use by barebox.
Document this.
[1]: https://www.raspberrypi.org/documentation/configuration/uart.md
Cc: Roland Hieber <rhi@pengutronix.de>
Cc: Rouven Czerwinski <rcz@pengutronix.de>
Cc: Robert Carnecky <robert@neopsis.com>
Cc: Andrew John <andrew@mobius-embedded-systems.co.uk>
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For drop-in placement of barebox into the boot chain, it's useful to
have a target to boot the kernel like the VideoCore would have booted
the kernel if barebox hadn't been started instead.
This commit is based on the information here:
https://www.tablix.org/~avian/blog/archives/2019/03/booting_raspbian_from_barebox/
Cc: Tomaz Solc <tomaz.solc@tablix.org>
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
s/Model/Nodel/ as well as drop the space the other ones (e.g. Model 2B)
lack.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The barebox PL011 driver automatically arranges for the kernel to be
called with the appropriate console argument (placed in
${global.linux.bootargs.console}. There is thus no need to hard code a
TTY. Indeed we shouldn't because some Raspberry Pis don't use the PL011,
but the mini-uart, which is a ttyS.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Unlike the Raspberry Pi 1 and Raspberry Pi Zero, the Raspberry Pi Zero W
has its console pins on the header connected to the mini-uart, not the
PL011. The secondary PL011 UART is connected to the bluetooth module.
Set the mini-uart as default console and disable the PL011. That way we
can use the Raspberry Pi 1 image for the Zero W as well.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The Raspberry Pi Zero and Zero W have no power LED and lack the USB
hub and ethernet port. The rpi_b_plus_init is thus the wrong init function
to use. Add a new init function that just configures the activity LED
and configure the new exposed USB port for OTG.
While we have a dwc2 gadget driver, it doesn't yet work for the Rpi:
barebox@RaspberryPi Zero W:/ usbgadget -a
udc0: registering UDC driver [g_multi]
multi_bind: creating ACM function
g_multi usbgadget: Multifunction Composite Gadget
g_multi usbgadget: g_multi ready
dwc2 20980000.usb@7e980000.of: bound driver g_multi
WARNING: at drivers/usb/dwc2/gadget.c:1896/dwc2_gadget_pullup()!
But let's add dr_mode = otg anyway, so it can be debugged out of the box
with only config changes.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We don't have a clock driver for the raspberry pi, so board code needs
to list which used devices have clocks that are already known to be active
on boot. The Mini UART is one such device. We already wave away the
clock on the BCM2836, do the same for the BCM2835 as well.
Cc: Roland Hieber <rhi@pengutronix.de>
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
rpi_model_init() was so far run at late initcall level, at which time
most drivers have already been probed and it's too late to modify the
built-in device tree and see the changes take effect.
To use the same barebox image for multiple boards, it would be
nice to be able to fix up the device tree a bit. Facilitate this by
moving rpi_model_init() to postcore.
This is ok to do because eth_register_ethaddr() can be called prior
to Ethernet driver probe as well. This was tested on a Raspberry Pi 3B.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
They aren't (and arguably shouldn't) be used outside, so give them all
internal linkage and drop the header.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The upstream device trees reference the stdout-path via alias.
barebox overrides them with a path to the node, but the effect is
the same as both barebox and the kernel accept both for the property's
value.
No functional change:
serial0 serial1 upstream stdout-path
Rpi1 &uart0 &uart1 serial0
Rpi2 &uart0 &uart1 serial0
Rpi3 &uart0 &uart1 serial1
Tested on a Raspberry Pi 3B.
Cc: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since d6d3d0aecece ("mci: add driver for BCM283x sdhost core"), we now
have driver support for the sdhost controller in barebox as well.
We can thus drop the device tree override and use the same MCI the
kernel uses. This was tested on a Raspberry Pi zero W, which has
the same bcm2835 SoC as the Raspberry Pi 1.
This reverts commit abc0447440d68af720127fcca3c17f04ee144fcc.
Cc: Roland Hieber <rhi@pengutronix.de>
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Most NAND controllers use hardware ECC, so make software ECC support
optional to save some binary space.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
NAND_ECC_HW_SYNDROME is currently not needed by the drivers in barebox,
so make support for it optional again. This has been optional before the
last NAND layer update, just re-add the option. This time drop the
"default y", as this option shouldn't be needed.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Write support is optional with the CONFIG_MTD_WRITE option. Bail out
early in the write functions to save some binary space.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The driver can't work when omap_gpmc_eccmode() fails, so do not ignore
the error.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
ELM config can fail when ELM support is disabled. Let the user know
about it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The Denali binding for the Kernel has evolved over time. Recent Kernels
need NAND chip subnodes in the controller node which then hold the
partition nodes. Older Kernels need the partition nodes directly under
the controller node. Cope with both kernel types.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Some drivers have special requirements for fixing up the partition
nodes for the kernel. This adds a hook to struct mtd_info that can
be used by drivers to replace the generic fixup with a special one.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
of_partitions_register_fixup() tries to automatically determine the
node to fixup. Sometimes this doesn't work, so add of_fixup_partitions()
that can called at fixup time with a device node determined by subsystem
or driver code.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |/
| |/|
| | |
| | |
| | |
| | | |
struct mtd_info member of_path is set but not used, remove it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Instead of putting an array for the names into struct spi_device_id
use pointers. This saves around 3000 bytes of binary space in a ARM32
barebox build.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
expression is of type size_t. Use the appropriate format string specifier
for printing it.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
sz is of type size_t. Use the appropriate format string specifier for
printing it.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Like Linux, barebox supports co-existence of multiple watchdog
devices. On boot, barebox enables only the default watchdog, which
is defined as the watchdog with highest non-zero priority.
The kernel handles all watchdogs the same and defers to userspace,
which watchdogs to service. It can be useful to have barebox tell
the system, which watchdog it activated, so it can service the same.
Having this feature behind a global variable adds 354 bytes to a
LZO compressed THUMB2 barebox. Users can opt out by toggling the
Kconfig option, which defaults to off.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
On device-tree enabled platforms, the Linux kernel will first attempt
to use watchdog%d as watchdog name, where %d is the alias id.
Add a function that given a barebox struct watchdog and the device tree
root node of the kernel device tree, computes the corresponding kernel
alias id.
This may then later be used to pass an appropriate argument on the
kernel command line.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We have the split by '=' snippet at multiple locations that parse
key=value pairs. Consolidate them to a single location. This makes code
a bit easier to read at the cost of an extra 8 bytes (LZO-compressed
THUMB2 barebox, static inline version is bigger).
No functional change.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Setting a variable via the nv command results in the call chain
nvar_add() -> nv_save() -> __nv_save().
__nv_save isn't supposed to be called with val=NULL argument however:
dprintf(fd, "%s", val);
Avoid this from happening by translating NULL into the empty string.
This aligns nv with the behavior of hush and setenv (but not global,
this will need to be looked at separately).
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|