Crochet: SwapFile creation, Growfs, and Beaglebone FDT fixes

Tim Kientzle tim at kientzle.com
Mon May 25 20:18:54 UTC 2015


I fixed a bunch of Crochet issues this weekend.

= BeagleBone and RadxaRock no longer create swap by default.  If you want to create a swap file on first boot, you should request it via

     option SwapFile 512m deferred

(see config.sh.sample for more details)

= SwapFile is more robust.  SwapFile will only create a swap file on first boot if that would leave at least 2048mb of free space.  In particular, you can now put a growable image with a large swapfile setting onto a small SD card and the first boot logic will just skip the swapfile creation.  (The 2048m free space requirement here can be overridden by setting swapfile_create_free_mb in rc.conf.)

= Growfs now uses the standard rc.d/growfs script that JMG added to FreeBSD-CURRENT (which is a great improvement over Crochet’s original implementation).

= Firstboot scripts work:  Crochet now includes a /firstboot marker file on images which is required for some rc.d scripts to work correctly.  (In particular, this is required for growfs.)

= FDT fixes.  Beaglebone FDT files are correctly generated again.

Cheers,

Tim

P.S.  For anyone interested, here is the BeagleBone Black configuration file that I use myself.  I wish it could install packages, though; then a config file could represent a complete appliance definition.

board_setup BeagleBone
option ImageSize 1900mb
option Growfs
option SwapFile 768m deferred
option UsrSrc
option UsrPorts /usr/ports
FREEBSD_SRC=${TOPDIR}/src
WORLDJOBS=-j5
KERNJOBS=-j4

customize_freebsd_partition ( ) {
    cat << "EOF" >> etc/wpa_supplicant.conf
network={
   ssid=“mynetwork"
   psk=“mypassword"
}
EOF

    # I use a urtwn-based WiFi adapter
    cat << "EOF" >> boot/loader.conf
legal.realtek.license_ack=1
EOF

    cat << "EOF" >> etc/rc.conf
wlans_urtwn0="wlan0"
ifconfig_wlan0="DHCP WPA"
ifconfig_cpsw0="DHCP"
sshd_enable="YES"
ntpd_enable="YES"
ntpd_sync_on_start="YES"
EOF

    cat << "EOF" >> etc/ssh/sshd_config
PermitRootLogin=Yes
EOF

    # Don’t freeze when I unplug the console cable
    cat << "EOF" >> etc/sysctl.conf
debug.kdb.break_to_debugger=0
EOF

    # Replace the root password
    sed -i~ -e '/^root:/ d' -e '/^toor:/ d' etc/master.passwd

    cat << "EOF" >> etc/master.passwd
root:XXXXXXXXXXXXXXXXXX:0:0::0:0:Charlie &:/root:/bin/csh
EOF

    pwd_mkdb -L -d etc etc/master.passwd
}



More information about the freebsd-arm mailing list