您尚未登录。

楼主 # 2022-12-31 16:34:44

epoko
会员
注册时间: 2021-04-20
已发帖子: 2
积分: 102

在wsl下开发T113的主线linux(最新gcc+awboot+最新kernel+最新buildroot)

这篇文章记录了在wsl系统下编译调试awboot和linux的全过程

硬件要求:任意T113-S3芯片的板子,SPI0接spinand标准接法。

1、准备wsl开发环境
首先在win10或win11下安装wsl,选择wsl1或者wsl2都可以,wsl2的性能更高一些,wsl1的跨系统文件操作速度更快一些,我这里因为有一些工程在win文件系统下,所以选择了wsl1,发行版使用最新的Ubuntu 22.04.01 LTS。
这里我没有选用vm虚拟机安装ubuntu开发的原因是虚拟机下的文件交互不够方便,特别是git和文件对比,有时在内核源码改了一些文件,使用win下的TortoiseGit工具就可以很方便的查看差异,提交变更。使用beyond compare也可很方便的比较各种文件文件夹的不同版本的差异。
image001.png
在win资源管理器下可以直接查看wsl的linux根目录,右键可以直接执行各种操作,就像操作win文件一样

这里编译开发的核心软件只有一个,就是VS code,安装好后添加所需的插件。
串口调试工具使用MobaXterm

下载交叉编译器,这里使用arm官方最新的GCC 12.2
https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads
arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-linux-gnueabihf.tar.xz
下载后解压在wsl的主目录,在.bashrc中添加编译器路径

PATH="$PATH:/home/wsl/arm-none-linux-gnueabihf/bin"

2、编译awboot
意外发现有awboot能够代替uboot直接引导内核,体验了一下果断选择awboot,因为足够简洁,编译大小只有32k,和uboot接近1M的体量相比,简直是小而美,启动速度也比uboot快上不少,也能同时支持sd卡,spinand,spinorflash启动。
https://github.com/szemzoa/awboot

说起uboot不禁想起几年前路由器第三方固件盛行的时期,那时的路由器还没有很复杂的方案,第三方固件往往比官方固件更易用功能更丰富,买个普通路由器换颗flash,内存芯片刷个系统就能获得更丰富的功能体验,各种固件openwrt,Padavan,高格百花齐放,为了刷机方便,系统的uboot都要支持tftp,串口甚至web的文件传输接口,由此孕育而出了大名鼎鼎的Breed,仅仅为了更新固件更方便,不用spi flash编程器那么麻烦的烧写。而到了全志嵌入式这边,由于自带usb接口的BROM,使用sunxi-fel或者xfel烧写flash已足够方便,所以使用uboot更新固件的需求就不是那么大,况且全志的方案比路由器的方案定制性更高一些,没有通用的第三方固件可以刷,所以uboot的功能就完全成了摆设,让用户使用sunxi-fel更新固件都要比uboot更新固件更稳定更实用,消费者用户用不到,开发人员也不会去用,那uboot的1m大小,集成的各种usb,网络,屏幕驱动,环境变量,文件系统,设备树编辑等功能就显得格外多余。

2.png
awboot相比spl+uboot的区别就是少了一次跳转的过程,由BROM拉起的boot0拥有足足160kb的sram,足够编写执行引导kernel的代码,所以这何尝不是一种恰到好处。

下面是awboot的编译过程:
修改makefile中的CROSS_COMPILE编译器定义为arm-none-linux-gnueabihf,或者使用

make CROSS_COMPILE=arm-none-linux-gnueabihf

命令编译
如果不是git拉取的而是手动下载解压的源码,需要去除git编译目标,位于makefile line:49
出现DWORD重复定义的错误,删除lib\fatfs\integer.h中的DWORD定义
链接出现未定义函数__aeabi_unwind_cpp_pr0,makefile中添加编译选项CFLAGS += -lgcc_eh
链接出现未定义函数raise,在main.c中添加函数

int raise(void)
{
	return 0;
}

编译成功,出现awboot.bin等文件

3、写入spinand测试
接下来是烧写入硬件验证,我的板子焊接的是W25N01GV,这里使用xfel,因为支持写入spi-nand。
https://github.com/xboot/xfel

为什么不使用sd卡验证,因为烧写sd卡需要:
  拔卡->插到电脑->dd命令写入->拔卡->插到板子上。
而写入spi-nand只需要:
  按着boot键同时按复位键->xfel命令写入(可以飞线两个按键,复位键接到reset脚到地,boot键接到spi-cs脚到地)。
步骤大幅减少,同时没有拔插sd卡造成的触点磨损。同时因为使用的wsl系统,并不能很方便的使用dd命令写入sd卡。虽然wsl下也不能直接访问全志的usb设备,但是xfel有win的版本,wsl下可直接执行exe文件,所以只需要下载xfel-windows解压到wsl中,在.bashrc中添加命令别名

alias xfel='/home/wsl/xfel-windows-v1.2.9/xfel.exe'

即可在wsl中使用win版的xfel,就像linux中的xfel一模一样。

make spi-boot.img
xfel version
xfel spinand
xfel spinand erase 0 0x8000000
xfel spinand write 0 spi-boot.img

复位重启,可以在串口看到awboot打印的信息
awboot默认使用uart5打印,其他串口可以修改board.c中的配置,非常通俗易懂
内核加载地址如下表,可在board.h中修改

  • spi-nand内存划分    起始地址    空间容量

  • awboot    0    0x40000(256k)

  • dtb    0x40000    0x40000(256k)

  • kernel    0x80000    任意

[I] AWBoot r6143 starting...
[I] SPI-NAND: W25N01GV detected
[E] SPI-NAND: DTB verification failed
[F] SPI-NAND: loading failed
restarting...

4、编译kernel
接下来编译kernel,编译过程可能会出现缺少命令的报错,大概是下面这几个

sudo apt update
sudo apt install flex bison bc libncurses-dev

目前linux主线的最新版本并没有适配t113的相关外设驱动,虽然能启动并串口打印,但其他的一些外设并没有驱动,还不是可用的状态,所以这里选择全志D1的kernel进行修改。
https://github.com/smaeul/linux/tree/d1/all

unzip linux-d1-all.zip
cd linux-d1-all

应用awboot提供的linux补丁
linux/allow_select_d1_ccu_on_t113.patch
linux/ccu-sun20i-make_cpux_clk_critical_for_t113.patch
linux/second_core_support_in_platsmp.patch
linux/d1s_t113_can_bus.patch

在arch\arm\configs\sunxi_defconfig中添加D1时钟

CONFIG_SUN20I_D1_CCU=y
CONFIG_SUN20I_D1_R_CCU=y

添加sun8i-t113.dtsi和sun8i-t113-mangopi-dual.dts设备树配置文件到arch\arm\boot\dts\
在arch\arm\boot\dts\Makefile的line:1389 处,CONFIG_MACH_SUN8I配置中添加sun8i-t113-mangopi-dual.dtb

awboot提供的sun8i-t113-mangopi-dual.dts设备树文件调试终端串口是5,需要改成uart0。

make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- sunxi_defconfig
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- zImage -j4
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- dtbs

xfel spinand write 0x40000 arch/arm/boot/dts/sun8i-t113-mangopi-dual.dtb
xfel spinand write 0x80000 arch/arm/boot/zImage

image007.png
复位,串口成功打印内核信息,目前spinand中还没有文件系统,所以系统无法启动成功。

5、构建ubi文件系统
接下来是构建文件系统,这里使用最新的buildroot
https://buildroot.org/downloads/buildroot-2022.11.tar.gz

tar xf buildroot-2022.11.tar.gz
cd buildroot-2022.11
make menuconfig

配置目标指令集类型
4.png

配置外部自定义编译器
5.png

配置生成文件系统类型为ubifs,最大逻辑擦除块数量决定了spinand的容量,我这里是128M的spinand,所以128M/128k = 1024
6.png

上面的这些配置操作可以用下面的默认配置文件代替,在configs文件夹创建sunxi_t113_spinand_defconfig文件,添加下面内容,使用make sunxi_t113_spinand_defconfig载入配置。

# architecture
BR2_arm=y
BR2_cortex_a7=y
BR2_ARM_FPU_VFPV4=y

# Toolchain
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_PATH="/home/wsl/arm-none-linux-gnueabihf"
BR2_TOOLCHAIN_EXTERNAL_GLIBC=y
BR2_TOOLCHAIN_EXTERNAL_PREFIX="arm-none-linux-gnueabihf"
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="arm-none-linux-gnueabihf"
BR2_TOOLCHAIN_EXTERNAL_GCC_12=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_20=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
# BR2_TOOLCHAIN_EXTERNAL_INET_RPC is not set
BR2_TOOLCHAIN_EXTERNAL_CXX=y

# system

# kernel

# bootloader

# filesystem / image
BR2_TARGET_ROOTFS_UBI=y
BR2_TARGET_ROOTFS_UBI_PEBSIZE=0x20000
BR2_TARGET_ROOTFS_UBI_SUBSIZE=0
BR2_TARGET_ROOTFS_UBIFS=y
BR2_TARGET_ROOTFS_UBIFS_LEBSIZE=0x1f000
BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE=0x800
BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT=1024
BR2_TARGET_ROOTFS_UBIFS_OPTS="-F"

配置完成后make开始编译,接下来就是漫长的下载编译过程,大概需要半小时。
编译成功后会生成output/images/rootfs.ubi,使用xfel命令写入。

xfel spinand erase 0x800000 0x7800000
xfel spinand write 0x800000 output/images/rootfs.ubi

复位发现没有启动成功,原来内核默认没有打开mtd和ubi支持,在内核配置添加下面选项

Device Drivers -> Memory Technology Device (MTD) support -> NAND -> SPI NAND device Support   
Device Drivers -> Memory Technology Device (MTD) support -> Enable UBI - Unsorted block images
File Systems -> Miscellaneous filesystems -> UBIFS file system support

或者在arch\arm\configs\sunxi_defconfig中添加

CONFIG_MTD=y
CONFIG_MTD_SPI_NAND=y
CONFIG_MTD_UBI=y
CONFIG_UBIFS_FS=y

后重新载入配置。

另外设备树中的启动参数和分区也需要修改

bootargs = "mem=128M ubi.mtd=3 rootfstype=ubifs root=ubi0:rootfs rw rootwait console=ttyS0,115200";

&spi0 {
	pinctrl-0 = <&spi0_pins>;
	pinctrl-names = "default";
	status = "okay";

	spi_nand: spi_nand@0 {
        #address-cells = <1>;
        #size-cells = <1>;
		compatible = "spi-nand";
		reg = <0>;

		partition@0 {
				label = "awboot";
				reg = <0x0 0x40000>;	/* 256K */
				read-only;
		};

		partition@40000 {
				label = "dtb";
				reg = <0x40000 0x40000>;  /* 256k */
				read-only;
		};

		partition@80000 {
				label = "kernel";
				reg = <0x80000 0x780000>;  /* 7.5MB */
				read-only;
		};

		partition@800000 {
				label = "rootfs";
				reg = <0x800000 0x7800000>;
		};
	};
};

修改完后重新写入spi-nand,系统顺利启动,一个标准linux 6.1的基础busybox文件系统就做好了,可以根据不同应用可在buildroot添加所需的命令,下面是我常用的一些命令,总之非常方便。

make menuconfig
System configuration  ---> [*] Enable root login with password
Target packages  ---> Networking applications  ---> dropbear
Target packages ---> Libraries ---> Hardware handling ---> tslib
Target packages ---> Text editors and viewers ---> nano
Target packages ---> System tools ---> htop
iperf3
coremark
dhrystone

make busybox-menuconfig
Archival Utilities ---> Make tar xxx, Autodetect compressed tarballs
Linux System Utilities ---> Support mounting CIFS/SMB file systems
Networking Utilities ---> httpd
Networking Utilities ---> ntpd
Networking Utilities ---> udhcpd
Process Utilities ---> Support thread display in ps/pstree/top
Process Utilities ---> pgrep
Process Utilities ---> pmap
Process Utilities ---> Show the number of users

完整启动日志

[I] AWBoot r6143 starting...
[I] SPI-NAND: W25N01GV detected
[I] SPI-NAND: read dt blob of size 22242 at 43.00MB/S
[I] SPI-NAND: read Image of size 5424416 at 49.00MB/S
[I] booting linux...
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 6.1.0-rc3 (wsl@DESKTOP-NQRKTHB) (arm-none-linux-gnueabihf-gcc (Arm GNU Toolchain 12.2.Rel1 (Build arm-12.24)) 12.2.1 20221205, GNU ld (Arm GNU Toolchain 12.2.Rel1 (Build arm-12.1210) #7 SMP Fri Dec 30 18:52:12 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: MangoPi MQ-Dual
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] cma: Reserved 16 MiB at 0x47000000
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000040000000-0x0000000047ffffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x0000000047ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x0000000047ffffff]
[    0.000000] percpu: Embedded 11 pages/cpu s15764 r8192 d21100 u45056
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: mem=128M ubi.mtd=3 rootfstype=ubifs root=ubi0:rootfs rw rootwait console=ttyS0,115200
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off
[    0.000000] Memory: 99804K/131072K available (8192K kernel code, 952K rwdata, 2188K rodata, 1024K init, 270K bss, 14884K reserved, 16384K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=2.
[    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=2
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000001] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000013] Switching to timer-based delay loop, resolution 41ns
[    0.000188] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000681] Console: colour dummy device 80x30
[    0.000724] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.000740] pid_max: default: 32768 minimum: 301
[    0.000901] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.000916] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001461] CPU: Testing write buffer coherency: ok
[    0.001766] /cpus/cpu@0 missing clock-frequency property
[    0.001795] /cpus/cpu@1 missing clock-frequency property
[    0.001805] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.002581] Setting up static identity map for 0x40100000 - 0x40100060
[    0.002720] rcu: Hierarchical SRCU implementation.
[    0.002725] rcu:     Max phase no-delay instances is 1000.
[    0.003261] smp: Bringing up secondary CPUs ...
[    0.003971] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.004097] smp: Brought up 1 node, 2 CPUs
[    0.004107] SMP: Total of 2 processors activated (96.00 BogoMIPS).
[    0.004114] CPU: All CPU(s) started in SVC mode.
[    0.004635] devtmpfs: initialized
[    0.008727] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.008927] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.008951] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.009546] pinctrl core: initialized pinctrl subsystem
[    0.010921] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.011968] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.012787] thermal_sys: Registered thermal governor 'step_wise'
[    0.012969] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.012981] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.020855] platform 5460000.tcon-top: Fixing up cyclic dependency with 5200000.mixer
[    0.020919] platform 5460000.tcon-top: Fixing up cyclic dependency with 5100000.mixer
[    0.021185] platform 5461000.lcd-controller: Fixing up cyclic dependency with 5460000.tcon-top
[    0.021537] platform 5470000.lcd-controller: Fixing up cyclic dependency with 5604000.tv-encoder
[    0.021593] platform 5470000.lcd-controller: Fixing up cyclic dependency with 5460000.tcon-top
[    0.022352] platform 7090000.rtc: Fixing up cyclic dependency with 7010000.clock-controller
[    0.032234] SCSI subsystem initialized
[    0.032716] usbcore: registered new interface driver usbfs
[    0.032754] usbcore: registered new interface driver hub
[    0.032791] usbcore: registered new device driver usb
[    0.032977] mc: Linux media interface: v0.10
[    0.033022] videodev: Linux video capture interface: v2.00
[    0.033106] pps_core: LinuxPPS API ver. 1 registered
[    0.033112] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.033127] PTP clock support registered
[    0.033547] Advanced Linux Sound Architecture Driver Initialized.
[    0.034416] clocksource: Switched to clocksource arch_sys_counter
[    0.041644] NET: Registered PF_INET protocol family
[    0.041849] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.042389] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.042417] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.042428] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.042444] TCP bind hash table entries: 1024 (order: 2, 16384 bytes, linear)
[    0.042479] TCP: Hash tables configured (established 1024 bind 1024)
[    0.042567] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.042599] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.042749] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.043429] RPC: Registered named UNIX socket transport module.
[    0.043443] RPC: Registered udp transport module.
[    0.043447] RPC: Registered tcp transport module.
[    0.043450] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.044815] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    0.049789] NFS: Registering the id_resolver key type
[    0.049854] Key type id_resolver registered
[    0.049858] Key type id_legacy registered
[    0.050022] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    0.050031] io scheduler mq-deadline registered
[    0.050036] io scheduler kyber registered
[    0.108727] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.118865] CAN device driver interface
[    0.122269] sun6i-rtc 7090000.rtc: registered as rtc0
[    0.122395] sun6i-rtc 7090000.rtc: setting system clock to 1970-01-02T00:00:00 UTC (86400)
[    0.122514] sun6i-rtc 7090000.rtc: RTC enabled
[    0.122857] i2c_dev: i2c /dev entries driver
[    0.124723] sunxi-wdt 20500a0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    0.125850] sun8i-ce 3040000.crypto: Set mod clock to 300000000 (300 Mhz) from 400000000 (400 Mhz)
[    0.126215] sun8i-ce 3040000.crypto: will run requests pump with realtime priority
[    0.126553] sun8i-ce 3040000.crypto: will run requests pump with realtime priority
[    0.126774] sun8i-ce 3040000.crypto: will run requests pump with realtime priority
[    0.126977] sun8i-ce 3040000.crypto: will run requests pump with realtime priority
[    0.127118] sun8i-ce 3040000.crypto: Register cbc(aes)
[    0.127146] sun8i-ce 3040000.crypto: Register ecb(aes)
[    0.127157] sun8i-ce 3040000.crypto: Register cbc(des3_ede)
[    0.127166] sun8i-ce 3040000.crypto: Register ecb(des3_ede)
[    0.127195] sun8i-ce 3040000.crypto: CryptoEngine Die ID 0
[    0.128073] usbcore: registered new interface driver usbhid
[    0.128082] usbhid: USB HID core driver
[    0.130773] NET: Registered PF_PACKET protocol family
[    0.130787] can: controller area network core
[    0.130861] NET: Registered PF_CAN protocol family
[    0.130869] can: raw protocol
[    0.130876] can: broadcast manager protocol
[    0.130885] can: netlink gateway - max_hops=1
[    0.130991] Key type dns_resolver registered
[    0.131078] Registering SWP/SWPB emulation handler
[    0.151942] sun20i-d1-pinctrl 2000000.pinctrl: initialized sunXi PIO driver
[    0.153211] printk: console [ttyS0] disabled
[    0.173477] 2500000.serial: ttyS0 at MMIO 0x2500000 (irq = 231, base_baud = 1500000) is a 16550A
[    0.980691] printk: console [ttyS0] enabled
[    0.987508] spi-nand spi0.0: Winbond SPI NAND was found.
[    0.992841] spi-nand spi0.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
[    1.001736] 4 fixed-partitions partitions found on MTD device spi0.0
[    1.008126] Creating 4 MTD partitions on "spi0.0":
[    1.012920] 0x000000000000-0x000000040000 : "awboot"
[    1.018743] 0x000000040000-0x000000080000 : "dtb"
[    1.024176] 0x000000080000-0x000000800000 : "kernel"
[    1.038649] 0x000000800000-0x000008000000 : "rootfs"
[    1.194220] phy phy-4100400.phy.0: Changing dr_mode to 1
[    1.195527] usb_phy_generic usb_phy_generic.1.auto: dummy supplies not allowed for exclusive requests
[    1.199603] ehci-platform 4101000.usb: EHCI Host Controller
[    1.209317] musb-hdrc musb-hdrc.2.auto: MUSB HDRC host driver
[    1.214352] ehci-platform 4101000.usb: new USB bus registered, assigned bus number 1
[    1.220112] musb-hdrc musb-hdrc.2.auto: new USB bus registered, assigned bus number 2
[    1.236616] hub 2-0:1.0: USB hub found
[    1.236719] ehci-platform 4200000.usb: EHCI Host Controller
[    1.240434] hub 2-0:1.0: 1 port detected
[    1.247931] ohci-platform 4200400.usb: Generic Platform OHCI controller
[    1.256590] ohci-platform 4200400.usb: new USB bus registered, assigned bus number 3
[    1.264527] ehci-platform 4101000.usb: irq 233, io mem 0x04101000
[    1.270652] ehci-platform 4200000.usb: new USB bus registered, assigned bus number 4
[    1.270760] ohci-platform 4200400.usb: irq 237, io mem 0x04200400
[    1.286255] ehci-platform 4200000.usb: irq 235, io mem 0x04200000
[    1.292563] sunxi-mmc 4020000.mmc: Got CD GPIO
[    1.294477] ehci-platform 4101000.usb: USB 2.0 started, EHCI 1.00
[    1.303231] ubi0: attaching mtd3
[    1.308189] hub 1-0:1.0: USB hub found
[    1.312277] hub 1-0:1.0: 1 port detected
[    1.322619] sunxi-mmc 4020000.mmc: initialized, max. request size: 2047 KB, uses new timings mode
[    1.334453] ehci-platform 4200000.usb: USB 2.0 started, EHCI 1.00
[    1.341315] hub 4-0:1.0: USB hub found
[    1.345162] hub 4-0:1.0: 1 port detected
[    1.359176] hub 3-0:1.0: USB hub found
[    1.362978] hub 3-0:1.0: 1 port detected
[    1.444542] ohci-platform 4101400.usb: Generic Platform OHCI controller
[    1.451202] ohci-platform 4101400.usb: new USB bus registered, assigned bus number 5
[    1.459287] ohci-platform 4101400.usb: irq 236, io mem 0x04101400
[    1.539278] hub 5-0:1.0: USB hub found
[    1.543116] hub 5-0:1.0: 1 port detected
[    1.574453] random: crng init done
[    2.100239] ubi0: scanning is finished
[    2.114539] ubi0: attached mtd3 (name "rootfs", size 120 MiB)
[    2.120305] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    2.127199] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    2.133981] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    2.140952] ubi0: good PEBs: 960, bad PEBs: 0, corrupted PEBs: 0
[    2.146964] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
[    2.154178] ubi0: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 2041766426
[    2.163310] ubi0: available PEBs: 0, total reserved PEBs: 960, PEBs reserved for bad PEB handling: 20
[    2.172542] ubi0: background thread "ubi_bgt0d" started, PID 85
[    2.172894] ALSA device list:
[    2.181451]   No soundcards found.
[    2.186632] UBIFS (ubi0:0): Mounting in unauthenticated mode
[    2.192477] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 86
[    2.249179] UBIFS (ubi0:0): recovery needed
[    2.379732] UBIFS (ubi0:0): recovery completed
[    2.384300] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[    2.391721] UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    2.401642] UBIFS (ubi0:0): FS size: 117452800 bytes (112 MiB, 925 LEBs), max 1024 LEBs, journal size 9023488 bytes (8 MiB, 72 LEBs)
[    2.413554] UBIFS (ubi0:0): reserved for root: 0 bytes (0 KiB)
[    2.419390] UBIFS (ubi0:0): media format: w4/r0 (latest is w5/r0), UUID 9AE4F0B9-2A05-4C7A-8644-AA2CE4D2FFF0, small LPT model
[    2.432511] VFS: Mounted root (ubifs filesystem) on device 0:13.
[    2.440323] devtmpfs: mounted
[    2.444496] Freeing unused kernel image (initmem) memory: 1024K
[    2.450581] Run /sbin/init as init processSB bus registered, assigned bus number 2
[    1.228343] ehci-platform 4200000.usb: EHCI Host Controller
[    1.235904] hub 2-0:1.0: USB hub found
[    1.242613] ohci-platform 4200400.usb: Generic Platform OHCI controller
[    1.244554] hub 2-0:1.0: 1 port detected
[    1.255208] ehci-platform 4101000.usb: irq 233, io mem 0x04101000
[    1.261339] ehci-platform 4200000.usb: new USB bus registered, assigned bus number 3
[    1.264326] ohci-platform 4200400.usb: new USB bus registered, assigned bus number 4
[    1.278588] ehci-platform 4200000.usb: irq 235, io mem 0x04200000
[    1.284829] ehci-platform 4101000.usb: USB 2.0 started, EHCI 1.00
[    1.284899] sunxi-mmc 4020000.mmc: Got CD GPIO
[    1.296563] ubi0: attaching mtd3
[    1.300503] ohci-platform 4200400.usb: irq 237, io mem 0x04200400
[    1.307274] hub 1-0:1.0: USB hub found
[    1.311088] hub 1-0:1.0: 1 port detected
[    1.315120] ehci-platform 4200000.usb: USB 2.0 started, EHCI 1.00
[    1.320965] sunxi-mmc 4020000.mmc: initialized, max. request size: 2047 KB, uses new timings mode
[    1.322827] hub 3-0:1.0: USB hub found
[    1.333954] hub 3-0:1.0: 1 port detected
[    1.379177] hub 4-0:1.0: USB hub found
[    1.382997] hub 4-0:1.0: 1 port detected
[    1.444407] ohci-platform 4101400.usb: Generic Platform OHCI controller
[    1.451070] ohci-platform 4101400.usb: new USB bus registered, assigned bus number 5
[    1.459134] ohci-platform 4101400.usb: irq 236, io mem 0x04101400
[    1.539152] hub 5-0:1.0: USB hub found
[    1.542954] hub 5-0:1.0: 1 port detected
[    1.614309] random: crng init done
[    2.110704] ubi0: scanning is finished
[    2.124757] ubi0: attached mtd3 (name "rootfs", size 120 MiB)
[    2.130523] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    2.137436] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    2.144219] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    2.151185] ubi0: good PEBs: 960, bad PEBs: 0, corrupted PEBs: 0
[    2.157205] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
[    2.164431] ubi0: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 2041766426
[    2.173555] ubi0: available PEBs: 0, total reserved PEBs: 960, PEBs reserved for bad PEB handling: 20
[    2.183138] ALSA device list:
[    2.186140]   No soundcards found.
[    2.186172] ubi0: background thread "ubi_bgt0d" started, PID 85
[    2.197304] UBIFS (ubi0:0): Mounting in unauthenticated mode
[    2.203409] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 86
[    2.318154] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[    2.325610] UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    2.335531] UBIFS (ubi0:0): FS size: 117452800 bytes (112 MiB, 925 LEBs), max 1024 LEBs, journal size 9023488 bytes (8 MiB, 72 LEBs)
[    2.347444] UBIFS (ubi0:0): reserved for root: 0 bytes (0 KiB)
[    2.353272] UBIFS (ubi0:0): media format: w4/r0 (latest is w5/r0), UUID 9AE4F0B9-2A05-4C7A-8644-AA2CE4D2FFF0, small LPT model
[    2.366769] VFS: Mounted root (ubifs filesystem) on device 0:13.
[    2.374505] devtmpfs: mounted
[    2.378644] Freeing unused kernel image (initmem) memory: 1024K
[    2.384764] Run /sbin/init as init process
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Initializing random number generator: OK
Saving random seed: OK
Starting network: OK

Welcome to Buildroot
buildroot login: root
#
# uname -a
Linux buildroot 6.1.0-rc3 #7 SMP Fri Dec 30 18:52:12 CST 2022 armv7l GNU/Linux
#
# cat /proc/cpuinfo
processor       : 0
model name      : ARMv7 Processor rev 5 (v7l)
BogoMIPS        : 48.00
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xc07
CPU revision    : 5

processor       : 1
model name      : ARMv7 Processor rev 5 (v7l)
BogoMIPS        : 48.00
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xc07
CPU revision    : 5

Hardware        : Generic DT based system
Revision        : 0000
Serial          : 0000000000000000
#
# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00040000 00020000 "awboot"
mtd1: 00040000 00020000 "dtb"
mtd2: 00780000 00020000 "kernel"
mtd3: 07800000 00020000 "rootfs"
#
# mount
ubi0:rootfs on / type ubifs (rw,relatime,assert=read-only,ubi=0,vol=0)
devtmpfs on /dev type devtmpfs (rw,relatime,size=49900k,nr_inodes=12475,mode=755)
proc on /proc type proc (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=666)
tmpfs on /dev/shm type tmpfs (rw,relatime,mode=777)
tmpfs on /tmp type tmpfs (rw,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
sysfs on /sys type sysfs (rw,relatime)
#
# df -h
Filesystem                Size      Used Available Use% Mounted on
ubi0:rootfs             102.9M      3.5M     99.5M   3% /
devtmpfs                 48.7M         0     48.7M   0% /dev
tmpfs                    57.2M         0     57.2M   0% /dev/shm
tmpfs                    57.2M     24.0K     57.2M   0% /tmp
tmpfs                    57.2M     16.0K     57.2M   0% /run
#
# time dd if=/dev/zero of=test.bin bs=1M count=64 conv=fsync
64+0 records in
64+0 records out
real    0m 1.26s
user    0m 0.00s
sys     0m 0.48s
#
#
# reboot
# Stopping network: OK
Saving random seed: OK
Stopping klogd: OK
Stopping syslogd: OK
umount: devtmpfs busy - remounted read-only
[  123.118531] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" stops
The system is going down NOW!
Sent SIGTERM to all processes
Sent SIGKILL to[  125.165719] reboot: Restarting system

编译启动能够如此顺利必定少不了各位大佬的付出,特此感谢 big_smile

离线

#2 2023-01-03 09:52:38

astankvai
会员
注册时间: 2021-02-23
已发帖子: 36
积分: 36

Re: 在wsl下开发T113的主线linux(最新gcc+awboot+最新kernel+最新buildroot)

顶起来, 手上刚好有块113的板子。

离线

#3 2023-01-08 16:49:48

vigour1000
会员
注册时间: 2018-11-19
已发帖子: 99
积分: 5

Re: 在wsl下开发T113的主线linux(最新gcc+awboot+最新kernel+最新buildroot)

awboot提供的linux补丁 在哪呀

离线

#4 2023-01-08 16:52:17

vigour1000
会员
注册时间: 2018-11-19
已发帖子: 99
积分: 5

Re: 在wsl下开发T113的主线linux(最新gcc+awboot+最新kernel+最新buildroot)

awboot 目录下找到了

离线

#5 2023-01-09 01:30:50

吴助建
会员
注册时间: 2021-12-08
已发帖子: 101
积分: 14

Re: 在wsl下开发T113的主线linux(最新gcc+awboot+最新kernel+最新buildroot)

楼主,你好!
补丁如何应用如何操作?
不会啊,请指教!

离线

#6 2023-01-09 02:52:39

吴助建
会员
注册时间: 2021-12-08
已发帖子: 101
积分: 14

Re: 在wsl下开发T113的主线linux(最新gcc+awboot+最新kernel+最新buildroot)

楼主,你好!
我手动一个补丁一个补丁的打过去,然后编译,出现如下错:
drivers/clk/sunxi-ng/ccu-sun20i-d1.c:1303:10: 错误: ‘RST_BUS_CAN0’ undeclared here (not in a function);
drivers/clk/sunxi-ng/ccu-sun20i-d1.c:1304:10: 错误: ‘RST_BUS_CAN1’ undeclared here (not in a function);

应该是宏 RST_BUS_CAN0 和 RST_BUS_CAN1 没有定义。
我不知道这2个宏的值是多少,请告诉我一下,谢谢!

离线

楼主 #7 2023-01-11 12:20:20

epoko
会员
注册时间: 2021-04-20
已发帖子: 2
积分: 102

Re: 在wsl下开发T113的主线linux(最新gcc+awboot+最新kernel+最新buildroot)

@吴助建

RST_BUS_CAN0 和 RST_BUS_CAN1只是数组的索引值,在include\dt-bindings\reset\sun20i-d1-ccu.h最后按顺序添加即可。
can相关的代码还没有添加到d1的kernel中,用不到can接口的话,补丁d1s_t113_can_bus.patch可以先不用添加,然后在设备树中去除相关can的定义

离线

#8 2023-01-18 14:04:59

vigour1000
会员
注册时间: 2018-11-19
已发帖子: 99
积分: 5

Re: 在wsl下开发T113的主线linux(最新gcc+awboot+最新kernel+最新buildroot)

uboot越搞越复杂

离线

#9 2023-04-25 20:23:32

cybertale
会员
注册时间: 2023-04-25
已发帖子: 1
积分: 1

Re: 在wsl下开发T113的主线linux(最新gcc+awboot+最新kernel+最新buildroot)

前辈,我用的韦东山的板子,唯一不同的是debug串口用的3,awboot都有正常输出,但是Linux始终没有正常输出,请问kernel有指定的commit吗?

离线

#10 2023-05-29 10:08:11

云槎外史
会员
注册时间: 2022-10-11
已发帖子: 10
积分: 5

Re: 在wsl下开发T113的主线linux(最新gcc+awboot+最新kernel+最新buildroot)

大佬,芒果派麻雀板子可以么?

离线

#11 2023-06-11 18:53:16

vigour1000
会员
注册时间: 2018-11-19
已发帖子: 99
积分: 5

Re: 在wsl下开发T113的主线linux(最新gcc+awboot+最新kernel+最新buildroot)

cybertale 说:

前辈,我用的韦东山的板子,唯一不同的是debug串口用的3,awboot都有正常输出,但是Linux始终没有正常输出,请问kernel有指定的commit吗?

我也是用linux5.4没有输出,也不知道内核有没有工作

离线

#12 2023-06-21 11:27:56

wj8331585
会员
注册时间: 2023-02-07
已发帖子: 44
积分: 19

Re: 在wsl下开发T113的主线linux(最新gcc+awboot+最新kernel+最新buildroot)

我的win11子系统编译一大堆错误。

离线

#14 2023-06-28 19:55:47

vigour1000
会员
注册时间: 2018-11-19
已发帖子: 99
积分: 5

Re: 在wsl下开发T113的主线linux(最新gcc+awboot+最新kernel+最新buildroot)

awboot 从SD加载 zImge 约5M  要7到8S  大家有什么好办法加速吗

离线

#15 2023-07-05 10:28:37

erbuziren
会员
注册时间: 2023-05-10
已发帖子: 1
积分: 1

Re: 在wsl下开发T113的主线linux(最新gcc+awboot+最新kernel+最新buildroot)

按照楼主的步骤能正常启动,我这里外接了RTL8201F-VB-CG用来接有线网络,但网口启动失败,下面是启动日志

[I] AWBoot r6165 starting...
[I] SMHC: sdhci0 controller v50310 initialized
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: init failed, trying SPI
[I] SPI-NAND: W25N01GV detected
[I] SPI-NAND: read dt blob of size 23611 at 43.00MB/S
[I] SPI-NAND: read Image of size 5424472 at 49.00MB/S
[I] booting linux...
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 6.1.0-rc3 (root@ubuntu) (arm-none-linux-gnueabihf-gcc (Arm GNU Toolchain 12.2.Rel1 (Build arm-12.24)) 12.2.1 20221205, GNU ld (Arm GNU Toolchain 12.2.Rel1 (Build arm-12.24)) 2.39.0.20221210) #8 SMP Mon Jul  3 17:03:36 CST 2023
[    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: MangoPi MQ-Dual
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] cma: Reserved 16 MiB at 0x47000000
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000040000000-0x0000000047ffffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x0000000041ffffff]
[    0.000000]   node   0: [mem 0x0000000042000000-0x00000000420fffff]
[    0.000000]   node   0: [mem 0x0000000042100000-0x0000000047ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x0000000047ffffff]
[    0.000000] percpu: Embedded 11 pages/cpu s15764 r8192 d21100 u45056
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: mem=128M ubi.mtd=3 rootfstype=ubifs noinitrd root=ubi0:rootfs rw rootwait console=ttyS5,115200
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off
[    0.000000] Memory: 98776K/131072K available (8192K kernel code, 952K rwdata, 2188K rodata, 1024K init, 270K bss, 15912K reserved, 16384K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=2.
[    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=2
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000001] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000012] Switching to timer-based delay loop, resolution 41ns
[    0.000192] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000678] Console: colour dummy device 80x30
[    0.000721] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.000736] pid_max: default: 32768 minimum: 301
[    0.000892] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.000908] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001435] CPU: Testing write buffer coherency: ok
[    0.001741] CPU0: update cpu_capacity 1024
[    0.001756] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.002509] Setting up static identity map for 0x40100000 - 0x40100060
[    0.002646] rcu: Hierarchical SRCU implementation.
[    0.002651] rcu: 	Max phase no-delay instances is 1000.
[    0.003171] smp: Bringing up secondary CPUs ...
[    0.003867] CPU1: update cpu_capacity 1024
[    0.003880] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.003993] smp: Brought up 1 node, 2 CPUs
[    0.004002] SMP: Total of 2 processors activated (96.00 BogoMIPS).
[    0.004010] CPU: All CPU(s) started in SVC mode.
[    0.004528] devtmpfs: initialized
[    0.008812] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.009010] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.009034] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.009660] pinctrl core: initialized pinctrl subsystem
[    0.011030] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.012086] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.012878] thermal_sys: Registered thermal governor 'step_wise'
[    0.013051] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.013062] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.021740] platform 5460000.tcon-top: Fixing up cyclic dependency with 5200000.mixer
[    0.021807] platform 5460000.tcon-top: Fixing up cyclic dependency with 5100000.mixer
[    0.022071] platform 5461000.lcd-controller: Fixing up cyclic dependency with 5460000.tcon-top
[    0.022425] platform 5470000.lcd-controller: Fixing up cyclic dependency with 5604000.tv-encoder
[    0.022479] platform 5470000.lcd-controller: Fixing up cyclic dependency with 5460000.tcon-top
[    0.023425] platform 7090000.rtc: Fixing up cyclic dependency with 7010000.clock-controller
[    0.032894] SCSI subsystem initialized
[    0.033370] usbcore: registered new interface driver usbfs
[    0.033405] usbcore: registered new interface driver hub
[    0.033441] usbcore: registered new device driver usb
[    0.033633] mc: Linux media interface: v0.10
[    0.033684] videodev: Linux video capture interface: v2.00
[    0.033754] pps_core: LinuxPPS API ver. 1 registered
[    0.033760] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.033775] PTP clock support registered
[    0.034183] Advanced Linux Sound Architecture Driver Initialized.
[    0.035039] clocksource: Switched to clocksource arch_sys_counter
[    0.042219] NET: Registered PF_INET protocol family
[    0.042422] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.042956] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.042981] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.042993] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.043009] TCP bind hash table entries: 1024 (order: 2, 16384 bytes, linear)
[    0.043043] TCP: Hash tables configured (established 1024 bind 1024)
[    0.043128] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.043162] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.043315] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.043971] RPC: Registered named UNIX socket transport module.
[    0.043983] RPC: Registered udp transport module.
[    0.043987] RPC: Registered tcp transport module.
[    0.043990] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.045344] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    0.050287] NFS: Registering the id_resolver key type
[    0.050340] Key type id_resolver registered
[    0.050345] Key type id_legacy registered
[    0.050507] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    0.050515] io scheduler mq-deadline registered
[    0.050520] io scheduler kyber registered
[    0.110557] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.121591] CAN device driver interface
[    0.124929] sun6i-rtc 7090000.rtc: registered as rtc0
[    0.125093] sun6i-rtc 7090000.rtc: setting system clock to 1970-01-02T00:02:07 UTC (86527)
[    0.125253] sun6i-rtc 7090000.rtc: RTC enabled
[    0.125616] i2c_dev: i2c /dev entries driver
[    0.127581] sunxi-wdt 20500a0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    0.128714] sun8i-ce 3040000.crypto: Set mod clock to 300000000 (300 Mhz) from 400000000 (400 Mhz)
[    0.129078] sun8i-ce 3040000.crypto: will run requests pump with realtime priority
[    0.129414] sun8i-ce 3040000.crypto: will run requests pump with realtime priority
[    0.129616] sun8i-ce 3040000.crypto: will run requests pump with realtime priority
[    0.129790] sun8i-ce 3040000.crypto: will run requests pump with realtime priority
[    0.129935] sun8i-ce 3040000.crypto: Register cbc(aes)
[    0.129961] sun8i-ce 3040000.crypto: Register ecb(aes)
[    0.129972] sun8i-ce 3040000.crypto: Register cbc(des3_ede)
[    0.129981] sun8i-ce 3040000.crypto: Register ecb(des3_ede)
[    0.130009] sun8i-ce 3040000.crypto: CryptoEngine Die ID 0
[    0.130867] usbcore: registered new interface driver usbhid
[    0.130877] usbhid: USB HID core driver
[    0.133601] NET: Registered PF_PACKET protocol family
[    0.133614] can: controller area network core
[    0.133680] NET: Registered PF_CAN protocol family
[    0.133688] can: raw protocol
[    0.133695] can: broadcast manager protocol
[    0.133703] can: netlink gateway - max_hops=1
[    0.133815] Key type dns_resolver registered
[    0.133906] Registering SWP/SWPB emulation handler
[    0.154404] sun20i-d1-pinctrl 2000000.pinctrl: initialized sunXi PIO driver
[    0.176102] 2500400.serial: ttyS1 at MMIO 0x2500400 (irq = 231, base_baud = 1500000) is a 16550A
[    0.197797] 2501400.serial: ttyS5 at MMIO 0x2501400 (irq = 232, base_baud = 1500000) is a 16550A
[    1.020025] printk: console [ttyS5] enabled
[    1.027804] sun4i-drm display-engine: bound 5100000.mixer (ops 0xc0954cd4)
[    1.036292] sun4i-drm display-engine: bound 5200000.mixer (ops 0xc0954cd4)
[    1.043175] sun4i-drm display-engine: bound 5460000.tcon-top (ops 0xc09591a4)
[    1.050821] sun4i-drm display-engine: No panel or bridge found... RGB output disabled
[    1.058736] sun4i-drm display-engine: bound 5461000.lcd-controller (ops 0xc0950a84)
[    1.066706] sun4i-drm display-engine: bound 5470000.lcd-controller (ops 0xc0950a84)
[    1.074477] sun4i-drm display-engine: bound 5604000.tv-encoder (ops 0xc0951aa4)
[    1.082600] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[    1.092358] spi-nand spi0.0: Winbond SPI NAND was found.
[    1.097745] spi-nand spi0.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
[    1.106581] 4 fixed-partitions partitions found on MTD device spi0.0
[    1.112950] Creating 4 MTD partitions on "spi0.0":
[    1.117781] 0x000000000000-0x000000040000 : "awboot"
[    1.123581] 0x000000040000-0x000000080000 : "dtb"
[    1.129061] 0x000000080000-0x000000800000 : "kernel"
[    1.143529] 0x000000800000-0x000008000000 : "rootfs"
[    1.298436] dwmac-sun8i 4500000.ethernet: IRQ eth_wake_irq not found
[    1.304804] dwmac-sun8i 4500000.ethernet: IRQ eth_lpi not found
[    1.311075] dwmac-sun8i 4500000.ethernet: PTP uses main clock
[    1.316874] dwmac-sun8i 4500000.ethernet: Current syscon value is not the default 58000 (expect 0)
[    1.326093] dwmac-sun8i 4500000.ethernet: No HW DMA feature register supported
[    1.333321] dwmac-sun8i 4500000.ethernet: RX Checksum Offload Engine supported
[    1.340567] dwmac-sun8i 4500000.ethernet: COE Type 2
[    1.345549] dwmac-sun8i 4500000.ethernet: TX Checksum insertion supported
[    1.352332] dwmac-sun8i 4500000.ethernet: Normal descriptors
[    1.357995] dwmac-sun8i 4500000.ethernet: Chain mode enabled
[    1.363657] dwmac-sun8i 4500000.ethernet: device MAC address fa:a4:b2:e5:5a:c2
[    1.473067] dwmac-sun8i 4500000.ethernet: EMAC reset timeout
[    1.478768] dwmac-sun8i 4500000.ethernet eth0: stmmac_dvr_remove: removing driver
[    1.525592] dwmac-sun8i: probe of 4500000.ethernet failed with error -110
[    1.534473] phy phy-4100400.phy.0: Changing dr_mode to 1
[    1.535693] usb_phy_generic usb_phy_generic.1.auto: dummy supplies not allowed for exclusive requests
[    1.539859] ehci-platform 4101000.usb: EHCI Host Controller
[    1.549562] musb-hdrc musb-hdrc.2.auto: MUSB HDRC host driver
[    1.554625] ehci-platform 4101000.usb: new USB bus registered, assigned bus number 1
[    1.560383] musb-hdrc musb-hdrc.2.auto: new USB bus registered, assigned bus number 2
[    1.569066] ehci-platform 4200000.usb: EHCI Host Controller
[    1.576708] hub 2-0:1.0: USB hub found
[    1.583395] ohci-platform 4200400.usb: Generic Platform OHCI controller
[    1.585414] hub 2-0:1.0: 1 port detected
[    1.596048] ehci-platform 4101000.usb: irq 237, io mem 0x04101000
[    1.602180] ehci-platform 4200000.usb: new USB bus registered, assigned bus number 3
[    1.605067] ohci-platform 4200400.usb: new USB bus registered, assigned bus number 4
[    1.619551] ehci-platform 4200000.usb: irq 239, io mem 0x04200000
[    1.620540] sun8i-thermal 2009400.temperature-sensor: supply vref not found, using dummy regulator
[    1.625775] ehci-platform 4101000.usb: USB 2.0 started, EHCI 1.00
[    1.640995] ohci-platform 4200400.usb: irq 241, io mem 0x04200400
[    1.647577] hub 1-0:1.0: USB hub found
[    1.651567] ubi0: attaching mtd3
[    1.651618] hub 1-0:1.0: 1 port detected
[    1.659037] sunxi-mmc 4020000.mmc: Got CD GPIO
[    1.665078] ehci-platform 4200000.usb: USB 2.0 started, EHCI 1.00
[    1.672471] hub 3-0:1.0: USB hub found
[    1.676581] hub 3-0:1.0: 1 port detected
[    1.689134] sunxi-mmc 4020000.mmc: initialized, max. request size: 2047 KB, uses new timings mode
[    1.719798] hub 4-0:1.0: USB hub found
[    1.723602] hub 4-0:1.0: 1 port detected
[    1.785141] ohci-platform 4101400.usb: Generic Platform OHCI controller
[    1.791804] ohci-platform 4101400.usb: new USB bus registered, assigned bus number 5
[    1.799857] ohci-platform 4101400.usb: irq 240, io mem 0x04101400
[    1.879906] hub 5-0:1.0: USB hub found
[    1.883741] hub 5-0:1.0: 1 port detected
[    1.945072] random: crng init done
[    2.460898] ubi0: scanning is finished
[    2.475131] ubi0: attached mtd3 (name "rootfs", size 120 MiB)
[    2.480896] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    2.487789] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    2.494571] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    2.501543] ubi0: good PEBs: 960, bad PEBs: 0, corrupted PEBs: 0
[    2.507555] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
[    2.514769] ubi0: max/mean erase counter: 3/0, WL threshold: 4096, image sequence number: 1216836970
[    2.523901] ubi0: available PEBs: 0, total reserved PEBs: 960, PEBs reserved for bad PEB handling: 20
[    2.533133] ubi0: background thread "ubi_bgt0d" started, PID 89
[    2.533490] ALSA device list:
[    2.542041]   No soundcards found.
[    2.547265] UBIFS (ubi0:0): Mounting in unauthenticated mode
[    2.553129] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 90
[    2.609741] UBIFS (ubi0:0): recovery needed
[    2.752872] UBIFS (ubi0:0): recovery completed
[    2.757462] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[    2.764859] UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    2.774788] UBIFS (ubi0:0): FS size: 117452800 bytes (112 MiB, 925 LEBs), max 1024 LEBs, journal size 9023488 bytes (8 MiB, 72 LEBs)
[    2.786705] UBIFS (ubi0:0): reserved for root: 0 bytes (0 KiB)
[    2.792533] UBIFS (ubi0:0): media format: w4/r0 (latest is w5/r0), UUID 183F60BC-DAD4-4499-9B3F-30E882B5FDFB, small LPT model
[    2.805650] VFS: Mounted root (ubifs filesystem) on device 0:14.
[    2.813012] devtmpfs: mounted
[    2.817167] Freeing unused kernel image (initmem) memory: 1024K
[    2.823253] Run /sbin/init as init process
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Initializing random number generator: OK
Saving random seed: OK
Starting network: OK


Welcome to Buildroot

buildroot login: [   12.006173] cedrus 1c0e000.video-codec: Device registered as /dev/video0

[I] AWBoot r6165 starting...
[I] SMHC: sdhci0 controller v50310 initialized
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: init failed, trying SPI
[I] SPI-NAND: W25N01GV detected
[I] SPI-NAND: read dt blob of size 23607 at 43.00MB/S
[I] SPI-NAND: read Image of size 5424472 at 49.00MB/S
[I] booting linux...
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 6.1.0-rc3 (root@ubuntu) (arm-none-linux-gnueabihf-gcc (Arm GNU Toolchain 12.2.Rel1 (Build arm-12.24)) 12.2.1 20221205, GNU ld (Arm GNU Toolchain 12.2.Rel1 (Build arm-12.24)) 2.39.0.20221210) #8 SMP Mon Jul  3 17:03:36 CST 2023
[    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: MangoPi MQ-Dual
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] cma: Reserved 16 MiB at 0x47000000
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000040000000-0x0000000047ffffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x0000000041ffffff]
[    0.000000]   node   0: [mem 0x0000000042000000-0x00000000420fffff]
[    0.000000]   node   0: [mem 0x0000000042100000-0x0000000047ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x0000000047ffffff]
[    0.000000] percpu: Embedded 11 pages/cpu s15764 r8192 d21100 u45056
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: mem=128M ubi.mtd=3 rootfstype=ubifs noinitrd root=ubi0:rootfs rw rootwait console=ttyS5,115200
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off
[    0.000000] Memory: 98776K/131072K available (8192K kernel code, 952K rwdata, 2188K rodata, 1024K init, 270K bss, 15912K reserved, 16384K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=2.
[    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=2
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000001] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000012] Switching to timer-based delay loop, resolution 41ns
[    0.000192] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000681] Console: colour dummy device 80x30
[    0.000724] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.000739] pid_max: default: 32768 minimum: 301
[    0.000895] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.000911] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001444] CPU: Testing write buffer coherency: ok
[    0.001749] CPU0: update cpu_capacity 1024
[    0.001764] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.002509] Setting up static identity map for 0x40100000 - 0x40100060
[    0.002645] rcu: Hierarchical SRCU implementation.
[    0.002650] rcu: 	Max phase no-delay instances is 1000.
[    0.003161] smp: Bringing up secondary CPUs ...
[    0.003849] CPU1: update cpu_capacity 1024
[    0.003862] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.003978] smp: Brought up 1 node, 2 CPUs
[    0.003988] SMP: Total of 2 processors activated (96.00 BogoMIPS).
[    0.003995] CPU: All CPU(s) started in SVC mode.
[    0.004512] devtmpfs: initialized
[    0.008791] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.008990] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.009016] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.009645] pinctrl core: initialized pinctrl subsystem
[    0.011008] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.012064] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.012861] thermal_sys: Registered thermal governor 'step_wise'
[    0.013032] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.013044] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.021750] platform 5460000.tcon-top: Fixing up cyclic dependency with 5200000.mixer
[    0.021818] platform 5460000.tcon-top: Fixing up cyclic dependency with 5100000.mixer
[    0.022082] platform 5461000.lcd-controller: Fixing up cyclic dependency with 5460000.tcon-top
[    0.022443] platform 5470000.lcd-controller: Fixing up cyclic dependency with 5604000.tv-encoder
[    0.022496] platform 5470000.lcd-controller: Fixing up cyclic dependency with 5460000.tcon-top
[    0.023432] platform 7090000.rtc: Fixing up cyclic dependency with 7010000.clock-controller
[    0.032882] SCSI subsystem initialized
[    0.033354] usbcore: registered new interface driver usbfs
[    0.033390] usbcore: registered new interface driver hub
[    0.033427] usbcore: registered new device driver usb
[    0.033622] mc: Linux media interface: v0.10
[    0.033675] videodev: Linux video capture interface: v2.00
[    0.033745] pps_core: LinuxPPS API ver. 1 registered
[    0.033749] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.033763] PTP clock support registered
[    0.034171] Advanced Linux Sound Architecture Driver Initialized.
[    0.035027] clocksource: Switched to clocksource arch_sys_counter
[    0.042212] NET: Registered PF_INET protocol family
[    0.042416] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.042955] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.042981] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.042994] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.043011] TCP bind hash table entries: 1024 (order: 2, 16384 bytes, linear)
[    0.043045] TCP: Hash tables configured (established 1024 bind 1024)
[    0.043128] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.043160] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.043311] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.043970] RPC: Registered named UNIX socket transport module.
[    0.043983] RPC: Registered udp transport module.
[    0.043987] RPC: Registered tcp transport module.
[    0.043990] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.045327] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    0.050267] NFS: Registering the id_resolver key type
[    0.050365] Key type id_resolver registered
[    0.050369] Key type id_legacy registered
[    0.050533] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    0.050542] io scheduler mq-deadline registered
[    0.050547] io scheduler kyber registered
[    0.110252] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.121313] CAN device driver interface
[    0.124648] sun6i-rtc 7090000.rtc: registered as rtc0
[    0.124770] sun6i-rtc 7090000.rtc: setting system clock to 1970-01-02T00:09:53 UTC (86993)
[    0.124923] sun6i-rtc 7090000.rtc: RTC enabled
[    0.125330] i2c_dev: i2c /dev entries driver
[    0.127284] sunxi-wdt 20500a0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    0.128419] sun8i-ce 3040000.crypto: Set mod clock to 300000000 (300 Mhz) from 400000000 (400 Mhz)
[    0.128784] sun8i-ce 3040000.crypto: will run requests pump with realtime priority
[    0.129125] sun8i-ce 3040000.crypto: will run requests pump with realtime priority
[    0.129319] sun8i-ce 3040000.crypto: will run requests pump with realtime priority
[    0.129497] sun8i-ce 3040000.crypto: will run requests pump with realtime priority
[    0.129639] sun8i-ce 3040000.crypto: Register cbc(aes)
[    0.129665] sun8i-ce 3040000.crypto: Register ecb(aes)
[    0.129675] sun8i-ce 3040000.crypto: Register cbc(des3_ede)
[    0.129685] sun8i-ce 3040000.crypto: Register ecb(des3_ede)
[    0.129713] sun8i-ce 3040000.crypto: CryptoEngine Die ID 0
[    0.130577] usbcore: registered new interface driver usbhid
[    0.130588] usbhid: USB HID core driver
[    0.133295] NET: Registered PF_PACKET protocol family
[    0.133309] can: controller area network core
[    0.133374] NET: Registered PF_CAN protocol family
[    0.133382] can: raw protocol
[    0.133389] can: broadcast manager protocol
[    0.133398] can: netlink gateway - max_hops=1
[    0.133526] Key type dns_resolver registered
[    0.133614] Registering SWP/SWPB emulation handler
[    0.154153] sun20i-d1-pinctrl 2000000.pinctrl: initialized sunXi PIO driver
[    0.175824] 2500400.serial: ttyS1 at MMIO 0x2500400 (irq = 231, base_baud = 1500000) is a 16550A
[    0.197519] 2501400.serial: ttyS5 at MMIO 0x2501400 (irq = 232, base_baud = 1500000) is a 16550A
[    1.019747] printk: console [ttyS5] enabled
[    1.027527] sun4i-drm display-engine: bound 5100000.mixer (ops 0xc0954cd4)
[    1.036014] sun4i-drm display-engine: bound 5200000.mixer (ops 0xc0954cd4)
[    1.042896] sun4i-drm display-engine: bound 5460000.tcon-top (ops 0xc09591a4)
[    1.050540] sun4i-drm display-engine: No panel or bridge found... RGB output disabled
[    1.058450] sun4i-drm display-engine: bound 5461000.lcd-controller (ops 0xc0950a84)
[    1.066428] sun4i-drm display-engine: bound 5470000.lcd-controller (ops 0xc0950a84)
[    1.074198] sun4i-drm display-engine: bound 5604000.tv-encoder (ops 0xc0951aa4)
[    1.082322] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[    1.092110] spi-nand spi0.0: Winbond SPI NAND was found.
[    1.097490] spi-nand spi0.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
[    1.106323] 4 fixed-partitions partitions found on MTD device spi0.0
[    1.112693] Creating 4 MTD partitions on "spi0.0":
[    1.117533] 0x000000000000-0x000000040000 : "awboot"
[    1.123328] 0x000000040000-0x000000080000 : "dtb"
[    1.128803] 0x000000080000-0x000000800000 : "kernel"
[    1.143291] 0x000000800000-0x000008000000 : "rootfs"
[    1.298280] dwmac-sun8i 4500000.ethernet: IRQ eth_wake_irq not found
[    1.304648] dwmac-sun8i 4500000.ethernet: IRQ eth_lpi not found
[    1.310911] dwmac-sun8i 4500000.ethernet: PTP uses main clock
[    1.316713] dwmac-sun8i 4500000.ethernet: Current syscon value is not the default 58000 (expect 0)
[    1.325927] dwmac-sun8i 4500000.ethernet: No HW DMA feature register supported
[    1.333155] dwmac-sun8i 4500000.ethernet: RX Checksum Offload Engine supported
[    1.340404] dwmac-sun8i 4500000.ethernet: COE Type 2
[    1.345378] dwmac-sun8i 4500000.ethernet: TX Checksum insertion supported
[    1.352160] dwmac-sun8i 4500000.ethernet: Normal descriptors
[    1.357829] dwmac-sun8i 4500000.ethernet: Chain mode enabled
[    1.363491] dwmac-sun8i 4500000.ethernet: device MAC address 6a:4c:9f:b1:5f:1b
[    1.472880] dwmac-sun8i 4500000.ethernet: EMAC reset timeout
[    1.478579] dwmac-sun8i 4500000.ethernet eth0: stmmac_dvr_remove: removing driver
[    1.525572] dwmac-sun8i: probe of 4500000.ethernet failed with error -110
[    1.534464] phy phy-4100400.phy.0: Changing dr_mode to 1
[    1.535685] usb_phy_generic usb_phy_generic.1.auto: dummy supplies not allowed for exclusive requests
[    1.539848] ehci-platform 4101000.usb: EHCI Host Controller
[    1.549546] musb-hdrc musb-hdrc.2.auto: MUSB HDRC host driver
[    1.554617] ehci-platform 4101000.usb: new USB bus registered, assigned bus number 1
[    1.560375] musb-hdrc musb-hdrc.2.auto: new USB bus registered, assigned bus number 2
[    1.569058] ehci-platform 4200000.usb: EHCI Host Controller
[    1.576693] hub 2-0:1.0: USB hub found
[    1.583380] ohci-platform 4200400.usb: Generic Platform OHCI controller
[    1.585401] hub 2-0:1.0: 1 port detected
[    1.596042] ehci-platform 4101000.usb: irq 237, io mem 0x04101000
[    1.602174] ehci-platform 4200000.usb: new USB bus registered, assigned bus number 3
[    1.605062] ohci-platform 4200400.usb: new USB bus registered, assigned bus number 4
[    1.619548] ehci-platform 4200000.usb: irq 239, io mem 0x04200000
[    1.620547] sun8i-thermal 2009400.temperature-sensor: supply vref not found, using dummy regulator
[    1.625753] ehci-platform 4101000.usb: USB 2.0 started, EHCI 1.00
[    1.641068] ohci-platform 4200400.usb: irq 241, io mem 0x04200400
[    1.647618] hub 1-0:1.0: USB hub found
[    1.649010] ubi0: attaching mtd3
[    1.651600] hub 1-0:1.0: 1 port detected
[    1.659804] sunxi-mmc 4020000.mmc: Got CD GPIO
[    1.665066] ehci-platform 4200000.usb: USB 2.0 started, EHCI 1.00
[    1.672069] hub 3-0:1.0: USB hub found
[    1.675913] hub 3-0:1.0: 1 port detected
[    1.686518] sunxi-mmc 4020000.mmc: initialized, max. request size: 2047 KB, uses new timings mode
[    1.719792] hub 4-0:1.0: USB hub found
[    1.723595] hub 4-0:1.0: 1 port detected
[    1.785140] ohci-platform 4101400.usb: Generic Platform OHCI controller
[    1.791801] ohci-platform 4101400.usb: new USB bus registered, assigned bus number 5
[    1.799897] ohci-platform 4101400.usb: irq 240, io mem 0x04101400
[    1.879907] hub 5-0:1.0: USB hub found
[    1.883744] hub 5-0:1.0: 1 port detected
[    1.955066] random: crng init done
[    2.474496] ubi0: scanning is finished
[    2.488732] ubi0: attached mtd3 (name "rootfs", size 120 MiB)
[    2.494496] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    2.501408] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    2.508204] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    2.515168] ubi0: good PEBs: 960, bad PEBs: 0, corrupted PEBs: 0
[    2.521169] ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
[    2.528393] ubi0: max/mean erase counter: 3/0, WL threshold: 4096, image sequence number: 1216836970
[    2.537525] ubi0: available PEBs: 0, total reserved PEBs: 960, PEBs reserved for bad PEB handling: 20
[    2.547119] ALSA device list:
[    2.550094]   No soundcards found.
[    2.553835] ubi0: background thread "ubi_bgt0d" started, PID 90
[    2.561231] UBIFS (ubi0:0): Mounting in unauthenticated mode
[    2.567307] UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 91
[    2.623816] UBIFS (ubi0:0): recovery needed
[    2.768583] UBIFS (ubi0:0): recovery completed
[    2.773124] UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[    2.780552] UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    2.790474] UBIFS (ubi0:0): FS size: 117452800 bytes (112 MiB, 925 LEBs), max 1024 LEBs, journal size 9023488 bytes (8 MiB, 72 LEBs)
[    2.802388] UBIFS (ubi0:0): reserved for root: 0 bytes (0 KiB)
[    2.808226] UBIFS (ubi0:0): media format: w4/r0 (latest is w5/r0), UUID 183F60BC-DAD4-4499-9B3F-30E882B5FDFB, small LPT model
[    2.821315] VFS: Mounted root (ubifs filesystem) on device 0:14.
[    2.828704] devtmpfs: mounted
[    2.832833] Freeing unused kernel image (initmem) memory: 1024K
[    2.838952] Run /sbin/init as init process
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Initializing random number generator: OK
Saving random seed: OK
Starting network: OK


Welcome to Buildroot

buildroot login: [   12.006177] cedrus 1c0e000.video-codec: Device registered as /dev/video0

看别人正常日志是没有dwmac-sun8i 4500000.ethernet: EMAC reset timeout这个日志的,现在我也不清楚到底是软件问题还是硬件连接问题
sun8i-t113.dtsi文件根据硬件原理图只改了rmii的引脚配置:

			rmii_pe_pins: rmii-pe-pins {
				pins = "PG0", "PG1", "PG2", "PG3", "PG4",
				       "PG5", "PG12", "PG13", "PG14", "PG15";
				function = "emac";
			};

sun8i-t113-mangopi-dual.dts文件内容如下:

// SPDX-License-Identifier: (GPL-2.0+ or MIT)
// Copyright (C) 2022 Samuel Holland <samuel@sholland.org>

/dts-v1/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
#include "sun8i-t113.dtsi"

/ {
	model = "MangoPi MQ-Dual";
	compatible = "allwinner,sun20i-d1", "allwinner,sun8i";

	aliases {
		mmc0 = &mmc0;
		ethernet0 = &emac;
		serial1 = &uart1;
		serial5 = &uart5;
	};

        chosen {
		stdout-path = "serial5:115200n8";
                bootargs = "mem=128M ubi.mtd=3 rootfstype=ubifs noinitrd root=ubi0:rootfs rw rootwait console=ttyS5,115200";
                
        };

	reg_vcc: vcc {
		compatible = "regulator-fixed";
		regulator-name = "vcc";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
	};

	reg_usbvbus: usbvbus {
		compatible = "regulator-fixed";
		regulator-name = "usbvbus";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		vin-supply = <&reg_vcc>;
	};

	reg_vcc_3v3: vcc-3v3 {
		compatible = "regulator-fixed";
		regulator-name = "vcc-3v3";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		vin-supply = <&reg_vcc>;
	};

	reg_avdd2v8: avdd2v8 {
		compatible = "regulator-fixed";
		regulator-name = "avdd2v8";
		regulator-min-microvolt = <2800000>;
		regulator-max-microvolt = <2800000>;
		vin-supply = <&reg_vcc_3v3>;
	};

	reg_vdd_cpu: vdd-cpu {
		compatible = "regulator-fixed";
		regulator-name = "vdd-cpu";
		regulator-min-microvolt = <900000>;
		regulator-max-microvolt = <900000>;
		vin-supply = <&reg_vcc>;
	};

};


&cpu0 {
	cpu-supply = <&reg_vdd_cpu>;
};

&cpu1 {
	cpu-supply = <&reg_vdd_cpu>;
};

&wdt {
	status = "okay";
};

&de {
	status = "okay";
};

&dsi {
	pinctrl-0 = <&dsi_4lane_pins>;
	pinctrl-names = "default";
	status = "disabled";

        panel: panel@0 {
                reg = <0>;
                compatible = "lg,lh500wx1-sd03";
                pinctrl-names = "default";
/*
                pinctrl-0 = <&panel_pin>;

                port {
                        panel_in: endpoint {
                                remote-endpoint = <&dsi0_out>;
                        };
                };
*/
        };
};

&pio {

	vcc-pb-supply = <&reg_vcc_3v3>;
	vcc-pc-supply = <&reg_vcc_3v3>;
	vcc-pd-supply = <&reg_vcc_3v3>;
	vcc-pe-supply = <&reg_avdd2v8>;
	vcc-pf-supply = <&reg_vcc_3v3>;
	vcc-pg-supply = <&reg_vcc_3v3>;

	can0_pins_a: can0_pins@0 {
		pins = "PB2", "PB3";
		function = "can0";
		drive-strength = <10>;
		bias-pull-up;
	};

	can1_pins_a: can1_pins@0 {
		pins = "PB4", "PB5";
		function = "can1";
		drive-strength = <10>;
		bias-pull-up;
	};		

	uart5_pb4_pins: uart5-pb4-pins {
	    pins = "PB4", "PB5";
	    function = "uart5";
	};

        clk_pg11_pin: clk-pg11-pin {
                pins = "PG11";
                function = "clk";
        };

};

&uart1 {
        uart-has-rtscts;
        pinctrl-0 = <&uart1_pg6_pins>, <&uart1_pg8_rts_cts_pins>;
        pinctrl-names = "default";
        status = "okay";

        /* XR829 bluetooth is connected here */
};

&uart5 {
	pinctrl-0 = <&uart5_pb4_pins>;
	pinctrl-names = "default";
	status = "okay";
};

&i2c2 {
	pinctrl-0 = <&i2c2_pe12_pins>;
	pinctrl-names = "default";
	status = "okay";

	gt911: touchscreen@28 {
		compatible = "goodix,gt911";
		reg = <0x28>;
		interrupt-parent = <&pio>;
		interrupts = <2 3 IRQ_TYPE_EDGE_FALLING>;
		irq-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>;
		reset-gpios = <&pio 2 2 GPIO_ACTIVE_HIGH>;
		touchscreen-swapped-x-y;
	};
};

&spi0 {
        pinctrl-0 = <&spi0_pins>;
        pinctrl-names = "default";
        status = "okay";
        
	spi_nand: spi_nand@0 {
        #address-cells = <1>;
        #size-cells = <1>;
		compatible = "spi-nand";
		reg = <0>;

		partition@0 {
				label = "awboot";
				reg = <0x0 0x40000>;	/* 256K */
				read-only;
		};

		partition@40000 {
				label = "dtb";
				reg = <0x40000 0x40000>;  /* 256k */
				read-only;
		};

		partition@80000 {
				label = "kernel";
				reg = <0x80000 0x780000>;  /* 7.5MB */
				read-only;
		};

		partition@800000 {
				label = "rootfs";
				reg = <0x800000 0x7800000>;
		};
	};
};

&mmc0 {
	bus-width = <4>;
	cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW)>;
	disable-wp;
	vmmc-supply = <&reg_vcc_3v3>;
	vqmmc-supply = <&reg_vcc_3v3>;
	pinctrl-0 = <&mmc0_pins>;
	pinctrl-names = "default";
	status = "okay";
};

&usb_otg {
	dr_mode = "otg";
	status = "okay";
};

&ehci0 {
	status = "okay";
};

&ehci1 {
	status = "okay";
};


&ohci0 {
	status = "okay";
};

&ohci1 {
	status = "okay";
};


&ths {
	status = "okay";
/*	vref-supply = <&reg_aldo>; */
};

&usbphy {
	usb0_vbus-supply = <&reg_usbvbus>;
	usb1_vbus-supply = <&reg_usbvbus>;
	status = "okay";
};

&mdio {
	ext_rgmii_phy: ethernet-phy@1 {
		compatible = "ethernet-phy-ieee802.3-c22";
		reg = <1>;
	};
};

&emac {
	pinctrl-0 = <&rmii_pe_pins>;
	pinctrl-names = "default";
	phy-handle = <&ext_rgmii_phy>;
	phy-mode = "rmii";
	phy-supply = <&reg_vcc_3v3>;
	status = "okay";
};

下面是RTL8201F原理图
_20230705102318.png
RTL8201F的21脚虽然画了一个连接,其实并没有接到T113的任何脚,我不知道要接哪个脚,T113的RMII接口好像也没有PHYRST脚

离线

#16 2023-07-11 15:34:57

shzn
会员
注册时间: 2021-10-19
已发帖子: 10
积分: 5

Re: 在wsl下开发T113的主线linux(最新gcc+awboot+最新kernel+最新buildroot)

大佬,这个设备树编译有问题。

root@ubuntu:/home/t113-s3_master/linux# make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- dtbs
  DTC     arch/arm/boot/dts/sun8i-t113-mangopi-dual.dtb
Error: arch/arm/boot/dts/sun8i-t113.dtsi:1333.19-20 syntax error
FATAL ERROR: Unable to parse input tree
scripts/Makefile.lib:406: recipe for target 'arch/arm/boot/dts/sun8i-t113-mangopi-dual.dtb' failed
make[1]: *** [arch/arm/boot/dts/sun8i-t113-mangopi-dual.dtb] Error 1
Makefile:1459: recipe for target 'dtbs' failed
make: *** [dtbs] Error 2

最近编辑记录 shzn (2023-07-11 15:35:15)

离线

#17 2023-07-13 09:52:20

shzn
会员
注册时间: 2021-10-19
已发帖子: 10
积分: 5

Re: 在wsl下开发T113的主线linux(最新gcc+awboot+最新kernel+最新buildroot)

插个眼:经过验证,当前的补丁存在一个问题,d1s_t113_can_bus.patch打不成功,需要手动添加代码(估计是补丁有更改)。打完之后会报错,说RST_BUS_CAN0和RST_BUS_CAN1没定义。需要自行再linux\include\dt-bindings\reset\sun20i-d1-ccu.h 末尾添加这两个定义。不然编译不过内核,并且设备树也是编译不过的。改完重新编译即可。

离线

#18 2023-07-13 17:46:23

shzn
会员
注册时间: 2021-10-19
已发帖子: 10
积分: 5

Re: 在wsl下开发T113的主线linux(最新gcc+awboot+最新kernel+最新buildroot)

楼主,这是啥情况,有遇到过吗?

[I] AWBoot r8 starting...
[I] SMHC: sdhci0 controller v50310 initialized
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: error 0x100 status 0x0
[W] SMHC: cmd timeout
[W] SMHC: init failed, trying SPI
[I] SPI-NAND: GD5F1GQ5UExxG detected
[I] SPI-NAND: read dt blob of size 25333 at 25.00MB/S
[I] SPI-NAND: read Image of size 5425512 at 26.00MB/S
[I] booting linux...
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 6.1.0-rc3-443875-gb466df90d48f-dirty (root@ubuntu) (arm-none-linux-gnueabihf-gcc (Arm GNU Toolchain 12.2.Rel1 (Build arm-12.24)) 12.2.1 20221205, GNU ld (Arm GNU Toolchain 12.2.Rel1 (Build arm-12.24)) 2.39.0.20221210) #3 SMP Thu Jul 13 12:16:34 CST 2023
[    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: MangoPi MQ-Dual
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] cma: Reserved 16 MiB at 0x47000000
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000040000000-0x0000000047ffffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x0000000041ffffff]
[    0.000000]   node   0: [mem 0x0000000042000000-0x00000000420fffff]
[    0.000000]   node   0: [mem 0x0000000042100000-0x0000000047ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x0000000047ffffff]
[    0.000000] percpu: Embedded 11 pages/cpu s15764 r8192 d21100 u45056
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: mem=128M ubi.mtd=3 rootfstype=ubifs root=ubi0:rootfs rw rootwait console=ttyS3,115200
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off
[    0.000000] Memory: 98768K/131072K available (8192K kernel code, 953K rwdata, 2188K rodata, 1024K init, 270K bss, 15920K reserved, 16384K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=2.
[    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=2
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000001] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000012] Switching to timer-based delay loop, resolution 41ns
[    0.000191] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000700] Console: colour dummy device 80x30
[    0.000744] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.000760] pid_max: default: 32768 minimum: 301
[    0.000916] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.000931] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001463] CPU: Testing write buffer coherency: ok
[    0.001770] CPU0: update cpu_capacity 1024
[    0.001784] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.002535] Setting up static identity map for 0x40100000 - 0x40100060
[    0.002679] rcu: Hierarchical SRCU implementation.
[    0.002684] rcu:     Max phase no-delay instances is 1000.
[    0.003206] smp: Bringing up secondary CPUs ...
[    0.003897] CPU1: update cpu_capacity 1024
[    0.003910] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.004026] smp: Brought up 1 node, 2 CPUs
[    0.004035] SMP: Total of 2 processors activated (96.00 BogoMIPS).
[    0.004043] CPU: All CPU(s) started in SVC mode.
[    0.004555] devtmpfs: initialized
[    0.009110] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.009298] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.009325] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.010049] pinctrl core: initialized pinctrl subsystem
[    0.011334] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.012378] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.013157] thermal_sys: Registered thermal governor 'step_wise'
[    0.013329] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.013342] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.022541] platform 5460000.tcon-top: Fixing up cyclic dependency with 5200000.mixer
[    0.022610] platform 5460000.tcon-top: Fixing up cyclic dependency with 5100000.mixer
[    0.022875] platform 5461000.lcd-controller: Fixing up cyclic dependency with 5460000.tcon-top
[    0.023228] platform 5470000.lcd-controller: Fixing up cyclic dependency with 5604000.tv-encoder
[    0.023286] platform 5470000.lcd-controller: Fixing up cyclic dependency with 5460000.tcon-top
[    0.024287] platform 7090000.rtc: Fixing up cyclic dependency with 7010000.clock-controller
[    0.034533] SCSI subsystem initialized
[    0.035003] usbcore: registered new interface driver usbfs
[    0.035037] usbcore: registered new interface driver hub
[    0.035072] usbcore: registered new device driver usb
[    0.035293] mc: Linux media interface: v0.10
[    0.035339] videodev: Linux video capture interface: v2.00
[    0.035407] pps_core: LinuxPPS API ver. 1 registered
[    0.035412] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.035427] PTP clock support registered
[    0.035846] Advanced Linux Sound Architecture Driver Initialized.
[    0.036679] clocksource: Switched to clocksource arch_sys_counter
[    0.043819] NET: Registered PF_INET protocol family
[    0.044027] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.044574] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.044603] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.044620] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.044638] TCP bind hash table entries: 1024 (order: 2, 16384 bytes, linear)
[    0.044672] TCP: Hash tables configured (established 1024 bind 1024)
[    0.044755] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.044789] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.044942] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.045598] RPC: Registered named UNIX socket transport module.
[    0.045611] RPC: Registered udp transport module.
[    0.045615] RPC: Registered tcp transport module.
[    0.045618] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.047007] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    0.051934] NFS: Registering the id_resolver key type
[    0.051997] Key type id_resolver registered
[    0.052002] Key type id_legacy registered
[    0.052169] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    0.052179] io scheduler mq-deadline registered
[    0.052184] io scheduler kyber registered
[    0.111059] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.122487] CAN device driver interface
[    0.126095] sun6i-rtc 7090000.rtc: registered as rtc0
[    0.126220] sun6i-rtc 7090000.rtc: setting system clock to 1970-01-02T01:43:03 UTC (92583)
[    0.126347] sun6i-rtc 7090000.rtc: RTC enabled
[    0.126773] i2c_dev: i2c /dev entries driver
[    0.128700] sunxi-wdt 20500a0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    0.129895] sun8i-ce 3040000.crypto: Set mod clock to 300000000 (300 Mhz) from 400000000 (400 Mhz)
[    0.130263] sun8i-ce 3040000.crypto: will run requests pump with realtime priority
[    0.130584] sun8i-ce 3040000.crypto: will run requests pump with realtime priority
[    0.130772] sun8i-ce 3040000.crypto: will run requests pump with realtime priority
[    0.130973] sun8i-ce 3040000.crypto: will run requests pump with realtime priority
[    0.131115] sun8i-ce 3040000.crypto: Register cbc(aes)
[    0.131141] sun8i-ce 3040000.crypto: Register ecb(aes)
[    0.131150] sun8i-ce 3040000.crypto: Register cbc(des3_ede)
[    0.131160] sun8i-ce 3040000.crypto: Register ecb(des3_ede)
[    0.131186] sun8i-ce 3040000.crypto: CryptoEngine Die ID 0
[    0.132069] usbcore: registered new interface driver usbhid
[    0.132080] usbhid: USB HID core driver
[    0.134945] NET: Registered PF_PACKET protocol family
[    0.134960] can: controller area network core
[    0.135033] NET: Registered PF_CAN protocol family
[    0.135040] can: raw protocol
[    0.135048] can: broadcast manager protocol
[    0.135056] can: netlink gateway - max_hops=1
[    0.135155] Key type dns_resolver registered
[    0.135242] Registering SWP/SWPB emulation handler
[    0.155866] sun20i-d1-pinctrl 2000000.pinctrl: initialized sunXi PIO driver
[    0.177489] 2500400.serial: ttyS1 at MMIO 0x2500400 (irq = 231, base_baud = 1500000) is a 16550A
[    0.199146] 2500c00.serial: ttyS3 at MMIO 0x2500c00 (irq = 232, base_baud = 1500000) is a 16550A
[    1.022604] printk: console [ttyS3] enabled
[    1.048357] 2501400.serial: ttyS0 at MMIO 0x2501400 (irq = 233, base_baud = 1500000) is a 16550A
[    1.060708] sun4i-drm display-engine: bound 5100000.mixer (ops 0xc0954d14)
[    1.069242] sun4i-drm display-engine: bound 5200000.mixer (ops 0xc0954d14)
[    1.076128] sun4i-drm display-engine: bound 5460000.tcon-top (ops 0xc09591e4)
[    1.083780] sun4i-drm display-engine: No panel or bridge found... RGB output disabled
[    1.091657] sun4i-drm display-engine: bound 5461000.lcd-controller (ops 0xc0950ac4)
[    1.099610] sun4i-drm display-engine: bound 5470000.lcd-controller (ops 0xc0950ac4)
[    1.107400] sun4i-drm display-engine: bound 5604000.tv-encoder (ops 0xc0951ae4)
[    1.115529] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[    1.125349] spi-nand spi0.0: GigaDevice SPI NAND was found.
[    1.130982] spi-nand spi0.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 128
[    1.139829] 4 fixed-partitions partitions found on MTD device spi0.0
[    1.146204] Creating 4 MTD partitions on "spi0.0":
[    1.151035] 0x000000000000-0x000000040000 : "awboot"
[    1.156309] ------------[ cut here ]------------
[    1.160932] kernel BUG at drivers/dma/dmaengine.h:54!
[    1.165979] Internal error: Oops - BUG: 0 [#1] SMP ARM
[    1.171113] Modules linked in:
[    1.174171] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.1.0-rc3-443875-gb466df90d48f-dirty #3
[    1.182687] Hardware name: Generic DT based system
[    1.187470] PC is at sun6i_dma_interrupt+0x1a8/0x1ac
[    1.192448] LR is at sun6i_dma_interrupt+0xec/0x1ac
[    1.197328] pc : [<c04a362c>]    lr : [<c04a3570>]    psr: 60000193
[    1.203587] sp : c0d01d50  ip : 0626c000  fp : 00000000
[    1.208805] r10: 00000000  r9 : 00000010  r8 : c11ff440
[    1.214022] r7 : 00000000  r6 : c122810c  r5 : c11ff640  r4 : 00000007
[    1.220541] r3 : c122810c  r2 : c1b30b80  r1 : 00000000  r0 : c1228168
[    1.227061] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment none
[    1.234275] Control: 10c5387d  Table: 4000406a  DAC: 00000051
[    1.240012] Register r0 information: non-slab/vmalloc memory
[    1.245669] Register r1 information: NULL pointer
[    1.250369] Register r2 information: slab kmalloc-128 start c1b30b80 pointer offset 0 size 128
[    1.256684] spi_master spi0: spi0.0: timeout transferring 1 bytes@100000000Hz for 110(100)ms
[    1.258985] Register r3 information: non-slab/vmalloc memory
[    1.267425] spi-nand spi0.0: SPI transfer failed: -110
[    1.273052] Register r4 information: non-paged memory
[    1.278193] spi_master spi0: failed to transfer one message from queue
[    1.283220] Register r5 information: slab kmalloc-512 start c11ff600 pointer offset 64 size 512
[    1.290244] 0x000000040000-0x000000080000 : "dtb"
[    1.298426] Register r6 information: non-slab/vmalloc memory
[    1.298432] Register r7 information: NULL pointer
[    1.298438] Register r8 information: slab kmalloc-512 start c11ff400 pointer offset 64 size 512
[    1.298453] Register r9 information: zero-size pointer
[    1.298459] Register r10 information: NULL pointer
[    1.332084] Register r11 information: NULL pointer
[    1.336871] Register r12 information: non-paged memory
[    1.342004] Process swapper/0 (pid: 0, stack limit = 0x(ptrval))
[    1.348004] Stack: (0xc0d01d50 to 0xc0d02000)
[    1.352359] 1d40:                                     c04a3484 c113b080 c092766c 00000000
[    1.360528] 1d60: 0000001e c12ed000 c0d01dc0 00000018 40000006 c016a854 c1b24500 00000001
[    1.368697] 1d80: c12ed000 c092766c c12ed06c c0c5d208 c880a00c c016a9ac c12ed000 c092766c
[    1.376865] 1da0: c880a000 c016f1e4 c0d052fc c0d7a978 c880a000 c016a108 c0d052fc c046c77c
[    1.385034] 1dc0: c0c5ddfc c0d01df0 00000000 c0d01e24 c0d01e48 c0d08100 00000018 c08b8a08
[    1.393203] 1de0: c049fee4 20000113 ffffffff c0100ba8 c1228168 00000000 00000000 c0d08100
[    1.401371] 1e00: c122814c c11ff53c c1228150 c6ec7328 c0d01e48 00000040 00000018 40000006
[    1.406682] spi_master spi0: spi0.0: timeout transferring 1 bytes@100000000Hz for 110(100)ms
[    1.409540] 1e20: 0000000c c0d01e40 c0121cd8 c049fee4 20000113 ffffffff 00000051 c0d01ee8
[    1.417975] spi-nand spi0.0: SPI transfer failed: -110
[    1.426122] 1e40: c0d01e7c c0146658 00000122 c018b9ac c0d03d40 14fa0c4b 00000000 00000000
[    1.431259] spi_master spi0: failed to transfer one message from queue
[    1.439409] 1e60: 00000000 14fa0c4b 00000000 c122814c c11ff53c c1228150 c6ec7328 c0c5de40
[    1.439418] 1e80: 00000040 00000018 40000006 c0121cd8 00000000 c0d03098 00000100 c0d08100
[    1.462251] 1ea0: c0d01eb0 c0d03080 00000018 c0101384 c880a00c c0d01ee8 c0d03080 c0c5b3b0
[    1.470420] 1ec0: 0000000a c0c5de40 c0c5b324 ffff8b43 c0d03d40 04200002 c880a000 c016a108
[    1.478588] 1ee0: c0d052fc c0d08100 60000013 ffffffff c0d01f4c 00000056 c0d08100 c0c44a68
[    1.486757] 1f00: 00000000 c01221e0 c0107464 c01222a0 c0107464 c0100ba8 00000005 00000000
[    1.494926] 1f20: 00000d79 c01160c0 00000000 c0d04f0c c0d08100 c0d04f54 00000056 00000000
[    1.503094] 1f40: c0c44a68 00000000 c0d03d80 c0d01f68 c0107460 c0107464 60000013 ffffffff
[    1.511263] 1f60: 00000051 c0d04f0c 00000000 c08bfb9c 00000000 c01555b4 000000ec c0d04ec0
[    1.519432] 1f80: 10c0387d c0e1a678 00000056 c01558e8 c0d0c244 c08b8e34 c0def040 c0c00a98
[    1.527600] 1fa0: c0def040 c0c010cc ffffffff ffffffff 00000000 c0c006ec c0d08100 00000000
[    1.535769] 1fc0: 00000000 c0c44a68 14fc0d4b 00000000 00000000 c0c00420 00000051 10c0387d
[    1.543938] 1fe0: ffffffff 44000000 410fc075 10c5387d 00000000 00000000 00000000 00000000
[    1.546676] spi_master spi0: spi0.0: timeout transferring 1 bytes@100000000Hz for 110(100)ms
[    1.552111]  sun6i_dma_interrupt from __handle_irq_event_percpu+0x44/0x118
[    1.560540] spi-nand spi0.0: SPI transfer failed: -110
[    1.567388]  __handle_irq_event_percpu from handle_irq_event+0x44/0x8c
[    1.572533] spi_master spi0: failed to transfer one message from queue
[    1.579044]  handle_irq_event from handle_fasteoi_irq+0x98/0x18c
[    1.579061]  handle_fasteoi_irq from generic_handle_domain_irq+0x28/0x38
[    1.585985] 0x000000080000-0x000000800000 : "kernel"
[    1.591568]  generic_handle_domain_irq from gic_handle_irq+0x74/0x88
[    1.591587]  gic_handle_irq from generic_handle_arch_irq+0x34/0x44
[    1.591603]  generic_handle_arch_irq from __irq_svc+0x88/0xb0
[    1.621480] Exception stack(0xc0d01df0 to 0xc0d01e38)
[    1.626528] 1de0:                                     c1228168 00000000 00000000 c0d08100
[    1.634697] 1e00: c122814c c11ff53c c1228150 c6ec7328 c0d01e48 00000040 00000018 40000006
[    1.642864] 1e20: 0000000c c0d01e40 c0121cd8 c049fee4 20000113 ffffffff
[    1.649472]  __irq_svc from vchan_complete+0x30/0x21c
[    1.654532]  vchan_complete from tasklet_action_common.constprop.0+0xe0/0x108
[    1.661674]  tasklet_action_common.constprop.0 from __do_softirq+0x104/0x27c
[    1.668725]  __do_softirq from __irq_exit_rcu+0xa4/0xc8
[    1.673955]  __irq_exit_rcu from irq_exit+0x8/0x10
[    1.678751]  irq_exit from __irq_svc+0x88/0xb0
[    1.683199] Exception stack(0xc0d01f18 to 0xc0d01f60)
[    1.688245] 1f00:                                                       00000005 00000000
[    1.696414] 1f20: 00000d79 c01160c0 00000000 c0d04f0c c0d08100 c0d04f54 00000056 00000000
[    1.704582] 1f40: c0c44a68 00000000 c0d03d80 c0d01f68 c0107460 c0107464 60000013 ffffffff
[    1.706680] spi_master spi0: spi0.0: timeout transferring 1 bytes@100000000Hz for 110(100)ms
[    1.712747]  __irq_svc from arch_cpu_idle+0x38/0x3c
[    1.721188] spi-nand spi0.0: SPI transfer failed: -110
[    1.726037]  arch_cpu_idle from default_idle_call+0x24/0x34
[    1.731178] spi_master spi0: failed to transfer one message from queue
[    1.736725]  default_idle_call from do_idle+0xa4/0x120
[    1.748376]  do_idle from cpu_startup_entry+0x18/0x1c
[    1.753427]  cpu_startup_entry from rest_init+0xa8/0xac
[    1.758653]  rest_init from arch_post_acpi_subsys_init+0x0/0x8
[    1.764499] Code: e28800fc 1afffff2 ebf1f9c1 eafffff0 (e7f001f2)
[    1.770586] ---[ end trace 0000000000000000 ]---
[    1.775198] Kernel panic - not syncing: Fatal exception in interrupt
[    1.781546] CPU1: stopping
[    1.784256] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G      D            6.1.0-rc3-443875-gb466df90d48f-dirty #3
[    1.794245] Hardware name: Generic DT based system
[    1.799031]  unwind_backtrace from show_stack+0x10/0x14
[    1.804264]  show_stack from dump_stack_lvl+0x40/0x4c
[    1.809316]  dump_stack_lvl from do_handle_IPI+0xec/0x124
[    1.814716]  do_handle_IPI from ipi_handler+0x18/0x20
[    1.819768]  ipi_handler from handle_percpu_devid_irq+0x78/0x134
[    1.825775]  handle_percpu_devid_irq from generic_handle_domain_irq+0x28/0x38
[    1.832912]  generic_handle_domain_irq from gic_handle_irq+0x74/0x88
[    1.839269]  gic_handle_irq from generic_handle_arch_irq+0x34/0x44
[    1.845449]  generic_handle_arch_irq from call_with_stack+0x18/0x20
[    1.851722]  call_with_stack from __irq_svc+0x98/0xb0
[    1.856777] Exception stack(0xc8849f68 to 0xc8849fb0)
[    1.861825] 9f60:                   00000005 00000000 000012a9 c01160c0 00000001 c0d04f0c
[    1.869993] 9f80: c104ee80 c0d04f54 4000406a 410fc075 00000000 00000000 c0d03d80 c8849fb8
[    1.878160] 9fa0: c0107460 c0107464 60000013 ffffffff
[    1.883204]  __irq_svc from arch_cpu_idle+0x38/0x3c
[    1.888087]  arch_cpu_idle from default_idle_call+0x24/0x34
[    1.893666]  default_idle_call from do_idle+0xa4/0x120
[    1.898807]  do_idle from cpu_startup_entry+0x18/0x1c
[    1.903858]  cpu_startup_entry from secondary_start_kernel+0x118/0x120
[    1.910376]  secondary_start_kernel from 0x401015a0
[    1.915261] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---

离线

#19 2023-11-22 10:38:04

ueiia
会员
注册时间: 2021-04-30
已发帖子: 29
积分: 12

Re: 在wsl下开发T113的主线linux(最新gcc+awboot+最新kernel+最新buildroot)

为什么我的SPI驱动总是跑不起来,像是没认到芯片的SPI外设,不管用D1的内核,还是主线最新内核,都没办法识别SPINAND,只有AWBOOT预编译的zImage能识别SPINAND,而且我的DTB文件也没换,感觉就是内核哪里配置不对,有大佬能帮忙分析分析吗

离线

#20 2023-11-22 10:40:46

ueiia
会员
注册时间: 2021-04-30
已发帖子: 29
积分: 12

Re: 在wsl下开发T113的主线linux(最新gcc+awboot+最新kernel+最新buildroot)

@ueiia
而且我用的就是内核自带的sunxi_defconfig后面再加两行楼主的代码,没有用其他的配置文件

离线

#21 2023-12-22 10:34:56

bigzhu
会员
注册时间: 2023-08-30
已发帖子: 22
积分: 13

Re: 在wsl下开发T113的主线linux(最新gcc+awboot+最新kernel+最新buildroot)

主线linux很多外设没有驱动,现阶段只能玩玩了

离线

#22 2023-12-27 14:38:21

暗水天狼
会员
注册时间: 2023-04-15
已发帖子: 12
积分: 12

Re: 在wsl下开发T113的主线linux(最新gcc+awboot+最新kernel+最新buildroot)

@erbuziren
大佬问题解决了吗?我也遇到了你类似的问题,我的原理图如下:
QQ图片20231227143313_20231227-1434.png
QQ图片20231227143540.png

设备树:
&mdio {
    ext_rmii_phy: ethernet-phy@1 {
        compatible = "ethernet-phy-ieee802.3-c22";
        reg = <1>;
    };
};

&emac {
    use_ephy25m = <1>;
    pinctrl-0 = <&rmii_pg_pins>;
    pinctrl-names = "default";
    phy-handle = <&ext_rmii_phy>;
    phy-mode = "rmii";
    phy-supply = <&reg_3v3>;
    phy-rst = <&pio 6 6 GPIO_ACTIVE_HIGH>;
    tx-delay = <7>; /*2~4*/
    rx-delay = <31>;
    status = "okay";
};

&pio {
    i2c2_pd_pins: i2c2-pd-pins {
        pins = "PE12", "PE13";
        function = "i2c2";
    };

    rmii_pg_pins: rmii-pg-pins {
        pins = "PG0", "PG1", "PG2", "PG3", "PG4",
            "PG5", "PG11", "PG12", "PG13", "PG14", "PG15";
        function = "emac";
    };
};

调试情况:
QQ图片20231227143743.png

最近编辑记录 暗水天狼 (2023-12-27 14:39:00)

离线

#23 2024-01-04 10:15:07

actionmask
会员
注册时间: 2018-03-23
已发帖子: 6
积分: 6

Re: 在wsl下开发T113的主线linux(最新gcc+awboot+最新kernel+最新buildroot)

請教awboot 支援spi nor flash 開機load linux image嗎?

目前看都只有針對Spinand的部分作處理?

离线

#24 2024-03-12 09:44:49

jinlong631
会员
注册时间: 2021-05-22
已发帖子: 42
积分: 11

Re: 在wsl下开发T113的主线linux(最新gcc+awboot+最新kernel+最新buildroot)

大佬您好 我是win11 +WSL1+vscode 用vscode打开wsl下的文件时提示不支持wsl1,您遇到这个问题了吗?

离线

#25 2024-03-12 09:50:40

dsp2000
会员
注册时间: 2024-01-21
已发帖子: 25
积分: 0

Re: 在wsl下开发T113的主线linux(最新gcc+awboot+最新kernel+最新buildroot)

spi-boot.img是使用 mkimage生成的吗?

离线

#26 2024-03-15 17:42:05

dsp2000
会员
注册时间: 2024-01-21
已发帖子: 25
积分: 0

Re: 在wsl下开发T113的主线linux(最新gcc+awboot+最新kernel+最新buildroot)

内核的编译也是使用arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-linux-gnueabihf.tar.xz吗?好像很多出错啊

离线

#27 2024-03-18 18:51:49

dsp2000
会员
注册时间: 2024-01-21
已发帖子: 25
积分: 0

Re: 在wsl下开发T113的主线linux(最新gcc+awboot+最新kernel+最新buildroot)

发现4.12.1编译出来的zImage小很多啊,是不是不一定要最新的版本呢?

离线

#28 2024-03-21 14:40:26

WhyCan_dev_pp
会员
注册时间: 2024-03-21
已发帖子: 8
积分: 3

Re: 在wsl下开发T113的主线linux(最新gcc+awboot+最新kernel+最新buildroot)

这颗IC有用官方Meils 系统的么?

离线

页脚

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

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