Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 May 2015 13:18:51 -0700
From:      Tim Kientzle <tim@kientzle.com>
To:        freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Crochet: SwapFile creation, Growfs, and Beaglebone FDT fixes
Message-ID:  <6CB0510E-93FF-458D-9AE0-3AA7FA5E98DE@kientzle.com>

next in thread | raw e-mail | index | archive | help
I fixed a bunch of Crochet issues this weekend.

=3D 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)

=3D 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.)

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

=3D 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.)

=3D 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=3D${TOPDIR}/src
WORLDJOBS=3D-j5
KERNJOBS=3D-j4

customize_freebsd_partition ( ) {
    cat << "EOF" >> etc/wpa_supplicant.conf
network=3D{
   ssid=3D=E2=80=9Cmynetwork"
   psk=3D=E2=80=9Cmypassword"
}
EOF

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

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

    cat << "EOF" >> etc/ssh/sshd_config
PermitRootLogin=3DYes
EOF

    # Don=E2=80=99t freeze when I unplug the console cable
    cat << "EOF" >> etc/sysctl.conf
debug.kdb.break_to_debugger=3D0
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
}




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6CB0510E-93FF-458D-9AE0-3AA7FA5E98DE>