• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env python3
2# encoding=utf-8
3# ============================================================================
4# @brief    Build nvbin
5
6# Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
7# Licensed under the Apache License, Version 2.0 (the "License");
8# you may not use this file except in compliance with the License.
9# You may obtain a copy of the License at
10#
11#     http://www.apache.org/licenses/LICENSE-2.0
12#
13# Unless required by applicable law or agreed to in writing, software
14# distributed under the License is distributed on an "AS IS" BASIS,
15# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16# See the License for the specific language governing permissions and
17# limitations under the License.
18# ============================================================================
19
20import os
21import sys
22
23file_dir = os.path.dirname(os.path.realpath(__file__))
24g_root = os.path.realpath(os.path.join(file_dir, "..", ".."))
25sys.path.append(os.path.join(g_root, 'build', 'script', 'nv'))
26from nv_binary import nv_begin
27
28if __name__ == '__main__':
29    args = sys.argv[1:]
30    if (len(args) != 3) or (not os.path.exists(args[0])):
31        print("input args is invalid!\r\n")
32    else:
33        nv_begin(args[0], args[1], 0, False, args[2])
34