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

build: fix profile duplication for imagebuilder #3777

Closed
wants to merge 1 commit into from

Conversation

kuanyili
Copy link
Contributor

Dumping device info more than once for alternative device title leads to
duplication in .targetinfo and .profiles.mk, which causes problem in
imagebuilder.

When this happens,

  1. make info outputs duplicate/redundent information
  2. make image does not install DEVICE_PACKAGES as it should
  3. manifest filename becomes quirky

Remove duplicates to fix above bugs.

In make menuconfig, users can still press <?> to see alternative
device titles during target profile selection.

Signed-off-by: Kuan-Yi Li kyli@abysm.org

Cc: @aparcar

Two examples to reproduce the problem:

Imagination Technologies Creator Ci40

  1. Get imagebuilder https://downloads.openwrt.org/snapshots/targets/pistachio/generic/openwrt-imagebuilder-pistachio.Linux-x86_64.tar.xz
  2. Run make info, profile appeared twice, with exact same info
  3. Run make image PROFILE="img_creator-ci40" and observe the build message, kmod-tpm-i2c-infineon is not installed
  4. Instead of openwrt-pistachio-img_creator-ci40.manifest, manifest filename is now openwrt-pistachio-img_creator-ci40-img_creator-ci40.manifest

Raspberry Pi 2B/2B 1.2 (32bit)

  1. Get imagebuilder https://downloads.openwrt.org/snapshots/targets/bcm27xx/bcm2709/openwrt-imagebuilder-bcm27xx-bcm2709.Linux-x86_64.tar.xz
  2. Run make info, profile appeared 3 times, with exact same info
  3. Run make image PROFILE="rpi-2" and observe the build message, kmod-brcmfmac is not installed
  4. Instead of openwrt-bcm27xx-bcm2709-rpi-2.manifest, manifest filename is now openwrt-bcm27xx-bcm2709-rpi-2-rpi-2-rpi-2.manifest

Dumping device info more than once for alternative device title leads to
duplication in `.targetinfo` and `.profiles.mk`, which causes problem in
imagebuilder.

When this happens,

1. `make info` outputs duplicate/redundent information
2. `make image` does not install DEVICE_PACKAGES as it should
3. manifest filename becomes quirky

Remove duplicates to fix above bugs.

In `make menuconfig`, users can still press <?> to see alternative
device titles during target profile selection.

Signed-off-by: Kuan-Yi Li <kyli@abysm.org>
@aparcar
Copy link
Member

aparcar commented Jan 11, 2021

Could you please have a look at this patch and see if it resolves the issue?

@kuanyili
Copy link
Contributor Author

Could you please have a look at this patch and see if it resolves the issue?

Cool! I applied your patch, rebuild the image builder for both of the examples and it worked like a charm!

Please feel free to close this PR whenever you see fit. Thanks!

@aparcar
Copy link
Member

aparcar commented Jan 13, 2021

I'll close this as it's superseded via https://patchwork.ozlabs.org/project/openwrt/list/?series=224020

@aparcar aparcar closed this Jan 13, 2021
@kuanyili kuanyili deleted the fix-profile-duplication branch January 13, 2021 02:26
@adschm adschm added the build/scripts/tools pull request/issues for build, scripts and tools related changes label Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build/scripts/tools pull request/issues for build, scripts and tools related changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants