导航

    全志在线开发者论坛

    • 注册
    • 登录
    • 搜索
    • 版块
    • 话题
    • 在线文档
    • 社区主页
    1. 主页
    2. qmycy
    3. 最佳
    Q
    • 资料
    • 关注 0
    • 粉丝 0
    • 我的积分 334
    • 主题 1
    • 帖子 7
    • 最佳 2
    • 群组 0

    qmycy 发布的最佳帖子

    • 回复: 【水经验混下载权限专用贴】如何升级LV2拉取SDK

      我要升级LV2,下载sdk

      发布在 灌水区
      Q
      qmycy
    • 回复: (全开源)D1s排针版本资料汇总

      t113排针版跑主线linux分享:
      平台:ubuntu22.04

      qmycy@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 131
      

      arm-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下载地址

      发布在 MR Series
      Q
      qmycy
    • 1 / 1