If users want to make modifications to a BSP/library, or Driver source in SDK these will be overwritten if the BSP is regenerated. The recommended way to do this is to make a local copy of the library, driver or bsp
and add this as a repository in SDK.

For example, lets take the lwip.

Step 1: Copy the LwIP library from the SDK install:

lwip.PNG

Step 2: Set up the folder hierarchy and copy:

The folder hierarchy here is important, this should match the the same hierarchy in the SDK install:
folder.PNG
Copy the lwip141_v2_0 from the SDK install to the sw_services folder in your local repo

Note: I have updated the MLD file to let me know that I am using a custom version of the library:
mld.PNG

Step 3: Add the repository to SDK:
Xilinx -> Repostories. Select New, and point to the repo folder:
repo.PNG
Note: Users will need to Rescan Repositories everytime a change is made to the source files.

Step 4: Build the BSP, and enable LwIP to test:

Create a BSP, and in the BSP settings, you should see the custom lwip:
bsp.PNG