From owner-freebsd-arm@FreeBSD.ORG Mon May 25 20:18:54 2015 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 93DF0F39 for ; Mon, 25 May 2015 20:18:54 +0000 (UTC) (envelope-from tim@kientzle.com) Received: from monday.kientzle.com (kientzle.com [142.254.26.11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5234CCAB for ; Mon, 25 May 2015 20:18:54 +0000 (UTC) (envelope-from tim@kientzle.com) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id t4PKIqnC011213 for freebsd-arm@freebsd.org; Mon, 25 May 2015 20:18:52 GMT (envelope-from tim@kientzle.com) Received: from [192.168.2.105] (192.168.1.65 [192.168.1.65]) by kientzle.com with SMTP id k96ujmes8k8abnzdphciud3rve; for freebsd-arm@freebsd.org; Mon, 25 May 2015 20:18:52 +0000 (UTC) (envelope-from tim@kientzle.com) From: Tim Kientzle Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Crochet: SwapFile creation, Growfs, and Beaglebone FDT fixes Message-Id: <6CB0510E-93FF-458D-9AE0-3AA7FA5E98DE@kientzle.com> Date: Mon, 25 May 2015 13:18:51 -0700 To: freebsd-arm Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) X-Mailer: Apple Mail (2.2098) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 May 2015 20:18:54 -0000 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 }