| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
| |
stickypage.o is included in the build process once in
arch/sandbox/board/Makefile using extra-y += stickypage.o and once again
in arch/sandbox/Makefile using stickypage.bin: arch/sandbox/board/stickypage.o
This doesn't work as expected. With parallel builds it can happen that
the file is built twice confusing the build system. Create
stickypage.bin in a single directory only.
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>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is currently used on ARM and sandbox, but it's relevant for
other platforms like x86 as well if driver code wants to make use
of the functions defined within.
MIPS and PowerPC already defines the symbols, but that's ok because
<bitio.h> doesn't override existing macros. This works for MIPS, but
not PowerPC, where those aren't macros. Fix that up.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210812121944.4419-3-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The hostfile driver provides nvmem cells, which are consumed optionally
by power and watchdog driver. Without deep probe there was no way to
differentiate between a nvmem cell that has no provider at all and one
with a provider that wasn't yet probed. The workaround is to move
hostfile driver probe to an earlier initcall level. Now with deep probe
support, this is no longer needed, thus revert commit
33be33ea617514df622a2a468b426e8a628c87e8.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210628064517.28636-8-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
With previous commits sorting out the few remaining issues holding
sandbox back from using deep probe, we can now enable it.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210628064517.28636-7-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With incoming changes to enable deep probe for sandbox, watchdog driver
may be probed before power driver, which so far didn't happen. Because
the watchdog driver writes the same NVMEM cell read by the power driver,
the original value of the nvmem cell (used for $global.system.reset)
will be lost. Work around this by writing the WDG reset reason only
at first watchdog enable which is guaranteed to happen after power
driver probe. We don't need to reset the nvmem cell on watchdog disable,
because all other reset methods will already overwrite the cell with
the correct value.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210628064517.28636-3-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that the stickypage is a regular hostfile, it survives poweroff.
This $global.system.reset will only be POR on first boot. For subsequent
boots, the power driver must itself take care to write POR to the nvmem
cell.
While at it remove two minor issues:
- src_offset is unused
- len is used to store a length into. Its original value is unused
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210628064517.28636-2-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The idea of the stickypage was to have a 4K memory region persistent
over resets. This region was implemented as mmap of a temporary hostfile,
which was created on first barebox start and maintained over resets.
Usability was a bit lacking however:
- The temporary files weren't deleted
- state always showed warnings and errors on first boot. The banner
telling users to ignore this wasn't best user experience
- In the same vein, the power driver had logic to handle a fresh
(zeroed) stickypage and interpret that as POR boot
We can avoid all that, by just shipping a default stickypage and
referencing that from DT. Do that.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210629063730.7001-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Follow-up changes will have the hostfile provide nvmem cells to other
drivers, which run at coredevice_ and device_ initcall levels.
These drivers can't defer probe though, because access to the NVMEM
cell is optional. Move the hostfile initcall earlier to allow for this.
Once deep probe support is merged and enabled for sanbox, it should
be possible to revert this commit and see no nvmem cell related
warnings.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210619034516.6737-11-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
| |
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210619034516.6737-9-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
We have some syscon-reboot-mode users in tree, but no nvmem-reboot-mode
yet. Use the new nvmem-cells binding to remedy this. Added benefit is
that we no longer access unpartitioned space; The reboot mode is now
clearly described in the device tree.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210619034516.6737-8-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
Watchdog and system reset driver use a byte in the sticky page to
persist reset reason over reexec. So far, this was a byte outside
partitioned space. With the new nvmem-cells binding, a partition can be
dedicated to holding nvmem cells. Use that instead.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210619034516.6737-6-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Errors during device tree registration, while uncommon, are really
annoying, because the system may limp along and it's not clear where
the misbehavior originates from.
Failing the initcall of the device tree would improve user experience in
that error case. There is intentionally no early exit on error cases
to give barebox a chance to probe the serial driver to actually report
errors when DEBUG_LL is disabled.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210531071239.30653-4-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
linux_watchdog_set_timeout() does return alarm(), which can never fail
and returns either zero or a positive value.
watchdog::set_timeout on the other hand should return either 0 or
a negative number on error.
Ignore linux_watchdog_set_timeout()'s return value, so
watchdog_set_timeout propagates the correct value.
This fixes an issue where seconds_to_expire wasn't updated on
subsequent pings of this watchdog.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210426113408.24903-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
The message didn't explicitly say it is expected behavior to not find
barebox-state on startup. Reword the message to make this clearer.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Link: https://lore.pengutronix.de/20210404111831.592821-2-ahmad@a3f.at
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
barebox on sandbox defaults to network boot, which fails either due to
missing TAP support (like not having CAP_NET_ADMIN) or because the files
couldn't be fetched.
Arguably, the most user-friendly thing is to drop to shell. Do so.
Users can still override nv.autoboot if they want to boot differently.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.pengutronix.de/20210404111831.592821-1-ahmad@a3f.at
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There's nothing ARM specific about these functions. Move them to a
common location, so other arches can use them as well.
This also fixes a bug on ARM MMU=n configurations:
Previously these two functions these functions only respected
dma-ranges translation when compiled with MMU support. DMA address
translation is applicable regardless of CPU use of MMU though.
Now, dma-ranges should be respected unconditionally.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There is value in testing LED trigger conditions in sandbox,
especially with the coming bthread work that should replace pollers,
like the one used by the heartbeat trigger.
To make this testable on sandbox as well, add a simple LED driver.
It supports 5 brightness levels, which are reflected as dots in
the terminal title. This requires a Xterm compatible terminal,
but the LED is inactive by default, so other terminals aren't
affected if they lack support.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For the sandbox architecture, we use __sanitizer_start_switch_fiber
and __sanitizer_finish_switch_fiber to tell ASan when we switch stacks.
If we don't, ASan complains that:
==2472828==WARNING: ASan is ignoring requested __asan_handle_no_return:
stack top: 0xff9fc000; bottom 0xf3be8000; size: 0x0be14000 (199311360)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
This works on 64-bit sandbox, but 32-bit sandbox currently crashes on
bthread -v:
==2469590==AddressSanitizer CHECK failed: ../../../../../src/libsanitizer/asan/asan_poisoning.cpp:37 "((AddrIsAlignedByGranularity(addr + size))) != (0)" (0x0, 0x0)
#0 0xf7a4aa46 in AsanCheckFailed ../../../../../src/libsanitizer/asan/asan_rtl.cpp:73
#1 0xf7a6b5cf in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) ../../../../../src/libsanitizer/sanitizer_common/sanitizer_termination.cpp:78
#2 0xf7a4489f in __asan::PoisonShadow(unsigned long, unsigned long, unsigned char) ../../../../../src/libsanitizer/asan/asan_poisoning.cpp:37
#3 0xf7a4c81b in __asan_handle_no_return ../../../../../src/libsanitizer/asan/asan_rtl.cpp:595
#4 0x566a1ce7 in bthread_schedule /home/a3f/dl/barebox-stm32mp/common/bthread.c:178
#5 0x566a1d54 in bthread_reschedule /home/a3f/dl/barebox-stm32mp/common/bthread.c:165
#6 0x566a1d80 in bthread_trampoline /home/a3f/dl/barebox-stm32mp/common/bthread.c:56
#7 0x567f5bfb in coroutine_bootstrap (/home/a3f/dl/build/barebox/sandbox/barebox+0x1bdbfb)
#8 0x567f5c4b in coroutine_trampoline (/home/a3f/dl/build/barebox/sandbox/barebox+0x1bdc4b)
#9 0xf7f7056f (linux-gate.so.1+0x56f)
#10 0xf7f70558 (linux-gate.so.1+0x558)
#11 0x56892fff (/home/a3f/dl/build/barebox/sandbox/barebox+0x25afff)
Just disable the special ASan accounting there until this is figured
out. bthreads still function there, but ASan may yield false positives
according to the message. This does not affect non-sandbox platforms.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
To extend incoming bthread support to sandbox, implement setjmp, longjmp
and initjmp. Unlike bare metal platforms, setjmp() and longjmp() are
readily provided on standard-conforming hosted platforms. initjmp() on
the other hand requires us to be able to invoke a function with a
user-supplied stack pointer, which isn't possible in standard C.
For POSIX systems, there are two methods to portably achieve this though:
- Use makecontext(2) to set up a new context. makecontext(2) was however
removed in POSIX.1-2008 and at least GCC 10.2.1 ASan complains that it
"doesn't fully support makecontext/swapcontext functions and may
produce false positives in some cases!"
- Use sigaltstack to set a new signal stack, raise the signal call,
setjmp in the signal handler to store the new stack pointer, return
regularly from signal handler and then longjmp back
Both methods are implemented in QEMU. While QEMU uses the makecontext
method by default, for the reasons described, import the second implementation
and use it implement initjmp.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
| |
fd could be uninitialized in some error paths. Give it a value that
close can be called on without adverse effect.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
SDL 2.0.4 features SDL_QueueAudio, which we could use to just queue
buffers for audio playback. Use it to implement the new sound API for
the sandbox architecture.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
SDL 2.0 has been released more than 7 years ago and should be available
everywhere. Replace barebox's SDL 1.2 with SDL 2.0 instead:
- better maintained
- At least on Debian, you can't install x86_64 and i386 libsdl-dev at
the same time, which makes a quick use of CONFIG_SANDBOX_LINUX_I386
harder as the user needs to reinstall libraries. With SDL 2.0, it
works
- SDL 2.0 has easier audio API, which will be used in a later commit
- Wayland support for sandbox video driver
Port to SDL 2.0 and as we touch everything anyway, rename the
sdl_ functions to start with sdl_video_ to differentiate from upcoming
sdl_sound_.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This allows an easy way to test upcoming changes to the barebox block
layer to support 64-bit block IO.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
4M of malloc space is quite limited when comparing this to the systems
that run Linux and use barebox for bootstrap. Increase the malloc size
in sandbox to be better able to test code that does bigger allocations.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
barebox' use of int for the sector offset puts an upper bound of 1TB on
the size of supported block devices, which is already exceeded by common
place USB mass storage. Increasing the sizes involved to 64 bit
like Linux does won't magically add missing driver support, but it gives
us at least a fighting chance. Do so.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If barebox detects that an --image file is a block device, it will try
to represent it as a block device internally as well, provided that
the user didn't explicitly specify that it should be mapped as a
character device instead. The hf_info::is_cdev member used to indicate
this override wasn't initialized though, so detection was unreliable,
Fix this.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
| |
`make hosttools_defconfig` shows that PARTITION_DISK was selected
without all its dependencies being enabled as well.
Select the missing PARTITION symbol to fix this.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
5211e428cbab ("image: Convert the IH_... values to enums") removed the
IH_ARCH_LINUX enumeration value leading to breakage of sandbox
configurations that enable bootm. Instead of reinstating IH_ARCH_LINUX,
just use IH_ARCH_SANDBOX and remove mention of CONFIG_LINUX altogether,
it's always true anyway when CONFIG_SANDBOX is true.
Fixes: 5211e428cbab ("image: Convert the IH_... values to enums")
Cc: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
CONFIG_MXS_HOSTTOOLS currently only builds the tools mxsimage and
mxsboot, which are both only needed to create bootable images for the
MXS platform, and are not really useful as stand-alone host tools.
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
dc7f1fce6747 ("sandbox: fix SANDBOX_UNWIND dependency to be KASAN
only") already restricted ARCH_HAS_STACK_DUMP to be dependent
only on AddressSanitizer being available.
This change got lost by an erroneous merge conflict resolution in
39bdcdfb814a ("Merge branch 'for-next/misc' into master"). Fix it up.
Fixes: 39bdcdfb814a ("Merge branch 'for-next/misc' into master")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Recent commits have modified sandbox for easier support of many common
features:
- block devices
- watchdogs
- reset source
- reboot mode
- barebox state
Enable those in defconfig along with some other useful options.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For testing barebox-state, it would be nice to have a state
pre-configured out-of-the-box. Add one to sandbox.dts.
Because the barebox message on an non-configured state can looks
quite scary, add an init script that tells the user that all
is well.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Add SIGALRM based watchdog driver. This can reset barebox if stuck and
plays nicely with $global.system.reset.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Having a default reboot mode in the device tree allows testing the
functionality out of sandbox without prior setup.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
We can differentiate between POR and RST by explicitly storing RST as
reset reason when we invoke the reset handler. Do so.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Follow-up will extend the poweroff driver to support system reset source.
Set the stage by renaming the driver to power (as it does reset as well)
and make it probe from device tree, so it can point at the system reset
source syscon via phandle.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Now that we can define a hostfile that's persistent over barebox resets,
but does not rely on a hard coded filename, we can have an always-on
environment node.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently, hostfils without a barebox,filename are assigned a new
temporary file on every start.
For use of a hostfile syscon for reboot mode or reset source, we will
need to persist the changes over a regular reset. This can easily be
done by passing through all automatically created temporary file with
an explicit --image option on subsequent runs. Do so.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
So far use of hostfile in the device tree required us to hard code a file
name. If we instead create a temporary file on demand, we can support:
- environment
- barebox-state
- syscon for reset source and reboot mode
out of the box with no dependency on external files.
Do the necessary, so a hostfile device tree node without a
barebox,filename gets a temporary file generated with the appropriate
size.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
801b7cff0210 ("sandbox: hostfile: allow probing from device tree") added
initial support for probing hostfiles out of a non-fixed up device tree.
This was achieved by having the driver probe call linux_open if the device
tree node doesn't contain a valid barebox,fd property. A mmap did not
happen in that case and as such the node couldn't be used as a syscon.
Fix this by unifying the binding for hostfiles added by --image and ones
already in the device tree. Both will result in a device node with just
a barebox,filename property. On pure init level, both kinds of hostfiles
will be iterated through and filenames will be opened and mmaped.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Follow up commits will flesh out the sandbox.dts and make most of what's
in the skeleton.dtsi redundant. Merge the .dtsi with the .dts to have
all the code at one place.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|