4 build_dir = Dir(env.builddir + "/tar").abspath
5 inst_dir = Dir(env.builddir + "/tar_install").abspath
6 tar_dir = os.path.join(env.project_dir, 'apps', 'tar')
8 #root_dir = Dir("#").abspath
10 rootfs_inst_dir = Dir(env.builddir + "/install").abspath
13 return os.path.join(build_dir, file_name)
15 return os.path.join(inst_dir, file_name)
17 env.scons_env["MAKE"] = "make"
20 #print env.toolchain_name
23 return '%s%s' % (env.toolchain.dict["TOOLPREFIX"],env.toolchain.dict["_CC"])
28 tar_conf = env.Command(b("Makefile"),
30 #"cd %s && DESTDIR=%s %s/configure --host=arm-linux --enable-elf-shlibs --with-cc=/usr/local/arm/4.2.2-eabi/usr/bin/arm-linux-gcc --prefix=/" % (build_dir, inst_dir, tar_dir)
31 #"cd %s && DESTDIR=%s %s/configure --host=arm-linux --enable-elf-shlibs --with-cc=%s" % (build_dir, inst_dir, tar_dir,cross_name()) #./configure --help
32 "cd %s && DESTDIR=%s %s/configure --host=arm-linux CC=%s" % (build_dir, inst_dir, tar_dir,cross_name())
35 tar = env.Command(b("tar.built"),
37 "cd %s && $MAKE -j %d && touch tar.built" %
38 (build_dir, GetOption('num_jobs')))
40 tar_install = env.Command(i("usr/local/bin/tar"),
42 "cd %s && DESTDIR=%s $MAKE install" % (build_dir, inst_dir)
45 env.Depends(tar, tar_conf)
46 env.Depends(tar_install, tar)
51 rootfs_install = InstallAs(os.path.join(rootfs_inst_dir, "sbin/tar"),os.path.join(inst_dir, "usr/local/bin/tar"))
52 #rootfs_install += InstallAs(os.path.join(rootfs_inst_dir, "lib/libss.so.2"),os.path.join(inst_dir, "lib/libss.so.2"))
53 #rootfs_install += InstallAs(os.path.join(rootfs_inst_dir, "lib/libext2fs.so.2"),os.path.join(inst_dir, "lib/libext2fs.so.2"))
54 #rootfs_install += InstallAs(os.path.join(rootfs_inst_dir, "lib/libe2p.so.2"),os.path.join(inst_dir, "lib/libe2p.so.2"))
55 #rootfs_install += InstallAs(os.path.join(rootfs_inst_dir, "lib/libcom_err.so.2"),os.path.join(inst_dir, "lib/libcom_err.so.2"))
56 #rootfs_install += InstallAs(os.path.join(rootfs_inst_dir, "lib/libblkid.so.1"),os.path.join(inst_dir, "lib/libblkid.so.1"))
57 #rootfs_install += Install(os.path.join(rootfs_inst_dir, "lib"),os.path.join(inst_dir, "lib/e2initrd_helper"))
59 #rootfs_install += Install(os.path.join(rootfs_inst_dir, "etc"),os.path.join(inst_dir, "etc/mke2fs.conf"))
61 #rootfs_install += Install(os.path.join(rootfs_inst_dir, "sbin"),os.path.join(inst_dir, "sbin/mkfs.ext3"))
62 #rootfs_install += Install(os.path.join(rootfs_inst_dir, "sbin"),os.path.join(inst_dir, "sbin/fsck.ext3"))
63 #rootfs_install += InstallAs(os.path.join(rootfs_inst_dir, "sbin/mke2fs"),os.path.join(inst_dir, "sbin/mke2fs"))
64 #rootfs_install += InstallAs(os.path.join(rootfs_inst_dir, "sbin/e2fsck"),os.path.join(inst_dir, "sbin/e2fsck"))
65 #rootfs_install += InstallAs(os.path.join(rootfs_inst_dir, "sbin/resize2fs"),os.path.join(inst_dir, "sbin/resize2fs"))
66 #rootfs_install += InstallAs(os.path.join(rootfs_inst_dir, "sbin/tune2fs"),os.path.join(inst_dir, "sbin/tune2fs"))
68 env.Depends(rootfs_install, tar_install)
70 #__all = [tar_install, rootfs_install]
72 #Return("tar_install")
73 Return("rootfs_install")