Make sure that F - Hardware Flow Control : No in Serial port setup in
cOnfigure Minicom if you use Minicom
Or use screen to set proper mode from command line:
screen /dev/ttyUSB0 115200 -crtsctsUse readme_en.txt from SDK directory osdrv for reference.
tar xvf u-boot-2010.06.tgz
cd u-boot-2010.06
# Find and copy mkboot.sh script
#???cp ../../../tools/pc/uboot_tools/mkboot.sh .
# Copy reg-init-table for CV300
wget https://github.com/OpenIPC/camerasrnd/raw/master/uboot/reg_info/reg_info_hi3516cv300.bin \
-O hi3516cv300.reg
# Apply fix for network issue
wget https://raw.githubusercontent.com/OpenIPC/camerasrnd/master/uboot/CV300-Fix-network-broken-transfers.patch
patch -p1 < CV300-Fix-network-broken-transfers.patch
# Compilation phase
make ARCH=arm CROSS_COMPILE=arm-hisiv500-linux- hi3516cv300_config
make ARCH=arm CROSS_COMPILE=arm-hisiv500-linux-
# Make compressed U-Boot image
cp u-boot.bin full-boot.bin
make CPU=hi3516cv300 ARCH=arm CROSS_COMPILE=arm-hisiv500-linux- mini-boot.bin
# The generated mini-boot.bin is available for u-boot imageThe issue was found on CV300 cameras with U-Boot 2010.06. Everything works fine when use straight patchcord between camera and TFTP server but adding network switch in the middle leads data transfers which never ends.
The root cause is described in an unaccepted
patch. It turns out that in CV300
U-Boot has CONFIG_SYS_HZ == 195312 that breaks timeouts in the network stack.
I used a patch to make my own patch to fix the issue.
This happens due to hardware issue, when producer doesn't use all lines between
flash IC and controller and it needs to be set in Dual mode rather than Quad.
Apply patch
before U-Boot compilation to fix it.
I use small build.sh script which make build, reboots both USB UART adapter and IPC
itself, then upload fresh U-boot using burn tool via UART:
set -e
# In case of buggy USB UART adapter
sudo usbreset /dev/bus/usb/005/007
make ARCH=arm CROSS_COMPILE=arm-hisiv500-linux- -j$(nproc)
cp u-boot.bin full-boot.bin
make CPU=hi3516cv300 ARCH=arm CROSS_COMPILE=arm-hisiv500-linux- mini-boot.bin
cp mini-boot.bin ~/git/burn
cd ~/git/burn
# Custom script to power reset camera via network switch
./restart_eth8.sh
./hi35xx-tool --chip hi3516cv300 --file=mini-boot.bin
screen /dev/ttyUSB0 115200Sample workflow is shown here

