File: README-adi.md

package info (click to toggle)
bladerf 0.2022.11-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 373,752 kB
  • sloc: ansic: 1,186,428; xml: 150,799; vhdl: 24,182; tcl: 15,408; python: 3,409; sh: 1,551; makefile: 1,255; asm: 158; csh: 18; cpp: 9
file content (64 lines) | stat: -rw-r--r-- 1,709 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Subtree Instructions

The hdl/ subdirectory is a git subtree.

## Creating the subtree

Clear `hdl/fpga/ip/analogdevicesinc/hdl` to pave the way for the subtree:

```
rm -rf hdl/fpga/ip/analogdevicesinc/hdl
git add hdl/
git commit -m 'hdl/analogdevicesinc: remove manual adi hdl codebase integration'
```

Fetch vendor master:

```
git remote add adi-hdl https://github.com/analogdevicesinc/hdl.git
git fetch adi-hdl master
```

Add the subtree:

```
git subtree add -P hdl/fpga/ip/analogdevicesinc/hdl adi-hdl/master --squash
```

Prune unneeded subdirectories:

```
cd hdl/fpga/ip/analogdevicesinc/hdl
git rm -r library/* projects/*
git reset HEAD library/axi_ad9361 library/axi_dmac library/common library/scripts \
    library/util_axis_fifo library/util_axis_resize library/util_cpack library/util_upack \
    projects/arradio
git checkout -- library/axi_ad9361 library/axi_dmac library/common library/scripts \
    library/util_axis_fifo library/util_axis_resize library/util_cpack library/util_upack \
    projects/arradio
git commit -m 'hdl/analogdevicesinc: prune unnecessary subdirectories from ADI repo'
```

Replay our modifications to the vendor code, omitting the oldest commit (1ed07b8, a commit
of a copy of the ADI repo) and the three most recent commits (the rm of the hdl tree, and the
two subtree merges):

```
git cherry-pick -X ours \
    $(git rev-list --reverse HEAD~3 ^1ed07b8 hdl/fpga/ip/analogdevicesinc/hdl)
```

## Updating the subtree

Fetch new vendor master:

```
git remote add adi-hdl https://github.com/analogdevicesinc/hdl.git
git fetch adi-hdl master
```

Merge the updated subtree:

```
git subtree merge -P hdl/fpga/ip/analogdevicesinc/hdl adi-hdl/master --squash
```