How to apply Build System .config file to another Target Device

Hi

I have a diffconfig file that was generated from a .config file made through make menu config for a Linksys WRT1900ACS. I have spent some time configuring all of the packages and utilities I want to include in my firmware, but I now want to apply the .config file to a new device with a different Target device.

I have been referring to this help document >> https://openwrt.org/docs/guide-developer/build-system/use-buildsystem

I tried coping diffconfig to .config with cp diffconfig .config and then expanded the config to a full config with make defconfig. I then used make menuconfig and changed the Target device and profile and went into one of the menus and the settings are reset.

Update
Okay I've found a possible solution

  1. Delete all configs or rename current .config to something else
  2. Run make menuconfig
  3. Select Target System, Subtarget and Target Profile
  4. Exit and save to .config
  5. Run ./scripts/diffconfig.sh > new_device
  6. Open new_device file and copy lines 1-3 containing the kernel target
  7. Run cp diffconfig .config (other fully configured device)
  8. Open .config and replace lines 1-3 with the the three lines from new_device
  9. Run make defconfig
  10. Run make menuconfig to confirm your packages are still intact
2 Likes