Am Wed, 28 Dec 2022 09:42:49 +0100 schrieb Bernhard Ernst <bernhard.er...@bullet500.de>:
> Beginn der weitergeleiteten Nachricht: > > Datum: Tue, 27 Dec 2022 22:50:18 +0100 > Von: Bernhard Ernst <bernhard.er...@bullet500.de> > An: Mark Kettenis <mark.kette...@xs4all.nl> > Betreff: Re: bpI-m5 > > > Am Tue, 27 Dec 2022 15:04:42 +0100 > schrieb Mark Kettenis <mark.kette...@xs4all.nl>: > > > > Date: Mon, 26 Dec 2022 23:02:38 +0100 > > > From: Bernhard Ernst <bernhard.er...@bullet500.de> > > > > > > Am Mon, 26 Dec 2022 18:30:33 +0100 > > > schrieb Mark Kettenis <mark.kette...@xs4all.nl>: > > > > > > > > Date: Mon, 26 Dec 2022 08:50:53 +0100 > > > > > From: Bernhard Ernst <bernhard.er...@bullet500.de> > > > > > > > > > > Am Sun, 25 Dec 2022 23:48:35 +0100 > > > > > schrieb Mark Kettenis <mark.kette...@xs4all.nl>: > > > > > > > > > > > > Date: Sun, 25 Dec 2022 18:58:34 +0100 > > > > > > > From: "Bodie" <bo...@bodie.cz> > > > > > > > > > > > > Hi Berni, > > > > > > > > > > > > > On Sun Dec 25, 2022 at 12:45 PM CET, Bernhard Ernst wrote: > > > > > > > > > > > > > > > Hello everybody, > > > > > > > > I am Berni from Germany and quite new here in the > > > > > > > > mailing list. I use several Raspberry 4B (8GB) with > > > > > > > > OpenBSD since a couple of years. No problems, rock > > > > > > > > solid systems. > > > > > > > > > > > > > > > > But now I 've got 2 pcs. BananaPi M5. I made some tests > > > > > > > > with Debian and ArchLinux images and all teste were > > > > > > > > fine. However the intention is to run OpenBSD on the > > > > > > > > Bananas. Reading this mailing list I found nothing > > > > > > > > about BPi-M5 and OpenBSD, but some information about > > > > > > > > running OpenBSD on Odroid C4/HC4. The Odroid shall be > > > > > > > > quite similar to the Banana, an so I tried the hints > > > > > > > > about the Odroid: > > > > > > > > > > > > > > > > I wrote the OpenBSD image (miniroot72.img, install > > > > > > > > 72.img) and then the formware u-boot.bin.sd.bin onto the > > > > > > > > sdcard, connected the uart - but nothing happend. All 3 > > > > > > > > leds on the Banana light on, but no byte came over the > > > > > > > > uart. Test the uart connection with the debug-uart of > > > > > > > > the Banana brought some readable hard ware info. > > > > > > > > > > > > > > > > My questions are: Is there any experience with the > > > > > > > > BPi-M5? Was it the wrong way to try the Odroid u-boot? > > > > > > > > Or am I riding a dead horse with my BPi-M5? > > > > > > > > > > > > Using the Odroid u-boot is probably a bad idea. There > > > > > > probably are some board-specific details that are different > > > > > > which may very well mean it doesn't boot. On top of that, > > > > > > it is probably based on a vendor fork that is ancient and/or > > > > > > "customized" and won't be able to boot OpenBSD. > > > > > > > > > > > > What you want is a mainline u-boot. The problem with the > > > > > > Amlogic SoCs is that they are locked down and require a > > > > > > proprietary binary as a first stage bootloader and require a > > > > > > binary tool that is only provided for Linux to merge things > > > > > > together. This make it impossible to build on OpenBSD and > > > > > > somewhat questionable to redistribute the resulting > > > > > > binaries. So building this is a challenge. > > > > > > > > > > > > I may be able to build you something in the next few days > > > > > > though. > > > > > > > Odroid C4/HC4 are Amlogic G12/SM1 which is S905X2. BPi-M5 > > > > > > > is S905X3. Eg. on XDA forums you can find that people had > > > > > > > problems to run Linux stuff on BPi-M5 too in 2021 so > > > > > > > question is what is different in that X3. > > > > > > > > > > > > No, Odroid C4/HC4 are S905X3. > > > > > > > > > > > > > > > > Hi Mark, > > > > > thank you very much for your clarifications, very helpfull. > > > > > Now I understand why the C4 u-boot cannot boot. With my poor > > > > > knowledge about this manner it may be better to run along with > > > > > Armtix on the Bananas. > > > > > > > > > > If you will spend your time to build a mainline u-boot, that > > > > > would be great and I would appreceate this very much. Off > > > > > course I will spend you a coffee or something like that. > > > > > > > > > > > > > Try this one: > > > > > > > > https://sibelius.home.xs4all.nl/firmware/bananapi-m5/u-boot.bin.sd.bin > > > > > > > > it needs to be written to a uSD card with: > > > > > > > > $ dd if=u-boot.bin.sd.bin of=/dev/sdNc bs=512 skip=1 seek=1 > > > > $ dd if=u-boot.bin.sd.bin of=/dev/sdNc bs=1 count=444 > > > > > > > > This stuff is built from the latest upstream u-boot master: > > > > > > > > https://github.com/u-boot/u-boot > > > > > > > > and the LibreELEC FIP collection: > > > > > > > > https://github.com/LibreELEC/amlogic-boot-fip > > > > > > > > doing something like (on x86-64 Linux): > > > > > > > > $ export CROSS_COMPILE=aarch64-elf- > > > > $ cd u-boot > > > > $ make bananapi-m5_defconfig > > > > $ make > > > > $ .. > > > > $ cd amlogic-boot-fip > > > > $ mkdir build-bananapi-m5 > > > > $ ./build-fip.sh bananapi-m5 ../u-boot/u-boot.bin > > > > build-bananapi-m5/ > > > > > > > > with the results landing in the build-bananapi-m5 directory > > > > > > > > > > Thanks a lot, Mark, will try tomorrow morning. Will I (hopefully) > > > end up into HDMI or a serial? > > > > Serial should definitely work. And HDMI works on my odroid-c4 so > > there is a good chance that it will work on the bananabi-m5 as well. > > > > If you choose to use HDMI, make sure you type "set tty fb0" at the > > OpenBSD boot> prompt, otherwise kernel output will go to the serial > > port and you won't see it. > > > > Cheers, > > > > Mark > > > > IT WORKS !!! Thank you so much, Mark. The u-boot boot into the serial, > but when I type "set tty fb0" it goes to HDMI. > I was able to install from install72.img to the build-in emmc as well > as to an external usd ssd. > However ther is a little mismatch concerning the drive names. When I > installed the system to the emmc, it was sd0. But at the OpenBSD boot > prompt I must enter "sd1a:/bsd to get the system starting. Later, > after the boot process its again sd0. > So I cannot do an automatic boot. Any chance to solve this? > > Regards > Berni > Correction: automatic boot is possible with entries in /etc/boot.con: set tty fb0 boot sd1a:/bsd # in this case the systems boots from the usb ssd. In this stage the BananaPi's do everything I need. Audio, wlan, are not yet tested, because I don't need it. Thanks again for the wonderfull u-boot.bin. Regards Berni