snappy on raspberry pi 2: DHCP, I2C

roger peppe roger.peppe at canonical.com
Thu Jun 11 17:57:22 UTC 2015


Thanks for all the info!

So, trying to read past the surface, are you saying
that right now I'm out of luck, but in the near future
it should be possible to get this to work?

BTW how can I take that .deb file
(https://launchpad.net/~p-pisati/+archive/ubuntu/embedded/+build/7531057/+files/linux-image-3.19.1-12-generic-bcm2709_3.19.1-12.12_armhf.deb)
and make a bootable
image on the Pi SD card from it?

Thanks for bearing with me.

  cheers,
    rog.

On 11 June 2015 at 17:01, Paolo Pisati <paolo.pisati at canonical.com> wrote:
> Adding snappy-devel.
>
> ---------- Forwarded message ----------
> From: Paolo Pisati <paolo.pisati at canonical.com>
> Date: Thu, Jun 11, 2015 at 6:00 PM
> Subject: Re: snappy on raspberry pi 2: DHCP, I2C
> To: roger peppe <roger.peppe at canonical.com>
>
>
> And here is a new build of the raspberry2 kernel with that option =y:
>
> https://launchpad.net/~p-pisati/+archive/ubuntu/embedded/+build/7531057/+files/linux-image-3.19.1-12-generic-bcm2709_3.19.1-12.12_armhf.deb
>
> but it's not that easy, because it requires some work on the dtb too.
>
> Some background first:
>
> The original raspi2 image doesn't use uboot to boot the board, instead it
> has a set of binaries (bootcode.bin, start.elf, etc[1]) that parse the txt
> files in the boot partition, prepare an 'environment' for the linux kernel
> based on the content of these files[2] (boot command line and dtb file),
> passes this environment to the kernel and make it boot the board.
>
> Indeed, if you want the i2c to work there, you need to add this to
> config.txt:
>
> dtparam=i2c_arm=on
>
> that's because in the original raspi2 dtb file, the i2c devices require sme
> work and are off by default:
>
> ubuntu at raspy2:~$ ls /proc/device-tree/soc/i2c\@7e*
> /proc/device-tree/soc/i2c at 7e205000:
> #address-cells   clocks      linux,phandle  pinctrl-0      status
> #size-cells      compatible  name           pinctrl-names
> clock-frequency  interrupts  phandle        reg
>
> /proc/device-tree/soc/i2c at 7e804000:
> #address-cells   clocks      linux,phandle  pinctrl-0      status
> #size-cells      compatible  name           pinctrl-names
> clock-frequency  interrupts  phandle        reg
> ubuntu at raspy2:~$
>
> ubuntu at raspy2:~$ cat /proc/device-tree/soc/i2c at 7e*/status
> disableddisabled
>
> Unfortunately, to make the redundancy logic work in snappy we require uboot,
> so the original boot binaries (bootcode.bin and start.elf), can still do the
> mangling to the dtb, but when this dtb is passed to uboot, uboot doesn't
> even know it's there, so it discards it, and load a pristine dtb from the sd
> card and pass it to the kernel.
>
> The correct solution to this, would be to make uboot detect the dtb passed
> by start.elf, and pass it to the kernel on its behalf but:
>
> 1) AFAIK this feature is not implemented (but perhaps the dtb it's somewhere
> in memory and i can pass a pointer to it to the kernel?!?!?)
> 2) how does it play with our redundancy logic? if we pass the dtb from the
> initial boot binaries, how does it work with the a/b partitioning?
>
> 1: https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=6685
> 2: https://www.raspberrypi.org/documentation/configuration/device-tree.md
>
>
> On Thu, Jun 11, 2015 at 4:43 PM, roger peppe <roger.peppe at canonical.com>
> wrote:
>>
>> On 11 June 2015 at 08:55, roger peppe <roger.peppe at canonical.com> wrote:
>> > 1) How can I get snappy to DHCP automatically after booting?
>> > I was expecting the network to come up right away, but
>> > I need to manually run "dhclient eth0" to get the network
>> > working.
>>
>> Update: this seems to be working now, and it doesn't
>> seem to be just because /var/lib/dhcp/dhclient.*leases has
>> some contents in now (I truncated those files and it still
>> gets an IP address on boot). I don't think I've changed anything
>> else (apart from I added a static IP address in my router).
>>
>> It would be nice to know what might have gone wrong here.
>>
>>   cheers,
>>     rog.
>>
>> --
>> snappy-devel mailing list
>> snappy-devel at lists.ubuntu.com
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/snappy-devel
>
>
>
>
> --
> bye,
> p.
>
>
>
> --
> bye,
> p.
>
> --
> snappy-devel mailing list
> snappy-devel at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/snappy-devel
>



More information about the snappy-devel mailing list