导航

    全志在线开发者论坛

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

    hy123456LV 5

    @hy123456

    1112
    积分
    4
    声望
    13
    资料浏览
    23
    帖子
    1
    粉丝
    0
    关注
    注册时间 最后登录

    hy123456 取消关注 关注

    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

    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