Raspberry PI, pre-populate wpa_supplicant.conf and SSH?

I have a newer Raspberry PI (arm7) that I would like to test FreeBSD on. In Raspbian, you can mount the installation image and create the wpa_supplicant.conf and enable SSH before installing. Basically, a headless, non-interactive install -- which requires a bunch of defaults set. I imagine there is an equivalent possibility with FreeBSD?
 
download and unpack the img.xz
mdconfig -t vnode file.img
mount /dev/md0s2a /mnt
hack /mnt/etc/rc.conf /mnt/etc/wpa_supplicant.conf
/mnt/boot/loader.conf /mnt/etc/sshd_config
you probably need an usb dongle for wifi
 
I use an USB-SDCard dongle.
Then i simply mount the ufs partition on the sdcard, ie on my PC,
Code:
mount /dev/da5s2a /mnt/PI
Then i just edit the files in /mnt/PI/etc/
To backup the contents of the SDCard i use:
Code:
 clone -v 1 -s /mnt/PI /destination
PS: I reformated the /dev/da2sa2 ufs partition with a little tuning :
Code:
newfs -E -L rootfs -O 2 -U -b 65536 -f 8192 -n -e 65536 -g 65536 -h 1024 /dev/da5s2a
tunefs -p /dev/da5s2a

I have not tested wifi on the Raspberry PI4. But if detection should fail you can use a very cheap wifi USB-dongle.
 
With the newer GENERIC Arm images that are not board dependant do you need to manually create the uboot partition and copy appropriate uboot port into the fat partition?
How is uboot working with the newer platform generic ARM images?
the rpib which i use for the pi zero has everything needed to boot on it (in the dos partition)
the ufs part is generic
earlier versions of uboot without efi were booting considerably faster
 
off topic for other pi users
can you boot/get to single user mode ?
somehow on the pi zero there is no console for userland until getty spawns
so you can't see /etc/rc* messages on screen
kernel messages ARE displayed just nothing from /etc/rc
also boot -s does not work
 
I was just noticing that none of the uboot stuff is logged. It comes early so dmesg doesn't catch it.
Code:
Consoles: EFI console 
    Reading loader env vars from /efi/freebsd/loader.env
Setting currdev to disk0p1:
FreeBSD/arm EFI loader, Revision 1.1

   Command line arguments: l
   Image base: 0x9cdd9000
   EFI version: 2.80
   EFI Firmware: Das U-Boot (rev 8217.4096)
   Console: comconsole (0)
   Load Path: /efi\boot\bootarm.efi
   Load Device: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(0)/SD(0)/HD(1,0x01,0,0x81f,0x18fa8)
Trying ESP: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(0)/SD(0)/HD(1,0x01,0,0x81f,0x18fa8)
Setting currdev to disk0p1:
Trying: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/SD(0)/SD(0)/HD(2,0x01,0,0x197c7,0x5e6821)
Setting currdev to disk0p2:
Loading /boot/defaults/loader.conf
Loading /boot/defaults/loader.conf
Loading /boot/device.hints
Loading /boot/loader.conf
Loading /boot/loader.conf.local
 
There is also a file called "cmdline" in the dos partition of the rapberry OS distro. I don't know what it's good for.
And calling "init 1" on freebsd, makes the system just hang.
 
Back
Top