This is a tip about how to update special file on rootfs on bench via NFS.
Initial phase:prepare a writable rootfs on bench and exported shared directory.
1 modify /home/user/LTIB/rootfs/etc/fstab,
/dev/mmcblk0p1 /factory_data auto defaults,rw,noatime 0 0
/dev/mmcblk0p2 /usr auto defaults,rw,_netdev 0 0
/dev/mmcblk0p3 /usr/local/share auto defaults,rw,_netdev 0 0
2 run aa0978af/sw/tools/scripts/utilities/ create_dv_images.sh #this will regenerate all of the partition images except dv_fbl_rootfs and dv_fbl_uImage.
3 copy rootfs.ext2.* to u stick to update the rootfs via usb
4 modify /etc/exports, then run “sudo /etc/init.d/nfs-kernel-server restart” to apply the new configure
#add one line to tail of fstab, for example, export aa0978af/sw/out/linux_dv/bin will export via NFS.
#192.168.53.53 is the ip of bench which can access the exported directory
/home/user/synergy_work/10027501_AF_Parent_Test/aa0978af/sw/out/linux_dv/bin 192.168.53.53(rw,nohide,no_root_squash,async)
Main loop:
1 press any key to stop at uboot when powering on the bench
2 input “run bootcmd_nor_ip” and press enter. #this will give the bench a static IP 192.168.53.53
3 click on an icon just on the right side of Terminal icon on the top panel of vm linux, this will start the telnet to 192.168.53.53. login with root
4 on the telnet command line, run
“mount -t nfs -o nolock 192.168.53.2: /home/user/synergy_work/10027501_AF_Parent_Test/aa0978af/sw/out/linux_dv/bin /mnt/nfs”. #then the exported directory will mounted on /mnt/nfs
5 update the special files by copy which from /mnt/nfs to correspondent destination directory as you like
#for example copy /mnt/nfs/icr_core /usr/local/bin
6 reboot the bench, then you will see the result of what you have modify on you code.
#you may also kill the old program,then restart the newly program, skipping the reboot phase.
This is a tip to change a ro mounted file system to rw without refreshing new image.
#change to rw mounting, then /usr can be written.
mount -o remount,rw /usr
#change to ro mounting, then /usr can’t be written.
mount -o remount,ro /usr
mount -o remount,rw / /usr 和/startup分区不同,所以可以用此命令将整个根目录remount为可写的
对目标去调试信息减小目标size,但可以打印信息
/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/arm-fsl-linux-gnueabi-strip icr_core_1