linuxOS_D21X/tools/scripts/mk_image_wrapper.py

19 lines
543 B
Python
Raw Normal View History

2024-11-29 08:13:19 +00:00
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
2024-11-29 08:33:21 +00:00
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (C) 2024 ArtInChip Technology Co., Ltd
# Author: ArtInChip
2024-11-29 08:13:19 +00:00
import sys
import os
# 该脚本的主要目的是去掉命令行的第一个参数 sys.argv[1],这个参数是 buildroot 强制传入的
cmd = str(sys.argv[0])
#print("cmd: " + cmd)
cmd_str = cmd.replace('mk_image_wrapper', 'mk_image')
#print("cmd_str: " + cmd_str)
cmd_str = "python3 " + cmd_str + " " + " ".join(sys.argv[2:])
#print("cmd_str: " + cmd_str)
p = os.system(cmd_str)