Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Use correct image name on Windows flashall.bat #29

Merged
merged 1 commit into from
Apr 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions meta-edison-bsp/classes/image_types_edison.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ IMAGE_CMD_toflash () {

# update image name inside flashall.sh
sed -e "s/^IMAGE_NAME=.\+$/IMAGE_NAME=\"${IMAGE_BASENAME}\"/" -i ${WORKDIR}/toFlash/flashall.sh
sed -e "s/^set IMAGE_NAME=.\+$/set IMAGE_NAME=${IMAGE_BASENAME}/" -i ${WORKDIR}/toFlash/flashall.bat

# generate a formatted list of all packages included in the image
awk '{print $1 " " $3}' ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest > ${WORKDIR}/toFlash/package-list.txt
Expand Down
12 changes: 9 additions & 3 deletions meta-edison-bsp/recipes-bsp/flashall/flashall-2.0/flashall.bat
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ set VARIANT_NAME_DEFAULT=edison-defaultrndis
set VARIANT_NAME_BLANK=edison-blankrndis
set VARIANT_NAME=%VARIANT_NAME_BLANK%

set IMAGE_NAME=

set LOG_FILENAME=flash.log
set /a verbose_output=0
:: ********************************************************************
Expand All @@ -37,11 +39,14 @@ if -%1- == -/?- set /a show_help=1
if -%1- == --h- set /a show_help=1
if -%1- == ---help- set /a show_help=1
if -%1- == --v- set /a verbose_output=1
if -%1- == --i- set IMAGE_NAME=%2
set /a argcount+= 1
shift
goto :parse_arg_start
:parse_arg_end

if -%IMAGE_NAME%-==-- set show_help=1

:: handle help on cmd arg
if %show_help% == 1 (
call:print-usage %appname%
Expand Down Expand Up @@ -136,15 +141,15 @@ if %errorlevel% neq 0 ( exit /b %errorlevel%)


echo Flashing boot partition ^(kernel^)
call:flash-command --alt boot -D "%BASE_DIR%edison-image-edison.hddimg"
call:flash-command --alt boot -D "%BASE_DIR%\%IMAGE_NAME%-edison.hddimg"
if %errorlevel% neq 0 ( exit /b %errorlevel%)

echo Flashing update partition
call:flash-command --alt update -D "%BASE_DIR%edison-image-edison.update.hddimg"
call:flash-command --alt update -D "%BASE_DIR%\%IMAGE_NAME%-edison.update.hddimg"
if %errorlevel% neq 0 ( exit /b %errorlevel%)

echo Flashing rootfs, ^(it can take up to 5 minutes... Please be patient^)
call:flash-command --alt rootfs -D "%BASE_DIR%edison-image-edison.ext4" -R
call:flash-command --alt rootfs -D "%BASE_DIR%\%IMAGE_NAME%-edison.ext4" -R
if %errorlevel% neq 0 ( exit /b %errorlevel% )

echo Rebooting
Expand All @@ -167,6 +172,7 @@ exit /b 0
echo --recovery recover the board to DFU mode using a dedicated tool,
echo available only on linux and window hosts.
echo --keep-data preserve user data when flashing.
echo -i imagename flash image with image name "imagename"
exit /b 5

:flash-dfu-ifwi
Expand Down