-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvendor_usb.py
executable file
·35 lines (29 loc) · 1.05 KB
/
vendor_usb.py
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
#!/usr/bin/env python3
# Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
import subprocess
import glob
ot_dir = '../opentitan'
# Detect all vendored IPs
ip_list = glob.glob('*vendor.hjson')
# Vendor!
for ip in ip_list:
print('vendoring ' + ip)
cmd = [ot_dir + '/' + 'util/vendor.py', ip, '--commit']
subprocess.run(cmd)
# https://github.com/lowRISC/stwg-base/issues/406
# Export patches:
## $ cd $STWG_BASE_TOP
## $ cd hw/vendor/lowrisc_ibex
## $ git format-patch --relative -o /tmp/patches origin/master
#Example:
# cd vendor
# git format-patch --relative -o patches/usbpe/ 266a91df0a0b330c79aee8edf038ac9f899c971a // commit when we did the last vendor in
# creates one patch per commit since then, patches are empty if not files in current dir affected
# adjust paths in patches to OT base
# Import patches (you must have the upstream repo somwhere):
#$ cd ~/src/upstream
#$ git fetch
#$ git checkout -b a-branch-name-for-your-features
#$ git am /tmp/patches/*.patch