menuconfig选项
打开一个典型的openwrt中package目录下都能发现两个相同点:
? package/<name> /Makefile ? package/<name> /patches ? package/<name> /files
四个关键性的目录: ? tools ? toolchain ? package ? target tools和toolchain通常是用作固化内核,编译和c库的工具,编译的结果会产生三个新的目录,build_dir/host ,这是一个临时用来建立target工具; build/toolchain-<arch>*这是用来建立特殊结构的toolchain; staging_dir/toolchain-<arch>*toolchain安装的目录;
target images
global build setting
advanced configuration option(for developer)
build the openwrt image builder
build the openwrt sdk
package the openwrt-base toolchain
image configuration
package features
base system: ca-certificates,dash,ead,hsflowd,libatomic, libpthread,librt,libstdcpp,libthread-db,mksh,om-watchdog,qos-scripts resolveip,rpcd,sflowovsd,sqm-scripts,swconfig,udev,wireless-tools,zram-swap
administration: pmacct,zabbix,debootstrap,facter,gkrellmd,htop,monit,monit-nossl, muninite,nagios,nrpe,osirisd, ostiary,send-nsca,sudo,syslog-ng,syslog-ng3
development: ar,binutils,cppunit,diffutils,gcc,gdb,gdbserver,lttng-tools,make,objdump,patch,python-sip, sysprof,tig,trace-cmd,trace-cmd-extra,valgrind
kernel modules
语言配置:
LuCI—>Collections—– <*> luci 添加Luci LuCI—>Translations—- <*> luci-i18n-chinese 添加中文
Kernel modules —> Native Language Support —> <*> kmod-nls-utf8
Kernel modules —> Native Language Support —> <*> kmod-nls-iso8859-1 #不选择时U盘挂载不上。
Kernel modules —> Native Language Support —> <*>kmod-nls-iso8859-1
添加文件系统支持
Kernel modules —> Filesystems —> <*> kmod-fs-ext4 (移动硬盘EXT4格式选择)
Kernel modules —> Filesystems —> <*> kmod-fs-vfat(FAT16 / FAT32 格式 选择)
Kernel modules —> Filesystems —> <*> kmod-fs-ntfs (NTFS 格式 选择)
添加USB挂载 Base system —> <*>block-mount
添加自动挂载工具 Utilities —> Filesystem —> <*> badblocks
添加复位键支持 Utilities —> <*> restorefactory
添加一键开关无线 Utilities —> <*> wifitoggle
添加USB相关支持
Kernel modules —> USB Support —> <*> kmod-usb-core. ##默认已经选了
Kernel modules —> USB Support —> <*> kmod-usb-ohci. ##默认已选old usb1.0
Kernel modules —> USB Support —> <*> kmod-usb-uhci. ## usb1.1
Kernel modules —> USB Support —> <*> kmod-usb-storage.
Kernel modules —> USB Support —> <*> kmod-usb-storage-extras.添加USB扩展支持
Kernel modules —> USB Support —> <*> kmod-usb
2. ##默认已经选了 usb2.0 在network中选择openflow 和tc 在
Kernel Modules->Network Support中选择kmod-tun 保存退出
3G拨号所要安装:
ppp
chat #????
comgt #???
libpthread
librt
libusb-1.0
usb-modeswitch
zlib
language: erlang,java,js,lua,php,perl,python,ruby,tcl
libraries
luci
multimedia
network
接着make kernel_menuconfig
# ionice -c 3 nice -n 20 make -j 2 V=99 CONFIG_DEBUG_SECTION_MISMATCH=y 2>&1 \ |tee build.log |egrep -i '(warn|error)'
https://github.com/openwrt-mirror/openwrt
各目录: tools - 编译时需要一些工具, tools里包含了获取和编译这些工具的命令。里面是一些Makefile,有的可能还有patch。每个Makefile里都有一句 $(eval $(call HostBuild)),表示编译这个工具是为了在主机上使用的。 toolchain - 包含一些命令去获取kernel headers, C library, bin-utils, compiler, debugger target - 各平台在这个目录里定义了firmware和kernel的编译过程。 package - 包含针对各个软件包的Makefile。openwrt定义了一套Makefile模板,各软件参照这个模板定义了自己的信息,如软件包的版本、下载地址、编译方式、安装地址等。 include - openwrt的Makefile都存放在这里。 scripts - 一些perl脚本,用于软件包管理。
dl - 软件包下载后都放到这个目录里
build_dir - 软件包都解压到build_dir/里,然后在此编译 staging_dir - 最终安装目录。
tools, toolchain被安装到这里,rootfs也会放到这里。
feeds - bin - 编译完成之后,firmware和各ipk会放到此目录下。
njit-client
只编译某个模块 make package/qos/clean make package/qos/compile make package/qos/install
make V=99 | tee compile_v1.0.0.log 混合 tee 命令将编译信息放到compile_v1.0.0.log文件中方便查看。
x86的编译要点 考虑到x86平台使用的特点,以及 OpenWrt 本身,可参考以下要点
1. 编译所有文件系统支持,包括ext2/ext3/ext4,还有NTFS,甚至是LVM;
2. 加入一个文本编辑器,例如vim或者nano,因为日常使用中需要用文本编辑器修改各种配置文件;
3. 加入所有关于无线网卡的驱动,模块,各种支持程序,
4. 一些其他常见应用--蓝牙、加密、PGP、SSL、SSH、VPN、USB支持、3G上网卡、
5. 编译时要到网上下载相关源码,所以可以日后下载的包尽量不选择编译;
6. 编译好的文件在当前目录的bin文件夹下,如果是brcm-2.4,则 ls bin/brcm-2.4/ 就可以看到很多熟悉的文件了。
参考资料 如何给 Openwrt 提交补丁 https://dev.openwrt.org/wiki/SubmittingPatches
Openwrt 源代码的下载方式 https://dev.openwrt.org/wiki/GetSource
构造编译环境 http://wiki.openwrt.org/doc/howto/buildroot
构造编译环境-老的文档 http://downloads.openwrt.org/docs/buildroot-documentation.html
本文赖以生存的基础-官方wiki中的编译教程,我翻译了编译一文中的小部分。 http://wiki.openwrt.org/doc/howto/build
下文有详细的编译方面说明 http://downloads.openwrt.org/kamikaze/docs/openwrt.html
menuconfig选项的更多相关文章
- Linux内核配置机制(make menuconfig 、Kconfig、Makefile)讲解【转】
本文转载自:http://www.codexiu.cn/linux/blog/34801/ 前面我们介绍模块编程的时候介绍了驱动进入内核有两种方式:模块和直接编译进内核,并介绍了模块的一种编译方式—— ...
- Linux 内核配置机制(make menuconfig、Kconfig、makefile)讲解
前面我们介绍模块编程的时候介绍了驱动进入内核有两种方式:模块和直接编译进内核,并介绍了模块的一种编译方式--在一个独立的文件夹通过makefile配合内核源码路径完成 那么如何将驱动直接编译进内核呢? ...
- Make menuconfig生成文件
1.当我们在执行make menuconfig这个命令时,一共涉及到了以下几个文件: Linux内核根目录下的scripts文件夹 arch/$ARCH/Kconfig文件.各层目录下的Kconfig ...
- 模块在insmod之后无法rmmod问题
1,首先保证make menuconfig选项配置: [*] Enable loadable module support ---> [*] Module unloading 2,在lib ...
- FL2440驱动添加(1):hello world 驱动模块添加
试试第一个hello world模块添加: 1,在添加drivers/char/hello.c /*************************************************** ...
- 内核移植和文件系统制作(2):linux内核最小系统和initramfs文件系统
linux内核最小系统,使用内核版本:https://www.kernel.org/pub/linux/kernel/v3.0/linux-3.8.1.tar.bz2 1,FL2440板子的基本硬件: ...
- at91sam9x5 linux 4.1.0下使能蜂鸣器驱动
测试环境: CPU: AT91SAM9X35 Linux: Atmel提供的linux-at91-linux4sam_5.3 (Linux-4.1.0) 转载请注明: 凌云物网智科嵌入式实 ...
- linux 设备驱动概述
linux 设备驱动概述 目前,Linux软件工程师大致可分为两个层次: (1)Linux应用软件工程师(Application Software Engineer): 主要利用C库函数和 ...
- Linux内核编译与安装
2013-04-16 Linux内核介绍 Linux内核是一个用C语言写成的,符合POSIX标准的类Unix操作系统.内核是操作系统中最基本的一部分,提供了众多应用程序访问计算机硬件的机制.L ...
随机推荐
- C#学习笔记(4)
今天先把上几个系列的做一个总结,在这里给出一个面向对象版的简易计算器(重在理解面向对象的思想). 1.首先定义一个计算器类(类库)(Calculator) public abstract class ...
- 修改sqlplus提示符
如图所示 : 修改 提示符为 username(sid_serial#)@instance_name ,这样其实很方便的 以下是步骤 在11g中glogin.sql 文件是不存在的,取而代之的是 lo ...
- UIKit各类概述
1.UIAcceleration: 被叫做加速事件的一个UIAcceleration类的实例是用来代表即时的三维加速数据.为了接收重力加速度,要注册一个应用应用程序作为一个共享UIAccelerate ...
- cmake,gtest单元测试程序
参考:http://blog.csdn.net/stdcoutzyx/article/details/8284183 PROJECT (HELLO) SET(SRC_LIST main.c) MESS ...
- C语言库函数--操作文件
//C库函数读取文件的代码 I/O缓冲机制 C语言库函数写文件都是写在内存中,然后一次写入磁盘.提高了效率. 读写文件,不对系统进行操作,一般采用C语言库函数.移植可以在任何可以对C支持的操作系统,而 ...
- js点击 密码输入框密码显示隐藏
很多密码框都有个眼睛标记,点击能显示密码.原理就是点击切换password为text等显示 下面上代码 <!DOCTYPE html> <html> <head> ...
- jquery 之事件 多库共存(noConflict)
/*jquery 之 简单事件jquery 与其它库共存,提供了 .noConflict() 方法,用法如下<script src="jquery 库"><scr ...
- thinkPHP add、save无法添加、修改不起作用
案例:数据库新添加一字段,修改值不成功.解决方案:将Runtime/Data/_fields/下面的字段缓存删除,或者直接删除整个Runtime文件也是可以的分析:由于Thinkphp,采用字段缓存机 ...
- ACM竞赛常用STL(二)之STL--algorithm
<algorithm>无疑是STL 中最大的一个头文件,它是由一大堆模板函数组成的.下面列举出<algorithm>中的模板函数: adjacent_find / binary ...
- 解决windows下eclipse中android项目关联android library project
关于 在项目中导入 关联 library project 的问题,有时候会出现如下状况 在windows系统下,library project必须和project处于相同的盘符中 如果在不同盘符,pr ...