# Building NanoBSD images on Arm



## Phishfry (Mar 9, 2022)

My Arm usage would benefit from NanoBSD builds. I want Arm appliances.
I know we have scripts in /nanobsd/custom for Arm builds but these are for cross-compiling.
I want to build NanoBSD on/and for ArmV7 and Arm64 boards. I have SATA support on both platforms.

Anybody out there try this? Native build NanoBSD on Arm? I can just flash u-boot to it after building.
Maybe create a 'uboot copy function' for it in my conf file.
EFI NanoBSD I have not tackled yet.


----------



## Phishfry (Mar 10, 2022)

I have been keeping low hours on several Arm boards because of worries of wearing out the eMMC soldered onboard. These will be my primary NanoBSD targets.


----------



## ulzeraj (Mar 11, 2022)

I'd say plug an external disk, run a jail on that disk and complie your stuff in the jail. Maybe also swap from the external disk.


----------



## covacat (Mar 11, 2022)

it's a lot faster to cross compile

also the provided standard/images will fit on a 2gb card
it's easy enough to fit a standard image in 1GB if you delete for example all debug stuff and static libraries 
if you further delete unused kernel modules and the clang related stuff you can fit it in half a gig


----------



## Phishfry (Mar 12, 2022)

More like 125MB base plus any appliance related packages. That was on 12-RELEASE.
My NanoBSD wireless AP with 140 Megabyte build.

```
root@APU2:~ # df -h
Filesystem        Size    Used   Avail Capacity  Mounted on
/dev/mmcsd0s1a    220M    140M     63M    69%    /
devfs             1.0K    1.0K      0B   100%    /dev
/dev/md0           19M    2.3M     15M    14%    /etc
/dev/md1           19M    824K     16M     5%    /var
```

I need to do a fresh run.
I don't care about time. On BBB I learned some of the tricks of compiling on a slow box.
What I wonder is if it works on Arm.

Dual slices is nice.

```
=>     63  7774145  mmcsd0  MBR  (3.7G)
       63   467649       1  freebsd  [active]  (228M)
   467712       63          - free -  (32K)
   467775   467649       2  freebsd  (228M)
   935424    40320       3  freebsd  (20M)
   975744  6798464          - free -  (3.2G)

=>     0  467649  mmcsd0s1  BSD  (228M)
       0      16            - free -  (8.0K)
      16  467633         1  !0  (228M)

=>     0  467649  mmcsd0s2  BSD  (228M)
       0      16            - free -  (8.0K)
      16  467633         1  !0  (228M)
```


----------

