我要升级LV2,下载sdk
qmycy 发布的最佳帖子
- 
    回复: (全开源)D1s排针版本资料汇总发布在 MR Seriest113排针版跑主线linux分享: 
 平台:ubuntu22.04qmycy@x250:~$ uname -a Linux x250 6.2.0-39-generic #40~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 16 10:53:04 UTC 2 x86_64 x86_64 x86_64 GNU/Linux/usr/include/linux/version.h 5.15.xxx #define LINUX_VERSION_CODE 331651 #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c))) #define LINUX_VERSION_MAJOR 5 #define LINUX_VERSION_PATCHLEVEL 15 #define LINUX_VERSION_SUBLEVEL 131arm-linux-gnueabihf-gcc,交叉编译器 Supported LTO compression algorithms: zlib zstd gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)arm-none-eabi-gcc Thread model: single Supported LTO compression algorithms: zlib gcc version 10.3.1 20210621 (release) (15:10.3-2021.07-4)一、awboot编译 
 排针版,有一个usb2ttl,默认是uart4
 修改board.h--- /home/qmycy/aw0/awboot/board.h 2023-12-19 07:54:00.492240964 +0800 +++ /home/qmycy/aw1/awboot/board.h 2023-12-19 09:37:19.145093802 +0800 @@ -6,7 +6,7 @@ #include "sunxi_usart.h" #include "sunxi_sdhci.h" -#define USART_DBG usart4_dbg +#define USART_DBG usart5_dbg #define CONFIG_BOOT_SPINAND #define CONFIG_BOOT_SDCARD修改board.c 
 --- /home/qmycy/aw0/awboot/board.c 2023-12-19 07:54:49.208311737 +0800
 +++ /home/qmycy/aw1/awboot/board.c 2023-12-19 09:37:19.145093802 +0800
 @@ -27,13 +27,6 @@
 .gpio_rx = {GPIO_PIN(PORTB, 7), GPIO_PERIPH_MUX7},
 };-sunxi_usart_t usart4_dbg = { - .base = 0x02501000,
- .id = 4,
- .gpio_tx = {GPIO_PIN(PORTE, 4), GPIO_PERIPH_MUX3},
- .gpio_rx = {GPIO_PIN(PORTE, 5), GPIO_PERIPH_MUX3},
 -};
 sunxi_spi_t sunxi_spi0 = { 
 .base = 0x04025000,
 .id = 0,二、linux内核为evlers修改后的源码编译 
 设备树
 1 、改alias
 aliases {
 ethernet0 = &rtl8189fs;
 mmc0 = &mmc0;
 serial1 = &uart1;
 serial4 = &uart4;
 serial5 = &uart5;
 };
 2、改内核启动参数
 chosen {
 stdout-path = "serial4:115200n8";
 bootargs = "mem=128M cma=72M root=/dev/mmcblk0p3 rootfstype=ext4 init=/linuxrc rw rootwait console=tty0 console=ttyS4,115200";
 };3、改pio 
 uart4_pe4_pins: uart4-pe4-pins {
 pins = "PE4", "PE5";
 function = "uart4";
 };
 uart5_pb4_pins: uart5-pb4-pins {
 pins = "PB4", "PB5";buildroot: 
 buildroot-2022.02.5
 改国内源
 BR2_BACKUP_SITE="http://sources.buildroot.net"
 BR2_KERNEL_MIRROR="https://mirror.bjtu.edu.cn/kernel/"
 BR2_GNU_MIRROR="http://mirrors.nju.edu.cn/gnu/"
 BR2_LUAROCKS_MIRROR="http://luarocks.cn"
 BR2_CPAN_MIRROR="http://cpan.nju.edu.cn/CPAN/"
 buildroot使用自编交叉编译器,linux的version.h版本最好跟主机的交叉编译器版本对上
 BR2_DEFAULT_KERNEL_HEADERS="5.15.53"awboot是用arm-none-eabi-gcc编译的依赖性弱。 
 linux内核调用主机本地交叉编译器和buildroot可以设定自编交叉编译器版本要对上。不然会导致稀奇古怪的问题,浪费时间。这个是linux头痛的问题。sd卡分区: 
 mbr 3个区,
 第一个区不用,引导用,brom会读取这个区引导awboot
 第二个区fat32,内核以及dtb
 第三个区ex4,buildroot参考: 
 MangoPi Dual T113 主线内核编译记录
 在wsl下开发T113的主线linux
 T113-S3主线Linux支持方案
 T113 AWboot 编译指南
 awboot下载地址
 Evlers改好的linux 6.0.1下载地址
qmycy 发布的最新帖子
- 
    回复: (全开源)D1s排针版本资料汇总发布在 MR Seriest113排针版跑主线linux分享: 
 平台:ubuntu22.04qmycy@x250:~$ uname -a Linux x250 6.2.0-39-generic #40~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 16 10:53:04 UTC 2 x86_64 x86_64 x86_64 GNU/Linux/usr/include/linux/version.h 5.15.xxx #define LINUX_VERSION_CODE 331651 #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c))) #define LINUX_VERSION_MAJOR 5 #define LINUX_VERSION_PATCHLEVEL 15 #define LINUX_VERSION_SUBLEVEL 131arm-linux-gnueabihf-gcc,交叉编译器 Supported LTO compression algorithms: zlib zstd gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)arm-none-eabi-gcc Thread model: single Supported LTO compression algorithms: zlib gcc version 10.3.1 20210621 (release) (15:10.3-2021.07-4)一、awboot编译 
 排针版,有一个usb2ttl,默认是uart4
 修改board.h--- /home/qmycy/aw0/awboot/board.h 2023-12-19 07:54:00.492240964 +0800 +++ /home/qmycy/aw1/awboot/board.h 2023-12-19 09:37:19.145093802 +0800 @@ -6,7 +6,7 @@ #include "sunxi_usart.h" #include "sunxi_sdhci.h" -#define USART_DBG usart4_dbg +#define USART_DBG usart5_dbg #define CONFIG_BOOT_SPINAND #define CONFIG_BOOT_SDCARD修改board.c 
 --- /home/qmycy/aw0/awboot/board.c 2023-12-19 07:54:49.208311737 +0800
 +++ /home/qmycy/aw1/awboot/board.c 2023-12-19 09:37:19.145093802 +0800
 @@ -27,13 +27,6 @@
 .gpio_rx = {GPIO_PIN(PORTB, 7), GPIO_PERIPH_MUX7},
 };-sunxi_usart_t usart4_dbg = { - .base = 0x02501000,
- .id = 4,
- .gpio_tx = {GPIO_PIN(PORTE, 4), GPIO_PERIPH_MUX3},
- .gpio_rx = {GPIO_PIN(PORTE, 5), GPIO_PERIPH_MUX3},
 -};
 sunxi_spi_t sunxi_spi0 = { 
 .base = 0x04025000,
 .id = 0,二、linux内核为evlers修改后的源码编译 
 设备树
 1 、改alias
 aliases {
 ethernet0 = &rtl8189fs;
 mmc0 = &mmc0;
 serial1 = &uart1;
 serial4 = &uart4;
 serial5 = &uart5;
 };
 2、改内核启动参数
 chosen {
 stdout-path = "serial4:115200n8";
 bootargs = "mem=128M cma=72M root=/dev/mmcblk0p3 rootfstype=ext4 init=/linuxrc rw rootwait console=tty0 console=ttyS4,115200";
 };3、改pio 
 uart4_pe4_pins: uart4-pe4-pins {
 pins = "PE4", "PE5";
 function = "uart4";
 };
 uart5_pb4_pins: uart5-pb4-pins {
 pins = "PB4", "PB5";buildroot: 
 buildroot-2022.02.5
 改国内源
 BR2_BACKUP_SITE="http://sources.buildroot.net"
 BR2_KERNEL_MIRROR="https://mirror.bjtu.edu.cn/kernel/"
 BR2_GNU_MIRROR="http://mirrors.nju.edu.cn/gnu/"
 BR2_LUAROCKS_MIRROR="http://luarocks.cn"
 BR2_CPAN_MIRROR="http://cpan.nju.edu.cn/CPAN/"
 buildroot使用自编交叉编译器,linux的version.h版本最好跟主机的交叉编译器版本对上
 BR2_DEFAULT_KERNEL_HEADERS="5.15.53"awboot是用arm-none-eabi-gcc编译的依赖性弱。 
 linux内核调用主机本地交叉编译器和buildroot可以设定自编交叉编译器版本要对上。不然会导致稀奇古怪的问题,浪费时间。这个是linux头痛的问题。sd卡分区: 
 mbr 3个区,
 第一个区不用,引导用,brom会读取这个区引导awboot
 第二个区fat32,内核以及dtb
 第三个区ex4,buildroot参考: 
 MangoPi Dual T113 主线内核编译记录
 在wsl下开发T113的主线linux
 T113-S3主线Linux支持方案
 T113 AWboot 编译指南
 awboot下载地址
 Evlers改好的linux 6.0.1下载地址
- 
    回复: (全开源)D1s排针版本资料汇总发布在 MR Series@whycan 虚拟机的镜像还没下完,你网盘里的sdk,我已经下下来了。 
 虚拟机里的是uart4的固件吗?
 t113s3和d1是一个sdk吗?我买了两个板子
- 
    回复: ubuntu22.04编译官方d1s库出错发布在 MR Series昨天折腾一下午。 
 ubuntu22.04编译成功比较麻烦。
 1、网上有人折腾ubuntu22.04,需要打一些补丁。
 2、发现出错的是cc命令,是sdk编译工具用的,这些工具主机用,是调用的是主机的编译器生成。办法如下:
 (1)将gcc和g++降级,22.04的最低只能安装gcc9,用了后也不行。
 (2)要点就是,要设定apt的sourcelist。将ubuntu16.04的源加进去
 (3) 安装ubuntu16.04的编译器,并把这个16.04的gcc(5.xx版本)设为默认gcc。可以网络搜索gcc降级的教程
 3、编译过程中,会出现一些错误,通常是少了什么库,可以自己辨别。笔记: 
 1、sdk会生成大量工具,会调用主机的编译器。跟ubuntu版本有关。
 网上的教程基本都是sdk生成中间工具时出问题。
 2、sdk会生成交叉编译器工具,会调用主机的编译器。跟ubuntu版本有关,这一部分没有问题。
 3、sdk生成的交叉编译工具,编译uboot和tina-linux内核和基础的rootfs。这一部分被sdk的版本给控制,基本没有出错。
 4、最后pack,需要安装32位的库。
- 
    ubuntu22.04编译官方d1s库出错发布在 MR Series/usr/bin/ld: cmcmd.o: in function `cmcmd::ExecuteLinkScript(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&)': cmcmd.cxx:(.text+0x54b0): undefined reference to `cmsysProcess_New' /usr/bin/ld: cmcmd.cxx:(.text+0x550f): undefined reference to `cmsysProcess_SetPipeShared' /usr/bin/ld: cmcmd.cxx:(.text+0x5528): undefined reference to `cmsysProcess_SetPipeShared' /usr/bin/ld: cmcmd.cxx:(.text+0x5541): undefined reference to `cmsysProcess_SetOption' /usr/bin/ld: cmcmd.cxx:(.text+0x568d): undefined reference to `cmsysProcess_SetCommand' /usr/bin/ld: cmcmd.cxx:(.text+0x56d0): undefined reference to `cmsysProcess_Execute' /usr/bin/ld: cmcmd.cxx:(.text+0x56e4): undefined reference to `cmsysProcess_WaitForExit' /usr/bin/ld: cmcmd.cxx:(.text+0x56f3): undefined reference to `cmsysProcess_GetState' /usr/bin/ld: cmcmd.cxx:(.text+0x5723): undefined reference to `cmsysProcess_GetExitValue' /usr/bin/ld: cmcmd.cxx:(.text+0x5772): undefined reference to `cmsysProcess_GetExceptionString' /usr/bin/ld: cmcmd.cxx:(.text+0x57c6): undefined reference to `cmsysProcess_GetErrorString' /usr/bin/ld: cmcmd.cxx:(.text+0x5845): undefined reference to `cmsysProcess_Delete'应该是少了什么库,求大神指点。谢谢 
- 
    回复: (全开源)D1s排针版本资料汇总发布在 MR Series我买了晕哥的D1s和T113-S3的开发板。 
  
 调试了两天,现在把gpio的调试分享给同样是新手朋友。- gpio的调试:
 root@TinaLinux:/# cd /sys/class/gpio root@TinaLinux:/sys/class/gpio# ls export gpiochip0 unexport root@TinaLinux:/sys/class/gpio# echo 36 >export root@TinaLinux:/sys/class/gpio# ls export gpio36 gpiochip0 unexport root@TinaLinux:/sys/class/gpio# cd gpio36 root@TinaLinux:/sys/devices/platform/soc@3000000/2000000.pinctrl/gpiochip0/gpio/gpio36# ls active_low edge uevent device power value direction subsystem waiting_for_supplier root@TinaLinux:/sys/devices/platform/soc@3000000/2000000.pinctrl/gpiochip0/gpio/gpio36#其中GPIO36的36的由来,32x+y 
 PA:x=0,PB:x=1,以此类推。那么PB4=321+4- 查看引脚分配
 root@TinaLinux:~# mount -t debugfs debug /proc/sys/debug root@TinaLinux:~# cd /proc/sys/debug root@TinaLinux:/proc/sys/debug# ls asoc extfrag pwm bdi fault_around_bytes regmap block gpio regulator bluetooth ieee80211 sleep_time clear_warn_once ion sunxi_leds clk memblock suspend_stats device_component mmc0 ubi devices_deferred mmc1 ubifs dispdbg mtd usb dma_buf pinctrl wakeup_sources enc_test pm_qos root@TinaLinux:/proc/sys/debug# cd pinctrl/ root@TinaLinux:/proc/sys/debug/pinctrl# ls 2000000.pinctrl pinctrl-devices pinctrl-handles pinctrl-maps root@TinaLinux:/proc/sys/debug/pinctrl# cd 2000000.pinctrl/ root@TinaLinux:/proc/sys/debug/pinctrl/2000000.pinctrl# ls gpio-ranges pinconf-pins pinmux-functions pins pinconf-groups pingroups pinmux-pins root@TinaLinux:/proc/sys/debug/pinctrl/2000000.pinctrl# cat pinmux-pins Pinmux settings per pin Format: pin (name): mux_owner|gpio_owner (strict) hog? pin 32 (PB0): GPIO 2000000.pinctrl:32 pin 33 (PB1): UNCLAIMED pin 34 (PB2): device 2502000.twi function gpio_in group PB2 pin 35 (PB3): device 2502000.twi function gpio_in group PB3 pin 36 (PB4): GPIO 2000000.pinctrl:36 pin 37 (PB5): UNCLAIMED pin 38 (PB6): device 2500c00.uart function uart3 group PB6 pin 39 (PB7): device 2500c00.uart function uart3 group PB7 pin 40 (PB8): UNCLAIMED pin 41 (PB9): UNCLAIMED pin 42 (PB10): UNCLAIMED pin 43 (PB11): UNCLAIMED pin 44 (PB12): UNCLAIMED pin 64 (PC0): UNCLAIMED pin 65 (PC1): UNCLAIMED pin 66 (PC2): device 4025000.spi function spi0 group PC2 pin 67 (PC3): device 4025000.spi function spi0 group PC3 pin 68 (PC4): device 4025000.spi function spi0 group PC4 pin 69 (PC5): device 4025000.spi function spi0 group PC5 pin 70 (PC6): device 4025000.spi function spi0 group PC6 pin 71 (PC7): device 4025000.spi function spi0 group PC7 pin 96 (PD0): UNCLAIMED pin 97 (PD1): UNCLAIMED pin 98 (PD2): UNCLAIMED pin 99 (PD3): UNCLAIMED pin 100 (PD4): UNCLAIMED pin 101 (PD5): UNCLAIMED pin 102 (PD6): UNCLAIMED pin 103 (PD7): UNCLAIMED pin 104 (PD8): UNCLAIMED pin 105 (PD9): UNCLAIMED pin 106 (PD10): UNCLAIMED pin 107 (PD11): UNCLAIMED pin 108 (PD12): UNCLAIMED pin 109 (PD13): UNCLAIMED pin 110 (PD14): UNCLAIMED pin 111 (PD15): UNCLAIMED pin 112 (PD16): UNCLAIMED pin 113 (PD17): UNCLAIMED pin 114 (PD18): UNCLAIMED pin 115 (PD19): UNCLAIMED pin 116 (PD20): UNCLAIMED pin 117 (PD21): UNCLAIMED pin 118 (PD22): UNCLAIMED pin 128 (PE0): UNCLAIMED pin 129 (PE1): UNCLAIMED pin 130 (PE2): UNCLAIMED pin 131 (PE3): UNCLAIMED pin 132 (PE4): device 2501000.uart function uart4 group PE4 pin 133 (PE5): device 2501000.uart function uart4 group PE5 pin 134 (PE6): UNCLAIMED pin 135 (PE7): UNCLAIMED pin 136 (PE8): UNCLAIMED pin 137 (PE9): UNCLAIMED pin 138 (PE10): UNCLAIMED pin 139 (PE11): UNCLAIMED pin 140 (PE12): GPIO 2000000.pinctrl:140 pin 141 (PE13): GPIO 2000000.pinctrl:141 pin 142 (PE14): UNCLAIMED pin 143 (PE15): UNCLAIMED pin 144 (PE16): UNCLAIMED pin 145 (PE17): UNCLAIMED pin 160 (PF0): device 4020000.sdmmc function sdc0 group PF0 pin 161 (PF1): device 4020000.sdmmc function sdc0 group PF1 pin 162 (PF2): device 4020000.sdmmc function sdc0 group PF2 pin 163 (PF3): device 4020000.sdmmc function sdc0 group PF3 pin 164 (PF4): device 4020000.sdmmc function sdc0 group PF4 pin 165 (PF5): device 4020000.sdmmc function sdc0 group PF5 pin 166 (PF6): GPIO 2000000.pinctrl:166 pin 192 (PG0): device 4021000.sdmmc function gpio_in group PG0 pin 193 (PG1): device 4021000.sdmmc function gpio_in group PG1 pin 194 (PG2): device 4021000.sdmmc function gpio_in group PG2 pin 195 (PG3): device 4021000.sdmmc function gpio_in group PG3 pin 196 (PG4): device 4021000.sdmmc function gpio_in group PG4 pin 197 (PG5): device 4021000.sdmmc function gpio_in group PG5 pin 198 (PG6): device 2500400.uart function uart1 group PG6 pin 199 (PG7): device 2500400.uart function uart1 group PG7 pin 200 (PG8): device 2500400.uart function uart1 group PG8 pin 201 (PG9): device 2500400.uart function uart1 group PG9 pin 202 (PG10): GPIO 2000000.pinctrl:202 pin 203 (PG11): device soc@3000000:rfkill@0 function clk_fanout1 group PG11 pin 204 (PG12): GPIO 2000000.pinctrl:204 pin 205 (PG13): device 2008000.ledc function ledc group PG13 pin 206 (PG14): GPIO 2000000.pinctrl:206 pin 207 (PG15): GPIO 2000000.pinctrl:207 pin 208 (PG16): UNCLAIMED pin 209 (PG17): UNCLAIMED pin 210 (PG18): UNCLAIMED root@TinaLinux:/proc/sys/debug/pinctrl/2000000.pinctrl#- 查看寄存器
 root@TinaLinux:/proc/sys/debug/pinctrl/2000000.pinctrl# cd /sys/class/sunxi_dump root@TinaLinux:/sys/class/sunxi_dump# ls compare help standby_dump_ctrl write dump rw_byte test root@TinaLinux:/sys/class/sunxi_dump# echo 0x02000034 >dump root@TinaLinux:/sys/class/sunxi_dump# cat dump 0x000fffff root@TinaLinux:/sys/class/sunxi_dump# echo 0x02000034 0x0 >write root@TinaLinux:/sys/class/sunxi_dump# cat dump 0x00000000 root@TinaLinux:/sys/class/sunxi_dump#- adb连接
 晕哥的板子有一个usb转ttl的桥,可以用putty进行连接。
 这个板子同时支持adb调试
 1、下载adb工具包
 2、查看是否连接
 D:\platform-tools>adb devices List of devices attached 20080411 device3、进入板子的shell D:\platform-tools>adb -s 20080411 shell BusyBox v1.27.2 () built-in shell (ash) ------run profile file----- _____ _ __ _ |_ _||_| ___ _ _ | | |_| ___ _ _ _ _ | | _ | || | | |__ | || || | ||_'_| | | | || | || _ | |_____||_||_|_||___||_,_| |_| |_||_|_||_|_| Tina is Based on OpenWrt! ---------------------------------------------- Tina Linux (Neptune, 61CC0487) ---------------------------------------------- mount: mounting none on /sys/kernel/debug failed: Device or resource busy root@TinaLinux:/#