├── RecoNIC
│ └── patches
│ └── open-nic-shell
| └── rdma_onic.patch
└── gen_patch
├── open-nic-shell
└── original
└── open-nic-shell
Fork Xilinx/open-nic-shell to your account ABC
.
2. Clone the forked repository:
$ cd gen_patch
$ git clone https://github.com/ABC/open-nic-shell.git
$ cd open-nic-shell
$ git checkout 520cf7716196765c7cb312d950f3f8b2164bd02d
$ git apply --whitespace=fix ../../RecoNIC/patches/open-nic-shell/rdma_onic.patch
Add your new changes to this repository.
$ mkdir -p gen_patch/original
$ cd gen_patch/original
$ git clone https://github.com/Xilinx/open-nic-shell.git
$ cd open-nic-shell
$ git checkout 520cf7716196765c7cb312d950f3f8b2164bd02d
$ git checkout -b compare-upstream
Add the remote upstream repository and fetch changes:
$ cd gen_patch/original/open-nic-shell
$ git remote add upstream https://github.com/ABC/open-nic-shell.git
$ git fetch upstream
Generate the patch:
$ git diff HEAD upstream/your_branch_name > rdma_onic.patch
Copy the patch to the appropriate directory:
$ cp rdma_onic.patch ../../../RecoNIC/patches/open-nic-shell/
You need to first obtain the submodule, open-nic-shell, in the RecoNIC, if you haven't done it before.
$ cd RecoNIC
$ git submodule update --init base_nics/open-nic-shell
Generate the base NIC with the patch generated:
$ cd ./scripts
$ ./gen_base_nic.sh
If the submodule is dirty, you can use the following commands to clean up the folder:
$ cd your_path_to_submodule
$ git checkout -- .
$ git clean -fd
Please make sure you don't have any errors or trailing whitespace. If you do, modify your repository and go back to step 3.
Copyright© 2021-2024 Advanced Micro Devices, Inc.