starfive-tech / u-boot

45 stars 33 forks source link

VisionFive 2: Add default compressed kernel address #45

Closed MichaIng closed 1 year ago

MichaIng commented 1 year ago

The default U-Boot environment does not provide kernel_comp_addr_r and kernel_comp_size, needed when using a compressed kernel image. Those are listed below "required" variables in upstream U-Boot to allow this feature without needed user configuration: https://github.com/u-boot/u-boot/blob/master/doc/develop/distro.rst#required-environment-variables

The values are taken from the uEnv.txt shipped by StarFive's own Debian images, which does use a gzip-compressed kernel image hence proven to be valid. Adding those values to the U-Boot default environment allows them to be removed from the dedicated uEnv.txt and enables support for compressed kernel images independent of the used uEnv.txt or whether one is used at all.