Index: recipes-bsp/manufacturing/leahi-manufacturing_1.0.bb =================================================================== diff -u -reaf04d1d71809cd943ae8bf8a9d3b65fab4e7d59 -r29253527e92266ba3d86f7bf7342defafea209e2 --- recipes-bsp/manufacturing/leahi-manufacturing_1.0.bb (.../leahi-manufacturing_1.0.bb) (revision eaf04d1d71809cd943ae8bf8a9d3b65fab4e7d59) +++ recipes-bsp/manufacturing/leahi-manufacturing_1.0.bb (.../leahi-manufacturing_1.0.bb) (revision 29253527e92266ba3d86f7bf7342defafea209e2) @@ -49,6 +49,9 @@ chmod 755 ${D}/opt/leahi/run.sh chmod 755 ${D}/opt/leahi/scripts/*.sh + # move the run.sh from script folder to the main folder of the leahi execution. + mv ${D}/opt/leahi/scripts/run.sh ${D}/opt/leahi/run.sh + # setting up the leahi service install -d ${D}${systemd_system_unitdir} install -m 644 ${S}/leahi.service ${D}${systemd_system_unitdir} Index: sdk/UUU.pdf =================================================================== diff -u Binary files differ Index: sdk/copy_wsl.sh =================================================================== diff -u -r2f29d35a4fcc139c71e6a95761a7b6fc63fcc296 -r29253527e92266ba3d86f7bf7342defafea209e2 --- sdk/copy_wsl.sh (.../copy_wsl.sh) (revision 2f29d35a4fcc139c71e6a95761a7b6fc63fcc296) +++ sdk/copy_wsl.sh (.../copy_wsl.sh) (revision 29253527e92266ba3d86f7bf7342defafea209e2) @@ -1,14 +1,85 @@ #!/bin/bash -cd /mnt/c/Users/Administrator/ely/images/ -IMAGES="$HOME/leahi-distro/tmp/deploy/images/ccimx8mm-dvk" -cp ${IMAGES}/dey-image-qt-fb-ccimx8mm-dvk.boot.vfat . -cp ${IMAGES}/dey-image-qt-fb-ccimx8mm-dvk.ext4.gz . -cp ${IMAGES}/dey-image-qt-fb-ccimx8mm-dvk.recovery.vfat . -cp ${IMAGES}/imx-boot-ccimx8mm-dvk.bin . -cp ${IMAGES}/install_linux_fw_uuu.sh . +# errors +ERR_FOLDER_NOT_EXISTS=1 +ERR_COPY_FAIL=2 -cp ${HOME}/leahi-distro/sources/meta-leahi/sdk/uuu* . +# variables +SOURCES="$HOME/leahi-distro/tmp/deploy/images/ccimx8mm-dvk" +DEST_WINDW="/mnt/c/Users/Administrator/ely/images/" +DEST_EXTRA="$HOME/leahi-distro-image" + +#Functions +usage() { + echo " --- usage ---" + echo "./copy_wsl.sh [-W] [-I] [-h,--help]" + echo " -W" + echo " When present will copy the images into the following folder maped from windows to the wsl:" + echo " $DEST_WINDW" + echo " -I" + echo " Extra location to copy the images into." + echo " -h,--help or empty call" + echo " Current help" +} + +folder_exists() { + if [ ! -d "$1" ];then + echo "Folder does not exist." + echo "<$1>" + exit $ERR_FOLDER_NOT_EXISTS + fi +} + +copy_file() { + echo "copy $1" + cp "$1" . + local res=$? + if [[ ! $res -eq 0 ]];then + echo "FAILED <$res>" + exit $ERR_COPY_FAIL + fi +} + +copy_to_folder() { + # DEBUG: exit 0 + folder_exists "$1" # if not will exit. + cd "$1" + copy_file ${SOURCES}/dey-image-qt-fb-ccimx8mm-dvk.boot.vfat + copy_file ${SOURCES}/dey-image-qt-fb-ccimx8mm-dvk.ext4.gz + copy_file ${SOURCES}/dey-image-qt-fb-ccimx8mm-dvk.recovery.vfat + copy_file ${SOURCES}/imx-boot-ccimx8mm-dvk.bin + copy_file ${SOURCES}/install_linux_fw_uuu.sh + copy_file ${HOME}/leahi-distro/sources/meta-leahi/sdk/uuu + copy_file ${HOME}/leahi-distro/sources/meta-leahi/sdk/uuu.exe + echo "Successful!" +} + +has_arg() { + local needle=$1 + shift + + for arg in "$@"; do + [[ "$arg" == "$needle" ]] && return 0 + done + + return 1 +} + +if [[ "$#" -eq 0 ]] || has_arg "-h" "$@" || has_arg "--help" "$@" ; then + usage + exit 0 +fi + +if has_arg "-W" "$@"; then + echo "Copy to the $DEST_WINDW" + copy_to_folder "$DEST_WINDW" +fi + +if has_arg "-I" "$@"; then + echo "Copy to the $DEST_EXTRA" + copy_to_folder "$DEST_EXTRA" +fi + exit 0