Top of MFM project information
If you have any questions, improvements, or corrections email me at the address at the bottom of the page.This page documents how I made the image for flashing the BeagleBone for the MFM reader/emulator.
As root
cd /opt git clone https://github.com/dgesswein/mfm.git chown -R debian.debian mfm git clone https://github.com/beagleboard/am335x_pru_package --depth 1 cd am335x_pru_package make make install cp /opt/mfm/util/MFM-EMU-1.dts /opt/source/dtb-5.10-ti/src/arm/overlays/ Edited /etc/systemd/resolved.conf FallbackDNS=1.1.1.1 Edited /etc/systemd/journald.conf SystemMaxUse=20M Edited /boot/uEnv.txt add uboot_overlay_pru=AM335X-PRU-UIO-00A0.dtbo dtb_overlay=MFM-EMU-1.dtbo uncomment #disable_uboot_overlay_video=1 #disable_uboot_overlay_audio=1 #disable_uboot_overlay_wireless=1 #disable_uboot_overlay_addr0=1 #disable_uboot_overlay_addr1=1 #disable_uboot_overlay_addr2=1 #disable_uboot_overlay_addr3=1 apt update apt remove firmware-iwlwifi apt upgrade apt install g++ make libiberty-dev gdb apt install zip reptyr xdelta rdiff kpartx mtools apt install bzip2 eject xz-utils zerofree file apt install overlayroot ti-devmem2 aptitude apt install strace mmc-utils hdparm traceroute apt-get clean rm /var/cache/apt/*.bin rm -rf /var/lib/apt/lists cd /opt wget http://www.pdp8online.com/mfm/code/prudebug-0.24b.tgz tar -xzf prudebug-0.24b.tgz rm prudebug-0.24b.tgz cd prudebug-0.24b makeAs debian
cd /opt/mfm/util make /home/debian/.bash_aliases make /etc/mfm_emu.conf make /etc/systemd/system/mfm_emu.service make install sudo ldconfig cd /opt/mfm make
apt update apt upgrade (Note, didn't upgrade libpruio-modules-5.10.168-ti-r71* qcacld-2.0-modules-5.10.168-ti-r71* rtl8723bu-modules-5.10.168-ti-r71* rtl8723du-modules-5.10.168-ti-r71* rtl8821cu-modules-5.10.168-ti-r71* ) cd /opt/mfm git pull --ff-only apt-get --purge remove linux-image-5.10.168-ti-r71 rm -rf /boot/dtbs/5.10.168-ti-r71/ Later changes Edited /etc/systemd/network/usb1.network to make default route for USB with lower prioirity than Ethernet. If I turn on masquerade on Linux host computer USB can access internet then. [Route] Gateway=192.168.6.1 Metric=10000 Modified /opt/mfm/emu/start_mfm_emu to load modules needed for operation instead of waiting for them to save 7 seconds in startup time. Rebuilt kernel with patch to reduce startup time by 6 seconds. If apt-get upgrade replaces my kernel boot will slow down again. Modified my script to convert flasher to non flasher to enable grow_partition.service to make partition full size of media kpartx -av BBB-mfm-emu-v4.10-OS-11.7-bone41-flasher.img zerofree /dev/mapper/loop0p1 cd /mnt mkdir mmcblk0 mmcblk0p1 sda sda1 Added to fstab (didn't do auto since that mounted FAT files as root) /dev/sda /mnt/sda auto user,nofail,rw,suid,dev,exec,noauto,async 0 0 /dev/sda1 /mnt/sda1 auto user,nofail,rw,suid,dev,exec,noauto,async 0 0 /dev/mmcblk0 /mnt/mmcblk0 auto user,nofail,rw,suid,dev,exec,noauto,async 0 0 /dev/mmcblk0p1 /mnt/mmcblk0p1 auto user,nofail,rw,suid,dev,exec,noauto,async 0 0 Added to /usr/sbin/init-beagle-flasher before message="INFO: /proc/cmdline" /bin/mount -t proc proc /proc /bin/mount -t sysfs sysfs /sys so cat /proc/cmdline doesen't cause script failure removed excluding /mnt from rsync Added making my entries in /etc/fstab Changed name to .djg since upgrades modify file. Changed uBoot.env to call mine. To force key regeneration after flashing ln -s /lib/systemd/system/regenerate_ssh_host_keys.service /mnt/temp/etc/systemd/system/multi-user.target.wants/regenerate_ssh_host_keys.service To update mfm sudo rsync -aAxXv --filter='-x security.selinux' /opt/mfm/ /mnt/mmcblk0p1/opt/mfm (Didn't work) apt install bbb.io-kernel-5.15-bone ln -s /opt/source/dtb-5.15/ /opt/source/dtb-5.15-bone apt install bbb.io-kernel-5.15-bone apt install rtl8723bu-modules-5.15.137-bone41 rtl8723du-modules-5.15.137-bone41 apt-get --purge remove linux-image-5.10.168-ti-r71 linux-image-5.10.168-ti-r74 bbb.io-kernel-5.10-ti rm -rf /boot/dtbs/5.10.168-ti-r7*
To force generation of new SSH keys on first boot
systemctl enable regenerate_ssh_host_keys or cd /etc/systemd/system/multi-user.target.wants ln -s /lib/systemd/system/regenerate_ssh_host_keys.service regenerate_ssh_host_keys.service