tvoverbeek
Posts: 98
Joined: Mon Feb 04, 2013 9:50 am
Location: Fieberbrunn, Austria

Superfluous rpi-update in air-pi-install.sh?

Wed May 13, 2015 6:55 pm

Why is rpi-update called early on in air-pi-install.sh?
Later on the kernel, modules, etc. are overwritten by the extraction of kinstall.tar.gz, negating any kernel & module updates by rpi-update.
My guess is the space qualification is only valid for the kernel, etc. in kinstall.tar.gz.
Just curious.

User avatar
Davespice
Forum Moderator
Forum Moderator
Posts: 1662
Joined: Fri Oct 14, 2011 8:06 pm
Location: The Netherlands
Contact: Twitter

Re: Superfluous rpi-update in air-pi-install.sh?

Thu May 14, 2015 7:48 am

Hi there!
You mean astro-pi-install.sh right? :D

If you have the latest Raspbian from May 2015 on your SD card then yeah it is a bit superfluous however we anticipate some people will be using earlier versions. In those the kernel module that is responsible for reading the HAT ID EEPROM doesn't work correctly on a Pi 2. The EEPROM contains a device tree fragment that Raspbian uses to know what kind of HAT is present and sets up the drivers accordingly. I will check but as far as I know that module is not present in kinstall.tar.gz which is why we pull it from rpi-update.

You'll also notice that the script appends the line dtoverlay=rpi-sense into config.txt and this is only there for people who might be trying to use the sense HAT on a Pi 1 model B. You should be able to take that line out without issue on an A+, B+ or Pi 2. You could also argue that because we hard code the device tree overlay for the sense HAT that we don't need to pull anything from rpi-update. Okay fair point :)

Dave

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5854
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Superfluous rpi-update in air-pi-install.sh?

Thu May 14, 2015 9:52 am

Davespice wrote: I will check but as far as I know that module is not present in kinstall.tar.gz which is why we pull it from rpi-update.
Not a module, but the actual raspberry pi firmware.

This was true at the time the script was written, but is no longer required, as long as the system is up to date (apt-get update; apt-get upgrade).

tvoverbeek
Posts: 98
Joined: Mon Feb 04, 2013 9:50 am
Location: Fieberbrunn, Austria

Re: Superfluous rpi-update in air-pi-install.sh?

Thu May 14, 2015 12:09 pm

OK. Understood.
kinstall.tar.gz installs kernel 3.18.9, while the latest download (2015-05-05) installs 3.18.11 and rpi-update probably even higher.
But kinstall.tar.gz does not install the start*.elf files (the firmware ShiftPlusOne refers to?) in /boot.
Still a bit of overkill to guarantee the right firmware for the hat eeprom.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5854
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Superfluous rpi-update in air-pi-install.sh?

Thu May 14, 2015 12:18 pm

Won't matter when we get it in the kernel and package the rest of it. At the time the script was written, running rpi-update was required to make it work. The firmware could've been put in kinstall, but kinstall was a temporary way to distribute the right kernel internally while testing things.

In short, it's just a hacky script to get things out there until there is a proper solution. It doesn't need to be perfect.

Return to “Astro Pi”