1、使用虚拟机安装ubuntu
链接:获取ubuntu
链接:获取虚拟机应用
1.1 新建虚拟机向导
(1) [勾选]安装程序光盘映像文件
(2) 个性化linux:填写自己的linux机器名称,用户名,密码,确认密码
我这里填写为:book,book,linjie,linjie
(3) 选择安装位置
(4) 根据自己情况,分配磁盘容量
我这里分配32GB
(5) 根据自己机器性能,自定义硬件
内存:
处理器:
网络适配器:
(1)桥接模式,ubuntu相当于一台独立的电脑,可以通过路由器连接外网。
(2)NAT模式:ubuntu连接windows的网络,可通过windows电脑分享的网络,连接外网。
(6) 进入ubuntu安装界面,按照向导随意配置。
1.2 安装一些便捷的工具
(1) 切换到root
sudo -i
(2) 更新源:
apt-get update
(3) 安装ssh服务器
apt-get install ssh
(4) 命令行输入观察ubuntu的ip:
ifconfig (没这个工具的话apt-get install net-tools)
或
ip -a
(5) windows端下载远程工具:putty
链接:获取putty
(6) 使用putty登陆ubuntu验证ssh服务是否正常
最近编辑记录 LinjieGuo (2019-11-03 15:51:03)
离线
2 根据荔枝派教程搭建开发环境
链接:荔枝派nano的教程链接
2.1 安装交叉编译工具链
(1)新建一个文件夹存放f1c100s的开发工具
mkdir f1c100s
进入该文件夹
cd f1c100s
(2)获取交叉编译工具链
wget http://releases.linaro.org/components/toolchain/binaries/7.2-2017.11/arm-linux-gnueabi/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi.tar.xz
(3)解压
tar -vxJf gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi.tar.xz
(4)安装
sudo cp -r ./gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi /opt/
(5)修改环境变量
-->1.安装vim:
sudo apt-get install vim
-->2.使用vim编辑
sudo vim /etc/bash.bashrc
-->3.在文件末尾 添加以下内容:
PATH="$PATH:/opt/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi/bin"
-->4.使路径生效
source /etc/bash.bashrc
-->5.测试
arm-linux-gnueabi-gcc -v
最近编辑记录 LinjieGuo (2019-11-03 16:58:33)
离线
3 编译uboot
-->安装git工具
sudo apt-get install git
3.1 获取uboot源码
荔枝派官方教程里,源码位于git站上,因为国内git过于慢,建议使用下载工具打包下载。
(1)打开链接 https://github.com/Lichee-Pi/u-boot
(2)选择分支:点击Branch->nano-lcd800480
(3)使用下载工具打包下载
3.2 uboot.zip解压
(1)新建文件夹uboot
mkdir uboot
(2)解压zip文件
unzip uboot.zip
(3)进入目录
cd u-boot
(4)查看分支
git branch -a
(5)切换到 Nano 分支
git checkout nano-v2018.01
(6)编译uboot
-->1 安装make
sudo apt install make
-->2 使用nano配置
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- licheepi_nano_spiflash_defconfig
出现错误提示:
①recipe for target 'scripts/basic/fixdep' failed
②/bin/sh: 1: cc: not found
安装如下工具:
sudo apt-get install libncurses5-dev
sudo apt-get install gcc
继续配置命令
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- licheepi_nano_spiflash_defconfig
-->3 体验可视化配置
make ARCH=arm menuconfig
-->4 编译
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4
如果你的CPU支持8线程,则-j4可以修改为-j8,提高编译速度。
-----------------------------------------------
出现错误:
①recipe for target 'scripts/dtc' failed
②recipe for target 'scripts' failed
-----------------------------------------------
安装如下工具:
apt-get install device-tree-compiler
-----------------------------------------------
继续编译:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4
-----------------------------------------------
依然出现错误,瞎安装:
sudo apt-get install libncurses5-dev libncursesw5-dev
sudo apt-get install swig python-dev python3-dev
-----------------------------------------------
继续编译:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4
居然好了。
得到u-boot-sunxi-with-spl.bin文件。
离线
4 编译linux内核
4.1 获取linux内核源码
(1)打开链接:https://github.com/Icenowy/linux.git
(2)选择分支:点击Branch->f1c100s-480272
(3)打包下载
(4)传到ubuntu中,解压
unzip f1c100s-480272lcd-test.zip
(5)下载别人配置好的配置文件
http://dl.sipeed.com/LICHEE/Nano/SDK/config
复制下载的文件到linux源码根目录,并改名字为".config"
(6)体验可视化配置
make ARCH=arm menuconfig
(7)编译
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4
-----------------------------------------------
出现错误:
scripts/extract-cert.c:21:10: fatal error: openssl/bio.h: 没有那个文件或目录
安装工具:
sudo apt-get install libssl-dev
-----------------------------------------------
继续编译:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4
成功编译,生成的 zImage 在 arch ‣ arm ‣ boot 目录下
离线
5 编译根文件系统
5.1 安装依赖
apt-get install linux-headers-$(uname -r)
5.2 使用buildroot编译根文件系统
(1)获取buildroot源码
wget https://buildroot.org/downloads/buildroot-2017.08.tar.gz
tar xvf buildroot-2017.08.tar.gz
cd buildroot-2017.08/
(2) 配置bulidroot
make menuconfig
-----------------------------------------------
Target options --->
Target Architecture Variant (arm926t) ---> // arm926ejs架构
Enable VFP extension support // Nano 没有 VFP单元,勾选会导致某些应用无法运行
Target ABI (EABI) --->
Floating point strategy (Soft float) ---> // 软浮点
(2)下载依赖工具包
https://pan.baidu.com/s/1_tBdX9K7fOkH9JdXZ_MdiQ
下载完之后,解压后复制到"buildroot-2017.08/dl/"下,没有dl文件夹可自行创建。
也可以不下载此工具包,但是buildroot自动更具需求下载这些工具包也许很慢。
(3)编译
make
-----------------------------------------------
出现错误:
make[2]: g++: Command not found
安装G++工具:
sudo apt-get install g++
-----------------------------------------------
继续编译:
编译成功!
-----------------------------------------------
(4)查看rootfs文件的大小
ls -l output/images/rootfs.tar
离线
6 打包出烧写spi flash的bin文件
先将已经被解压过的文件,统统存放在一个文件夹里,防止干扰视线。
mkdir Pack
mv buildroot-2017.08.tar.gz Pack
mv f1c100s-480272lcd-test.zip Pack
mv gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi.tar.xz Pack
mv uboot.tar Pack
如果想保持官方路线,将当前根据官方操作流程而产生的文件打包,备用
tar -cf UKB.tar buildroot-2017.08 gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi linux-f1c100s-480272lcd-test u-boot
mv UKB.tar Pack
6.1 修改uboot以适配spi flashd
(1)修改源码
在uboot源码目录下 进入 ./include/configs/,修改 suniv.h
#define CONFIG_BOOTCOMMAND "sf probe 0:50000000; " \
"sf read 0x80C00000 0x100000 0x4000; " \
"sf read 0x80008000 0x110000 0x400000; " \
"bootz 0x80008000 - 0x80C00000"
(2)更改配置
回到 uboot 源码一级目录, 进入TUI配置
make ARCH=arm menuconfig
取消勾选 [] Enable a default value for bootcmd
勾选 [v] Enable boot arguments;
在下方一项中填入 bootargs 参数:
console=ttyS0,115200 panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2
(3)回到根目录重新编译
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4
6.2 修改dts以适配spi flash
(1)修改源码
修改内核源码目录下的 ./arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dts
将原来的&spi0{...}替换为:
&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins_a>;
status = "okay";
spi-max-frequency = <50000000>;
flash: w25q128@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "winbond,w25q128", "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x000000 0x100000>;
read-only;
};
partition@100000 {
label = "dtb";
reg = <0x100000 0x10000>;
read-only;
};
partition@110000 {
label = "kernel";
reg = <0x110000 0x400000>;
read-only;
};
partition@510000 {
label = "rootfs";
reg = <0x510000 0xAF0000>;
};
};
};
};
(2)重新编译设备树
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- dtbs -j4
6.3 修改内核配置
(1)make ARCH=arm menuconfig
(2)勾选 File systems ‣ Miscellaneous filesystems ‣ Journalling Flash File System v2 (JFFS2) support
(3)修改源码下的 ./drivers/mtd/spi-nor.c
vi ./drivers/mtd/spi-nor/spi-nor.c
注释掉以下一行:
//{ "w25q128", INFO(0xef4018, 0, 64 * 1024, 256, SECT_4K) },
在这一行下面增加一项:
{ "w25q128", INFO(0xef4018, 0, 64 * 1024, 256, 0) },
(4)重新编译内核
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4
6.4 打包生成用于少些spiflash的bin文件
(1)在f1c100s目录下,新建文件夹rootfs
mkdir rootfs
(2)复制rootfs.tar到rootfs文件夹中
cp buildroot-2017.08/output/images/rootfs.tar rootfs/
(3)解压rootfs目录下的rootfs.tar
cd rootfs
sudo tar -xvf rootfs.tar
(4)删除rootfs.tar
sudo rm rootfs.tar
(5)回到f1c100s目录,编写打包命令
cd ..
vim BuildMyImage.sh
填写如下内容:
#!/bin/sh
dd if=/dev/zero of=f1c100s_spiflash_16M.bin bs=1M count=16 &&\
dd if=u-boot/u-boot-sunxi-with-spl.bin of=f1c100s_spiflash_16M.bin bs=1K conv=notrunc &&\
dd if=linux-f1c100s-480272lcd-test/arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dtb of=f1c100s_spiflash_16M.bin bs=1K seek=1024 conv=notrunc &&\
dd if=linux-f1c100s-480272lcd-test/arch/arm/boot/zImage of=f1c100s_spiflash_16M.bin bs=1K seek=1088 conv=notrunc &&\
mkfs.jffs2 -s 0x100 -e 0x10000 --pad=0xAF0000 -d rootfs/ -o rootfs.jffs2 &&\
dd if=rootfs.jffs2 of=f1c100s_spiflash_16M.bin bs=1k seek=5184 conv=notrunc &&\
sync
(6)运行打包脚本
sudo sh BuildMyImage.sh
-----------------------------------------------
提示错误:
BuildMyImage.sh: 6: BuildMyImage.sh: mkfs.jffs2: not found
安装mtd-utils工具:
sudo apt-get install mtd-utils
安装过程中,有可能出现超时情况,多尝试几遍或者更换源试试。
-----------------------------------------------
继续运行打包脚本:
sudo sh BuildMyImage.sh
稍等片刻,打包便能完成。
打包完成后,在当前目录,生成一个名为f1c100s_spiflash_16M.bin的文件。
最近编辑记录 LinjieGuo (2019-11-04 00:55:16)
离线
7 烧写验证
(1)参考文章:https://whycan.cn/t_444.html
编译、安装Windows版本sunxi-fel步骤 (32M spi flash补丁,支持W25Q256/MX25L256)
安装好驱动,烧写bin文件到单板上。
(2)观察串口输出:
明显是存在问题,但是不知道问题出在哪里,太晚了,只能先睡觉。
最近编辑记录 LinjieGuo (2019-11-04 00:46:59)
离线
支持楼主!
离线
好贴, 写得很详细, 适合入门。
离线
非常感谢晕哥的指导:
回到6.26.2 修改dts以适配spi flash
(1)修改源码
在uboot源码目录下 进入 ./include/configs/,修改 suniv.h
#define CONFIG_BOOTCOMMAND "sf probe 0 50000000; " \
"sf read 0x80C00000 0x100000 0x4000; " \
"sf read 0x80008000 0x110000 0x400000; " \
"bootz 0x80008000 - 0x80C00000"
重新编译uboot。
重新打包出bin文件,并烧写。
出现以下情况,很明显,还是存在问题,贴图,:
最近编辑记录 LinjieGuo (2019-11-04 21:10:10)
离线
再次感谢晕哥的指导:可能是CONFIG_MTD_BLOCK没有勾上。
在linux内核根目录: make ARCH=arm menuconfig
进入配置界面后:
按/
输入CONFIG_MTD_BLOCK
进行搜索,得到以下界面。
进入→ Device Drivers,发现 已经勾选上
<*> Memory Technology Device (MTD) support --->
回车进入Memory Technology Device (MTD) support --->
看着好像有关的选项都给勾选上。贴图:
继续回车进入 Self-contained MTD device drivers
看着好像有关的选项都给勾选上。贴图:
保存退出,继续编译。
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4
最近编辑记录 LinjieGuo (2019-11-04 23:22:40)
离线
编译完毕,打包后烧写bin文件。非常遗憾,结果依旧!
观察.config里的配置项
文件中,可以看出,MTD_BLOCK已经配置为y,但依然没能成功启动。
我怀疑也许是根文件系统配置的问题。夜深了,明日继续。
算了,还是再搞搞把,这么早休息实在没劲,继续折腾。
观察启动log,发现,卡住的地方,有一条记录: #0: Loopback 1
再次进入配置界面:make ARCH=arm menuconfig
Device Drivers --->Block devices --->
[v]Loopback device support,勾选,看到其他有的选项,也勾上吧,相信也无妨,贴图:
保存配置,继续编译。
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4
打包后烧录验证。
最近编辑记录 LinjieGuo (2019-11-04 23:44:30)
离线
夜已深,凭借着12线程的能力,很快就编译完成,打包烧录进单板上。
上电后,观察log,非常遗憾,唉,我要睡觉了。因为linux跑起来了...贴图:
在这紧要关头,我居然忘记了登陆账号密码,无奈之下,只能去buildroot目录下看看账号密码了。
make menuconfig
System configuration --->
贴图:
原来还没有设置密码,算了,真的要休息了,明日继续。
最近编辑记录 LinjieGuo (2019-11-05 00:04:40)
离线
楼主加油,正在按前面的教程一步一步来!
离线
哈哈,等着学习,楼主厉害了
离线
@aaayao 这个文件下载失败: https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.12.10.tar.xz
你可以手动下载拷贝到 dl/ 目录。
是的,这个文件复制链接,用迅雷下载,非常快,十来秒就OK了。
离线
我这里下载非常的慢
离线
看来真的要试试在VPS上搭开发环境了。
离线
现在编译了3个小时,还在编译,这根文件系统为什么要编译这么久的?
离线
@aaayao 这个文件下载失败: https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.12.10.tar.xz
你可以手动下载拷贝到 dl/ 目录。
下载了linux-4.12.10.tar.xz,放到dl目录里,现在还一直在编译,不知道还要编译多久?
离线
QT不是需要的,能不能简单说说只编译根文件系统,需要些什么配置?
离线
终于编译完成
离线
(3) 测试程序
既然linux已经能跑起来了,我们编写一个hello.c,编译看能否执行。
cd ./rootfs
vi hello.c
#include <stdio.h>
int main(void)
{
printf("hello whycan!\r\n");
return 0;
}
gcc编译:gcc -o hello hello.c
ubuntu中执行:./hello
输出:hello whycan!
编译到目标板:arm-linux-gnueabi-gcc -o Boardhello hello.c
因为现在没又什么方便得调试工具,直接打包进根文件系统。
sudo sh BuildMyImage.sh
烧录到spiflash中。
执行程序Boardhello。提示失败,如下图:
离线
听说搬瓦工今年双十一没有促销了,真是遗憾,我去年双十一买的vps还有几天就到期了,找了好几天也没找到续费菜单。刚刚给客服发了一个Ticket看看能不能以去年的优惠价续费。
离线
搬瓦工现在全部升级到KVM,不能显示续费的,都需要重新购买,旧的VPS都要报废。
离线
搬瓦工现在全部升级到KVM,不能显示续费的,都需要重新购买,旧的VPS都要报废。
原理如此,多谢提醒。
离线
xgui 说:双十一搬瓦工bwh可能有促销的VPS, 在这上面速度比起墙内快多了。克隆torvalds的Linux仓库最多1分钟搞定。
这个方法真好,在VPS上克隆真的非常的快啊!
https://whycan.cn/files/members/2261/QQ图片20191107090703.png
https://whycan.cn/files/members/2261/QQ图片20191107090823.png
https://whycan.cn/files/members/2261/QQ图片20191107082435.png但是要传回本地就非常的慢了,看来要在VPS上进行编译才行了。编译好之处只传回目标文件。
https://whycan.cn/files/members/2261/QQ图片20191107090158.png可惜现在的搬瓦工都没有以前19刀一年的了,最便宜都要49刀一年。
我的uboot是直接在腾讯云的服务器上面执行指令获取的,还算比较快,一下子就好了。
离线
可以用GitHub Action编译,然后下载最终的固件,超级爽,还不要钱
离线
可以用GitHub Action编译,然后下载最终的固件,超级爽,还不要钱
还有这种操作 ^_^
http://www.ruanyifeng.com/blog/2019/09/getting-started-with-github-actions.html
最近编辑记录 xgui (2019-11-07 13:39:18)
离线
楼主,你好:
按照你的连接下载的内核源码目录里没有 ./arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dts 这个文件啊?
离线
楼主,你好:
按照你的连接下载的内核源码目录里没有 ./arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dts 这个文件啊?
稍等,我先看看呢!我搜索了一下,这个文件是存在的,你是不是搞错了呢?dts目录下文件太多,网页里只能显示一部分文件的。
最近编辑记录 LinjieGuo (2019-11-07 18:17:53)
离线
我这个suniv-f1c100s-licheepi-nano.dts没有找到&spi0{...}段落,应该在那个位置加上去呢?
// SPDX-License-Identifier: (GPL-2.0+ OR X11)
/*
* Copyright 2018 Icenowy Zheng <icenowy@aosc.io>
*/
/dts-v1/;
#include "suniv-f1c100s.dtsi"
#include <dt-bindings/gpio/gpio.h>
/ {
model = "Lichee Pi Nano";
compatible = "licheepi,licheepi-nano", "allwinner,suniv-f1c100s";
aliases {
serial0 = &uart0;
};
chosen {
stdout-path = "serial0:115200n8";
};
panel: panel {
compatible = "qiaodian,qd43003c0-40", "simple-panel";
#address-cells = <1>;
#size-cells = <0>;
enable-gpios = <&pio 4 6 GPIO_ACTIVE_HIGH>;
power-supply = <®_vcc3v3>;
port@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;
panel_input: endpoint@0 {
reg = <0>;
remote-endpoint = <&tcon0_out_lcd>;
};
};
};
reg_vcc3v3: vcc3v3 {
compatible = "regulator-fixed";
regulator-name = "vcc3v3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
};
};
&be0 {
status = "okay";
};
&de {
status = "okay";
};
&tcon0 {
pinctrl-names = "default";
pinctrl-0 = <&lcd_rgb666_pins>;
status = "okay";
};
&tcon0_out {
tcon0_out_lcd: endpoint@0 {
reg = <0>;
remote-endpoint = <&panel_input>;
};
};
&mmc0 {
vmmc-supply = <®_vcc3v3>;
bus-width = <4>;
broken-cd;
status = "okay";
};
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pe_pins>;
status = "okay";
};
&otg_sram {
status = "okay";
};
&usb_otg {
dr_mode = "otg";
status = "okay";
};
&usbphy {
usb0_id_det-gpio = <&pio 4 2 GPIO_ACTIVE_HIGH>; /* PE2 */
status = "okay";
};
离线
我这个suniv-f1c100s-licheepi-nano.dts没有找到&spi0{...}段落,应该在那个位置加上去呢?
// SPDX-License-Identifier: (GPL-2.0+ OR X11) /* * Copyright 2018 Icenowy Zheng <icenowy@aosc.io> */ /dts-v1/; #include "suniv-f1c100s.dtsi" #include <dt-bindings/gpio/gpio.h> / { model = "Lichee Pi Nano"; compatible = "licheepi,licheepi-nano", "allwinner,suniv-f1c100s"; aliases { serial0 = &uart0; }; chosen { stdout-path = "serial0:115200n8"; }; panel: panel { compatible = "qiaodian,qd43003c0-40", "simple-panel"; #address-cells = <1>; #size-cells = <0>; enable-gpios = <&pio 4 6 GPIO_ACTIVE_HIGH>; power-supply = <®_vcc3v3>; port@0 { reg = <0>; #address-cells = <1>; #size-cells = <0>; panel_input: endpoint@0 { reg = <0>; remote-endpoint = <&tcon0_out_lcd>; }; }; }; reg_vcc3v3: vcc3v3 { compatible = "regulator-fixed"; regulator-name = "vcc3v3"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; }; }; &be0 { status = "okay"; }; &de { status = "okay"; }; &tcon0 { pinctrl-names = "default"; pinctrl-0 = <&lcd_rgb666_pins>; status = "okay"; }; &tcon0_out { tcon0_out_lcd: endpoint@0 { reg = <0>; remote-endpoint = <&panel_input>; }; }; &mmc0 { vmmc-supply = <®_vcc3v3>; bus-width = <4>; broken-cd; status = "okay"; }; &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pe_pins>; status = "okay"; }; &otg_sram { status = "okay"; }; &usb_otg { dr_mode = "otg"; status = "okay"; }; &usbphy { usb0_id_det-gpio = <&pio 4 2 GPIO_ACTIVE_HIGH>; /* PE2 */ status = "okay"; };
其实你只要稍微观察一下就知道结构了。&xx{}都放在大括号外面。
最近编辑记录 LinjieGuo (2019-11-07 21:47:06)
离线
加在下面这个位置,但是编译出错了。
// SPDX-License-Identifier: (GPL-2.0+ OR X11)
/*
* Copyright 2018 Icenowy Zheng <icenowy@aosc.io>
*/
/dts-v1/;
#include "suniv-f1c100s.dtsi"
#include <dt-bindings/gpio/gpio.h>
/ {
model = "Lichee Pi Nano";
compatible = "licheepi,licheepi-nano", "allwinner,suniv-f1c100s";
aliases {
serial0 = &uart0;
};
chosen {
stdout-path = "serial0:115200n8";
};
panel: panel {
compatible = "qiaodian,qd43003c0-40", "simple-panel";
#address-cells = <1>;
#size-cells = <0>;
enable-gpios = <&pio 4 6 GPIO_ACTIVE_HIGH>;
power-supply = <®_vcc3v3>;
port@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;
panel_input: endpoint@0 {
reg = <0>;
remote-endpoint = <&tcon0_out_lcd>;
};
};
};
reg_vcc3v3: vcc3v3 {
compatible = "regulator-fixed";
regulator-name = "vcc3v3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
};
};
&be0 {
status = "okay";
};
&de {
status = "okay";
};
&tcon0 {
pinctrl-names = "default";
pinctrl-0 = <&lcd_rgb666_pins>;
status = "okay";
};
&tcon0_out {
tcon0_out_lcd: endpoint@0 {
reg = <0>;
remote-endpoint = <&panel_input>;
};
};
&mmc0 {
vmmc-supply = <®_vcc3v3>;
bus-width = <4>;
broken-cd;
status = "okay";
};
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pe_pins>;
status = "okay";
};
&otg_sram {
status = "okay";
};
&usb_otg {
dr_mode = "otg";
status = "okay";
};
&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins_a>;
status = "okay";
spi-max-frequency = <50000000>;
flash: w25q128@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "winbond,w25q128", "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x000000 0x100000>;
read-only;
};
partition@100000 {
label = "dtb";
reg = <0x100000 0x10000>;
read-only;
};
partition@110000 {
label = "kernel";
reg = <0x110000 0x400000>;
read-only;
};
partition@510000 {
label = "rootfs";
reg = <0x510000 0xAF0000>;
};
};
};
};
&usbphy {
usb0_id_det-gpio = <&pio 4 2 GPIO_ACTIVE_HIGH>; /* PE2 */
status = "okay";
};
离线
加在下面这个位置,但是编译出错了。
https://whycan.cn/files/members/2261/QQ图片20191107223200.png
// SPDX-License-Identifier: (GPL-2.0+ OR X11) /* * Copyright 2018 Icenowy Zheng <icenowy@aosc.io> */ /dts-v1/; #include "suniv-f1c100s.dtsi" #include <dt-bindings/gpio/gpio.h> / { model = "Lichee Pi Nano"; compatible = "licheepi,licheepi-nano", "allwinner,suniv-f1c100s"; aliases { serial0 = &uart0; }; chosen { stdout-path = "serial0:115200n8"; }; panel: panel { compatible = "qiaodian,qd43003c0-40", "simple-panel"; #address-cells = <1>; #size-cells = <0>; enable-gpios = <&pio 4 6 GPIO_ACTIVE_HIGH>; power-supply = <®_vcc3v3>; port@0 { reg = <0>; #address-cells = <1>; #size-cells = <0>; panel_input: endpoint@0 { reg = <0>; remote-endpoint = <&tcon0_out_lcd>; }; }; }; reg_vcc3v3: vcc3v3 { compatible = "regulator-fixed"; regulator-name = "vcc3v3"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; }; }; &be0 { status = "okay"; }; &de { status = "okay"; }; &tcon0 { pinctrl-names = "default"; pinctrl-0 = <&lcd_rgb666_pins>; status = "okay"; }; &tcon0_out { tcon0_out_lcd: endpoint@0 { reg = <0>; remote-endpoint = <&panel_input>; }; }; &mmc0 { vmmc-supply = <®_vcc3v3>; bus-width = <4>; broken-cd; status = "okay"; }; &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pe_pins>; status = "okay"; }; &otg_sram { status = "okay"; }; &usb_otg { dr_mode = "otg"; status = "okay"; }; &spi0 { pinctrl-names = "default"; pinctrl-0 = <&spi0_pins_a>; status = "okay"; spi-max-frequency = <50000000>; flash: w25q128@0 { #address-cells = <1>; #size-cells = <1>; compatible = "winbond,w25q128", "jedec,spi-nor"; reg = <0>; spi-max-frequency = <50000000>; partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; partition@0 { label = "u-boot"; reg = <0x000000 0x100000>; read-only; }; partition@100000 { label = "dtb"; reg = <0x100000 0x10000>; read-only; }; partition@110000 { label = "kernel"; reg = <0x110000 0x400000>; read-only; }; partition@510000 { label = "rootfs"; reg = <0x510000 0xAF0000>; }; }; }; }; &usbphy { usb0_id_det-gpio = <&pio 4 2 GPIO_ACTIVE_HIGH>; /* PE2 */ status = "okay"; };
代码比较工具对比了一下,一模一样,我上我这边的源码给你看看把。能力有限,你多折腾几遍,/笑/哈
linux内核源码链接: https://pan.baidu.com/s/1YpbDNFXn_2QdTh8YIcF_jg 提取码:bc35
最近编辑记录 LinjieGuo (2019-11-07 23:45:47)
离线
aaayao 说:加在下面这个位置,但是编译出错了。
https://whycan.cn/files/members/2261/QQ图片20191107223200.png
// SPDX-License-Identifier: (GPL-2.0+ OR X11) /* * Copyright 2018 Icenowy Zheng <icenowy@aosc.io> */ /dts-v1/; #include "suniv-f1c100s.dtsi" #include <dt-bindings/gpio/gpio.h> / { model = "Lichee Pi Nano"; compatible = "licheepi,licheepi-nano", "allwinner,suniv-f1c100s"; aliases { serial0 = &uart0; }; chosen { stdout-path = "serial0:115200n8"; }; panel: panel { compatible = "qiaodian,qd43003c0-40", "simple-panel"; #address-cells = <1>; #size-cells = <0>; enable-gpios = <&pio 4 6 GPIO_ACTIVE_HIGH>; power-supply = <®_vcc3v3>; port@0 { reg = <0>; #address-cells = <1>; #size-cells = <0>; panel_input: endpoint@0 { reg = <0>; remote-endpoint = <&tcon0_out_lcd>; }; }; }; reg_vcc3v3: vcc3v3 { compatible = "regulator-fixed"; regulator-name = "vcc3v3"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; }; }; &be0 { status = "okay"; }; &de { status = "okay"; }; &tcon0 { pinctrl-names = "default"; pinctrl-0 = <&lcd_rgb666_pins>; status = "okay"; }; &tcon0_out { tcon0_out_lcd: endpoint@0 { reg = <0>; remote-endpoint = <&panel_input>; }; }; &mmc0 { vmmc-supply = <®_vcc3v3>; bus-width = <4>; broken-cd; status = "okay"; }; &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pe_pins>; status = "okay"; }; &otg_sram { status = "okay"; }; &usb_otg { dr_mode = "otg"; status = "okay"; }; &spi0 { pinctrl-names = "default"; pinctrl-0 = <&spi0_pins_a>; status = "okay"; spi-max-frequency = <50000000>; flash: w25q128@0 { #address-cells = <1>; #size-cells = <1>; compatible = "winbond,w25q128", "jedec,spi-nor"; reg = <0>; spi-max-frequency = <50000000>; partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; partition@0 { label = "u-boot"; reg = <0x000000 0x100000>; read-only; }; partition@100000 { label = "dtb"; reg = <0x100000 0x10000>; read-only; }; partition@110000 { label = "kernel"; reg = <0x110000 0x400000>; read-only; }; partition@510000 { label = "rootfs"; reg = <0x510000 0xAF0000>; }; }; }; }; &usbphy { usb0_id_det-gpio = <&pio 4 2 GPIO_ACTIVE_HIGH>; /* PE2 */ status = "okay"; };
代码比较工具对比了一下,一模一样,我上我这边的源码给你看看把。能力有限,你多折腾几遍,/笑/哈
linux内核源码链接: https://pan.baidu.com/s/1YpbDNFXn_2QdTh8YIcF_jg 提取码:bc35
感谢楼主提供的内核,编译通过了
代码不同的地方是在suniv.dtsi里还有相关的SPI配置代码:
spi0: spi@1c05000 {
compatible = "allwinner,suniv-spi",
"allwinner,sun8i-h3-spi";
reg = <0x01c05000 0x1000>;
interrupts = <10>;
clocks = <&ccu CLK_BUS_SPI0>, <&ccu CLK_BUS_SPI0>;
clock-names = "ahb", "mod";
resets = <&ccu RST_BUS_SPI0>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
spi1: spi@1c06000 {
compatible = "allwinner,suniv-spi",
"allwinner,sun8i-h3-spi";
reg = <0x01c06000 0x1000>;
interrupts = <11>;
clocks = <&ccu CLK_BUS_SPI1>, <&ccu CLK_BUS_SPI1>;
clock-names = "ahb", "mod";
resets = <&ccu RST_BUS_SPI1>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
离线
检查 "suniv-f1c100s.dtsi" 等包含文件里面有没有关于 spi0 的定义.
谢谢晕哥提醒,原来的这个内核在suniv-f1c100s.dtsi里没有发现SPI0的定义,增加定义后代码如下:
// SPDX-License-Identifier: (GPL-2.0+ OR X11)
/*
* Copyright 2018 Icenowy Zheng <icenowy@aosc.io>
* Copyright 2018 Mesih Kilinc <mesihkilinc@gmail.com>
*/
#include <dt-bindings/clock/suniv-ccu-f1c100s.h>
#include <dt-bindings/reset/suniv-ccu-f1c100s.h>
/ {
#address-cells = <1>;
#size-cells = <1>;
interrupt-parent = <&intc>;
clocks {
osc24M: clk-24M {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <24000000>;
clock-output-names = "osc24M";
};
osc32k: clk-32k {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <32768>;
clock-output-names = "osc32k";
};
};
cpus {
cpu {
compatible = "arm,arm926ej-s";
device_type = "cpu";
};
};
de: display-engine {
compatible = "allwinner,suniv-f1c100s-display-engine";
allwinner,pipelines = <&fe0>;
status = "disabled";
};
soc {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
ranges;
sram-controller@1c00000 {
compatible = "allwinner,suniv-f1c100s-system-control",
"allwinner,sun4i-a10-system-control";
reg = <0x01c00000 0x30>;
#address-cells = <1>;
#size-cells = <1>;
ranges;
sram_d: sram@10000 {
compatible = "mmio-sram";
reg = <0x00010000 0x1000>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0 0x00010000 0x1000>;
otg_sram: sram-section@0 {
compatible = "allwinner,suniv-f1c100s-sram-d",
"allwinner,sun4i-a10-sram-d";
reg = <0x0000 0x1000>;
status = "disabled";
};
};
};
spi0: spi@1c05000 {
compatible = "allwinner,suniv-spi",
"allwinner,sun8i-h3-spi";
reg = <0x01c05000 0x1000>;
interrupts = <10>;
clocks = <&ccu CLK_BUS_SPI0>, <&ccu CLK_BUS_SPI0>;
clock-names = "ahb", "mod";
resets = <&ccu RST_BUS_SPI0>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
spi1: spi@1c06000 {
compatible = "allwinner,suniv-spi",
"allwinner,sun8i-h3-spi";
reg = <0x01c06000 0x1000>;
interrupts = <11>;
clocks = <&ccu CLK_BUS_SPI1>, <&ccu CLK_BUS_SPI1>;
clock-names = "ahb", "mod";
resets = <&ccu RST_BUS_SPI1>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
tcon0: lcd-controller@1c0c000 {
compatible = "allwinner,suniv-f1c100s-tcon";
reg = <0x01c0c000 0x1000>;
interrupts = <29>;
clocks = <&ccu CLK_BUS_LCD>,
<&ccu CLK_TCON>;
clock-names = "ahb",
"tcon-ch0";
clock-output-names = "tcon-pixel-clock";
resets = <&ccu RST_BUS_LCD>;
reset-names = "lcd";
status = "disabled";
ports {
#address-cells = <1>;
#size-cells = <0>;
tcon0_in: port@0 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0>;
tcon0_in_be0: endpoint@0 {
reg = <0>;
remote-endpoint = <&be0_out_tcon0>;
};
};
tcon0_out: port@1 {
#address-cells = <1>;
#size-cells = <0>;
reg = <1>;
};
};
};
ccu: clock@1c20000 {
compatible = "allwinner,suniv-f1c100s-ccu";
reg = <0x01c20000 0x400>;
clocks = <&osc24M>, <&osc32k>;
clock-names = "hosc", "losc";
#clock-cells = <1>;
#reset-cells = <1>;
};
intc: interrupt-controller@1c20400 {
compatible = "allwinner,suniv-f1c100s-ic";
reg = <0x01c20400 0x400>;
interrupt-controller;
#interrupt-cells = <1>;
};
pio: pinctrl@1c20800 {
compatible = "allwinner,suniv-f1c100s-pinctrl";
reg = <0x01c20800 0x400>;
interrupts = <38>, <39>, <40>;
clocks = <&ccu CLK_BUS_PIO>, <&osc24M>, <&osc32k>;
clock-names = "apb", "hosc", "losc";
gpio-controller;
interrupt-controller;
#interrupt-cells = <3>;
#gpio-cells = <3>;
uart0_pe_pins: uart0-pe-pins {
pins = "PE0", "PE1";
function = "uart0";
};
lcd_rgb666_pins: lcd-rgb666-pins {
pins = "PD0", "PD1", "PD2", "PD3", "PD4",
"PD5", "PD6", "PD7", "PD8", "PD9",
"PD10", "PD11", "PD12", "PD13", "PD14",
"PD15", "PD16", "PD17", "PD18", "PD19",
"PD20", "PD21";
function = "lcd";
};
mmc0_pins: mmc0-pins {
pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5";
function = "mmc0";
};
};
timer@1c20c00 {
compatible = "allwinner,suniv-f1c100s-timer";
reg = <0x01c20c00 0x90>;
interrupts = <13>;
clocks = <&osc24M>;
};
mmc0: mmc@1c0f000 {
compatible = "allwinner,suniv-f1c100s-mmc",
"allwinner,sun7i-a20-mmc";
reg = <0x01c0f000 0x1000>;
clocks = <&ccu CLK_BUS_MMC0>,
<&ccu CLK_MMC0>,
<&ccu CLK_MMC0_OUTPUT>,
<&ccu CLK_MMC0_SAMPLE>;
clock-names = "ahb",
"mmc",
"output",
"sample";
resets = <&ccu RST_BUS_MMC0>;
reset-names = "ahb";
interrupts = <23>;
pinctrl-names = "default";
pinctrl-0 = <&mmc0_pins>;
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
wdt: watchdog@1c20ca0 {
compatible = "allwinner,suniv-f1c100s-wdt",
"allwinner,sun4i-a10-wdt";
reg = <0x01c20ca0 0x20>;
};
uart0: serial@1c25000 {
compatible = "snps,dw-apb-uart";
reg = <0x01c25000 0x400>;
interrupts = <1>;
reg-shift = <2>;
reg-io-width = <4>;
clocks = <&ccu CLK_BUS_UART0>;
resets = <&ccu RST_BUS_UART0>;
status = "disabled";
};
uart1: serial@1c25400 {
compatible = "snps,dw-apb-uart";
reg = <0x01c25400 0x400>;
interrupts = <2>;
reg-shift = <2>;
reg-io-width = <4>;
clocks = <&ccu CLK_BUS_UART1>;
resets = <&ccu RST_BUS_UART1>;
status = "disabled";
};
uart2: serial@1c25800 {
compatible = "snps,dw-apb-uart";
reg = <0x01c25800 0x400>;
interrupts = <3>;
reg-shift = <2>;
reg-io-width = <4>;
clocks = <&ccu CLK_BUS_UART2>;
resets = <&ccu RST_BUS_UART2>;
status = "disabled";
};
usb_otg: usb@1c13000 {
compatible = "allwinner,suniv-musb";
reg = <0x01c13000 0x0400>;
clocks = <&ccu CLK_BUS_OTG>;
resets = <&ccu RST_BUS_OTG>;
interrupts = <26>;
interrupt-names = "mc";
phys = <&usbphy 0>;
phy-names = "usb";
extcon = <&usbphy 0>;
allwinner,sram = <&otg_sram 1>;
status = "disabled";
};
usbphy: phy@1c13400 {
compatible = "allwinner,suniv-usb-phy";
reg = <0x01c13400 0x10>;
reg-names = "phy_ctrl";
clocks = <&ccu CLK_USB_PHY0>;
clock-names = "usb0_phy";
resets = <&ccu RST_USB_PHY0>;
reset-names = "usb0_reset";
#phy-cells = <1>;
status = "disabled";
};
fe0: display-frontend@1e00000 {
compatible = "allwinner,suniv-f1c100s-display-frontend";
reg = <0x01e00000 0x20000>;
interrupts = <30>;
clocks = <&ccu CLK_BUS_DE_FE>, <&ccu CLK_DE_FE>,
<&ccu CLK_DRAM_DE_FE>;
clock-names = "ahb", "mod",
"ram";
resets = <&ccu RST_BUS_DE_FE>;
status = "disabled";
ports {
#address-cells = <1>;
#size-cells = <0>;
fe0_out: port@1 {
#address-cells = <1>;
#size-cells = <0>;
reg = <1>;
fe0_out_be0: endpoint@0 {
reg = <0>;
remote-endpoint = <&be0_in_fe0>;
};
};
};
};
be0: display-backend@1e60000 {
compatible = "allwinner,suniv-f1c100s-display-backend";
reg = <0x01e60000 0x10000>;
reg-names = "be";
interrupts = <31>;
clocks = <&ccu CLK_BUS_DE_BE>, <&ccu CLK_DE_BE>,
<&ccu CLK_DRAM_DE_BE>;
clock-names = "ahb", "mod",
"ram";
resets = <&ccu RST_BUS_DE_BE>;
reset-names = "be";
assigned-clocks = <&ccu CLK_DE_BE>;
assigned-clock-rates = <300000000>;
ports {
#address-cells = <1>;
#size-cells = <0>;
be0_in: port@0 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0>;
be0_in_fe0: endpoint@0 {
reg = <0>;
remote-endpoint = <&fe0_out_be0>;
};
};
be0_out: port@1 {
#address-cells = <1>;
#size-cells = <0>;
reg = <1>;
be0_out_tcon0: endpoint@0 {
reg = <0>;
remote-endpoint = <&tcon0_in_be0>;
};
};
};
};
};
};
但是编译还是出错:
yaoming@yaoming-VirtualBox:~/f1c100s/linux$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- dtbs -j4
DTC arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dtb
arch/arm/boot/dts/suniv-f1c100s.dtsi:74.21-85.5: ERROR (phandle_references): /soc/spi@1c05000: Reference to non-existent node or label "spi0_pins_a"
also defined at arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dts:92.7-132.3
ERROR: Input tree has errors, aborting (use -f to force output)
make[2]: *** [arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dtb] 错误 2
make[1]: *** [dtbs] 错误 2
make: *** [sub-make] 错误 2
离线
看错误提示, 缺 SPI 的引脚定义: spi0_pins_a
离线
看错误提示, 缺 SPI 的引脚定义: spi0_pins_a
谢谢提醒,补上了引脚定义,编译通过了
spi0_pins_a: spi0-pins-pc {
pins = "PC0", "PC1", "PC2", "PC3";
function = "spi0";
};
离线
楼主你好。能不能把那个交叉编译工具链 转发一下,下了一天都没有弄下来。
离线
烧录又遇到问题了,在WIN10下安装了USB驱动,但是烧录时提示找不到设备?
离线
Zadig显示的USB ID是对的,驱动也装上了
离线
谢谢分享,可以制作成一个教材了。
最近编辑记录 大帅 (2019-11-09 15:00:06)
离线
@aaayao 换win7 电脑试一试
谢谢晕哥提醒,换了另一台WIN10 64位电脑,烧录正常了,但是烧写速度实在也太慢啦!SPIFLASH是W25Q128
离线
启动不了,烧录显示正常的,但FLASH读出来全是0,这个是使用32M的烧录程序,我的FLASH是W25Q128,16M的,可能是这样引起出错了
另外,如果使用16M的烧录程序,就会出错,烧录不了,读也不行,能测试一下16M的烧录程序是那里有问题吗?
最后还发现一个问题,就是外接了USB HUB之后,烧录会提示找不到USB设备,但在WIN的设备管理器里是能看到USB设备的,这个有办法解决吗?
离线
楼主,请问是用25Q128吗?也是用那个16M的烧录程序吗?
离线
@aaayao https://whycan.cn/t_444.html 下载1楼最底下那个
----------------------------------------------------------------------
以下是 2018-12-19 更新 (16楼):为了不再给大家造成困扰,我把文件重新整理了 V3s 和 F1C100s 两个文件夹,
离线
@aaayao https://whycan.cn/t_444.html 下载1楼最底下那个
----------------------------------------------------------------------
以下是 2018-12-19 更新 (16楼):为了不再给大家造成困扰,我把文件重新整理了 V3s 和 F1C100s 两个文件夹,
这个接USB HUB之后可以读写了,但是写入之后读出来,还是全0? 难道要换个W25Q256吗?
离线
新鲜出炉 windows 版本 32M spi nor flash 版本烧录软件: sunxi-tools-win32-support_f1c100s_32M.7z
测试OK!
这个程序能烧32M的,那也可以烧16M的吗?
我试了烧W25Q128,烧进去正常,但是读出来全部为0。
离线
不用短路FLASH 1、2脚,插上USB就可以烧录和读取,当短路1、2脚再插USB,也是一样的结果
离线
8 编译裸机程序
获取大神网友(达克罗德)的项目:
帖子: https://whycan.cn/t_1457.html
8.1 获取裸机工程包
下载: https://whycan.cn/files/members/729/minimal_f1c100s_framebuffer.zip
上传到ubuntu的f1c100s目录下。
8.2 解压
unzip minimal_f1c100s_framebuffer.zip
8.3 编译
cd minimal_f1c100s
make
产生以下log:
-------------------------------------------------------
book@book-virtual-machine:~/f1c100s/minimal_f1c100s$ make
mkdir -p build/
mkdir -p build/arch/arm32/lib/
mkdir -p build/driver/
mkdir -p build/lib/
mkdir -p build/machine/
CC main.c
arm-eabi-gcc -Imachine/include -Iarch/arm32/include -Idriver/include -Ilib -march=armv5te -mtune=arm926ej-s -mfloat-abi=soft -marm -mno-thumb-interwork -g -ggdb -Wall -O3 -ffreestanding -std=gnu99 -D__ARM32_ARCH__=5 -D__ARM926EJS__ -c -MD -o build/main.o main.c
make: arm-eabi-gcc: Command not found
Makefile:104: recipe for target 'build/main.o' failed
make: *** [build/main.o] Error 127
book@book-virtual-machine:~/f1c100s/minimal_f1c100s$
-------------------------------------------------------
处理方法
(1)安装编译工具
sudo apt-get install gcc-arm-none-eabi
(2)修改Makefile
vi Makefile
修改"CROSS_COMPILE = arm-enbi-" --> "CROSS_COMPILE ?= arm-enbi-"
(3) 再次编译
CROSS_COMPILE=arm-none-eabi- make
看起来编译出bin文件了,但是仍然有提示错误。
-------------------------------------------------------
copy from `build/firmware.elf' [elf32-littlearm] to `build/firmware.bin' [binary]
Make header information for brom booting
make: execvp: tools/mksunxi/mksunxi: 权限不够
Makefile:73: recipe for target 'build/firmware.bin' failed
make: *** [build/firmware.bin] Error 127
-------------------------------------------------------
既然权限不够,就给他权限:
cd tools/mksunxi
sudo chmod 777 mksunxi
继续编译:
CROSS_COMPILE=arm-none-eabi- make
-------------------------------------------------------
book@book-virtual-machine:~/f1c100s/minimal_f1c100s$ CROSS_COMPILE=arm-none-eabi- make
arm-none-eabi-objcopy -v -O binary build/firmware.elf build/firmware.bin
copy from `build/firmware.elf' [elf32-littlearm] to `build/firmware.bin' [binary]
Make header information for brom booting
bootloader size= 1800
The bootloader head has been fixed
-------------------------------------------------------
8.4 烧写验证
离线
楼主,你好:
能提供一下你的SPI FLASH的型号和规格书吗?我这板子估计是FLASH出问题了。
离线
可以烧, 你是不是 spi flash 引脚一直都下拉了?进入FEL 就不能下拉.
晕哥,我这个NANO板子,SPI FLASH引脚不短接,插上USB就直接识别为FEL模式,这个会是什么问题?
离线
aaayao 说:楼主,你好:
能提供一下你的SPI FLASH的型号和规格书吗?我这板子估计是FLASH出问题了。我这里用的是winband 25Q128JV50,容量为16MB,应该跟flash无关,淘宝随便买两片,容量一样即可。
我的也是在淘宝是购买的,型号和楼主的一样。
楼主你这个能正常启动的NANO板子,只插上USB到电脑,电脑会识别成FEL模式吗?不短接FLASH引脚的情况下。
离线
那是因为你的程序没烧进去,所以再次插入,按流程又进入了usb fel,你现在需要解决为什么没有烧录进去
整到无办法了,能读写,但是读出来全是0。
现在只能试试在LINUX下面烧写。
最近编辑记录 aaayao (2019-11-11 15:10:38)
离线
一次性过了,应该是成功了,串口还没接,显示屏上显示了一个光标在闪烁
离线
楼主,你的是NANO板子吗?FLASH是买回来就焊好的吗?
我这个是买回来要自己焊的FLASH,不知道硬件上会不会有问题?
离线
注意引脚,不要反了,芯片有个小凹槽的是第一脚。
如果你实在不确定的话,可以买widora的板子,今天包邮,自带了TTL调试,boot键,reset键,焊好了flash。
晕哥,刚刚拍了一套,等收到看看是不是硬件的问题了。
离线
楼主,你的是NANO板子吗?FLASH是买回来就焊好的吗?
我这个是买回来要自己焊的FLASH,不知道硬件上会不会有问题?
https://whycan.cn/files/members/2261/QQ图片20191111160826.jpg
我这里有2个板子,自己做的,还有荔枝派nano,测试都是成功的呢。
离线
能重新打包一个放上来吗,完整能路起来的
离线
xrff_z 说:楼主你好。能不能把那个交叉编译工具链 转发一下,下了一天都没有弄下来。
链接:https://pan.baidu.com/s/1j7KIMbqPl8o1zI-VtAu2KQ 提取码:zopc
非常感谢:)
离线
原来的板子果然是有问题,现在新的板子可以读写,终于能见到串口启到到U-BOOT了,但是卡在最前面。
离线
这个是什么板子呢?
离线
换回W25Q128,启动终于成成了!
离线
查看CPU实时运行频率,用什么命令呢?
离线
这个要成熟的应用,估计得要小半年的跟新,?
离线
我已经按照LinjieGuo的挖坑步骤 走到烧录这一步了,已经生成f1c100s_spiflash_16M.bin 但是卡壳在如何通过sunxi-fel 烧录了。恳请大家指点帮忙
最近编辑记录 ned (2019-11-19 16:09:51)
离线
测试了 ./sunxi-fel -p spiflash-info指令:
好像是有返回的
离线
嗯嗯 感谢晕哥!刚刚我也使用这个指令烧录成功了!复位看一下控制台 哈哈
离线
经过几天的奋战,貌似已经成功启动啦!!!
480*272的TFT上有个光标在闪烁,难道是已经有TFT的驱动在里面了?
离线
重新生成BIN文件,再烧录,到VFS系统这里就出错了;重做了rootfs系统,再生成BIN文件,还是一样的出错,不知道那里出问题了?
在LCD上也可以看到出错信息
离线
你的 bootargs 是什么? root=???
按照楼主这个来的:
(2)更改配置
回到 uboot 源码一级目录, 进入TUI配置
make ARCH=arm menuconfig
取消勾选 [] Enable a default value for bootcmd
勾选 [v] Enable boot arguments;
在下方一项中填入 bootargs 参数:
console=ttyS0,115200 panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2
这个是要和buildroot的那个参数要对应呢?
离线
uboot启动时,输入print命令查看打印:
Hit any key to stop autoboot: 0
=>
=>
=>
=>
=> printf
Unknown command 'printf' - try 'help'
=> print
arch=arm
baudrate=115200
board=sunxi
board_name=sunxi
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_efi_binary=if fdt addr ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr ${fdtcontroladdr};fi;load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootarm.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}extlinux/extlinux.conf
boot_net_usb_start=usb start
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_targets=fel mmc0 usb0 pxe dhcp
bootcmd=sf probe 0 50000000; sf read 0x80C00000 0x100000 0x4000; sf read 0x80008000 0x110000 0x400000; bootz 0x80008000 - 0x80C00000
bootcmd_dhcp=run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; setenv efi_old_vci ${bootp_vci};setenv efi_old_arch ${bootp_arch};setenv bootp_vci PXEClient:Arch:00010:UNDI:003000;setenv bootp_arch 0xa;if dhcp ${kernel_addr_r}; then tftpboot ${fdt_addr_r} dtb/${efi_fdtfile};if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r}; else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi;fi;setenv bootp_vci ${efi_old_vci};setenv bootp_arch ${efi_old_arch};setenv efi_fdtfile;setenv efi_old_arch;setenv efi_old_vci;
bootcmd_fel=if test -n ${fel_booted} && test -n ${fel_scriptaddr}; then echo '(FEL boot)'; source ${fel_scriptaddr}; fi
bootcmd_mmc0=setenv devnum 0; run mmc_boot
bootcmd_pxe=run boot_net_usb_start; dhcp; if pxe get; then pxe boot; fi
bootcmd_usb0=setenv devnum 0; run usb_boot
bootdelay=2
bootm_size=0x1700000
console=ttyS0,115200
cpu=arm926ejs
dfu_alt_info_ram=kernel ram 0x80500000 0x1000000;fdt ram 0x80C00000 0x100000;ramdisk ram 0x80D50000 0x4000000
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
efi_dtb_prefixes=/ /dtb/ /dtb/current/
fdt_addr_r=0x80C00000
fdtcontroladdr=83e6ada8
fdtfile=suniv-f1c100s-licheepi-nano.dtb
fel_booted=1
kernel_addr_r=0x80500000
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}
mmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot_part; fi
partitions=name=loader1,start=8k,size=32k,uuid=${uuid_gpt_loader1};name=loader2,size=984k,uuid=${uuid_gpt_loader2};name=esp,size=128M,bootable,uuid=${uuid_gpt_esp};name=system,size=-,uuid=${uuid_gpt_system};
preboot=usb start
pxefile_addr_r=0x80D00000
ramdisk_addr_r=0x80D50000
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done
scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/boot/bootarm.efi; then echo Found EFI removable media binary efi/boot/bootarm.efi; run boot_efi_binary; echo EFI LOAD FAILED: continuing...; fi; setenv efi_fdtfile
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scriptaddr=0x80C50000
soc=sunxi
stderr=serial@1c25000
stdin=serial@1c25000
stdout=serial@1c25000
usb_boot=usb start; if usb dev ${devnum}; then setenv devtype usb; run scan_dev_for_boot_part; fi
uuid_gpt_esp=c12a7328-f81f-11d2-ba4b-00a0c93ec93b
uuid_gpt_system=69dad710-2ce4-4e3c-b16c-21a1d49abed3
Environment size: 4560/32764 bytes
=>
离线
感谢晕哥~
sudo apt-get install swig python-dev python3-dev这个包补充上之后u-boot顺利编译通过!
离线
全部重新来一次,又可以启动了,之前那个错误应该是JFFS2文件系统加载失败。
这次是把内核换成5.2,修改还是成功的
离线
晕哥 ,求教一下如何修改屏幕的参数 ,我现在用的屏是800*480 这个例子好像是 480*272的 我尝试过修改U-BOOT失败了
离线
linux里面的 dts 还要改一次, 关于 lcd 部分的.
晕哥 ,您可以截图一下 我需要如何修改吗,我硬是找了许久,不知道如何下手啊
离线
@晕哥 什么时候出收藏功能啊.这个好帖要收藏
离线
我按照流程走了,编译也没报错,就是不能启动,不知道是哪个出来问题,各位大佬帮忙看看。
最近编辑记录 郁郁葱葱 (2019-11-27 17:13:29)
离线
根文件系统出错了,init进程执行出错。
那就是我配置系统文件的那个地方错了,还在找那个地方出了问题导致根系统文件出错。
离线
根文件系统出错了,init进程执行出错。
果然是根文件系统的选项有关。
离线
那就是我配置系统文件的那个地方错了,还在找那个地方出了问题导致根系统文件出错。
找到地方了,第五大步的第二小步得这样设置
系统已经成功在F1C200S的板子上运行,现在开始纠结怎么联网。
离线
是有线以太网?
这个要取决你是开发的时候临时传文件, 还是产品需要联网,
如果临时传文件可以用 adbd 方式解决,
如果产品需要联网, 不建议用 f1c100s,
加了网卡之后, 价格与 V3s 相差无几。
wifi 不差钱可以用台湾正基的 AP62xx 模组, 软硬件稳定性都比较好。
晕哥,F1C100接AP62XX是不是还得自己移植驱动?V3S我也在考虑。主要是wifi无线联网。
离线
AP62XX 在很早已经 Linux 自带驱动了。配置一下即可。
好的,我试试,我用AP6256试试。
离线
找到地方了,第五大步的第二小步得这样设置
https://whycan.cn/files/members/2409/_15749275588763.png
系统已经成功在F1C200S的板子上运行,现在开始纠结怎么联网。
不好意思,那时候还不知道怎么上图,/捂脸
离线
配置好的VM虚拟机Ubuntu系统 链接:https://pan.baidu.com/s/17vk0_QWRNRuxwi5EZ_P-Xg 提取码:54pb
非常感谢楼主,可是这个ubuntu密码多少呀?快哭了
离线
123456进不去
离线
是的,谢谢楼主
离线
由于我不会在linux下烧程序到板子,我都是在windows下操作。所以我找了宿主机和客户机之间互换文件的方法,希望把编译的文件拿倒windows下烧写。具体方法见这个网页: https://www.cnblogs.com/sunev/archive/2012/03/16/2400887.html
离线
嗯嗯,实在不好意思,因为帖子发出来一阵子之后,无法修改了。
你这话说得,谢谢大佬了
离线
由于我不会在linux下烧程序到板子,我都是在windows下操作。所以我找了宿主机和客户机之间互换文件的方法,希望把编译的文件拿倒windows下烧写。具体方法见这个网页:https://www.cnblogs.com/sunev/archive/2012/03/16/2400887.html
方法很多:
(1)VMtools
(2)FTP/SFTP
(3)nfs,这个比较方便,编译完,win端刷新,写个bat命令脚本,使用sunxi-tools,相对路径烧写bin文件。
这方面的话,自行科普比较好一些。
离线
由于我不会在linux下烧程序到板子,我都是在windows下操作。所以我找了宿主机和客户机之间互换文件的方法,希望把编译的文件拿倒windows下烧写。具体方法见这个网页: https://www.cnblogs.com/sunev/archive/2012/03/16/2400887.html
离线
好贴, 写得很详细,对新手很有帮助
离线
$ ls -lh output/images/
total 95M
-rw-r--r-- 1 ted ted 95M 1月 6 02:41 rootfs.tar
大神指点一下,为什么我编出来的根文件系统有 95MB?
我是想烧录到16MB spiflash,解压出来发现 gdb 和 mplayer 占了几十M;
.config文件
最近编辑记录 xiao.huang (2020-01-06 03:03:12)
离线
@xiao.huang 你上传 buildroot 根目录下面的 .config, 不是 kernel 的 .config
离线
$ ls -lh output/images/
total 95M
-rw-r--r-- 1 ted ted 95M 1月 6 02:41 rootfs.tar大神指点一下,为什么我编出来的根文件系统有 95MB?
我是想烧录到16MB spiflash,解压出来发现 gdb 和 mplayer 占了几十M;
.config文件
可能我在写帖子时,忽略了一些东西取消了某些选项,晚点传配置文件上来
离线
楼主生成的rootfs.tar 文件大小是多少 我的是91M 合成bin烧录文件更大200多M
离线
@xiao.huang 你上传 buildroot 根目录下面的 .config, 不是 kernel 的 .config
这个就是 buildroot 下的 .config 了
离线
可能我在写帖子时,忽略了一些东西取消了某些选项,晚点传配置文件上来
现在传上来。包里面存在两个文件".config"以及"config.in"
buildroot配置文件
下载后解包看看。
最近编辑记录 LinjieGuo (2020-01-07 10:25:57)
离线
现在传上来。包里面存在两个文件".config"以及"config.in"
buildroot配置文件
下载后解包看看。
感谢@LinjieGuo
下载最新的 buildroot-2019.02.8,然后重新按上述配置就没有问题,rootfs 编出来 2MB,已经能启动到 shell 了;
接下来在想 f1c200s 能做什么呢
离线
感觉F1C100S 的 SPI FLASH 要搞出来,坑还真不少。 谢谢提供那么详细的记录,给我们有好的参考。
离线
感谢@LinjieGuo
下载最新的 buildroot-2019.02.8,然后重新按上述配置就没有问题,rootfs 编出来 2MB,已经能启动到 shell 了;
接下来在想 f1c200s 能做什么呢
想做啥就做啥呗,看你掌握到什么程度
离线
很完整详细,谢谢!
离线
很详细,对于我这个计划跳坑的人来说是一针兴奋剂,感谢
离线
首先谢谢大佬的分享。本人萌新刚刚接触这个行业,按照楼主大佬的操作步骤走到创建分支的一步了,但是输入git branch -a的时候显示不出分支,然后输入git checkout nano-v2018.01的时候出现error: pathspec 'nano-v2018.01' did not match any file(s) known to git,本人用的是f1c100s直接连上屏幕。
离线
首先谢谢大佬的分享。本人萌新刚刚接触这个行业,按照楼主大佬的操作步骤走到创建分支的一步了,但是输入git branch -a的时候显示不出分支,然后输入git checkout nano-v2018.01的时候出现error: pathspec 'nano-v2018.01' did not match any file(s) known to git,本人用的是f1c100s直接连上屏幕。
很可能你 git clone 没完成, 现在 github 访问有点困难, 用widora搭的这个再试一试:
https://whycan.cn/t_3683.html
离线
好贴, 写得很详细, 适合入门。
离线
很可能你 git clone 没完成, 现在 github 访问有点困难, 用widora搭的这个再试一试:
https://whycan.cn/t_3683.html
谢谢你的链接,我用连接下了压缩包,然后在unbuntu上解压了,但是我打开文件夹输入git branch -a的时候出现了
* master
remotes/origin/HEAD -> origin/master
remotes/origin/master
的现象,然后也没找到 nano-v2018.01 这一个分支
离线
谢谢你的链接,我用连接下了压缩包,然后在unbuntu上解压了,但是我打开文件夹输入git branch -a的时候出现了
* master
remotes/origin/HEAD -> origin/master
remotes/origin/master
的现象,然后也没找到 nano-v2018.01 这一个分支
再执行: git pull origin nano-v2018.01
估计是widora 那个加速器不支持拉取分支。
离线
5 编译根文件系统
5.1 安装依赖
apt-get install linux-headers-$(uname -r)
5.2 使用buildroot编译根文件系统
(1)获取buildroot源码
wget https://buildroot.org/downloads/buildroot-2017.08.tar.gz
tar xvf buildroot-2017.08.tar.gz
cd buildroot-2017.08/
(2) 配置bulidroot
make menuconfig
-----------------------------------------------
Target options --->
Target Architecture Variant (arm926t) ---> // arm926ejs架构
Enable VFP extension support // Nano 没有 VFP单元,勾选会导致某些应用无法运行
Target ABI (EABI) --->
Floating point strategy (Soft float) ---> // 软浮点
(2)下载依赖工具包
https://pan.baidu.com/s/1_tBdX9K7fOkH9JdXZ_MdiQ
下载完之后,解压后复制到"buildroot-2017.08/dl/"下,没有dl文件夹可自行创建。也可以不下载此工具包,但是buildroot自动更具需求下载这些工具包也许很慢。
(3)编译
make
-----------------------------------------------
出现错误:
make[2]: g++: Command not found
安装G++工具:
sudo apt-get install g++
-----------------------------------------------
继续编译:
编译成功!
-----------------------------------------------(4)查看rootfs文件的大小
ls -l output/images/rootfs.tar
编译根文件系统时候遇到问题了, 没想好怎么解决, 因为apt安装不了4.12版本的linux-header, 我是在ubuntu18.04的虚拟机中尝试编译的
zt@ubuntu:~/buildroot$ make
>>> linux-headers custom Installing to staging directory
(cd /home/zt/buildroot/output/build/linux-headers-custom; PATH="/home/zt/buildroot/output/host/bin:/home/zt/buildroot/output/host/sbin:/home/zt/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/zt/crosstool-ng:/home/zt/LicheePi/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi/bin" /usr/bin/make -j5 ARCH=arm HOSTCC="/usr/bin/gcc" HOSTCFLAGS="" HOSTCXX="/usr/bin/g++" INSTALL_HDR_PATH=/home/zt/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr headers_install)
make[1]: Entering directory '/home/zt/buildroot/output/build/linux-headers-custom'
make[1]: Leaving directory '/home/zt/buildroot/output/build/linux-headers-custom'
if ! support/scripts/check-kernel-headers.sh /home/zt/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot 4.12; then exit 1; fi
Incorrect selection of kernel headers: expected 4.12.x, got 4.19.x
package/pkg-generic.mk:266: recipe for target '/home/zt/buildroot/output/build/linux-headers-custom/.stamp_staging_installed' failed
make: *** [/home/zt/buildroot/output/build/linux-headers-custom/.stamp_staging_installed] Error 1
离线
感谢大神分享,入坑F1C指南
离线
mark
离线
编译根文件系统时候遇到问题了, 没想好怎么解决, 因为apt安装不了4.12版本的linux-header, 我是在ubuntu18.04的虚拟机中尝试编译的
zt@ubuntu:~/buildroot$ make >>> linux-headers custom Installing to staging directory (cd /home/zt/buildroot/output/build/linux-headers-custom; PATH="/home/zt/buildroot/output/host/bin:/home/zt/buildroot/output/host/sbin:/home/zt/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/zt/crosstool-ng:/home/zt/LicheePi/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi/bin" /usr/bin/make -j5 ARCH=arm HOSTCC="/usr/bin/gcc" HOSTCFLAGS="" HOSTCXX="/usr/bin/g++" INSTALL_HDR_PATH=/home/zt/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr headers_install) make[1]: Entering directory '/home/zt/buildroot/output/build/linux-headers-custom' make[1]: Leaving directory '/home/zt/buildroot/output/build/linux-headers-custom' if ! support/scripts/check-kernel-headers.sh /home/zt/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot 4.12; then exit 1; fi Incorrect selection of kernel headers: expected 4.12.x, got 4.19.x package/pkg-generic.mk:266: recipe for target '/home/zt/buildroot/output/build/linux-headers-custom/.stamp_staging_installed' failed make: *** [/home/zt/buildroot/output/build/linux-headers-custom/.stamp_staging_installed] Error 1
恐怕让您失望了,我也不知道这是什么情况!/无奈
离线
谢谢楼主的分享,很详细。但是我在编译make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4的时候出现了
binman: Node '/binman/u-boot-img': Entry contents size is 0xa6fa9 (683945) but entry size is 0x7e000 (516096)
Makefile:1148: recipe for target 'u-boot-sunxi-with-spl.bin' failed
make: *** [u-boot-sunxi-with-spl.bin] Error 1
这个错误。我也不知道是什么原因,是之前配置可视化出错了吗?
离线
谢谢楼主的分享,很详细。但是我在编译make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4的时候出现了
binman: Node '/binman/u-boot-img': Entry contents size is 0xa6fa9 (683945) but entry size is 0x7e000 (516096)
Makefile:1148: recipe for target 'u-boot-sunxi-with-spl.bin' failed
make: *** [u-boot-sunxi-with-spl.bin] Error 1
这个错误。我也不知道是什么原因,是之前配置可视化出错了吗?
你去打开Makefile文件,看看1148行驶什么内容呢
离线
谢谢楼主的分享,很详细。但是我在编译make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4的时候出现了
binman: Node '/binman/u-boot-img': Entry contents size is 0xa6fa9 (683945) but entry size is 0x7e000 (516096)
Makefile:1148: recipe for target 'u-boot-sunxi-with-spl.bin' failed
make: *** [u-boot-sunxi-with-spl.bin] Error 1
这个错误。我也不知道是什么原因,是之前配置可视化出错了吗?
参考: https://whycan.cn/t_3631.html#p33896
可能是: 编译出来的uboot体积太大了,使用空间和env环境的地址冲突了,将env环境的地址调大一点
离线
感谢LinjieGuo分享,我是一个超级新手,以前全在windows上开发没怎么接触linux,最近画了个F1c200s想跟下linux,刚好过来跟楼主学一学。弄了两天终于把U-boot、linux-f1c100s-480272lcd-test和buildroot-2017.08三个编译完成。我PCB板上用的是32M的(w25q32),想问一下是不是把suniv-f1c100s-licheepi-nano.dts里配置为w25q32重新编译就可以?
离线
感谢LinjieGuo分享,我是一个超级新手,以前全在windows上开发没怎么接触linux,最近画了个F1c200s想跟下linux,刚好过来跟楼主学一学。弄了两天终于把U-boot、linux-f1c100s-480272lcd-test和buildroot-2017.08三个编译完成。我PCB板上用的是32M的(w25q32),想问一下是不是把suniv-f1c100s-licheepi-nano.dts里配置为w25q32重新编译就可以?https://whycan.cn/files/members/2850/none.png
引用晕哥的话:"不用修改,驱动检测flash id自动识别容量!"
离线
麻烦请问,更新了dts之后,使用make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- dtbs -j4
始终无法在arch/arm/boot/dts/下生成suniv-f1c100s-licheepi-nano.dts
为了保证dts是新生成的,我将旧的suniv-f1c100s-licheepi-nano.dts删除了,使用make命令再也无法生成dts了。
折腾了两天了,感谢大神帮助。
离线
麻烦请问,更新了dts之后,使用make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- dtbs -j4
始终无法在arch/arm/boot/dts/下生成suniv-f1c100s-licheepi-nano.dts为了保证dts是新生成的,我将旧的suniv-f1c100s-licheepi-nano.dts删除了,使用make命令再也无法生成dts了。
折腾了两天了,感谢大神帮助。
把提示截屏放上来看看。
离线
@willX 是不是你的板子flash离cpu比较远, 或者有干扰造成的,
把spi的频率降下来试一试.因为 brom 能读出spi flash 数据, 但是 u-boot 却不能初始化 spi flash.
多谢晕哥,我用的是widora的tiny200板。
通过不断的重测,原来是kernel下的.config文件闹出的问题,而且还有一个,我自作主张把ARCH和CROSS_COMPILE
放到编译系统的环境变量里了,我发现这样经常出问题。
反而是老老实实的写make命令,make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4这样,倒是一点毛病没有了。
不知道是不是我的Ubuntu环境问题,又或者是我在使用menuconfig时有差异。
总之,板子现在已经跑起来了,非常感谢晕哥和楼主的大力支持。严格按照楼主操作是可以编译出能用的镜像来的。非常赞!
这个是我的串口日志:
none.txt
这个是我在用的镜像:16MB
f1c100s_spiflash_16M.zip
最近编辑记录 willX (2020-03-27 00:50:06)
离线
按着楼主的步骤一步一步走,发现编译出来的buildroot 达到98MB,不知道有没有类似问题。
root@eedccd40ec5a:~/buildroot/buildroot-2017.08/output/images# ll
-rw-r--r-- 1 root root 98119680 Mar 26 19:13 rootfs.tar
离线
按着楼主的步骤一步一步走,发现编译出来的buildroot 达到98MB,不知道有没有类似问题。
root@eedccd40ec5a:~/buildroot/buildroot-2017.08/output/images# ll
-rw-r--r-- 1 root root 98119680 Mar 26 19:13 rootfs.tar
a) 打开 ~/buildroot/buildroot-2017.08/.config 文件, 把里面的 QT/MPLAYER 等相关行删掉,
b) make menuconfig 里面把 Qt/mplayer 相关软件包删除
上面两步操作等效。
然后按这个操作重新做一次即可: https://whycan.cn/t_3781.html#p36600
离线
楼主写的非常详细,对新手很友好,新手难得的教程
离线
上次来 好像还没弄完 ,今天心血来潮 也准备弄下 。 感谢楼主 总结那么多 。sipeed的文档写的就是渣渣 。没一点流程性
离线
按照操作短接了1 4脚 怎么找不到设备呀 上电的时候看设备管理器也不会刷新 是不是硬件有问题
离线
我短接了14脚上电后在zadig上面检测到的是未知USB设备(设备描述符请求失败) 大哥你知道这是什么原因不
离线
下载 sunxi-tools-win32support_f1c100s(20180329).7z,解压缩, 运行 zadig-2.3.exe
点击 Options -> List All Devices:(即使你的设备显示未识别设备也可以,只要装上驱动能下载就可以了)
https://whycan.cn/files/members/3/QQ20180416161704.png
选择 WinUSB (v6.1.7600.16385)
点击 【Install WCID Driver】
https://whycan.cn/files/members/3/QQ20180416161712.png
按上面步奏装好驱动
https://whycan.cn/files/members/3/QQ20180416161717.png
装完后,sunxi-fel.exe 运行一切正常。
接下来烧录一个spi flash试一试。
最近编辑记录 LinjieGuo (2020-03-29 14:34:22)
离线
下载 sunxi-tools-win32support_f1c100s(20180329).7z,解压缩, 运行 zadig-2.3.exe
点击 Options -> List All Devices:(即使你的设备显示未识别设备也可以,只要装上驱动能下载就可以了)
https://whycan.cn/files/members/3/QQ20180416161704.png
选择 WinUSB (v6.1.7600.16385)
点击 【Install WCID Driver】https://whycan.cn/files/members/3/QQ20180416161712.png
按上面步奏装好驱动https://whycan.cn/files/members/3/QQ20180416161717.png
装完后,sunxi-fel.exe 运行一切正常。接下来烧录一个spi flash试一试。
谢谢楼主分享 我去试试
离线
上来感谢楼主 ,按照楼主操作下来 没任何问题 ,顺利启动亮屏 。接下来就是看怎么玩的了 !
离线
谢谢楼主分享 我去试试
按照步骤试了 还是不行
离线
按照步骤试了 还是不行
https://whycan.cn/files/members/2435/qqq.png
基本操作呢,可以关掉杀毒软件再试试,不行就换个电脑试试。
离线
按照步骤试了 还是不行
https://whycan.cn/files/members/2435/qqq.png
这是win10 吗,感觉你好像也选错usb设备了。
离线
系统启动了,但是发现f1c200s暂时成了一个孤岛,没有网口,没有usb,
大家是怎么把测试软件、文件上传到正在f1c200s里运行的文件系统里的?
离线
我也想玩F1C100S了,正在找相关原理图看看怎么设计,支持楼主
离线
好教程,不知道对外设驱动支持怎样。
离线
大佬有没有RTT的教程呢?
离线
大佬有没有RTT的教程呢?
RTT教程没有,但是开源加群交流,QQ群686338051
不是我的群,加不进不关我事喔。
不过其实很简单。开发流程是这样:
(1)下载ENV并安装,参考链接如下:
①ENV使用教程:
https://www.rt-thread.org/page/video.html
②ENV下载:
https://www.rt-thread.org/page/download.html
自己进去找,很容易找到的。
(2)下载RTT官方源码:
①官方下载页:
https://www.rt-thread.org/page/download.html
②git页面:
https://github.com/RT-Thread/rt-thread
使用歪朵拉的加速服务下载git:
https://g.widora.cn/
(3)直接在win下解压RTT,使用ENV进入RTT_3_1_3\bsp\allwinner_tina\
(4)输入scons进行编译。(注意,只能直接编译,不能像STM32一样建议keil工程)
(5)其余自行参考这个帖子的最终结果。
https://whycan.cn/t_3877.html
最近编辑记录 LinjieGuo (2020-04-30 23:52:39)
离线
请问全志是怎么回事,官网上什么技术资料都找不到,找全志的开发资料好难呀
离线
系统启动了,但是发现f1c200s暂时成了一个孤岛,没有网口,没有usb,
大家是怎么把测试软件、文件上传到正在f1c200s里运行的文件系统里的?
解决你的孤岛问题:https://whycan.cn/t_4266.html
离线
这才是我开始的地方,一路顺风
离线
请教个问题,开发环境是在linux下好配置,还是在windows下好配置?
离线
求一个VMware的安装好的Nano镜像,用了十几年的单片机,发现linux是白的不能再白了,没安装成功。
离线
配置好的VM虚拟机Ubuntu系统 链接:https://pan.baidu.com/s/17vk0_QWRNRuxwi5EZ_P-Xg 提取码:54pb
感谢!!!!!
离线
请教个问题,开发环境是在linux下好配置,还是在windows下好配置?
离线
现在电脑能检测到设备了 使用烧录命令也没啥问题 烧录的进度条也正常显示 但每次都没烧进去 都还是之前的内容 这是什么情况啊
离线
离线
先看一下应该还不错
离线
楼主给力,很详细,准备入手开发。
离线
写的很详细,学习中
离线
谢谢楼主分享 学习了
离线
刚刚入坑,帮助很大
离线
持续观望学习中。
离线
编译根文件系统时候遇到问题了, 没想好怎么解决, 因为apt安装不了4.12版本的linux-header, 我是在ubuntu18.04的虚拟机中尝试编译的
zt@ubuntu:~/buildroot$ make >>> linux-headers custom Installing to staging directory (cd /home/zt/buildroot/output/build/linux-headers-custom; PATH="/home/zt/buildroot/output/host/bin:/home/zt/buildroot/output/host/sbin:/home/zt/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/zt/crosstool-ng:/home/zt/LicheePi/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi/bin" /usr/bin/make -j5 ARCH=arm HOSTCC="/usr/bin/gcc" HOSTCFLAGS="" HOSTCXX="/usr/bin/g++" INSTALL_HDR_PATH=/home/zt/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr headers_install) make[1]: Entering directory '/home/zt/buildroot/output/build/linux-headers-custom' make[1]: Leaving directory '/home/zt/buildroot/output/build/linux-headers-custom' if ! support/scripts/check-kernel-headers.sh /home/zt/buildroot/output/host/arm-buildroot-linux-uclibcgnueabi/sysroot 4.12; then exit 1; fi Incorrect selection of kernel headers: expected 4.12.x, got 4.19.x package/pkg-generic.mk:266: recipe for target '/home/zt/buildroot/output/build/linux-headers-custom/.stamp_staging_installed' failed make: *** [/home/zt/buildroot/output/build/linux-headers-custom/.stamp_staging_installed] Error 1
我用ubuntu20.04编译成功了,使用的是外部交叉编译工具链
离线
对新手非常有用。
离线
感谢楼主 持续观望
离线
写的很详细,已经入坑了!!!!!!
离线
100S的uboot你们编译出来是多大,我的怎么是1M,uboot过大怎么减小啊?V3S的才400多K啊,16Mflash跑起来只有200多K空间了
离线
freadahead.c: In function 'freadahead':
freadahead.c:92:3: error: #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
92 | #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
刚刚学,完全是照做,在编译根文件系统,make的时候出现错误,出现异常完全不懂怎么解决?求助,多谢
离线
感谢楼主,写得很详细,新人学起来有参考了,希望再接再厉
离线
系统启动了,但是发现f1c200s,没有网口,没有usb,持续观望学习中。
离线
系统启动了,但是发现f1c200s,没有网口,没有usb,持续观望学习中。
离线
mark
离线
MMC: SUNXI SD/MMC: 0
SF: Detected w25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment
Setting up a 480x272 lcd console (overscan 0x0)
In: serial@1c25000
Out: serial@1c25000
Err: serial@1c25000
Net: No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot: 0
SF: Detected w25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
device 0 offset 0x100000, size 0x4000
SF: 16384 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK
## Flattened Device Tree blob at 80c00000
Booting using the fdt blob at 0x80c00000
Loading Device Tree to 80e05000, end 80e0a3b5 ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.2.0-licheepi-nano+ (zjf@book-virtual-machine) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #10 Mon May 18 01:03:16 CST 2020
[ 0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[ 0.000000] CPU: VIVT data cache, VIVT instruction cache
[ 0.000000] OF: fdt: Machine model: Lichee Pi Nano
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 8128
[ 0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2
[ 0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Memory: 22696K/32768K available (6144K kernel code, 233K rwdata, 1472K rodata, 1024K init, 228K bss, 10072K reserved, 0K cma-reserved, 0K highmem)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] random: get_random_bytes called from start_kernel+0x254/0x42c with crng_init=0
[ 0.000047] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[ 0.000127] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000709] Console: colour dummy device 80x30
[ 0.000807] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[ 0.070245] pid_max: default: 32768 minimum: 301
[ 0.070674] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.070714] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.072400] CPU: Testing write buffer coherency: ok
[ 0.074424] Setting up static identity map for 0x80100000 - 0x80100058
[ 0.076719] devtmpfs: initialized
[ 0.084396] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.084457] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.084767] pinctrl core: initialized pinctrl subsystem
[ 0.086849] NET: Registered protocol family 16
[ 0.088278] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.090494] cpuidle: using governor menu
[ 0.144032] SCSI subsystem initialized
[ 0.144444] usbcore: registered new interface driver usbfs
[ 0.144604] usbcore: registered new interface driver hub
[ 0.144792] usbcore: registered new device driver usb
[ 0.145298] pps_core: LinuxPPS API ver. 1 registered
[ 0.145324] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.145850] Advanced Linux Sound Architecture Driver Initialized.
[ 0.147573] clocksource: Switched to clocksource timer
[ 0.178726] NET: Registered protocol family 2
[ 0.180294] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[ 0.180374] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.180435] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.180483] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.180774] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.180835] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.181346] NET: Registered protocol family 1
[ 0.183860] NetWinder Floating Point Emulator V0.97 (double precision)
[ 0.186019] Initialise system trusted keyrings
[ 0.186614] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[ 0.207933] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.214559] Key type asymmetric registered
[ 0.214596] Asymmetric key parser 'x509' registered
[ 0.214781] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[ 0.214808] io scheduler mq-deadline registered
[ 0.214825] io scheduler kyber registered
[ 0.227429] suniv-f1c100s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.421545] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.427394] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pe not found, using dummy regulator
[ 0.429331] printk: console [ttyS0] disabled
[ 0.449598] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 25, base_baud = 6250000) is a 16550A
[ 0.829064] printk: console [ttyS0] enabled
[ 0.837489] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[ 0.889606] brd: module loaded
[ 0.913898] loop: module loaded
[ 0.918114] SCSI Media Changer driver v0.25
[ 0.923707] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pc not found, using dummy regulator
[ 0.936693] m25p80 spi0.0: w25q128 (16384 Kbytes)
[ 0.942461] 4 fixed-partitions partitions found on MTD device spi0.0
[ 0.948941] Creating 4 MTD partitions on "spi0.0":
[ 0.953754] 0x000000000000-0x000000100000 : "u-boot"
[ 0.962681] 0x000000100000-0x000000110000 : "dtb"
[ 0.971157] 0x000000110000-0x000000510000 : "kernel"
[ 0.979945] 0x000000510000-0x000001000000 : "rootfs"
[ 0.989196] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.995727] ehci-platform: EHCI generic platform driver
[ 1.001387] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.007714] ohci-platform: OHCI generic platform driver
[ 1.013380] usbcore: registered new interface driver usb-storage
[ 1.021215] input: 1c23400.lradc as /devices/platform/soc/1c23400.lradc/input/input0
[ 1.030119] i2c /dev entries driver
[ 1.037778] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator
[ 1.075933] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[ 1.085407] usbcore: registered new interface driver usbhid
[ 1.091109] usbhid: USB HID core driver
[ 1.111993] NET: Registered protocol family 17
[ 1.116556] Key type dns_resolver registered
[ 1.123402] Loading compiled-in X.509 certificates
[ 1.138698] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[ 1.150125] sun4i-backend 1e60000.display-backend: Couldn't find matching frontend, frontend features disabled
[ 1.160956] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0738094)
[ 1.170036] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc0736cec)
[ 1.177818] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 1.184421] [drm] No driver support for vblank timestamp query.
[ 1.191734] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[ 1.249948] Console: switching to colour frame buffer device 60x34
[ 1.273157] sun4i-drm display-engine: fb0: sun4i-drmdrmfb frame buffer device
[ 1.281268] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 1.299447] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 1.306225] vcc5v0: disabling
[ 1.309331] ALSA device list:
[ 1.312362] #0: Loopback 1
[ 1.316260] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 1.324988] cfg80211: failed to load regulatory.db
[ 1.331966] VFS: Cannot open root device "mtdblock3" or unknown-block(31,3): error -19
[ 1.340000] Please append a correct "root=" boot option; here are the available partitions:
[ 1.348483] 0100 4096 ram0
[ 1.348493] (driver?)
[ 1.354603] 0101 4096 ram1
[ 1.354607] (driver?)
[ 1.360782] 0102 4096 ram2
[ 1.360788] (driver?)
[ 1.366930] 0103 4096 ram3
[ 1.366936] (driver?)
[ 1.373097] 0104 4096 ram4
[ 1.373104] (driver?)
[ 1.379281] 0105 4096 ram5
[ 1.379288] (driver?)
[ 1.385390] 0106 4096 ram6
[ 1.385395] (driver?)
[ 1.391552] 0107 4096 ram7
[ 1.391557] (driver?)
[ 1.397725] 0108 4096 ram8
[ 1.397733] (driver?)
[ 1.403834] 0109 4096 ram9
[ 1.403838] (driver?)
[ 1.410010] 010a 4096 ram10
[ 1.410017] (driver?)
[ 1.416240] 010b 4096 ram11
[ 1.416246] (driver?)
[ 1.422489] 010c 4096 ram12
[ 1.422495] (driver?)
[ 1.428728] 010d 4096 ram13
[ 1.428735] (driver?)
[ 1.434952] 010e 4096 ram14
[ 1.434958] (driver?)
[ 1.441203] 010f 4096 ram15
[ 1.441210] (driver?)
[ 1.447434] 1f00 1024 mtdblock0
[ 1.447441] (driver?)
[ 1.454031] 1f01 64 mtdblock1
[ 1.454037] (driver?)
[ 1.460617] 1f02 4096 mtdblock2
[ 1.460622] (driver?)
[ 1.467188] 1f03 11200 mtdblock3
[ 1.467194] (driver?)
[ 1.473780] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3)
[ 1.482120] CPU: 0 PID: 1 Comm: swapper Not tainted 5.2.0-licheepi-nano+ #10
[ 1.489147] Hardware name: Allwinner suniv Family
[ 1.493902] [<c010e478>] (unwind_backtrace) from [<c010ba5c>] (show_stack+0x10/0x14)
[ 1.501647] [<c010ba5c>] (show_stack) from [<c0116db4>] (panic+0xe8/0x2e4)
[ 1.508529] [<c0116db4>] (panic) from [<c090129c>] (mount_block_root+0x1ec/0x2e0)
[ 1.516006] [<c090129c>] (mount_block_root) from [<c09016bc>] (prepare_namespace+0x158/0x1b8)
[ 1.524536] [<c09016bc>] (prepare_namespace) from [<c065a670>] (kernel_init+0x8/0x110)
[ 1.532452] [<c065a670>] (kernel_init) from [<c01010e0>] (ret_from_fork+0x14/0x34)
[ 1.540000] Exception stack(0xc1831fb0 to 0xc1831ff8)
[ 1.545051] 1fa0: 00000000 00000000 00000000 00000000
[ 1.553218] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1.561382] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 1.567993] Rebooting in 5 seconds..
[ 7.547227] Reboot failed -- System halted
博主好,请问我这个好像是没有识别到mtd这个是啥原因,MTD有打开的
CONFIG_MTD_BLKDEVS=y
CONFIG_MTD_BLOCK=y
CONFIG_FTL=y
CONFIG_RFD_FTL=y
CONFIG_MTD_SWAP=y
离线
离线
MMC: SUNXI SD/MMC: 0 SF: Detected w25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB *** Warning - bad CRC, using default environment Setting up a 480x272 lcd console (overscan 0x0) In: serial@1c25000 Out: serial@1c25000 Err: serial@1c25000 Net: No ethernet found. starting USB... No controllers found Hit any key to stop autoboot: 0 SF: Detected w25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB device 0 offset 0x100000, size 0x4000 SF: 16384 bytes @ 0x100000 Read: OK device 0 offset 0x110000, size 0x400000 SF: 4194304 bytes @ 0x110000 Read: OK ## Flattened Device Tree blob at 80c00000 Booting using the fdt blob at 0x80c00000 Loading Device Tree to 80e05000, end 80e0a3b5 ... OK Starting kernel ... [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 5.2.0-licheepi-nano+ (zjf@book-virtual-machine) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #10 Mon May 18 01:03:16 CST 2020 [ 0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f [ 0.000000] CPU: VIVT data cache, VIVT instruction cache [ 0.000000] OF: fdt: Machine model: Lichee Pi Nano [ 0.000000] Memory policy: Data cache writeback [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 8128 [ 0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2 [ 0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes) [ 0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.000000] Memory: 22696K/32768K available (6144K kernel code, 233K rwdata, 1472K rodata, 1024K init, 228K bss, 10072K reserved, 0K cma-reserved, 0K highmem) [ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 [ 0.000000] random: get_random_bytes called from start_kernel+0x254/0x42c with crng_init=0 [ 0.000047] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns [ 0.000127] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns [ 0.000709] Console: colour dummy device 80x30 [ 0.000807] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808) [ 0.070245] pid_max: default: 32768 minimum: 301 [ 0.070674] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.070714] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.072400] CPU: Testing write buffer coherency: ok [ 0.074424] Setting up static identity map for 0x80100000 - 0x80100058 [ 0.076719] devtmpfs: initialized [ 0.084396] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.084457] futex hash table entries: 256 (order: -1, 3072 bytes) [ 0.084767] pinctrl core: initialized pinctrl subsystem [ 0.086849] NET: Registered protocol family 16 [ 0.088278] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.090494] cpuidle: using governor menu [ 0.144032] SCSI subsystem initialized [ 0.144444] usbcore: registered new interface driver usbfs [ 0.144604] usbcore: registered new interface driver hub [ 0.144792] usbcore: registered new device driver usb [ 0.145298] pps_core: LinuxPPS API ver. 1 registered [ 0.145324] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it> [ 0.145850] Advanced Linux Sound Architecture Driver Initialized. [ 0.147573] clocksource: Switched to clocksource timer [ 0.178726] NET: Registered protocol family 2 [ 0.180294] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes) [ 0.180374] TCP established hash table entries: 1024 (order: 0, 4096 bytes) [ 0.180435] TCP bind hash table entries: 1024 (order: 0, 4096 bytes) [ 0.180483] TCP: Hash tables configured (established 1024 bind 1024) [ 0.180774] UDP hash table entries: 256 (order: 0, 4096 bytes) [ 0.180835] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) [ 0.181346] NET: Registered protocol family 1 [ 0.183860] NetWinder Floating Point Emulator V0.97 (double precision) [ 0.186019] Initialise system trusted keyrings [ 0.186614] workingset: timestamp_bits=30 max_order=13 bucket_order=0 [ 0.207933] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.214559] Key type asymmetric registered [ 0.214596] Asymmetric key parser 'x509' registered [ 0.214781] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252) [ 0.214808] io scheduler mq-deadline registered [ 0.214825] io scheduler kyber registered [ 0.227429] suniv-f1c100s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver [ 0.421545] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled [ 0.427394] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pe not found, using dummy regulator [ 0.429331] printk: console [ttyS0] disabled [ 0.449598] 1c25000.serial: ttyS0 at MMIO 0x1c25000 (irq = 25, base_baud = 6250000) is a 16550A [ 0.829064] printk: console [ttyS0] enabled [ 0.837489] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator [ 0.889606] brd: module loaded [ 0.913898] loop: module loaded [ 0.918114] SCSI Media Changer driver v0.25 [ 0.923707] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pc not found, using dummy regulator [ 0.936693] m25p80 spi0.0: w25q128 (16384 Kbytes) [ 0.942461] 4 fixed-partitions partitions found on MTD device spi0.0 [ 0.948941] Creating 4 MTD partitions on "spi0.0": [ 0.953754] 0x000000000000-0x000000100000 : "u-boot" [ 0.962681] 0x000000100000-0x000000110000 : "dtb" [ 0.971157] 0x000000110000-0x000000510000 : "kernel" [ 0.979945] 0x000000510000-0x000001000000 : "rootfs" [ 0.989196] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 0.995727] ehci-platform: EHCI generic platform driver [ 1.001387] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 1.007714] ohci-platform: OHCI generic platform driver [ 1.013380] usbcore: registered new interface driver usb-storage [ 1.021215] input: 1c23400.lradc as /devices/platform/soc/1c23400.lradc/input/input0 [ 1.030119] i2c /dev entries driver [ 1.037778] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator [ 1.075933] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB [ 1.085407] usbcore: registered new interface driver usbhid [ 1.091109] usbhid: USB HID core driver [ 1.111993] NET: Registered protocol family 17 [ 1.116556] Key type dns_resolver registered [ 1.123402] Loading compiled-in X.509 certificates [ 1.138698] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator [ 1.150125] sun4i-backend 1e60000.display-backend: Couldn't find matching frontend, frontend features disabled [ 1.160956] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc0738094) [ 1.170036] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc0736cec) [ 1.177818] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013). [ 1.184421] [drm] No driver support for vblank timestamp query. [ 1.191734] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0 [ 1.249948] Console: switching to colour frame buffer device 60x34 [ 1.273157] sun4i-drm display-engine: fb0: sun4i-drmdrmfb frame buffer device [ 1.281268] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 1.299447] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 1.306225] vcc5v0: disabling [ 1.309331] ALSA device list: [ 1.312362] #0: Loopback 1 [ 1.316260] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 [ 1.324988] cfg80211: failed to load regulatory.db [ 1.331966] VFS: Cannot open root device "mtdblock3" or unknown-block(31,3): error -19 [ 1.340000] Please append a correct "root=" boot option; here are the available partitions: [ 1.348483] 0100 4096 ram0 [ 1.348493] (driver?) [ 1.354603] 0101 4096 ram1 [ 1.354607] (driver?) [ 1.360782] 0102 4096 ram2 [ 1.360788] (driver?) [ 1.366930] 0103 4096 ram3 [ 1.366936] (driver?) [ 1.373097] 0104 4096 ram4 [ 1.373104] (driver?) [ 1.379281] 0105 4096 ram5 [ 1.379288] (driver?) [ 1.385390] 0106 4096 ram6 [ 1.385395] (driver?) [ 1.391552] 0107 4096 ram7 [ 1.391557] (driver?) [ 1.397725] 0108 4096 ram8 [ 1.397733] (driver?) [ 1.403834] 0109 4096 ram9 [ 1.403838] (driver?) [ 1.410010] 010a 4096 ram10 [ 1.410017] (driver?) [ 1.416240] 010b 4096 ram11 [ 1.416246] (driver?) [ 1.422489] 010c 4096 ram12 [ 1.422495] (driver?) [ 1.428728] 010d 4096 ram13 [ 1.428735] (driver?) [ 1.434952] 010e 4096 ram14 [ 1.434958] (driver?) [ 1.441203] 010f 4096 ram15 [ 1.441210] (driver?) [ 1.447434] 1f00 1024 mtdblock0 [ 1.447441] (driver?) [ 1.454031] 1f01 64 mtdblock1 [ 1.454037] (driver?) [ 1.460617] 1f02 4096 mtdblock2 [ 1.460622] (driver?) [ 1.467188] 1f03 11200 mtdblock3 [ 1.467194] (driver?) [ 1.473780] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3) [ 1.482120] CPU: 0 PID: 1 Comm: swapper Not tainted 5.2.0-licheepi-nano+ #10 [ 1.489147] Hardware name: Allwinner suniv Family [ 1.493902] [<c010e478>] (unwind_backtrace) from [<c010ba5c>] (show_stack+0x10/0x14) [ 1.501647] [<c010ba5c>] (show_stack) from [<c0116db4>] (panic+0xe8/0x2e4) [ 1.508529] [<c0116db4>] (panic) from [<c090129c>] (mount_block_root+0x1ec/0x2e0) [ 1.516006] [<c090129c>] (mount_block_root) from [<c09016bc>] (prepare_namespace+0x158/0x1b8) [ 1.524536] [<c09016bc>] (prepare_namespace) from [<c065a670>] (kernel_init+0x8/0x110) [ 1.532452] [<c065a670>] (kernel_init) from [<c01010e0>] (ret_from_fork+0x14/0x34) [ 1.540000] Exception stack(0xc1831fb0 to 0xc1831ff8) [ 1.545051] 1fa0: 00000000 00000000 00000000 00000000 [ 1.553218] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 1.561382] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 1.567993] Rebooting in 5 seconds.. [ 7.547227] Reboot failed -- System halted
博主好,请问我这个好像是没有识别到mtd这个是啥原因,MTD有打开的
CONFIG_MTD_BLKDEVS=y
CONFIG_MTD_BLOCK=y
CONFIG_FTL=y
CONFIG_RFD_FTL=y
CONFIG_MTD_SWAP=y
试一下这个:
观察启动log,发现,卡住的地方,有一条记录: #0: Loopback 1
再次进入配置界面:make ARCH=arm menuconfig
Device Drivers --->Block devices --->
[v]Loopback device support,勾选,看到其他有的选项,也勾上吧,相信也无妨......
上门有这个错误记录,回去看看。不知道是否为这个原因。
最近编辑记录 LinjieGuo (2020-05-18 10:22:55)
离线
卡在了start kernel什么鬼啊 之前没接触过这些 不知道从哪入手
离线
卡在了start kernel什么鬼啊 之前没接触过这些 不知道从哪入手
zImage或者dtb有问题。
离线
您好 http://dl.sipeed.com/LICHEE/Nano/SDK/config 这个config文件请问能分享下么?今天上这个发现config文件下不了。。跟着教程走不下去了。。
离线
您好 http://dl.sipeed.com/LICHEE/Nano/SDK/config 这个config文件请问能分享下么?今天上这个发现config文件下不了。。跟着教程走不下去了。。
稍等,我传上来
https://whycan.cn/files/members/1845/config_ok.zip
下载文件,解压zip包,然后将config_ok复制为.config文件就可以了
最近编辑记录 LinjieGuo (2020-05-20 09:45:45)
离线
谢谢楼主分享,按照操作走一遍应该问题不大
离线
分享一下国外大佬用 F1C100s 做的东西:
https://www.thirtythreeforty.net/posts/2019/12/my-business-card-runs-linux/
离线
持续观望学习中
离线
谢谢楼主分享 学习了
离线
very helpful thread for those new to the f1c100s. thanks a lot for sharing this with us
离线
能不能把那个交叉编译工具链转发一下,下了一天都没有弄下来,好麻烦
离线
能不能把那个交叉编译工具链转发一下,下了一天都没有弄下来,好麻烦
离线
哇塞,这个是真爱了, 从头弄到尾
离线
看到很多人问为什么rootfs构建出来是100m的
我说说我的发现 如果你们是用
http://nano.lichee.pro/build_sys/rootfs.html
下载的.config 那么就是100m的 因为这个是给tf卡准备的
给flash的应该是先用没有配置的 然后按照网站给的手动配置几个项
一些配置的简单说明
Target options --->
Target Architecture Variant (arm926t) ---> // arm926ejs架构
[ ] Enable VFP extension support // Nano 没有 VFP单元,勾选会导致某些应用无法运行
Target ABI (EABI) --->
Floating point strategy (Soft float) ---> // 软浮点
System configuration --->
(Lichee Pi) System hostname // hostname
(licheepi) Root password // 默认账户为root 密码为licheepi
[*] remount root filesystem read-write during boot // 启动时重新挂在文件系统使其可读写
这样构建出来的rootfs就几个m 再需要什么功能自己加
离线
标记一下,希望尽快完成你的学习路径
离线
多谢晕哥,我用的是widora的tiny200板。
通过不断的重测,原来是kernel下的.config文件闹出的问题,而且还有一个,我自作主张把ARCH和CROSS_COMPILE
放到编译系统的环境变量里了,我发现这样经常出问题。
反而是老老实实的写make命令,make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4这样,倒是一点毛病没有了。
不知道是不是我的Ubuntu环境问题,又或者是我在使用menuconfig时有差异。总之,板子现在已经跑起来了,非常感谢晕哥和楼主的大力支持。严格按照楼主操作是可以编译出能用的镜像来的。非常赞!
https://whycan.cn/files/members/1954/1.jpg这个是我的串口日志:
none.txt这个是我在用的镜像:16MB
f1c100s_spiflash_16M.zip
请问具体是哪里出问题了,我现在也遇到了同样的问题,并且串口输出与你的一摸一样。实在是不明白哪里错了。
最近编辑记录 Natural (2020-05-29 22:43:55)
离线
请问具体是哪里出问题了,我现在也遇到了同样的问题,并且串口输出与你的一摸一样。实在是不明白哪里错了。
找到问题了,我重新梳理了一遍流程发现自己的flash不是w系列和en系列的(官网买的板子居然用了自家源代码不支持的flash,也可能是我用的代码比较老),是Xt25f128b的。查资料改代码解决的。
离线
刚开始学习,ubuntu环境不熟悉,感觉坑太多。努力踩坑中,,,,,
离线
大佬在最后做烧写的bin文件的时候,同时生成的rootfs.jffs2一直在增大,编译也一直不结束,请问这是什么情况
离线
buildroot里面把Qt等选项去掉。
我看了下和QT相关的基本都设置=n,但是还是不行,请问是直接删掉吗?
离线
编译的rootfs太大了。哪里有精简的配置。。
离线
感谢楼主无私分享。
离线
编译成功了。。谢谢分享。。
离线
好文,正在入坑,可以少踩几个了,谢谢分享!
离线
linux小白正在一步一步入坑,感谢楼主分享。
离线
log打印 m25p80 spi0.0: w25q128 (16384 Kbytes)之后没有打印分区信息,最后卡在了Waiting for root device /dev/mtdblock3...请问这个怎么解决呢
离线
使用烧录命令也没啥问题 烧录的进度条也正常显示 但每次都没烧进去 都还是之前的内容 这是什么情况啊
离线
回到15楼,不要着急,慢慢看。
论坛上好多方法我都试过了,都行不通,帖子里要修改的地方我都修改了,还是不打印分区信息。
离线
感觉linux太复杂,入门有难度。
离线
你用buildroot下面的工具链就没问题了: output/host/bin/arm-linux-gcc
换了这个工具链运行的时候显示段错误了,只是写了个helloworld
# ./hello
Segmentation fault
需要的动态库也移植了
wings@ubuntu:~/Lichee/opt$ ./compile.sh
NEEDED libc.so.0
不知道咋回事啊
离线
换了这个工具链运行的时候显示段错误了,只是写了个helloworld
# ./hello
Segmentation fault
需要的动态库也移植了
wings@ubuntu:~/Lichee/opt$ ./compile.sh
NEEDED libc.so.0
不知道咋回事啊
使用buildroot里面的交叉编译工具链。参考这篇文章:
https://whycan.cn/t_4266.html
最近编辑记录 LinjieGuo (2020-06-12 15:01:45)
离线
刚刚入坑的小白,多谢楼主分享!
离线
刚刚入坑的小白,感谢分享!
离线
板子还在吃灰中
离线
持续学习,每一步描述都很详尽,对初学者和入门者帮助巨大!加油……
离线
uboot启动时,输入print命令查看打印:.....
Environment size: 4560/32764 bytes
=>
这个情况一直存在,各种修改,,还是解决不了问题,,能指导一下吗
离线
上次来 好像还没弄完 ,今天心血来潮 也准备弄下 。 感谢楼主 总结那么多 。sipeed的文档写的就是渣渣 。没一点流程性
离线
最近才开始学习f1c100s,多谢楼主分享,顺便咨询楼主,哪儿可以搞定LicheePi Nano Dock底板?想研习下声音问题!
离线
请问按照你的步骤,我编译出来的文件系统怎么是94M
荔枝派Nano官方wiki http://nano.lichee.pro/build_sys/rootfs.html 里面说要下载个.config 然后放到buildroot的根目录下,
我是按照它的操作的,编译出来94M
看楼主发的帖子没有执行这个操作,
5 编译根文件系统
5.1 安装依赖
apt-get install linux-headers-$(uname -r)
5.2 使用buildroot编译根文件系统
(1)获取buildroot源码
wget https://buildroot.org/downloads/buildroot-2017.08.tar.gz
tar xvf buildroot-2017.08.tar.gz
cd buildroot-2017.08/
(2) 配置bulidroot
make menuconfig
-----------------------------------------------
Target options --->
Target Architecture Variant (arm926t) ---> // arm926ejs架构
Enable VFP extension support // Nano 没有 VFP单元,勾选会导致某些应用无法运行
Target ABI (EABI) --->
Floating point strategy (Soft float) ---> // 软浮点
(2)下载依赖工具包
https://pan.baidu.com/s/1_tBdX9K7fOkH9JdXZ_MdiQ
下载完之后,解压后复制到"buildroot-2017.08/dl/"下,没有dl文件夹可自行创建。也可以不下载此工具包,但是buildroot自动更具需求下载这些工具包也许很慢。
(3)编译
make
-----------------------------------------------
出现错误:
make[2]: g++: Command not found
安装G++工具:
sudo apt-get install g++
-----------------------------------------------
继续编译:
编译成功!
-----------------------------------------------(4)查看rootfs文件的大小
ls -l output/images/rootfs.tar
离线
学习学习中
离线
没有人遇到过flash芯片是xt25f128b的情况吗
离线
我自己囤了一些25Q128,用的都是这个型号,所以你得在站里搜索一下了,我印象中是有解决办法的。
这个问题已经解决了,就是一开始没想到会是这个问题,而且flash芯片上的字也看不清了,导致前期踩了一个大坑。在这里发个言提醒一下新来的人,如果官方包启动不了,可以考虑一下是不是flash芯片的问题。
离线
哪位仁兄可有LicheePi Nano Dock底板?小弟想研习下f1c100s的alsa声音问题!
离线
先去直接买一个荔枝派回来,按贴中的方法配置一下开发环境
离线
向大佬学习
离线
写的真详细,比荔枝派的官方文档详细太多
离线
板子刚到手,一头雾水,前来学习,打算按照步骤来一遍
离线
我发现使用 Linux 版本的sunxi-fel 第一次还能下载镜像文件,但是第二次下载其实没有成功。
离线
虚拟机下载了,book用户名,密码是啥呢?
配置好的VM虚拟机Ubuntu系统 链接:https://pan.baidu.com/s/17vk0_QWRNRuxwi5EZ_P-Xg 提取码:54pb
离线
f1c100s能不能实现wifi传输数据,然后解码播放?(类似手机同屏功能)
淘宝上有个卖代码的,1.5K,做项目可以直接购买。搜索"小淘气科技"店铺就可以了
离线
这讲的很详细,但在编译Buildroot时,出错了,不知道那里的问题,从网上下了一个新的buildroot已经解决了
离线
发现了一个超级有用 的社区!
离线
卡在了8楼烧写程序后面,使用usb插上windows后没有反应,虚拟机也读不出串口。
离线
buildroot 很大
离线
我的是94M 合成bin100多M
离线
楼主给力,很详细,准备入手开发。
离线
可以烧, 你是不是 spi flash 引脚一直都下拉了?进入FEL 就不能下拉.
谢谢晕哥的提醒,我一直连着下拉spi flash的cs脚,读写都不正常,进入FEL之后,断开cs,再读写就正常了
离线
下载UBOOT,然后解压,这个过程请详细一些,是不是需要下载到指定文件夹?否则我解压时怎么找到下载的文件?
离线
ykf232323 说:下载UBOOT,然后解压,这个过程请详细一些,是不是需要下载到指定文件夹?否则我解压时怎么找到下载的文件?
帖子上面的所有解压命令都是解压到当前目录的。
你好,UBOOT下载到指定目录吗?我用解压命令找不到文件
最近编辑记录 ykf232323 (2020-09-16 17:05:59)
离线
楼主:
我编译内核的时候会报错,
在ubuntu 和centos下都试过, 网上说更新ubuntu的内核到其他版本可以解决,试过好几个版本也都一样,你们编译没遇到这个问题吗?
make[1]: *** 正在等待未完成的任务....
In file included from ./include/linux/string.h:6:0,
from ./include/uapi/linux/uuid.h:22,
from ./include/linux/uuid.h:19,
from ./include/linux/mod_devicetable.h:13,
from scripts/mod/devicetable-offsets.c:3:
./include/linux/compiler.h:242:10: fatal error: asm/barrier.h: 没有那个文件或目录
#include <asm/barrier.h>
^~~~~~~~~~~~~~~
compilation terminated.
scripts/Makefile.build:150: recipe for target 'scripts/mod/devicetable-offsets.s' failed
make[2]: *** [scripts/mod/devicetable-offsets.s] Error 1
make[2]: *** 正在等待未完成的任务....
scripts/Makefile.build:575: recipe for target 'scripts/mod' failed
make[1]: *** [scripts/mod] Error 2
Makefile:556: recipe for target 'scripts' failed
make: *** [scripts] Error 2
root@sechfly-All-Series:/mnt/home/sechfly/samba/F1C100S/Code/linux-f1c100s-480272lcd-test#
root@sechfly-All-Series:/mnt/home/sechfly/samba/F1C100S/Code/linux-f1c100s-480272lcd-test#
root@sechfly-All-Series:/mnt/home/sechfly/samba/F1C100S/Code/linux-f1c100s-480272lcd-test#
离线
你用buildroot下面的工具链就没问题了: output/host/bin/arm-linux-gcc
晕哥,小弟有个疑问,为什么在编译app的时候必须使用buildroot下面的交叉编译环境呢?
经过测试确实发现,直接使用编译kernel时间的 arm-linux-gnueabi-gcc 这一交叉编译器,在f1c200s中跑app是失败的,但是这是为什么呢?
很纠结啊,恳请晕哥赐教,不胜感激!
我现在将tslib移植到楼主的这个4.15内核中,使用 arm-linux-gnueabi-gcc 编译出了ts_calibrate、ts_test等文件,但是在f1c200s的kernel中跑,总是提示找不到ts_calibrate文件,应该是交叉工具链的故障导致bin文件失效。想着用这个buildroot/host/bin里的交叉工具链,但是这个工具链在编译tslib的时候又提示arm-linux-cpp不能生成可执行文件,具体的错误是这个arm-linux-cpp 无法识别 -V 参数,无法识别qversion 参数。郁闷啊……
最近编辑记录 willX (2020-11-28 00:45:45)
离线
#87楼 配置的好开发环境, 下载后不能运行,
因为它是12 *cpu, 我的pc 机8*cpu,
请求介决办法! 先谢了!
离线
LinjieGuo暈哥, 下载你的虚拟机不能在我的pc机上打开,
因为它是12 *cpu, 我的pc 机8*cpu, 请求介决办法! 先谢了!
离线
LinjieGuo暈哥, 下载你的虚拟机不能在我的pc机上打开,
因为它是12 *cpu, 我的pc 机8*cpu, 请求介决办法! 先谢了!
设置一下就可以了,百度吧,貌似你纠结几个月了
离线
给楼主点赞!后面我也学习学习!
离线
不知道这个芯片能不能做人脸识别
离线
LinjieGuo暈哥, 下载你的虚拟机不能在我的pc机上打开,
因为它是12 *cpu, 我的pc 机8*cpu, 请求介决办法! 先谢了!
我等着你恩赐的截图, 介决办法, 先谢了!
离线
virtual machine setting-->hard ware-->processors-->
12*cpu-->8*cpu-->ok
open ubuntu 64.vmx
Install Tools ...... not continue ......
离线
LinjieGuo暈哥
virtual machine setting-->hard ware-->processors-->
12*cpu-->8*cpu-->ok
open ubuntu 64.vmx-->Install Tools......
(PM 5:00-->10:00 )任务管理噐-->不允许, 12*cpu,
在VMWare里改没有用, 你的已配置环境work.zip移植不了.
离线
LinjieGuo暈哥
virtual machine setting-->hard ware-->processors-->
12*cpu-->8*cpu-->ok
open ubuntu 64.vmx-->Install Tools......
(PM 5:00-->10:00 )任务管理噐-->不允许, 12*cpu,
在VMWare里改没有用, 你的已配置环境work.zip移植不了.
看看是不是你的虚拟机软件版本问题呢,我使用得是很旧的VM 12Pro
离线
我的PC 惠普笔记本电脑 i5-8300H 8*2.3GHz
VMware-workstation-full-14.0.0.exe
ubuntu-14.04-desktop-amd64.iso
离线
sudo apt-get install python3-distutils
sudo apt-get install zlibx32z1-dev
这二个安装不上, 没法编译buildroot,
这坑填不了, 不能继续干。
离线
请教个问题,按照楼主LinjieGuo的方法编译hello.c,用的楼主的buildroot,为啥出现下列问题:
qsv@ubuntu:~/rootfs$ ../buildroot-2017.08/output/host/bin/arm-linux-gcc -o Boardhello hello.c
/home/qsv/buildroot-2017.08/output/host/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/6.4.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.27' not found (required by /home/qsv/buildroot-2017.08/output/host/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/6.4.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld)
collect2: error: ld returned 1 exit status
离线
绝对的好帖,,,支持一波!!!!
离线
请教个问题,按照楼主LinjieGuo的方法编译hello.c,用的楼主的buildroot,为啥出现下列问题:
qsv@ubuntu:~/rootfs$ ../buildroot-2017.08/output/host/bin/arm-linux-gcc -o Boardhello hello.c
/home/qsv/buildroot-2017.08/output/host/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/6.4.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.27' not found (required by /home/qsv/buildroot-2017.08/output/host/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/6.4.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld)
collect2: error: ld returned 1 exit status
我也不知道。得你自己琢磨一下了。
离线
楼主:
我编译内核的时候会报错,
在ubuntu 和centos下都试过, 网上说更新ubuntu的内核到其他版本可以解决,试过好几个版本也都一样,你们编译没遇到这个问题吗?
make[1]: *** 正在等待未完成的任务....
In file included from ./include/linux/string.h:6:0,
from ./include/uapi/linux/uuid.h:22,
from ./include/linux/uuid.h:19,
from ./include/linux/mod_devicetable.h:13,
from scripts/mod/devicetable-offsets.c:3:
./include/linux/compiler.h:242:10: fatal error: asm/barrier.h: 没有那个文件或目录
#include <asm/barrier.h>
^~~~~~~~~~~~~~~
compilation terminated.
scripts/Makefile.build:150: recipe for target 'scripts/mod/devicetable-offsets.s' failed
make[2]: *** [scripts/mod/devicetable-offsets.s] Error 1
make[2]: *** 正在等待未完成的任务....
scripts/Makefile.build:575: recipe for target 'scripts/mod' failed
make[1]: *** [scripts/mod] Error 2
Makefile:556: recipe for target 'scripts' failed
make: *** [scripts] Error 2
root@sechfly-All-Series:/mnt/home/sechfly/samba/F1C100S/Code/linux-f1c100s-480272lcd-test#
root@sechfly-All-Series:/mnt/home/sechfly/samba/F1C100S/Code/linux-f1c100s-480272lcd-test#
root@sechfly-All-Series:/mnt/home/sechfly/samba/F1C100S/Code/linux-f1c100s-480272lcd-test#
没有遇到过这种问题呢!兄弟你要自己琢磨一下了。是不是文件没拉齐全
离线
你好 Linjie 我按你这步骤编译 后 放入 执行后 一点反应都没有,,,,不知什么回事
感谢晕哥的指点,我们操作:
../buildroot-2017.08/output/host/bin/arm-linux-gcc -o Boardhello2 hello.c
依然是打包进根文件系统烧录到单板。
执行./Boardhello2程序,观察输出。
https://whycan.cn/files/members/1845/BoardHello2_OK.png
显然是成功了!
离线
应该是是缺库,用静态链接,一般没有问题。
编译命令行加 -static 能不能跑?
离线
应该是是缺库,用静态链接,一般没有问题。
编译命令行加 -static 能不能跑?
如果是缺少库,参考这篇文章,把相关的库文件复制过来。
https://whycan.cn/t_4266.html
最近编辑记录 LinjieGuo (2021-01-12 11:22:41)
离线
大佬 我到这步卡住了
记录了16+0 的读入
记录了16+0 的写出
16777216 bytes (17 MB, 16 MiB) copied, 0.0912342 s, 184 MB/s
记录了984+0 的读入
记录了984+0 的写出
1007616 bytes (1.0 MB, 984 KiB) copied, 0.0097831 s, 103 MB/s
记录了7+1 的读入
记录了7+1 的写出
7999 bytes (8.0 kB, 7.8 KiB) copied, 0.000651522 s, 12.3 MB/s
记录了3800+1 的读入
记录了3800+1 的写出
3891312 bytes (3.9 MB, 3.7 MiB) copied, 0.0505016 s, 77.1 MB/s
mkfs.jffs2: error!: rootfs/
error 2 (No such file or directory)
两个错误
不知怎么办了,。,
6 打包出烧写spi flash的bin文件
先将已经被解压过的文件,统统存放在一个文件夹里,防止干扰视线。
mkdir Pack
mv buildroot-2017.08.tar.gz Pack
mv f1c100s-480272lcd-test.zip Pack
mv gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi.tar.xz Pack
mv uboot.tar Pack
如果想保持官方路线,将当前根据官方操作流程而产生的文件打包,备用
tar -cf UKB.tar buildroot-2017.08 gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi linux-f1c100s-480272lcd-test u-boot
mv UKB.tar Pack
6.1 修改uboot以适配spi flashd
(1)修改源码
在uboot源码目录下 进入 ./include/configs/,修改 suniv.h
#define CONFIG_BOOTCOMMAND "sf probe 0:50000000; " \
"sf read 0x80C00000 0x100000 0x4000; " \
"sf read 0x80008000 0x110000 0x400000; " \
"bootz 0x80008000 - 0x80C00000"
(2)更改配置
回到 uboot 源码一级目录, 进入TUI配置
make ARCH=arm menuconfig
取消勾选 [] Enable a default value for bootcmd
勾选 [v] Enable boot arguments;
在下方一项中填入 bootargs 参数:
console=ttyS0,115200 panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2
(3)回到根目录重新编译
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4
6.2 修改dts以适配spi flash
(1)修改源码
修改内核源码目录下的 ./arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dts
将原来的&spi0{...}替换为:
&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins_a>;
status = "okay";
spi-max-frequency = <50000000>;
flash: w25q128@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "winbond,w25q128", "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;partition@0 {
label = "u-boot";
reg = <0x000000 0x100000>;
read-only;
};partition@100000 {
label = "dtb";
reg = <0x100000 0x10000>;
read-only;
};partition@110000 {
label = "kernel";
reg = <0x110000 0x400000>;
read-only;
};partition@510000 {
label = "rootfs";
reg = <0x510000 0xAF0000>;
};
};
};
};
(2)重新编译设备树
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- dtbs -j46.3 修改内核配置
(1)make ARCH=arm menuconfig
(2)勾选 File systems ‣ Miscellaneous filesystems ‣ Journalling Flash File System v2 (JFFS2) support
(3)修改源码下的 ./drivers/mtd/spi-nor.c
vi ./drivers/mtd/spi-nor/spi-nor.c
注释掉以下一行:
//{ "w25q128", INFO(0xef4018, 0, 64 * 1024, 256, SECT_4K) },
在这一行下面增加一项:
{ "w25q128", INFO(0xef4018, 0, 64 * 1024, 256, 0) },
(4)重新编译内核
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j46.4 打包生成用于少些spiflash的bin文件
(1)在f1c100s目录下,新建文件夹rootfs
mkdir rootfs
(2)复制rootfs.tar到rootfs文件夹中
cp buildroot-2017.08/output/images/rootfs.tar rootfs/
(3)解压rootfs目录下的rootfs.tar
cd rootfs
sudo tar -xvf rootfs.tar
(4)删除rootfs.tar
sudo rm rootfs.tar
(5)回到f1c100s目录,编写打包命令
cd ..
vim BuildMyImage.sh
填写如下内容:
#!/bin/sh
dd if=/dev/zero of=f1c100s_spiflash_16M.bin bs=1M count=16 &&\
dd if=u-boot/u-boot-sunxi-with-spl.bin of=f1c100s_spiflash_16M.bin bs=1K conv=notrunc &&\
dd if=linux-f1c100s-480272lcd-test/arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dtb of=f1c100s_spiflash_16M.bin bs=1K seek=1024 conv=notrunc &&\
dd if=linux-f1c100s-480272lcd-test/arch/arm/boot/zImage of=f1c100s_spiflash_16M.bin bs=1K seek=1088 conv=notrunc &&\
mkfs.jffs2 -s 0x100 -e 0x10000 --pad=0xAF0000 -d rootfs/ -o rootfs.jffs2 &&\
dd if=rootfs.jffs2 of=f1c100s_spiflash_16M.bin bs=1k seek=5184 conv=notrunc &&\
sync
(6)运行打包脚本
sudo sh BuildMyImage.sh
-----------------------------------------------
提示错误:
BuildMyImage.sh: 6: BuildMyImage.sh: mkfs.jffs2: not found
安装mtd-utils工具:
sudo apt-get install mtd-utils
安装过程中,有可能出现超时情况,多尝试几遍或者更换源试试。
-----------------------------------------------
继续运行打包脚本:
sudo sh BuildMyImage.sh
稍等片刻,打包便能完成。
打包完成后,在当前目录,生成一个名为f1c100s_spiflash_16M.bin的文件。
离线
后来测试了 静态 也没有输出
应该是是缺库,用静态链接,一般没有问题。
编译命令行加 -static 能不能跑?
离线
大佬 我到这步卡住了
记录了16+0 的读入
记录了16+0 的写出
16777216 bytes (17 MB, 16 MiB) copied, 0.0912342 s, 184 MB/s
记录了984+0 的读入
记录了984+0 的写出
1007616 bytes (1.0 MB, 984 KiB) copied, 0.0097831 s, 103 MB/s
记录了7+1 的读入
记录了7+1 的写出
7999 bytes (8.0 kB, 7.8 KiB) copied, 0.000651522 s, 12.3 MB/s
记录了3800+1 的读入
记录了3800+1 的写出
3891312 bytes (3.9 MB, 3.7 MiB) copied, 0.0505016 s, 77.1 MB/s
mkfs.jffs2: error!: rootfs/
error 2 (No such file or directory)
两个错误
不知怎么办了,。,LinjieGuo 说:6 打包出烧写spi flash的bin文件
先将已经被解压过的文件,统统存放在一个文件夹里,防止干扰视线。
....
用root用户看看,sudo -i,切换到root用户。
离线
大佬 等我把系统重装一下,按你的流程一步步来
离线
你好 请问这里 选择分支:点击Branch->f1c100s-480272 480272 这个版本和屏幕有关系吗? 分支里只有f1c100s-480272lcd-test 我的屏幕时800*480 也用这个分支吗?
4 编译linux内核
4.1 获取linux内核源码
(1)打开链接:https://github.com/Icenowy/linux.git
(2)选择分支:点击Branch->f1c100s-480272
(3)打包下载
(4)传到ubuntu中,解压
unzip f1c100s-480272lcd-test.zip
(5)下载别人配置好的配置文件
http://dl.sipeed.com/LICHEE/Nano/SDK/config
复制下载的文件到linux源码根目录,并改名字为".config"(6)体验可视化配置
make ARCH=arm menuconfig
(7)编译
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4
-----------------------------------------------
出现错误:
scripts/extract-cert.c:21:10: fatal error: openssl/bio.h: 没有那个文件或目录
安装工具:
sudo apt-get install libssl-dev
-----------------------------------------------
继续编译:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4
成功编译,生成的 zImage 在 arch ‣ arm ‣ boot 目录下
离线
你好 请问这里 选择分支:点击Branch->f1c100s-480272 480272 这个版本和屏幕有关系吗? 分支里只有f1c100s-480272lcd-test 我的屏幕时800*480 也用这个分支吗?
LinjieGuo 说:4 编译linux内核
4.1 获取linux内核源码
(1)打开链接:https://github.com/Icenowy/linux.git
...成功编译,生成的 zImage 在 arch ‣ arm ‣ boot 目录下
离线
你好 linjie
按步骤,到这里时下载进去后 启动 进不了系统,, 下面是信息,不知怎么办了
U-Boot SPL 2018.01-05679-g013ca457fd-dirty (Jan 13 2021 - 14:37:47)
DRAM: 32 MiB
Trying to boot from MMC1
Card did not respond to voltage select!
mmc_init: -95, time 22
spl: mmc init failed with error: -95
Trying to boot from sunxi SPI
U-Boot 2018.01-05679-g013ca457fd-dirty (Jan 13 2021 - 14:37:47 +0800) Allwinner Technology
CPU: Allwinner F Series (SUNIV)
Model: Lichee Pi Nano
DRAM: 32 MiB
MMC: SUNXI SD/MMC: 0
SF: unrecognized JEDEC id bytes: 0b, 40, 18
*** Warning - spi_flash_probe_bus_cs() failed, using default environment
Setting up a 800x480 lcd console (overscan 0x0)
In: serial@1c25000
Out: serial@1c25000
Err: serial@1c25000
Net: No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot: 0
SF: unrecognized JEDEC id bytes: 0b, 40, 18
Failed to initialize SPI flash at 0:0 (error -2)
No SPI flash selected. Please run `sf probe'
No SPI flash selected. Please run `sf probe'
=>
7 烧写验证
(1)参考文章:https://whycan.cn/t_444.html
编译、安装Windows版本sunxi-fel步骤 (32M spi flash补丁,支持W25Q256/MX25L256)
安装好驱动,烧写bin文件到单板上。
(2)观察串口输出:
https://whycan.cn/files/members/1845/log.png
明显是存在问题,但是不知道问题出在哪里,太晚了,只能先睡觉。
离线
你好 linjie 这里去掉了,我再尝试 https://blog.csdn.net/kencaber/article/details/107575210 这里提到的问题
再次编写,我的板子是 xt 的flash ,,,坑。。。 按上链接修改了 可以 引导内核了
帖子上面说了,这是个坑。
晕哥 说:@LinjieGuo 去掉冒号, 那个地方是荔枝派文档挖的大坑。
u-boot 的 bootcmd 里面 sf probe 0:500000
上面命令行的冒号。
最近编辑记录 LinuxGo (2021-01-13 17:07:45)
离线
你好,linjie
目前我卡在这里,配置和你一样还是不行 ,,, 错误也一样。,,,
[ 1.372966] ALSA device list:
[ 1.375940] #0: Loopback 1
[ 1.379707] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 1.388454] cfg80211: failed to load regulatory.db
[ 1.394132] Waiting for root device /dev/mtdblock3...
[ 202.722558] random: crng init done
编译完毕,打包后烧写bin文件。非常遗憾,结果依旧!
https://whycan.cn/files/members/1845/log3.png
观察.config里的配置项
https://whycan.cn/files/members/1845/config%E4%B8%ADMTD%E9%80%89%E9%A1%B9.png
文件中,可以看出,MTD_BLOCK已经配置为y,但依然没能成功启动。
我怀疑也许是根文件系统配置的问题。夜深了,明日继续。
算了,还是再搞搞把,这么早休息实在没劲,继续折腾。
观察启动log,发现,卡住的地方,有一条记录: #0: Loopback 1
再次进入配置界面:make ARCH=arm menuconfig
Device Drivers --->Block devices --->
[v]Loopback device support,勾选,看到其他有的选项,也勾上吧,相信也无妨,贴图:
https://whycan.cn/files/members/1845/DeviceDrivers__Blockdevices.png
保存配置,继续编译。
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4
打包后烧录验证。
离线
看看14楼的内容,是否勾选上了。
http://whycan.com/t_3138.html#p26711
最近编辑记录 LinjieGuo (2021-01-13 17:32:03)
离线
你好 linjie 按上面的检查了一遍 都一样 还是卡在那
看看14楼的内容,是否勾选上了。
http://whycan.com/t_3138.html#p26711
离线
你好 linjie 按上面的检查了一遍 都一样 还是卡在那
LinjieGuo 说:看看14楼的内容,是否勾选上了。
http://whycan.com/t_3138.html#p26711
唯有召唤无所不能的晕哥出场了。
离线
你好 linjie
首先向楼主道个喜,哈!看了楼主的帖子 我终于进了系统。 谢谢!
其次:向后来人 指下路,,,板子上装 xt25f128 的flash 在这里要改成
原来 :
6.3 修改内核配置
(1)make ARCH=arm menuconfig
(2)勾选 File systems ‣ Miscellaneous filesystems ‣ Journalling Flash File System v2 (JFFS2) support
(3)修改源码下的 ./drivers/mtd/spi-nor.c
vi ./drivers/mtd/spi-nor/spi-nor.c
注释掉以下一行:
//{ "w25q128", INFO(0xef4018, 0, 64 * 1024, 256, SECT_4K) },
在这一行下面增加一项:
{ "w25q128", INFO(0xef4018, 0, 64 * 1024, 256, 0) },
注意这里:{ "w25q128", INFO(0xef4018, 0, 64 * 1024, 256, 0) }, 包括涉及到w25q128 的地方都改成 xt25f128
生成 红色文本
6 打包出烧写spi flash的bin文件
先将已经被解压过的文件,统统存放在一个文件夹里,防止干扰视线。
mkdir Pack
mv buildroot-2017.08.tar.gz Pack
mv f1c100s-480272lcd-test.zip Pack
mv gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi.tar.xz Pack
mv uboot.tar Pack
如果想保持官方路线,将当前根据官方操作流程而产生的文件打包,备用
tar -cf UKB.tar buildroot-2017.08 gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi linux-f1c100s-480272lcd-test u-boot
mv UKB.tar Pack
6.1 修改uboot以适配spi flashd
(1)修改源码
在uboot源码目录下 进入 ./include/configs/,修改 suniv.h
#define CONFIG_BOOTCOMMAND "sf probe 0:50000000; " \
"sf read 0x80C00000 0x100000 0x4000; " \
"sf read 0x80008000 0x110000 0x400000; " \
"bootz 0x80008000 - 0x80C00000"
(2)更改配置
回到 uboot 源码一级目录, 进入TUI配置
make ARCH=arm menuconfig
取消勾选 [] Enable a default value for bootcmd
勾选 [v] Enable boot arguments;
在下方一项中填入 bootargs 参数:
console=ttyS0,115200 panic=5 rootwait root=/dev/mtdblock3 rw rootfstype=jffs2
(3)回到根目录重新编译
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4
6.2 修改dts以适配spi flash
(1)修改源码
修改内核源码目录下的 ./arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dts
将原来的&spi0{...}替换为:
&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins_a>;
status = "okay";
spi-max-frequency = <50000000>;
flash: w25q128@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "winbond,w25q128", "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;partition@0 {
label = "u-boot";
reg = <0x000000 0x100000>;
read-only;
};partition@100000 {
label = "dtb";
reg = <0x100000 0x10000>;
read-only;
};partition@110000 {
label = "kernel";
reg = <0x110000 0x400000>;
read-only;
};partition@510000 {
label = "rootfs";
reg = <0x510000 0xAF0000>;
};
};
};
};
(2)重新编译设备树
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- dtbs -j46.3 修改内核配置
(1)make ARCH=arm menuconfig
(2)勾选 File systems ‣ Miscellaneous filesystems ‣ Journalling Flash File System v2 (JFFS2) support
(3)修改源码下的 ./drivers/mtd/spi-nor.c
vi ./drivers/mtd/spi-nor/spi-nor.c
注释掉以下一行:
//{ "w25q128", INFO(0xef4018, 0, 64 * 1024, 256, SECT_4K) },
在这一行下面增加一项:
{ "w25q128", INFO(0xef4018, 0, 64 * 1024, 256, 0) },
(4)重新编译内核
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j46.4 打包生成用于少些spiflash的bin文件
(1)在f1c100s目录下,新建文件夹rootfs
mkdir rootfs
(2)复制rootfs.tar到rootfs文件夹中
cp buildroot-2017.08/output/images/rootfs.tar rootfs/
(3)解压rootfs目录下的rootfs.tar
cd rootfs
sudo tar -xvf rootfs.tar
(4)删除rootfs.tar
sudo rm rootfs.tar
(5)回到f1c100s目录,编写打包命令
cd ..
vim BuildMyImage.sh
填写如下内容:
#!/bin/sh
dd if=/dev/zero of=f1c100s_spiflash_16M.bin bs=1M count=16 &&\
dd if=u-boot/u-boot-sunxi-with-spl.bin of=f1c100s_spiflash_16M.bin bs=1K conv=notrunc &&\
dd if=linux-f1c100s-480272lcd-test/arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dtb of=f1c100s_spiflash_16M.bin bs=1K seek=1024 conv=notrunc &&\
dd if=linux-f1c100s-480272lcd-test/arch/arm/boot/zImage of=f1c100s_spiflash_16M.bin bs=1K seek=1088 conv=notrunc &&\
mkfs.jffs2 -s 0x100 -e 0x10000 --pad=0xAF0000 -d rootfs/ -o rootfs.jffs2 &&\
dd if=rootfs.jffs2 of=f1c100s_spiflash_16M.bin bs=1k seek=5184 conv=notrunc &&\
sync
(6)运行打包脚本
sudo sh BuildMyImage.sh
-----------------------------------------------
提示错误:
BuildMyImage.sh: 6: BuildMyImage.sh: mkfs.jffs2: not found
安装mtd-utils工具:
sudo apt-get install mtd-utils
安装过程中,有可能出现超时情况,多尝试几遍或者更换源试试。
-----------------------------------------------
继续运行打包脚本:
sudo sh BuildMyImage.sh
稍等片刻,打包便能完成。
打包完成后,在当前目录,生成一个名为f1c100s_spiflash_16M.bin的文件。
离线
哈 ,下一步 helloword
恭喜恭喜,我以为你看了那个CSDN的帖子,已经改过去了呢。
离线
楼主,helloword出来了,接上液晶,液晶不正常。
Uboot启动时液晶是正常显示了个小企鹅。
文件系统全部加载完后液晶就不正常了。
这改哪边呀?
离线
你好,Linjie :
我的液晶屏是800✖️480。
在哪边修改?
LinuxGo 说:楼主,helloword出来了,接上液晶,液晶不正常。
Uboot启动时液晶是正常显示了个小企鹅。
文件系统全部加载完后液晶就不正常了。
这改哪边呀?你接的LCD分辨率多少呢
离线
你好,Linjie :
我的液晶屏是800✖️480。
在哪边修改?LinjieGuo 说:LinuxGo 说:楼主,helloword出来了,接上液晶,液晶不正常。
Uboot启动时液晶是正常显示了个小企鹅。
文件系统全部加载完后液晶就不正常了。
这改哪边呀?你接的LCD分辨率多少呢
离线
5 编译根文件系统
5.1 安装依赖
apt-get install linux-headers-$(uname -r)
5.2 使用buildroot编译根文件系统
(1)获取buildroot源码
wget https://buildroot.org/downloads/buildroot-2017.08.tar.gz
tar xvf buildroot-2017.08.tar.gz
cd buildroot-2017.08/
(2) 配置bulidroot
make menuconfig
-----------------------------------------------
Target options --->
Target Architecture Variant (arm926t) ---> // arm926ejs架构
Enable VFP extension support // Nano 没有 VFP单元,勾选会导致某些应用无法运行
Target ABI (EABI) --->
Floating point strategy (Soft float) ---> // 软浮点
(2)下载依赖工具包
https://pan.baidu.com/s/1_tBdX9K7fOkH9JdXZ_MdiQ
下载完之后,解压后复制到"buildroot-2017.08/dl/"下,没有dl文件夹可自行创建。也可以不下载此工具包,但是buildroot自动更具需求下载这些工具包也许很慢。
(3)编译
make
-----------------------------------------------
出现错误:
make[2]: g++: Command not found
安装G++工具:
sudo apt-get install g++
-----------------------------------------------
继续编译:
编译成功!
-----------------------------------------------(4)查看rootfs文件的大小
ls -l output/images/rootfs.tar
你好,我跟着你的教程做到这一步,发现编译出来的根文件系统有98M之大! flash总共才16M,这应该是不对的吧,你编译出来的文件大小多少?
-rw-r--r-- 1 yws yws 98129920 1月 15 10:03 buildroot/buildroot-2017.08/output/images/rootfs.tar
离线
编译出来,根文件系统,尺寸大的话,参考这几层的回复。
解决方法:把QT和一些没用到的库取消勾选就好了。
下面的几层回复,没有组织好,但是你要的答案,确实在里面。
http://whycan.com/t_3138.html#p31496
http://whycan.com/t_3138.html#p31627
http://whycan.com/t_3138.html#p36643
最近编辑记录 LinjieGuo (2021-01-18 16:43:44)
离线
好的,谢谢热心的楼主
离线
楼主,有没有简单的 io驱动 编译 ko文件的步骤呀,搞了好几天了,一直编译出了很多错误
离线
楼主请问我在编译根文件系统时,出现了这个问题,该怎么解决
freadahead.c: In function 'freadahead':
freadahead.c:92:3: error: #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
92 | #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
| ^~~~~
CC fseek.o
CC fseeko.o
make[5]: *** [Makefile:1915: freadahead.o] Error 1
make[5]: *** Waiting for unfinished jobs....
fseeko.c: In function 'rpl_fseeko':
fseeko.c:110:4: error: #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib."
110 | #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib."
| ^~~~~
make[5]: *** [Makefile:1915: fseeko.o] Error 1
make[4]: *** [Makefile:1674: all] Error 2
make[3]: *** [Makefile:1572: all-recursive] Error 1
make[2]: *** [Makefile:1528:all] 错误 2
make[1]: *** [package/pkg-generic.mk:230:/home/windovo/buildroot-2017.08/output/build/host-m4-1.4.18/.stamp_built] 错误 2
make: *** [Makefile:79:_all] 错误 2
离线
楼主请问我在编译根文件系统时,出现了这个问题,该怎么解决
freadahead.c: In function 'freadahead':
freadahead.c:92:3: error: #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
92 | #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
| ^~~~~
CC fseek.o
CC fseeko.o
make[5]: *** [Makefile:1915: freadahead.o] Error 1
make[5]: *** Waiting for unfinished jobs....
fseeko.c: In function 'rpl_fseeko':
fseeko.c:110:4: error: #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib."
110 | #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib."
| ^~~~~
make[5]: *** [Makefile:1915: fseeko.o] Error 1
make[4]: *** [Makefile:1674: all] Error 2
make[3]: *** [Makefile:1572: all-recursive] Error 1
make[2]: *** [Makefile:1528:all] 错误 2
make[1]: *** [package/pkg-generic.mk:230:/home/windovo/buildroot-2017.08/output/build/host-m4-1.4.18/.stamp_built] 错误 2
make: *** [Makefile:79:_all] 错误 2
可能是源码没有完整下载导致的。
或者是c库没选对。
最近编辑记录 LinjieGuo (2021-03-13 10:17:20)
离线
xt25f128也是一个坑,不单只是多个冒号:的问题
离线
请教楼主,怎么能配置uboot之后kernel启动信息和登录信息显示在lcd上?目前只能串口登录。我用的v3s,480*272
离线
各位大佬能不能看下我这个是什么问题?现在买的荔枝派nano配的xt25f128,我应该配置好了,但是后续出现rfd_ftl: no RFD magic found in 'u-boot',还有VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6,麻烦大佬帮我看看 LOG:log.txt
最近编辑记录 loopinnova (2021-04-04 23:27:58)
离线
[ 0.952845] Creating 4 MTD partitions on "spi0.0":
[ 0.957800] 0x000000000000-0x000000100000 : "u-boot"
[ 0.966748] rfd_ftl: no RFD magic found in 'u-boot'
[ 0.973911] ftl_cs: FTL header not found.
[ 0.979699] 0x000000100000-0x000000210000 : "dtb"
[ 0.988407] rfd_ftl: no RFD magic found in 'dtb'
[ 0.995293] ftl_cs: FTL header not found.
[ 1.000986] 0x000000110000-0x000000620000 : "kernel"
[ 1.019761] rfd_ftl: no RFD magic found in 'kernel'
[ 1.027133] ftl_cs: FTL header not found.
[ 1.032773] 0x000000510000-0x000001000000 : "rootfs"
[ 1.066081] rfd_ftl: no RFD magic found in 'rootfs'
[ 1.073276] ftl_cs: FTL header not found.
奇怪,这是什么错误?
离线
[ 0.952845] Creating 4 MTD partitions on "spi0.0":
[ 0.957800] 0x000000000000-0x000000100000 : "u-boot"
[ 0.966748] rfd_ftl: no RFD magic found in 'u-boot'
[ 0.973911] ftl_cs: FTL header not found.
[ 0.979699] 0x000000100000-0x000000210000 : "dtb"
[ 0.988407] rfd_ftl: no RFD magic found in 'dtb'
[ 0.995293] ftl_cs: FTL header not found.
[ 1.000986] 0x000000110000-0x000000620000 : "kernel"
[ 1.019761] rfd_ftl: no RFD magic found in 'kernel'
[ 1.027133] ftl_cs: FTL header not found.
[ 1.032773] 0x000000510000-0x000001000000 : "rootfs"
[ 1.066081] rfd_ftl: no RFD magic found in 'rootfs'
[ 1.073276] ftl_cs: FTL header not found.奇怪,这是什么错误?
我也不知道,要请教一下晕哥了
离线
f1c200s适用吗
离线
5 编译根文件系统
5.1 安装依赖
apt-get install linux-headers-$(uname -r)
5.2 使用buildroot编译根文件系统
(1)获取buildroot源码
wget https://buildroot.org/downloads/buildroot-2017.08.tar.gz
tar xvf buildroot-2017.08.tar.gz
cd buildroot-2017.08/
(2) 配置bulidroot
make menuconfig
-----------------------------------------------
Target options --->
Target Architecture Variant (arm926t) ---> // arm926ejs架构
Enable VFP extension support // Nano 没有 VFP单元,勾选会导致某些应用无法运行
Target ABI (EABI) --->
Floating point strategy (Soft float) ---> // 软浮点
(2)下载依赖工具包
https://pan.baidu.com/s/1_tBdX9K7fOkH9JdXZ_MdiQ
下载完之后,解压后复制到"buildroot-2017.08/dl/"下,没有dl文件夹可自行创建。也可以不下载此工具包,但是buildroot自动更具需求下载这些工具包也许很慢。
(3)编译
make
-----------------------------------------------
出现错误:
make[2]: g++: Command not found
安装G++工具:
sudo apt-get install g++
-----------------------------------------------
继续编译:
编译成功!
-----------------------------------------------(4)查看rootfs文件的大小
ls -l output/images/rootfs.tar
编译报错: 搜了搜也没看懂该怎么解决, 大神帮帮忙
make[2]: *** [build/genchecksum.o] Error 1
/home/username/f1c100s/buildroot/buildroot-2017.08/output/host/arm-buildroot-linux-uclibcgnueabi/bin/as: unrecognized option '--64'
Makefile:2497: recipe for target 'build/genconstants.o' failed
make[2]: *** [build/genconstants.o] Error 1
/home/username/f1c100s/buildroot/buildroot-2017.08/output/host/arm-buildroot-linux-uclibcgnueabi/bin/as: unrecognized option '--64'
Makefile:2497: recipe for target 'build/gengenrtl.o' failed
make[2]: *** [build/gengenrtl.o] Error 1
/home/username/f1c100s/buildroot/buildroot-2017.08/output/host/arm-buildroot-linux-uclibcgnueabi/bin/as: unrecognized option '--64'
Makefile:2497: recipe for target 'build/genhooks.o' failed
make[2]: *** [build/genhooks.o] Error 1
make[2]: Leaving directory '/home/username/f1c100s/buildroot/buildroot-2017.08/output/build/host-gcc-initial-6.4.0/build/gcc'
Makefile:4113: recipe for target 'all-gcc' failed
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory '/home/username/f1c100s/buildroot/buildroot-2017.08/output/build/host-gcc-initial-6.4.0/build'
package/pkg-generic.mk:227: recipe for target '/home/username/f1c100s/buildroot/buildroot-2017.08/output/build/host-gcc-initial-6.4.0/.stamp_built' failed
make: *** [/home/username/f1c100s/buildroot/buildroot-2017.08/output/build/host-gcc-initial-6.4.0/.stamp_built] Error 2
离线
离线
楼主, 我无论是按照官方的流程还是 你的流程来编译;
我的设备树文件都生成不了 ; 也就是内核编译后, 没有.dtb文件;
root@ubuntu:/home/lqb/licheepi/linux# vim ./arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dts
root@ubuntu:/home/lqb/licheepi/linux#
root@ubuntu:/home/lqb/licheepi/linux#
root@ubuntu:/home/lqb/licheepi/linux# make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- dtbs -j4
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CHK scripts/mod/devicetable-offsets.h
CHK include/generated/timeconst.h
CHK include/generated/bounds.h
CHK include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
root@ubuntu:/home/lqb/licheepi/linux#
root@ubuntu:/home/lqb/licheepi/linux#
root@ubuntu:/home/lqb/licheepi/linux# ls ./arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dts
./arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dts
root@ubuntu:/home/lqb/licheepi/linux# ls ./arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dtb
ls: cannot access './arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dtb': No such file or directory
离线
学习了,F1C100S,不知道支持SPI_NAND_FLASH吗?从这个上面我也知道了mplayer与QT占空间,哈哈哈。
还有如果真的想做一个项目,可以做一个基于LINUX的上位机,把V3S或者F1C100S/F2C100S,通过串口、网口接口与下位机通信,设置/显示 电压,电流,温度报警 什么的,我看好多工控机都是用WINDOWS上位机,哈哈
离线
大佬,我按流程走一遍,最后在烧录后屏就卡在小企鹅那了。可能会是哪方面的原因?我再按流程走一遍看看
离线
世上无难事,只怕有心人。经过5天的坚持,终于跑起来了。分享一下:
教程中的板载FLASH是w25q128,而我的flash是xt25f128b。一直跑不起来就是因为我的flash不在支持列表中,后在u-boot目录下./drivers/mtd/spi/spi_flash_ids.c中添加{"xt25f128b", INFO(0x0b4018, 0x0, 64 * 1024, 256, RD_FULL | WR_QPP | SECT_4K) },
在linux-f1c100s-480272lcd-test目录下修改./drivers/mtd/spi-nor/spi-nor.c文件,添加{ "xt25f128b", INFO(0x0b4018, 0, 64 * 1024, 256, 0) },
最后在./arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dts中修改
&spi0 {
...
flash@0 {
...
compatible = "winbond,xt25f128b", "jedec,spi-nor";
...
};
};
重编译后烧录,成功跑起!感谢此贴https://zhuanlan.zhihu.com/p/76221655?from_voters_page=true
离线
@LinjieGuo 去掉冒号, 那个地方是荔枝派文档挖的大坑。
u-boot 的 bootcmd 里面 sf probe 0:500000
上面命令行的冒号。
绝了绝了,哈哈。后面的文档已经在改了。坑呀坑呀就习惯了,哈哈!
离线
离线
卧槽,一统江湖的霸气!似乎有没有SDK都照样玩得转,东拼西凑的各种驱动,库啊啥的都能耍一下子……
最近编辑记录 电子垃圾专业户 (2021-10-08 22:11:40)
离线
离线
请问,Tf卡和flash 他们的内核配置有不一样的地方吗
离线
离线
离线
上一次来看还没跑起来,今天突然想起来就又来看了,没想到LZ还有继续更新!太赞了
离线
@LinjieGuo
这个文件是要烧写到哪个地址呢,是地址0吗,我把下面提供的虚拟机里的bin文件烧录到0地址结果出现和你第一次报错一样的错误,但是suniv.h已经是删过冒号的了。
离线
真正从0,搭建一遍F1C100S
最近编辑记录 sunxiang (2022-03-14 20:30:09)
离线
@LinjieGuo
这个文件是要烧写到哪个地址呢,是地址0吗,我把下面提供的虚拟机里的bin文件烧录到0地址结果出现和你第一次报错一样的错误,但是suniv.h已经是删过冒号的了。
https://whycan.com/files/members/6074/微信截图_20220310161208.png
兄弟你的Flash是什么型号呢?
离线
@LinjieGuo
我的FLASH是荔枝派nano买来自带的
XT25F128B
原来是这样!!我一下配置再编译试试 谢谢楼主!
离线
从lz的虚拟机中把linux源码拷贝到我的ubuntu中,编译就报错了:
离线
宿主内核系统api更新导致,把sys/socket.h改为linux/socket.h即可
最近编辑记录 kekemuyu (2022-04-04 20:05:24)
离线
同样的linux源码和配置文件,只是换了个宿主系统,内核编译出来体积翻倍。
离线
就是编译uboot的时候一直报make: *** No targets specified and no makefile found. Stop.
离线
请教大神一个问题,开发环境是不是可以用树莓派的ubuntu下进行编译?
离线
7楼是简精的精华部分,感谢分享.
离线
在这个脚本中:
#!/bin/sh
dd if=/dev/zero of=f1c100s_spiflash_16M.bin bs=1M count=16 &&\
dd if=u-boot/u-boot-sunxi-with-spl.bin of=f1c100s_spiflash_16M.bin bs=1K conv=notrunc &&\
dd if=linux-f1c100s-480272lcd-test/arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dtb of=f1c100s_spiflash_16M.bin bs=1K seek=1024 conv=notrunc &&\
dd if=linux-f1c100s-480272lcd-test/arch/arm/boot/zImage of=f1c100s_spiflash_16M.bin bs=1K seek=1088 conv=notrunc &&\
mkfs.jffs2 -s 0x100 -e 0x10000 --pad=0xAF0000 -d rootfs/ -o rootfs.jffs2 &&\
dd if=rootfs.jffs2 of=f1c100s_spiflash_16M.bin bs=1k seek=5184 conv=notrunc &&\
sync
在mkfs.jffs2 -s 0x100 -e 0x10000 --pad=0xAF0000 -d rootfs/ -o rootfs.jffs2 &&\这一行前面是不是得加一个 fakeroot,我在没加之前一直报错can't open /dev/console: Permission denied,加完之后就能正常启动了
离线
我是在这个贴子里找到的并解决问题的 https://whycan.com/viewtopic.php?pid=15768#p15768
离线
赞楼主,目前也在搭建环境,基于WSL,使用usbipd透传usb数据。。可惜sd卡要改内核才能支持
离线
这个选项没有
离线
请教一下大佬,这个最后一步烧入bin文件到单板上怎么烧入的,有没有详细步骤。
离线
请教一下大佬,这个最后一步烧入bin文件到单板上怎么烧入的,有没有详细步骤。
教程在晕哥这个链接
编译、安装Windows版本sunxi-fel步骤 (32M spi flash补丁,支持W25Q256/MX25L256)
https://whycan.com/t_444.html#p1130
离线
楼主能出一个配置adb的教程吗,配置了usb后不知道咋操作了,传不了文件
离线
usb gadget有懂的大神么
离线
楼主能出一个配置adb的教程吗,配置了usb后不知道咋操作了,传不了文件
参考这一篇,可以用串口直接传文件
https://whycan.com/t_4266.html
离线
楼主,启动速度要多久?
离线
支持开源,而且是allegro格式!
离线
三哥 说:123456进不去
稍等,我看看。密码可能被我改成linjie了。你输入"linjie",然后回车看看。
谢谢楼主
离线
卡在starting kernel是什么情况?
离线
请问,编译祼机的交叉编译,和编译内核的,是不是不一样
离线