Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • 社区主页
    1. Home
    2. zhoujunkai00000
    Z
    • Profile
    • Following 0
    • Followers 0
    • my integral 286
    • Topics 2
    • Posts 6
    • Best 0
    • Groups 0

    dongyuetuLV 3

    @zhoujunkai00000

    286
    integral
    0
    Reputation
    2
    Profile views
    6
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    zhoujunkai00000 Unfollow Follow

    Latest posts made by zhoujunkai00000

    • Reply: D1-H 如何调节主频?

      @q1215200171 就是按照这个 faq 里的说明操作的,但是没有效果。

      posted in 全志方案讨论区
      Z
      dongyuetu
    • Reply: D1-H 如何调节主频?

      @yteraa 哪吒开发板

      posted in 全志方案讨论区
      Z
      dongyuetu
    • D1-H 如何调节主频?

      按照 FAQ 里的操作:
      1、输入 make kernel_menueconfig ,打开了 ARCH RISCV Allwinner nvmem based SUN50I CPUFreq driver 。
      2、修改了 lichee 文件夹下, uboot 及 linux 中的的设备树。将 uboot 设备树中的 boot_clock 从 1008 改为了 675 ;将 linux 设备树中的 opp@1008000000 的 opp-hz 改为了 675000000 。
      3、保存并重新编译打包。

      烧写后,/sys/devices/system/cpu/cpu0/ 下并没有 cpuinfo_cur_freq 这个文件。切在板子启动时还是显示 CPU=1008 MHz 。

      有没有大佬知道到底怎么修改主频,并查看 cpu 当前频率呢?

      posted in 全志方案讨论区
      Z
      dongyuetu
    • Reply: D1-H 开发板带 math.h 编译 Uboot 报错

      @yuzukitsuru

      不是的,Uboot 是根本编译不过。

      { Uboot } 和 { Linux 里的 elf } 用的是同一套编译工具。

      posted in D1-H/D1s
      Z
      dongyuetu
    • Reply: D1-H 开发板带 math.h 编译 Uboot 报错

      @yuzukitsuru 在 D1-H 开发板带 math.h 编译 Uboot 报错 中说:

      增加packag

      不是的。
      math.h 是 gcc 自带的一个库,提供一些 sin、log、sqrt 之类的函数。

      我只是想在 Uboot 里调这些函数。但是编译会报错。

      posted in D1-H/D1s
      Z
      dongyuetu
    • D1-H 开发板带 math.h 编译 Uboot 报错

      问题:

      • 在 Uboot 中的 cmd 文件夹下添加了一个 whetstone.c 文件,里面包含了 math.h ,调用了 sin、cos、atan 之类的函数。
      • 修改了 Makefile 使其会去编译这个 .c 文件。
      • 编译会报
      /brandy-2.0/u-boot-2018/cmd/sunxi_svudata.c:24: undefined reference to `sin'
      

      我做了什么:

      • 在 Uboot 的 cmd 文件夹下的 Makefile 中添加
      obj-y += benchmark/whetstone/whetstone.o
      
      • 删除 Makefile 里的 NOSTDINC_FLAGS 。
      • 在 CC 宏的 gcc 后面加了个 -lm
      • 修改了 Makefile 里的 CROSS_COMPILE ,修改为 prebuilt 中的那个编译链。
      • 删除了 /u-boot-2018/include/log.h 中的 log 宏

      我试了什么:

      • 在 Makefile 的 PLATFORM_LIBGCC 后面加了个 -lm 。
      • 在 Makefile 的 PLATFORM_LIBGCC 后面用 -L 指定了 libm.a 的目录
        • 尝试了 prebuild 目录中 sysroot 下, lib64/lib64vxthread/lib64xthread 目录下的 lib64 和 lib64d/v 。
        • 这种时候会报:
      /toolchain-thead-glibc/riscv64-glibc-gcc-thead_20200702/sysroot/usr/lib64/lp64d/libm.a: error adding symbols: bad value
      

      但是我直接自己写个 helloworld 带 math.h 用同一个工具链编译之后,丢到板子里在 linux 上跑,又完全没问题。

      编译报错的 sunxi_svudata.c 这个文件是全志自己的文件,而且我看了一下 24 行也没有 sin 这个函数的调用。

      有没有大佬知道这是个什么情况?

      posted in D1-H/D1s
      Z
      dongyuetu