Message ID | 20230801093706.1347928-3-felix.moessbauer@siemens.com |
---|---|
State | Accepted, archived |
Headers | show |
Series | Rework and extend u-boot-script for DT overlays | expand |
On 01.08.23 11:37, Felix Moessbauer wrote: > As we already expand the DT overlays variable in the code generation, we > do not need to loop over the elements in the generated code again. This > reduces the size of the boot.src script a little and makes it better > readable. > > No functional change. > > Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com> > --- > meta/recipes-bsp/u-boot-script/files/update-u-boot-script | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/meta/recipes-bsp/u-boot-script/files/update-u-boot-script b/meta/recipes-bsp/u-boot-script/files/update-u-boot-script > index e9ace15e..14a81563 100755 > --- a/meta/recipes-bsp/u-boot-script/files/update-u-boot-script > +++ b/meta/recipes-bsp/u-boot-script/files/update-u-boot-script > @@ -63,13 +63,11 @@ if [ -n "${OVERLAYS}" ]; then > if ! echo $OVERLAY | grep -q "^/"; then > OVERLAY_PATH=/usr/lib/linux-image-${KERNEL_VERSION}/ > fi > - echo "for entry in ${OVERLAY}; do" >> ${BOOT_CMD} > - echo "echo Loading ${OVERLAY_PATH}\${entry}..." >> ${BOOT_CMD} > + echo "echo Loading ${OVERLAY_PATH}${OVERLAY} ..." >> ${BOOT_CMD} > echo "load \${devtype} \${devnum}:${ROOT_PARTITION}" \ > - "\${overlay_addr_r} ${OVERLAY_PATH}\${entry}" \ > + "\${overlay_addr_r} ${OVERLAY_PATH}${OVERLAY}" \ > >> ${BOOT_CMD} > echo "fdt apply \${overlay_addr_r}" >> ${BOOT_CMD} > - echo "done" >> ${BOOT_CMD} > done > fi > NACK, see commit 8b9f930410234ad46135df3642bc0c7053fc854b. Jan
On Tue, 2023-08-08 at 10:48 +0200, Jan Kiszka wrote: > On 01.08.23 11:37, Felix Moessbauer wrote: > > As we already expand the DT overlays variable in the code > > generation, we > > do not need to loop over the elements in the generated code again. > > This > > reduces the size of the boot.src script a little and makes it > > better > > readable. > > > > No functional change. > > > > Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com> > > --- > > meta/recipes-bsp/u-boot-script/files/update-u-boot-script | 6 ++-- > > -- > > 1 file changed, 2 insertions(+), 4 deletions(-) > > > > diff --git a/meta/recipes-bsp/u-boot-script/files/update-u-boot- > > script b/meta/recipes-bsp/u-boot-script/files/update-u-boot-script > > index e9ace15e..14a81563 100755 > > --- a/meta/recipes-bsp/u-boot-script/files/update-u-boot-script > > +++ b/meta/recipes-bsp/u-boot-script/files/update-u-boot-script > > @@ -63,13 +63,11 @@ if [ -n "${OVERLAYS}" ]; then > > if ! echo $OVERLAY | grep -q "^/"; then > > OVERLAY_PATH=/usr/lib/linux-image- > > ${KERNEL_VERSION}/ > > fi > > - echo "for entry in ${OVERLAY}; do" >> ${BOOT_CMD} > > - echo "echo Loading ${OVERLAY_PATH}\${entry}..." >> > > ${BOOT_CMD} > > + echo "echo Loading ${OVERLAY_PATH}${OVERLAY} ..." > > >> ${BOOT_CMD} > > echo "load \${devtype} > > \${devnum}:${ROOT_PARTITION}" \ > > - "\${overlay_addr_r} ${OVERLAY_PATH}\${entry}" > > \ > > + "\${overlay_addr_r} ${OVERLAY_PATH}${OVERLAY}" > > \ > > >> ${BOOT_CMD} > > echo "fdt apply \${overlay_addr_r}" >> ${BOOT_CMD} > > - echo "done" >> ${BOOT_CMD} > > done > > fi > > > > NACK, see commit 8b9f930410234ad46135df3642bc0c7053fc854b. Ok, got it. But there should be a comment in the code about this particular detail. I'll add one when re-proposing the u-boot DT patches which unfortunately got reverted as well. Felix > > Jan >
diff --git a/meta/recipes-bsp/u-boot-script/files/update-u-boot-script b/meta/recipes-bsp/u-boot-script/files/update-u-boot-script index e9ace15e..14a81563 100755 --- a/meta/recipes-bsp/u-boot-script/files/update-u-boot-script +++ b/meta/recipes-bsp/u-boot-script/files/update-u-boot-script @@ -63,13 +63,11 @@ if [ -n "${OVERLAYS}" ]; then if ! echo $OVERLAY | grep -q "^/"; then OVERLAY_PATH=/usr/lib/linux-image-${KERNEL_VERSION}/ fi - echo "for entry in ${OVERLAY}; do" >> ${BOOT_CMD} - echo "echo Loading ${OVERLAY_PATH}\${entry}..." >> ${BOOT_CMD} + echo "echo Loading ${OVERLAY_PATH}${OVERLAY} ..." >> ${BOOT_CMD} echo "load \${devtype} \${devnum}:${ROOT_PARTITION}" \ - "\${overlay_addr_r} ${OVERLAY_PATH}\${entry}" \ + "\${overlay_addr_r} ${OVERLAY_PATH}${OVERLAY}" \ >> ${BOOT_CMD} echo "fdt apply \${overlay_addr_r}" >> ${BOOT_CMD} - echo "done" >> ${BOOT_CMD} done fi
As we already expand the DT overlays variable in the code generation, we do not need to loop over the elements in the generated code again. This reduces the size of the boot.src script a little and makes it better readable. No functional change. Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com> --- meta/recipes-bsp/u-boot-script/files/update-u-boot-script | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)