Thursday, February 16, 2023

Compiling source code (by CMake) of application in FFP

Compile source code of application via CMake instead of autotools in FFP-0.7 enviroment of NAS, you can commend below steps :



1. Download source code of application
# wget http://../source-code-application.tar.gz

2. Uncompress (-x) source code
# tar -xvf source-code-application.tar.gz

3. Compile by "CMake" in the prefix directory of uncompressed source-code-application
# cd source-code-application
# cmake -DCMAKE_INSTALL_PREFIX=/ffp . | tee file.log &

* remake : after CMake V3.x, changed to "--install . --prefix" from "-DCMAKE_INSTALL_PREFIX="
* remark : time taking so put it in background "&" & show in both screen & log file "tee" 

4. Install by "make" in the directory of uncompressed source-code-application given the insatll folder in temp4new
# make 
# make install DESTDIR=/i-data/75b2c01f/build/temp4new | tee file.log & 

* remark : time taking so put it in background "&" & show in both screen & log file "tee" 

5. Compress (-c) Application
# cd /mnt/HD_a2/build/temp4new
tar -cvf source-code-application-oarm-0.txz ffp

* remark: a. remove -J not to cpmpress package

6. Install (-i) / Upgrade (-u) Applictaion
# funpkg -u source-code-application-oarm-0.txz

Wednesday, February 15, 2023

Clone a usb stick in img or to another on Linux by below steps : 



1. Check USB device infomation w/ eg. "/dev/sdb" by "lsblk" commend 

~ lsblk

2. Create Image of original USB at filename.img by "dd" commend 

        ~ $ sudo dd if=/dev/sdb of=~/ffp-0.07-230215.img bs=4M status=progress


3. Copy Image to destinated USB by "ddrescue" commend  

~ $ sudo ddrescue /dev/sdb ~/my-usb.img