On 07.06.22 07:58, Mou, ChengShu(Ben) wrote:
> Hello all,
> 
> I’m sorry to trouble you. I met a problem when I use bg_setenv. I tried
> to specify kernel parameters but it failed with message “Error, kernel
> arguments string is too long. Maximum of 255 characters permitted.”
> 
> After checking the code, I found that a constant variable
> ENV_STRING_LENGTH limited the length of file names and kernel
> parameters. As we know, Linux has a length limitation(255) for file
> names. For kernel parameters, there is no limitation like this. If I use
> a customized Linux kernel with parameters more than 255 characters, it
> will fail.
> 
> So, can you provide a workaround for this? Thanks.
> 

You are right, EFI Boot Guard has this unfortunate limitations. We
cannot easily overcome it for the existing versions because it would
break backward compatibility in the field. However, I'm planning to
renovate the config file with a "version 2" and enable EBG to read both
versions. No code written yet, though, just the intention.

Meanwhile, there might be ways for you to reduce your command line
length. Can you explain what makes it that long? E.g., we recently
dropped MTD layout parameters from an embedded board by moving it into
the device tree [1]. That wasn't hitting EBG's limits yet but was
getting close and also improved readability and maintanability.

Jan

[1]
https://github.com/siemens/meta-iot2050/commit/85040da46f6ec3009b96a934bc12fb6cb28de508

-- 
Siemens AG, Technology
Competence Center Embedded Linux

-- 
You received this message because you are subscribed to the Google Groups "EFI 
Boot Guard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/efibootguard-dev/e4c33954-8daf-472d-84d7-52d6d511bfe6%40siemens.com.

Reply via email to