URL
https://opencores.org/ocsvn/csa/csa/trunk
Subversion Repositories csa
[/] [csa/] [trunk/] [firmware/] [dl_firmware] - Rev 36
Go to most recent revision | Compare with Previous | Blame | View Log
#!/bin/sh
ORG_DEV_STR=`/sbin/lsusb -d 04b4:8613`;
if [[ -z $ORG_DEV_STR ]]; then
echo can not find orginal usb device;
else
ORG_BUS_ID=`echo $ORG_DEV_STR | awk '{print $2}'`;
ORG_DEV_ID=`echo $ORG_DEV_STR | awk '{print $4}'`;
ORG_DEV_ID=${ORG_DEV_ID%:};
echo $ORG_BUS_ID $ORG_DEV_ID
echo now dowload firmware
if /sbin/fxload -v -t fx2 -I usbimg.hex -D /proc/bus/usb/$ORG_BUS_ID/$ORG_DEV_ID; then
echo download success
else
echo download fail
fi
fi
IMG_DEV_STR=`/sbin/lsusb -d 0547:1002`;
if [[ -z $IMG_DEV_STR ]]; then
echo can not find image device
else
echo found the image device
IMG_BUS_ID=`echo $IMG_DEV_STR | awk '{print $2}'`;
IMG_DEV_ID=`echo $IMG_DEV_STR | awk '{print $4}'`;
IMG_DEV_ID=${IMG_DEV_ID%:};
echo $IMG_BUS_ID $IMG_DEV_ID
echo now dowload firmware
if /sbin/fxload -v -t fx2 -I usbimg.hex -D /proc/bus/usb/$IMG_BUS_ID/$IMG_DEV_ID; then
echo download success
else
echo download fail
fi
fi
Go to most recent revision | Compare with Previous | Blame | View Log