HOWTO: Run the Meteohub image on the Pi 3B+: Meteohub Frankenkernel edition

all about Meteohub on the new Raspberry PI platform

Moderator: Mattk

Post Reply
rainrainrain
Junior Boarder
Junior Boarder
Posts: 34
Joined: Fri Jul 11, 2014 9:22 am

HOWTO: Run the Meteohub image on the Pi 3B+: Meteohub Frankenkernel edition

Post by rainrainrain » Tue May 15, 2018 1:22 pm

Update: See the posts towards the end of this thread for updated instructions, including pre-packaged files for /boot and notes on drivers needed in /lib/modules.

As per my earlier post, the Meteohub image won't run on the Pi 3B+, however there is a way to get it to run in a Frankenkernel configuration. First, you need to write the latest image, http://www.meteohub.de/files/mhrpi-v5.0s.rar, to an SD card.

(A note on this image, since it's rather old it'll tell you that the demo version has expired when it's running, so you'll need your licence key ready after you install it).

Then go to https://github.com/raspberrypi/firmware ... aster/boot and clone/download the contents of the /boot directory. Use this to overwrite everything in the same directory on the SD card (so /boot and /boot/overlays), which includes the drivers and kernel that'll boot on the 3B+.

Finally, you've got an image that will boot on a 3B+. There are errors during the boot process related to some Meteohub scripts, but I don't know if that's normal or not.

Once it's booted, SSH in with user "root", password "meteohub", and:

apt-get update
apt-get dist-upgrade
apt autoremove

Having gone through all that, it would be nice to get an updated version of the Meteohub image that runs out of the box on the 3B+.

Also, the fact that this Frankenkernel boots and runs can be taken as proof that Meteohub runs fine on the latest kernel, and doesn't need the two-year-old one that the current image is built on :-).
Last edited by rainrainrain on Wed May 23, 2018 12:07 pm, edited 1 time in total.

rainrainrain
Junior Boarder
Junior Boarder
Posts: 34
Joined: Fri Jul 11, 2014 9:22 am

Re: HOWTO: Run the Meteohub image on the Pi 3B+: Meteohub Frankenkernel edition

Post by rainrainrain » Tue May 15, 2018 2:33 pm

So while it may boot and run, it's caught by the fact that the latest downloadable image, 5.0s, has expired and won't let you do anything. Trying to update to 5.0x results in a system that won't boot any more due to all the hdX entries in /dev being missing, among other things. In other words you can boot 5.0s but it won't work because it's too old, and you can upgrade to 5.0x but that seems to overwrite some parts of the Frankenkernel and the system won't boot any more except into single-user mode.

So as mentioned earlier it would be nice to have an updated image that uses the current kernel and drivers so it'll run on a 3B+.

User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 5237
Joined: Mon Oct 01, 2007 10:51 pm

Re: HOWTO: Run the Meteohub image on the Pi 3B+: Meteohub Frankenkernel edition

Post by admin » Tue May 15, 2018 2:42 pm

Please download 5.0s and then update to 5.0x on "System" page with "update (auto)" button.

rainrainrain
Junior Boarder
Junior Boarder
Posts: 34
Joined: Fri Jul 11, 2014 9:22 am

Re: HOWTO: Run the Meteohub image on the Pi 3B+: Meteohub Frankenkernel edition

Post by rainrainrain » Wed May 16, 2018 5:03 am

admin wrote:
Tue May 15, 2018 2:42 pm
Please download 5.0s and then update to 5.0x on "System" page with "update (auto)" button.
5.0s won't boot on a 3B+. It doesn't even start to boot, it hangs on the rainbow screen. Trying to upgrade the Frankenkernel config to 5.0x results in a non-bootable system (/dev/hdX are all missing, and lots of other brokennness).

The problem is that the *&£^$*&£ Raspberry people completely changed the power and USB hardware from the 3B to the 3B+, but instead of calling it 4 like it should have been they gave it a name that makes it look like it's compatible with the 3B when it's not. You need a new kernel and new drivers for it. The Frankenkernel config works because the hacked-up result is 3B+ compatible, the 5.0s one definitely isn't, and I don't know about 5.0x because the only way I've got to get to it is via the Frankenkernel, and it may be that that's bricking it.

So, unfortunately, running Meteohub on the 3B+ will require a new system image/new release, anything older than a few months won't boot on a 3B+ due to hardware changes.

rainrainrain
Junior Boarder
Junior Boarder
Posts: 34
Joined: Fri Jul 11, 2014 9:22 am

Re: HOWTO: Run the Meteohub image on the Pi 3B+: Meteohub Frankenkernel edition

Post by rainrainrain » Wed May 16, 2018 5:20 am

Just as a followup, here's one of many articles on the topic:

https://www.raspberrypi.org/forums/view ... p?t=208596

The 3B+ is not compatible with the 3B (great work, Raspberry guys!), you do need a completely new install with the latest kernel and drivers, you apparently can't even dist-upgrade from the 3B to the 3B+ (in other words boot on a 3B, dist-upgrade, and then move the card to a 3B+). The Frankenkernel image is 4.14.39 and includes among other things the bcm2710-rpi-3-b-plus.dtb that's needed to allow it to boot.

rainrainrain
Junior Boarder
Junior Boarder
Posts: 34
Joined: Fri Jul 11, 2014 9:22 am

Re: HOWTO: Run the Meteohub image on the Pi 3B+: Meteohub Frankenkernel edition

Post by rainrainrain » Wed May 16, 2018 5:25 am

Just another followup to document this for others who may be stuck with this:
The problem is quite dramatic – the 3B+ is TOTALLY UNBOOTABLE with all versions of NOOBS older than March 14, 2018.
See https://www.raspberrypi.org/forums/view ... 3&t=212452, which gives Frankenkernel-style instructions on hacking together something to boot on a 3B+. But, in short, you can't use a 3B+ with firmware older than mid-March 2018 (the Frankenkernel is mid-May 2018, since it's straight from the repo).

rainrainrain
Junior Boarder
Junior Boarder
Posts: 34
Joined: Fri Jul 11, 2014 9:22 am

Re: HOWTO: Run the Meteohub image on the Pi 3B+: Meteohub Frankenkernel edition

Post by rainrainrain » Wed May 23, 2018 6:22 am

For anyone else who wants to run Meteohub on a 3B+, I've uploaded the Frankenkernel files as rpi-updated-image.zip.

Note that this contains only the updated kernel and drivers to allow Meteohub to run on a 3B+. It contains no Meteohub files, you'll need to download the Meteohub image (currently 5.0s) and enter your license key to use it.

To apply the above, flash the Meteohub image, then unzip rpi-updated-image.zip over the top of the files in /boot. This will allow the system to run on the 3B+ hardware.

Do not update the Meteohub install! This will replace the Frankenkernel with older files and brick the system.

rainrainrain
Junior Boarder
Junior Boarder
Posts: 34
Joined: Fri Jul 11, 2014 9:22 am

Re: HOWTO: Run the Meteohub image on the Pi 3B+: Meteohub Frankenkernel edition

Post by rainrainrain » Wed May 23, 2018 6:49 am

Of course there may be some small glitches...

Image

rainrainrain
Junior Boarder
Junior Boarder
Posts: 34
Joined: Fri Jul 11, 2014 9:22 am

Re: HOWTO: Run the Meteohub image on the Pi 3B+: Meteohub Frankenkernel edition

Post by rainrainrain » Wed May 23, 2018 11:52 am

So while the above config boots, it won't work with a Meteostick, or possibly anything else, because the 5.0s image contains the wrong drivers:

Code: Select all

modprobe ftdi_sio
libkmod: ERROR ../libkmod/libkmod.c:554 kmod_search_moddep: could not open moddep file '/lib/modules/4.14.39-v7+/modules.dep.bin'
modprobe usbserial
libkmod: ERROR ../libkmod/libkmod.c:554 kmod_search_moddep: could not open moddep file '/lib/modules/4.14.39-v7+/modules.dep.bin'
To solve this, you need to copy the same kernel image file as the one used to create the Frankenkernel onto the RPi and then:

Code: Select all

cd /lib/modules
unzip ~/rpi-firmware-master.zip firmware-master/modules/*
mv firmware-master/modules/4.14.39+/ .
mv firmware-master/modules/4.14.39-v7+/ .
reboot
Once rebooted, the Meteostick will appear as /dev/ttyUSB0 and /dev/ttyMH111 (or whatever). If there's any interest, I'll upload a separate file containing the necessary drivers for /modules, so people can just unzip that directly. As with the Frankenkernel, this contains no Meteohub files, only publicly available Raspbian binaries.

Somebody had better buy me a beer for all this :-).

Amortalis
Junior Boarder
Junior Boarder
Posts: 28
Joined: Sun Jan 22, 2012 1:54 pm

Re: HOWTO: Run the Meteohub image on the Pi 3B+: Meteohub Frankenkernel edition

Post by Amortalis » Fri Jun 01, 2018 8:56 pm

Nice one
I've just got today my Pi (moving from pi 2 to the newest one) so your post is just the right one for me.
I gonna try your workaround in the next days and report back.

Thanks again
Emil

Amortalis
Junior Boarder
Junior Boarder
Posts: 28
Joined: Sun Jan 22, 2012 1:54 pm

Re: HOWTO: Run the Meteohub image on the Pi 3B+: Meteohub Frankenkernel edition

Post by Amortalis » Sat Jun 02, 2018 11:43 am

Small update
in my case is not working, tried with 2 different cards same simptoms.
System powers up but no ACT led flashing, it looks like is not accessing the card...

rainrainrain
Junior Boarder
Junior Boarder
Posts: 34
Joined: Fri Jul 11, 2014 9:22 am

Re: HOWTO: Run the Meteohub image on the Pi 3B+: Meteohub Frankenkernel edition

Post by rainrainrain » Mon Jun 04, 2018 6:50 am

It will be accessing the card, but remember that the current Meteohub image is totally unbootable on a 3B+. if you connect an HDMI monitor (or use HDMI -> DVI, or whatever) you'll see the Pi locked at the rainbow boot screen, it'll only boot if you go through the Frankenkernel patch process. Even then, you need to go through the other two steps to get it to work with USB devices, in my case a Meteostick.

Main thing though is to hook up a keyboard and monitor so you can see what's going on.

Amortalis
Junior Boarder
Junior Boarder
Posts: 28
Joined: Sun Jan 22, 2012 1:54 pm

Re: HOWTO: Run the Meteohub image on the Pi 3B+: Meteohub Frankenkernel edition

Post by Amortalis » Mon Jun 04, 2018 8:42 am

Working now but I used a different approach.
Setup meteohub using the last image 5.0s using the Pi2
Login over SSH as root and following commands have been used:
1. apt-get update
2. apt-get upgrade
3. apt-get dist-upgrade
4. rpi-upgrade
Reboot on Pi2 just to be sure that is working
Changed to Pi3 B Plus board
The ID have been changed so I had to use the migration tool to get the activation key for the new hardware.

Weather station have been recognised without problems, I used an config file that I secured some time ago. I I didn't have to play with drivers... maybe just luck but it works

Until now no problems found, it seems to run correctly.
Also update to Awekas network seems to work.

Thanks again for your time and your help..

Emil

P.S. I did it headless, to carry a keyboard and a mouse was way too much for me :lol:


-e DMESG:
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.14.44-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #1117 SMP Thu May 31 16:57:56 BST 2018
[ 0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: Raspberry Pi 3 Model B Plus Rev 1.3

rainrainrain
Junior Boarder
Junior Boarder
Posts: 34
Joined: Fri Jul 11, 2014 9:22 am

Re: HOWTO: Run the Meteohub image on the Pi 3B+: Meteohub Frankenkernel edition

Post by rainrainrain » Tue Jun 05, 2018 11:48 am

Ah, yes, if you've got a spare Pi that's not a 3B+ lying around then booting the 5.0s image on that and upgrading everything and then transferring it to the 3B+ is an easier option. I only had the 3B+ (without pulling an existing non-3B+ from operation and using that) and didn't want to go and buy a 3B just to get the 3B+ running.

Amortalis
Junior Boarder
Junior Boarder
Posts: 28
Joined: Sun Jan 22, 2012 1:54 pm

Re: HOWTO: Run the Meteohub image on the Pi 3B+: Meteohub Frankenkernel edition

Post by Amortalis » Thu Jun 07, 2018 11:52 am

What good is, is that now are two ways to get Meteohub running on the latest Pi board so, hopefully, more users will migrate to the new hardware - of course if they want to.
And maybe Boris will make as very happy pulling out a Meteohub version that runs natively on Pi3 B Plus....

Thanks again for your time

Emil

Post Reply