挖坑网/填坑网 DebugDump Forum

别人挖坑默默填上,自己挖坑含泪填上。天下没有填不了的坑,只有不会填坑的人。来吧,加入我们,挖坑行,填坑你更行! 站长QQ: 516333132 点击这里给我发消息

您尚未登录。

#1 2018-01-25 13:51:43

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,482

F1C100s入坑记录(linux kernel失败!sunxi-fel, u-boot正常。)

购买链接: https://s.click.taobao.com/s0JIBZw
参考链接0: 买个全志arm9 F1C100s 方案的唱戏机回来拆一拆
参考链接1: F1C100s 手册
参考链接2: 看戏机(唱戏机)F1C100原理图
参考链接3: 侨德实业有限公司VS (全志C100电脑升级)流程示意图
参考链接4: 先科唱戏机(看戏机)F1C100s方案运行XBOOT大神的XBOOT系统步骤
参考链接5: F1C100s入坑记录

参考链接A: 荔枝派Zero V3s开发板入坑记录
参考链接B: 【视频分享】制作荔枝派Zero开发板(全志V3s) TF/SD卡启动盘
参考链接C:Allwinner_F1C600_User_Manual_V1.0.pdf

1. 准备工作
    1) 安装Ubuntu14.04LTS(长支持版本),如果用虚拟机请安装vmware14(别的虚拟机都不推荐,泪的教训),  然后安装 vmware tools(不是必须,但是方便文件共享)

    2) 安装arm linux 工具链:

ubuntu14.04 x64下载这个工具链: gcc-linaro-7.2.1-2017.11-x86_64_arm-eabi.tar.xz

一般解压缩到 /usr/local/ 目录,
然后把目录 export PATH=/usr/local/gcc-linaro-7.2.1-2017.11-x86_64_arm-eabi/bin:$PATH 添加到 /etc/profile, 或者 ~/.bashrc 文件

    3) 安装git源码管理软件: 

sudo apt-get install git

    4) 其他支撑软件

2. 烧录、安装USB烧录工具sunxi-fel

git clone -b f1c100s-spiflash https://github.com/Icenowy/sunxi-tools.git
make
make install

3. u-boot
      首先获取u-boot源码:             git clone https://github.com/Icenowy/u-boot.git -b f1c100s-spiflash

默认bootcmd, bootargs在这个文件修改: include/configs/suniv.h

cd u-boot

###默认配置文件
ARCH=arm CROSS_COMPILE=arm-eabi- make licheepi_nano_spiflash_defconfig

###如果需要执行其他配置:
ARCH=arm CROSS_COMPILE=arm-eabi- make menuconfig

###执行单核编译:
ARCH=arm CROSS_COMPILE=arm-eabi- make

###或多核编译,避免cpu其他内核打酱油, j后的参数是参与编译的cpu个数:
ARCH=arm CROSS_COMPILE=arm-eabi- make -j3

4. 设备树, Linux
    获取Linux源码(zero-4.13.y分支对网卡支持比较好):  git clone https://github.com/Icenowy/linux.git -b f1c100s-480272lcd-test
    生成荔枝派Zero 默认配置文件: make  ARCH=arm CROSS_COMPILE=arm-linux- sunxi_defconfig
    设备树文件(默认不需要修改):  arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dts
    编译内核:     make  ARCH=arm CROSS_COMPILE=arm-linux- -j4
    编译设备树: make  ARCH=arm CROSS_COMPILE=arm-linux- dtbs

5. 根文件系统
    1). 下载最新的buildroot稳定版本
        官方网站:   https://buildroot.org/download.html
        长支持版本:buildroot-2017.02.7.tar.gz
        最新稳定版:buildroot-2017.08.1.tar.gz

    2). 配置buildroot 参数, make menuconfig; make

        QQ20171122094600.png

        QQ20171122094653.png

        如果不会配置, 就下载下面这个文件,然后把 buildroot-v3s-20171122.zip解压后 拷贝到 buidroot目录成 .config 文件。       

     3). 执行编译, 生成文件跟文件系统。

     4). 如需构建Qt应用程序,   视频地址:  buildroot成功后如何编译Qt应用程序

5. USB烧录spi flash

6. 制作TF卡启动盘

7. 下载编译烧录xboot

  1. git clone  https://github.com/xboot/xboot.git

  2. cd xboot

  3. make CROSS_COMPILE=arm-linux- PLATFORM=arm32-f1c100s

  4. sudo sunxi-fel spiflash-write 0 output/xboot.bin

离线

#2 2018-01-26 22:56:16

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,482

Re: F1C100s入坑记录(linux kernel失败!sunxi-fel, u-boot正常。)

占位

离线

#3 2018-01-26 22:56:49

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,482

Re: F1C100s入坑记录(linux kernel失败!sunxi-fel, u-boot正常。)

占位

离线

#4 2018-01-26 23:00:30

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,482

Re: F1C100s入坑记录(linux kernel失败!sunxi-fel, u-boot正常。)

如果用6.0以下版本的gcc编译u-boot, 会提示以下错误:

sunxi@ubuntu:/disk2/f1c100s/u-boot$ ARCH=arm CROSS_COMPILE=arm-linux- make
*** Your GCC is older than 6.0 and is not supported
make: *** [checkgcc6] Error 1

解决办法:
去这里下载工具链: Latest Bare-Metal Targeted Binary Toolchain Releases

因为我的电脑是ubuntu14.04 x64版本的,所以我下载这个工具链: gcc-linaro-7.2.1-2017.11-x86_64_arm-eabi.tar.xz

一般解压缩到 /usr/local/ 目录,
然后把目录 export PATH=/usr/local/gcc-linaro-7.2.1-2017.11-x86_64_arm-eabi/bin:$PATH 添加到 /etc/profile, 或者 ~/.bashrc 文件

离线

#5 2018-01-26 23:10:12

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,482

Re: F1C100s入坑记录(linux kernel失败!sunxi-fel, u-boot正常。)

编译u-boot出现以下错误:

sunxi@ubuntu:/disk2/f1c100s/u-boot$ ARCH=arm CROSS_COMPILE=arm-eabi- make
  CHK     include/config/uboot.release
  UPD     include/config/uboot.release
  CHK     include/generated/version_autogenerated.h
  UPD     include/generated/version_autogenerated.h
  CHK     include/generated/timestamp_autogenerated.h
  UPD     include/generated/timestamp_autogenerated.h
  CC      lib/asm-offsets.s
  CHK     include/generated/generic-asm-offsets.h
  UPD     include/generated/generic-asm-offsets.h
  CC      arch/arm/lib/asm-offsets.s
  CHK     include/generated/asm-offsets.h
  UPD     include/generated/asm-offsets.h
  SHIPPED scripts/dtc/pylibfdt/libfdt.i
  PYMOD   scripts/dtc/pylibfdt/_libfdt.so
unable to execute 'swig': No such file or directory
error: command 'swig' failed with exit status 1
make[3]: *** [scripts/dtc/pylibfdt/_libfdt.so] Error 1
make[2]: *** [scripts/dtc/pylibfdt] Error 2
make[1]: *** [scripts/dtc] Error 2
make: *** [scripts] Error 2
hexing@ubuntu:/disk2/f1c100s/u-boot$ swig
The program 'swig' is currently not installed. You can install it by typing:
sudo apt-get install swig

解决方法:
sudo apt-get install swig

离线

#6 2018-01-26 23:16:19

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,482

Re: F1C100s入坑记录(linux kernel失败!sunxi-fel, u-boot正常。)

u-boot如果出现以下编译错误:

sunxi@ubuntu:/disk2/f1c100s/u-boot$ ARCH=arm CROSS_COMPILE=arm-eabi- make
  CHK     include/config/uboot.release
  CHK     include/generated/version_autogenerated.h
  CHK     include/generated/timestamp_autogenerated.h
  UPD     include/generated/timestamp_autogenerated.h
  CHK     include/generated/generic-asm-offsets.h
  CHK     include/generated/asm-offsets.h
  PYMOD   scripts/dtc/pylibfdt/_libfdt.so
scripts/dtc/pylibfdt/libfdt_wrap.c:130:21: fatal error: Python.h: No such file or directory
# include <Python.h>
                     ^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
make[3]: *** [scripts/dtc/pylibfdt/_libfdt.so] Error 1
make[2]: *** [scripts/dtc/pylibfdt] Error 2
make[1]: *** [scripts/dtc] Error 2
make: *** [scripts] Error 2
hexing@ubuntu:/disk2/f1c100s/u-boot$ make clean
  CLEAN   spl/u-boot.cfg
  CLEAN   u-boot.cfg
hexing@ubuntu:/disk2/f1c100s/u-boot$ ARCH=arm CROSS_COMPILE=arm-eabi- make licheepi_nano_spiflash_defconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
hexing@ubuntu:/disk2/f1c100s/u-boot$ ARCH=arm CROSS_COMPILE=arm-eabi- make
scripts/kconfig/conf  --silentoldconfig Kconfig
  CHK     include/config.h
  CFG     u-boot.cfg
  GEN     include/autoconf.mk
  GEN     include/autoconf.mk.dep
  CFG     spl/u-boot.cfg
  GEN     spl/include/autoconf.mk
  CHK     include/config/uboot.release
  CHK     include/generated/version_autogenerated.h
  CHK     include/generated/timestamp_autogenerated.h
  UPD     include/generated/timestamp_autogenerated.h
  CC      lib/asm-offsets.s
  CHK     include/generated/generic-asm-offsets.h
  CC      arch/arm/lib/asm-offsets.s
  CHK     include/generated/asm-offsets.h
  PYMOD   scripts/dtc/pylibfdt/_libfdt.so
scripts/dtc/pylibfdt/libfdt_wrap.c:130:21: fatal error: Python.h: No such file or directory
# include <Python.h>
                     ^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
make[3]: *** [scripts/dtc/pylibfdt/_libfdt.so] Error 1
make[2]: *** [scripts/dtc/pylibfdt] Error 2
make[1]: *** [scripts/dtc] Error 2
make: *** [scripts] Error 2


解决方法:
sudo apt-get install libpython2.7-dev

离线

#7 2018-01-28 18:08:27

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,482

Re: F1C100s入坑记录(linux kernel失败!sunxi-fel, u-boot正常。)

_                   _
_  _ | |___ _____ _____ _| |_
\ \/ /|  _  |  _  |  _  |_   _|  (C) 2007-2018
)  ( | |_| | |_| | |_| | | |____JIANJUN.JIANG__
/_/\_\|_____|_____|_____| |_____________________|
V2.0.2 (Jan 28 2018 - 09:14:13) - [sast-m697][SAST M697 Digital Player Based On Allwinner F1C100S]
[    0.000000] Probe device 'romdisk.0' with romdisk
[    0.000010] Probe device 'hosc' with clk-fixed
[    0.000020] Probe device 'losc' with clk-fixed
[    0.000030] Probe device 'pll-cpu' with clk-f1c100s-pll
[    0.000040] Probe device 'pll-audio' with clk-f1c100s-pll
[    0.000050] Probe device 'pll-video' with clk-f1c100s-pll
[    0.000060] Probe device 'pll-ve' with clk-f1c100s-pll
[    0.000070] Probe device 'pll-ddr' with clk-f1c100s-pll
[    0.000080] Probe device 'pll-periph' with clk-f1c100s-pll
[    0.000090] Probe device 'cpu' with clk-mux
[    0.000100] Probe device 'hclk' with clk-divider
[    0.000110] Probe device 'ahb1-pre-div' with clk-divider
[    0.000120] Probe device 'mux-ahb1' with clk-mux
[    0.000130] Probe device 'ahb1' with clk-ratio
[    0.000140] Probe device 'apb1' with clk-ratio
[    0.000150] Probe device 'gate-bus-uart0' with clk-gate
[    0.000160] Probe device 'gate-bus-uart1' with clk-gate
[    0.000170] Probe device 'gate-bus-uart2' with clk-gate
[    0.000180] Probe device 'link-uart0' with clk-link
[    0.000190] Probe device 'link-uart1' with clk-link
[    0.000200] Probe device 'link-uart2' with clk-link
[    0.000210] Probe device 'gate-bus-i2c0' with clk-gate
[    0.000220] Probe device 'gate-bus-i2c1' with clk-gate
[    0.000230] Probe device 'gate-bus-i2c2' with clk-gate
[    0.000240] Probe device 'link-i2c0' with clk-link
[    0.000250] Probe device 'link-i2c1' with clk-link
[    0.000260] Probe device 'link-i2c2' with clk-link
[    0.000270] Probe device 'gate-bus-spi0' with clk-gate
[    0.000280] Probe device 'gate-bus-spi1' with clk-gate
[    0.000290] Probe device 'link-spi0' with clk-link
[    0.000300] Probe device 'link-spi1' with clk-link
[    0.000310] Probe device 'mux-timer0' with clk-mux
[    0.000320] Probe device 'ratio-timer0' with clk-ratio
[    0.000330] Probe device 'link-timer0' with clk-link
[    0.000340] Probe device 'mux-timer1' with clk-mux
[    0.000350] Probe device 'ratio-timer1' with clk-ratio
[    0.000360] Probe device 'link-timer1' with clk-link
[    0.000370] Probe device 'mux-timer2' with clk-mux
[    0.000380] Probe device 'ratio-timer2' with clk-ratio
[    0.000390] Probe device 'link-timer2' with clk-link
[    0.000400] Probe device 'link-pwm' with clk-link
[    0.000410] Probe device 'link-wdt' with clk-link
[    0.000420] Probe device 'mux-defe' with clk-mux
[    0.000430] Probe device 'div-defe' with clk-divider
[    0.000440] Probe device 'gate-defe' with clk-gate
[    0.000450] Probe device 'gate-bus-defe' with clk-gate
[    0.000460] Probe device 'link-defe' with clk-link
[    0.000470] Probe device 'mux-debe' with clk-mux
[    0.000480] Probe device 'div-debe' with clk-divider
[    0.000490] Probe device 'gate-debe' with clk-gate
[    0.000500] Probe device 'gate-bus-debe' with clk-gate
[    0.000510] Probe device 'link-debe' with clk-link
[    0.000520] Probe device 'mux-tcon' with clk-mux
[    0.000530] Probe device 'gate-tcon' with clk-gate
[    0.000540] Probe device 'gate-bus-tcon' with clk-gate
[    0.000550] Probe device 'link-tcon' with clk-link
[    0.000560] Probe device 'reset-f1c100s.0' with reset-f1c100s
[    0.000570] Probe device 'reset-f1c100s.1' with reset-f1c100s
[    0.000580] Probe device 'reset-f1c100s.2' with reset-f1c100s
[    0.000590] Probe device 'irq-f1c100s.0' with irq-f1c100s
[    0.000600] Probe device 'irq-f1c100s-gpio.0' with irq-f1c100s-gpio
[    0.000610] Probe device 'irq-f1c100s-gpio.1' with irq-f1c100s-gpio
[    0.000620] Probe device 'irq-f1c100s-gpio.2' with irq-f1c100s-gpio
[    0.000630] Probe device 'gpio-f1c100s.0' with gpio-f1c100s
[    0.000640] Probe device 'gpio-f1c100s.1' with gpio-f1c100s
[    0.000650] Probe device 'gpio-f1c100s.2' with gpio-f1c100s
[    0.000660] Probe device 'gpio-f1c100s.3' with gpio-f1c100s
[    0.000670] Probe device 'gpio-f1c100s.4' with gpio-f1c100s
[    0.000680] Probe device 'pwm-f1c100s.0' with pwm-f1c100s
[    0.000690] Probe device 'pwm-f1c100s.1' with pwm-f1c100s
[    0.000700] Probe device 'ce-f1c100s-timer.0' with ce-f1c100s-timer
[    0.000052] Probe device 'cs-f1c100s-timer.0' with cs-f1c100s-timer
[    0.006456] Probe device 'i2c-f1c100s.0' with i2c-f1c100s
▒▒ځ   0.022901] Probe device 'uart-16550.0' with uart-16550s
[    0.028168] Probe device 'uart-16550.1' with uart-16550
[    0.033392] Probe device 'uart-16550.2' with uart-16550
[    0.038588] Probe device 'spi-f1c100s.0' with spi-f1c100s
[    0.043953] Probe device 'spi-f1c100s.1' with spi-f1c100s
[    0.049301] Fail to probe device with spi-flash
[    0.053790] Probe device 'wdog-f1c100s.0' with wdog-f1c100s
[    0.059338] Probe device 'key-f1c100s-lradc.0' with key-f1c100s-lradc
[    0.065736] Probe device 'led-gpio.0' with led-gpio
[    0.070569] Probe device 'ledtrig-heartbeat.0' with ledtrig-heartbeat
[    0.076962] Probe device 'led-pwm-bl.0' with led-pwm-bl
[    0.101522] Probe device 'fb-f1c100s.0' with fb-f1c100s
[    0.106722] Probe device 'console-uart.0' with console-uart
Press any key to stop autoboot:  0.000
xboot: /$

QQ20180128180623.png

烧了xboot 的f1c100s 程序, 背光亮了,串口输出正常, 屏幕没有显示.

离线

#8 2018-02-26 11:44:53

ming9
会员
注册时间: 2018-02-26
累计发帖: 1

Re: F1C100s入坑记录(linux kernel失败!sunxi-fel, u-boot正常。)

晕哥:这芯片好不好买到?

离线

#9 2018-02-26 13:32:20

daydayup
会员
注册时间: 2017-10-09
累计发帖: 268

Re: F1C100s入坑记录(linux kernel失败!sunxi-fel, u-boot正常。)

ming9 说:

晕哥:这芯片好不好买到?

据说挺好买的,大量用在mp4,老人唱戏机上面。

离线

#10 2018-02-27 07:20:55

mango
会员
注册时间: 2017-12-02
累计发帖: 45

Re: F1C100s入坑记录(linux kernel失败!sunxi-fel, u-boot正常。)

强烈关注一下

离线

#11 2018-04-20 17:28:02

msr06rr
会员
注册时间: 2018-01-11
累计发帖: 26

Re: F1C100s入坑记录(linux kernel失败!sunxi-fel, u-boot正常。)

晕哥,主线linux中的有电阻触摸驱动了吗?我编译了https://github.com/Lichee-Pi/linux中nano-4.14-exp分支的内核源码后没有发现event设备文件。

离线

#12 2018-04-20 17:34:23

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,482

Re: F1C100s入坑记录(linux kernel失败!sunxi-fel, u-boot正常。)

还没测试主线呢,这两天在弄bsp linux,这个外设驱动全。

离线

#13 2018-05-29 12:10:33

zuoyi
会员
注册时间: 2018-05-29
累计发帖: 3

Re: F1C100s入坑记录(linux kernel失败!sunxi-fel, u-boot正常。)

我按照上面的步骤编译u-boot,出现如下错误:

scripts/kconfig/conf  --silentoldconfig Kconfig

*** Error during update of the configuration.

scripts/kconfig/Makefile:46: recipe for target 'silentoldconfig' failed
make[2]: *** [silentoldconfig] Error 1
Makefile:479: recipe for target 'silentoldconfig' failed
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'.  Stop.


请问什么问题,
Google不出来怎么解决

离线

#14 2018-05-29 12:44:16

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,482

Re: F1C100s入坑记录(linux kernel失败!sunxi-fel, u-boot正常。)

你的是什么系统,什么版本,Ubuntu14.04?

离线

#15 2018-05-29 17:05:25

zuoyi
会员
注册时间: 2018-05-29
累计发帖: 3

Re: F1C100s入坑记录(linux kernel失败!sunxi-fel, u-boot正常。)

谢晕哥,
上面那个错误是lubuntu 14.04,下午我换成ubuntu 14.04,出现了新的错误:
wyl@wyl-VirtualBox:~/share/nano/u-boot$ ARCH=arm CROSS_COMPILE=arm-eabi- make licheepi_nano_spiflash_defconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
wyl@wyl-VirtualBox:~/share/nano/u-boot$ ARCH=arm CROSS_COMPILE=arm-eabi- make
scripts/kconfig/conf  --silentoldconfig Kconfig

*** Error during update of the configuration.

make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/uboot.release'.  Stop.

离线

#16 2018-05-30 09:14:47

晕哥
Administrator
注册时间: 1970-01-01
累计发帖: 2,482

Re: F1C100s入坑记录(linux kernel失败!sunxi-fel, u-boot正常。)

参考链接: https://blog.csdn.net/lingran07/article/details/7644087

刚刚编译内核时出现:
*** Error during update of the configuration.

make[2]: *** [silentoldconfig] 错误 1
make[1]: *** [silentoldconfig] 错误 2
make: *** 没有规则可以创建“include/config/kernel.release”需要的目标“include/config/auto.conf”。 停止。

开始没搞懂,目标 auto.conf 也存在啊,而且不是 root 所有的,普通用户直接编译应该也没问题啊,
上网一查,说是root问题,又切换到root 编译,果然...
可能之前用root 编译,有其他文件 已经是root所有了,

知道原因后,解决这个问题的方法就很显然了:
1、切回到root去make kernel。
2、change整个kernel目录下所有文件及文件夹的权限和owner:    chown -R hm:hm android-kernel-samsung-dev

看起来应该是 用户切换问题.

离线

#17 2018-05-31 09:42:05

zuoyi
会员
注册时间: 2018-05-29
累计发帖: 3

Re: F1C100s入坑记录(linux kernel失败!sunxi-fel, u-boot正常。)

可以编译了,
原来我是放到虚拟机共享目录的,就会出现如下问题
    scripts/kconfig/conf  --silentoldconfig Kconfig

    *** Error during update of the configuration.

    make[2]: *** [silentoldconfig] Error 1
    make[1]: *** [silentoldconfig] Error 2
    make: *** No rule to make target `include/config/auto.conf', needed by `include/config/uboot.release'.  Stop.
后来我在非共享目录编译,就可以编译过了,

离线

页脚