zoukankan      html  css  js  c++  java
  • 最新版OpenWrt编译教程,解决依赖问题

    1. Install git , to conveniently download the OpenWrt source code, and build tools to do the cross-compilation process:
      apt-get update
      sudo apt-get install git-core build-essential libssl-dev libncurses5-dev unzip
      Some feeds might not available over git but only via subversion (short: svn) or mercurial. If you want to obtain their source-code, you need to install svn and mercurial as well:
      sudo apt-get install subversion mercurial
    2. Download the OpenWrt bleeding edge(trunk Version) with git (see Downloading Sources for more options!):
      git clone git:git.openwrt.org/openwrt.git

      this creates a directory 'openwrt', which is the OpenWrt Buildroot build-directory 
      the OpenWrt toolchain "OpenWrt Buildroot" is included

    3. (optional) Download and install all available "feeds" (see OpenWrt Feeds for more options!):
      cd openwrt && ./scripts/feeds update -a && ./scripts/feeds install -a
    4. Make OpenWrt Buildroot check for missing packages on your build-system using one of the following commands:
      make defconfig
      make prereq
      make menuconfig

      There you will need to select what you want to compile.

    5. Proceed with build (i.e. cross-compile the downloaded sources to binaries)

      After the cross-compilation process the ''trunk''-directory contained 244,451 files with a total size of 3.2GiB!


          其它版本号地址:http://git.openwrt.org/

          dl文件夹下载:http://downloads.openwrt.org.cn/sources/


    我在第一次编译OpenWRT时,出现例如以下错误提示:

    gconvert.c:66:2: error: #error GNU libiconv not in use but included iconv.h is from libiconv

    我在网上找解决方式,结果一致地都是说,又一次 ./configure 一下:

    ./configure --enable-iconv=no --with-libiconv=gnu
    make

    可问题的关键是:OpenWRT的trunk路径下没见有个 configure 呀!

    后来,经过细致推敲,发现是在编glib时没通过。

    $ find -name "gconvert.c"
    ./build_dir/host/pkg-config-0.28/glib/glib/gconvert.c

    那我就直接进到 ./build_dir/host/pkg-config-0.28/glib/ 路径下。发现该路径下有 configure 文件。

    那我说直接在该路径下编译 glib

    $ cd build_dir/host/pkg-config-0.28/glib/
    ./configure --enable-iconv=no --with-libiconv=gnu
    make

    这样。glib 就顺利通过了编译。

    再回到 OpenWRT的trunk路径下,继续 make.


  • 相关阅读:
    python学习笔记(1)
    一些有趣的使用function
    axios构建请求池处理全局loading状态&&axios避免重复请求
    axios构建缓存池存储基础数据
    文件下载方法
    关于 JS this
    前端 JS 获取 Image 图像 宽高 尺寸
    Html CSS transform matrix3d 3D转场特效
    Github 持续化集成 工作流 Npm包自动化发布
    远程 Linux(Ubuntu 18)添加字体
  • 原文地址:https://www.cnblogs.com/jzssuanfa/p/7400840.html
Copyright © 2011-2022 走看看