[PATCH] tools: mkenvimage: Add pure shell implementation of mkenvimage

Marek Vasut marex at denx.de
Sat Feb 8 22:25:24 CET 2025


On 2/7/25 1:49 AM, Simon Glass wrote:
> Hi Marek,
> 
> On Thu, 6 Feb 2025 at 13:52, Marek Vasut <marex at denx.de> wrote:
>>
>> On 2/6/25 1:38 PM, Simon Glass wrote:
>>> Hi Marek,
>>>
>>> On Wed, 5 Feb 2025 at 07:37, Marek Vasut <marex at denx.de> wrote:
>>>>
>>>> Add implementation of mkenvimage written purely in bourne shell.
>>>>
>>>> This is not a replacement for mkenvimage tool, but rather a simple
>>>> implementation which can be used in environments where mkenvimage
>>>> itself cannot be deployed due to various constraints, like hardware
>>>> manufacturing plants, but where bourne shell and basic tool are
>>>> already available.
>>>>
>>>> The external dependencies which are not shell built-ins are gzip
>>>> and grep.
>>>>
>>>> All mkenvimage parameters are implemented and compatible with the
>>>> C implementation of mkenvimage.
>>>>
>>>> Signed-off-by: Marek Vasut <marex at denx.de>
>>>> ---
>>>> Cc: Joe Hershberger <joe.hershberger at ni.com>
>>>> Cc: Tom Rini <trini at konsulko.com>
>>>> ---
>>>>    tools/mkenvimage.sh | 126 ++++++++++++++++++++++++++++++++++++++++++++
>>>>    1 file changed, 126 insertions(+)
>>>>    create mode 100755 tools/mkenvimage.sh
>>>
>>> Would it be worth adding a simple test for this?
>> Sure, is there an existing test for similar case I can look at ?
> 
> Well test_env_text is something I did for the env2string.awk script,
> so perhaps something like that?

I found some python file in the codebase which contains this function, 
but I couldn't find any documentation how to use it. I am also not a big 
fan of python. Is there any documentation how to use this test ?


More information about the U-Boot mailing list