Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 05EBBEB64DA for ; Sat, 17 Jun 2023 20:28:31 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6B5BE85DB6; Sat, 17 Jun 2023 22:28:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; secure) header.d=gmx.de header.i=xypron.glpk@gmx.de header.b="hiiBk9bc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6620A862E8; Sat, 17 Jun 2023 22:28:28 +0200 (CEST) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1F8C285D8B for ; Sat, 17 Jun 2023 22:28:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xypron.glpk@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1687033703; x=1687638503; i=xypron.glpk@gmx.de; bh=F9evIMMRnY3pyoSrgDBdbSA0dLl7igz7wTGhz2pZ9FI=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=hiiBk9bc9PgUC7L0F+h1GGzTY5BH13b37xX+68LcrYOvmRm4gzINdWNp01Ux4koawgL5Oqb KCiOoyd1Sjs5Kwt6yqLzjsGd0OJRwLHX5abgEtLKrOa62c904294fAOoIwPi5pY1PV4QbOoT+ /wMM/oFI2p6fEa25HolvS48TS6IB778k9fhkiBRb6u9byOLwglzgzVBhLGGq6dsyzToQZgRuA 35FvgYFauapk2/rFTUpas4WHqOJFPck7qeU45oxEFy5FmZgluAOy98S0NCqbV2O96ws5MD7q6 pW64f9Upl2GWssTxe+rQZh6kFEliFSNNi1skY4l/PnebKwG0BdAg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.123.94] ([84.119.33.219]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MwQXN-1psOiw0sKL-00sPC0; Sat, 17 Jun 2023 22:28:23 +0200 Message-ID: Date: Sat, 17 Jun 2023 22:28:24 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH] menu: Re-enable the ANSI codes Content-Language: en-US To: Simon Glass , =?UTF-8?Q?Pali_Roh=c3=a1r?= Cc: U-Boot Mailing List , Mark Kettenis , Frank Wunderlich , Ilias Apalodimas , Masahisa Kojima , Stefan Roese , Tom Rini References: <20230612201434.861700-1-sjg@chromium.org> <20230612202247.cqo4wbrlc7ckbdpj@pali> <20230612213318.4hum2bn3bwoe4n3v@pali> <20230615165621.humixhmo4pgxzisi@pali> From: Heinrich Schuchardt In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:lJWxRVrLrpJfRFMBmJlW56V+HsPFDbgnZWz2IbeUTAbNlag1vhX BoOMC5cY6Wdv8V7KM32jCf0Lv4aFESQa4LUWtkoTqOEQ4IU+S+X9EJC00e2uoC1iS20WMSL yxDS9n7YRUrmXrEbBZO8BuJKnfWEpmalPxMzuJCoaMlyDegr8O1GfKlhjp1tNWX26ZqtOuW WA+IAqtpFOnHnLzau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ailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean On 6/17/23 12:48, Simon Glass wrote: > Hi Pali, > > On Thu, 15 Jun 2023 at 17:56, Pali Roh=C3=A1r wrote: >> >> On Thursday 15 June 2023 13:34:09 Simon Glass wrote: >>> Hi Pali, >>> >>> On Mon, 12 Jun 2023 at 22:33, Pali Roh=C3=A1r wrote: >>>> >>>> On Monday 12 June 2023 22:17:48 Simon Glass wrote: >>>>> Hi Pali, >>>>> >>>>> On Mon, 12 Jun 2023 at 21:22, Pali Roh=C3=A1r wrot= e: >>>>>> >>>>>> On Monday 12 June 2023 21:14:32 Simon Glass wrote: >>>>>>> The intent here was to allow ANSI codes to be disabled, since it w= as >>>>>>> proving impoosible to test operation of the menu code when it kept= moving >>>>>>> the cursor. Unfortunately this ended up in the patch. >>>>>>> >>>>>>> Correct this by enabling ANSI again. >>>>>>> >>>>>>> Signed-off-by: Simon Glass >>>>>>> Reported-by: Pali Roh=C3=A1r >>>>>>> Reported-by: Mark Kettenis >>>>>>> Reported-by: Frank Wunderlich >>>>>>> Fixes: 32bab0eae51b ("menu: Make use of CLI character processing") >>>>>>> --- >>>>>>> >>>>>>> common/menu.c | 2 +- >>>>>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>>>>> >>>>>>> diff --git a/common/menu.c b/common/menu.c >>>>>>> index 94514177e4e9..b55cf7b99967 100644 >>>>>>> --- a/common/menu.c >>>>>>> +++ b/common/menu.c >>>>>>> @@ -15,7 +15,7 @@ >>>>>>> >>>>>>> #include "menu.h" >>>>>>> >>>>>>> -#define ansi 0 >>>>>>> +#define ansi 1 >>>>>>> >>>>>>> /* >>>>>>> * Internally, each item in a menu is represented by a struct me= nu_item. >>>>>>> -- >>>>>>> 2.41.0.162.gfafddb0af9-goog >>>>>>> >>>>>> >>>>>> Hello, I have tested this change but bootmenu still does not work. = There >>>>>> is still same issue which I reported month ago. When I press DOWN k= ey >>>>>> then bootmenu immediately quit instead of moving into the next entr= y. >>>>> >>>>> Thanks for testing this. >>>>> >>>>> Is there a way for me to test this with sandbox? Or does your Nokia >>>>> test check it? >>>> >>>> I guess that bootmenu command could work in sandbox. But I have not >>>> tried it. >>>> >>>> Nokia CI test does not try any terminal, keyboard or VGA interaction,= so >>>> broken rendering or broken keyboard input is not caught by CI. >>>> >>>> But it is possible to test it manually. See U-Boot documentation how = to >>>> run Nokia u-boot image in qemu. Bootmenu is automatically started. >>>> https://u-boot.readthedocs.io/en/latest/board/nokia/rx51.html#run-in-= qemu >>> >>> I tried to follow this but got stuck here: >>> >>> ./configure --enable-system --target-list=3Darm-softmmu --disable-werr= or >>> >>> ERROR: Cannot use 'python', Python 2.4 or later is required. >>> Note that Python 3 or later is not yet supported. >>> Use --python=3D/path/to/python to specify a supported Python. >>> >>> Python 2 has been deprecated for years and I think it was removed rece= ntly. Our Docker image uses Ubuntu 22.04 (Jammy). Ubuntu 22.10 (Kinetic) was the last Ubuntu release providing Python 2.7. So when upgrading our Docker image next year we will have to quit emulating that 14 year old device. >> >> Ach :-( Is not there some configure option to disable python? > > I don't know, but the qemu you are using seems to be 10 years old? The Nokia N900 support never existed in upstream QEMU. Is is only in a Linaro repository that has not been update since 2015. (No clue why our CI uses the 2013 version and not the 2015 one.) I anybody cares about N900 being used in U-Boot's CI he should rework the N900 patch from the Linaro QEMU archive and get it integrated into upstream QEMU. Best regards Heinrich > >> >> In U-Boot CI is qemu compiling without issues (but variant without GUI)= . > > You mean that it still uses python 2? But for how much longer? > > I don't think it is reasonable to base a test on an old version of qemu. > >> >>>> >>>> Bootmenu is available on both VGA display and terminal output. Proble= m >>>> with DOWN key is on the terminal. >>>> >>>>> >>>>> I'm sure you have this commit:? >>>>> >>>>> 17b45e684af9 ("cli: Correct several bugs in cli_getch()") >>>> >>>> Yes, as it is in the master branch already. >>> >>> I tried the following with sandbox: >>> >>> setenv bootmenu_0 "my item=3Decho item 0" >>> setenv bootmenu_1 "second item=3Decho item 1" >>> setenv bootmenu_delay 10 >>> bootmenu >>> >>> I see that with the ANSI patch the 'press key' prompt now appears in >>> the right place. >>> >>> When I press down key repeatedly, it goes down until the last item and >>> then refuses to go any further. >>> >>> So I can't repeat this problem. >> >> Hm... so it looks like some ARM or UART specific thing... or something >> which is not triggered by sandbox. >> >> Just some suggestions, could you try to add some more entries? Or tryin= g >> to wait e.g. 30s before pressing another key (qemu is slow so there can >> be some delay issue?)? Or could you try to run bootmenu on some real >> hardware via UART? > > I did get it going by hacking my machine. > > I'll send a series with some debugging, etc. I am not quite sure what > the problem is, but it seems to be timing-related, or perhaps a bug in > the keyboard code (I found one bug already). > >> >>> I tried looking at the Nokia code. The keyboard driver should be in >>> drivers/input, but I eventually found it in the board directory. >>> >>> Are you sure that rx51_kp_tstc() behaves correctly? Can you add >>> debugging to see what codes it is emitting? >>> >>> Also you don't need to generate escape sequences in rx51_kp_fill(). >>> You can just use Ctrl-N, Ctrl-P, Ctrl-B and Ctrl-F (see cli_ch_esc()). >>> That should simplify things a bit. >>> >>> If you can find a way to repeat this problem and have verified that >>> the Nokia code is correct, I can take another look. >> >> Problem with DOWN key is on the terminal, not on the screen or keyboard= . >> So all those rx51_kp_tstc() and rx51_kp_fill() should not be the cause >> (unless some input/output multiplexing in u-boot takes a role). >> >> Terminal to qemu is connected via qemu's UART emulation, so omap2 uart >> driver in this case is the one which connects u-boot to the qemu's UART >> emulation. >> >>> Regards, >>> Simon >>> >>> [1] https://patchwork.ozlabs.org/project/uboot/patch/20230612201434.86= 1700-1-sjg@chromium.org/ > > Regards, > SImon