导航

    全志在线开发者论坛

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

    hy123456 发布的帖子

    • SDK文件夹移动位置后编译出来的img 烧录到板子上,报硬件检查错误,怎么回事?

      R528的SDK,在原来文件下编译时没有问题的,我现在需要复制出一份来做对应修改,但是发现编译出来的img 烧录到板子上,报硬件检查错误,请大神们指点一下是怎么回事?

      ▒[29]HELLO! BOOT0 is starting!T
      [32]BOOT0 commit : 4d16602
      [34]set pll start
      [40]periph0 has been enabled
      [43]set pll end
      [45][pmu]: bus read error
      [47]board init ok
      [49]ZQ value = 0x2e
      [51]get_pmu_exist() = -1
      [53]DRAM BOOT DRIVE INFO: V0.33
      [56]DRAM CLK = 792 MHz
      [59]DRAM Type = 3 (2:DDR2,3:DDR3)
      [62]DRAMC read ODT off.
      [64]DRAM ODT value: 0x42.
      [67]ddr_efuse_type: 0xb
      [70]DRAM SIZE =128 M
      [72]dram_tpr4:0x0
      [74]PLL_DDR_CTRL_REG:0xf8004100
      [77]DRAM_CLK_REG:0xc0000000
      [79][TIMING DEBUG] MR2= 0x18
      [86]DRAM simple test OK.
      [89]rtc standby flag is 0x0, super standby flag is 0x0
      [94]dram size =128
      [96]card no is 2
      [98]sdcard 2 line count 4
      [100][mmc]: mmc driver ver 2021-05-21 14:47
      [110][mmc]: Wrong media type 0x0, but host sdc2, try mmc first
      [116][mmc]: Try MMC card 2
      [140][mmc]: RMCA OK!
      [142][mmc]: mmc 2 bias 0
      [145][mmc]: MMC 5.1
      [147][mmc]: HSSDR52/SDR25 4 bit
      [150][mmc]: 50000000 Hz
      [152][mmc]: 3740 MB
      [154][mmc]: SD/MMC 2 init OK!!!
      [243]Loading boot-pkg Succeed(index=0).
      [247]Entry_name = u-boot
      [254]Entry_name = optee
      [258]Entry_name = dtb
      [261]tunning data addr:0x430003e8
      [264]Jump to second Boot.
      M/TC: OP-TEE version: 963b7e95 (gcc version 5.3.1 20160412 (Linaro GCC 5.3-2016.05)) #1 Wed Jul 28 12:51:52 UTC 2021 arm
      E/TC:0 0 check_hardware_info:90 hardware check error1
      E/TC:0 0 Panic at core/arch/arm/plat-sun8iw20p1/main.c:301 <plat_init>
      E/TC:0 0 Call stack:
      E/TC:0 0 0x41b0a271

      发布在 编译和烧写问题专区
      H
      hy123456
    • g2d 进行缩放没有权限怎么回事?
      static int g2d_scale_framebuf(int src_width, int src_height, int dst_width, int dst_height)
      {
      	
       // 获取帧缓冲长度
          int fb_size =  dst_width * dst_height * 4;
      	//int fb_fd = fbfd;
          // 映射帧缓冲到内存
          //void* fb_ptr = mmap(NULL, fb_size, PROT_READ | PROT_WRITE, MAP_SHARED, fb_fd, 0);
          //if (fb_ptr == MAP_FAILED) {
          //    perror("Failed to mmap frame buffer");
          //    //close(fb_fd);
          //    return -1;
          //}
      
      
          void * fb_ptr = malloc(fb_size);
          if(fb_ptr == NULL) {
              perror("Failed to allocate memory 1111 for scaled image");
              return -1;
          }
      
      
         // 分配目标空间内存
          int dst_size = src_width * src_height * 4;
          void* dst_ptr = malloc(dst_size);
          if (dst_ptr == NULL) {
              perror("Failed to allocate memory for scaled image");
              //munmap(fb_ptr, fb_size);
              //close(fb_fd);
              return -1;
          }
      
      //	memcpy(dst_ptr, fb_ptr, fb_size);
      	memset(dst_ptr, 0x55, dst_size);
      
          // 打开 G2D 设备
          int g2d_fd = open("/dev/g2d", O_RDWR);
          if (g2d_fd < 0) {
              perror("Failed to open G2D device");
              munmap(fb_ptr, fb_size);
              //close(fb_fd);
              return -1;
          }
      
      	g2d_stretchblt str;
          g2d_image image_front, scn;
          g2d_rect src_rect, dst_rect;
      
          /* 设置源图像参数 */
          image_front.addr[0] = dst_ptr;
          image_front.w = src_width;
          image_front.h = src_height;
          image_front.format = G2D_FMT_RGBX8888;
          image_front.pixel_seq = G2D_SEQ_NORMAL;
          image_front.addr[1] = dst_ptr + image_front.w *image_front.h;
          /* 设置目标图像参数 */
          scn.addr[0] = fb_ptr;
          scn.w = dst_width;
          scn.h = dst_height;
          scn.format = G2D_FMT_RGBX8888;
          scn.pixel_seq = G2D_SEQ_NORMAL;
      
          /* 设置源和目标矩形区域 */
          src_rect.x = 0;
          src_rect.y = 0;
          src_rect.w = src_width;
          src_rect.h = src_height;
      
          dst_rect.x = 0;
          dst_rect.y = 0;
          dst_rect.w = dst_width;
          dst_rect.h = dst_height;
      
          /* 设置缩放参数 */
          str.flag = 0;
          str.color = 0xffffffff;
          str.alpha = 0xff;
      
          /* 设置源图像和矩形区域 */
          str.src_image.addr[0] = image_front.addr[0];
      	str.src_image.addr[1] = image_front.addr[1];
          str.src_image.w = image_front.w;
          str.src_image.h = image_front.h;
          str.src_image.format = image_front.format;
          str.src_image.pixel_seq = image_front.pixel_seq;
          str.src_rect = src_rect;
      
          /* 设置目标图像和矩形区域 */
          str.dst_image.addr[0] = scn.addr[0];
          str.dst_image.w = scn.w;
          str.dst_image.h = scn.h;
          str.dst_image.format = scn.format;
          str.dst_image.pixel_seq = scn.pixel_seq;
          str.dst_rect = dst_rect;
      
          // 执行 G2D 缩放操作
          if (ioctl(g2d_fd, G2D_CMD_STRETCHBLT, &str) < 0) {
              perror("G2D_CMD_STRETCHBLT failed....");
             // munmap(fb_ptr, fb_size);
              close(g2d_fd);
              //close(fb_fd);
              return -1;
          }
      
          // 释放目标空间内存
          free(dst_ptr);
      	free(fb_ptr);
          // 解除帧缓冲内存映射
         // munmap(fb_ptr, fb_size);
      
          // 关闭 G2D 设备
         close(g2d_fd);
      	return 0;
      }
      
      
      
      
      int main() {
          const char *image_path = "image.bmp";
          const char *framebuffer_path = "/dev/fb0";
      
          //write_to_framebuffer(image_path, framebuffer_path);
      	g2d_scale_framebuf(1024,600,800,480);
      
          return 0;
      }
      

      写了个小程序测试一下用g2d进行缩放。执行的时候提示没有权限,问题出在那里了?
      root@TinaLinux:~# /usr/bin/a.out
      G2D_CMD_STRETCHBLT failed....: Operation not permitted

      发布在 Linux
      H
      hy123456
    • 回复: G2D uboot阶段 logo 旋转不了?怎么办?

      @whycan 应用层有自动开启G2D旋转的方法吗? 我想到的是应用层可以调G2D 的旋转API把每个图片都旋转一下再显示。感觉也很麻烦。没有系统自动给旋转省事。

      发布在 Linux
      H
      hy123456
    • 回复: G2D uboot阶段 logo 旋转不了?怎么办?

      @hy123456 手动旋转图片的方法,我已记录在博客上,大家有需要的可以参考 https://www.cnblogs.com/hylife/p/17496308.html

      发布在 Linux
      H
      hy123456
    • 回复: G2D uboot阶段 logo 旋转不了?怎么办?

      @aozima 手动怎么旋转,您麻烦具体指点一下? 谢谢

      发布在 Linux
      H
      hy123456
    • G2D uboot阶段 logo 旋转不了?怎么办?

      硬件是R528。想把显示画面旋转180度显示,想到了用G2D旋转画面。
      但是uboot 显示logo 的时候画面没有旋转,到内核阶段logo 又旋转了。看其他帖子,有大佬说uboot没有G2D,那应该怎么配置,能让这个logo 显示是一样的那?

      发布在 Linux
      H
      hy123456
    • 回复: 开机时logo 颜色不对,怎么修改?

      终于找到了前人的帖子 LCD 红蓝颜色互换
      方法就是在uboot的设备树中增加lcd_rb_swap = <1>;

      在uboot的板级设备树中/device/config/chips/r528/configs/evb1/uboot-board.dts中增加

      &lcd0 {
      lcd_rb_swap = <1>; //+++
      };

      注意更改后make 的时候uboot 的设备树并不会更新。
      而且我的SDK在muboot后也不更新。后来经过不断尝试,发现
      变更一下uboot的配置文件lichee/brandy-2.0/u-boot-2018/configs/sun8iw20p1_defconfig 之后才能更新。

      在内核板级设备树中device/config/chips/r528/configs/evb1/board.dts
      修改fb0_format = <1>; 也起到红蓝色变化的作用,但是uboot中修改不起作用。
      &disp {
      fb0_format = <1>;
      }

      发布在 Linux
      H
      hy123456
    • 开机时logo 颜色不对,怎么修改?

      R528 RGB 24位的屏开始的时候显示logo 的颜色不对,其中红色显示为蓝色。启动一会之后logo好像会重新刷新一下,之后颜色又变对了,请教一下,这个开机时颜色格式应该怎么修改?

      发布在 Linux
      H
      hy123456
    • R528的uart1如何开启R485自动流控

      请教一下,R528的uart1如何开启R485自动流控?e86778c2-2d96-4683-95cc-92c2996891a6-1682304237892.png f6b3b091-38c4-4850-92e4-777e221c3fad-1682304263102.png
      将设备树设置为,并不起作用329380dc-ac0e-4678-9a93-7eb5e793a689-1682304509125.png

      发布在 Linux
      H
      hy123456
    • 回复: r528的USB1接了hub转出来的usb无法失败到U盘怎么配置?

      @whycan 找到原因了,USB的5V供电有问题。谢谢了!

      发布在 Linux
      H
      hy123456
    • 回复: r528的USB1接了hub转出来的usb无法失败到U盘怎么配置?

      @whycan 接键盘没有什么反应,接蓝牙鼠标会有如下提醒1329e28f-75ad-4039-a0c0-3361ba6d3e3f-1681879058778.png

      发布在 Linux
      H
      hy123456
    • 回复: r528的USB1接了hub转出来的usb无法失败到U盘怎么配置?

      @whycan hub应该是可以识别的,挂载hub上的3,4端口usb,加了驱动都是可以工作的。b53e5f5f-0fa3-4588-9d0c-fc4697407993-1681876017268.png

      发布在 Linux
      H
      hy123456
    • r528的USB1接了hub转出来的usb无法失败到U盘怎么配置?

      请教大神们,r528的USB1接了一个hub转出来4个usb。转出来的USB1接口现在无法识别到U盘,应该怎么配置?插上U盘后灯也不亮,dev下也无 sdaXX设备节点。c47d2cc7-af4c-4113-9e92-333994d56fb4-b25b0e1355156dde408f550665e4a1c.png

      发布在 Linux
      H
      hy123456
    • 回复: 移植RTL8188fu驱动编译报错,sw_usb_enable_hcd等函数未定义

      @whycanservice 您好。我用的是全志的r528linux内核是5.4.61. RTL8723du。 我的报错信息是这样的。!1679636638005.png 我查看Makefile 发现它确实会编译这个函数。1679637460141.png 这个/platform/platform_ARM_SUNxI_usb.c确实用到了这个三个函数。 但是我在内核中搜索并没有找到有sw_usb_disable_hcd 和sw_usb_enable_hcd两个函数。script_parser_fetch 是在Uboot下的sys_config.h中有定义。
      1679637606209.png

      此外编译时发现驱动中/platform/platform_ARM_SUNxI_usb.c的#include <mach/sys_config.h> 头文件也无法找到。
      我就将它更改为了 #include </home/kerson/tina-r528/lichee/brandy-2.0/u-boot-2018/include/sys_config.h>
      我不知道sw_usb_enable_hcd(usb_wifi_host);sw_usb_disable_hcd(item.val);的具体作用,是否可以直接注掉。或者不用/platform/platform_ARM_SUNxI_usb.c 这个文件?

      发布在 编译和烧写问题专区
      H
      hy123456
    • 回复: 移植RTL8188fu驱动编译报错,sw_usb_enable_hcd等函数未定义

      @casojie 我也遇到了相同的问题,您最后是怎么解决的?

      发布在 编译和烧写问题专区
      H
      hy123456
    • 回复: TinaLinux请教如何查询网卡当前是百兆还是千兆?

      @yuzukitsuru 我又尝试了cat ,但是不能读。
      root@TinaLinux:~# cat /sys/class/net/eth0/speed
      cat: read error: Invalid argument

      发布在 Linux
      H
      hy123456
    • 回复: TinaLinux请教如何查询网卡当前是百兆还是千兆?

      @yuzukitsuru
      root@TinaLinux:~# ifconfig
      eth0 Link encap:Ethernet HWaddr AA:A7:4D:97:F3:60
      inet6 addr: fe80::a8a7:4dff:fe97:f360/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
      RX packets:1 errors:0 dropped:0 overruns:0 frame:0
      TX packets:5784678 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:243 (243.0 B) TX bytes:1866511050 (1.7 GiB)
      Interrupt:40
      只有发送队列是1000

      发布在 Linux
      H
      hy123456
    • 回复: TinaLinux请教如何查询网卡当前是百兆还是千兆?

      @yuzukitsuru 插拔网线是可以看到,但是运行过程中怎么查那?想看看运行过程中它有没有自动降速之类的?

      发布在 Linux
      H
      hy123456
    • TinaLinux请教如何查询网卡当前是百兆还是千兆?

      TinaLinux请教如何查询网卡当前是百兆还是千兆?用ethtool eth0 显示
      Settings for eth0:
      Link detected: yes
      不显示speed等参数,请教一下,还有没有其他办法查询网卡当前是百兆还是千兆??

      发布在 Linux
      H
      hy123456
    • 回复: 请教spi1 st7789V怎么移植配置开机logo?

      @allwinnertech 是的就是想在uboot 中配置好,但是没有成功。

      发布在 Linux
      H
      hy123456
    • 回复: 请教spi1 st7789V怎么移植配置开机logo?

      @yuzukitsuru 现在就是logo 显示的有些慢,大约上电4s左右到kernel 启动后才能显示出来。

      发布在 Linux
      H
      hy123456
    • 回复: 请教spi1 st7789V怎么移植配置开机logo?

      @yuzukitsuru 您好,我把vi lichee/brandy-2.0/u-boot-2018/configs/sun8iw20p1_defconfig 中的CONFIG_AW_PHY=y 注释掉了。试了一下,还是不行。我看
      执行了show_bmp_on_fb
      [00.838]bmp_name=bootlogo.bmp size 172856
      172856 bytes read in 9 ms (18.3 MiB/s)
      fileaddr =43f3b040 ,filesize =172856
      HHHHHHHHHshow_bmp_on_fb:164
      HHHHHHHHHshow_bmp_on_fb:261
      [00.977]Loading Environment from SUNXI_FLASH... OK

      发布在 Linux
      H
      hy123456
    • 请教spi1 st7789V怎么移植配置开机logo?

      硬件平台r528 ,tina 系统,u-boot-2018。用spi1 驱动一个st7789v的240*240的小屏。
      kernel现在已经可以显示logo.但是uboot 阶段一直不显示?请教一下具体怎么配置?
      还有请教uboot阶段系统运行开机logo的步骤?现在不知道怎么跟踪,不清楚问题出在那里?
      修改了一下内容,还是没有显示:
      1、tina-r528/lichee/brandy-2.0/u-boot-2018/include/configs$ vi sun20iw1p1.h
      增加了头文件

        #define CONFIG_VIDEO_LOGO
       #define CONFIG_VIDEO_BMP_LOGO
      

      2、tina-r528/device/config/chips/r528/configs/evb1$ vi uboot-board.dts
      设备树修改

         &lcd0 {
          lcd_used            = <1>;
      
          lcd_driver_name     = "st7789v";
          lcd_backlight       = <50>;
          lcd_if              = <0>;
      
          lcd_x               = <240>;
          lcd_y               = <240>;
          lcd_width           = <23>;
          lcd_height          = <23>;
          lcd_dclk_freq       = <19>;
      
          lcd_pwm_used        = <1>;
          lcd_pwm_ch          = <7>;
          lcd_pwm_freq        = <50000>;
          lcd_pwm_pol         = <0>;
      
          lcd_hbp             = <120>;
          lcd_ht              = <850>;
          lcd_hspw            = <2>;
          lcd_vbp             = <13>;
          lcd_vt              = <293>;
          lcd_vspw            = <2>;
      /*
          lcd_lvds_if         = <0>;
          lcd_lvds_colordepth = <1>;
          lcd_lvds_mode       = <0>;
      */  
          lcd_frm             = <1>;
          lcd_hv_if           = <8>;
          lcd_hv_clk_phase    = <0>;
          lcd_hv_sync_polarity   = <0>;
          lcd_hv_srgb_seq     = <0>;
      
          lcd_io_phase        = <0x0000>;
          lcd_gamma_en        = <0>;
          lcd_bright_curve_en = <1>;
          lcd_cmap_en         = <0>;
      
          deu_mode            = <0>;
          lcdgamma4iep        = <22>;
          smart_color         = <90>;
          //reset
          lcd_gpio_0          = <&pio PD 9 1 0 3 1>;
          //cs
          lcd_gpio_1          = <&pio PD 10 1 0 3 0>;
          //sda
          lcd_gpio_2          = <&pio PD 12 1 0 3 0>; 
          //sck
          lcd_gpio_3          = <&pio PD 11 1 0 3 0>;
          //dc
          lcd_gpio_4          = <&pio PD 8 1 0 3 1>;
      //  pinctrl-0 = <&rgb24_pins_a>;
      //  pinctrl-1 = <&rgb24_pins_b>;
      };
      
      

      3、tina-r528/lichee/brandy-2.0/u-boot-2018/arch/arm/dts$ vi sun8iw20p1-soc-system.dts
      增加SPi1 节点

      4、tina-r528/lichee/brandy-2.0/u-boot-2018/drivers/video/sunxi/disp2/disp/lcd$ vi st7789v.c
      修改驱动初始化

      5、menuconfig 选择st7789v。

      发布在 Linux
      H
      hy123456
    • 1 / 1