Exemplo n.º 1
0
def MAIN_ENV(args):
    set_global(args)

    ops.exportEnv(ops.setEnv("CC", ops.getEnv("CROSS_COMPILE") + "gcc"))
    ops.exportEnv(ops.setEnv("CXX", ops.getEnv("CROSS_COMPILE") + "g++"))
    ops.exportEnv(ops.setEnv("CROSS", ops.getEnv("CROSS_COMPILE")))
    ops.exportEnv(ops.setEnv("DESTDIR", install_tmp_dir))
    ops.exportEnv(
        ops.addEnv("PATH", ops.path_join(install_tmp_dir, "usr/local/bin")))

    cc_sysroot = ops.getEnv("CC_SYSROOT")

    cflags = ""
    cflags += " -I" + ops.path_join(cc_sysroot, 'usr/include')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/mesa/')

    ldflags = ""
    ldflags += " -L" + ops.path_join(cc_sysroot, 'lib')
    ldflags += " -L" + ops.path_join(cc_sysroot, 'usr/lib')
    ldflags += " -L" + ops.path_join(iopc.getSdkPath(), 'lib')
    ldflags += " -L" + ops.path_join(iopc.getSdkPath(), 'usr/lib')

    libs = ""
    libs += " -lgbm -lexpat -lxml2 -ldrm"
    ops.exportEnv(ops.setEnv("LDFLAGS", ldflags))
    ops.exportEnv(ops.setEnv("CFLAGS", cflags))
    ops.exportEnv(ops.setEnv("LIBS", libs))
    #extra_conf.append('CFLAGS="-I' + ops.path_join(iopc.getSdkPath(), 'usr/include/libz') + '"')

    return False
Exemplo n.º 2
0
def MAIN_ENV(args):
    set_global(args)

    ops.exportEnv(ops.setEnv("CC", ops.getEnv("CROSS_COMPILE") + "gcc"))
    ops.exportEnv(ops.setEnv("CROSS", ops.getEnv("CROSS_COMPILE")))

    return False
Exemplo n.º 3
0
def MAIN_CONFIGURE(args):
    set_global(args)

    print ops.getEnv("PKG_CONFIG_PATH")
    extra_conf = []
    extra_conf.append("--host=" + cc_host)
    extra_conf.append("--enable-egl-backend=yes")
    extra_conf.append("--enable-wayland-compositor=yes")
    extra_conf.append("--disable-glibtest")
    '''
    includes = '-I' + ops.path_join(iopc.getSdkPath(), 'usr/include/libglib/glib-2.0')
    includes += ' -I' + ops.path_join(iopc.getSdkPath(), 'usr/include/libglib')
    extra_conf.append('CFLAGS=' + includes)
    extra_conf.append('GLIB_CFLAGS=' + includes)
    libs = ' -lglib-2.0 -lgobject-2.0 -lgio-2.0 -lgthread-2.0 -lgmodule-2.0 -lpthread -lz -lffi -lpcre'
    extra_conf.append('LIBS=-L' + ops.path_join(iopc.getSdkPath(), 'lib') + libs)
    extra_conf.append('GLIB_LIBS=-L' + ops.path_join(iopc.getSdkPath(), 'lib') + libs)
    extra_conf.append("--disable-documentation")

    extra_conf.append('FFI_CFLAGS="-I' + ops.path_join(iopc.getSdkPath(), 'usr/include/libffi') + '"')
    extra_conf.append('FFI_LIBS="-L' + ops.path_join(iopc.getSdkPath(), 'lib') + ' -lffi"')
    extra_conf.append('EXPAT_CFLAGS="-I' + ops.path_join(iopc.getSdkPath(), 'usr/include/libexpat') + '"')
    extra_conf.append('EXPAT_LIBS="-L' + ops.path_join(iopc.getSdkPath(), 'lib') + ' -lexpat"')
    extra_conf.append('LIBXML_CFLAGS="-I' + ops.path_join(iopc.getSdkPath(), 'usr/include/libxml2') + '"')
    extra_conf.append('LIBXML_LIBS="-L' + ops.path_join(iopc.getSdkPath(), 'lib') + ' -lxml2"')
    '''
    iopc.configure(tarball_dir, extra_conf)

    return True
Exemplo n.º 4
0
def MAIN_ENV(args):
    set_global(args)

    ops.exportEnv(ops.setEnv("CC", ops.getEnv("CROSS_COMPILE") + "gcc"))
    ops.exportEnv(ops.setEnv("CXX", ops.getEnv("CROSS_COMPILE") + "g++"))
    ops.exportEnv(ops.setEnv("CROSS", ops.getEnv("CROSS_COMPILE")))
    ops.exportEnv(ops.setEnv("DESTDIR", install_tmp_dir))
    #ops.exportEnv(ops.setEnv("PKG_CONFIG_LIBDIR", ops.path_join(iopc.getSdkPath(), "pkgconfig")))
    #ops.exportEnv(ops.setEnv("PKG_CONFIG_SYSROOT_DIR", iopc.getSdkPath()))

    cc_sysroot = ops.getEnv("CC_SYSROOT")
    cflags = ""
    cflags += " -I" + ops.path_join(cc_sysroot, 'usr/include')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libdrm')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(),
                                    'usr/include/libdrm/libdrm')

    ldflags = ""
    ldflags += " -L" + ops.path_join(cc_sysroot, 'lib')
    ldflags += " -L" + ops.path_join(cc_sysroot, 'usr/lib')
    ldflags += " -L" + ops.path_join(iopc.getSdkPath(), 'lib')

    libs = ""
    libs += " -lffi -lxml2 -lexpat -ldrm"
    #ops.exportEnv(ops.setEnv("LDFLAGS", ldflags))
    #ops.exportEnv(ops.setEnv("CFLAGS", cflags))
    #ops.exportEnv(ops.setEnv("LIBS", libs))

    return False
Exemplo n.º 5
0
def set_global(args):
    global pkg_path
    global output_dir
    global tarball
    global def_config
    global build_dir
    global build_arch
    global image_path
    global pre_loader_path
    global jobs_count
    pkg_args = args["pkg_args"]
    #def_cfg_version = "default_" + pkg_args["version"] + ".config"
    def_config = pkg_args["version"]
    pkg_path = args["pkg_path"]
    output_dir = args["output_path"]
    arch = ops.getEnv("ARCH_ALT")
    build_arch = ops.getEnv("ARCH")
    jobs_count = ops.getEnv("BUILD_JOBS_COUNT")
    tarball = ops.path_join(pkg_path, UBOOT_VERSION + ".tar.bz2")
    build_dir = ops.path_join(output_dir, UBOOT_VERSION)
    #src_def_config = ops.path_join(pkg_path, def_cfg_version)
    if arch == "armel":
        image_path = "u-boot.bin"
        pre_loader_path = "MLO"
    elif arch == "x86_64":
        build_arch = "x86"
        image_path = "arch/x86/boot/bzImage"
    else:
        sys.exit(1)
    #dst_def_config = ops.path_join(build_dir, ".config")
    if jobs_count == "":
        jobs_count = "2"
Exemplo n.º 6
0
def set_global(args):
    global pkg_path
    global output_dir
    global tarball_pkg
    global install_dir
    global install_tmp_dir
    global tarball_dir
    global cc_host
    global tmp_include_dir
    global dst_include_dir
    global dst_lib_dir
    global dst_bin_dir
    global install_test_utils
    pkg_path = args["pkg_path"]
    output_dir = args["output_path"]
    tarball_pkg = ops.path_join(pkg_path, TARBALL_FILE)
    install_dir = ops.path_join(output_dir, INSTALL_DIR)
    install_tmp_dir = ops.path_join(output_dir, INSTALL_DIR + "-tmp")
    tarball_dir = ops.path_join(output_dir, TARBALL_DIR)
    cc_host_str = ops.getEnv("CROSS_COMPILE")
    cc_host = cc_host_str[:len(cc_host_str) - 1]
    tmp_include_dir = ops.path_join(output_dir, ops.path_join("include",args["pkg_name"]))
    dst_include_dir = ops.path_join("include",args["pkg_name"])
    dst_lib_dir = ops.path_join(install_dir, "lib")
    dst_bin_dir = ops.path_join(install_dir, "bin")
    if ops.getEnv("INSTALL_TEST_UTILS") == 'y':
        install_test_utils = True
    else:
        install_test_utils = False
Exemplo n.º 7
0
def MAIN_ENV(args):
    set_global(args)

    print ops.getEnv("GOROOT")
    print ops.getEnv("PATH")
    ops.exportEnv(ops.setEnv("GOPATH", GOPATH))
    #ops_golang.get(GOPATH, "github.com/gorilla/mux")

    return False
Exemplo n.º 8
0
def MAIN_ENV(args):
    set_global(args)

    ops.exportEnv(ops.setEnv("CC", ops.getEnv("CROSS_COMPILE") + "gcc"))
    ops.exportEnv(ops.setEnv("CXX", ops.getEnv("CROSS_COMPILE") + "g++"))
    ops.exportEnv(ops.setEnv("CROSS", ops.getEnv("CROSS_COMPILE")))
    ops.exportEnv(ops.setEnv("DESTDIR", install_tmp_dir))

    return False
Exemplo n.º 9
0
def MAIN_ENV(args):
    set_global(args)

    ops.exportEnv(ops.setEnv("CC", ops.getEnv("CROSS_COMPILE") + "gcc"))
    ops.exportEnv(ops.setEnv("CXX", ops.getEnv("CROSS_COMPILE") + "g++"))
    ops.exportEnv(ops.setEnv("CROSS", ops.getEnv("CROSS_COMPILE")))
    ops.exportEnv(ops.setEnv("DESTDIR", install_tmp_dir))
    #ops.exportEnv(ops.setEnv("PKG_CONFIG_LIBDIR", ops.path_join(iopc.getSdkPath(), "pkgconfig")))
    return False
Exemplo n.º 10
0
def set_global(args):
    global pkg_path
    global output_dir
    global crosscc
    global build_arch
    global kmod_dir
    pkg_path = args["pkg_path"]
    output_dir = args["output_path"]
    crosscc = ops.getEnv("CROSS_COMPILE")
    build_arch = ops.getEnv("ARCH")
    kmod_dir = ops.getEnv("LINUXKERNELMODULEROOT")
Exemplo n.º 11
0
def MAIN_ENV(args):
    set_global(args)

    ops.exportEnv(ops.setEnv("CC", ops.getEnv("CROSS_COMPILE") + "gcc"))
    ops.exportEnv(ops.setEnv("CXX", ops.getEnv("CROSS_COMPILE") + "g++"))
    ops.exportEnv(ops.setEnv("CROSS", ops.getEnv("CROSS_COMPILE")))
    ops.exportEnv(ops.setEnv("DESTDIR", install_tmp_dir))
    #ops.exportEnv(ops.setEnv("PKG_CONFIG_LIBDIR", ops.path_join(iopc.getSdkPath(), "pkgconfig")))
    #ops.exportEnv(ops.setEnv("PKG_CONFIG_SYSROOT_DIR", iopc.getSdkPath()))
    #ops.exportEnv(ops.setEnv("WAYLAND_SCANNER_UTIL", wayland_scanner))
    ops.exportEnv(ops.addEnv("PATH", ops.path_join(pkg_path, "host_utils")))

    return False
Exemplo n.º 12
0
def MAIN_ENV(args):
    set_global(args)

    ops.exportEnv(ops.setEnv("CC", ops.getEnv("CROSS_COMPILE") + "gcc"))
    ops.exportEnv(ops.setEnv("CXX", ops.getEnv("CROSS_COMPILE") + "g++"))
    ops.exportEnv(ops.setEnv("CROSS", ops.getEnv("CROSS_COMPILE")))
    ops.exportEnv(ops.setEnv("DESTDIR", install_tmp_dir))

    #ops.exportEnv(ops.setEnv("LDFLAGS", ldflags))
    #ops.exportEnv(ops.setEnv("CFLAGS", cflags))
    #ops.exportEnv(ops.setEnv("LIBS", libs))
    #extra_conf.append('CFLAGS="-I' + ops.path_join(iopc.getSdkPath(), 'usr/include/libz') + '"')

    return False
Exemplo n.º 13
0
def MAIN_BUILD(args):
    set_global(args)

    print "Test " + ops.getEnv("PATH")
    ops.mkdir(install_dir)
    ops.mkdir(install_tmp_dir)
    iopc.make(tarball_dir)
    iopc.make_install(tarball_dir)

    ops.mkdir(install_dir)
    ops.mkdir(dst_lib_dir)
    ops.mkdir(dst_usr_local_lib_dir)
    libegl = "libEGL.so.1.0.0"
    ops.copyto(ops.path_join(install_tmp_dir, "usr/local/lib/" + libegl),
               dst_lib_dir)
    ops.ln(dst_lib_dir, libegl, "libEGL.so.1.0")
    ops.ln(dst_lib_dir, libegl, "libEGL.so.1")
    ops.ln(dst_lib_dir, libegl, "libEGL.so")

    libglesv2 = "libGLESv2.so.2.0.0"
    ops.copyto(ops.path_join(install_tmp_dir, "usr/local/lib/" + libglesv2),
               dst_lib_dir)
    ops.ln(dst_lib_dir, libglesv2, "libGLESv2.so.2.0")
    ops.ln(dst_lib_dir, libglesv2, "libGLESv2.so.2")
    ops.ln(dst_lib_dir, libglesv2, "libGLESv2.so")

    libgbm = "libgbm.so.1.0.0"
    ops.copyto(ops.path_join(install_tmp_dir, "usr/local/lib/" + libgbm),
               dst_lib_dir)
    ops.ln(dst_lib_dir, libgbm, "libgbm.so.1.0")
    ops.ln(dst_lib_dir, libgbm, "libgbm.so.1")
    ops.ln(dst_lib_dir, libgbm, "libgbm.so")

    libglapi = "libglapi.so.0.0.0"
    ops.copyto(ops.path_join(install_tmp_dir, "usr/local/lib/" + libglapi),
               dst_lib_dir)
    ops.ln(dst_lib_dir, libglapi, "libglapi.so.0.0")
    ops.ln(dst_lib_dir, libglapi, "libglapi.so.0")
    ops.ln(dst_lib_dir, libglapi, "libglapi.so")

    if iopc.is_selected_package(PKG_WAYLAND):
        libwayland = "libwayland-egl.so.1.0.0"
        ops.copyto(
            ops.path_join(install_tmp_dir, "usr/local/lib/" + libwayland),
            dst_lib_dir)
        ops.ln(dst_lib_dir, libwayland, "libwayland-egl.so.1.0")
        ops.ln(dst_lib_dir, libwayland, "libwayland-egl.so.1")
        ops.ln(dst_lib_dir, libwayland, "libwayland-egl.so")

    ops.copyto(ops.path_join(install_tmp_dir, "usr/local/lib/dri"),
               dst_usr_local_lib_dir)

    ops.mkdir(tmp_include_dir)
    ops.copyto(ops.path_join(install_tmp_dir, "usr/local/include/."),
               tmp_include_dir)

    ops.mkdir(dst_pkgconfig_dir)
    ops.copyto(ops.path_join(src_pkgconfig_dir, '.'), dst_pkgconfig_dir)

    return False
Exemplo n.º 14
0
def set_global(args):
    global pkg_path
    global output_dir
    global arch
    global src_lib_dir
    global dst_lib_dir
    global src_include_dir
    global tmp_include_dir
    global dst_include_dir
    pkg_path = args["pkg_path"]
    output_dir = args["output_path"]
    arch = ops.getEnv("ARCH_ALT")
    if arch == "armhf":
        src_lib_dir = iopc.getBaseRootFile("lib/arm-linux-gnueabihf")
    elif arch == "armel":
        src_lib_dir = iopc.getBaseRootFile("lib/arm-linux-gnueabi")
    elif arch == "x86_64":
        src_lib_dir = iopc.getBaseRootFile("lib/x86_64-linux-gnu")
    else:
        sys.exit(1)
    dst_lib_dir = ops.path_join(output_dir, "lib")

    src_include_dir = iopc.getBaseRootFile("usr/include")
    tmp_include_dir = ops.path_join(output_dir,
                                    ops.path_join("include", args["pkg_name"]))
    dst_include_dir = ops.path_join("include", args["pkg_name"])
Exemplo n.º 15
0
def MAIN_CONFIGURE(args):
    set_global(args)

    extra_conf = []
    extra_conf.append("--disable-x11")
    extra_conf.append("--host=" + cc_host)

    cc_sysroot = ops.getEnv("CC_SYSROOT")
    cflags = ""
    cflags += " -I" + ops.path_join(cc_sysroot, 'usr/include')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libz')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libpcre3')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libpixman')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libxml2')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libglib')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(),
                                    'usr/include/libglib/glib-2.0')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/mesa')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/mesa/EGL')

    libs = ""
    libs += " -L" + ops.path_join(cc_sysroot, 'lib')
    libs += " -L" + ops.path_join(cc_sysroot, 'usr/lib')
    libs += " -L" + ops.path_join(iopc.getSdkPath(), 'lib')
    libs += " -lz -lglib-2.0 -lpcre -lffi -lpixman-1 -lxml2 -lgbm -ldrm -lEGL -lgbm -lexpat -lglapi"
    extra_conf.append("CFLAGS=" + cflags)
    extra_conf.append("LDFLAGS=" + libs)
    extra_conf.append("--enable-egl=yes")
    #extra_conf.append("--enable-glx=yes")
    #extra_conf.append("--enable-opengl")
    #extra_conf.append("--enable-virglrenderer")

    iopc.configure(tarball_dir, extra_conf)

    return True
Exemplo n.º 16
0
def set_global(args):
    global pkg_path
    global output_dir
    global busybox_tarball
    global busybox_def_config
    global busybox_build_dir
    global busybox_install_dir
    global src_busybox_udhcpc_script
    global src_busybox_inittab
    global jobs_count

    pkg_args = args["pkg_args"]
    def_cfg_version = "default_" + pkg_args["config"] + ".config"
    BUSYBOX_VERSION = pkg_args["version"]
    pkg_path = args["pkg_path"]
    output_dir = args["output_path"]
    jobs_count = ops.getEnv("BUILD_JOBS_COUNT")
    busybox_tarball = ops.path_join(pkg_path, BUSYBOX_VERSION) + ".tar.bz2"
    busybox_def_config = ops.path_join(pkg_path, def_cfg_version)
    busybox_build_dir = ops.path_join(output_dir, BUSYBOX_VERSION)
    busybox_install_dir = ops.path_join(output_dir, "busybox-bin")
    #src_busybox_udhcpc_script = ops.path_join(busybox_build_dir, "examples/udhcp/simple.script")
    src_busybox_udhcpc_script = ops.path_join(pkg_path, "default.script")
    #src_busybox_inittab = ops.path_join(pkg_path, "inittab")
    #dst_busybox_udhcpc_script_dir = iopc.getBinPkgPath(args["pkg_name"]) + "/usr/share/udhcpc/"
    if jobs_count == "" :
        jobs_count = "2"
Exemplo n.º 17
0
def set_global(args):
    global pkg_path
    global output_dir
    global tarball_pkg
    global install_dir
    global install_tmp_dir
    global tarball_dir
    global cc_host
    global tmp_include_dir
    global dst_include_dir
    global dst_lib_dir
    global dst_usr_local_lib_dir
    global src_pkgconfig_dir
    global dst_pkgconfig_dir
    pkg_path = args["pkg_path"]
    output_dir = args["output_path"]
    tarball_pkg = ops.path_join(pkg_path, TARBALL_FILE)
    install_dir = ops.path_join(output_dir, INSTALL_DIR)
    install_tmp_dir = ops.path_join(output_dir, INSTALL_DIR + "-tmp")
    tarball_dir = ops.path_join(output_dir, TARBALL_DIR)
    cc_host_str = ops.getEnv("CROSS_COMPILE")
    cc_host = cc_host_str[:len(cc_host_str) - 1]
    tmp_include_dir = ops.path_join(output_dir,
                                    ops.path_join("include", args["pkg_name"]))
    dst_include_dir = ops.path_join("include", args["pkg_name"])
    dst_lib_dir = ops.path_join(install_dir, "lib")
    dst_usr_local_lib_dir = ops.path_join(install_dir, "usr/local/lib")
    src_pkgconfig_dir = ops.path_join(pkg_path, "pkgconfig")
    dst_pkgconfig_dir = ops.path_join(install_dir, "pkgconfig")
Exemplo n.º 18
0
def MAIN_CONFIGURE(args):
    set_global(args)
    cc_sysroot = ops.getEnv("CC_SYSROOT")

    cflags = iopc.get_includes()
    libs = iopc.get_libs()

    extra_conf = []
    extra_conf.append("--host=" + cc_host)
    extra_conf.append("V=1")
    #extra_conf.append("--disable-silent-rules")
    extra_conf.append("--enable-hardware-optimizations")
    extra_conf.append("--disable-arm-neon")
    extra_conf.append("--disable-mips-msa")
    extra_conf.append("--disable-intel-sse")
    extra_conf.append("--disable-powerpc-vsx")
    extra_conf.append('FFI_CFLAGS=' + cflags)
    extra_conf.append('FFI_LIBS=' + libs)
    extra_conf.append('EXPAT_CFLAGS=' + cflags)
    extra_conf.append('EXPAT_LIBS=' + libs)
    extra_conf.append('LIBXML_CFLAGS=' + cflags)
    extra_conf.append('LIBXML_LIBS=' + libs)
    iopc.configure(tarball_dir, extra_conf)

    return True
Exemplo n.º 19
0
def MAIN_ENV(args):
    set_global(args)

    ops.exportEnv(ops.setEnv("CC", ops.getEnv("CROSS_COMPILE") + "gcc"))
    ops.exportEnv(ops.setEnv("CXX", ops.getEnv("CROSS_COMPILE") + "g++"))
    ops.exportEnv(ops.setEnv("CROSS", ops.getEnv("CROSS_COMPILE")))
    ops.exportEnv(ops.setEnv("DESTDIR", install_tmp_dir))
    ops.exportEnv(ops.setEnv("PKG_CONFIG_LIBDIR", ops.path_join(iopc.getSdkPath(), "pkgconfig")))
    ops.exportEnv(ops.setEnv("PKG_CONFIG_SYSROOT_DIR", iopc.getSdkPath()))

    '''
    ops.exportEnv(ops.setEnv("LDFLAGS", ldflags))
    ops.exportEnv(ops.setEnv("CFLAGS", cflags))
    ops.exportEnv(ops.setEnv("LIBS", libs))
    '''
    return False
Exemplo n.º 20
0
def MAIN_ENV(args):
    set_global(args)

    ops.exportEnv(ops.setEnv("CC", ops.getEnv("CROSS_COMPILE") + "gcc"))
    ops.exportEnv(ops.setEnv("CXX", ops.getEnv("CROSS_COMPILE") + "g++"))
    ops.exportEnv(ops.setEnv("CROSS", ops.getEnv("CROSS_COMPILE")))
    ops.exportEnv(ops.setEnv("DESTDIR", install_tmp_dir))

    #ops.exportEnv(ops.setEnv("LDFLAGS", ldflags))
    #ops.exportEnv(ops.setEnv("CFLAGS", cflags))
    #ops.exportEnv(ops.setEnv("LIBS", libs))
    
    #ops.exportEnv(ops.setEnv("LIBS", libs))
    #extra_conf.append('CFLAGS="-I' + ops.path_join(iopc.getSdkPath(), 'usr/include/libz') + '"')

    return False
Exemplo n.º 21
0
def MAIN_CONFIGURE(args):
    set_global(args)

    extra_conf = []
    extra_conf.append("--host=" + cc_host)
    extra_conf.append("--disable-ipv6")
    extra_conf.append("--enable-optimizations")

    cc_sysroot = ops.getEnv("CC_SYSROOT")
    cflags = ""
    cflags += " -I" + ops.path_join(cc_sysroot, 'usr/include')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libz')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libpcre3')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libpixman')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libxml2')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libglib')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(),
                                    'usr/include/libglib/glib-2.0')

    libs = ""
    libs += " -L" + ops.path_join(cc_sysroot, 'lib')
    libs += " -L" + ops.path_join(cc_sysroot, 'usr/lib')
    libs += " -L" + ops.path_join(iopc.getSdkPath(), 'lib')
    libs += " -lz -lglib-2.0 -lpcre -lffi -lpixman-1 -lxml2"
    #extra_conf.append("--extra-cflags=" + cflags)
    #extra_conf.append("--extra-ldflags=" + libs)

    iopc.configure(tarball_dir, extra_conf)

    return True
Exemplo n.º 22
0
def set_global(args):
    global pkg_path
    global output_dir
    global arch
    global output_platform_dir
    global install_platform_dao
    global dao_script

    pkg_path = args["pkg_path"]
    output_dir = args["output_path"]
    arch = ops.getEnv("ARCH_ALT")
    output_platform_dir = ops.path_join(iopc.getOutputRootDir(), "platform")
    dao_script = ops.path_join(output_platform_dir, "dao.py")

    install_platform_dao = False
    if ops.getEnv("INSTALL_PLATFORM_DAO") == 'y':
        install_platform_dao = True
Exemplo n.º 23
0
def set_global(args):
    global pkg_path
    global output_dir
    global GOPATH
    global servlet_dir
    arch = ops.getEnv("ARCH_ALT")
    pkg_path = args["pkg_path"]
    output_dir = args["output_path"]
    GOPATH = output_dir
    servlet_dir = ops.path_join(output_dir, "/build")
Exemplo n.º 24
0
def MAIN_BUILD(args):
    set_global(args)

    print "AAAA" + ops.getEnv("PATH")
    ops.mkdir(install_dir)
    ops.mkdir(install_tmp_dir)
    iopc.make(tarball_dir)
    iopc.make_install(tarball_dir)

    ops.mkdir(install_dir)
    ops.mkdir(dst_lib_dir)
    libwayland_client = "libwayland-client.so.0.3.0"
    ops.copyto(
        ops.path_join(install_tmp_dir, "usr/local/lib/" + libwayland_client),
        dst_lib_dir)
    ops.ln(dst_lib_dir, libwayland_client, "libwayland-client.so.0.3")
    ops.ln(dst_lib_dir, libwayland_client, "libwayland-client.so.0")
    ops.ln(dst_lib_dir, libwayland_client, "libwayland-client.so")

    libwayland_cursor = "libwayland-cursor.so.0.0.0"
    ops.copyto(
        ops.path_join(install_tmp_dir, "usr/local/lib/" + libwayland_cursor),
        dst_lib_dir)
    ops.ln(dst_lib_dir, libwayland_cursor, "libwayland-cursor.so.0.0")
    ops.ln(dst_lib_dir, libwayland_cursor, "libwayland-cursor.so.0")
    ops.ln(dst_lib_dir, libwayland_cursor, "libwayland-cursor.so")

    libwayland_egl = "libwayland-egl.so.1.0.0"
    ops.copyto(
        ops.path_join(install_tmp_dir, "usr/local/lib/" + libwayland_egl),
        dst_lib_dir)
    ops.ln(dst_lib_dir, libwayland_egl, "libwayland-egl.so.1.0")
    ops.ln(dst_lib_dir, libwayland_egl, "libwayland-egl.so.1")
    ops.ln(dst_lib_dir, libwayland_egl, "libwayland-egl.so")

    libwayland_server = "libwayland-server.so.0.1.0"
    ops.copyto(
        ops.path_join(install_tmp_dir, "usr/local/lib/" + libwayland_server),
        dst_lib_dir)
    ops.ln(dst_lib_dir, libwayland_server, "libwayland-server.so.0.1")
    ops.ln(dst_lib_dir, libwayland_server, "libwayland-server.so.0")
    ops.ln(dst_lib_dir, libwayland_server, "libwayland-server.so")

    ops.mkdir(tmp_include_dir)
    ops.copyto(ops.path_join(install_tmp_dir, "usr/local/include/."),
               tmp_include_dir)

    ops.mkdir(host_utils)
    ops.copyto(ops.path_join(pkg_path, "host_utils/wayland-scanner"),
               host_utils)

    ops.mkdir(dst_pkgconfig_dir)
    ops.copyto(ops.path_join(src_pkgconfig_dir, '.'), dst_pkgconfig_dir)
    return False
Exemplo n.º 25
0
def MAIN_BUILD(args):
    set_global(args)

    crosscc = ops.getEnv("CROSS_COMPILE")
    extrac_config = [
        'HOST_CC="gcc -m32"', 'TARGET_CFLAGS="-mfloat-abi=soft"',
        'CROSS=' + crosscc, 'PREFIX=' + install_dir
    ]
    iopc.make(tarball_dir, extrac_config)

    return False
Exemplo n.º 26
0
def set_global(args):
    global pkg_path
    global output_dir
    global arch
    global src_image_cfg
    global output_platform_dir
    global install_platform_dao

    pkg_path = args["pkg_path"]
    output_dir = args["output_path"]
    arch = ops.getEnv("ARCH_ALT")
    output_platform_dir = ops.path_join(iopc.getOutputRootDir(), "platform")
Exemplo n.º 27
0
def MAIN_CONFIGURE(args):
    set_global(args)

    extra_conf = []
    extra_conf.append("--host=" + cc_host)
    extra_conf.append("V=1")
    extra_conf.append("--disable-x11")
    extra_conf.append("--disable-gles1")
    extra_conf.append("--enable-gles2")
    extra_conf.append("--enable-egl")
    extra_conf.append("--enable-libdrm")
    #extra_conf.append("--enable-vg")

    cc_sysroot = ops.getEnv("CC_SYSROOT")
    cflags = ""
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/mesa')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libglu')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/libdrm')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(),
                                    'usr/include/libdrm/libdrm')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(),
                                    'usr/include/libdrm/libkms')
    cflags += " -DMESA_EGL_NO_X11_HEADERS"

    libs = ""
    libs += " -L" + ops.path_join(cc_sysroot, 'lib')
    libs += " -L" + ops.path_join(cc_sysroot, 'usr/lib')
    libs += " -L" + ops.path_join(iopc.getSdkPath(), 'lib')
    libs += " -ldrm -lEGL -lglapi -lGLESv2 -lOSMesa -lGLU -lgbm -lxml2 -lexpat -lz -lffi -lfreetype"

    extra_conf.append('GL_CFLAGS=' + cflags)
    extra_conf.append('GL_LIBS=' + libs)
    extra_conf.append('EGL_CFLAGS=' + cflags)
    extra_conf.append('EGL_LIBS=' + libs)
    extra_conf.append('GLESV2_CFLAGS=' + cflags)
    extra_conf.append('GLESV2_LIBS=' + libs)
    extra_conf.append('DRM_CFLAGS=' + cflags)
    extra_conf.append('DRM_LIBS=' + libs)
    extra_conf.append('GBM_CFLAGS=' + cflags)
    extra_conf.append('GBM_LIBS=' + libs)
    extra_conf.append('OSMESA_CFLAGS=' + cflags)
    extra_conf.append('OSMESA_LIBS=' + libs)

    #extra_conf.append('GLEW_CFLAGS=' + cflags)
    #extra_conf.append('GLEW_LIBS=' + libs)
    extra_conf.append('GLU_CFLAGS=' + cflags)
    extra_conf.append('GLU_LIBS=' + libs)
    extra_conf.append('FREETYPE2_CFLAGS=' + libs)
    extra_conf.append('FREETYPE2_LIBS=' + libs)

    iopc.configure(tarball_dir, extra_conf)

    return True
Exemplo n.º 28
0
def set_global(args):
    global pkg_path
    global output_dir
    global arch
    global do_debootstrap
    global base_rootfs_dir
    global base_rootfs_tarball
    pkg_path = args["pkg_path"]
    output_dir = args["output_path"]
    arch = ops.getEnv("ARCH_ALT")
    do_debootstrap = ops.getEnv("DO_DEBOOTSTRAP")
    pkg_args = args["pkg_args"]
    base_rootfs_tarball = ops.path_join(pkg_path, pkg_args["version"])
    if arch == "armhf":
        base_rootfs_dir = ops.path_join(output_dir, "debian_jessie_armhf")
    elif arch == "armel":
        base_rootfs_dir = ops.path_join(output_dir, "debian_jessie_armel")
    elif arch == "x86_64":
        base_rootfs_dir = ops.path_join(output_dir, "debian_jessie_x86_64")
    else:
        sys.exit(1)

    print base_rootfs_tarball
Exemplo n.º 29
0
def MAIN_SDKENV(args):
    set_global(args)
    cc_sysroot = ops.getEnv("CC_SYSROOT")
    cflags = ""
    cflags += " -I" + ops.path_join(cc_sysroot, 'usr/include')
    cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include')
    #cflags += " -I" + ops.path_join(iopc.getSdkPath(), 'usr/include/linux_headers')

    libs = ""
    libs += " -L" + ops.path_join(cc_sysroot, 'lib')
    libs += " -L" + ops.path_join(cc_sysroot, 'usr/lib')
    libs += " -L" + ops.path_join(iopc.getSdkPath(), 'lib')
    #libs += " -L" + ops.path_join(iopc.getSdkPath(), 'usr/lib')
    libs += " -lm -ldl -lpthread -lrt"

    iopc.add_includes(cflags)
    iopc.add_libs(libs)

    return False
Exemplo n.º 30
0
def set_global(args):
    global pkg_path
    global output_dir
    global tarball_pkg
    global install_dir
    global install_tmp_dir
    global tarball_dir
    global cc_host
    global dst_include_dir
    global dst_lib_dir
    pkg_path = args["pkg_path"]
    output_dir = args["output_path"]
    tarball_pkg = ops.path_join(pkg_path, TARBALL_FILE)
    install_dir = ops.path_join(output_dir, INSTALL_DIR)
    install_tmp_dir = ops.path_join(output_dir, INSTALL_DIR + "-tmp")
    tarball_dir = ops.path_join(output_dir, TARBALL_DIR)
    cc_host_str = ops.getEnv("CROSS_COMPILE")
    cc_host = cc_host_str[:len(cc_host_str) - 1]
    dst_include_dir = ops.path_join(output_dir, ops.path_join("include",args["pkg_name"]))
    dst_lib_dir = ops.path_join(install_dir, "lib")
Exemplo n.º 31
0
def MAIN_CONFIGURE(args):
    set_global(args)
    cc_sysroot = ops.getEnv("CC_SYSROOT")

    cflags = iopc.get_includes()
    libs = iopc.get_libs()

    extra_conf = []
    extra_conf.append("--host=" + cc_host)
    extra_conf.append("V=1")
    #extra_conf.append("--enable-libxml2")
    extra_conf.append("FREETYPE_CFLAGS=" + cflags)
    extra_conf.append("FREETYPE_LIBS=" + libs)
    extra_conf.append("UUID_CFLAGS=" + cflags)
    extra_conf.append("UUID_LIBS=" + libs)
    extra_conf.append('EXPAT_CFLAGS=' + cflags)
    extra_conf.append('EXPAT_LIBS=' + libs)
    #extra_conf.append('LIBXML_CFLAGS=-I' + ops.path_join(iopc.getSdkPath(), 'usr/include/libxml2'))
    #extra_conf.append('LIBXML_LIBS=-L' + ops.path_join(iopc.getSdkPath(), 'lib') + ' -lxml2')
    '''
    #extra_conf.append("--disable-silent-rules")
    extra_conf.append("--enable-hardware-optimizations")
    extra_conf.append("--disable-arm-neon")
    extra_conf.append("--disable-mips-msa")
    extra_conf.append("--disable-intel-sse")
    extra_conf.append("--disable-powerpc-vsx")
    extra_conf.append('FFI_CFLAGS="-I' + ops.path_join(iopc.getSdkPath(), 'usr/include/libffi') + '"')
    extra_conf.append('FFI_LIBS="-L' + ops.path_join(iopc.getSdkPath(), 'lib') + ' -lffi"')
    extra_conf.append('EXPAT_CFLAGS="-I' + ops.path_join(iopc.getSdkPath(), 'usr/include/libexpat') + '"')
    extra_conf.append('EXPAT_LIBS="-L' + ops.path_join(iopc.getSdkPath(), 'lib') + ' -lexpat"')
    extra_conf.append('LIBXML_CFLAGS="-I' + ops.path_join(iopc.getSdkPath(), 'usr/include/libxml2') + '"')
    extra_conf.append('LIBXML_LIBS="-L' + ops.path_join(iopc.getSdkPath(), 'lib') + ' -lxml2"')
    '''
    iopc.configure(tarball_dir, extra_conf)

    return True
Exemplo n.º 32
0
def set_global(args):
    global pkg_path
    global output_dir
    global dst_lib_dir
    global dst_usr_lib_dir
    global arch
    global arch_cc_version
    global cross_compiler_tarball
    global cross_compiler_tarball_type
    global cross_compiler_tarball_root
    global cc_path
    global cc_name
    global cc_sysroot_lib
    global cc_sysroot_usr_lib
    global cc_version
    global cc_sdk_sysroot
    global pkgconfig_dir
    pkg_path = args["pkg_path"]
    output_dir = args["output_path"]
    arch = ops.getEnv("ARCH_ALT")
    pkg_args = args["pkg_args"]
    arch_cc_version = pkg_args["version"]
    if arch_cc_version == "Linaro-2017.01":
        cross_compiler_tarball = ops.path_join(
            pkg_path,
            "gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabi.tar.xz")
        cross_compiler_tarball_type = "XZ"
        cross_compiler_tarball_root = "/opt"  #ops.path_join("/opt", "IOPC")
        cc_path = ops.path_join(
            output_dir,
            "gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabi/bin")
        #cc_name=ops.path_join(cc_path, "arm-linux-gnueabi-")
        cc_name = "arm-linux-gnueabi-"
        cc_sysroot_lib = ops.path_join(
            output_dir,
            "gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/libc/lib"
        )
        cc_sdk_sysroot = ops.path_join(
            output_dir,
            "gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/libc"
        )
        cc_version = "2.21"
    elif arch_cc_version == "Linaro-2017.01hf":
        cross_compiler_tarball = ops.path_join(
            pkg_path,
            "gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf.tar.xz")
        cross_compiler_tarball_type = "XZ"
        cross_compiler_tarball_root = "/opt"  #ops.path_join("/opt", "IOPC")
        cc_path = ops.path_join(
            output_dir,
            "gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin")
        #cc_name=ops.path_join(cc_path, "arm-linux-gnueabihf-")
        cc_name = "arm-linux-gnueabihf-"
        cc_sysroot_lib = ops.path_join(
            output_dir,
            "gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/libc/lib"
        )
        cc_sysroot_usr_lib = ops.path_join(
            output_dir,
            "gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/libc/usr/lib"
        )
        cc_sdk_sysroot = ops.path_join(
            output_dir,
            "gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/libc"
        )
        cc_version = "2.21"
    elif arch_cc_version == "CodeSourcery-2014.05":
        cross_compiler_tarball = ops.path_join(
            pkg_path,
            "arm-2014.05-29-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2")
        cross_compiler_tarball_type = "BZ2"
        cross_compiler_tarball_root = "/opt"  #ops.path_join("/opt", "IOPC")
        cc_path = ops.path_join(output_dir, "arm-2014.05/bin")
        #cc_name=ops.path_join(cc_path, "arm-none-linux-gnueabi-")
        cc_name = "arm-none-linux-gnueabi-"
        cc_sysroot_lib = ops.path_join(
            output_dir, "arm-2014.05/arm-none-linux-gnueabi/libc/armv4t/lib")
        cc_sysroot_usr_lib = ops.path_join(
            output_dir,
            "arm-2014.05/arm-none-linux-gnueabi/libc/armv4t/usr/lib")
        cc_sdk_sysroot = ops.path_join(
            output_dir, "arm-2014.05/arm-none-linux-gnueabi/libc/armv4t")
        cc_version = "2.18"
    elif arch_cc_version == "iopc_gcc_armel_2017.02.3":
        cross_compiler_tarball = ops.path_join(
            pkg_path, "iopc_gcc_armel_2017.02.3.tar.xz")
        cross_compiler_tarball_type = "XZ"
        cross_compiler_tarball_root = "/opt"  #ops.path_join("/opt", "IOPC")
        cc_path = ops.path_join(cross_compiler_tarball_root,
                                "iopc_gcc_armel_2017.02.3/usr/bin")
        #cc_name=ops.path_join(cc_path, "arm-iopc-linux-gnueabi-")
        cc_name = "arm-iopc-linux-gnueabi-"
        cc_sysroot_lib = ops.path_join(
            cross_compiler_tarball_root,
            "iopc_gcc_armel_2017.02.3/usr/arm-iopc-linux-gnueabi/sysroot/lib")
        cc_sysroot_usr_lib = ops.path_join(
            cross_compiler_tarball_root,
            "iopc_gcc_armel_2017.02.3/usr/arm-iopc-linux-gnueabi/sysroot/usr/lib"
        )
        cc_sdk_sysroot = ops.path_join(
            cross_compiler_tarball_root,
            "iopc_gcc_armel_2017.02.3/usr/arm-iopc-linux-gnueabi/sysroot")
        cc_version = "2.24"
    elif arch_cc_version == "iopc_gcc_x86_64_2017.02.3":
        cross_compiler_tarball = ops.path_join(
            pkg_path, "iopc_gcc_x86_64_2017.02.3.tar.xz")
        cross_compiler_tarball_type = "XZ"
        cross_compiler_tarball_root = "/opt"  #ops.path_join("/opt", "IOPC")
        cc_path = ops.path_join(cross_compiler_tarball_root,
                                "iopc_gcc_x86_64_2017.02.3/usr/bin")
        #cc_name=ops.path_join(cc_path, "x86_64-iopc-linux-gnu-")
        cc_name = "x86_64-iopc-linux-gnu-"
        cc_sysroot_lib = ops.path_join(
            cross_compiler_tarball_root,
            "iopc_gcc_x86_64_2017.02.3/usr/x86_64-iopc-linux-gnu/sysroot/lib")
        cc_sysroot_usr_lib = ops.path_join(
            cross_compiler_tarball_root,
            "iopc_gcc_x86_64_2017.02.3/usr/x86_64-iopc-linux-gnu/sysroot/usr/lib"
        )
        cc_sdk_sysroot = ops.path_join(
            cross_compiler_tarball_root,
            "iopc_gcc_x86_64_2017.02.3/usr/x86_64-iopc-linux-gnu/sysroot")
        cc_version = "2.24"
    else:
        sys.exit(1)

    dst_lib_dir = ops.path_join(output_dir, "lib")
    dst_usr_lib_dir = ops.path_join(iopc.getSdkPath(), "usr/lib")
    pkgconfig_dir = ops.path_join(iopc.getSdkPath(), "pkgconfig")