예제 #1
0
def pyconfig(RTT_ROOT):
    import pymenuconfig

    touch_env()
    env_dir = get_env_dir()

    os.environ['PKGS_ROOT'] = os.path.join(env_dir, 'packages')

    fn = '.config'

    if os.path.isfile(fn):
        mtime = os.path.getmtime(fn)
    else:
        mtime = -1

    pymenuconfig.main(['--kconfig', 'Kconfig', '--config', '.config'])

    if os.path.isfile(fn):
        mtime2 = os.path.getmtime(fn)
    else:
        mtime2 = -1

    # make rtconfig.h
    if mtime != mtime2:
        mk_rtconfig(fn)
def pyconfig_silent(RTT_ROOT):
    import pymenuconfig
    print("In pyconfig silent mode. Don`t display menuconfig window.")

    touch_env()
    env_dir = get_env_dir()

    os.environ['PKGS_ROOT'] = os.path.join(env_dir, 'packages')

    fn = '.config'

    pymenuconfig.main(['--kconfig', 'Kconfig', '--config', '.config', '--silent', 'True'])

    # silent mode, force to make rtconfig.h
    mk_rtconfig(fn)