移植 unzip 工具

原创 2016年08月31日 12:06:50
项目上要使用ZIP格式的压缩包,但是busybox自带的unzip工具不支持,移植了标准的unzip工具。
1.下载地址是:
http://sourceforge.net/projects/infozip/files/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip60.tar.gz/download
2.在察看根目录下的文件,configure Makefile 文件。有一个INSTALL文件,打开:
root@wang:/work/3716C/release/tools/unzip# head INSTALL -n 40
__________________________________________________________________________

  This is the Info-ZIP file INSTALL (for UnZip), last updated 16 Apr 2009.
__________________________________________________________________________

  Yes, this is a rather long file, but don't be intimidated:  much of its
  length is due to coverage of multiple operating systems and of optional
  customization features, large portions of which may be skipped.
__________________________________________________________________________
To compile UnZip, UnZipSFX and/or fUnZip (quick-start instructions):
========================================

(1) Unpack everything into a work directory somewhere, and make sure you're
    in the main UnZip directory (the one with this file in it).
    * (See note below concerning line termination format used in the source
       distribution)

(2) Copy the appropriate makefile into the current directory, except under
    OS/2.

(3) Run your "make" utility on the makefile (e.g., "nmake -f makefile.msc").

(4) Try out your new UnZip the way you would any new utility:  read the
    docs first.

    Ah ha ha ha!!  Oh, that kills me.  But seriously...  For VMS, see the
    Install section below or [.vms]README. for details.

    For DOS and other OSes without explicit timezone support (i.e., everybody
    but Unix, Windows 95 and NT), make sure the "TZ" environment variable is
    set to a valid and reasonable value; see your compiler docs for details.

(*) The unzip sources as well as other Info-ZIP source archives are packaged
    in Unix format. All text files use single LF (Ascii 0x0a) characters as
    line terminators.  On systems that use different conventions for plain text
    files (e.g.:DOS,Win9x,WinNT,OS/2 -> combined CR+LF; MacOS -> single CR),
    some utilities (editors, compilers, etc.) may not accept source files
3. 有编译说明,就按照步骤来。
root@wang:/work/b500_hi3716/release/tools/unzip60# cd unix/
root@wang:/work/b500_hi3716/release/tools/unzip60/unix# ls
configure  Contents  Makefile  Packaging  unix.c  unxcfg.h  zipgrep

root@wang:/work/b500_hi3716/release/tools/unzip60# cp unix/Makefile  . ./
修改Makefile ,使用工具链:
# UnZip flags
CC = cc# try using "gcc" target rather than changing this (CC and LD
LD = $(CC)# must match, else "unresolved symbol:  ___main" is possible)
AS = as
LOC = $(D_USE_BZ2) $(LOCAL_UNZIP)
AF = $(LOC)
CFLAGS = -O


# UnZip flags
CC = arm-hisiv200-linux-cc# try using "gcc" target rather than changing this (CC and LD
LD = $(CC)# must match, else "unresolved symbol:  ___main" is possible)
AS = arm-hisiv200-linux-as
LOC = $(D_USE_BZ2) $(LOCAL_UNZIP)
AF = $(LOC)
CFLAGS = -O


4。编译
root@wang:/work/b500_hi3716/release/tools/unzip60# make

  If you're not sure about the characteristics of your system, try typing
  "make generic".  This is new and uses the configure script, though it is
  still being worked on.

  If that does not do it, try the original generic which is "make generic1".

  If the compiler barfs and says something unpleasant about "timezone redefined",
  try typing "make clean" followed by "make generic2".  If, on the other
  hand, it complains about an undefined symbol _ftime, try typing "make clean"
  followed by "make generic3".

  One of these actions should produce a working copy of unzip on most Unix
  systems.  If you know a bit more about the machine on which you work, you
  might try "make list" for a list of the specific systems supported herein.
  (Many of them do exactly the same thing, so don't agonize too much over
  which to pick if two or more sound equally likely.)  Also check out the
  INSTALL file for notes on compiling various targets.  As a last resort,
  feel free to read the numerous comments within the Makefile itself.

  Have a mostly pretty good day.

直接make有错误,看说明:
root@wang:/work/b500_hi3716/release/tools/unzip60# make generic
OK

<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
阅读(1182) | 评论(0) | 转发(0) |
相关热门文章
给主人留下些什么吧!~~
评论热议
版权声明:本文为博主原创文章,转载请注明出处。

相关文章推荐

软件开发工具推荐:ZeroTurnaround ZIP 类库(java zip/unzip)

在Java平台上有很多官方的和非官方、第三方的压缩工具包,它们各有各的长处,比如Oracle官方的java.util.zip 类库,Apache网站上的Apache Commons Compress ...

php unzip 工具

使用 Android NDK 的交叉编译工具链移植 C/C++ 项目到安卓平台

什么是 NDK? Android NDK 是一套可以让开发者在安卓应用开发中使用 C/C++ 实现特定模块的工具集,不是所有应用都需要用到,但是正确地使用可以有效提高应用运行效率和安全性。 ...

C#写的工程项目移植转换工具

经常用Visual Studio开发项目的是不是会经常遇到下面这种情况或者类似于这样的情况? 用新版本Visual Studio开发的项目,有时候需要在低版本的Visual Studio环境上打开...

arm_linux移植手记(一)——交叉工具链编译(上)

一直做的是应用项目,不知道怎么的,突然想把整个arm-linux移植流程跑一遍,如今就有了这一记录,希望对初学和有兴趣了解的人做些参考,同时还望行家们手下留情我,并多多指教。闲话少说,进入正题:第一步...

一种支持内存共享的简捷工具—— POSIX(可移植操作系统接口)

POSIX(可移植操作系统接口)线程是提高代码响应和性能的有力手段。在本系列中,我向您精确地展示在编程中如何使用线程。其中还涉及大量幕后细节,读完本系列文章,您完全可以运用 POSIX 线程创建多线程...

oracle EBS數據移植工具FNDLOAD的用法整理

大家做二次开发时一般都会在测试系统上进行测试,然后再挂到正式系统上,如果在测试系统上需要用到自己建立值集,则挂到正式系统上还要重新设置一边,麻烦的很,这里我就用提取ldt的方法免去这个麻烦! 代码如...

微软提供移植iPhone应用到Windows Phone 7上的工具

windows phone 7  iphone5  微软发布了一个API映射工具、指导手册和一组分享经验的视频,帮助简化移植iPhone/iOS应用程序到Windows Phone 7(WP 7)上的...

8bit校准测试工具mtd-utils的移植和使用

环境: 主机:ubuntu14.04 交叉编译工具链:4.2.2-eabi 测试文件系统:ubifs 1、源码 http://www.zlib.net/ 下载zlib-1.2.8.ta...

嵌入式Linux截图工具gsnap移植与分析

由于 Linux 系统的 FrameBuffer 机制,把屏幕上的每个点映射成一段线性内存空间,这样,程序就可以通过改变这段内存的值来改变屏幕上某一点的颜色。如果我们想把当前的显示内容保存起来,可能会...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)