freebsd / crochet

Build FreeBSD images for RaspberryPi, BeagleBone, PandaBoard, and others.
BSD 2-Clause "Simplified" License
608 stars 187 forks source link

introduce support for the SolidRun clearfog #250

Open Artox opened 6 years ago

Artox commented 6 years ago

Initial support for the SolidRun Clearfog laned in FreeBSD with r319914. The board has acceptable support in mainline U-Boot, as well as a vendor fork based on 2018.01. For now an MBR partition table is used, with a fat partition to load DTB and ubldr from, reserved space covering the first 1M of the disk to make sure installing u-boot later doesn't destroy the boot partition.

Note: this currently depends on issue #249

This is a first draft, let me know what you think, and if some things can be done differently. Especially the reserved partition looks very hacky. My point was to reserve exactly the space that U-Boot may use. The vendor u-boot is configured to store the environment right before 1M into the block device that it is running from. So I made a partition that starts as early as possible, and spans up to sector 2047. Maybe there could be a helper function for such task? Or, considering that nobody uses the disk_reserved_create function, maybe it could made to not align?