• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Crochet notes

balanga

Daemon

Thanks: 49
Messages: 1,738

#1
I'm trying to put together a build script for using crochet to build an RPi image, although I guess it could be adapted for other devices...

Here is what I've got so far:-
Code:
echo y | pkg install git subversion sqlite3 u-boot-rpi2
svn co https://svn0.us-west.freebsd.org/base/head /usr/src
git clone --non-interactive --trust-server-cert https://github.com/freebsd/crochet.git
cd ~/crochet
sed "s/#board_setup RaspberryPi2/board_setup RaspberryPi2/" config.sh.sample > config.conf
./crochet.sh -c config.conf
The sed script needs changing and maybe one or two other things but that is basically it.

I'm posting it here in case I forget how to use crochet :). Others may find it useful too...
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 5,482
Messages: 25,654

#2
Code:
echo y | pkg install git subversion sqlite3 u-boot-rpi2
Use this instead:
Code:
env ASSUME_ALWAYS_YES=yes pkg install -y git subversion sqlite3 u-boot-rpi2
 

balanga

Daemon

Thanks: 49
Messages: 1,738

#3
Thanks for the advice...

I also need the sed script to remove '#' from the lines containing "#board_setup RaspberryPi2" and "#option ImageSize 3900mb" ,but can't get the syntax right... I know, it should be straightforward, but I can't figure it out.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 5,482
Messages: 25,654

#4
Yeah, sed(1) can be a bit of pain. I usually struggle with it too.
 

balanga

Daemon

Thanks: 49
Messages: 1,738

#5
sed script:-
Code:
sed  -e 's/#board_setup RaspberryPi2/board_setup RaspberrPi2/'  -e 's/#option ImageSize 3900mb/option ImageSize 3900mb/' config.sh.sample >config.conf
RPi build script:-
Code:
env ASSUME_ALWAYS_YES=yes pkg install git subversion sqlite3 u-boot-rpi2
svn co svn://svn0.us-west.freebsd.org/base/head /usr/src
git clone --non-interactive --trust-server-cert https://github.com/freebsd/crochet.git
cd ~/crochet
sed  -e 's/#board_setup RaspberryPi2/board_setup RaspberrPi2/'  -e 's/#option ImageSize 3900mb/option ImageSize 3900mb/' config.sh.sample >config.conf
./crochet.sh -c config.conf