opnsense / tools

OPNsense release engineering toolkit
https://opnsense.org/
BSD 2-Clause "Simplified" License
271 stars 195 forks source link

Creating NANO image for ARM fails #404

Closed turboproc closed 6 months ago

turboproc commented 6 months ago

Trying to build a nano image for ARM. It fails in the final steps of creating the img file as shown below:

+ makefs -s 3g -B little -f 400000 -o 'version=2' -o 'label=OPNsense_Nano' /usr/local/opnsense/build/24.1/aarch64/images/OPNsense-202403301232-nano-aarch64.img /usr/obj/usr/tools/config/24.1/aarch64
Calculated size of `/usr/local/opnsense/build/24.1/aarch64/images/OPNsense-202403301232-nano-aarch64.img': 3221225472 bytes, 482841 inodes
Extent size set to 32768
/usr/local/opnsense/build/24.1/aarch64/images/OPNsense-202403301232-nano-aarch64.img: 3072.0MB (6291456 sectors) block size 32768, fragment size 4096
        using 7 cylinder groups of 479.00MB, 15328 blks, 122624 inodes.
super-block backups (for fsck -b #) at:
     192,  981184, 1962176, 2943168, 3924160, 4905152, 5886144,
Populating `/usr/local/opnsense/build/24.1/aarch64/images/OPNsense-202403301232-nano-aarch64.img'
Image `/usr/local/opnsense/build/24.1/aarch64/images/OPNsense-202403301232-nano-aarch64.img' complete
+ mdconfig -a -t vnode -f /usr/local/opnsense/build/24.1/aarch64/images/OPNsense-202403301232-nano-aarch64.img
+ DEV=md0
+ gpart create -s BSD md0
md0 created
+ gpart bootcode -b /usr/obj/usr/tools/config/24.1/aarch64/boot/boot md0
gpart: /usr/obj/usr/tools/config/24.1/aarch64/boot/boot: No such file or directory
*** Error code 1

The directory referred to shows various files related to booting but not the one needed:

me@rock-pi4:/usr/tools $ ls -al /usr/obj/usr/tools/config/24.1/aarch64/boot
total 4948
drwxr-xr-x  14 root  wheel     1024 Mar 30 12:35 .
drwxr-xr-x  20 root  wheel      512 Mar 30 12:35 ..
-r--r--r--   1 root  wheel     3533 Mar 29 00:56 beastie.4th
-r-xr-xr-x   1 root  wheel   123496 Mar 29 00:56 boot1.efi
-r--r--r--   1 root  wheel     2326 Mar 29 00:56 brand-fbsd.4th
-r--r--r--   1 root  wheel     2783 Mar 29 00:56 brand.4th
-r--r--r--   1 root  wheel     6197 Mar 29 00:56 check-password.4th
-r--r--r--   1 root  wheel     1903 Mar 29 00:56 color.4th
drwxr-xr-x   2 root  wheel      512 Mar 29 00:56 defaults
-r--r--r--   1 root  wheel     3985 Mar 29 00:56 delay.4th
drwxr-xr-x   8 root  wheel      512 Mar 30 12:33 dtb
drwxr-xr-x   2 root  wheel      512 Mar 29 00:52 efi
-r--r--r--   1 root  wheel     1525 Mar 29 00:56 efi.4th
-rw-------   1 root  wheel     4096 Mar 30 12:35 entropy
drwxr-xr-x   2 root  wheel      512 Mar 29 00:52 firmware
drwxr-xr-x   2 root  wheel      512 Mar 29 00:56 fonts
-r--r--r--   1 root  wheel     3936 Mar 29 00:56 frames.4th
-r-xr-xr-x   1 root  wheel   120824 Mar 29 00:56 gptboot.efi
drwxr-xr-x   2 root  wheel      512 Mar 29 00:56 images
drwxr-xr-x   2 root  wheel    15360 Mar 30 12:33 kernel
-r--r--r--   1 root  wheel     7812 Mar 29 00:56 loader.4th
-rw-r--r--   1 root  wheel     1143 Mar 30 12:35 loader.conf
drwxr-xr-x   2 root  wheel      512 Mar 29 00:52 loader.conf.d
-r-xr-xr-x   2 root  wheel  1174172 Mar 29 00:56 loader.efi
-r--r--r--   1 root  wheel    13653 Mar 29 00:56 loader.help.efi
-r--r--r--   1 root  wheel      655 Mar 29 00:56 loader.rc
-r-xr-xr-x   1 root  wheel  1037996 Mar 29 00:56 loader_4th.efi
-r-xr-xr-x   2 root  wheel  1174172 Mar 29 00:56 loader_lua.efi
-r-xr-xr-x   1 root  wheel   974296 Mar 29 00:56 loader_simp.efi
-r--r--r--   1 root  wheel     3032 Mar 29 00:56 logo-beastie.4th
-r--r--r--   1 root  wheel     2556 Mar 29 00:56 logo-beastiebw.4th
-r--r--r--   1 root  wheel     2137 Mar 29 00:56 logo-fbsdbw.4th
-r--r--r--   1 root  wheel     2803 Mar 29 00:56 logo-orb.4th
-r--r--r--   1 root  wheel     2278 Mar 29 00:56 logo-orbbw.4th
drwxr-xr-x   2 root  wheel      512 Mar 30 12:35 lua
-r--r--r--   1 root  wheel     9178 Mar 29 00:56 menu-commands.4th
-r--r--r--   1 root  wheel    36106 Mar 29 00:56 menu.4th
-r--r--r--   1 root  wheel     6257 Mar 29 00:56 menu.rc
-r--r--r--   1 root  wheel    18523 Mar 29 00:56 menusets.4th
drwxr-xr-x   2 root  wheel      512 Mar 29 00:52 modules
-r--r--r--   1 root  wheel     2666 Mar 29 00:56 screen.4th
-r--r--r--   1 root  wheel     2538 Mar 29 00:56 shortcuts.4th
-r--r--r--   1 root  wheel    38135 Mar 29 00:56 support.4th
drwxr-xr-x   2 root  wheel      512 Mar 29 00:52 uboot
-r--r--r--   1 root  wheel     2992 Mar 29 00:56 version.4th
drwxr-xr-x   2 root  wheel      512 Mar 29 00:52 zfs
me@rock-pi4:/usr/tools $

Not immediately sure how to solve this. Suggestions?

fichtner commented 6 months ago

The „arm“ image is the only supported image for ARM.

turboproc commented 6 months ago

Indeed, my fault. Too long ago I did this. The image required for ARM is just arm

Up and running already ;-)

fichtner commented 6 months ago

Ok, happy to hear. 😊

Cheers, Franco