前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Buildroot 编译Tips

Buildroot 编译Tips

作者头像
程序手艺人
发布2019-02-21 16:29:12
1.1K0
发布2019-02-21 16:29:12
举报
文章被收录于专栏:程序手艺人程序手艺人
编译最小系统

默认情况下,buildroot 都会编译第三方依赖库,耗费很久,如何编译五脏俱全的固件呢,它也提供了相关命令

  • 加载默认配置文件,make xxx_defconfig
  • 不编译第三方库, make allnopackageconfig
  • 编译 make all ., 默认会编译uboot,kernel,最小的rootfs

make help 详细的参数

代码语言:javascript
复制
Configuration:
 menuconfig             - interactive curses-based configurator
 nconfig                - interactive ncurses-based configurator
 xconfig                - interactive Qt-based configurator
 gconfig                - interactive GTK-based configurator
 oldconfig              - resolve any unresolved symbols in .config
 silentoldconfig        - Same as oldconfig, but quietly, additionally update deps
 olddefconfig           - Same as silentoldconfig but sets new symbols to their default value
 randconfig             - New config with random answer to all options
 defconfig              - New config with default answer to all options
                            BR2_DEFCONFIG, if set, is used as input
 savedefconfig          - Save current config to BR2_DEFCONFIG (minimal config)
 allyesconfig           - New config where all options are accepted with yes
 allnoconfig            - New config where all options are answered with no
 randpackageconfig      - New config with random answer to package options
 allyespackageconfig    - New config where pkg options are accepted with yes
 allnopackageconfig     - New config where package options are answered with no
系统登录密码修改

基于buildroot编译出来的文件系统带有登录问题,可以通过make menuconfig 设置登录密码

System configuration –> Root password

这里写图片描述
这里写图片描述
系统不见登陆命令行

正常情况下,文件系统启动后有“buildroot login:”要求输入用户名,重新制作了文件系统后,没有上述字样。 启动后会分析/etc/inittab中的内容,然后执行相关命令,顺着这样的思路分析找问题

这里写图片描述
这里写图片描述

发现# ttyS0默认是关闭的,打开后问题解决

代码语言:javascript
复制
# Put a getty on the serial port
#ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100 # GENERIC_SERIAL
::respawn:/sbin/getty -L ttyS2 115200 vt100

前提条件设备的串口必须对应才有效

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2018年08月07日,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 编译最小系统
  • 系统登录密码修改
  • 系统不见登陆命令行
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档