linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Antwort: Re: [Socketcan-users] socketcan in barebox bootloader
       [not found]   ` <OF323BE753.A56A00D8-ONC125799F.002F6CA3-C125799F.00302BFA@o0802.rafi.inhouse>
@ 2012-02-09  9:32     ` Wolfgang Grandegger
  2012-02-09  9:50       ` Marc Kleine-Budde
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Grandegger @ 2012-02-09  9:32 UTC (permalink / raw)
  To: christian.buettner; +Cc: linux-can

On 02/09/2012 09:46 AM, christian.buettner@rafi.de wrote:
> Hi Wolfgang,
> 
> i know that CAN is not the best solution for this tasks, but it is a 
> requirement of a customer to use the can-bus :(
> 
> So i create a SocketCAN interface on the host side and implement a Level 2 
> CAN receiver in the bootloader, right?

Yep.

Wolfgang.

> 
> Christian
> 
> 
> 
> Von:    Wolfgang Grandegger <wg@grandegger.com>
> An:     christian.buettner@rafi.de
> Kopie:  socketcan-users@lists.berlios.de
> Datum:  09.02.2012 08:47
> Betreff:        Re: [Socketcan-users] socketcan in barebox bootloader
> 
> 
> 
> Hi Christian,
> 
> On 02/08/2012 04:42 PM, christian.buettner@rafi.de wrote:
>> Hi everyone,
>>
>> we use the i.MX28 from freescale and need a socketcan driver 
>> implementation in the barebox bootloader.
> 
> Well, a Socket-CAN implementation seems a bit heavy and overkill for a
> boot loader.
> 
>> The goal is to flash a linux or rootfs image through the barebox 
>> bootloader using a CAN bus connection.
> 
> CAN is slow! Seem not be a good idea to transfer megabytes of data that 
> way.
> 
>> We need it to make a field update of the target possible. 
>>
>> Has anyone done something like that yet?
> 
> Not that I know of.
> 
> Wolfgang.
> 
> PS:
> 
> please do not use this mailing list any longer but send your questions
> to the new "linux-can" mailing list address "linux-can@vger.kernel.org".
> For subscription or mailing list archives please have a look to:
> 
>    http://vger.kernel.org/vger-lists.html#linux-can
> 
> Mail archives of the new linux-can mailing list can be found at:
> 
>    http://dir.gmane.org/gmane.linux.can
>    http://marc.info/?l=linux-can&r=1&w=2
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Antwort: Re: [Socketcan-users] socketcan in barebox bootloader
  2012-02-09  9:32     ` Antwort: Re: [Socketcan-users] socketcan in barebox bootloader Wolfgang Grandegger
@ 2012-02-09  9:50       ` Marc Kleine-Budde
  0 siblings, 0 replies; 5+ messages in thread
From: Marc Kleine-Budde @ 2012-02-09  9:50 UTC (permalink / raw)
  To: Wolfgang Grandegger; +Cc: christian.buettner, linux-can

[-- Attachment #1: Type: text/plain, Size: 704 bytes --]

On 02/09/2012 10:32 AM, Wolfgang Grandegger wrote:
> On 02/09/2012 09:46 AM, christian.buettner@rafi.de wrote:
>> Hi Wolfgang,
>>
>> i know that CAN is not the best solution for this tasks, but it is a 
>> requirement of a customer to use the can-bus :(
>>
>> So i create a SocketCAN interface on the host side and implement a Level 2 
>> CAN receiver in the bootloader, right?

What's Level 2 CAN receiver?

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Socketcan-users] socketcan in barebox bootloader
       [not found] ` <1328824647.5414.10.camel@slaptop>
@ 2012-02-10  8:55   ` Marc Kleine-Budde
  2012-02-10  9:33     ` Oliver Hartkopp
  0 siblings, 1 reply; 5+ messages in thread
From: Marc Kleine-Budde @ 2012-02-10  8:55 UTC (permalink / raw)
  To: Max S.; +Cc: socketcan-users, linux-can@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 662 bytes --]

Now with linux-can on Cc :)

On 02/09/2012 10:57 PM, Max S. wrote:
> CAN is meant for control messages, not for media, or data transfer.

In the automotive world it's quite common to do firmware updates over CAN.

> That aside, I do use CAN to flash AVR microchips. It can take a few
> minutes though.

What throughput do you usually get when updating over CAN?

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Socketcan-users] socketcan in barebox bootloader
  2012-02-10  8:55   ` Marc Kleine-Budde
@ 2012-02-10  9:33     ` Oliver Hartkopp
  2012-02-10 10:58       ` Marc Kleine-Budde
  0 siblings, 1 reply; 5+ messages in thread
From: Oliver Hartkopp @ 2012-02-10  9:33 UTC (permalink / raw)
  To: Marc Kleine-Budde, Max S.; +Cc: linux-can@vger.kernel.org

On 10.02.2012 09:55, Marc Kleine-Budde wrote:

> Now with linux-can on Cc :)
> 
> On 02/09/2012 10:57 PM, Max S. wrote:
>> CAN is meant for control messages, not for media, or data transfer.
> 
> In the automotive world it's quite common to do firmware updates over CAN.


Hi,

indeed e.g. the ISO 15765-2 protocol is used to segment PDUs up to 4095 byte
into the 8 byte payload of CAN frames.

If you want to play with ISO TP on SocketCAN - it's located here:

https://gitorious.org/linux-can/can-modules/blobs/master/net/can/isotp.c

But then you would need to implement ISO-TP inside the bootloader too.

>> That aside, I do use CAN to flash AVR microchips. It can take a few
>> minutes though.
> 
> What throughput do you usually get when updating over CAN?


I implemented a IP-over-ISOTP tunnel for fun:

https://gitorious.org/linux-can/can-utils/blobs/master/isotptun.c

and taking into account that ISO-TP uses the first byte inside the CAN frame
payload for protocol purposes (1/8 = 12.5% overhead) and the TCP/IP-header of
40 byte within the IP communication i got ~26 kByte/s on a 500kbit/s CAN as
throughput.

Probably that helps to get an impression ;-)

Regards,
Oliver


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Socketcan-users] socketcan in barebox bootloader
  2012-02-10  9:33     ` Oliver Hartkopp
@ 2012-02-10 10:58       ` Marc Kleine-Budde
  0 siblings, 0 replies; 5+ messages in thread
From: Marc Kleine-Budde @ 2012-02-10 10:58 UTC (permalink / raw)
  To: Oliver Hartkopp; +Cc: Max S., linux-can@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 1660 bytes --]

On 02/10/2012 10:33 AM, Oliver Hartkopp wrote:
>> On 02/09/2012 10:57 PM, Max S. wrote:
>>> CAN is meant for control messages, not for media, or data transfer.
>>
>> In the automotive world it's quite common to do firmware updates over CAN.

> indeed e.g. the ISO 15765-2 protocol is used to segment PDUs up to 4095 byte
> into the 8 byte payload of CAN frames.
> 
> If you want to play with ISO TP on SocketCAN - it's located here:
> 
> https://gitorious.org/linux-can/can-modules/blobs/master/net/can/isotp.c
> 
> But then you would need to implement ISO-TP inside the bootloader too.

That's why I argued to boot into an update linux from the bootloader and
use the existing CAN stack and protocols.

>>> That aside, I do use CAN to flash AVR microchips. It can take a few
>>> minutes though.
>>
>> What throughput do you usually get when updating over CAN?
> 
> 
> I implemented a IP-over-ISOTP tunnel for fun:
> 
> https://gitorious.org/linux-can/can-utils/blobs/master/isotptun.c
> 
> and taking into account that ISO-TP uses the first byte inside the CAN frame
> payload for protocol purposes (1/8 = 12.5% overhead) and the TCP/IP-header of
> 40 byte within the IP communication i got ~26 kByte/s on a 500kbit/s CAN as
> throughput.

There are people that haver narrower DSL lines :)

> Probably that helps to get an impression ;-)

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-02-10 10:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <OF32B6D01B.4E8430B8-ONC125799E.0055E20B-C125799E.00563FFD@o0802.rafi.inhouse>
     [not found] ` <4F3372C3.3040902@grandegger.com>
     [not found]   ` <OF323BE753.A56A00D8-ONC125799F.002F6CA3-C125799F.00302BFA@o0802.rafi.inhouse>
2012-02-09  9:32     ` Antwort: Re: [Socketcan-users] socketcan in barebox bootloader Wolfgang Grandegger
2012-02-09  9:50       ` Marc Kleine-Budde
     [not found] ` <1328824647.5414.10.camel@slaptop>
2012-02-10  8:55   ` Marc Kleine-Budde
2012-02-10  9:33     ` Oliver Hartkopp
2012-02-10 10:58       ` Marc Kleine-Budde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).