Git Product home page Git Product logo

duo-buildroot-sdk's People

Contributors

apalrd avatar arielheleneto avatar arnout avatar carbonfix avatar fantasygmm avatar jacmet avatar michael1413 avatar niwatori-chicken avatar oupton avatar pauloantuns avatar pevik avatar smvoss-collins avatar sophgo-forum-service avatar sophgo-wangliang avatar sophgo-xiangsihan avatar u0076 avatar wojtess avatar yann-morin-1998 avatar yue-xiaomin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

duo-buildroot-sdk's Issues

使用 menuconfig 添加 python rootfs package 不生效

环境信息

  • OS: Ubuntu 20.04 LTS x86_64
  • sdk: 主线最新

复现步骤

添加选项

export PATH=/usr/sbin/:$PATH

export MILKV_BOARD=milkv-duo
source milkv/boardconfig-milkv-duo.sh
source build/milkvsetup.sh
defconfig cv1800b_milkv_duo_sd
menuconfig

menuconfig

diff_config

或直接添加

vim build/boards/cv180x/cv1800b_milkv_duo_sd/linux/cvitek_cv1800b_milkv_duo_sd_defconfig

# 在最后添加
CONFIG_TARGET_PACKAGE_PYTHON3.7=y

构建

clean_all
build_all
pack_sd_image

或者一键编译

./build_milkv.sh

复现结果

构建过程中没有构建 python ,生成的镜像中也不包含 python

no RNDIS on win10

When I connected to duo using Windows 10, the RNDIS device was not displayed

image

拉取代码失败

Checking connectivity: 127057, done.
error: invalid path 'buildroot-2021.05/dl/musl-compat-headers/queue.h?rev=1.70'
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

GPIO26 and 27 has ADC, but does work?

The only "analogRead" function that i found on wiringx.h it's commented. (// int analogRead ... ) in duo-sdk/rootfs/usr/include/wiringx.h

There's any method to read analog data with the currently firmware version?
From the Duo Datasheet we can see the ADC pins.

image

_call_kconfig_script:11: no such file or directory: /tmp/duo-buildroot-sdk/build/scripts/.py

I'm using default develop branch (commit: be2a695), the script path is not correct.

/tmp$ git clone https://github.com/milkv-duo/duo-buildroot-sdk.git
/tmp$ cd duo-buildroot-sdk
/tmp/duo-buildroot-sdk$ git log -1
commit be2a69546e05700f669c758bf4540831555716ef (HEAD -> develop, tag: Duo-V1.0.3, origin/develop, origin/HEAD)
Author: carbon <[email protected]>
Date:   Thu Aug 17 14:21:24 2023 +0800

    camera: support sensor gc2083
/tmp/duo-buildroot-sdk$ 
/tmp/duo-buildroot-sdk$ 
/tmp/duo-buildroot-sdk$ 
/tmp/duo-buildroot-sdk$ export MILKV_BOARD=milkv-duo
/tmp/duo-buildroot-sdk$ source milkv/boardconfig-milkv-duo.sh
/tmp/duo-buildroot-sdk$ source build/milkvsetup.sh
/proc/self/fd/14:8: cv1800b_board_sel: assignment to invalid subscript range
  -------------------------------------------------------------------------------------------------------
    Usage:
    (1) menuconfig - Use menu to configure your board.
        ex: $ menuconfig

    (2) defconfig $CHIP_ARCH - List EVB boards($BOARD) by CHIP_ARCH.
       ** cv183x ** -> ['cv1829', 'cv1832', 'cv1835', 'cv1838', 'cv9520', 'cv7581']
       ** cv182x ** -> ['cv1820', 'cv1821', 'cv1822', 'cv1823', 'cv1825', 'cv1826', 'cv7327', 'cv7357']
       ** cv181x ** -> ['cv181x', 'cv1823a', 'cv1821a', 'cv1820a', 'cv1811h', 'cv1811c', 'cv1810c', 'cv1810h', 'cv1812cp', 'cv1812h', 'cv1813h']
       ** cv180x ** -> ['cv180x', 'cv1800b', 'cv1800c', 'cv1801b', 'cv1801c', 'cv180zb']
        ex: $ defconfig cv183x

    (3) defconfig $BOARD - Choose EVB board settings.
        ex: $ defconfig cv1835_wevb_0002a
        ex: $ defconfig cv1826_wevb_0005a_spinand
        ex: $ defconfig cv181x_fpga_c906
  -------------------------------------------------------------------------------------------------------
/tmp/duo-buildroot-sdk$ menuconfig                 
 Run  function 
boards  common_functions.sh  cvisetup.sh  Kconfig  Makefile  milkvsetup.sh  output  panels  scripts  sensors  tools
_call_kconfig_script:11: no such file or directory: /tmp/duo-buildroot-sdk/build/scripts/.py

serial bootloader scripts results in CRC errors

i try to use the serial boot ROM to speed up u-boot development.

however, i'm not able to download the /fsbl/build/cv1800b_milkv_duo_sd/fip.bin file by using python3 cv181x_dl.py --serial --image_dir duo-buildroot-sdk/fsbl/build/cv1800b_milkv_duo_sd/fip.bin

i modified the VID:PID parameters to match my USB2UART bridge controllers. however, i allways get CRC errors using the scripts

INFO: Using serial
INFO: CV181X USB download start

fip_path: duo-buildroot-sdk/fsbl/build/cv1800b_milkv_duo_sd/fip.bin/fip.bin
CV181X USB download start
Connecting to ROM
/dev/ttyUSB0USB port:  \    
USB VID:PID=10C4:EA60 SER=0001 LOCATION=1-1.3.2

done
Send cv_dl_magic.bin...
ACK_CRC_ERROR cmd_crc 9b8; ret_crc 2e43
ACK_CRC_ERROR cmd_crc 9b8; ret_crc 504c
ACK_CRC_ERROR cmd_crc 9b8; ret_crc 5053
ACK_CRC_ERROR cmd_crc 9b8; ret_crc 3120
ACK_CRC_ERROR cmd_crc 9b8; ret_crc 6f61
ACK_CRC_ERROR cmd_crc 9b8; ret_crc d0a
ACK_CRC_ERROR cmd_crc 9b8; ret_crc 616d
ACK_CRC_ERROR cmd_crc 9b8; ret_crc 3a6c
ACK_CRC_ERROR cmd_crc 9b8; ret_crc 3829
ACK_CRC_ERROR cmd_crc 9b8; ret_crc 6172
ACK_CRC_ERROR cmd_crc 9b8; ret_crc 2045
ACK_CRC_ERROR cmd_crc 9b8; ret_crc 2d37
ACK_CRC_ERROR cmd_crc 9b8; ret_crc 2070

i tried this with the Silicon Labs CP210x UART Bridge (CR2102) found on an ESP32 as well as with an standalone FTDI FT232RL.

hope someone can help since the offical documentation (e.g. CvitekBareandNon-BareChipBurningUpgradeOperationGuide_en.pdf) doesn't provide useful information about this topic..

thx

如何使Linux使用2个内核?

我看到cv1800b不支持SMP,只支持AMP,所以无论如何一个任务也无法同时使用两个内核吗?而且大核貌似被锁了850Mhz?有办法解决么

no RNDIS on milkv duo 64MB Ram

Hello,

I have installed the img version 1.0.7 for my device, I can access the board over serial, I can also see the defaul ip adress, but I do not have any RNDIS connection under my Ubuntu dmesg.

Regards,
Alexandru

Kernel CPU load average math is messed up!

The load average should be nearer to 0.00. htop reports a correct CPU %, but the load average comes from the kernel itself:

  CPU[*                                       1.3%]   Tasks: 13, 0 thr; 1 running
  Mem[|||||||||||##******              13.8M/55.4M]   Load average: 3.11 3.07 2.78 
  Swp[                                       0K/0K]   Uptime: 00:34:59

 PID USER      PRI  NI  VIRT   RES   SHR S CPU% MEM%   TIME+  Command                                       
 297 root       20   0  1384  1148   892 R  1.3  2.0  0:00.33 htop                                          
   1 root       20   0  1184   516   496 S  0.0  0.9  0:00.98 init            
  99 root       20   0  1184   472   452 S  0.0  0.8  0:00.03 /sbin/syslogd -n
 103 root       20   0  1172   516   500 S  0.0  0.9  0:00.02 /sbin/klogd -n              
 133 dhcpcd     20   0  1172   872   696 S  0.0  1.5  0:00.01 dhcpcd: [master] [ip4] [ip6]  
 134 root       20   0  1180   852   692 S  0.0  1.5  0:00.05 dhcpcd: [privileged actioneer]
 135 dhcpcd     20   0  1160   776   640 S  0.0  1.4  0:00.00 dhcpcd: [network proxy]
 136 dhcpcd     20   0  1160   656   520 S  0.0  1.2  0:00.00 dhcpcd: [control proxy]
 171 root       20   0   984   664   620 S  0.0  1.2  0:01.30 /usr/sbin/dropbear -R
 175 nobody     20   0  1088   804   692 S  0.0  1.4  0:00.01 /usr/sbin/dnsmasq
 214 root       20   0  1204   684   636 S  0.0  1.2  0:00.01 -sh                  
 284 root       20   0  1008   680   624 S  0.0  1.2  0:01.99 /usr/sbin/dropbear -R
 285 root       20   0  1204   688   640 S  0.0  1.2  0:00.02 -sh

I know I saw a post about Linus not wanting people to mess with the load average math because it was written specially in integer math (because you have to avoid FPU math inside kernel calls).

Looks like some optimizations inside the kernel for x86/x86_64 are causing issues on the RISCV CPU. I don't recall the code, but I know it was highly hand optimized code from what I vaguely remember.

P.S.> even disabled ntp as the cpu has no access to internet

Build Failure make: *** [scripts/fip_v2.mk:32: fsbl-build] Error 2

Env: WSL2 + Ubuntu22.04

Attempting to rebuild the kernel for the milkvduo, using WSL2 with Ubuntu22.04. I wanted to rebuild the kernel with gdbserver added so I set CONFIG_TARGET_PACKAGE_GDBSERVER to y in build/boards/cv180x/cv1800b_milkv_duo_sd/cv1800b_milkv_duo_sd_defconfig. But when attempting to build the kernel using the build_milkv.sh script, or the "step-by-step" way described here I get the following error:

make[1]: *** [Makefile:196: duo-buildroot-sdk/fsbl/build/cv1800b_milkv_duo_sd/bl2/bl2.elf] Error 1
make[1]: Leaving directory 'duo-buildroot-sdk/fsbl'
make: *** [scripts/fip_v2.mk:32: fsbl-build] Error 2
Error: Build board milkv-duo failed!

I get this error regardless what I set CONFIG_TARGET_PACKAGE_GDBSERVER to, what could be the issue here? The error is referring to

	${Q}$(MAKE) -j${NPROC} -C ${FSBL_PATH} O=${FSBL_OUTPUT_PATH} BLCP_2ND_PATH=${BLCP_2ND_PATH} \
		LOADER_2ND_PATH=${UBOOT_PATH}/${UBOOT_OUTPUT_FOLDER}/u-boot-raw.bin

So I cannot really tell what the issue is

Unable to login through SSH

Hi,

I've just bought the board and cannot login via SSH. I always get the:

ssh: connect to host 192.168.42.xxx port 22: Connection refused

I have followed the tutorial for setting up from the docs website.

I have also tried flashing the two last images and also a custom one for archlinux. But all have the same issue.
Also I have tried connecting from both my Mint installation and my Windows 11.

Currently, I cannot connect through the serial interface and could not find any other direction on the internet.

What could I do in this situation?

Empty Partition

Hi! I just got my Duo, and I decided I wanted it to have my entire 120 GiB SD card. After poking through some files, I noticed that there's this empty partition, as shown in milkv/genimage-milkv-duo.cfg.

Is there any purpose to that empty partition? I deleted it to expand the rootfs/"linux 0x83" partition, but I'm not sure if it's used for anything.

Thanks for the great guide! :)

Duplicated Title in README?

It seems like there are duplicated title of "Tools to be installed on Ubuntu 20.04 LTS" in the README file. Maybe they can be combined?

H26x Not supported by this SDK

This SDK works fine with MMF, but it doesn't have your features.

[root@milkv-duo]~# sample_venc -c 264
[initSysAndVb]-2733: [Pool 0] u32BlkSize: 12288, u32BlkCnt: 1
[   15.132331] [ERR] vidEnc_open = 566, cviVEncOpen
[   15.137758] [ERR] CVI_VENC_CreateChn = 1072, venc_init_encoder
[   15.144120] CVI_VENC_CreateChn with -1073250298
[ERR] CVI_VENC_CreateChn = 143, ioctl CVI_VC_VENC_CREATE_CHN fail with -1073250298
[ERR] SAMPLE_COMM_VENC_Create = 793, CVI_VENC_CreateChn [0] failed with -1073250298
[ERR] SAMPLE_COMM_VENC_Start = 2062, SAMPLE_COMM_VENC_Create failed with -1073250298
[ERR] _SAMPLE_VENC_INIT_CHANNEL = 2600, Venc Start failed for 0xffffffff!
[ERR] SAMPLE_VENC_START = 2237, [Chn 0]sample venc init failed
[ERR] venc_main = 703, SAMPLE_VENC_START

The call of CVI_VENC_CreateChn is failed with CVI_ERR_VENC_NULL_PTRNull. The original SDK works normally.

Random MAC Address on every boot

Hello there,

I use a milkV Duo with an attached Ethernet Port. Unfortunately every time I boot the device it get's a new random MAC Address.

How can this be avoided?

Mounting DATA partition Error

Hello.
I meet issue when Mounting DATA partition. Please help

Log: kernel boot error.log
Mounting DATA partition
[ 3.117185] ubi3: attaching mtd7
[ 3.124463] ubi3 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 6:0, read only 0 bytes, retry
[ 3.136230] ubi3 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 6:0, read only 0 bytes, retry
[ 3.148351] ubi3 warning: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 6:0, read only 0 bytes, retry
[ 3.160337] ubi3 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 6:0, read 0 bytes
[ 3.170804] CPU: 0 PID: 153 Comm: ubiattach Not tainted 5.10.4-tag- #1
[ 3.177831] Call Trace:
[ 3.180662] [] walk_stackframe+0x0/0x6c
[ 3.186546] [] ubi_io_read+0x1ea/0x2c6
[ 3.192344] [] ubi_io_read_ec_hdr+0x8a/0x24e
[ 3.198679] [] ubi_attach+0x2bc/0xefa
[ 3.204393] [] __vmalloc_node_range+0xf8/0x17a
[ 3.210905] [] ubi_attach_mtd_dev+0x78c/0xb18
[ 3.217327] [] ctrl_cdev_ioctl+0xbc/0x19c
[ 3.223397] [] ioctl_file_clone+0x7c/0x80
[ 3.229464] [] vfs_ioctl+0xc/0x22
[ 3.234808] [] ioctl_file_clone+0x7c/0x80
[ 3.240869] [] sys_ioctl+0xae/0x538
[ 3.246396] [] ioctl_file_clone+0x7c/0x80
[ 3.252470] [] check_syscall_nr+0x1e/0x22
[ 3.258529] UBI assert failed in ubi_io_read at 190 (pid 153)
[ 3.264757] CPU: 0 PID: 153 Comm: ubiattach Not tainted 5.10.4-tag- #1
[ 3.271784] Call Trace:
[ 3.274340] [] walk_stackframe+0x0/0x6c
[ 3.280328] [] ubi_io_read+0x220/0x2c6
[ 3.286127] [] ubi_io_read_ec_hdr+0x8a/0x24e
[ 3.292464] [] ubi_attach+0x2bc/0xefa
[ 3.298172] [] __vmalloc_node_range+0xf8/0x17a
[ 3.304687] [] ubi_attach_mtd_dev+0x78c/0xb18
[ 3.311148] [] ctrl_cdev_ioctl+0xbc/0x19c
[ 3.317246] [] ioctl_file_clone+0x7c/0x80
[ 3.323348] [] vfs_ioctl+0xc/0x22
[ 3.328703] [] ioctl_file_clone+0x7c/0x80
[ 3.334769] [] sys_ioctl+0xae/0x538
[ 3.340300] [] ioctl_file_clone+0x7c/0x80
[ 3.346366] [] check_syscall_nr+0x1e/0x22
[ 3.352450] ubi3 error: ubi_attach_mtd_dev: failed to attach mtd7, error -5
ubiattach: error!: cannot attach mtd7
error 5 (I/O error)
ubiformat: mtd7 (nand), size 5505024 bytes (5.2 MiB), 42 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 6 -- 16 % complete

更新到duo 1.0.5后,开机lcd点亮后遇到usb启动,lcd就息屏

背景:
更新代码到最新。
移植st7735后,发现开机时lcd会亮,但是一旦执行到

[ 3.718097] sh (119): drop_caches: 3

之后就会屏幕黑掉,后续log是usb加载。

不清楚是不是usb加载后拉掉了spi的电。

spi配置

`&spi2 {
status = "okay";

/delete-node/ spidev@0;


st7789v: st7789v@0{
	compatible = "sitronix,st7789v";
	reg = <0>;
	status = "okay";
spi-max-frequency = <48000000>;
	spi-cpol;
	spi-cpha;
	rotate = <90>;
	fps = <30>;
	rgb;
	buswidth = <8>;

	//dc-gpios = <&port 21 GPIO_ACTIVE_HIGH>;	//DC
	dc-gpios = <&porta 23 GPIO_ACTIVE_HIGH>;	//DC
	reset-gpios = <&porta 24 GPIO_ACTIVE_HIGH>; //RES
	led-gpios = <&porta 14 GPIO_ACTIVE_HIGH>; //BL

	debug = <0x0>;
};

};`

log如下:

[ 0.000000] Linux version 5.10.4-tag- (youkai@ubuntu) (riscv64-unknown-linux-musl-gcc (Xuantie-900 linux-5.10.4 musl gcc Toolchain V2.6.1 B-20220906) 10.2.0, GNU ld (GNU Binutils) 2.35) #1 PREEMPT Mon Nov 6 22:54:56 +08 2023 [ 0.000000] earlycon: sbi0 at I/O port 0x0 (options '') [ 0.000000] printk: bootconsole [sbi0] enabled [ 0.000000] efi: UEFI not found. [ 0.000000] Ion: Ion memory setup at 0x0000000082473000 size 26 MiB [ 0.000000] OF: reserved mem: initialized node ion, compatible id ion-region [ 0.000000] Zone ranges: [ 0.000000] DMA32 [mem 0x0000000080000000-0x0000000083f3ffff] [ 0.000000] Normal empty [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000080000000-0x0000000083f3ffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x0000000083f3ffff] [ 0.000000] On node 0 totalpages: 16192 [ 0.000000] DMA32 zone: 222 pages used for memmap [ 0.000000] DMA32 zone: 0 pages reserved [ 0.000000] DMA32 zone: 16192 pages, LIFO batch:3 [ 0.000000] SBI specification v0.3 detected [ 0.000000] SBI implementation ID=0x1 Version=0x9 [ 0.000000] SBI v0.2 TIME extension detected [ 0.000000] SBI v0.2 IPI extension detected [ 0.000000] SBI v0.2 RFENCE extension detected [ 0.000000] riscv: ISA extensions acdfimsuv [ 0.000000] riscv: ELF capabilities acdfimv [ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768 [ 0.000000] pcpu-alloc: [0] 0 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 15970 [ 0.000000] Kernel command line: root=/dev/mmcblk0p2 rootwait rw console=tty0 console=ttyS0,115200 earlycon=sbi loglevel=9 riscv.fwsz=0x80000 [ 0.000000] Dentry cache hash table entries: 8192 (order: 4, 65536 bytes, linear) [ 0.000000] Inode-cache hash table entries: 4096 (order: 3, 32768 bytes, linear) [ 0.000000] Sorting __ex_table... [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off [ 0.000000] Memory: 28932K/64768K available (3946K kernel code, 498K rwdata, 1721K rodata, 152K init, 218K bss, 35836K reserved, 0K cma-reserved) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] rcu: Preemptible hierarchical RCU implementation. [ 0.000000] rcu: RCU event tracing is enabled. [ 0.000000] Trampoline variant of Tasks RCU enabled. [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies. [ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0 [ 0.000000] riscv-intc: 64 local interrupts mapped [ 0.000000] plic: interrupt-controller@70000000: mapped 101 interrupts with 1 handlers for 2 contexts. [ 0.000000] random: get_random_bytes called from start_kernel+0x2e0/0x41c with crng_init=0 [ 0.000000] riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [0] [ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x5c40939b5, max_idle_ns: 440795202646 ns [ 0.000010] sched_clock: 64 bits at 25MHz, resolution 40ns, wraps every 4398046511100ns [ 0.008481] Console: colour dummy device 80x25 [ 0.014665] printk: console [tty0] enabled [ 0.018916] Calibrating delay loop (skipped), value calculated using timer frequency.. 50.00 BogoMIPS (lpj=100000) [ 0.029676] pid_max: default: 4096 minimum: 301 [ 0.034539] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear) [ 0.042044] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear) [ 0.051671] ASID allocator initialised with 65536 entries [ 0.057447] rcu: Hierarchical SRCU implementation. [ 0.062874] EFI services will not be available. [ 0.068011] devtmpfs: initialized [ 0.077542] early_time_log: do_initcalls: 4664551us [ 0.083308] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns [ 0.093449] futex hash table entries: 16 (order: -4, 384 bytes, linear) [ 0.100407] pinctrl core: initialized pinctrl subsystem [ 0.106367] NET: Registered protocol family 16 [ 0.111512] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations [ 0.118900] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations [ 0.127940] thermal_sys: Registered thermal governor 'step_wise' [ 0.144109] OF: /gpio@03020000/gpio-controller@0: could not find phandle [ 0.157383] OF: /gpio@03021000/gpio-controller@1: could not find phandle [ 0.164374] OF: /gpio@03022000/gpio-controller@2: could not find phandle [ 0.171363] OF: /gpio@03023000/gpio-controller@3: could not find phandle [ 0.178347] OF: /gpio@05021000/gpio-controller@4: could not find phandle [ 0.187357] clk reset: nr_reset=64 resource_size=8 [ 0.192996] get audio clk=24576000 [ 0.196588] cvitek-i2s-subsys 4108000.i2s_subsys: Set clk_sdma_aud0~3 to 24576000 [ 0.218308] dw_dmac 4330000.dma: CVITEK DMA Controller, 8 channels, probe done! [ 0.226943] SCSI subsystem initialized [ 0.231299] usbcore: registered new interface driver usbfs [ 0.237139] usbcore: registered new interface driver hub [ 0.242783] usbcore: registered new device driver usb [ 0.251581] Ion: ion_parse_dt_heap_common: id 0 type 2 name carveout align 1000 [ 0.259698] Ion: rmem_ion_device_init: heap carveout base 0x0000000082473000 size 0x0000000001acd000 dev (____ptrval____) [ 0.271069] ion_carveout_heap_create, size=0x1acd000 [ 0.276342] cvi_get_rtos_ion_size, rtos ion_size get:0x0 [ 0.411908] platform carveout: [ion] add heap id 0, type 2, base 0x82473000, size 0x1acd000 [ 0.421009] Advanced Linux Sound Architecture Driver Initialized. [ 0.428759] clocksource: Switched to clocksource riscv_clocksource [ 0.448561] NET: Registered protocol family 2 [ 0.454220] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear) [ 0.463017] TCP established hash table entries: 512 (order: 0, 4096 bytes, linear) [ 0.470895] TCP bind hash table entries: 512 (order: 0, 4096 bytes, linear) [ 0.478129] TCP: Hash tables configured (established 512 bind 512) [ 0.484731] UDP hash table entries: 128 (order: 0, 4096 bytes, linear) [ 0.491549] UDP-Lite hash table entries: 128 (order: 0, 4096 bytes, linear) [ 0.499011] NET: Registered protocol family 1 [ 0.504236] RPC: Registered named UNIX socket transport module. [ 0.510427] RPC: Registered udp transport module. [ 0.515282] RPC: Registered tcp transport module. [ 0.520201] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.529610] Initialise system trusted keyrings [ 0.534544] workingset: timestamp_bits=62 max_order=13 bucket_order=0 [ 0.548891] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.556077] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc. [ 0.563340] Key type asymmetric registered [ 0.567604] Asymmetric key parser 'x509' registered [ 0.579088] Serial: 8250/16550 driver, 5 ports, IRQ sharing disabled [ 0.587890] printk: console [ttyS0] disabled [ 0.592472] 4140000.serial: ttyS0 at MMIO 0x4140000 (irq = 15, base_baud = 1562500) is a 16550A [ 0.601597] printk: console [ttyS0] enabled [ 0.610239] printk: bootconsole [sbi0] disabled [ 0.623176] cvi-spif 10000000.cvi-spif: unrecognized JEDEC id bytes: 00 00 00 00 00 00 [ 0.631497] cvi-spif 10000000.cvi-spif: device scan failed [ 0.637244] cvi-spif 10000000.cvi-spif: unable to setup flash chip [ 0.650222] libphy: Fixed MDIO Bus: probed [ 0.655945] dwc2 4340000.usb: axi clk installed [ 0.660769] dwc2 4340000.usb: apb clk installed [ 0.665533] dwc2 4340000.usb: 125m clk installed [ 0.670387] dwc2 4340000.usb: 33k clk installed [ 0.675149] dwc2 4340000.usb: 12m clk installed [ 0.680005] dwc2 4340000.usb: EPs: 8, dedicated fifos, 3072 entries in SPRAM [ 0.688009] dwc2 4340000.usb: DWC OTG Controller [ 0.692936] dwc2 4340000.usb: new USB bus registered, assigned bus number 1 [ 0.700274] dwc2 4340000.usb: irq 36, io mem 0x04340000 [ 0.706746] hub 1-0:1.0: USB hub found [ 0.710824] hub 1-0:1.0: 1 port detected [ 0.716702] usbcore: registered new interface driver usb-storage [ 0.723455] i2c /dev entries driver [ 0.729403] sdhci: Secure Digital Host Controller Interface driver [ 0.735897] sdhci: Copyright(c) Pierre Ossman [ 0.740471] sdhci-pltfm: SDHCI platform and OF driver helper [ 0.746653] cvi:sdhci_cvi_probe [ 0.796779] mmc0: SDHCI controller on 4310000.cv-sd [4310000.cv-sd] using ADMA 64-bit [ 0.805034] cvi_proc_init cvi_host 0x(____ptrval____) [ 0.811068] usbcore: registered new interface driver usbhid [ 0.820788] usbhid: USB HID core driver [ 0.825713] fb_st7789v spi0.0: fbtft_property_value: buswidth = 8 [ 0.832199] fb_st7789v spi0.0: fbtft_property_value: debug = 0 [ 0.838386] fb_st7789v spi0.0: fbtft_property_value: rotate = 0 [ 0.844649] fb_st7789v spi0.0: fbtft_property_value: fps = 30 [ 0.930629] mmc0: new high speed SDHC card at address aaaa [ 0.937335] mmcblk0: mmc0:aaaa SU08G 7.40 GiB [ 0.946527] mmcblk0: p1 p2 p3 [ 1.356494] random: fast init done [ 1.373156] Console: switching to colour frame buffer device 16x10 [ 1.380940] graphics fb0: fb_st7789v frame buffer, 128x160, 40 KiB video memory, 4 KiB buffer memory, fps=31, spi0.0 at 48 MHz [ 1.397126] cvitek-i2s 4100000.i2s: cvi_i2s_probe [ 1.403882] cvitek-i2s 4110000.i2s: cvi_i2s_probe [ 1.414475] cvitek-i2s 4120000.i2s: cvi_i2s_probe [ 1.427565] cvitek-i2s 4130000.i2s: cvi_i2s_probe [ 1.437222] cviteka-adc sound_adc: cviteka_adc_probe, dev name=sound_adc [ 1.445878] cviteka-adc sound_adc: cviteka_adc_probe start devm_snd_soc_register_card [ 1.461330] cvitekaadc 300a100.adc: cvitekaadc_probe [ 1.473553] cviteka-dac sound_dac: cviteka_dac_probe, dev name=sound_dac [ 1.485123] cvitekadac 300a000.dac: cvitekadac_probe [ 1.491848] cvitekadac_probe gpio_is_valid mute_pin_l [ 1.502790] cv1835-max98357a sound: snd card name = cv1835_max98357a [ 1.526922] NET: Registered protocol family 10 [ 1.534259] Segment Routing with IPv6 [ 1.545607] NET: Registered protocol family 17 [ 1.551737] random: crng init done [ 1.558855] Loading compiled-in X.509 certificates [ 1.603273] cviteka-adc sound_adc: cviteka_adc_probe, dev name=sound_adc [ 1.611808] cviteka-adc sound_adc: cviteka_adc_probe start devm_snd_soc_register_card [ 1.627825] cviteka-dac sound_dac: cviteka_dac_probe, dev name=sound_dac [ 1.642673] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 1.668252] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 1.677043] cfg80211: failed to load regulatory.db [ 1.683520] ALSA device list: [ 1.687740] dw-apb-uart 4140000.serial: forbid DMA for kernel console [ 1.715690] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null) [ 1.726136] VFS: Mounted root (ext4 filesystem) on device 179:2. [ 1.737466] devtmpfs: mounted [ 1.741510] Freeing unused kernel memory: 152K [ 1.747355] Kernel memory protection not selected by kernel config. [ 1.759179] Run /sbin/init as init process [ 1.769483] with arguments: [ 1.777022] /sbin/init [ 1.780446] with environment: [ 1.784627] HOME=/ [ 1.787724] TERM=linux [ 1.791158] early_time_log: run_init_process: 6378169us [ 1.878890] EXT4-fs (mmcblk0p2): re-mounted. Opts: errors=remount-ro [ 2.557255] cv180x_sys: bad vermagic: kernel tainted. [ 2.563788] Disabling lock debugging due to kernel taint [ 2.570885] cv180x_sys: loading out-of-tree module taints kernel. [ 2.600614] res-reg: start: 0xa0c8000, end: 0xa0c801f, virt-addr(ffffffd0040c1000). [ 2.619673] CVITEK CHIP ID = 22 [ 2.638827] cvi_rtos_cmdqu_probe start --- [ 2.649226] name=1900000.rtos_cmdqu [ 2.657030] res-reg: start: 0x1900000, end: 0x1900fff, virt-addr(ffffffd0040c5000). [ 2.666851] cvi_rtos_cmdqu_probe DONE [ 2.672188] [cvi_spinlock_init] success [ 2.896807] RTOS_CMDQU_SEND_WAIT timeout [ 2.901892] SYS_CMD_INFO_LINUX_INIT_DONE fail [ 2.907782] communicate with rtos fail [ 2.926365] cif a0c2000.cif: cam0 clk installed [ 2.932457] cif a0c2000.cif: cam1 clk installed [ 2.942807] cif a0c2000.cif: vip_sys_2 clk installed [ 2.955838] cif a0c2000.cif: clk_mipimpll clk installed 00000000833de2c3 [ 2.967266] cif a0c2000.cif: clk_disppll clk installed 00000000d25175b7 [ 2.976056] cif a0c2000.cif: clk_fpll clk installed 00000000805f969e [ 2.989682] cif a0c2000.cif: (0) res-reg: start: 0xa0c2000, end: 0xa0c3fff. [ 3.006362] cif a0c2000.cif: virt-addr(000000009c846059) [ 3.013568] cif a0c2000.cif: (1) res-reg: start: 0xa0d0000, end: 0xa0d0fff. [ 3.022592] cif a0c2000.cif: virt-addr(00000000ccabe0bb) [ 3.033643] cif a0c2000.cif: (2) res-reg: start: 0xa0c4000, end: 0xa0c5fff. [ 3.051410] cif a0c2000.cif: virt-addr(000000005eb7584c) [ 3.058559] cif a0c2000.cif: (3) res-reg: start: 0x3001c30, end: 0x3001c5f. [ 3.067584] cif a0c2000.cif: virt-addr(00000000e6740473) [ 3.078725] cif a0c2000.cif: no pad_ctrl for cif [ 3.091406] cif a0c2000.cif: request irq-26 as cif-irq0 [ 3.101042] cif a0c2000.cif: request irq-27 as cif-irq1 [ 3.108101] cif a0c2000.cif: rst_pin = 424, pol = 1 [ 3.129320] snsr_i2c snsr_i2c: i2c:-------hook 0 [ 3.138214] snsr_i2c snsr_i2c: i2c:-------hook 1 [ 3.145220] snsr_i2c snsr_i2c: i2c:-------hook 2 [ 3.151855] snsr_i2c snsr_i2c: i2c:-------hook 3 [ 3.158391] snsr_i2c snsr_i2c: i2c:-------hook 4 [ 3.222381] vi_core_probe:203(): res-reg: start: 0xa000000, end: 0xa07ffff, virt-addr(ffffffd004480000). [ 3.234335] vi_core_probe:216(): irq(28) for isp get from platform driver. [ 3.247718] vi_tuning_buf_setup:253(): tuning fe_addr[0]=0x8171f490, be_addr[0]=0x81717290, post_addr[0]=0x81700000 [ 3.270064] vi_tuning_buf_setup:253(): tuning fe_addr[1]=0x816df490, be_addr[1]=0x816d7290, post_addr[1]=0x816c0000 [ 3.289968] vi_tuning_buf_setup:253(): tuning fe_addr[2]=0x816ff490, be_addr[2]=0x816f7290, post_addr[2]=0x816e0000 [ 3.309777] sync_task_init:177(): sync_task_init vi_pipe 0 [ 3.317037] sync_task_init:177(): sync_task_init vi_pipe 1 [ 3.324287] sync_task_init:177(): sync_task_init vi_pipe 2 [ 3.340935] vi_core_probe:252(): isp registered as cvi-vi [ 3.411286] cvi_dwa_probe:487(): done with rc(0). [ 3.449977] cv180x-cooling cv180x_cooling: elems of dev-freqs=6 [ 3.466628] cv180x-cooling cv180x_cooling: dev_freqs[0]: 850000000 500000000 [ 3.475920] cv180x-cooling cv180x_cooling: dev_freqs[1]: 425000000 375000000 [ 3.489002] cv180x-cooling cv180x_cooling: dev_freqs[2]: 425000000 300000000 [ 3.507107] cv180x-cooling cv180x_cooling: Cooling device registered: cv180x_cooling [ 3.557705] jpu ctrl reg pa = 0xb030000, va = 000000002553fa1c, size = 256 [ 3.566939] end jpu_init result = 0x0 [ 3.700227] cvi_vc_drv_init result = 0x0 [ 3.718097] sh (119): drop_caches: 3 [ 3.919406] dwc2 4340000.usb: new device is high-speed [ 3.942269] using random self ethernet address [ 3.942290] using random host ethernet address [ 3.994692] usb0: HOST MAC da:6e:e0:d2:0c:45 [ 3.995030] usb0: MAC ce:9d:f5:ec:9e:27 [ 3.995107] dwc2 4340000.usb: bound driver configfs-gadget [ 4.135360] dwc2 4340000.usb: new device is high-speed [ 4.172829] dwc2 4340000.usb: new address 11 [ 4.351213] dwc2 4340000.usb: new device is high-speed [ 4.388549] dwc2 4340000.usb: new address 11 [ 5.016822] IPv6: ADDRCONF(NETDEV_CHANGE): usb0: link becomes ready

apt-get: not found

I get this error after first login in to Duo-V1.0.6. where from I can start?

pre-up ifconfig eth0 hw ether .... Not providing persistent MAC Address on IO Board

I have followed the directions for providing a fixed MAC Address when using the IO Board modifying /etc/network/interfaces and adding:

[02:00 milkv-duo:~] # cat /etc/network/interfaces
# interface file auto-generated by buildroot

auto lo
iface lo inet loopback

# added persistent hardware ethernet MAC
pre-up ifconfig eth0 hw 72:a2:bb:83:cf:12

And I've configured dhcpd.conf to send hostname so the server can update the local DNS with forward and reverse mapping for the IP address handed out to the duo. However, on reboot, the MAC address is different resulting in a different address being assigned each time.

With /etc/network/interfaces as shown above, the local dhcp server sees:

Jan 14 19:18:40 valkyrie dhcpd[810]: DHCPOFFER on 192.168.6.164 to 16:a7:65:c0:63:f3 (milkv-duo) via enp5s0
Jan 14 19:18:40 valkyrie dhcpd[810]: DHCPREQUEST for 192.168.6.164 (192.168.6.14) from 16:a7:65:c0:63:f3 (milkv-duo) via enp5s0
Jan 14 19:18:40 valkyrie dhcpd[810]: DHCPACK on 192.168.6.164 to 16:a7:65:c0:63:f3 (milkv-duo) via enp5s0

So despite having pre-up ifconfig eth0 hw 72:a2:bb:83:cf:12 set in /etc/network/interfaces, the server sees the MAC Address of the duo as 16:a7:65:c0:63:f3.

Is there something else required to have the IO Board appear at a fixed MAC?

After change linux menuconfig build error

/home/kilo/Downloads/duo-buildroot-sdk/linux_5.10/drivers/usb/dwc2/hcd_intr.c: In function 'dwc2_hc_chhltd_intr_dma':
/home/kilo/Downloads/duo-buildroot-sdk/linux_5.10/drivers/usb/dwc2/hcd_intr.c:1988:4: error: expected '}' before 'else'
1988 | } else {
| ^~~~

New packages linking musl-xthead.so, others non-existing musl-riscv64.so

I did make menuconfig in buildroot-2021.05/ and enabled a few new packages:

  • qjs
  • lua
  • micropython
  • etc

saved it in configs/milkv_duo_musl_riscv64_defconfig.

Further also made changes to build/boards/cv180x/cv1800b_milkv_duo_sd/memmap.py#L43 to set ION_SIZE=0 to have more memory available.

I built the image with build_milkv.sh, copied the .img on the SD card, and started the board:

% cd /usr/bin/

% lua
Lua 5.3.6  Copyright (C) 1994-2020 Lua.org, PUC-Rio
> ^C
 
% qjs
-sh: qjs: not found

% ls -l qjs
-rwxr-xr-x    1 dhcpcd   dhcpcd     1019016 Oct 15  2023 qjs

% file lua
lua: ELF 64-bit LSB shared object, UCB RISC-V, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-riscv64v0p7_xthead.so.1, stripped

% file qjs
qjs: ELF 64-bit LSB shared object, UCB RISC-V, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-riscv64.so.1, stripped

where I noticed different shared libraries linked, I "fixed" it by:

% cd /lib/
% ln -s ld-musl-riscv64v0p7_xthead.so.1 ld-musl-riscv64.so.1

% qjs
QuickJS - Type "\h" for help
qjs > ^C

and it worked so far, so after that step the /lib looks like this:

% ls -l /lib
total 2037
drwxr-xr-x    3 dhcpcd   dhcpcd        1024 Oct 15  2023 dhcpcd
lrwxrwxrwx    1 root     root            31 Jan  1 00:06 ld-musl-riscv64.so.1 -> ld-musl-riscv64v0p7_xthead.so.1
lrwxrwxrwx    1 dhcpcd   dhcpcd          37 Oct 15  2023 ld-musl-riscv64v0p7_xthead.so.1 -> ../usr/lib64v0p7_xthead/lp64d/libc.so
lrwxrwxrwx    1 dhcpcd   dhcpcd          18 Oct 15  2023 libatomic.so.1 -> libatomic.so.1.2.0
-rwxr-xr-x    1 dhcpcd   dhcpcd       18064 Oct 15  2023 libatomic.so.1.2.0
lrwxrwxrwx    1 dhcpcd   dhcpcd          17 Oct 15  2023 libblkid.so.1 -> libblkid.so.1.1.0
-rwxr-xr-x    1 dhcpcd   dhcpcd      287208 Oct 15  2023 libblkid.so.1.1.0
-rwxr-xr-x    1 dhcpcd   dhcpcd       88256 Oct 15  2023 libgcc_s.so.1
lrwxrwxrwx    1 dhcpcd   dhcpcd          19 Oct 15  2023 libstdc++.so.6 -> libstdc++.so.6.0.28
-rwxr-xr-x    1 dhcpcd   dhcpcd     1639696 Oct 15  2023 libstdc++.so.6.0.28
-rwxr-xr-x    1 dhcpcd   dhcpcd        2717 Oct 15  2023 libstdc++.so.6.0.28-gdb.py
lrwxrwxrwx    1 dhcpcd   dhcpcd          16 Oct 15  2023 libuuid.so.1 -> libuuid.so.1.3.0
-rwxr-xr-x    1 dhcpcd   dhcpcd       30928 Oct 15  2023 libuuid.so.1.3.0
lrwxrwxrwx    1 dhcpcd   dhcpcd           6 Oct 15  2023 lp64d -> ../lib

Is this something I need to properly fix in menuconfig setting somewhere or what is the proper way?

PS: Thanks to all involved devs who made this duo-buildroot-sdk

Using opkg starting to create a repo with all packages in buildroot, or alternative distributions

I have been using buildroot now quite often to fine-tune my disk image to deploy, and I realized it would be more efficient to provide a repo with precompiled packages and add and remove those individually, instead to run make menuconfig and all those steps.

  • opkg: my first thought would be to pseudo select a single package, build it, and then make a snapshot of output/milkv_duo_musl_riscv64/target/ and feed the "new" files into .ipkg, then clean up output/milkv.../target/ again, repeat with next package - based on how making ipkg
  • Debian/riscv64 and try to get apt/aptitude/dpkg work with low memory usage
  • Fedora/riscv64, see this repo: https://github.com/chainsx/fedora-riscv-builder first steps taken, perhaps rpm package could be used directly?

Any thoughts & comments welcome.

What exactly is meant by "copy all to a blank tf card.." in how_to_download.txt, which is generated by the spinand configuration?

There is about 35M in the directory where "how_to_download.txt" is found, but the total project is like 10G. There are lots of files compiled in build, in install, what is all?? I know a lot of it is redundant configurations/drivers for other devices, but I do not understand what or how to install.

The physical positioning of the optional NAND flash footprint is right in front of the microSD card reader is, and I physically cannot put an SD card in this device, there is a SMD flash block in the way, and I would need to snap the card to complete the "how_to_download.txt" instructions.

makefile 9 all error 1

collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:78: sample_venc] Error 1
make[1]: se sale del directorio '/home/icelon/risck/duo-buildroot-sdk/middleware/v2/sample/venc'
make: *** [Makefile:9: all] Error 1

CONFIG_RTL8821CS does not produce anything.

In the kernel config, there is an option config RTL8821CS. However, this config does not control anything. Setting it to m will not produce any .ko kernel modules.
Please check if there anything related to this missing in this sdk.

How to make change to config of buildroot?

I am trying to add dtc to my target image of milk-duo.
When I want to change the config of kernel, I can run menuconfig_kernel. But I can't find a way to change the config of buildroot.
Is there any way I can achieve this?

Looking forward to your reply~

Debian不能使用ssh登录duo,提示密码不正确

使用官方镜像v1.0.5
使用登录命令ssh [email protected]后输入密码milkv后会出现以下提示:

ssh [email protected]
[email protected]'s password: 
Permission denied, please try again.
[email protected]'s password: 
Permission denied, please try again.
[email protected]'s password: 
[email protected]: Permission denied (publickey,password).

使用了boradIO扩展版连接网线

本机操作系统信息

uname -a
Linux debian01 6.1.0-13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.55-1 (2023-09-29) x86_64 GNU/Linux

使用ssh版本

ssh -V
OpenSSH_9.2p1 Debian-2+deb12u1, OpenSSL 3.0.11 19 Sep 2023

这可能是哪里出了问题?求解惑

How can I read 7bytes in a row with wiringx

Sorry if this isn't the right place to ask but I'm very new to programming and looking for a little help. My Duo is connected to an aht21 temp and humidity sensor. Once the sensor is initialized and takes a measurement it wants to returns 7 bytes in a row. On my rpi pico I was able to get the sensor reading when I read the 7bytes in one shot. I've tried looping the wiringXI2CRead() function but I can only ready the 1st byte over and over again. I there a way to read that many bytes using wiringX. It seems that I can only read 1 or two bytes at a time. Thanks

time commend not working

time commend will only show 0.00s
eg:
[root@milkv-duo]/var# time echo "scale=1000; 4*a(1)" | bc -l
real 0m 0.00s
user 0m 0.00s
sys 0m 0.00s
3.141592653589793238462643383279502884197169399375105820974944592307
81640628620899862803482534211706798214808651328230664709384460955058
22317253594081284811174502841027019385211055596446229489549303819644
28810975665933446128475648233786783165271201909145648566923460348610
45432664821339360726024914127372458700660631558817488152092096282925
40917153643678925903600113305305488204665213841469519415116094330572
70365759591953092186117381932611793105118548074462379962749567351885
75272489122793818301194912983367336244065664308602139494639522473719
07021798609437027705392171762931767523846748184676694051320005681271
45263560827785771342757789609173637178721468440901224953430146549585
37105079227968925892354201995611212902196086403441815981362977477130
99605187072113499999983729780499510597317328160963185950244594553469
08302642522308253344685035261931188171010003137838752886587533208381
42061717766914730359825349042875546873115956286388235378759375195778
18577805321712268066130019278766111959092164201988

How do I access the kernel configuration in the build root

I have the buildroot set up in a docker container and it works great to build the stock image. I need to make some changes to the kernel and the rootfs. I think I figured out how to use buildroot enough to add some app to the rootfs after loading a defconfig and running make menuconfig in the buildroot2021.05 folder. What I can't get is how to how to configure the kernel. I can go into the kernel folder and make a kernel but I have no idea what it's using as a config and where it's hidden. If I had it I could then just cross compile the kernel in the linux-5.10 folder just like any kernel. I'm glad milkv provided a buildroot but they hid everything under a thick layer of scripts and it makes it hard to change anything from the stock.

`undefined reference to '__atomic_compare_exchange_1'` when running `./build_milkv.sh`

After running ./build_milkv.sh, I got error like this:

[riscv64-unknown-linux-musl-gcc] sample_venc.o
/home/vitalyr/projects/dev/embed/duo-buildroot-sdk/host-tools/gcc/riscv64-linux-musl-x86_64/bin/../lib/gcc/riscv64-unknown-linux-musl/10.2.0/../../../../riscv64-unknown-linux-musl/bin/ld: /home/vitalyr/projects/dev/embed/duo-buildroot-sdk/middleware/v2/lib/libsys.a(cvi_vb.o): in function `CVI_VB_Init':
/root/.jenkins/workspace/v4.1.0_release_build/middleware/v2/modules/sys/src/cvi_vb.c:201: undefined reference to `__atomic_compare_exchange_1'
/home/vitalyr/projects/dev/embed/duo-buildroot-sdk/host-tools/gcc/riscv64-linux-musl-x86_64/bin/../lib/gcc/riscv64-unknown-linux-musl/10.2.0/../../../../riscv64-unknown-linux-musl/bin/ld: /home/vitalyr/projects/dev/embed/duo-buildroot-sdk/middleware/v2/lib/libsys.a(cvi_vb.o): in function `CVI_VB_Exit':
/root/.jenkins/workspace/v4.1.0_release_build/middleware/v2/modules/sys/src/cvi_vb.c:225: undefined reference to `__atomic_compare_exchange_1'
collect2: error: ld returned 1 exit status

It seems to be already fixed by gcc toolchains([1], [2], [3]), but duo-build root-SDK will download an older gcc toolchain (gcc 10) to build the image. How about updating the toolchain?

  1. riscv-collab/riscv-gcc#12
  2. https://www.overleaf.com/project/624c33c4e2d49b02be626e13
  3. advancedtelematic/aktualizr#1427 (comment)

LANGAGES

Hi,
Why not include LUA or a BASIC like GAMBAS.

Best regards
Georges

在按照官方文档编译uboot时出现问题

在编译官方uboot时执行build_uboot报错
https://doc.sophgo.com/cvitek-develop-docs/master/docs_latest_release/CV180x_CV181x/zh/01.software/OSDRV/U-boot_Porting_Development_Guide/build/html/3_U-boot_Transplant.html
duo-buildroot-sdk/u-boot-2021.10/arch/riscv/cpu/mtrap.S: Assembler messages: duo-buildroot-sdk/u-boot-2021.10/arch/riscv/cpu/mtrap.S:65: Error: unrecognized opcodecsrr a0,scause', extension zicsr' required
我以前遇到过这个错误,显示缺少zicsr模块,无法使特权指令,但是当我用自己的riscv64-unknown-elf-gcc和riscv64-unknown-linux-musl-gcc编译我自己写的一个简单的测试c文件时却显示没有问题,我的测试C文件如下
`
// test.c
int main(int argc, char *argv[])
{
asm volatile ("csrr t0, misa");
return 0;
}

`

Persistent RNDIS MAC addresses - Solution

Sorry for not providing a PR but paste and explain the solution here.

For my use-case: in order to have the host get a "static" IP so the routing from the board to the internet being more simple, one has to make the MAC addresses persistent on the board for the RNDIS setup.

  • /etc/rndis-macs.sh: creates two MACs and stores them in /etc/rndis-macs.conf once, and persistently sets them when RNDIS is started
  • /etc/usb-rndis.sh: insert call for /etc/rndis-macs.sh after probe and before start

/etc/usb-rndis.sh add a new line with /etc/rndis-macs.sh call:

/etc/uhubon.sh device >> /tmp/rndis.log 2>&1
/etc/run_usb.sh probe rndis >> /tmp/rndis.log 2>&1
/etc/rndis-macs.sh >> /tmp/rndis.log 2>&1
/etc/run_usb.sh start rndis >> /tmp/rndis.log 2>&1

.... (existing code)

/etc/rndis-macs.sh:

#!/bin/bash

RNDIS_USB="/tmp/usb/usb_gadget/cvitek/functions/rndis.usb0"
MAC_FILE="/etc/rndis-macs.conf"

generate_random_mac() {
    printf "02:%02x:%02x:%02x:%02x:%02x\n" $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256))
}

# check if the MAC address file exists and has exactly two lines
if [[ -f "$MAC_FILE" ]] && [[ $(wc -l < "$MAC_FILE") -eq 2 ]]; then
    # read the two MAC addresses from the file
    IFS=$'\n' read -d '' -r -a macs < "$MAC_FILE"
    dev="${macs[0]}"
    host="${macs[1]}"
    echo "using existing MAC addresses:"
else
    # generate two new MAC addresses and store them in the file
    echo "generating new MAC addresses:"
    dev=$(generate_random_mac)
    host=$(generate_random_mac)
    echo "$dev" > "$MAC_FILE"
    echo "$host" >> "$MAC_FILE"
fi
echo "dev_addr: $dev"
echo "host_addr: $host"
echo "$dev" > "$RNDIS_USB"/dev_addr
echo "$host" > "$RNDIS_USB"/host_addr

I described the solution at https://xyzdims.com/3d-printers/misc-hardware-notes/iot-milk-v-duo-risc-v-esbc-running-linux/#Static_IP_for_Host_with_RNDIS

编译img镜像,在ld链接时出现collect2: error: ld returned 1 exit status并蹦出,(CVI_VB_Exit)

环境信息

  • OS: Endeavouros(Arch-Linux)
  • SDK: 最新

复现步骤

由于是Arch,所以我尽量跟着sdk中需要的库和环境在Pacman和yay中进行安装。

#执行命令 ./build_milkv.sh

等待链接ld链接时出现:

123

好像是在link中middleware/v2/sample/venc的时候蹦出来的。

1234

最后终端弹出collect2: error: ld returned 1 exit status,然后编译就终止蹦出来了,我该怎么办。:sob:,求指点是缺少什么库吗?

等待开发者的回信ing................

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.