How to add device-specific base-files for building an image?

I am trying to add some scripts that are specific to a device (TP Link RE-650 V1). How can I do that ?

If I add files to :

/master/target/linux/ramips/mt7621/base-files/etc/uci-defaults

This will apply to all mt7621 devices. How can I instruct build system to include some scripts only for a specific device ?

Does this help?

Thanks, it is somewhat related.

Say if a developer selects this device via menuconfig, how can I instruct build system to include certain base-files ?

Or, is there a way to make base-files directory itself device-specific ?

afaik it's not possible, at the moment all scripts in base-files are added to all devices in the same target.

You need to add code in your script that detects device type and run only for the correct device.

Check how other scripts do it, for example this https://github.com/openwrt/openwrt/blob/master/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount

2 Likes

Thanks, this should achieve the same target.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.