freebsd / crochet

Build FreeBSD images for RaspberryPi, BeagleBone, PandaBoard, and others.
BSD 2-Clause "Simplified" License
611 stars 188 forks source link

eval error #55

Closed enriquefynn closed 9 years ago

enriquefynn commented 10 years ago

I'm trying to create a raspberry pi new bootable, and faced with the following error using the default config.

Using U-Boot from previous build. ====================> Phase 301 <==================== Running: OPTION= OPTIONDIR= BOARDDIR= board_default_createimage eval: arithmetic expression: expecting primary: "([0-9][0-9])._$/\1/p'`-RPI-B-r263927.img / 1000000"

I hardcoded the name of the image, so it worked.

kientzle commented 10 years ago

This looks like an old bug in the code that tries to determine which version of FreeBSD you are building.

What FreeBSD source version do you have checked out?

enriquefynn commented 10 years ago

11.0-CURRENT FreeBSD 11.0-CURRENT #0 r263927

kientzle commented 10 years ago

And what exactly was the config file you were using? And the command line you used?

kientzle commented 10 years ago

Also, the progress messages before this should have printed out the Image name being used: What does that show?

enriquefynn commented 10 years ago

I used the default config ./crochet.sh -b RaspberryPi -v

====================> Phase 301 <==================== Running: OPTION= OPTIONDIR= BOARDDIR= board_default_createimage eval: arithmetic expression: expecting primary: "([0-9][0-9])._$/\1/p'`-RPI-B-r263927.img / 1000000"

There was no other error. Full log: http://pastebin.com/G8xXYMK9

kientzle commented 10 years ago

Early in the log, it prints out:

Image name is:
    /home/fynn/GIT/crochet-freebsd/work/FreeBSD-armv6-10.0
\([0-9][0-9]*\).*$/\1/p'`-RPI-B-r263927.img

We need to figure out why ${IMG} is getting set so strangely. I'll look into it...

kientzle commented 10 years ago

Please try updating Crochet and try again. I believe this has been fixed.

enriquefynn commented 10 years ago

Got the same error, in what file/line is the error?!

kientzle commented 10 years ago

The default IMG value is set in lib/board.sh by this line:

  IMG=${WORKDIR}/FreeBSD-${TARGET_ARCH}-${FREEBSD_VERSION}-${KERNCONF}-${SOURCE_VERSION}.img

Comparing to the image name you have, it looks like ${FREEBSD_VERSION} is 10.0 and ${KERNCONF} is "RPI-B" and I have no idea how the \([0-9][0-9]*\).*$/\1/p' is getting in there.

It really looks like you either have an old version of something (I think something like that regex used be used to compute FREEBSD_VERSION, but it was changed a long time ago) or something is corrupted somewhere.

Can you find that regex anywhere in your system?

What does 'git log -1' show your current revision of Crochet is?

Does 'git status --ignored' show any changes to your local copy of Crochet?

I recommend you try checking out a clean copy of Crochet and see if that helps.

kientzle commented 9 years ago

I've not heard any other reports, so I suspect this was fixed at some point.

If you see it again, please open another issue and I'll take another look.