OPNsense Forum

English Forums => Development and Code Review => Topic started by: gondox on August 19, 2022, 09:14:50 pm

Title: OPNsense 22.7 on RPI4 CM only boots after boot file transfer
Post by: gondox on August 19, 2022, 09:14:50 pm
Hi,

I have been toiling with this for quite some time, but I was finally able to compile OPNsense for my DFRobot routerboard with a RPI4 CM!  ;D

Code: [Select]
=====
Message from opnsense-22.7.1_20:

--
Yes, I'm back in black
>>> Begin extra: arm_hook
rc.loader: assembling banner
rc.loader: assembling brand
rc.loader: assembling misc
rc.loader: assembling modules
>>> End extra: arm_hook
>>> Setting up entropy in /usr/obj/usr/tools/config/22.7/OpenSSL:aarch64
1+0 records in
1+0 records out
4096 bytes transferred in 0.000429 secs (9542425 bytes/sec)
1+0 records in
1+0 records out
4096 bytes transferred in 0.000397 secs (10309668 bytes/sec)
Creating `/usr/obj/usr/tools/config/22.7/OpenSSL:aarch64/efiboot.img'
/usr/obj/usr/tools/config/22.7/OpenSSL:aarch64/efiboot.img: 65528 sectors in 65528 FAT32 clusters (512 bytes/cluster)
BytesPerSec=512 SecPerClust=1 ResSectors=32 FATs=2 Media=0xf0 SecPerTrack=63 Heads=255 HiddenSecs=0 HugeSectors=66584 FATsecs=512 RootCluster=2 FSInfo=1 Backup=2
Populating `/usr/obj/usr/tools/config/22.7/OpenSSL:aarch64/efiboot.img'
Image `/usr/obj/usr/tools/config/22.7/OpenSSL:aarch64/efiboot.img' complete
>>> Building arm image... done

Code: [Select]
Fri Aug 19 17:43:59 UTC 2022

*** OPNsense.localdomain: OPNsense 22.7.1_20 (aarch64/OpenSSL) ***

 LAN (re0)       -> v4: 192.168.1.1/24
 WAN (genet0)    ->

 HTTPS: SHA256 F4 F5 E1 90 61 4D D0 B4 78 B9 D6 21 58 0C C8 CA
               70 A5 AC B8 E1 EE B7 DD AA B3 8C EE D8 B1 DC 5D

FreeBSD/arm64 (OPNsense.localdomain) (ttyu0)

login: root
Password:
----------------------------------------------
|      Hello, this is OPNsense 22.7          |         @@@@@@@@@@@@@@@
|                                            |        @@@@         @@@@
| Website:      https://opnsense.org/        |         @@@\\\   ///@@@
| Handbook:     https://docs.opnsense.org/   |       ))))))))   ((((((((
| Forums:       https://forum.opnsense.org/  |         @@@///   \\\@@@
| Code:         https://github.com/opnsense  |        @@@@         @@@@
| Twitter:      https://twitter.com/opnsense |         @@@@@@@@@@@@@@@
----------------------------------------------

*** OPNsense.localdomain: OPNsense 22.7.1_20 (aarch64/OpenSSL) ***

 LAN (re0)       -> v4: 192.168.1.1/24
 WAN (genet0)    ->

 HTTPS: SHA256 F4 F5 E1 90 61 4D D0 B4 78 B9 D6 21 58 0C C8 CA
               70 A5 AC B8 E1 EE B7 DD AA B3 8C EE D8 B1 DC 5D

  0) Logout                              7) Ping host
  1) Assign interfaces                   8) Shell
  2) Set interface IP address            9) pfTop
  3) Reset the root password            10) Firewall log
  4) Reset to factory defaults          11) Reload all services
  5) Power off system                   12) Update from console
  6) Reboot system                      13) Restore a backup

Enter an option:

One remaining problem is, that booting with the the files in the MSDOSBOOT FAT partition does not work. After building the image, I transferred the files from a Freebsd 13.1 RPI image to the OPNsense Partition and lo and behold: It worked!

Could it be that the build tools use the package: "u-boot-rpi4-2022.04_1" and Freebsd 13.1 uses: "u-boot-rpi-arm64-2022.04_1" ?

If so: where would I need to look next? Can I simply change the package name in some tools scripts?
Title: Re: OPNsense 22.7 on RPI4 CM only boots after boot file transfer
Post by: Mittelscharf on November 07, 2022, 08:19:13 pm
Hi,

I would also like to try OPNsense on the dfrobot board and wonder how and what data exactly you copied to the OPNsense partition? Do you have a little tutorial or something for that?

I'm trying to transfer this image (https://ftp.yrzr.tk/opnsense/FreeBSD%3A13%3Aaarch64/22.7/images/OPNsense-22.7.5-OpenSSL-arm-aarch64-RPI.img.xz) (blog article (https://yrzr.tk/opnsense-22-for-aarch64/)) to the PI right now, but unfortunately without success.
Title: Re: OPNsense 22.7 on RPI4 CM only boots after boot file transfer
Post by: chemlud on November 07, 2022, 08:35:47 pm
The TO did something completely different than you intend, he complied 22.7 and got it running, you try to copy (dd) an image to an SD-card and boot this. You should simply follow the how-to in your link and it should work (disclaimer: I have no pi 4 and have not tried opnsense on pi for some months at least...)
Title: Re: OPNsense 22.7 on RPI4 CM only boots after boot file transfer
Post by: Mittelscharf on November 07, 2022, 08:50:17 pm
Quote
You should simply follow the how-to in your link and it should work

yes, that is exactly what I have also tried, but unfortunately without success. Hence my question
Title: Re: OPNsense 22.7 on RPI4 CM only boots after boot file transfer
Post by: chemlud on November 07, 2022, 08:55:19 pm
...any details on "no success"? ;-) Do you have a serial console cable for your raspi to copy/paste the output here? With monitor attached you need to take photos during (failing?) boot process. Without knowing what goes wrong, no way to help.

These raspi images are pretty much experimental after all.