Skip to content

base: kernel-lmp-fitimage: fix loadable and dtb counters#445

Merged
ricardosalveti merged 1 commit intofoundriesio:masterfrom
mike-scott:master-fix-loadable-counter
Oct 21, 2021
Merged

base: kernel-lmp-fitimage: fix loadable and dtb counters#445
ricardosalveti merged 1 commit intofoundriesio:masterfrom
mike-scott:master-fix-loadable-counter

Conversation

@mike-scott
Copy link
Copy Markdown
Contributor

In fitimage_assemble, we use a shell variable "i" to keep track
of the number of DTBs we've added. This variable is compared
to "dtbcount" in order to see if we're on the first or "default"
dtb.

However, we also use the "i" variable in fitimage_emit_section_config
to keep a running count of loadables so that we can name them
"loadable_${i}" for uniqueness.

This means anytime "FIT_LOADABLES" is set, we are messing with the DTB
counter and it causes more than 1 "default" node to possibly be set.

Fix this by not using the "i" variable in fitimage_emit_section_config.

Signed-off-by: Michael Scott [email protected]

In fitimage_assemble, we use a shell variable "i" to keep track
of the number of DTBs we've added.  This variable is compared
to "dtbcount" in order to see if we're on the first or "default"
dtb.

However, we also use the "i" variable in fitimage_emit_section_config
to keep a running count of loadables so that we can name them
"loadable_${i}" for uniqueness.

This means anytime "FIT_LOADABLES" is set, we are messing with the DTB
counter and it causes more than 1 "default" node to possibly be set.

Fix this by not using the "i" variable in fitimage_emit_section_config.

Signed-off-by: Michael Scott <[email protected]>
Copy link
Copy Markdown
Contributor

@Tim-Anderson Tim-Anderson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Member

@ricardosalveti ricardosalveti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ricardosalveti ricardosalveti merged commit 01ce61c into foundriesio:master Oct 21, 2021
@mike-scott mike-scott deleted the master-fix-loadable-counter branch July 21, 2023 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants