This tools can read/write to the extended CSD register of MMC devices.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Enabling the watchdog before booting the kernel is a common usecase.
Add an option to the boot command and also add a global variable for
it to make it configurable easily.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
SHA1 is meant as a boolean option which is true when sha1 support is available.
This works because the providers (DIGEST_SHA1_GENERIC and DIGEST_SHA1_ARM) have
a 'select SHA1'. However, consumers like the sha1sum command do a 'select SHA1'
to enable SHA1 support. This of course does not work; selecting SHA1 will not
select any of the SHA1 providers.
This is broken for all digest consumers. We have to explicitly select a digest
provider, that is DIGEST_*_GENERIC to enable the corresponding digest.
This means now we will always have the generic digest in the binary, even
when an optimized one is enabled. There is no sane way in Kconfig to
"select provider for feature xy", so let's live with the overhead in the binary.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
We used to have the login functionality in the /env/bin/init script.
This is hard to review and it's too easy to break the login functionality
with changes to this script. Move the places to ask for a password to
C code where we have only a few places where we have to ask for a password.
Mainly these are run_shell() and the menutree command.
This patch introduces a login() function which will only return if the correct
password has been entered. Following calls will return immediately without
asking for a password again.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This replaces the reset_cpu() function which every SoC or board must
provide with registered handlers. This makes it possible to have multiple
reset functions for boards which have multiple ways to reset the machine.
Also boards which have no way at all to reset the machine no longer
have to provide a dummy reset_cpu() function.
The problem this solves is that some machines have external PMICs or
similar to reset the system which have to be preferred over the
internal SoC reset, because the PMIC can reset not only the SoC but also
the external devices.
To pick the right way to reset a machine each handler has a priority. The
default priority is 100 and all currently existing restart handlers are
registered with this priority. of_get_restart_priority() allows to retrieve
the priority from the device tree which makes it possible for boards to
give certain restart handlers a higher priority in order to use this one
instead of the default one.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The fb core now has builtin support for offscreen rendering, use
this and drop offscreen handling in the gui code.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The splash command only makes sense with framebuffer support enabled, so
add the corresponding dependency to Kconfig.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This tool will help to measure the system performance.
Some SoCs haven't the possibility to route their clocks to the output pins.
So you can use dhrystone to get a feedback about the clock speed.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Allocate the screen dynamically in fb_open. This opens the way to create
a fb_create_screen function which takes a struct fb_info * instead of a
filename. This is suitable for the framebuffer console which already has
a struct fb_info *.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
spd_decode command is used for decoding and printing
in human-readable format the information found
in memory module SPD EEPROMs.
There is the decode-dimms program from i2c-tools linux
package (see http://www.lm-sensors.org/wiki/I2CTools)
just for the same purpose.
Though spd_decode source code is based on decode-dimms
perl code there is a difference.
Signed-off-by: Alexander Smirnov <alllecs@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
fix: digest return no error even if the digest length is wrong
fix: documentation error (-v -> -s / -V -> -S)
Signed-off-by: Philippe Leduc <ledphilippe@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Fixes with !CONFIG_LONGHELP:
commands/digest.c:71:13: warning:
'prints_algo_help' defined but not used [-Wunused-function]
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
devinfo on a non existing device prints:
no such device: blah
devinfo: Operation not permitted
The second message comes because devinfo returns -1 which is -EPERM.
Just return -ENODEV which will print:
devinfo: No such device
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
It was possible to login with ctrl-c or an empty password. This bug was
introduced by the recent digest changes in common/password.c (e49a47fb).
The function check_passwd returns now also negative error codes which were
not correctly handled in do_login.
Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
If the size between memory regions is smaller than one page, the
size is rounded down to 0. This results in a region request failure.
This commit skips the memory region whose size is smaller than a page.
Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Use console_get_by_name rather than iterating over the console list in the
loadxy code. The code in loadxy.c used to test whether a console is active
before using it. This check is dropped along the way since there's no reason
to not being able to use a disabled console for loadxy.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
dhcp/bootp was bound to the command functionality.
This patch splits the dhcp command.
We are now able to use bootp without a shell.
This patch adds also a check for environment variables and globalvar.
So only when ENVIRONMENT_VARIABLES and GLOBALVAR is set, all received
dhcp data will be stored.
Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This adds the missing pieces for:
d8a6e1c ARM/mem: handle data aborts gracefully for md
When possible use memmap and directly and dereference the input pointer
directly in memory_display() so that the data abort occurs where we expect
it and not in the md command. With this d8a6e1c can work as expected.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>