As a visitor of many discussion forums about the Raspberry Pi, I recently stumbled upon a lot of cries for help, such as “My RasPi doesn’t boot anymore!” or “Help, my i2c-, spi devices and 1-wire sensors” suddenly disappeared.
All of you probably belong to the Raspi lovers, that wan’t to keep the device’s linux-kernel at a “bleeding-edge” release, doing an “rpi-update” almost every day. Be aware that such a kernel is still tagged as “experimental”, so that it can seriously damage your Raspbian installation. The number of messages is still very high in all discussion forums and a lot of experienced users already became tired in answering the help requests.
To be on the safe site, update your system using “apt-get update && apt-get upgrade” or “apt-get dist-upgrade”, unless you know what you are doing. If your upgrade already has failed, but you’re still able to boot the system, you can roll-back to a previous release with:
sudo rpi-update b2f6c103e5355bee90ff57f55cdf6d7005485a23
The long string represents the Git hash for the specific firmware revision. You can look for those hash in the rpi-update git repos commits list: https://github.com/Hexxeh/rpi-firmware/commits/master.
However, if you want to stay with the latest 3.18 kernel branch, here’s what you can do to solve your problems with i2c, spi, lirc and 1-wire:
Make sure to insert the following lines in to /boot/config.txt in order to enable the new device-tree in the emerging linux-kernel version 3.18.x. If your system is unable to boot, you can mount the SD-card on another computer and edit the file manually.
# Uncomment some or all of these to enable the optional hardware interfaces device_tree_param=i2c0=on device_tree_param=i2c1=on #device_tree_param=i2s=on device_tree_param=spi=on device_tree_param=act_led_trigger=mmc #device_tree_overlay=hifiberry-dac #device_tree_overlay=hifiberry-dacplus #device_tree_overlay=hifiberry-digi #device_tree_overlay=iqaudio-dac #device_tree_overlay=iqaudio-dacplus # Uncomment to enable the lirc-rpi module # gpio_in_pin (default "18") GPIO pin for input # gpio_in_pull (default "down") # "1" = force active high # "0" = force active low # "-1" = use auto-detection # softcarrier (default "on") # invert (default "off") "on" = invert the output pin. # debug (default "off") "on" = enable additional debug messages. #device_tree_overlay=lirc-rpi #device_tree_param=gpio_out_pin=22 #device_tree_param=gpio_in_pin=18 #device_tree_param=gpio_in_pull=down # Uncomment to enable the w1-gpio Onewire interface module #device_tree_overlay=w1-gpio #device_tree_param=gpiopin=4 # Uncomment to enable the w1-gpio Onewire interface module # Use this overlay if you *do* need a pin to drive an external pullup #device_tree_overlay=w1-gpio #device_tree_param=gpiopin=4 #device_tree_param=pullup=5
After an “apt-get dist-upgrade” and the above change, it should be possible to plug your old SD-card from a Raspberry Pi1 into the Pi2. I’m myself impatiently expecting the delivery of a Pi2 after week 9/15. Meanwhile, check the Raspberry Pi foundation’s forum on what has changed and problems to expect before applying the upgrade.