Jump to content

Rolf Bakker

Members
  • Posts

    23
  • Joined

  • Last visited

Posts posted by Rolf Bakker

  1. Hi Werner,

    Thank you for your support. Yesterday I was tied up and couldn't respond. I would like to help getting to the bottom of this, so I got behind the Ubuntu PC and did some tests. In the meantime I have updated the gpphoto2 to the latest version on the Ubuntu PC. The Ubuntu PC has a fresh Ubuntu 18.04 install. 

    gphoto2 2.5.23
    
    Copyright (c) 2000-2019 Marcus Meissner and others
    
    gphoto2 comes with NO WARRANTY, to the extent permitted by law. You may
    redistribute copies of gphoto2 under the terms of the GNU General Public
    License. For more information about these matters, see the files named COPYING.
    
    This version of gphoto2 is using the following software versions and options:
    gphoto2         2.5.23         gcc, popt(m), exif, no cdk, no aa, no jpeg, no readline
    libgphoto2      2.5.24         standard camlibs (SKIPPING lumix), gcc, ltdl, EXIF
    libgphoto2_port 0.12.0         iolibs: disk ptpip serial usb usbdiskdirect usbscsi, gcc, ltdl, EXIF, USB, serial without locking

    But now the gphoto2 software stopped working on the Ubuntu PC

     

    The last working version on the Ubuntu is based on libgphoto2 2.5.22 instead of libgphoto2 2.5.24

    gphoto2 2.5.23
    
    Copyright (c) 2000-2019 Marcus Meissner and others
    
    gphoto2 comes with NO WARRANTY, to the extent permitted by law. You may
    redistribute copies of gphoto2 under the terms of the GNU General Public
    License. For more information about these matters, see the files named COPYING.
    
    This version of gphoto2 is using the following software versions and options:
    gphoto2         2.5.23         gcc, popt(m), exif, no cdk, no aa, no jpeg, no readline
    libgphoto2      2.5.22         all camlibs, gcc, ltdl, EXIF
    libgphoto2_port 0.12.0         iolibs: disk ptpip serial usb usbdiskdirect usbscsi, gcc, ltdl, USB, serial without locking

    So, maybe its wise to have the libgphoto2 bug fix first which appeared in libgphoto2 2.5.23

     

     

    Anyway the lsmod on the Ubuntu pc shows the following:

    root@ubuntu-test-pc:~# lsmod
    Module                  Size  Used by
    rfcomm                 81920  4
    ccm                    20480  9
    cmac                   16384  1
    intel_rapl_msr         20480  0
    intel_rapl_common      24576  1 intel_rapl_msr
    x86_pkg_temp_thermal    20480  0
    intel_powerclamp       20480  0
    coretemp               20480  0
    kvm_intel             245760  0
    kvm                   655360  1 kvm_intel
    irqbypass              16384  1 kvm
    bnep                   24576  2
    crct10dif_pclmul       16384  1
    crc32_pclmul           16384  0
    mei_hdcp               24576  0
    snd_hda_codec_hdmi     57344  1
    ghash_clmulni_intel    16384  0
    rtl8821ae             233472  0
    snd_soc_rt5640        143360  0
    btcoexist             147456  1 rtl8821ae
    snd_soc_rl6231         20480  1 snd_soc_rt5640
    rtl_pci                28672  1 rtl8821ae
    aesni_intel           372736  8
    aes_x86_64             20480  1 aesni_intel
    crypto_simd            16384  1 aesni_intel
    rtlwifi                90112  3 rtl_pci,rtl8821ae,btcoexist
    cryptd                 24576  2 crypto_simd,ghash_clmulni_intel
    glue_helper            16384  1 aesni_intel
    snd_hda_codec_realtek   118784  1
    intel_cstate           20480  0
    snd_hda_codec_generic    81920  1 snd_hda_codec_realtek
    mac80211              847872  3 rtl_pci,rtl8821ae,rtlwifi
    intel_rapl_perf        20480  0
    ledtrig_audio          16384  2 snd_hda_codec_generic,snd_hda_codec_realtek
    snd_soc_core          237568  1 snd_soc_rt5640
    snd_compress           24576  1 snd_soc_core
    ac97_bus               16384  1 snd_soc_core
    snd_pcm_dmaengine      16384  1 snd_soc_core
    i915                 1937408  28
    snd_seq_midi           20480  0
    input_leds             16384  0
    snd_hda_intel          53248  10
    snd_seq_midi_event     16384  1 snd_seq_midi
    snd_intel_nhlt         20480  1 snd_hda_intel
    snd_hda_codec         131072  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
    cfg80211              704512  2 rtlwifi,mac80211
    drm_kms_helper        180224  1 i915
    btusb                  57344  0
    btrtl                  20480  1 btusb
    snd_hda_core           90112  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
    snd_hwdep              20480  1 snd_hda_codec
    btbcm                  16384  1 btusb
    btintel                24576  1 btusb
    lpc_ich                24576  0
    drm                   491520  18 drm_kms_helper,i915
    libarc4                16384  1 mac80211
    bluetooth             573440  33 btrtl,btintel,btbcm,bnep,btusb,rfcomm
    snd_rawmidi            36864  1 snd_seq_midi
    snd_pcm               102400  7 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_soc_rt5640,snd_soc_core,snd_hda_core,snd_pcm_dmaengine
    i2c_algo_bit           16384  1 i915
    fb_sys_fops            16384  1 drm_kms_helper
    syscopyarea            16384  1 drm_kms_helper
    mei_me                 40960  1
    sysfillrect            16384  1 drm_kms_helper
    ecdh_generic           16384  2 bluetooth
    mei                   102400  3 mei_hdcp,mei_me
    ecc                    32768  1 ecdh_generic
    sysimgblt              16384  1 drm_kms_helper
    snd_seq                69632  2 snd_seq_midi,snd_seq_midi_event
    snd_seq_device         16384  3 snd_seq,snd_seq_midi,snd_rawmidi
    snd_timer              36864  2 snd_seq,snd_pcm
    snd                    86016  33 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_compress,snd_soc_core,snd_pcm,snd_rawmidi
    soundcore              16384  1 snd
    intel_smartconnect     16384  0
    acpi_pad              184320  0
    mac_hid                16384  0
    sch_fq_codel           20480  9
    parport_pc             40960  0
    ppdev                  24576  0
    lp                     20480  0
    parport                53248  3 parport_pc,lp,ppdev
    ip_tables              32768  0
    x_tables               40960  1 ip_tables
    autofs4                45056  2
    hid_generic            16384  0
    usbhid                 53248  0
    hid                   126976  2 usbhid,hid_generic
    ahci                   40960  1
    libahci                32768  1 ahci
    alx                    49152  0
    mdio                   16384  1 alx
    video                  49152  1 i915

    The lsmod on the NanoPi Neo2 with Armbian shows this:
     

    root@nanopineo2:~# lsmod
    Module                  Size  Used by
    rfkill                 28672  1
    zstd                   16384  4
    snd_soc_simple_card    16384  0
    sun8i_codec_analog     32768  0
    snd_soc_simple_card_utils    16384  1 snd_soc_simple_card
    sun4i_i2s              24576  0
    sun8i_adda_pr_regmap    16384  1 sun8i_codec_analog
    zram                   32768  2
    snd_soc_core          151552  4 sun4i_i2s,sun8i_codec_analog,snd_soc_simple_card_utils,snd_soc_simple_card
    snd_pcm_dmaengine      16384  1 snd_soc_core
    sunxi_cedrus           40960  0
    lima                   45056  0
    snd_pcm               106496  3 sun4i_i2s,snd_soc_core,snd_pcm_dmaengine
    gpu_sched              28672  1 lima
    sun4i_gpadc_iio        24576  0
    snd_timer              36864  1 snd_pcm
    v4l2_mem2mem           28672  1 sunxi_cedrus
    snd                    73728  3 snd_timer,snd_soc_core,snd_pcm
    industrialio           69632  1 sun4i_gpadc_iio
    videobuf2_dma_contig    20480  1 sunxi_cedrus
    soundcore              16384  1 snd
    videobuf2_memops       16384  1 videobuf2_dma_contig
    videobuf2_v4l2         28672  2 sunxi_cedrus,v4l2_mem2mem
    videobuf2_common       40960  3 sunxi_cedrus,videobuf2_v4l2,v4l2_mem2mem
    videodev              225280  4 sunxi_cedrus,videobuf2_v4l2,videobuf2_common,v4l2_mem2mem
    mc                     45056  5 sunxi_cedrus,videodev,videobuf2_v4l2,videobuf2_common,v4l2_mem2mem
    cpufreq_dt             16384  0
    usb_f_acm              16384  1
    u_serial               28672  1 usb_f_acm
    g_serial               16384  0
    libcomposite           53248  2 g_serial,usb_f_acm
    realtek                20480  1
    dwmac_sun8i            24576  0
    mdio_mux               16384  1 dwmac_sun8i


    But the NanoPi Neo is on a different version, not sure why.
     

    gphoto2 2.5.20
    
    Copyright (c) 2000-2018 Lutz Mueller and others
    
    gphoto2 comes with NO WARRANTY, to the extent permitted by law. You may
    redistribute copies of gphoto2 under the terms of the GNU General Public
    License. For more information about these matters, see the files named COPYING.
    
    This version of gphoto2 is using the following software versions and options:
    gphoto2         2.5.20         gcc, popt(m), exif, cdk, aa, jpeg, readline
    libgphoto2      2.5.22         all camlibs, gcc, ltdl, EXIF
    libgphoto2_port 0.12.0         iolibs: disk ptpip serial usb1 usbdiskdirect usbscsi, gcc, ltdl, USB, serial without locking

     

    But I am not sure whether that has an impact on how the Camera connects. That issue remains.

    Ubuntu 18.04 behaviour:
    Camera display shows live view --> plug in USB to camera --> display shows brief message "Connecting" --> camera display shows live view again.


    Armbian behaviour:

    Camera display shows live view --> plug in USB to camera --> display shows message "Connecting" --> camera display continuous to show "Connecting message". Only when a new command gphoto2 command is issued the live view returns.

    If there is anything else I can do to help solve this, please let me know.


     

  2. dmesg output

     

    Connect Sony via USB

    [ 6581.158357] usb 3-1: new high-speed USB device number 14 using ehci-platform

    [ 6581.187896] usb 3-1: New USB device found, idVendor=054c, idProduct=0cb2, bcdDevice= 2.00

    [ 6581.187915] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3

    [ 6581.187926] usb 3-1: Product: DSC-RX100M5A

    [ 6581.187937] usb 3-1: Manufacturer: Sony

    [ 6581.187947] usb 3-1: SerialNumber: C7A5602C40B2

     

    Disconnect Sony from USB

    [ 6637.583714] usb 3-1: USB disconnect, device number 14

     

    The dmesg output is also part of the Armbianmonitor, of which the output can be found here: http://ix.io/2kIJ

    I just found out that despite the camera shows the connecting message, I am able to send gphoto2 commands to the camera. However, normally the connecting message would disappear and a live view is visible on the camera lcd screen.

    So although it appears to work, there is something odd in the USB connection. The behaviour is very similar for Armbian Buster and Armbian Bionic.

  3. Armbianmonitor:

    I've got a Sony RX100VA camera that I want to connect to the NanoPi Neo2 running Armbian Buster.

    On the Camera I can select the type of USB connection:

     

    -Auto

    -Mass Storage

    -MTP

    -PC Remote

    My intention is to use the PC Remote connection for use with gphoto2, this works fine on a PC with Ubuntu 18.04, but when I connect the camera to the Nano Pi Neo2 with Armbian, the camera display shows connecting (but doesn't connect). 

    I suspect a bug in the OS, but I am unsure how to find it.

    lsusb gives the following report with an error: can't get debug descriptor: Resource temporarily unavailable
     

    root@nanopineo2:~# lsusb -d 054c:0cb2 -v
    
    Bus 003 Device 019: ID 054c:0cb2 Sony Corp. 
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               2.00
      bDeviceClass            0 
      bDeviceSubClass         0 
      bDeviceProtocol         0 
      bMaxPacketSize0        64
      idVendor           0x054c Sony Corp.
      idProduct          0x0cb2 
      bcdDevice            2.00
      iManufacturer           1 Sony
      iProduct                2 DSC-RX100M5A
      iSerial                 3 C7A5602C40B2
      bNumConfigurations      1
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength       0x0027
        bNumInterfaces          1
        bConfigurationValue     1
        iConfiguration          0 
        bmAttributes         0xc0
          Self Powered
        MaxPower              100mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           3
          bInterfaceClass         6 Imaging
          bInterfaceSubClass      1 Still Image Capture
          bInterfaceProtocol      1 Picture Transfer Protocol (PIMA 15470)
          iInterface              0 
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval               0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x02  EP 2 OUT
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0200  1x 512 bytes
            bInterval               0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x83  EP 3 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0020  1x 32 bytes
            bInterval               7
    Device Qualifier (for other device speed):
      bLength                10
      bDescriptorType         6
      bcdUSB               2.00
      bDeviceClass            0 
      bDeviceSubClass         0 
      bDeviceProtocol         0 
      bMaxPacketSize0        64
      bNumConfigurations      1
    can't get debug descriptor: Resource temporarily unavailable
    Device Status:     0x0000
      (Bus Powered)


    Mounting as a mass storage device works fine, but then I can't use it with gphoto2.

    How do I find the bug?

     

     

  4. I had a hard time to figure out how to set the input pull-up on GPIO 1 of the NanoPi neo2. In the end it appeared to be extremely simple, but in order to help other beginners I like to share how I accomplished it.

    1) I created a dts file with the input pull-up definition for GPIO 1
    2) I compiled the dts with the "armbian-add-overlay" tool
    3) rebooted the NanoPi Neo2 

    That's it.

    The dts file can be placed anywhere on the Nanopi Neo2 eg. /home/pi/sun50i-h5-nanopi-neo2-pullup.dts
     

    nano /home/pi/sun50i-h5-nanopi-neo2-pullup.dts


    The content of sun50i-h5-nanopi-neo2-pullup.dts looks like this:

     

    /dts-v1/;                                                                       
    /plugin/;                                                                       
                                                                                    
    / {                                                                             
            compatible = "allwinner,sun50i-h5";                                     
                                                                                    
              fragment@0 {                                                          
                target = <&pio>;                                                    
                __overlay__ {                                                       
                  input_0: input_0 {                                                
                    pins = "PA1";                                                   
                    function = "gpio_in";                                           
                    bias-pull-up;                                                   
                  };                                                                
                };                                                                  
              };                                                                    
                                                                                    
    };   
    


    note that PIN "PA1" = GPIO 1 (BCM) 

    now save the file (press ctrl-x, press y, press enter)

     

    start the "armbian-add-overlay" tool
     

    sudo armbian-add-overlay /home/pi/sun50i-h5-nanopi-neo2-pullup.dts

    when the tool finishes, you will have to reboot to apply the changes.

    That's it, I hope you save some time with this monkey proof explanation.


    PS:
    it is easy to convert BCM to PIN, e.g. GPIO 200 (BCM) = PIN "PG8" 
    The letters A - G have the following values A=0, B=1, C=2 ... G=6
    The value of the letter must be multiplied by 32, so G = 6x32 = 192
    The value behind the letter is added to the value of the letter, in this case for PG8: 192 + 8 = 200
    So BCM GPIO 200 is the same pin as PG8.
    To derive the PIN from BCM you just do it the other way around.

    e.g.
    GPIO 6 (BCM) = PIN "PA6"
    GPIO 201 (BCM) = PIN "PG9"

  5. Sorry, seems to have been a mounting issue after unmounting and remouting the results are very different:

     

    root@nanopineo2:~# umount -A /dev/sda1
    root@nanopineo2:~# mount /dev/sda1 /SD
    root@nanopineo2:~# dd if=/dev/zero of=/SD/test.txt bs=512 count=2000 status=progress
    2000+0 records in
    2000+0 records out
    1024000 bytes (1.0 MB, 1000 KiB) copied, 0.0831834 s, 12.3 MB/s
    root@nanopineo2:~# mount |grep sda
    /dev/sda1 on /SD type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)



    It was previously mounted like this:

     

    root@nanopineo2:~# mount |grep sda
    /dev/sda1 on /SD type vfat (rw,noatime,sync,gid=100,fmask=0002,dmask=0002,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)

     

  6. I'm also experiencing extremely slow USB write speeds  (less than 60 kBps) on the NanoPi Neo2 (H5), this seems to be new for me as I don't recall to have this issue with my previous setup.

    This is how I tested it
     

    root@nanopineo2:~# dd if=/dev/zero of=/SD/test.txt bs=512 count=2000 status=progress
    1000960 bytes (1.0 MB, 978 KiB) copied, 18 s, 55.6 kB/s
    2000+0 records in
    2000+0 records out
    1024000 bytes (1.0 MB, 1000 KiB) copied, 18.3359 s, 55.8 kB/s


    Current setup:

    root@nanopineo2:~# uname -a
    Linux nanopineo2 4.19.38-sunxi64 #5.86 SMP Sun May 12 18:16:25 CEST 2019 aarch64 aarch64 aarch64 GNU/Linux





     

  7. There seems to be a bug, source: https://codeyarns.com/2019/05/18/usbmount-not-mounting-problem/

    Solution:

    systemd seems to be the culprit. It sets MountFlags=slave in its systemd-udevd.service file, which causes, the mount operation of usbmount mounting into the namespace of systemd and not to the user.

     

    To change this mount option, run this command:

     

    sudo systemctl edit systemd-udevd

     

    Add these lines to the file:

     

    [Service]
    MountFlags=shared


    This creates the file /etc/systemd/system/systemd-udevd.service.d/override.conf with the above lines.


    Restart systemd on your NanoPi Neo2:


    sudo systemctl daemon-reload
    sudo service systemd-udevd --full-restart

     

  8. I'm not worried about the performance, its just simple stuff I'm doing.

     

    However, I haven't gotten much further. The information on the web is really thin, maybe its because I lack sufficient background that I don't understand it.

     

    U-boot reads the files but somehow the boot sequence ends in an error. I wish there was some sort of tutorial that shows me how I can compile Armbian for read only NFS boot.

     

     

  9. My objective is to boot Armbian on my NanoPi Neo2 from a network server.

     

    I've got Armbian running on the NanoPi Neo2 and u-boot recognizes the ethernet interface. Also, I have a DHCP server and TFTP server running. If I press space during start-up, I get in the U-boot environment. When I give the dhcp command in the U-boot environment, the NanoPi Neo2 get's an IP address and loads /boot/boot.scr from the network. So, the pre-requisites seem to work fine.

    But then....

     

    I just can't figure out how to start Armbian (preferrably in read only mode) from the network.

     

    Maybe someone can tell me what needs to be done. I've got the following questions:

    I've already searched on-line for countless hours, but I just don't get it.

     

    1) I think I need to load boot.scr, initrd.img and dtb and somehow start those from the u-boot environment.

    2) I think I need to tell the kernel somehow that it needs to boot from the network instead of the SD.

    3) I think there is some command /switch that can be set to make Armbian read-only and prevent changes to the system

    4) Which files must remain on the SD as a minimum to make netbooting Armbian from U-boot possible?

     

    Regards,

    Rolf

  10. I've got a working Vagrant Armbian Build environment.

     

    Now I want to add the following to the sun50i-h5-nanopi-neo2.dts (provides network support in U-boot) and compile a new image.
     

    &emac {
            pinctrl-names = "default";
            pinctrl-0 = <&emac_rgmii_pins>;
            status = "okay";
            phy = <&phy1>;
            phy-mode = "rgmii";
            phy1: ethernet-phy@1 {
                    reg = <0>;
            };
    };


    Despite reading the docs, I still can't figure out how it's done. Maybe someone can point me in the right direction?

  11. ok, I tested from a different machine and it appears that the DHCP server shouldn't provide the fullpath of the filename, but just the path within the tftp folder.

    After I changed the setting in my DHCP server the file could be loaded.

     

    U-Boot 2018.09-rc3-00026-g4cdeda511f-dirty (Sep 10 2018 - 16:37:11 +0200) Allwinner Technology
    
    CPU:   Allwinner H5 (SUN50I)
    Model: FriendlyARM NanoPi NEO 2
    DRAM:  512 MiB
    MMC:   SUNXI SD/MMC: 0
    Loading Environment from FAT... Unable to use mmc 0:1... In:    serial
    Out:   serial
    Err:   serial
    Net:   phy interface7
    eth0: ethernet@1c30000
    starting USB...
    USB0:   USB EHCI 1.00
    USB1:   USB OHCI 1.0
    USB2:   USB EHCI 1.00
    USB3:   USB OHCI 1.0
    scanning bus 0 for devices... 1 USB Device(s) found
    scanning bus 2 for devices... 1 USB Device(s) found
           scanning usb for storage devices... 0 Storage Device(s) found
    Hit any key to stop autoboot:  0 
    => setenv serverip 192.168.188.1
    => dhcp
    BOOTP broadcast 1
    BOOTP broadcast 2
    BOOTP broadcast 3
    DHCP client bound to address 192.168.188.50 (1003 ms)
    Using ethernet@1c30000 device
    TFTP from server 192.168.188.1; our IP address is 192.168.188.50
    Filename '/boot/boot.scr'.
    Load address: 0x42000000
    Loading: #
             1.5 MiB/s
    done
    Bytes transferred = 3090 (c12 hex)
    => 


    One step closer to booting the NanoPi Neo 2 from the network. I think my brain got a bit numb yesterday, by the end of the day ;)

    Does any one have a u-boot script in combination with Armbian to make this work with NFS?

  12. I'm trying to boot my Nano Pi Neo 2 from the network but I am a bit stuck.

    I have found out how to add network support to u-boot for the Nano Pi Neo 2, I can set the serverip and perform the dchp command, the Nanopi neo get's an IP address from the DHCP server but then booting halts with the message that it can't find the file. I'm pretty sure the location & access rights are valid. (Is there an easy way to check?)

     

    U-Boot 2018.09-rc3-00026-g4cdeda511f-dirty (Sep 10 2018 - 16:37:11 +0200) Allwinner Technology
    
    CPU:   Allwinner H5 (SUN50I)
    Model: FriendlyARM NanoPi NEO 2
    DRAM:  512 MiB
    MMC:   SUNXI SD/MMC: 0
    Loading Environment from FAT... Unable to use mmc 0:1... In:    serial
    Out:   serial
    Err:   serial
    Net:   phy interface7
    eth0: ethernet@1c30000
    starting USB...
    USB0:   USB EHCI 1.00
    USB1:   USB OHCI 1.0
    USB2:   USB EHCI 1.00
    USB3:   USB OHCI 1.0
    scanning bus 0 for devices... 1 USB Device(s) found
    scanning bus 2 for devices... 1 USB Device(s) found
           scanning usb for storage devices... 0 Storage Device(s) found
    Hit any key to stop autoboot:  0 
    => setenv serverip 192.168.188.1
    => dhcp
    BOOTP broadcast 1
    BOOTP broadcast 2
    BOOTP broadcast 3
    DHCP client bound to address 192.168.188.50 (1003 ms)
    Using ethernet@1c30000 device
    TFTP from server 192.168.188.1; our IP address is 192.168.188.50
    Filename '/nfsshares/tftp/npi/boot/boot.scr'.
    Load address: 0x42000000
    Loading: T 
    TFTP error: 'File not found' (1)
    Not retrying...
    => 

     

    Is there anyone who has experience  booting Armbian from the network that can point me in the right direction / perhaps share a working solution?

  13. @Hackbeere

    How to enable network support in u-boot for the Nano Pi Neo 2.

     

    The instructions above use the FriendlyArm repo, the same can be achieved with mainline using a more recent version of u-boot, the procedure is slightly different and described below:
     

    In order to enable the network interface for the Nanopi Neo 2 in U-boot you have to take the following steps (works with Ubuntu 18.04):

     

    1) Install the toolchain on a Host PC (Ubuntu)

    2) Install some additional software

    3) Compile arm-trusted-firmware

    3) Install u-boot

    4) Make changes to the nanopi neo2 dts file in order to add network capability in U-boot

    5) Compile u-boot with the changes

    6) Update U-boot on the SD card for the Nanopi Neo 2

     

    Here are some detailed working instructions:


    Install toolchain on Host PC (Ubuntu)

    sudo su
    mkdir -p /opt/FriendlyARM/toolchain/
    cd /root
    wget https://releases.linaro.org/components/toolchain/binaries/7.3-2018.05/aarch64-linux-gnu/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
    tar -xf gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz -C /opt/FriendlyARM/toolchain/
    export PATH=/opt/FriendlyARM/toolchain/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin:$PATH
    export GCC_COLORS=auto
    . ~/.bashrc

     

    Install additional software on Host PC (Ubuntu)

    apt install gcc-aarch64-linux-gnu -y
    apt install git make gcc bison flex -y
    apt install swig python-dev python3-dev -y
    apt install device-tree-compiler -y
    apt install gcc-arm-linux-gnueabihf -y

     

    Compile arm-trusted-firmware on Host PC

    cd /root
    git clone https://github.com/apritzel/arm-trusted-firmware.git
    cd arm-trusted-firmware/
    git checkout allwinner
    export CROSS_COMPILE=aarch64-linux-gnu-
    make PLAT=sun50iw1p1 DEBUG=1 bl31
    export BL31=/root/arm-trusted-firmware/build/sun50iw1p1/debug/bl31.bin

     

    Compile U-Boot with network support on Host PC

    cd /root
    git clone git://git.denx.de/u-boot.git u-boot/
    cd u-boot
    
    nano arch/arm/dts/sun50i-h5-nanopi-neo2.dts

    Add to the end

    &emac {
            pinctrl-names = "default";
            pinctrl-0 = <&emac_rgmii_pins>;
            status = "okay";
            phy = <&phy1>;
            phy-mode = "rgmii";
            phy1: ethernet-phy@1 {
                    reg = <0>;
            };
    };

    Compile u-boot

    make nanopi_neo2_defconfig CROSS_COMPILE=aarch64-linux-gnu-
    make CROSS_COMPILE=aarch64-linux-gnu-
    

     

    Update U-Boot on SD Card

    Insert the SD card with the Nanopi Neo 2 official ROM / OS in the cardreader of the host-pc. Check with lsblk where the SD card is with for the Nanopi Neo 2 is located (e.g. sdb) Replace sdX in the following commands with the actual location of the Nanopi Neo 2 SD card.

    dd if=spl/sunxi-spl.bin of=/dev/sdX bs=1024 seek=8
    dd if=u-boot.itb of=/dev/sdX bs=1024 seek=40
    sync


    I hope this helps.

  14. @Hackbeere

     

    In order to enable the network interface for the Nanopi Neo 2 in U-boot you have to take the following steps (works with Ubuntu):

     

    1) Install the toolchain on a Host PC (Ubuntu)

    2) Install some additional software

    3) Install u-boot

    4) Make changes to the nanopi neo2 dts file in order to add network capability in U-boot

    5) Compile the changes

    6) Update U-boot on the SD card for the Nanopi Neo 2

     

    Here are some detailed working instructions:


    Install toolchain on Host PC (Ubuntu)

    sudo su
    mkdir -p /opt/FriendlyARM/toolchain/
    cd /root
    


    Download gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu.tar.xz from friendlyarm to the current (/root) folder

     

    tar -xf gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu.tar.xz -C /opt/FriendlyARM/toolchain/
    export PATH=/opt/FriendlyARM/toolchain/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu/bin:$PATH
    export GCC_COLORS=auto
    . ~/.bashrc
    

     

    Install some additional software on Host PC (Ubuntu)

     

    (as root)

    apt-get install swig python-dev python3-dev -y
    apt-get install device-tree-compiler -y
    apt-get install gcc-arm-linux-gnueabihf -y
    

     

    Download and Compile U-Boot with network support on Host PC

    (as root)

    cd /root
    git clone https://github.com/friendlyarm/u-boot.git
    cd u-boot
    git checkout sunxi-v2017.x
    
    nano arch/arm/dts/sun50i-h5-nanopi-neo2.dts

    Add to the end

    &emac {
            pinctrl-names = "default";
            pinctrl-0 = <&emac_rgmii_pins>;
            status = "okay";
            phy = <&phy1>;
            phy-mode = "rgmii";
            phy1: ethernet-phy@1 {
                    reg = <0>;
            };
    };

     

    Compile

    make nanopi_h5_defconfig CROSS_COMPILE=aarch64-linux-gnu-
    make CROSS_COMPILE=aarch64-linux-gnu-
    

    Update U-Boot on SD Card
     

    Insert the SD card with the Nanopi Neo 2 official ROM / OS in the cardreader of the host-pc. Check with lsblk where the SD card is with for the Nanopi Neo 2 is located (e.g. sdb) Replace sdX in the following commands with the actual location of the Nanopi Neo 2SD card.
     

    dd if=spl/sunxi-spl.bin of=/dev/sdX bs=1024 seek=8
    dd if=u-boot.itb of=/dev/sdX bs=1024 seek=40



    After that you can put the SD card in the Nanopi Neo 2 and the ethernet interface will show up in U-boot.
     

  15. For a new project with multiple socs, I want to use the NanoPi Neo 2 with the Allwinner H5 soc and boot from DHCP / NFS. I've done the same in the past for a setup with Raspberry Pi's, but the Allwinner socs require a different approach.

    What would be the best way to achive this?

     

    - FEL?

    - SD or USB with U-Boot?

    - any other suggestions?

     

  16. I've got a Cubieboard2 with a serial interface hardwired to PI10 and PI11 (uart5).

     

    The default Cubieboard2 DT overlay connects uart5 to PH6 and PH7, so I made a new dts, called "sun7i-a20-uart5b" with the pins like I need them:

     

     

    /dts-v1/;
    /plugin/;
    
    / {
            compatible = "allwinner,sun7i-a20";
    
            fragment@0 {
                    target-path = "/aliases";
                    __overlay__ {
                            serial5 = "/soc@01c00000/serial@01c29400";
                    };
            };
    
    
    
            fragment@1 {
                    target = <&pio>;
                    __overlay__ {
                            uart5_pins_a_2: uart5@1 {
                                    pins = "PI10", "PI11";
                                    function = "uart5";
                            };
                    };
            };
    
    
            fragment@2 {
                    target = <&uart5>;
                     __overlay__ {
                            pinctrl-names = "default";
                            pinctrl-0 = <&uart5_pins_a_2>;
                            status = "okay";
                    };
            };
    };

     

    According to the instructions I need to excute:

    armbian-add-overlay sun7i-a20-uart5b

    But this results in an error: Kernel headers are not installed properly. Please install the kernel headers package
     

    root@cubieboard2:/boot/dtb# armbian-add-overlay sun7i-a20-uart5b.dts 
    Kernel headers are not installed properly. Please install the kernel headers package

     

    if I execute as root the following:

     

    apt-get install linux-headers-$(uname -r)

    I get the following errors:

     

    root@cubieboard2:/boot/dtb# sudo apt-get install linux-headers-$(uname -r)
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    E: Unable to locate package linux-headers-4.13.16-sunxi
    E: Couldn't find any package by glob 'linux-headers-4.13.16-sunxi'
    E: Couldn't find any package by regex 'linux-headers-4.13.16-sunxi'

    I'm stuck now:

     

    My basic question is: how do I enable uart5 on PI10,PI11 ?

    If I've proceeded in the correct way, how do I install the kernel header package?

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines