您尚未登录。

楼主 # 2022-12-06 16:37:03

twzy
会员
注册时间: 2021-04-16
已发帖子: 204
积分: 351.5
个人网站

T113-S3主线Linux支持方案(基于TF卡,包含串口修改)

原贴在这里
https://bbs.aw-ol.com/topic/2338/mangopi-dual-t113-%E4%B8%BB%E7%BA%BF%E5%86%85%E6%A0%B8%E7%BC%96%E8%AF%91%E8%AE%B0%E5%BD%95
感谢Evlers大佬的付出。

需要注意的是:本篇是基于所用的引导的是AWboot 而非传统的uboot-spl方式,并且是该AWboot是专为T113-S3而构建的引导。

1 . 配置AWboot编译环境
   AWboot需要用到arm-none-eabi-的交叉编译工具,我这里使用到的是 gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2
   下载地址:https://developer.arm.com/downloads/-/gnu-rm
   接下来配置编译环境
   

# 解压
tar -vxjf gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2

# 创建目录
sudo mkdir /usr/local/arm-none-eabi

# 进入解压目录下
cd gcc-arm-none-eabi-10.3-2021.10-x86_64-linux/
# 将该目录下的所有文件复制到新建的目录下
sudo cp -rd * /usr/local/arm-none-eabi/


# 最后需要添加该工具链的环境变量使其可以在任何目录下执行,打开/etc/profile文件
sudo nano /etc/profile

# 在文件末尾添加以下内容
PATH=$PATH:/usr/local/arm-linux-gcc/bin

# 添加完毕,使路径立即生效可以使用如下命令
source /etc/profile

# 接下来在终端输入
 arm-none-eabi-
#按两次tab键进行验证
 

2 . 编译AWboot

# 下拉 awboot
git clone https://github.com/szemzoa/awboot
cd awboot

# 制作编译工具
cd tools
gcc mksunxi.c -o mksunxi


# 修改 Makefile 中的 /bin/expr 为 /usr/bin/expr
@/usr/bin/expr `/bin/cat .build_revision` + 1 > .build_revision
	
# 编译 awboot
make

如果文件夹下awboot下生成了:awboot-boot-sd.bin则表示工作正常了。

3 . 修改串口配置
  AWboot 默认使用UART5作为串口调试,但是因为墨云的板子使用的是UART3,所以需要进行一些调整,好在代码比较简单,进行如下修改:
  修改awboot目录下的board.cs文件,修改如图
  1.png
  需要注意base参数可以通过t113-s3用户手册查询到
  0x02500c00 为UART3 的地址
  还有就是对awboot/linux/sun8i-t113.dtsi、awboot/linux/sun8i-t113-snailpi-dual.dts 的修改
  主要是增加UART3 设备树配置和 BootArgs的配置,就是类似Uboot中BootArgs的配置:
  修改细微处较多,这里直接给文件吧

  awboot_sun8i-t113.zip
  awboot/linux/sun8i-t113.dtsi
  中pio节点下增加

	uart3_pb6_pins: uart3-pb6-pins {
				pins = "PB6", "PB7";
				function = "uart3";
			};

awboot/linux/sun8i-t113-snailpi-dual.dts
最后增加

&uart3 {
	pinctrl-0 = <&uart3_pb6_pins>;
	pinctrl-names = "default";
	status = "okay";
};

修改 aliases

	aliases {
		//ethernet0 = &rtl8189f;
		mmc0 = &mmc0;
		serial1 = &uart1;
		serial3 = &uart3;
		//serial5 = &uart5;
	};

修改chosen (这个地方就是用来指定类似uboot中bootargs的地方)

        chosen {
		stdout-path = "serial3:115200n8";
/*
                bootargs = "mem=128M cma=72M root=/dev/mmcblk0p2 rw init=/sbin/init rootwait earlyprintk=sunxi-uart,0x02500c00 console=tty0 console=ttyS5,115200";
*/
                bootargs = "mem=128M cma=64M root=/dev/mmcblk0p2 rw init=/sbin/init rootwait console=tty0 console=ttyS3,115200 earlyprintk=sunxi-uart,0x02500c00";
        };

最后一个就是类似uboot指定zimage和设备树的地方
2.png
因为该项目是特定版本,所以只是单纯的指定名称,不用指定要写入内存的位置。

写入TF卡:

sudo dd if=awboot-boot-sd.bin of=/dev/sdb bs=1024 seek=8

最后是执行结果
3.png
本篇结束

内核部分可以先看前面的原贴,墨云稍后更新。

最近编辑记录 twzy (2022-12-06 16:46:53)

离线

楼主 #1 2022-12-06 17:13:47

twzy
会员
注册时间: 2021-04-16
已发帖子: 204
积分: 351.5
个人网站

Re: T113-S3主线Linux支持方案(基于TF卡,包含串口修改)

内核编译
   可以直接找大佬修改好的主线稳定版内核(带WiFi):Linux-6.0.1https://github.com/Evlers/linux_kernel_t113
   也选择去官网下载内核:kernel https://kernel.org/
   修改 kernel.org 下载的内核源代码(墨云直接使用的是大佬修改后的代码,所以这部分没验证) :

# 修改 drivers/clk/sunxi-ng/Kconfig 文件
 config SUN20I_D1_CCU
 	tristate "Support for the Allwinner D1 CCU"
 	default RISCV && ARCH_SUNXI
-	depends on (RISCV && ARCH_SUNXI) || COMPILE_TEST
+	depends on (ARCH_SUNXI) || COMPILE_TEST
 
 config SUN20I_D1_R_CCU
 	tristate "Support for the Allwinner D1 PRCM CCU"
 	default RISCV && ARCH_SUNXI
-	depends on (RISCV && ARCH_SUNXI) || COMPILE_TEST
+	depends on (ARCH_SUNXI) || COMPILE_TEST

# 修改 drivers/clk/sunxi-ng/ccu-sun20i-d1.c 文件
 static SUNXI_CCU_MUX_DATA(cpux_clk, "cpux", cpux_parents,
-			  0x500, 24, 3, CLK_SET_RATE_PARENT);
+			  0x500, 24, 3, CLK_SET_RATE_PARENT | CLK_IS_CRITICAL);

# 修改 arch/arm/mach-sunxi/platsmp.c 文件,在末尾添加以下内容
static int sun8i_t113_smp_boot_secondary(unsigned int cpu,
				    struct task_struct *idle)
{
    u32 reg;
    void __iomem *cpucfg_membase = ioremap(0x09010000, 0x10);
    void __iomem *cpuexec_membase[] = {ioremap(0x070005C4, 0x10),ioremap(0x070005C8, 0x10)};

	if (cpu != 1)
	    return 0;

	spin_lock(&cpu_lock);

	/* Set CPU boot address */
	writel(__pa_symbol(secondary_startup),	cpuexec_membase[cpu]);

	/* Deassert the CPU core reset */
	reg = readl(cpucfg_membase);
	writel(reg | BIT(cpu), cpucfg_membase);

	spin_unlock(&cpu_lock);

	return 0;
}

static const struct smp_operations sun8i_t113_smp_ops __initconst = {
	.smp_boot_secondary	= sun8i_t113_smp_boot_secondary,
};
CPU_METHOD_OF_DECLARE(sun8i_t113_smp, "allwinner,sun8iw20p1", &sun8i_t113_smp_ops);

配置内核
  在内核根目录修改Makefile

  ARCH = arm 
  CROSS_COMPILE = arm-linux-gnueabihf-

配置默认编译规则

 make sunxi_defconfig

打开配置菜单

 make sunxi_defconfig menuconfig

打开芯片时钟支持:

> Device Drivers 
	> Common Clock Framework
		<*>   Clock support for Allwinner SoCs
			<*>     Support for the Allwinner D1 CCU 
			<*>     Support for the Allwinner D1 PRCM CCU

添加设备树
  将设备树添加到内核 arch/arm/boot/dts/ 目录中:sun8i-t113-snailpi-dual.dts sun8i-t113.dtsi (如果下载了大佬的Linux内核,就有这些文件,需要注意的是原版是 sun8i-t113-mangopi-dual.dts)
  linux-sun8i-t113.zip
  并在该目录 Makefile 文件中的CONFIG_MACH_SUN8I下添加改设备树文件:

dtb-$(CONFIG_MACH_SUN8I) += \
	sun8i-a23-evb.dtb \
	sun8i-a23-gt90h-v4.dtb \
	sun8i-a23-inet86dz.dtb \
	.....................
	sun8i-v3s-licheepi-zero-dock.dtb \
	sun8i-v40-bananapi-m2-berry.dtb \
	sun8i-t113-snailpi-dual.dtb

接下来就是正常编译

make

如果遇到

FATAL ERROR: MPC.H: 没有那个文件或目录

安装如下组件

sudo apt-get install libmpc-dev

接下来就是分区复制编译好的文件即可,这里不做赘述。
结合我们很久以前制作的Debian文件系统,那只熟悉的蜗牛又回来啦。

QQ图片20221206120716.png

感谢阅读
-----------------------------
这里再次感谢Evlers大佬的付出,本篇为拾人牙慧之作,如果其中内容涉及侵权之类的,请告知墨云,墨云会在得到信息的时候删除。

离线

楼主 #3 2022-12-08 11:14:38

twzy
会员
注册时间: 2021-04-16
已发帖子: 204
积分: 351.5
个人网站

Re: T113-S3主线Linux支持方案(基于TF卡,包含串口修改)

尝试调试WIFI,发现mmc1 初始化失败

sunxi-mmc 4021000.mmc: no support for card's volts
mmc1: error -22 whilst initialising SDIO card
……

QQ截图20221208110232.png

设备树

// 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 = "SnailPi MQ-Dual";
	compatible = "allwinner,sun20i-d1", "allwinner,sun8i";

	aliases {
		//ethernet0 = &emac;
		mmc0 = &mmc0;
		//mmc1 = &mmc1;
		serial3 = &uart3;
	};

	chosen {
		stdout-path = "serial3:115200n8";
		bootargs = "mem=128M cma=72M root=/dev/mmcblk0p2 rw init=/sbin/init rootwait console=tty0 console=ttyS3,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>;
	};


	dmic_codec: dmic-codec {
		compatible = "dmic-codec";
		num-channels = <2>;
		#sound-dai-cells = <0>;
	};

	dmic-sound {
		compatible = "simple-audio-card";
		#address-cells = <1>;
		#size-cells = <0>;

		simple-audio-card,dai-link@0 {
			format = "pdm";
			frame-master = <&link0_cpu>;
			bitclock-master = <&link0_cpu>;

			link0_cpu: cpu {
				sound-dai = <&dmic>;
			};

			link0_codec: codec {
				sound-dai = <&dmic_codec>;
			};
		};
	};

	leds {
		compatible = "gpio-leds";
		status_led {
			linux,default-trigger = "heartbeat";
			label = "blue:status";
			gpios = <&pio 3 22 GPIO_ACTIVE_HIGH>; //pd22
		};
	};


	wifi_pwrseq: wifi-pwrseq {
		compatible = "mmc-pwrseq-simple";
		reset-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
		//pinctrl-0 = <&wifi_en_pin>;
		pinctrl-names = "default";

		clocks = <&ccu CLK_FANOUT1>;
		clock-names = "ext_clock";
		assigned-clocks = <&ccu CLK_FANOUT1>;
		assigned-clock-rates = <32768>;
		pinctrl-0 = <&clk_pg11_pin>;
	};

};

&reg_aldo {
	regulator-min-microvolt = <1800000>;
	regulator-max-microvolt = <1800000>;
	vdd33-supply = <&reg_vcc_3v3>;
};

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

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

&wdt {
	status = "okay";
};

&ve {
	status = "disabled";
};

// &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>;


	uart3_pb6_pins: uart3-pb6-pins {
	    pins = "PB6", "PB7";
	    function = "uart3";
	};

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

	wifi_en_pin: wifi_en_pin {
		pins = "PG12";
		function = "gpio_out";
	};

	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 = "disabled";

        /* XR829 bluetooth is connected here */
};

&uart3 {
	pinctrl-0 = <&uart3_pb6_pins>;
	pinctrl-names = "default";
	status = "okay";
};

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

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

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

&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";
};

&mmc1 {
	bus-width = <4>;
	mmc-pwrseq = <&wifi_pwrseq>;
	non-removable;
	//broken-cd;
	vmmc-supply = <&reg_vcc_3v3>;
	vqmmc-supply = <&reg_vcc_3v3>;
	pinctrl-0 = <&mmc1_pins>;
	pinctrl-names = "default";
	status = "okay";

	brcmf: sdio_wifi@1 {
			reg = <1>;
			compatible = "brcm,bcm4329-fmac";
			interrupt-parent = <&pio>;
			interrupts = <6 10 IRQ_TYPE_LEVEL_HIGH>; /* PG10 */
			interrupt-names = "host-wake";
	};
};

// &codec {
// 	routing = "Headphone Jack", "HPOUTL",
// 		      "Headphone Jack", "HPOUTR",
// 		      "Headset Microphone", "MICIN3"; 

// /*		  "LINEINL", "HPOUTL",
// 		      "LINEINR", "HPOUTR";
// */
// 	widgets = "Microphone", "Headset Microphone",
// 		  "Headphone", "Headphone Jack";
// 	status = "disabled";
// };

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

&ehci0 {
	status = "okay";
};

&dmic {
	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 = <&rgmii_pe_pins>;
	pinctrl-names = "default";
	phy-handle = <&ext_rgmii_phy>;
	phy-mode = "rgmii-id";
	phy-supply = <&reg_vcc_3v3>;
	status = "disabled";
};

/*
&can0 {
	pinctrl-names = "default";
	pinctrl-0 = <&can0_pins>;
	status = "disabled";
};

&can1 {
	pinctrl-names = "default";
	pinctrl-0 = <&can1_pins>;
	status = "disabled";
};
*/

原理图
QQ截图20221208110623.png
QQ截图20221208110610.png

但是我挂的模组是Ap6212A
_20221208111307.jpg
是不是我这样乱搞,导致起不来的?

离线

#4 2022-12-08 12:09:48

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

Re: T113-S3主线Linux支持方案(基于TF卡,包含串口修改)

@twzy
先检查供电和wl_reg, wl_wake引脚电平

还有ap系列需要外挂32k晶振





离线

楼主 #5 2022-12-08 15:56:17

twzy
会员
注册时间: 2021-04-16
已发帖子: 204
积分: 351.5
个人网站

Re: T113-S3主线Linux支持方案(基于TF卡,包含串口修改)

哇酷小二 说:

@twzy
先检查供电和wl_reg, wl_wake引脚电平

还有ap系列需要外挂32k晶振

多谢,受教了,看来还得换成rtl的

离线

#6 2022-12-09 22:33:33

剑气冲天
会员
注册时间: 2022-12-09
已发帖子: 6
积分: 31

Re: T113-S3主线Linux支持方案(基于TF卡,包含串口修改)

awboot支持直接从ddr中加载镜像吗?

离线

楼主 #7 2022-12-10 08:45:47

twzy
会员
注册时间: 2021-04-16
已发帖子: 204
积分: 351.5
个人网站

Re: T113-S3主线Linux支持方案(基于TF卡,包含串口修改)

剑气冲天 说:

awboot支持直接从ddr中加载镜像吗?

没有,就是针对spi、tf的几种引导方式

离线

#8 2023-01-05 11:15:17

touchey
会员
注册时间: 2020-05-18
已发帖子: 143
积分: 16

Re: T113-S3主线Linux支持方案(基于TF卡,包含串口修改)

为啥不用RTL8189模组呢?8723的蓝牙实际用的不多吧

离线

#9 2023-06-11 18:56:42

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

Re: T113-S3主线Linux支持方案(基于TF卡,包含串口修改)

linux5.4内核能引导吗,这边用linux5.4内核及设备树,starting kernel就没有了

离线

#10 2023-06-12 08:58:11

1847123212
会员
注册时间: 2019-11-21
已发帖子: 69
积分: 45

Re: T113-S3主线Linux支持方案(基于TF卡,包含串口修改)

问下楼主,有现成的带debian的镜像可以提供嘛?

离线

#12 2023-08-04 14:55:12

hh8582
会员
注册时间: 2023-08-04
已发帖子: 3
积分: 10

Re: T113-S3主线Linux支持方案(基于TF卡,包含串口修改)

有没有扩展MMC呢,可以运行QT程序吗

离线

#14 2023-09-13 23:28:08

doudou167
会员
注册时间: 2021-02-26
已发帖子: 1
积分: 1

Re: T113-S3主线Linux支持方案(基于TF卡,包含串口修改)

T113和R528的本质区别是啥?貌似没有说明清楚啊 。最进想用这个方案做中控屏,不了解。有点慌

离线

#15 2023-09-14 08:25:42

webb_2002
会员
注册时间: 2021-01-25
已发帖子: 97
积分: 58

Re: T113-S3主线Linux支持方案(基于TF卡,包含串口修改)

hh8582 说:

有没有扩展MMC呢,可以运行QT程序吗

可以挂eMMC,但是4bit模式,运行Qt很流畅(Qt4.8.6)

离线

#16 2023-09-16 12:20:59

madfrogcc
会员
注册时间: 2023-09-16
已发帖子: 1
积分: 1

Re: T113-S3主线Linux支持方案(基于TF卡,包含串口修改)

同问:


linux5.4内核能引导吗,这边用linux5.4内核及设备树,starting kernel就没有了

离线

#17 2023-10-29 22:07:43

a1211762993
会员
注册时间: 2020-03-07
已发帖子: 22
积分: 52

Re: T113-S3主线Linux支持方案(基于TF卡,包含串口修改)

[I] AWBoot r13 starting...
[I] SMHC: sdhci0 controller v50310 initialized
[I] SHMC: SD card detected
[W] SMHC: error 0x80 status 0x24
[W] SMHC: data timeout
[W] SMHC: read failed
[W] FATFS: MMC read 0/16384 blocks
[E] FATFS: mount error: 1
[W] SMHC: loading failed, trying SPI

在SD卡zImage和dtb已经拷贝至FAT32分区,不知道为什么无法加载内核

离线

#18 2023-11-20 15:37:12

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

Re: T113-S3主线Linux支持方案(基于TF卡,包含串口修改)

想用AWBOOT来加速启动,发现加载完zImage之后就卡住了,感觉内核没有起来,没有调试信息完全没有头绪啊

离线

#19 2024-01-05 17:19:54

zm
会员
注册时间: 2023-09-28
已发帖子: 9
积分: 25

Re: T113-S3主线Linux支持方案(基于TF卡,包含串口修改)

[I] AWBoot r6164 starting...
[D] DRAM BOOT DRIVE INFO: V0.24
[D] DRAM CLK = 792 MHz
[D] DRAM Type = 3 (2:DDR2,3:DDR3)
[D] DRAMC read ODT off
[D] ZQ value = 0x2f
[D] DDR efuse: 0xa
[D] chip id efuse: 0x6000
[D] single rank and full DQ
[D] DDR efuse: 0xa
[D] chip id efuse: 0x6000
[D] rank 0 row = 13
[D] para->dram_para1 = 0x10d2
[D] rank 0 bank = 8
[D] para->dram_para1 = 0x10d2
[D] rank 0 page size = 2 KB
[D] para->dram_para1 = 0x10d2
[D] DRAM ODT value: 0x42
[D] DDR efuse: 0xa
[D] chip id efuse: 0x6000
[D] DRAM: size = 128MB
[D] DRAM: simple test OK
[I] SMHC: sdhci0 controller v50310 initialized
[D] SMHC: capacity 31.3GB
[I] SHMC: SD card detected
[D] SDMMC: speedtest 512KB in 27ms at 19418KB/S
[I] FATFS: cache: 67108864 bytes in 2048 chunks
[D] FATFS: mount OK
[I] FATFS: read sun8i-t113-mangopi-dual.dtb addr=44000000
[D] FATFS: read in 5ms at 4.56MB/S
[I] FATFS: read zImage addr=44800000
[D] FATFS: read in 376ms at 13.11MB/S
[D] FATFS: unmount OK
[D] FATFS: done in 410ms
[I] booting linux...
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 6.0.1-gd7d8c971c9c5-dirty (ubuntu@ubuntu1804) (arm-none-linux-gnueabihf-gcc (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 10.3.1 20210621, GNU ld (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 2.36.1.20210621) #2 SMP Fri Jan 5 02:05:12 EST 2024
[    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: Failed to reserve 72 MiB
[    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 s15508 r8192 d21356 u45056
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: mem=128M cma=72M root=/dev/mmcblk0p2 init=/sbin/init rootwait console=tty0 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:off, heap alloc:off, heap free:off
[    0.000000] Memory: 116236K/131072K available (8192K kernel code, 942K rwdata, 2092K rodata, 1024K init, 263K bss, 14836K reserved, 0K 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.000193] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000688] Console: colour dummy device 80x30
[    0.001005] printk: console [tty0] enabled
[    0.001048] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.001078] pid_max: default: 32768 minimum: 301
[    0.001234] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001268] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001811] CPU: Testing write buffer coherency: ok
[    0.002137] /cpus/cpu@0 missing clock-frequency property
[    0.002189] /cpus/cpu@1 missing clock-frequency property
[    0.002209] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.002969] Setting up static identity map for 0x40100000 - 0x40100060
[    0.003140] rcu: Hierarchical SRCU implementation.
[    0.003159] rcu:     Max phase no-delay instances is 1000.
[    0.003682] smp: Bringing up secondary CPUs ...
[    0.004393] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.004514] smp: Brought up 1 node, 2 CPUs
[    0.004557] SMP: Total of 2 processors activated (96.00 BogoMIPS).
[    0.004574] CPU: All CPU(s) started in SVC mode.
[    0.005094] devtmpfs: initialized
[    0.009148] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.009372] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.009414] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.009566] pinctrl core: initialized pinctrl subsystem
[    0.010871] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.011180] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.011964] thermal_sys: Registered thermal governor 'step_wise'
[    0.012201] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.012250] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.019770] platform 5460000.tcon-top: Fixing up cyclic dependency with 5200000.mixer
[    0.019877] platform 5460000.tcon-top: Fixing up cyclic dependency with 5100000.mixer
[    0.020253] platform 5461000.lcd-controller: Fixing up cyclic dependency with 5460000.tcon-top
[    0.020635] platform 5470000.lcd-controller: Fixing up cyclic dependency with 5604000.tv-encoder
[    0.020726] platform 5470000.lcd-controller: Fixing up cyclic dependency with 5460000.tcon-top
[    0.021497] platform 7090000.rtc: Fixing up cyclic dependency with 7010000.clock-controller
[    0.031379] SCSI subsystem initialized
[    0.031878] usbcore: registered new interface driver usbfs
[    0.031937] usbcore: registered new interface driver hub
[    0.031987] usbcore: registered new device driver usb
[    0.032200] mc: Linux media interface: v0.10
[    0.032257] videodev: Linux video capture interface: v2.00
[    0.032339] pps_core: LinuxPPS API ver. 1 registered
[    0.032356] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.032387] PTP clock support registered
[    0.032821] Advanced Linux Sound Architecture Driver Initialized.
[    0.033988] clocksource: Switched to clocksource arch_sys_counter
[    0.041554] NET: Registered PF_INET protocol family
[    0.041781] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.042324] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.042372] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.042395] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.042424] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.042454] TCP: Hash tables configured (established 1024 bind 1024)
[    0.042548] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.042595] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.042760] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.043304] RPC: Registered named UNIX socket transport module.
[    0.043346] RPC: Registered udp transport module.
[    0.043359] RPC: Registered tcp transport module.
[    0.043371] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.044470] Initialise system trusted keyrings
[    0.044768] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    0.049500] NFS: Registering the id_resolver key type
[    0.049592] Key type id_resolver registered
[    0.049608] Key type id_legacy registered
[    0.049657] Key type asymmetric registered
[    0.049671] Asymmetric key parser 'x509' registered
[    0.049813] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    0.049838] io scheduler mq-deadline registered
[    0.049851] io scheduler kyber registered
[    0.105846] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.115337] CAN device driver interface
[    0.116088] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.116115] ehci-platform: EHCI generic platform driver
[    0.116255] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.116288] ohci-platform: OHCI generic platform driver
[    0.118701] sun6i-rtc 7090000.rtc: registered as rtc0
[    0.118848] sun6i-rtc 7090000.rtc: setting system clock to 1970-01-02T00:26:48 UTC (88008)
[    0.119003] sun6i-rtc 7090000.rtc: RTC enabled
[    0.119351] i2c_dev: i2c /dev entries driver
[    0.121104] sunxi-wdt 20500a0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    0.122268] sun8i-ce 3040000.crypto: Set mod clock to 300000000 (300 Mhz) from 400000000 (400 Mhz)
[    0.122628] sun8i-ce 3040000.crypto: will run requests pump with realtime priority
[    0.122833] sun8i-ce 3040000.crypto: will run requests pump with realtime priority
[    0.122988] sun8i-ce 3040000.crypto: will run requests pump with realtime priority
[    0.123132] sun8i-ce 3040000.crypto: will run requests pump with realtime priority
[    0.123238] sun8i-ce 3040000.crypto: Register cbc(aes)
[    0.123272] sun8i-ce 3040000.crypto: Register ecb(aes)
[    0.123292] sun8i-ce 3040000.crypto: Register cbc(des3_ede)
[    0.123311] sun8i-ce 3040000.crypto: Register ecb(des3_ede)
[    0.123349] sun8i-ce 3040000.crypto: CryptoEngine Die ID 0
[    0.124270] usbcore: registered new interface driver usbhid
[    0.124303] usbhid: USB HID core driver
[    0.126913] NET: Registered PF_PACKET protocol family
[    0.126969] can: controller area network core
[    0.127047] NET: Registered PF_CAN protocol family
[    0.127066] can: raw protocol
[    0.127080] can: broadcast manager protocol
[    0.127096] can: netlink gateway - max_hops=1
[    0.127292] Key type dns_resolver registered
[    0.127392] Registering SWP/SWPB emulation handler
[    0.127509] Loading compiled-in X.509 certificates
[    0.145500] sun20i-d1-pinctrl 2000000.pinctrl: initialized sunXi PIO driver
[    0.146729] printk: console [ttyS0] disabled
[    0.167029] 2500000.serial: ttyS0 at MMIO 0x2500000 (irq = 231, base_baud = 1500000) is a 16550A
[    1.024542] printk: console [ttyS0] enabled
[    1.050535] 2500400.serial: ttyS1 at MMIO 0x2500400 (irq = 232, base_baud = 1500000) is a 16550A
[    1.080993] 2501400.serial: ttyS5 at MMIO 0x2501400 (irq = 233, base_baud = 1500000) is a 16550A
[    1.091842] phy phy-4100400.phy.0: Changing dr_mode to 1
[    1.092957] usb_phy_generic usb_phy_generic.1.auto: dummy supplies not allowed for exclusive requests
[    1.097242] ehci-platform 4101000.usb: EHCI Host Controller
[    1.106989] musb-hdrc musb-hdrc.2.auto: MUSB HDRC host driver
[    1.112012] ehci-platform 4101000.usb: new USB bus registered, assigned bus number 1
[    1.117774] musb-hdrc musb-hdrc.2.auto: new USB bus registered, assigned bus number 2
[    1.118548] hub 2-0:1.0: USB hub found
[    1.125647] ehci-platform 4101000.usb: irq 234, io mem 0x04101000
[    1.133409] hub 2-0:1.0: 1 port detected
[    1.148079] ehci-platform 4200000.usb: EHCI Host Controller
[    1.153704] ehci-platform 4200000.usb: new USB bus registered, assigned bus number 3
[    1.161599] ehci-platform 4200000.usb: irq 236, io mem 0x04200000
[    1.165698] ohci-platform 4200400.usb: Generic Platform OHCI controller
[    1.167811] ehci-platform 4101000.usb: USB 2.0 started, EHCI 1.00
[    1.174363] ohci-platform 4200400.usb: new USB bus registered, assigned bus number 4
[    1.188339] ohci-platform 4200400.usb: irq 238, io mem 0x04200400
[    1.188599] hub 1-0:1.0: USB hub found
[    1.198400] hub 1-0:1.0: 1 port detected
[    1.202061] sunxi-mmc 4020000.mmc: Got CD GPIO
[    1.204038] ehci-platform 4200000.usb: USB 2.0 started, EHCI 1.00
[    1.213570] ALSA device list:
[    1.216623]   No soundcards found.
[    1.220762] sunxi-mmc 4021000.mmc: allocated mmc-pwrseq
[    1.226790] hub 3-0:1.0: USB hub found
[    1.230607] hub 3-0:1.0: 1 port detected
[    1.234985] sunxi-mmc 4020000.mmc: initialized, max. request size: 2048 KB, uses new timings mode
[    1.251381] sunxi-mmc 4021000.mmc: initialized, max. request size: 2048 KB, uses new timings mode
[    1.268605] sunxi-mmc 4021000.mmc: card claims to support voltages below defined range
[    1.268682] hub 4-0:1.0: USB hub found
[    1.280411] hub 4-0:1.0: 1 port detected
[    1.296327] mmc1: new high speed SDIO card at address 0001
[    1.320603] mmc0: new high speed SDHC card at address 0001
[    1.327003] mmcblk0: mmc0:0001 SD32G 29.1 GiB
[    1.334080]  mmcblk0: p1
[    1.354077] ohci-platform 4101400.usb: Generic Platform OHCI controller
[    1.360746] ohci-platform 4101400.usb: new USB bus registered, assigned bus number 5
[    1.368675] ohci-platform 4101400.usb: irq 237, io mem 0x04101400
[    1.448679] hub 5-0:1.0: USB hub found
[    1.452488] hub 5-0:1.0: 1 port detected
[    1.457665] /dev/root: Can't open blockdev
[    1.461805] VFS: Cannot open root device "mmcblk0p2" or unknown-block(179,2): error -6
[    1.469764] Please append a correct "root=" boot option; here are the available partitions:
[    1.478143] b300        30534656 mmcblk0
[    1.478152]  driver: mmcblk
[    1.484977]   b301         8387584 mmcblk0p1 a76cc5e4-01
[    1.484986]
[    1.491795] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)
[    1.500235] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 6.0.1-gd7d8c971c9c5-dirty #2
[    1.507808] Hardware name: Generic DT based system
[    1.512609]  unwind_backtrace from show_stack+0x10/0x14
[    1.517851]  show_stack from dump_stack_lvl+0x40/0x4c
[    1.522913]  dump_stack_lvl from panic+0x100/0x304
[    1.527717]  panic from mount_block_root+0x15c/0x1f8
[    1.532696]  mount_block_root from prepare_namespace+0x150/0x18c
[    1.538713]  prepare_namespace from kernel_init+0x18/0x12c
[    1.544211]  kernel_init from ret_from_fork+0x14/0x2c
[    1.549274] Exception stack(0xc8815fb0 to 0xc8815ff8)
[    1.554330] 5fa0:                                     00000000 00000000 00000000 00000000
[    1.562510] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    1.570689] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[    1.577308] CPU0: stopping
[    1.580016] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.0.1-gd7d8c971c9c5-dirty #2
[    1.587577] Hardware name: Generic DT based system
[    1.592363]  unwind_backtrace from show_stack+0x10/0x14
[    1.597589]  show_stack from dump_stack_lvl+0x40/0x4c
[    1.602640]  dump_stack_lvl from do_handle_IPI+0xec/0x124
[    1.608038]  do_handle_IPI from ipi_handler+0x18/0x20
[    1.613089]  ipi_handler from handle_percpu_devid_irq+0x78/0x13c
[    1.619096]  handle_percpu_devid_irq from generic_handle_domain_irq+0x28/0x38
[    1.626230]  generic_handle_domain_irq from gic_handle_irq+0x74/0x88
[    1.632584]  gic_handle_irq from generic_handle_arch_irq+0x34/0x44
[    1.638765]  generic_handle_arch_irq from __irq_svc+0x88/0xb0
[    1.644509] Exception stack(0xc0d01f10 to 0xc0d01f58)
[    1.649556] 1f00:                                     00000005 00000000 000014a1 c0115ee0
[    1.657723] 1f20: 00000000 c0d04f0c c0d080c0 c0d04f54 c0de6b04 c0a390e8 00000001 00000000
[    1.665890] 1f40: 00000118 c0d01f60 c01072a0 c01072a4 60000013 ffffffff
[    1.672495]  __irq_svc from arch_cpu_idle+0x38/0x3c
[    1.677374]  arch_cpu_idle from default_idle_call+0x24/0x34
[    1.682947]  default_idle_call from do_idle+0xb8/0x124
[    1.688085]  do_idle from cpu_startup_entry+0x18/0x1c
[    1.693134]  cpu_startup_entry from rest_init+0xa8/0xac
[    1.698351]  rest_init from arch_post_acpi_subsys_init+0x0/0x8
[    1.704375] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2) ]---

我只放了dtb和zImage,这个报错是因为没有文件系统的原因吗?楼主能出一个制作文件系统的贴子吗?想学习一下

离线

楼主 #20 2024-03-04 08:51:08

twzy
会员
注册时间: 2021-04-16
已发帖子: 204
积分: 351.5
个人网站

Re: T113-S3主线Linux支持方案(基于TF卡,包含串口修改)

离线

#22 2024-03-15 17:44:17

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

Re: T113-S3主线Linux支持方案(基于TF卡,包含串口修改)

内核的编译也是使用gcc-arm-none-eabi-10.3-2021.10-x86_64-linux吗?好像是  CROSS_COMPILE = arm-linux-gnueabihf-
如果用arm-none-eabi有很多出错啊

离线

楼主 #23 2024-03-19 15:20:50

twzy
会员
注册时间: 2021-04-16
已发帖子: 204
积分: 351.5
个人网站

Re: T113-S3主线Linux支持方案(基于TF卡,包含串口修改)

dsp2000 说:

内核的编译也是使用gcc-arm-none-eabi-10.3-2021.10-x86_64-linux吗?好像是  CROSS_COMPILE = arm-linux-gnueabihf-
如果用arm-none-eabi有很多出错啊

内核用gnueabihf

离线

#24 2024-04-03 15:13:25

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

Re: T113-S3主线Linux支持方案(基于TF卡,包含串口修改)

大佬有没有完善这个项目啊?

离线

#25 2024-04-05 21:47:22

oneofzero
会员
注册时间: 2022-10-18
已发帖子: 7
积分: 7

Re: T113-S3主线Linux支持方案(基于TF卡,包含串口修改)

我这本输出:

[I] AWBoot r6173 starting...
[I] SMHC: sdhci0 controller v50310 initialized
[I] SHMC: SD card detected
[I] FATFS: cache: 67108864 bytes in 2048 chunks
[I] FATFS: read sun8i-t113-mangopi-dual.dtb addr=44000000
[I] FATFS: read zImage addr=44800000
[I] booting linux...

后面就没下文了。是啥问题呢??

离线

#26 2024-04-05 22:09:41

oneofzero
会员
注册时间: 2022-10-18
已发帖子: 7
积分: 7

Re: T113-S3主线Linux支持方案(基于TF卡,包含串口修改)

问题找到了,是我太菜了,用的uart0, 设备树里没有配置uart0。。。

最近编辑记录 oneofzero (2024-04-05 22:10:07)

离线

#27 2024-06-28 15:17:31

a06041114
会员
注册时间: 2021-01-18
已发帖子: 11
积分: 11

Re: T113-S3主线Linux支持方案(基于TF卡,包含串口修改)

你这个是TF卡的uboot,如果是spi nand的话,怎么修改并烧写?烧写可以用凤凰软件烧录到spi nand嘛?

离线

#30 2024-08-29 18:23:13

sanye1780
会员
注册时间: 2024-05-17
已发帖子: 15
积分: 0

Re: T113-S3主线Linux支持方案(基于TF卡,包含串口修改)

T113-S3 芯片ID怎么读取 有相关数据手册吗?

离线

页脚

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

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