[Dextrose] dextrose image 6,7Mb
Bernie Innocenti
bernie at codewiz.org
Thu Nov 11 15:52:31 EST 2010
On Thu, 2010-11-11 at 15:31 -0200, Esteban Arias wrote:
> hi,
>
> I downloaded the last olpc-os-builder for dextrose.
>
> When the file "buildnr-0.88-py" has correlative number up "100",
> the process of creation image (./osbuilder.py
> examples/f11-0.88-xo1.5-py.ini) shows:
>
> .../modules/sd_card_image/image.50.makefs.sh: line 54: * 512: error
> sintáctico: se esperaba un operando (error token is "* 512")
>
> and out image: os103pyg.zd for 6,7Mb
>
> any idea?
The error message points at this code:
$(($img_sectors * $BLOCK_SIZE))
It's possible that $img_sectors contains some junk, such as an error
message. The variable is initialized like this:
local img_sectors=$(sfdisk -uS -l $img | grep img2 | awk '{print $4}')
The only variable in this expression is $img, which is initialized from
the buildnr:
local img=$outputdir/os$buildnr.disk.img
Proceeding backwards, we find that $buildnr is initialized like this:
buildnr=$(read_buildnr)
Grepping around, I found that the shell function read_buildnr is defined
in lib/shlib.sh:
read_buildnr() {
local buildnr_path=$intermediatesdir/buildnr
local suffix=$(read_config buildnr_from_file suffix)
if [[ -e $buildnr_path ]]; then
echo "$(<$buildnr_path)$suffix"
else
echo "0$suffix"
fi
}
Maybe the problem is that the file contains a space or \n after the
number?
If it's not clear, put a debug statement at the end of read_buildnr:
echo >&2 "*** $(<$buildnr_path)$suffix ***"
You should get something like this on the terminal:
*** 100uy ***
--
// Bernie Innocenti - http://codewiz.org/
\X/ Sugar Labs - http://sugarlabs.org/
More information about the Dextrose
mailing list