bertc3p0

Members
  • Content Count

    6
  • Joined

  • Last visited

 Content Type 

Forums

Member Map

Store

Crowdfunding

Raffles

Applications

Posts posted by bertc3p0


  1. Hi Franz,

    Hello,

    I want to use socketcan with kernel 4.9.12. Is it still necessary to compile kernel with patches?

    Directories in  https://github.com/GBert/sunxi-can-driverare marked as obsolete. And patches are even older.

    I tried to use fex, but was not successful.

    Command: /sbin/ifconfig -1 does not show a can device.

    Connecting a PEAK USB-CAN dongle displays CAN0.

    I've marked the Git as obsolete because the driver is in the kernel. You may need to change the device tree (DT).

    That's are the patches (80.-*) for:

    root@ubuntu ~/lib (git)-[master] # find ./ -name '80[12]*'
    ./patch/kernel/sunxi-next/801-dt-sun7i-add-can-bananapi.patch
    ./patch/kernel/sunxi-next/802-dt-sun7i-add-can-bananapro.patch
    ./patch/kernel/sunxi-dev/801-dt-sun7i-add-can-bananapi.patch
    ./patch/kernel/sunxi-dev/802-dt-sun7i-add-can-bananapro.patch
    root@ubuntu ~/lib (git)-[master] # cat ./patch/kernel/sunxi-next/802-dt-sun7i-add-can-bananapro.patch                                                                      
    --- a/arch/arm/boot/dts/sun7i-a20-bananapro.dts    2016-01-11 00:01:32.000000000 +0100
    +++ b/arch/arm/boot/dts/sun7i-a20-bananapro.dts    2016-02-03 20:12:28.285742989 +0100
    @@ -104,6 +104,12 @@
         status = "okay";
     };
    
    +&can0 {
    +    pinctrl-names = "default";
    +    pinctrl-0 = <&can0_pins_a>;
    +    status = "okay";
    +};
    +
     &ehci0 {
         status = "okay";
     };
    root@ubuntu ~/lib (git)-[master] # cat ./patch/kernel/sunxi-next/801-dt-sun7i-add-can-bananapi.patch
    --- a/arch/arm/boot/dts/sun7i-a20-bananapi.dts    2016-01-11 00:01:32.000000000 +0100
    +++ b/arch/arm/boot/dts/sun7i-a20-bananapi.dts    2016-02-03 20:07:27.074726689 +0100
    @@ -92,6 +92,12 @@
         status = "okay";
     };
    
    +&can0 {
    +    pinctrl-names = "default";
    +    pinctrl-0 = <&can0_pins_a>;
    +    status = "okay";
    +};
    +
     &cpu0 {
         cpu-supply = <&reg_dcdc2>;
         operating-points = <

    FEX is for 3.x kernels and not applicable here.

     

    Try to load the kernel model 'modprobe sun4i_can'.

    There should a dmesg entry like:

    [   10.063815] sun4i_can 1c2bc00.can: device registered (base=f1428c00, irq=48)

     

    Otherwise look at the DT (again).

     

    Regards

     

    Gerd


  2. Hi,

     

     

     

    Yes, "systemd sucks" is very constructive, mixing PID 1 related functionality with everything else in the article truly shows "professionalism" of a person who wrote that.

     

    I'm sure "beginners" will be happy when any Jessie-related instructions that use "systemctl" command won't work as expected.

     

    I don't want to say that I totally agree with different subsystems depending on systemd or with one(or 2-3) package(s) implementing half of base system services, but current stable version of systemd does its job.

     

    I don't want to bore other people with the 495th discussion about systemd. First time I had a look systemd wasn't there in armbian. Now it's standard and I need to look for another distribution.

     

    Anyway: keep your good work going ...

     

    Regards

     

    Gerd

  3. Edited by wildcat_paris
    added spoiler


    Hi Daniel,

     

    I'm using CAN-Bus successfully on Bpi. You need some simple patches for the DT:

     

     

     

    ./armbian/userpatches/kernel/sunxi-next % cat 800-dt-sun7i-add-can.patch

    --- a/arch/arm/boot/dts/sun7i-a20.dtsi 2015-09-28 11:34:05.383525775 +0200

    +++ b/arch/arm/boot/dts/sun7i-a20.dtsi 2015-09-28 11:58:11.720217304 +0200

    @@ -890,6 +890,13 @@

      allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;

      };

     

    + can0_pins_a: can0@0 {

    + allwinner,pins = "PH20","PH21";

    + allwinner,function = "can";

    + allwinner,drive = <SUN4I_PINCTRL_10_MA>;

    + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;

    + };

    +

      i2c0_pins_a: i2c0@0 {

      allwinner,pins = "PB0", "PB1";

      allwinner,function = "i2c0";

    @@ -1334,6 +1341,16 @@

      #size-cells = <0>;

      };

     

    + can0: can@01c2bc00 {

    + compatible = "allwinner,sun4i-a10-can";

    + reg = <0x01c2bc00 0x400>;

    + interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;

    + clocks = <&apb1_gates 4>;

    + status = "disabled";

    + #address-cells = <1>;

    + #size-cells = <0>;

    + };

    +

      i2c4: i2c@01c2c000 {

      compatible = "allwinner,sun7i-a20-i2c", "allwinner,sun4i-a10-i2c";

      reg = <0x01c2c000 0x400>;

     

    ./armbian/userpatches/kernel/sunxi-next % cat bananapix-add_can.patch

    --- a/arch/arm/boot/dts/sun7i-a20-bananapi.dts 2016-02-16 13:04:24.322060998 +0100

    +++ b/arch/arm/boot/dts/sun7i-a20-bananapi.dts 2016-02-16 13:48:38.457387549 +0100

    @@ -106,6 +106,12 @@

      status = "okay";

     };

     

    +&can0 {

    + pinctrl-names = "default";

    + pinctrl-0 = <&can0_pins_a>;

    + status = "okay";

    +};

    +

     &codec {

      status = "okay";

     };

     

     

    Compile your armbian and everything runs fine ;-)

     

     

    Regards

     

    Gerd

  4. Edited by wildcat_paris
    Changed topic title to more neutral and descriptive


    Hi,

     

    I want a clean Armbian image for BPi without systemd. I pulled the actual Armbian 5.02, elected jessie and vanilla/next kernel (4.4.2)

    and checked SYSTEMD settings:

    gerd@development ~/projekte/armbian/lib (git)-[master] % find ./ -type f -exec grep -H SYSTEMD {} \;
    ./configuration.sh:    SYSTEMD="no" # Enable or disable systemd on Jessie in debootstrap process

    but systemd is still active in the created image. Is there a way to get rid off it ?

     

    I saw in the blog that systemd is now default for jessie :(

     

     

    Regards

     

    Gerd