[PATCH 1/1] sandbox: support CTRL-C processing in U-Boot
Heinrich Schuchardt
xypron.glpk at gmx.de
Sat Sep 19 20:07:17 CEST 2020
On 9/19/20 3:26 PM, Simon Glass wrote:
> Hi Heinrich,
>
> On Fri, 18 Sep 2020 at 22:19, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>>
>> Am 19. September 2020 04:59:46 MESZ schrieb Simon Glass <sjg at chromium.org>:
>>> Hi Heinrich,
>>>
>>> On Thu, 17 Sep 2020 at 12:04, Heinrich Schuchardt <xypron.glpk at gmx.de>
>>> wrote:
>>>>
>>>> Currently if SIGINT is received, it terminates U-Boot. This does not
>>> allow
>>>> testing the handling of CTRL-C in U-Boot and in UEFI applications.
>>>> It is especially annoying when working with the 'mm' command.
>>>>
>>>> Let the serial console driver provide character 0x03 if SIGINT
>>> occurs. We
>>>> can still exit U-Boot using the reset or poweroff command.
>>>>
>>>> Adjust the sandbox test_ctrl_c() Python test accordingly.
>>>>
>>>> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
>>>> ---
>>>> arch/sandbox/cpu/os.c | 15 ++++++++++++---
>>>> drivers/serial/sandbox.c | 11 ++++++++---
>>>> include/os.h | 14 ++++++++++++++
>>>> test/py/tests/test_sandbox_exit.py | 10 +++++++++-
>>>> 4 files changed, 43 insertions(+), 7 deletions(-)
>>>
>>> I'm sorry but I still do want Ctrl-C to work. How about adding a short
>>> option to change the terminal mode?
>>>
>>> Regards,
>>> Simon
>>
>>
>> On QEMU you quit via <ctrl+A>X. Can we use the same for the sandbox?
>
> I just don't like programs that refused to quit when asked I use> Ctrl-C all the time. Can you not use the -t options to get what you
> want? Perhaps we could have an environment variable too?
Sorry, I was not aware of the -t option.
./u-boot -t raw -d arch/sandbox/dts/test.dtb
behaves according to my preferences.
Best regards
Heinrich
More information about the U-Boot
mailing list