您尚未登录。

楼主 # 2022-05-27 00:28:58

SuperSpy
会员
注册时间: 2022-04-28
已发帖子: 13
积分: 123

荔枝派zero v3s 菜鸟新手uboot+linux+rootfs首次跑通

本人原本是mcu工程师,在b站看了不少linux小电脑的相关视频,被深深的吸引住了,因此萌生出了想自己鼓捣一个linux小电脑的项目的想法,算是实践下自己的兴趣,也算是做一个技术升级。毕竟之前自己这么多年都是以用stm32系列为主,跑系统也都是freertos一类的系统。
  通过b站等众多视频了解到了荔枝派,坑网,在这里看了很多帖子入门,也得到了一些大佬的回复与帮助,因此自己在初步调通之后,也想分享一下自己的入门流程,算是对自己的一个记录,希望也可以给后续入门的小伙伴们提供一些有用的信息~。
  在坑网中主要参考的是沉鱼大佬的帖子“荔枝派Zero V3s开发板入坑记录 (TF/SD卡启动)(主线Linux,主线u-boot)”(https://whycan.com/t_561.html)。
  一、基本环境准备
  1 使用的虚拟机环境为VMware workstation,安装Ubuntu14.04LTS(按照沉鱼大佬的帖子),虚拟机跟windows互传文件使用的是filezilla(有关该软件的使用可以百度搜索一下,很多的教程~,主要就是ubuntu里面需要安装ftp服务器,然后使用该软件配置ftp服务发送上传就可以了)。
  2 安装交叉编译工具  sudo apt-get install gcc-arm-linux-gnueabihf
  3 其他的各种支持的软件(话说我初步配置环境就搞了好久,大家不用急,多搜索慢慢来肯定可以的,缺什么软件就安装什么,这个过程可能会比较繁琐)
  二、uboot
  由于我使用的是较为简单的sd卡启动,所以获取该uboot源码: git clone https://github.com/Lichee-Pi/u-boot.git -b v3s-current。要是比较卡的话也可以手动下载压缩包,然后传到ubuntu上即可,基本如果使用sd卡启动的话,只会用到这一个版本的uboot。
  修改 include/configs/sun8i.h, 使u-boot可以直接从tf卡启动:

    #define CONFIG_BOOTCOMMAND   "setenv bootm_boot_mode sec; " \
                                "load mmc 0:1 0x41000000 zImage; "  \
                                "load mmc 0:1 0x41800000 sun8i-v3s-licheepi-zero-dock.dtb; " \
                                "bootz 0x41000000 - 0x41800000;"

    #define CONFIG_BOOTARGS      "console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 earlyprintk rw  vt.global_cursor_default=0"
  上述添加的内容要放在#include<configs/sunxi-common.h>之前,否则编译会有问题,类似重定义的错误,这个一定要注意。
  在修改文件内容是可以使用gedit编辑器,感觉操作比vim方便很多,可以进行熟悉的CV快捷键复制操作等。
  其中BOOTCOMMAND与BOOTARGS为启动内核所需要执行的重要命令及uboot向内核传递的重要参数。load,bootz等均为uboot内所使用的命令。"load mmc 0:1 0x41000000 zImage; " 意思是将linux内核镜像zImage加载到内存的0x41000000处,因为linux需要在内存中才能启动,属于标准套路操作"load mmc 0:1 0x41800000 sun8i-v3s-licheepi-zero-dock.dtb; "意思是将设备树文件加载到0x41800000地址处,其中设备树文件可根据自己的需要来选取,主要用到的就是sun8i-v3s-licheepi-zero-dock.dtb,以及带屏幕的sun8i-v3s-licheepi-zero-with-800x480-lcd.dtb(网店五寸屏)。"bootz 0x41000000 - 0x41800000;"的意思是使用bootz命令来加载启动linux内核,有关uboot命令的使用大家可以百度一下~资料很多~。BOOTARGS的内容有格式要求,大家可以查看BOOTARGS相关的资料即可~。
 
  接下来是编译uboot:
  cd到uboot目录下,
  1 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make distclean
  2 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make LicheePi_Zero_800x480LCD_defconfig (群主网店5寸屏)
或者ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make LicheePi_Zero_480x272LCD_defconfig (通用4.3寸屏)
或者ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make LicheePi_Zero_defconfig (默认)
  3 ARCH=arm make menuconfig
  4 执行编译:ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make
  这四步执行完之后,就会在uboot的目录下生成一个u-boot-sunxi-with-spl.bin,该文件就是最后烧录到sd卡的uboot文件。

  三、linux内核及设备树
  这部分基本也是参照沉鱼大佬的流程~
  获取Linux源码(zero-4.13.y分支对网卡支持比较好):  git clone https://github.com/Lichee-Pi/linux.git -b zero-4.13.y

  编译linux及生成设备树,还是熟悉的四步
  1 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make distclean(这里清除一下再编译比较好,要不然残留的配置有可能会有问题)
  2 生成荔枝派Zero 默认配置文件: CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm make licheepi_zero_defconfig
  3 ARCH=arm make menuconfig
  4 编译内核:     make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j4
     编译设备树: make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- dtbs
  四步之后linux内核镜像zImage及设备树文件就生成好了,zImage在arch/arm/boot/下,驱动模块在out/下。设备树文件在arch/arm/boot/dts/下。
  其中linux内核的配置基本不用修改,licheepi_zero_defconfig文件基本都帮我们配置好了。

  四、根文件系统buildroot
  该部分还是继续参考(惭愧0.0)
    1). 下载最新的buildroot稳定版本
        官方网站:   https://buildroot.org/download.html
        长支持版本:buildroot-2017.02.7.tar.gz
        最新稳定版:buildroot-2017.08.1.tar.gz
    我这里下载的buildroot-2017.02.7.tar.gz。
    2). 配置buildroot 参数, make menuconfig; make
         buildroot的配置主要需要配置两个地方,一个是Target options ,另一个是编译工具链相关,
Target options  --->
    Target Architecture (ARM (little endian))  --->
    Target Binary Format (ELF)  --->
    Target Architecture Variant (cortex-A7)  --->
    Target ABI (EABIhf)  --->
    Floating point strategy (VFPv4-D16)  --->
    ARM instruction set (ARM)  --->
Toolchain  --->
    Toolchain type (External toolchain)  --->
     Toolchain External Options
    Toolchain (Custom toolchain)  --->
    Toolchain origin (Pre-installed toolchain)  --->
    (/usr/local/arm/gcc-linaro-4.9.4-2017.01-x86_64_arm-linux-gnueabihf/) Toolchain path
    ($(ARCH)-linux-gnueabihf) Toolchain prefix
    External toolchain gcc version (4.9.x)  --->
    External toolchain kernel headers series (4.0.x)  --->
    External toolchain C library (glibc/eglibc)  --->
    [※] Toolchain has SSP support? (NEW)
    [※] Toolchain has RPC support? (NEW)
    [※] Toolchain has C++ support?
    [※] Enable MMU support (NEW)
  该部分配置的主要是按照另一位大佬https://blog.csdn.net/p1279030826/article/details/114500777的流程完成的。
  然而我其实这块省事,直接使用晕哥提供的编译好的buildroot,建议大家也可以先用现成的根文件系统,来测试uboot跟内核是否好使,等整个都调通了,再一个部分一个部分的学习~(此处实属偷懒了0.0)
  根文件系统最后编译完会生成一个rootfs.tar,这个用来后面解压到sd卡中即可。

  五、系统烧写到sd卡
  使用sd卡作为启动介质,此处参考晕哥的帖子https://whycan.com/t_547.html,贼给力,总结如下:
   1) 删除TF卡所有分区并格式化
   2) 将uboot写入到sd卡8k偏移处(必须8K偏移, brom规定的)。
        sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8 ,其中X为你的盘符,我这里是sdb。
   3) 建立第一个分区,大小32M(可以随意填写), 格式FAT16, 把zImage, 设备树.dtb拷贝到 这个分区
   4) 建立第二个分区,用尽剩余空间,格式ext4, 把buildroot产生的rootfs.tar解压到该分区根目录
        tar xvf output/images/rootfs.tar -C /挂载的tf卡第二个分区目录
   这里面我实际操作的时候遇到几个我认为需要注意的地方分享跟大家:
  1 使用dd命令烧写uboot的时候,命令执行肯定是会成功的,但是不一定真正的写进去了,因为有时候我发现没卡,但是由于/dev下有sdb设备,该命令也能执行成功,但是事实上都没有插卡肯定是没写进去的,因此大家要多检查一下。我实际操作发现,一般写入速度为4M所有的时候就是写进去了(我的电脑是这样子的)。
  2 tar解压根文件系统的时候,建议都使用绝对路径来执行。
  3 整个调试的时候大家一开始一定要使用串口接到电脑上看!!!因为我一开始板子到的时候只有五寸屏,手里又没有usb转串口,就合计先调试一下看能不能把信息输出到屏幕上,后来才发现默认uboot的各种信息以及内核启动信息都是输出到串口上的!我鼓捣半天都不知道好不好使,所以初学者还是一定先用串口调试交互,先跑起来再说~
  最后成功启动后,登陆账号root,无密码。
 
  跑起来的那一刻真的很激动,从断断续续学相关知识到板子到手到上手跑起来,差不多一个半月时间,着实是用了好久,跑起来的时候真是兴奋的睡不着觉,哈哈。算是从菜鸟变成了小小鸟,因此写下这个帖子跟大家分享下,希望能帮助到其他人~

离线

#1 2022-05-27 08:37:39

kevinccc
会员
注册时间: 2022-03-09
已发帖子: 17
积分: 7

Re: 荔枝派zero v3s 菜鸟新手uboot+linux+rootfs首次跑通

看来是激动的一晚没睡 。。:)

离线

楼主 #2 2022-05-27 13:01:34

SuperSpy
会员
注册时间: 2022-04-28
已发帖子: 13
积分: 123

Re: 荔枝派zero v3s 菜鸟新手uboot+linux+rootfs首次跑通

嘿嘿,第一次发帖,都不太会上传图片,所以没有截图啥的0.0

离线

#3 2022-05-27 14:37:40

hameyou
会员
注册时间: 2018-04-15
已发帖子: 196
积分: 8.5

Re: 荔枝派zero v3s 菜鸟新手uboot+linux+rootfs首次跑通

写的确实比较详细,想我这样的新手,有福了,可以看着一步一步来

离线

#4 2022-05-27 14:42:09

哇酷小二
管理员
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,387
积分: 1902
个人网站

Re: 荔枝派zero v3s 菜鸟新手uboot+linux+rootfs首次跑通

SuperSpy 说:

嘿嘿,第一次发帖,都不太会上传图片,所以没有截图啥的0.0

如何在本站发图片, 顺便吐槽功能弱智的phpbb半自动步木仑
https://whycan.com/t_588.html#p16351





离线

#5 2022-05-28 10:42:48

forever_rainy
会员
注册时间: 2022-04-09
已发帖子: 21
积分: 40

Re: 荔枝派zero v3s 菜鸟新手uboot+linux+rootfs首次跑通

我也是新手,玩了快半月了,从 老版本,kernel 4.13  buildroot2017,到新版本kernel5.10,buildroot2022,有debian的根文件系统的制作,还有qt的交叉编译,坑人的ffmpeg,sdl的交叉编译,lvgl初次使用,坑点很多。
也是不知道linux3.4有什么玩法,就看到说这个对摄像头支持较好,倒是也没有试过,手里也没有摄像头,唯一有一个摄像头是ov5640,不过在老家。但是也看到有人用新的内核跑起摄像头(b站有个129先生)

离线

#6 2022-05-28 10:54:11

哇酷小二
管理员
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,387
积分: 1902
个人网站

Re: 荔枝派zero v3s 菜鸟新手uboot+linux+rootfs首次跑通

@forever_rainy
收到芒果大佬的库存 DVP与MIPI 双摄像头R11开发板
https://bbs.aw-ol.com/topic/1305/share/17





离线

#7 2022-05-30 09:26:43

bynce
会员
注册时间: 2021-05-23
已发帖子: 16
积分: 29.5

Re: 荔枝派zero v3s 菜鸟新手uboot+linux+rootfs首次跑通

提出两点建议:
1、不用 sudo apt-get install gcc-arm-linux-gnueabihf。生产连接。
在buildroot 中检查是链接 就无法编译。
2、
sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8  && sync
tar xvf output/images/rootfs.tar -C    && sync
否则有拷贝失败现象。


到后面才是坑 。 例如更换屏幕驱动麻烦的很,更换最新 uboot  kernel  FB DRM 驱动等。很多内容都讲也没讲。

离线

楼主 #8 2022-06-01 18:51:37

SuperSpy
会员
注册时间: 2022-04-28
已发帖子: 13
积分: 123

Re: 荔枝派zero v3s 菜鸟新手uboot+linux+rootfs首次跑通

现在我也还是仅仅刚刚跑起来,现在想串口屏幕双端显示,还是在鼓捣的路上,感觉每前进一步都需要花不少时间0.0

离线

#9 2022-06-05 20:07:07

Expelliarmus
会员
注册时间: 2022-02-24
已发帖子: 9
积分: 4

Re: 荔枝派zero v3s 菜鸟新手uboot+linux+rootfs首次跑通

大佬能看一下你的内核启动信息吗?
我按照步骤挂载了tf卡以后,启动了会这样报错

[    1.282605] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.294208] mmc0: new high speed SDXC card at address aaaa
[    1.301793] mmcblk0: mmc0:aaaa SD64G 59.5 GiB 
[    1.308542]  mmcblk0: p1 p2
[    1.397586] random: fast init done
[    1.418907] EXT4-fs (mmcblk0p2): recovery complete
[    1.425024] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.433305] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    1.441761] devtmpfs: mounted
[    1.446221] Freeing unused kernel memory: 1024K
[    1.450986] Run /sbin/init as init process
[    1.568896] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Initializing random number generator: OK
Saving random seed: [    1.800068] random: dd: uninitialized urandom read (512 bytes read)
OK
Starting network: OK

Welcome to Buildroot
buildroot login: [    4.408506] mmc0: card aaaa removed
[    4.412660] JBD2: Error -5 detected when updating journal superblock for mmcblk0p2-8.
[    4.420594] Aborting journal on device mmcblk0p2-8.
[    4.426432] JBD2: Error -5 detected when updating journal superblock for mmcblk0p2-8.
[    4.546310] mmc0: host does not support reading read-only switch, assuming write-enable
[    4.554519] mmc0: new SD card at address d555
[    4.561175] mmcblk0: mmc0:d555 SD032 30.6 MiB 
[    4.567656] debugfs: Directory 'mmcblk0' with parent 'block' already present!
root
[   10.601234] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #1048577: comm getty: reading directory lblock 0
[   10.612880] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm getty: reading directory lblock 0

查到说有可能是tf卡的问题,但是我换了一张新的还是这样

离线

楼主 #10 2022-06-05 22:53:33

SuperSpy
会员
注册时间: 2022-04-28
已发帖子: 13
积分: 123

Re: 荔枝派zero v3s 菜鸟新手uboot+linux+rootfs首次跑通

@Expelliarmus
我暂时还没研究明白怎么贴图片哈,不好意思。我启动后直接就是这样的,我复制一部分放上来吧。主要就是“Welcome to Buildroot”之后,直接输入root就可以正常使用了。
Starting logging: OK
Initializing random number generator... [    1.698817] random: dd: uninitialized urandom read (512 bytes read)
done.
Starting network: OK

Welcome to Buildroot
buildroot login: root
# cat /dev/ttyS0


[   31.845405] vcc3v0: disabling
[   31.848404] vcc5v0: disabling




^Z[1]+  Stopped                    cat /dev/ttyS0
#
# cat /dev/tty0

离线

#11 2022-06-06 16:11:52

Expelliarmus
会员
注册时间: 2022-02-24
已发帖子: 9
积分: 4

Re: 荔枝派zero v3s 菜鸟新手uboot+linux+rootfs首次跑通

@SuperSpy
多谢分享,看来我只能再自己找找问题了,
另外插入代码或者图片可以用code标签,类似HTML语法
在发帖栏下方的BBCode里面有详细的说明

例如插入代码
以【code】开始,
中间插入复制的文本,
最后以【/code】结尾

将上面的【】换为英文符号[]就是下面的效果了,

开始,
中间插入复制的文本,
最后以

离线

#12 2022-06-06 22:29:53

forever_rainy
会员
注册时间: 2022-04-09
已发帖子: 21
积分: 40

Re: 荔枝派zero v3s 菜鸟新手uboot+linux+rootfs首次跑通

@Expelliarmus
贴一个我自己编译的uboot,buildroot,减少了一些该芯片内核不需要的的东西的启动过程,内核是下载的linux kerne 官网的5.10.1,参照4.12和网上的资料的修改的,编译的工具链也更新到了750。我内存卡使用的是三星的,买了一个128g的,舍不得糟蹋,手里的32g被我拔插的不像样。。。你是使用的哪个uboot 和kernel及文件系统?看你那启动都有systcl了,看来不是像咱这光不溜秋的那种。内核版本前面的都没有贴全啊,应该直接把uboot都加载驱动文件系统这些一起贴上来,像我下面这样

U-Boot 2017.01-rc2-00062-ga080a96-dirty (May 28 2022 - 20:33:49 +0800) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000


U-Boot 2017.01-rc2-00062-ga080a96-dirty (May 28 2022 - 20:33:49 +0800) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000
Net:   phy interface0
eth0: ethernet@1c30000
starting USB...
No controllers found
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
reading /boot.scr
292 bytes read in 14 ms (19.5 KiB/s)
## Executing script at 41900000
reading zImage
4741544 bytes read in 311 ms (14.5 MiB/s)
reading sun8i-v3s-licheepi-zero-dock.dtb
13448 bytes read in 27 ms (486.3 KiB/s)
## Flattened Device Tree blob at 41800000
   Booting using the fdt blob at 0x41800000
   Loading Device Tree to 42df9000, end 42dff487 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.10.1 (forever@forever) (arm-linux-gnueabihf-gcc (Linaro GCC 7.5-2019.12) 7.5.0, GNU ld (Linaro_Binutils-2019.12) 2.28.2.20170706) #15 SMP Sun May 29 13:12:59 CST 2022
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Lichee Pi Zero with Dock
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000040000000-0x0000000043ffffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x0000000043ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x0000000043ffffff]
[    0.000000] percpu: Embedded 15 pages/cpu s30924 r8192 d22324 u61440
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS0,115200 panic=5 console=tty0 rootwait root=/dev/mmcblk0p2 earlyprintk rw
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 52352K/65536K available (7168K kernel code, 926K rwdata, 1884K rodata, 1024K init, 273K bss, 13184K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] random: get_random_bytes called from start_kernel+0x328/0x4c0 with crng_init=0
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000011] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000032] Switching to timer-based delay loop, resolution 41ns
[    0.000416] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000866] Console: colour dummy device 80x30
[    0.001495] printk: console [tty0] enabled
[    0.001577] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.001636] pid_max: default: 32768 minimum: 301
[    0.001895] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001949] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.003126] CPU: Testing write buffer coherency: ok
[    0.003678] /cpus/cpu@0 missing clock-frequency property
[    0.003741] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.004799] Setting up static identity map for 0x40100000 - 0x40100060
[    0.005131] rcu: Hierarchical SRCU implementation.
[    0.005879] smp: Bringing up secondary CPUs ...
[    0.005941] smp: Brought up 1 node, 1 CPU
[    0.005970] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[    0.005997] CPU: All CPU(s) started in SVC mode.
[    0.006789] devtmpfs: initialized
[    0.012478] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.012988] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.013073] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[    0.013406] pinctrl core: initialized pinctrl subsystem
[    0.015223] NET: Registered protocol family 16
[    0.015930] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.017728] thermal_sys: Registered thermal governor 'step_wise'
[    0.018226] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.018312] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.050817] SCSI subsystem initialized
[    0.051935] usbcore: registered new interface driver usbfs
[    0.052071] usbcore: registered new interface driver hub
[    0.052217] usbcore: registered new device driver usb
[    0.052741] pps_core: LinuxPPS API ver. 1 registered
[    0.052789] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.052857] PTP clock support registered
[    0.053225] Advanced Linux Sound Architecture Driver Initialized.
[    0.054969] clocksource: Switched to clocksource arch_sys_counter
[    0.070453] NET: Registered protocol family 2
[    0.071417] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.071524] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.071594] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.071651] TCP: Hash tables configured (established 1024 bind 1024)
[    0.071860] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.071952] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.072283] NET: Registered protocol family 1
[    0.073428] RPC: Registered named UNIX socket transport module.
[    0.073500] RPC: Registered udp transport module.
[    0.073526] RPC: Registered tcp transport module.
[    0.073550] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.076429] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.086850] NFS: Registering the id_resolver key type
[    0.086977] Key type id_resolver registered
[    0.087007] Key type id_legacy registered
[    0.087194] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[    0.087245] io scheduler mq-deadline registered
[    0.087273] io scheduler kyber registered
[    0.088509] sun4i-usb-phy 1c19400.phy: Couldn't request ID GPIO
[    0.095616] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.189110] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.192587] sun8i-v3s-pinctrl 1c20800.pinctrl: supply vcc-pb not found, using dummy regulator
[    0.194218] printk: console [ttyS0] disabled
[    0.214720] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 44, base_baud = 1500000) is a U6_16550A
[    0.794452] printk: console [ttyS0] enabled
[    0.821585] 1c28800.serial: ttyS1 at MMIO 0x1c28800 (irq = 45, base_baud = 1500000) is a U6_16550A
[    0.836892] sun8i-v3s-pinctrl 1c20800.pinctrl: supply vcc-pc not found, using dummy regulator
[    0.848622] libphy: Fixed MDIO Bus: probed
[    0.853054] CAN device driver interface
[    0.857806] dwmac-sun8i 1c30000.ethernet: IRQ eth_wake_irq not found
[    0.864215] dwmac-sun8i 1c30000.ethernet: IRQ eth_lpi not found
[    0.870477] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[    0.876416] dwmac-sun8i 1c30000.ethernet: No regulator found
[    0.882719] dwmac-sun8i 1c30000.ethernet: Current syscon value is not the default 148000 (expect 38000)
[    0.892281] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[    0.899599] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[    0.906873] dwmac-sun8i 1c30000.ethernet: COE Type 2
[    0.911855] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[    0.918682] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[    0.924357] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[    0.930071] dwmac-sun8i 1c30000.ethernet: device MAC address 7e:06:b0:71:3f:47
[    0.938220] libphy: stmmac: probed
[    0.943316] dwmac-sun8i 1c30000.ethernet: Found internal PHY node
[    0.950371] libphy: mdio_mux: probed
[    0.954038] dwmac-sun8i 1c30000.ethernet: Switch mux to internal PHY
[    0.960500] dwmac-sun8i 1c30000.ethernet: Powering internal PHY
[    0.968410] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.975139] ehci-platform: EHCI generic platform driver
[    0.980852] ehci-platform 1c1a000.usb: EHCI Host Controller
[    0.986643] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[    0.994668] ehci-platform 1c1a000.usb: irq 34, io mem 0x01c1a000
[    1.024955] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[    1.032593] hub 1-0:1.0: USB hub found
[    1.036640] hub 1-0:1.0: 1 port detected
[    1.041573] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.047971] ohci-platform: OHCI generic platform driver
[    1.053683] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[    1.060493] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[    1.068620] ohci-platform 1c1a400.usb: irq 35, io mem 0x01c1a400
[    1.140523] hub 2-0:1.0: USB hub found
[    1.144439] hub 2-0:1.0: 1 port detected
[    1.152385] usbcore: registered new interface driver usb-storage
[    1.159398] udc-core: couldn't find an available UDC - added [g_ether] to list of pending drivers
[    1.168926] mousedev: PS/2 mouse device common for all mice
[    1.175853] input: 1c22800.lradc as /devices/platform/soc/1c22800.lradc/input/input0
[    1.187033] sun6i-rtc 1c20400.rtc: registered as rtc0
[    1.192212] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01T00:00:28 UTC (28)
[    1.200370] sun6i-rtc 1c20400.rtc: RTC enabled
[    1.205444] i2c /dev entries driver
[    1.210976] sun8i-v3s-pinctrl 1c20800.pinctrl: supply vcc-pe not found, using dummy regulator
[    1.221826] IR NEC protocol handler initialized
[    1.226574] IR RC5(x/sz) protocol handler initialized
[    1.231649] IR RC6 protocol handler initialized
[    1.236229] IR JVC protocol handler initialized
[    1.240772] IR Sony protocol handler initialized
[    1.245424] IR SANYO protocol handler initialized
[    1.250142] IR Sharp protocol handler initialized
[    1.254856] IR MCE Keyboard/mouse protocol handler initialized
[    1.260728] IR XMP protocol handler initialized
[    1.267745] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    1.277882] sun4i-ss 1c15000.crypto: Die ID 7
[    1.282733] sun8i-v3s-pinctrl 1c20800.pinctrl: supply vcc-pf not found, using dummy regulator
[    1.293303] sun8i-v3s-pinctrl 1c20800.pinctrl: supply vcc-pg not found, using dummy regulator
[    1.307317] hid: raw HID events driver (C) Jiri Kosina
[    1.313444] usbcore: registered new interface driver usbhid
[    1.319228] usbhid: USB HID core driver
[    1.323260] fb_st7789v spi0.0: fbtft_property_value: buswidth = 8
[    1.329467] fb_st7789v spi0.0: fbtft_property_value: debug = 0
[    1.335363] fb_st7789v spi0.0: fbtft_property_value: rotate = 270
[    1.341479] fb_st7789v spi0.0: fbtft_property_value: fps = 60
[    1.469842] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    1.477451] sunxi-mmc 1c10000.mmc: initialized, max. request size: 16384 KB
[    1.490900] random: fast init done
[    1.526189] Console: switching to colour frame buffer device 40x30
[    1.535335] graphics fb0: fb_st7789v frame buffer, 320x240, 150 KiB video memory, 4 KiB buffer memory, fps=100, spi0.0 at 64 MHz
[    1.558911] sun4i-codec 1c22c00.codec: Failed to register our card
[    1.569079] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.590865] NET: Registered protocol family 17
[    1.597409] can: controller area network core
[    1.603836] NET: Registered protocol family 29
[    1.610301] can: raw protocol
[    1.614259] can: broadcast manager protocol
[    1.620405] can: netlink gateway - max_hops=1
[    1.627200] Key type dns_resolver registered
[    1.633657] Registering SWP/SWPB emulation handler
[    1.650861] mmc0: new high speed SDHC card at address 0001
[    1.665384] usb_phy_generic usb_phy_generic.1.auto: supply vcc not found, using dummy regulator
[    1.679478] musb-hdrc musb-hdrc.2.auto: MUSB HDRC host driver
[    1.687653] musb-hdrc musb-hdrc.2.auto: new USB bus registered, assigned bus number 3
[    1.706372] mmcblk0: mmc0:0001 00000 29.8 GiB
[    1.727603]  mmcblk0: p1 p2
[    1.757342] hub 3-0:1.0: USB hub found
[    1.769943] hub 3-0:1.0: 1 port detected
[    1.787799] using random self ethernet address
[    1.794428] using random host ethernet address
[    1.802157] usb0: HOST MAC c6:27:79:de:e6:e2
[    1.808921] usb0: MAC be:7c:a2:ed:3e:0e
[    1.815137] using random self ethernet address
[    1.821765] using random host ethernet address
[    1.828633] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
[    1.837595] g_ether gadget: g_ether ready
[    1.846259] debugfs: Directory '1c22c00.codec' with parent 'V3s Audio Codec' already present!
[    1.911055] ALSA device list:
[    1.915375]   #0: V3s Audio Codec
[    1.938992] random: crng init done
[    1.959393] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.970959] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    2.011289] devtmpfs: mounted
[    2.019250] Freeing unused kernel memory: 1024K
[    2.035307] Run /sbin/init as init process
[    2.211192] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    2.285173] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[    4.405045] dwmac-sun8i 1c30000.ethernet eth0: PHY [0.1:01] driver [Generic PHY] (irq=POLL)
[    4.418319] dwmac-sun8i 1c30000.ethernet eth0: No Safety Features support found
[    4.428850] dwmac-sun8i 1c30000.ethernet eth0: No MAC Management Counters available
[    4.439702] dwmac-sun8i 1c30000.ethernet eth0: PTP not supported by HW
[    4.449299] dwmac-sun8i 1c30000.ethernet eth0: configuring for phy/mii link mode
[    4.714508] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx

forever login:

通过笔记本网口中转,还能直接ping通外网,一开始傻乎乎的连接到路由器上联网。。。

root@forever:~$ping www.baidu.com
PING www.baidu.com (103.235.46.40): 56 data bytes
64 bytes from 103.235.46.40: seq=0 ttl=42 time=68.462 ms
64 bytes from 103.235.46.40: seq=1 ttl=42 time=80.468 ms
64 bytes from 103.235.46.40: seq=2 ttl=42 time=68.157 ms
64 bytes from 103.235.46.40: seq=3 ttl=42 time=68.132 ms
64 bytes from 103.235.46.40: seq=4 ttl=42 time=69.143 ms

我感觉v3s跑Linux性能不太行(感觉是不是错乱了),在想是不是rtthread这种嵌入式操作系统更合适,再配合lvgl做gui,岂不是完美,就是驱动这些应该都要自己扣(咱这能力真是堪忧啊),但是现在连裸机启动都没有去学习

最近编辑记录 forever_rainy (2022-06-06 22:46:22)

离线

#13 2022-06-07 15:51:33

Expelliarmus
会员
注册时间: 2022-02-24
已发帖子: 9
积分: 4

Re: 荔枝派zero v3s 菜鸟新手uboot+linux+rootfs首次跑通

@forever_rainy
我的完整启动信息是这样的

U-Boot SPL 2017.01-rc2-00057-g32ab1804cd (Jun 06 2022 - 17:08:12)
DRAM: 64 MiB
Trying to boot from MMC1

U-Boot 2017.01-rc2-00057-g32ab1804cd (Jun 06 2022 - 17:08:12 +0800) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

Setting up a 800x480 lcd console (overscan 0x0)
dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6
In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000


U-Boot 2017.01-rc2-00057-g32ab1804cd (Jun 06 2022 - 17:08:12 +0800) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

Setting up a 800x480 lcd console (overscan 0x0)
dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6
In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
reading /boot.scr
275 bytes read in 14 ms (18.6 KiB/s)
## Executing script at 41900000
reading zImage
4213792 bytes read in 215 ms (18.7 MiB/s)
reading sun8i-v3s-licheepi-zero.dtb
11135 bytes read in 25 ms (434.6 KiB/s)
## Flattened Device Tree blob at 41800000
   Booting using the fdt blob at 0x41800000
   Loading Device Tree to 42dfa000, end 42dffb7e ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.2.0-licheepi-zero (xuby@xuby-virtual-machine) (gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)) #1 SMP Mon Jun 6 20:10:28 CST 2022
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Lichee Pi Zero
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] percpu: Embedded 16 pages/cpu s34508 r8192 d22836 u65536
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 15883
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait panic=10 earlyprintk rw
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 53552K/64036K available (6144K kernel code, 304K rwdata, 1724K rodata, 1024K init, 251K bss, 10484K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: 	RCU event tracing is enabled.
[    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] random: get_random_bytes called from start_kernel+0x2f8/0x498 with crng_init=0
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000008] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000020] Switching to timer-based delay loop, resolution 41ns
[    0.000202] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000432] Console: colour dummy device 80x30
[    0.000490] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.000505] pid_max: default: 32768 minimum: 301
[    0.000674] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.000690] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001510] CPU: Testing write buffer coherency: ok
[    0.002053] /cpus/cpu@0 missing clock-frequency property
[    0.002082] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.002875] Setting up static identity map for 0x40100000 - 0x40100060
[    0.003095] rcu: Hierarchical SRCU implementation.
[    0.003629] smp: Bringing up secondary CPUs ...
[    0.003650] smp: Brought up 1 node, 1 CPU
[    0.003660] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[    0.003668] CPU: All CPU(s) started in SVC mode.
[    0.004770] devtmpfs: initialized
[    0.008056] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.008389] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.008422] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[    0.008672] pinctrl core: initialized pinctrl subsystem
[    0.009763] NET: Registered protocol family 16
[    0.010438] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.011716] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.011734] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.035741] SCSI subsystem initialized
[    0.035933] usbcore: registered new interface driver usbfs
[    0.035993] usbcore: registered new interface driver hub
[    0.036106] usbcore: registered new device driver usb
[    0.036332] mc: Linux media interface: v0.10
[    0.036374] videodev: Linux video capture interface: v2.00
[    0.036601] Advanced Linux Sound Architecture Driver Initialized.
[    0.037949] clocksource: Switched to clocksource arch_sys_counter
[    0.051151] NET: Registered protocol family 2
[    0.051993] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.052038] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.052064] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.052088] TCP: Hash tables configured (established 1024 bind 1024)
[    0.052247] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.052303] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.052607] NET: Registered protocol family 1
[    0.054527] Initialise system trusted keyrings
[    0.054905] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.098019] Key type asymmetric registered
[    0.098045] Asymmetric key parser 'x509' registered
[    0.098150] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
[    0.098162] io scheduler mq-deadline registered
[    0.098169] io scheduler kyber registered
[    0.099248] sun4i-usb-phy 1c19400.phy: Couldn't request ID GPIO
[    0.103139] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.175904] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.178511] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pb not found, using dummy regulator
[    0.179639] printk: console [ttyS0] disabled
[    0.199965] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 33, base_baud = 1500000) is a U6_16550A
[    0.707316] printk: console [ttyS0] enabled
[    0.737770] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.744399] ehci-platform: EHCI generic platform driver
[    0.749937] ehci-platform 1c1a000.usb: EHCI Host Controller
[    0.755570] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[    0.763576] ehci-platform 1c1a000.usb: irq 25, io mem 0x01c1a000
[    0.797960] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[    0.805190] hub 1-0:1.0: USB hub found
[    0.809178] hub 1-0:1.0: 1 port detected
[    0.813775] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.820103] ohci-platform: OHCI generic platform driver
[    0.825655] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[    0.832385] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[    0.840351] ohci-platform 1c1a400.usb: irq 26, io mem 0x01c1a400
[    0.913053] hub 2-0:1.0: USB hub found
[    0.916895] hub 2-0:1.0: 1 port detected
[    0.924206] usbcore: registered new interface driver usb-storage
[    0.930942] udc-core: couldn't find an available UDC - added [g_ether] to list of pending drivers
[    0.941079] sun6i-rtc 1c20400.rtc: registered as rtc0
[    0.946141] sun6i-rtc 1c20400.rtc: RTC enabled
[    0.950860] i2c /dev entries driver
[    0.955786] input: ns2009_ts as /devices/platform/soc/1c2ac00.i2c/i2c-0/0-0048/input/input0
[    0.965721] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    0.974399] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator
[    1.010610] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    1.018199] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pg not found, using dummy regulator
[    1.029624] usbcore: registered new interface driver usbhid
[    1.035202] usbhid: USB HID core driver
[    1.041790] Initializing XFRM netlink socket
[    1.046105] NET: Registered protocol family 17
[    1.051272] Registering SWP/SWPB emulation handler
[    1.057214] Loading compiled-in X.509 certificates
[    1.067392] simple-framebuffer 43e89000.framebuffer: framebuffer at 0x43e89000, 0x177000 bytes, mapped to 0x(ptrval)
[    1.078067] simple-framebuffer 43e89000.framebuffer: format=x8r8g8b8, mode=800x480x32, linelength=3200
[    1.093945] Console: switching to colour frame buffer device 100x30
[    1.106070] simple-framebuffer 43e89000.framebuffer: fb0: simplefb registered!
[    1.114938] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    1.126403] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.132257] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 3
[    1.141831] hub 3-0:1.0: USB hub found
[    1.145747] hub 3-0:1.0: 1 port detected
[    1.150740] using random self ethernet address
[    1.155195] using random host ethernet address
[    1.160380] usb0: HOST MAC 4e:68:ee:fc:9a:db
[    1.164705] usb0: MAC 36:9f:50:0a:12:6f
[    1.168690] using random self ethernet address
[    1.173140] using random host ethernet address
[    1.177674] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
[    1.184329] g_ether gadget: g_ether ready
[    1.188865] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-02T00:31:22 UTC (88282)
[    1.197425] vcc3v0: disabling
[    1.200517] vcc5v0: disabling
[    1.203488] ALSA device list:
[    1.206452]   No soundcards found.
[    1.211152] Waiting for root device /dev/mmcblk0p2...
[    1.241131] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.252714] mmc0: new high speed SDXC card at address aaaa
[    1.260297] mmcblk0: mmc0:aaaa SD64G 59.5 GiB 
[    1.266973]  mmcblk0: p1 p2
[    1.341103] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.349390] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    1.357233] devtmpfs: mounted
[    1.361756] Freeing unused kernel memory: 1024K
[    1.366444] Run /sbin/init as init process
[    1.481427] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
Starting logging: OK
Starting mdev...
/etc/init.d/S10mdev: line 21: can't create /proc/sys/kernel/hotplug: nonexistent directory
modprobe: can't change directory to '/lib/modules': No such file or directory
Initializing random number generator... [    2.775064] random: dd: uninitialized urandom read (512 bytes read)
done.
Starting network: OK

Welcome to LicheePi
licheepi login: [    3.605288] g_ether gadget: high-speed config #1: CDC Ethernet (ECM)
[    6.488185] mmc0: card aaaa removed
[    6.492451] EXT4-fs error (device mmcblk0p2): ext4_wait_block_bitmap:509: comm kworker/u2:0: Cannot read block bitmap - block_group = 449, block_bitmap = 14680065
[    6.508317] JBD2: Error -5 detected when updating journal superblock for mmcblk0p2-8.
[    6.516160] Aborting journal on device mmcblk0p2-8.
[    6.521726] EXT4-fs (mmcblk0p2): I/O error while writing superblock
[    6.528395] EXT4-fs (mmcblk0p2): Delayed block allocation failed for inode 3670053 at logical offset 0 with max blocks 1 with error 30
[    6.540575] EXT4-fs (mmcblk0p2): This should not happen!! Data will be lost
[    6.540575] 
[    6.549055] EXT4-fs error (device mmcblk0p2) in ext4_writepages:2920: Journal has aborted
[    6.558189] JBD2: Error -5 detected when updating journal superblock for mmcblk0p2-8.
[    6.566138] EXT4-fs (mmcblk0p2): I/O error while writing superblock
[    6.573614] EXT4-fs (mmcblk0p2): I/O error while writing superblock
[    6.579982] EXT4-fs error (device mmcblk0p2): ext4_journal_check_start:61: Detected aborted journal
[    6.589067] EXT4-fs (mmcblk0p2): Remounting filesystem read-only
[    6.595836] EXT4-fs (mmcblk0p2): I/O error while writing superblock
[    6.602197] EXT4-fs (mmcblk0p2): ext4_writepages: jbd2_start: 2147483647 pages, ino 3670053; err -30
[    6.726036] mmc0: host does not support reading read-only switch, assuming write-enable
[    6.734257] mmc0: new SD card at address d555
[    6.739697] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0
[    6.752132] mmcblk0: mmc0:d555 SD032 30.6 MiB 
Jan  2 00:31:28 licheepi user.warn kernel: [    6.726036] mmc0: [    6.758895] debugfs: Directory 'mmcblk0' with parent 'block' already present!
host does not support reading read-only switch, assuming write-e[    6.771181] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0
nable
Jan  2 00:31:28 licheepi user.info kernel: [    6.734257] mmc0: [    6.787791] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0
new SD card at address d555
[    6.804537] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0
Jan  2 00:31:28 licheepi user.crit kernel: [    6.739697] EXT4-f[    6.818242] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0
s error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: co[    6.834477] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0
mm syslogd: reading directory lblock 0
Jan  2 00:31:28 licheepi[    6.851158] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0
 user.info kernel: [    6.752132] mmcblk0: mmc0:d555 SD032 30.6 [    6.867354] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0
MiB 
Jan  2 00:31:28 licheepi user.err kernel: [    6.758895] debugfs: Directory 'mmcblk0' with parent 'block' already present!
Jan  2 00:31:28 licheepi user.crit kernel: [    6.771181] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0
Jan  2 00:31:28 licheepi user.crit kernel: [    6.787791] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0
Jan  2 00:31:28 licheepi user.crit kernel: [    6.804537] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0
Jan  2 00:31:28 licheepi user.crit kernel: [    6.818242] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0
Jan  2 00:31:28 licheepi user.crit kernel: [    6.834477] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0
Jan  2 00:31:28 licheepi user.crit kernel: [    6.851158] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0
Jan  2 00:31:28 licheepi user.crit kernel: [    6.867354] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0
[   48.407978] random: fast init done
[   48.418274] EXT4-fs error: 4 callbacks suppressed
[   48.418292] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0
Jan  2 00:32:09 licheepi user.notice kernel: [   48.407978] rand[   48.434459] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0
om: fast init done
[   48.451126] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0
Jan  2 00:32:09 licheepi user.warn kernel: [   48.418274] EXT4-f[   48.463935] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0
s error: 4 callbacks suppressed
Jan  2 00:32:09 licheepi user.c[   48.480302] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0
rit kernel: [   48.418292] EXT4-fs error (device mmcblk0p2): __e[   48.496923] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0
xt4_find_entry:1530: inode #2: comm syslogd: reading directory l[   48.513156] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0
block 0
Jan  2 00:32:09 licheepi user.crit kernel: [   48.43445[   48.529797] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0
9] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: ino[   48.546143] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0
de #2: comm syslogd: reading directory lblock 0
Jan  2 00:32:09[   48.562760] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0
 licheepi user.crit kernel: [   48.451126] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0
Jan  2 00:32:09 licheepi user.crit kernel: [   48.463935] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0
Jan  2 00:32:09 licheepi user.crit kernel: [   48.480302] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0
Jan  2 00:32:09 licheepi user.crit kernel: [   48.496923] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0
Jan  2 00:32:09 licheepi user.crit kernel: [   48.513156] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0
Jan  2 00:32:09 licheepi user.crit kernel: [   48.529797] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0
Jan  2 00:32:09 licheepi user.crit kernel: [   48.546143] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0
Jan  2 00:32:09 licheepi user.crit kernel: [   48.562760] EXT4-fs error (device mmcblk0p2): __ext4_find_entry:1530: inode #2: comm syslogd: reading directory lblock 0

一开始能进到buildroot文件系统里,但是马上就会报一个[    6.488185] mmc0: card aaaa removed然后就崩溃了
在网上搜了好久,也换了张存储卡,但是一直找不到问题出在哪里

离线

#14 2022-06-09 16:48:26

树莓学LINUX
会员
注册时间: 2021-10-28
已发帖子: 94
积分: 104
个人网站

Re: 荔枝派zero v3s 菜鸟新手uboot+linux+rootfs首次跑通

看到楼主的帖子我不禁想到了我第一次点亮v3s的心情,双端显示(串口和屏幕同时显示信息)需要在内核中开启一行代码,具体的在家里电脑,需要的话回去发给你方法,现在在摸鱼:p

在线

#15 2022-06-09 20:06:51

forever_rainy
会员
注册时间: 2022-04-09
已发帖子: 21
积分: 40

Re: 荔枝派zero v3s 菜鸟新手uboot+linux+rootfs首次跑通

@Expelliarmus
你目前除了换内存卡,还采用过什么手段来尝试解决这个问题?
我技术不太行,但是已知你内核加载了,同时文件系统也能够正确的启动一部分,否则系统的的服务那些是不可能正常加载,那些服务都是需要在文件系统中读取的。而你的错误是启动后出现的内存卡的什么地址问题,这个我也不懂,目前都是站在巨人的肩膀上跑起来的。
我说说我能想到的几个暂时的启动方法,来排除是哪里的问题。
1.题主描述换了sd卡,不知到换取的sd的牌子(目前我使用的三星,三星可用,还有某宝那些专用的sd卡也肯定可用)是否相同。
2.如果sd无误,是否有尝试更换内核或者其他的文件系统。

这两个控制一下变量尝试一下,是可以得出一个结果,试一下吧。。:D

离线

#16 2022-06-10 11:07:54

Expelliarmus
会员
注册时间: 2022-02-24
已发帖子: 9
积分: 4

Re: 荔枝派zero v3s 菜鸟新手uboot+linux+rootfs首次跑通

@forever_rainy
我现在发现不连屏幕就能正常启动,但是连了屏幕就会报错,不知道问题出在哪里。不过目前也不需要屏幕功能,就先凑合用了

离线

#18 2024-01-29 16:33:28

SUPER_CRJ
会员
注册时间: 2024-01-07
已发帖子: 13
积分: 13

Re: 荔枝派zero v3s 菜鸟新手uboot+linux+rootfs首次跑通

我安装最新的:Ubuntu24版本。这个是不是不行。
出现的配置界面是这个,完全不一样。进行不了下一步了。
ARCH=arm make menuconfig

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn