コード例 #1
0
    # Skip config
    parser.add_argument('--no-config', action="store_true", help="Skip configure, do not generate a new config.h")

    return parser.parse_args()


if __name__ == "__main__":
    # Parse parameters
    args = get_parameters()

    cwd_root = os.getcwd()

    # Generate config file
    if not args.no_config:
        configure.make_config(args,
                              'src/system/include/config_template.h',
                              'src/system/include/config.h')

    result = 0

    # Build
    if args.os == "LINUX":
        arch = args.arch.lower()
        arch_dir = os.path.join("src/drivers", arch)
        build_dir = "build_{}".format(arch)

        # Install drivers
        if args.drivers:
            os.chdir(arch_dir)
            os.system('sh install.sh')
            os.chdir(cwd_root)
コード例 #2
0
ファイル: compile.py プロジェクト: spel-uchile/TRX_GOMSPACE
    parser.add_argument('--sch_st_triple_wr', type=str, default="1")
    # Build parameters
    parser.add_argument('--drivers', action="store_true", help="Install platform drivers")
    # Force clean
    parser.add_argument('--clean', action="store_true", help="Clean befero build")

    return parser.parse_args()

if __name__ == "__main__":
    # Parse parameters
    args = get_parameters()

    # Generate config file
    cwd_root = os.getcwd()
    configure.make_config(args,
                          'src/system/include/config_template.h',
                          'src/system/include/config.h')

    result = 0

    # Build
    if args.os == "LINUX":
        # Install CSP drivers
        if args.drivers:
            os.chdir('src/drivers/Linux/libcsp')
            os.system('sh install_csp.sh')
            os.chdir(cwd_root)

        os.system('rm -rf build_linux')
        os.system('mkdir build_linux')
        os.chdir('build_linux')