Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config.txt customisation overwrites more variables than it should #181

Closed
hhromic opened this issue Jan 22, 2018 · 1 comment
Closed

config.txt customisation overwrites more variables than it should #181

hhromic opened this issue Jan 22, 2018 · 1 comment

Comments

@hhromic
Copy link
Contributor

hhromic commented Jan 22, 2018

Description
The recipe https://github.com/agherzan/meta-raspberrypi/blob/master/recipes-bsp/bootfiles/rpi-config_git.bb is overwriting variables that it shouldn't.
For example the customisation of over_voltage does not only customise the over_voltage variable in the config file but also the over_voltage_min, over_voltage_sdram, over_voltage_sdram_c, over_voltage_sdram_i and over_voltage_sdram_p variables.
This results in over_voltage being duplicated in many places in the config file where the other variables with the same initial names are.
This is the config file being fetched by the recipe and then customised: https://github.com/Evilpaul/RPi-config/blob/master/config.txt

Fortunately, the solution to this is simple and straightforward. The sed script in the recipe should include the = sign after the variable name, like this:

# these lines
sed -i '/#over_voltage/ c\over_voltage=${OVER_VOLTAGE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt

# should be like these lines (note the = sign after the variable name)
sed -i '/#over_voltage=/ c\over_voltage=${OVER_VOLTAGE}' ${DEPLOYDIR}/bcm2835-bootfiles/config.txt

The above should be done in every sed line that customises varaibles.
It's a small bug, harmless, but is a bug anyway and in future could cause problem if other variable names clashes.

Steps to reproduce the issue:

  1. Just build an image and check the resulting config.txt file in /boot. You will notice multiple repetitions of over_voltage or cpu_freq, because of multiple variables beginning with those names.

Describe the results you received:
A config.txt file with duplicate variables.

Describe the results you expected:
A config.txt file with only the customised variable activated, and other variables with the same initial name left untouched.

Additional information you deem important (e.g. issue happens only occasionally):

Additional details (revisions used, host distro, etc.):
This in the master branch.

@hhromic
Copy link
Contributor Author

hhromic commented Jan 29, 2018

thanks for merging the PR!
I confirm it works fine. I'm closing this issue now.

@hhromic hhromic closed this as completed Jan 29, 2018
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

No branches or pull requests

1 participant