页次: 1
tkyl01 说:buildroot编译出来的rootfs有90M左右,放不到16M的SPI Flash中,如何编译一个4、5M左右的rootfs,有没有人编译过,如何裁减等等
这个很容易的, 你看下 buildroot 根目录下面的 .config 文件,
是不是 mplayer, Qt 等大型软件开启了, 把他们关掉就可以了.
晕哥,使用buildroot编译的uclibcgnueabi编译程序出现如下错误:
$ make
Scanning dependencies of target test_demo
[ 0%] Building C object CMakeFiles/test_demo.dir/home/nkj/design/linux/lichee-pi/nano/LittlevGL/lv_drivers/display/fbdev.c.o
/home/nkj/design/linux/lichee-pi/nano/arm-buildroot-linux-uclibcgnueabi-6.4.0/bin/../libexec/gcc/arm-buildroot-linux-uclibcgnueabi/6.4.0/cc1: error while loading shared libraries: libmpfr.so.4: cannot open shared object file: No such file or directory
CMakeFiles/test_demo.dir/build.make:62: recipe for target 'CMakeFiles/test_demo.dir/home/nkj/design/linux/lichee-pi/nano/LittlevGL/lv_drivers/display/fbdev.c.o' failed
make[2]: *** [CMakeFiles/test_demo.dir/home/nkj/design/linux/lichee-pi/nano/LittlevGL/lv_drivers/display/fbdev.c.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/test_demo.dir/all' failed
make[1]: *** [CMakeFiles/test_demo.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
在docker的环境中可以正常编译,把工具链从docker拷贝出来再编译同样的程序就出错,不知那个细节问题?
屏幕左下角有光标闪烁,参考 https://whycan.cn/t_1953.html 修改。
如:bootargs=console=tty0 console=ttyS0,115200 panic=5 rootwait root=31:3 rw rootfstype=jffs2 vt.global_cursor_default=0
终于能运行了,其中酸甜苦辣,各种无助。。。。。
遇到的问题有:
1. 最开始采用的spi flash rootfs 根本不能运行应用程序,提示"Permission denied",ldd 后出现"libc.s0.6 => not found"。
2. 采用TF卡的 rootfs 总是提示 “Segmentation fault” 。
3. 以上两个问题原因应该都是编译工具链问题导致的,后来在docker中重新编译了工具链(buildroot(toolchain->toolchain type->buildroot toolchain,glabc))
并拷贝出来(buildroot-2017.08/output/host),对应更改littlevGL的CmakeList.txt,重新编译。
4. 运行的是littlevGL的demo程序,由于使用的spilcd没有触摸功能,自己比较懒没有屏蔽"USE_EVDEV",导致一开始没有现象,后来屏蔽掉,但demo.c好像有点问题,需要如下修改:
#if USE_EVDEV
lv_indev_drv_t indev_drv;
lv_indev_drv_init(&indev_drv); /*Basic initialization*/
evdev_init();
indev_drv.type = LV_INDEV_TYPE_POINTER; /*See below.*/
indev_drv.read = evdev_read; /*See below.*/
lv_indev_drv_register(&indev_drv); /*Register the driver in LittlevGL*/
#endif
遗留问题: 如何编译spiflash的rootfs并运行littlevGL ,有趟过坑的指点一下?
参考链接:
buildroot编译交叉编译工具链: https://blog.csdn.net/weixin_38233274/article/details/80214666
buildroot编译交叉编译工具链: https://blog.csdn.net/zhou_chenz/article/details/52346134
“Segmentation fault” 问题: https://whycan.cn/t_1747.html
去掉开机登录,自动进入sh: https://whycan.cn/t_542.html
# reboot
# Saving random seed... done.
Stopping logging: OK
umount: devtmpfs busy - remounted read-only
[ 1075.465115] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
The system is going down NOW!
Sent SIGTERM to all processes
Sent SIGKILL to[ 1077.487857] reboot: Restarting system
[ 1078.489799] Reboot failed -- System halted
licheepi Nano,16M flash,出现这个问题。
页次: 1