[Work In Progress] OPNsense Ported into ARM Devices

Started by nekoprog, March 25, 2019, 11:55:58 AM

Previous topic - Next topic
May 03, 2019, 09:07:38 AM #45 Last Edit: May 03, 2019, 09:13:38 AM by nekoprog
Quote from: chemlud on May 03, 2019, 08:54:33 AM
Downloaded raspi 3 image and checked SHA256 on .img (!, not .xz), was OK.

Burned image with

dd if=OPNsense-##.#.##-[Type]-[Architecture].img of=/dev/daX bs=16k

but on boot I get the infamous rainbow screen and green LED blinking seven times, which means:

7 flashes: kernel.img not found

https://elinux.org/R-Pi_Troubleshooting#Green_LED_blinks_in_a_specific_pattern

...tbc...
Looks promising, want to experiment a little bit? Copy all these files into your microsd card, but do not overwrite existing files.

If still blinking, try installing rpi-firmware on your freebsd machine, and copy armstub8.bin into the same folder mentioned above.

Hmm, I'm not a GIT-guy (and my local nerd is still sleeping...), how to download all this stuff? 8-)

Have no BSD-machine here currently iirc, tried last fall last time, I guess... busy days... ;-)

kind regards
chemlud
____
"The price of reliability is the pursuit of the utmost simplicity."
C.A.R. Hoare

felix eichhorns premium katzenfutter mit der extraportion energie

A router is not a switch - A router is not a switch - A router is not a switch - A rou....

Quote from: chemlud on May 03, 2019, 09:32:30 AM
Hmm, I'm not a GIT-guy (and my local nerd is still sleeping...), how to download all this stuff? 8-)

Have no BSD-machine here currently iirc, tried last fall last time, I guess... busy days... ;-)
No worries. Try copying these files and boot. One fix at a time and remove older fix before trying other fix.
Fix 1
Fix 2 (copy both files)

OK, fix1 gives me a rainbow screen without green blinking...

kind regards
chemlud
____
"The price of reliability is the pursuit of the utmost simplicity."
C.A.R. Hoare

felix eichhorns premium katzenfutter mit der extraportion energie

A router is not a switch - A router is not a switch - A router is not a switch - A rou....


Rainbow screen is always "end of story" on raspi. Nothing going further...


Fix 1 removed, added the two kernel .img of fix 2 and it actually boots, but after

(secondary_start kernel) from [<00.....

next line is

---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2) ]---
kind regards
chemlud
____
"The price of reliability is the pursuit of the utmost simplicity."
C.A.R. Hoare

felix eichhorns premium katzenfutter mit der extraportion energie

A router is not a switch - A router is not a switch - A router is not a switch - A rou....

May 03, 2019, 10:23:25 AM #51 Last Edit: May 03, 2019, 10:31:35 AM by nekoprog
Quote from: chemlud on May 03, 2019, 10:13:21 AM
Rainbow screen is always "end of story" on raspi. Nothing going further...


Fix 1 removed, added the two kernel .img of fix 2 and it actually boots, but after

(secondary_start kernel) from [<00.....

next line is

---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2) ]---
Thanks for the test. I'll take another look at it. Probably some minor kernel misconfiguration. as long as it boots, there will be a way to proceed.

Want to try number guessing game? Looks like there's a fix here https://raspberrypi.stackexchange.com/questions/40854/kernel-panic-not-syncing-vfs-unable-to-mount-root-fs-on-unknown-block179-6

or maybe some stupid mistake by me. can you rename config_rpi3.txt to config.txt?

I tried the config rename, but then I get :

mmc1 is current device
scanning mmc 1:1...

Device =: unknown device


...and then it tries a PXE boot:

"Waiting for Ethernet connection...

missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/01-b8-27-....


...and after some unsuccessful tries I end up with a U-boot prompt.
kind regards
chemlud
____
"The price of reliability is the pursuit of the utmost simplicity."
C.A.R. Hoare

felix eichhorns premium katzenfutter mit der extraportion energie

A router is not a switch - A router is not a switch - A router is not a switch - A rou....

Quote from: chemlud on May 03, 2019, 10:46:20 AM
I tried the config rename, but then I get :

mmc1 is current device
scanning mmc 1:1...

Device =: unknown device


...and then it tries a PXE boot:

"Waiting for Ethernet connection...

missing environment variable: pxeuuid
missing environment variable: bootfile
Retrieving file: pxelinux.cfg/01-b8-27-....


...and after some unsuccessful tries I end up with a U-boot prompt.
It digs deeper. Can you try booting it again with fix 1?

Regarding the link to fix:

I can open (on a linux machine) only the first partition of the (two) partitions visible on the SD-card, the one called "MSDOSBOOT" and on this partition I see no cmdline.txt

Booting with SHIFT pressed ends at the same error message, I think this works only on NOOBS?
kind regards
chemlud
____
"The price of reliability is the pursuit of the utmost simplicity."
C.A.R. Hoare

felix eichhorns premium katzenfutter mit der extraportion energie

A router is not a switch - A router is not a switch - A router is not a switch - A rou....

Quote from: chemlud on May 03, 2019, 10:56:44 AM
Regarding the link to fix:

I can open (on a linux machine) only the first partition of the (two) partitions visible on the SD-card, the one called "MSDOSBOOT" and on this partition I see no cmdline.txt

Booting with SHIFT pressed ends at the same error message, I think this works only on NOOBS?
cmdline.txt was not included in freebsd rpi-firmware package. i think it's optional, because rpi2 also didn't have it. i'll take another look at it later.

Adding fix 1 (armstub8.bin) ends in rainbow screen. This is a deadend road. Tried again (with the two kernel images), same result
kind regards
chemlud
____
"The price of reliability is the pursuit of the utmost simplicity."
C.A.R. Hoare

felix eichhorns premium katzenfutter mit der extraportion energie

A router is not a switch - A router is not a switch - A router is not a switch - A rou....

May 03, 2019, 11:06:42 AM #57 Last Edit: May 03, 2019, 11:22:27 AM by nekoprog
Quote from: chemlud on May 03, 2019, 11:01:22 AM
Adding fix 1 (armstub8.bin) ends in rainbow screen. This is a deadend road. Tried again (with the two kernel images), same result
Want to try this fix? https://lists.freebsd.org/pipermail/freebsd-arm/2016-November/015094.html

or make a copy of bcm2710* and rename it to bcm2837*.

May 03, 2019, 11:23:08 AM #58 Last Edit: May 03, 2019, 11:30:24 AM by chemlud
I copied over a cmdline.txt from a functional raspbian stretch (booting on any raspi) with the following content:

Quotedwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

and changed

root=/dev/mmcblk0p2

to

root=/dev/mmcblk0p6

...but this changed only the kernel panic message to

---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,6) ]---

...would love to play around the rest of the weekend, but have to earn some money unfortunately...

;-)

PS: The rootfstype is not EXT4 for the opnsense, what would be correct for cmdline.txt? Or simply remove this entry?
kind regards
chemlud
____
"The price of reliability is the pursuit of the utmost simplicity."
C.A.R. Hoare

felix eichhorns premium katzenfutter mit der extraportion energie

A router is not a switch - A router is not a switch - A router is not a switch - A rou....

...renaming the bcm2710.....dtb to bcm2837...dtb didn't change anything.

I think we try to boot from the wrong partition, does your image use the

/dev/mmcblk0p2

for root?
kind regards
chemlud
____
"The price of reliability is the pursuit of the utmost simplicity."
C.A.R. Hoare

felix eichhorns premium katzenfutter mit der extraportion energie

A router is not a switch - A router is not a switch - A router is not a switch - A rou....