I had wrote a test program "hello world" that was load on PlutoSDR by tftp. This program can run on ADALM-PLUTO.Now I want to put this program onADALM-PLUTO.Next the system power on,this program can autoload and run.How to do?
For the proper way of doing this please read the buildroot manual here.
I moved this thread to the ADI University Program space, where we handle the PlutoSDR questions.
If you want to persistently add your application, you need to rebuild the PlutoSDR firmware.
See here: https://github.com/analogdevicesinc/plutosdr-fw
Add it to the buildroot build. And then create a init.d script that will start it.
Hi,mhennerich, Thank you very much. If I rebuild rootfs.cpio.gz, how to update rootfs.cpio.gz ? According to this step:
cd plutosdr-fw export CROSS_COMPILE=arm-xilinx-linux-gnueabi- export PATH=$PATH:/opt/Xilinx/SDK/2016.2/gnu/arm/lin/bin export VIVADO_SETTINGS=/opt/Xilinx/Vivado/2016.2/settings64.sh makeIs ok?
This will rebuild the PlutoSDR firmware.
rootfs.cpio.gz in particular is build by buildroot
Ok,I see. Thank you very much.
I rebuild Pluto.frm according to Building the Firmware Image [Analog Devices Wiki]
make -C linux ARCH=arm zynq_pluto_defconfig make -C linux -j 8 ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi- zImage UIMAGE_LOADADDR=0x8000 cp linux/arch/arm/boot/zImage build/zImage
make -C linux -j 8 ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi- zynq-pluto-sdr.dtb cp linux/arch/arm/boot/dts/zynq-pluto-sdr.dtb build/zynq-pluto-sdr.dtb make -C linux -j 8 ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi- zynq-pluto-sdr-revb.dtb cp linux/arch/arm/boot/dts/zynq-pluto-sdr-revb.dtb build/zynq-pluto-sdr-revb.dtb
make -C buildroot ARCH=arm zynq_pluto_defconfig make -C buildroot TOOLCHAIN_EXTERNAL_INSTALL_DIR= ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi- BUSYBOX_CONFIG_FILE=/home/michael/devel/pluto/plutosdr-fw/buildroot/board/pluto/busybox-1.25.0.config all cp buildroot/output/images/rootfs.cpio.gz build/rootfs.cpio.gz
source /opt/Xilinx/Vivado/2016.2/settings64.sh make -C hdl/projects/pluto cp hdl/projects/pluto/pluto.sdk/system_top.hdf build/system_top.hdf
source /opt/Xilinx/Vivado/2016.2/settings64.sh xsdk -batch -source scripts/create_fsbl_project.tcl cp build/sdk/hw_0/system_top.bit build/system_top.bit
make -C u-boot-xlnx ARCH=arm zynq_pluto_defconfig make -C u-boot-xlnx ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi- UBOOTVERSION="PlutoSDR v0.20-PlutoSDR" cp u-boot-xlnx/u-boot build/u-boot.elf
To get u-boot-xlnx/tools/mkimage
u-boot-xlnx/tools/mkimage -f scripts/pluto.its build/pluto.itb
cp build/pluto.itb build/pluto.itb.tmp dfu-suffix -a build/pluto.itb.tmp -v 0x0456 -p 0xb673 mv build/pluto.itb.tmp build/pluto.dfu
md5sum build/pluto.itb | cut -d ' ' -f 1 > build/pluto.frm.md5 cat build/pluto.itb build/pluto.frm.md5 > build/pluto.frm
When I used this way Pluto Firmware Updates [Analog Devices Wiki] to update frm. Linux:
It was failed to update Pluto.frm. I tried to rebuild this step:
"FAILED_FIRMWARE_CHSUM_ERROR" was happened again.How to resolved it? Thank you.
Sorry - but I don't know what you're trying to show with your screenshots. You need to copy the pluto.frm to the PlutoSDR drive an then eject it. In case it failed a file is created on the MSD which will tell you why.
In addition please use the Makefile. If this doesn't work we can see why - but building it manually is not supported.
I want to show the error when I update Pluto.frm by Linux and Windows. I had copied the Pluto.frm to the PlutoSDR drive.
I had used the Makefile to make Pluto.frm and update it successfully. I build it manually in order to put my program in rootfs.cpio.gz, then making new Pluto.frm.
A quick and dirty way is to just copy it into the buildroot folder which becomes the rootfs.cpio.gz.
plutosdr-fw$ cp mybin buildroot/output/target/usr/bin/
now your build/pluto.frm contains your mybin in /usr/bin
Ok, I tried it. Thank you very much.
I had successfully updated Pluto.frm with my program accroding to what you said. Thank you very much. I'll read buildroot manual that you recommended. Thank you again.
Hi, Michael, I repaired the file from /buildroot/output/target/init and added this sentence :exec /usr/bin./send. I put this sentence after exec /sbin/init S*. But my program can't autorun when the system power on again. If I used the command :exec /usr/bin/./send. My program can run normally. My program is continually sending data form serila PS0.
Hi, Michael, I had resolved this question. My program had autorun when the system power on again.
Retrieving data ...