If there's noise in the serial line, it will usually end up in Password:
prompt and after timeout, autoboot process will be triggered.
However, if the noise is translated to \n or whatever character code
used to finish the password string, the login() funcion will against
request the password() with the full timeout. If the noise keeps
printing the \n or similar character with a high frequency, barebox will
become stuck in the boot process.
Related: SYS#4128
It is not perfectly clear that these apply to our DM6442, it is not
clear we need them but right now I would like to reduce the delta
from U-Boot to Barebox in terms of system initialization.
So apply some form of cargo cult and do the same as U-boot. This has
not been tested on a board and needs to be done. Then it can be put
back into our "master" branch. But it looks writel takes the value
first and then the address.
When ubifs/ubi corrupts... the only way to recover is to format it
again. We can only do that _if_ the rescue image is not in it. It is
annoying because it means system0/system1 and rescue can not share
the same reservation for badblocks.
The hardware timings for SWITCH_RESET at power-up might not be
sufficient for a proper reset, so let's make sure we put the switch into
reset for at least 10ms (80E6063 requirement) during the boot-up
sequence.
(somehow barebox-state resolves to the entire EEPROM, not the partition
with its offset, so let's move the partition to the start to make sure
barebox and linux agree about this)
If of_state_fixup() fails for some reason, boot/bootm will fail, too
However, it is completely unclear where the error has happened, and to
the user it rather seems like the kernel device tree loaded from some
file was broken/corrupt, not that in fact some fixup routine was
failing.
Adding a meaningful error message can help debugging significantly.
Signed-off-by: Harald Welte <laforge@gnumonks.org>
Unlike at24 (I2C), the at25 (spi) EEPROM driver doesn't check if the
device tree node contains partition definitions. This means that one
for example cannot have bootstate partitions on an at25 EEPROM, while it
works on an at24 EEPROM.
This patch adds device tree based partition support to the at25 driver.
Signed-off-by: Harald Welte <laforge@gnumonks.org>
Upstream barebox has removed the compiler-gcc3/4 header files for
a unified header but I do not want to risk breaking gcc4 support
for the unknown gcc5 work right now.
Replace jiffies from kernel code with get_time_ns. The flags variable
used in the readbytes debug output does not exist.
Signed-off-by: Jan Luebbe <jluebbe@debian.org>
This is based on commit 9dcb0e7b999db6c420c70fd32497a979a044fcdf from
the kernel with some additional fixes.
Signed-off-by: Jan Luebbe <jluebbe@debian.org>
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>
This solves a problem which causes boot failure when using a uImage with
device tree. It should also speed up boot because the kernel can skip
copying itself out of the way.
Signed-off-by: Jan Luebbe <jluebbe@debian.org>