1 3 4 5 6 7 8 Previous Next 114 Replies Latest reply on Jul 31, 2017 12:40 PM by 0andriy Go to original post
      • 60. Re: Newer Kernel on Edison (OpenWrt)
        0andriy

        One more display has been tested, i.e. OLED 64x48 by SparkFun. Never saw before a frame buffer console 8x6. Interesting feelings.

        • 61. Re: Newer Kernel on Edison (OpenWrt)
          PieterGit

          I'm trying to boot a custom 32 bits built kernel (build on ubilinux 4.4 up board) on an Edison board. It hangs after "Starting kernel ... ". I don't see any logging.

          Can anybody help me to make this kernel bootable on the Edison?

          U-Boot 2014.04 (Feb 09 2015 - 15:40:31)
          
          
                 Watchdog enabled
          DRAM:  980.6 MiB
          MMC:   tangier_sdhci: 0
          In:    serial
          Out:   serial
          Err:   serial
          Hit any key to stop autoboot:  0
          boot > setenv boot_edsboot 'zboot 0x100000'
          boot > setenv bootargs_edsboot 'console=tty1 console=ttyS2,115200n8 loglevel=7 rootfstype=ramfs rw'
          boot > setenv bootcmd_edsboot 'setenv bootargs ${bootargs_edsboot}; run load_edsboot; run boot_edsboot'
          boot > setenv load_edsboot 'load mmc 0:9 0x100000 vmlinuz.efi; load mmc 0:9 0x3000000 initrd'
          boot > saveenv
          Saving Environment to MMC...
          Writing to MMC(0)... done
          boot > run bootcmd_edsboot
          reading vmlinuz.efi
          6825360 bytes read in 167 ms (39 MiB/s)
          reading initrd
          1703517 bytes read in 52 ms (31.2 MiB/s)
          Valid Boot Flag
          Setup Size = 0x00003e00
          Magic signature found
          Using boot protocol version 2.0d
          Linux kernel version 4.10.0-rc1 (pietergit@foobar) #2 SMP Fri Dec 30 15:43:52 CET 2016
          Building boot_params at 0x00090000
          Loading bzImage at address 00100000 (6809488 bytes)
          Magic signature found
          Kernel command line: "console=tty1 console=ttyS2,115200n8 loglevel=7 rootfstype=ramfs rw"
          
          Starting kernel ...
          
           
          • 62. Re: Newer Kernel on Edison (OpenWrt)
            0andriy

            PieterGit kirjoitti:

             

            I'm trying to boot a custom 32 bits built kernel (build on ubilinux 4.4 up board) on an Edison board. It hangs after "Starting kernel ... ". I don't see any logging.

            Can anybody help me to make this kernel bootable on the Edison?

            1. U-Boot 2014.04 (Feb 09 2015 - 15:40:31)

             

            Older U-Boot can not boot newer kernels. Though as far as I know it should be not a problem prior v4.7. Some details are here: https://github.com/andy-shev/linux/issues/3.

             

            1. boot> setenv boot_edsboot 'zboot 0x100000'
            2. ...
            3. boot> setenv load_edsboot 'load mmc 0:9 0x100000 vmlinuz.efi;load mmc 0:9 0x3000000 initrd'

             

            Here you missed address of initramfs to kernel. Should be something like

            setenv boot_edsboot 'zboot 0x100000 0 0x3000000 0x400000'
            

            This is showed on the wiki: https://edison.internet-share.com/wiki/Using_a_vanilla_Linux_kernel_with_Intel_Edison#U-Boot

            • 63. Re: Newer Kernel on Edison (OpenWrt)
              PieterGit

              Hi 0andriy,

               

              Thanks for the feedback. I upgraded my U-boot using the image at Ubuntu 16.0.4 for Edison (Wireless/MMC/SD-Card Enabled Mainline) is available for download!

               

              It now boots linux 4.8 rc 4! I tried to update that image to kernel 4.9, but when I start it a get a kernel error

               

              *** Ready to receive application ***
              
              
              
              
              U-Boot 2014.04 (Sep 05 2016 - 03:42:46)
              
              
                     Watchdog enabled
              DRAM:  980.6 MiB
              MMC:   tangier_sdhci: 0
              In:    serial
              Out:   serial
              Err:   serial
              Hit any key to stop autoboot:  0
              boot > setenv boot_edsboot 'zboot 0x100000 0 0x3000000 0x1000000'
              boot > setenv bootargs_edsboot 'console=tty1 console=ttyS2,115200n8 rootfstype=ramfs rw'
              boot > setenv bootcmd_edsboot 'setenv bootargs ${bootargs_edsboot}; run load_edsboot; run boot_edsboot'
              boot > setenv load_edsboot 'load mmc 0:9 0x100000 vmlinuz.efi; load mmc 0:9 0x3000000 initrd'
              boot > run bootcmd_edsboot
              reading vmlinuz.efi
              6235216 bytes read in 155 ms (38.4 MiB/s)
              reading initrd
              1703517 bytes read in 52 ms (31.2 MiB/s)
              Valid Boot Flag
              Setup Size = 0x00003e00
              Magic signature found
              Using boot protocol version 2.0d
              Linux kernel version 4.9.0 (root@up) #5 SMP Fri Dec 23 16:31:34 CET 2016
              Building boot_params at 0x00090000
              Loading bzImage at address 00100000 (6219344 bytes)
              Magic signature found
              Initial RAM disk at linear address 0x03000000, size 16777216 bytes
              Kernel command line: "console=tty1 console=ttyS2,115200n8 rootfstype=ramfs rw"
              
              
              Starting kernel ...
              
              
              Invalid Opcode (UnDefined Opcode)
              EIP: 0008:[<0784469f>] EFLAGS: 00010096
              EAX: 561dbbbf EBX: 0000011d ECX: ffffffff EDX: 00000000
              ESI: ffffffff EDI: 015e72f9 EBP: 00000001 ESP: 015ff588
               DS: 0018 ES: 0018 FS: 0018 GS: 0018 SS: 0018
              CR0: 00000011 CR2: 00000000 CR3: 00000000 CR4: 00000000
              DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
              DR6: ffff0ff0 DR7: 00000400
              Stack:
                  0x015ff5c8 : 0x00000000
                  0x015ff5c4 : 0x00000000
                  0x015ff5c0 : 0x00000000
                  0x015ff5bc : 0x00000000
                  0x015ff5b8 : 0x015ff5d6
                  0x015ff5b4 : 0x015e72f8
                  0x015ff5b0 : 0x015ec11f
                  0x015ff5ac : 0x00d83000
                  0x015ff5a8 : 0x005e482b
                  0x015ff5a4 : 0x00000000
                  0x015ff5a0 : 0x30303235
                  0x015ff59c : 0x31312c32
                  0x015ff598 : 0x53797474
                  0x015ff594 : 0x015ee6b0
                  0x015ff590 : 0x00000000
                  0x015ff58c : 0x015ff590
              --->0x015ff588 : 0x00000000
                  0x015ff584 : 0x00010096
                  0x015ff580 : 0x00000008
                  0x015ff57c : 0x0784469f
              ### ERROR ### Please RESET the board ###
              

               

              Questions:

              1) can you explain if I got the zboot parameters correct now? How can I find the offset and size I need?

              2) what is causing the Invalid Opcode?

              3) is the newest kernel from kernel.org (4.10-rc2 at this moment) the most recommended?

              4) how can i compile the modules from /lib/modules. I can't find a way to compile these

               

              Thanks in advance,

              Pieter

              • 64. Re: Newer Kernel on Edison (OpenWrt)
                0andriy

                It's exactly the symptom which is described in https://github.com/andy-shev/linux/issues/3. I have mentioned that in previous comment. Had you read the discussion carefully?

                 

                P.S. And actually you didn't upgrade U-Boot.

                • 65. Re: Newer Kernel on Edison (OpenWrt)
                  FerryT

                  PieterGit As you can see from line# 6 in your log above, U-Boot has not been updated, it is still at 14.04, you have only installed an alternative kernel 4.8RC4.

                   

                  0andriy The discussion on https://github.com/andy-shev/linux/issues/3. mentions you need a 16.11 U-boot for kernel 4.7+, but apparently 4.8RC4 still worked with the 14.04 U-Boot.

                   

                  Ferry

                  • 66. Re: Newer Kernel on Edison (OpenWrt)
                    0andriy

                    FerryT, Yes, though I think it is just a piece of luck. The mentioned culprit patch has been pushed to v4.7-rc1 first time.

                    • 67. Re: Newer Kernel on Edison (OpenWrt)
                      PieterGit

                      0andriy: thanks for your reply. I misread the u-boot version (only looked at the year and month).

                       

                      I read https://github.com/andy-shev/linux/issues/3 and tried to get v2017.01-rc2 u-boot release working on my edison, but failed.

                      I can't find documentation how to install the u-boot on an edison. I looked for a edison_defconfig but could not find any information about how to compile/install a new u-boot version on an Intel Edison. I also looked at https://edison.internet-share.com/wiki/Using_a_vanilla_Linux_kernel_with_Intel_Edison for information about how to upgrade the u-boot. Is there any documentation about how to compile/install a newer u-boot available?

                       

                      I'm looking for getting an Edison kernel with stable usb, /dev/spidev5.1 (serial) for talking to ti CC111x openaps explorer board (see  https://github.com/ps2/subg_rfspy) and wifi working, so I can use it for openaps.org. Am I right the first possible kernel that works with GPIO/serial and Wifi is 4.9. Or should I try to get 4.10-rc2 working?

                       

                      Thanks in advance,

                       

                      Pieter

                      • 68. Re: Newer Kernel on Edison (OpenWrt)
                        0andriy

                        PieterGit, For U-Boot we have a separate thread: Update U-Boot. There I collected some tips about it. I will elaborate a bit my post there.

                         

                        Regarding supported features, you are right. For the listed in your comment v4.9 should be enough. Though I would highly recommend to use latest from my branch. DMA support for SPI, by the way, is available only in my branch.

                        • 69. Re: Newer Kernel on Edison (OpenWrt)
                          PieterGit

                          0andriy: thanks for your commands. I managed to upgrade the u-boot to U-Boot 2017.01-rc2-00041-gcbf2f6a (Jan 07 2017 - 12:08:19 +0100)

                          I needed to install the following packages to be able to compile the new U-boot.

                          sudo apt-get install gcc-4.8-multilib g++-4.8-multilib
                          sudo apt-get install device-tree-compiler
                          

                          I noticed the release candidate tgz files for 2017-01 on https://github.com/andy-shev/u-boot/releases didn't have a config/edison_defconfig file in it. I used the git checkout https://github.com/andy-shev/u-boot/tree/edison which worked fine.

                           

                          I also managed to boot the 4.9.1 kernel, but i don't have a /dev/spidev5.1 file available. Is there a way to create such a serial device?

                           

                          I also tried the eds-branch but that won't boot for me and the watchdog rebooted the edison after Starting kernel. The log:

                          Linux kernel version 4.10.0-rc2+ (pietergit@up) #3 SMP Sat Jan 7 17:33:26 CET 2017
                          Building boot_params at 0x00090000
                          Loading bzImage at address 100000 (6435008 bytes)
                          Magic signature found
                          Initial RAM disk at linear address 0x03000000, size 16777216 bytes
                          Kernel command line: "console=tty1 console=ttyS2,115200n8 rootfstype=ramfs rw"
                          
                          
                          Starting kernel ...
                          ******************************
                          PSH KERNEL VERSION: b0182b2b
                          WR: 20104000
                          
                          

                           

                          I tried solving https://github.com/01org/edison-u-boot/issues/3 but don't know how. When I tried changing stuff to raw I get:

                          => dfu 0 mmc 0
                          ERROR: Memory layout (mmc) not supported!
                          
                          
                          at drivers/dfu/dfu_mmc.c:377/dfu_fill_entity_mmc()
                          ERROR: DFU entities configuration failed!
                          
                          
                          at drivers/dfu/dfu.c:70/dfu_init_env_entities()
                          dfu - Device Firmware Upgrade
                          
                          
                          Usage:
                          dfu <USB_controller> <interface> <dev> [list]
                            - device firmware upgrade via <USB_controller>
                              on device <dev>, attached to interface
                              <interface>
                              [list] - list available alt settings
                          
                          
                          => dfu 0 raw 0
                          dfu_fill_entity: Device raw not (yet) supported!
                          ERROR: DFU entities configuration failed!
                          
                          
                          at drivers/dfu/dfu.c:70/dfu_init_env_entities()
                          dfu - Device Firmware Upgrade
                          
                          
                          Usage:
                          dfu <USB_controller> <interface> <dev> [list]
                            - device firmware upgrade via <USB_controller>
                              on device <dev>, attached to interface
                              <interface>
                              [list] - list available alt settings
                          
                          
                          

                          Can you help to explain how the dfu stuff needs to be changed?

                           

                          Thanks in advance,

                           

                          Pieter

                          • 70. Re: Newer Kernel on Edison (OpenWrt)
                            0andriy

                            PieterGit Thank you for an update, unfortunately your message doesn't belong this thread. Please, move it to U-Boot discussion. Only one question is valid:

                             

                            I also managed to boot the 4.9.1 kernel, but i don't have a /dev/spidev5.1 file available. Is there a way to create such a serial device?

                             

                            Let me check it twice. (Btw, today I have pushed v.4.10-rc3 based set).

                            And you are right. There is no enabled option for that in my configuration file. I will update it soon.

                             

                            Update

                             

                            # uname -a

                            Linux buildroot 4.10.0-rc3+ #11 SMP Mon Jan 9 16:46:26 EET 2017 x86_64 GNU/Linux

                             

                            # lsmod | grep spi

                            spidev                  8241  0
                            spi_pxa2xx_platform    16363  0

                            spi_pxa2xx_pci          3497  0


                            # ls -l /dev/spi*

                            crw-rw----    1 root     root      153,   0 Jan  1 00:00 /dev/spidev5.1

                            • 71. Re: Newer Kernel on Edison (OpenWrt)
                              0andriy

                              Got today RTC working. To keep time going on when board is powered off one has to connect a battery to V_VBAT_BKUP.

                              UPDATE. And power button (small thing that required 12 patches!).

                              • 72. Re: Newer Kernel on Edison (OpenWrt)
                                0andriy

                                bashton kirjoitti:

                                 

                                0andriy Hey I have been making more progress on this and have a couple device tree things working. I really want to get BT working on this module

                                 

                                I have got Bluetooth (somehow) working today. I just pushed updated branch which contains necessary parts.

                                 

                                First what I did when boot the kernel I run `screen` and in first window I run the following.

                                 

                                • Copied firmware from BSP to firmware folder (might be done once if you have rootfs on dedicated storage):
                                # cp firmware/bcm43341.hcd /lib/firmware/brcm/BCM43341B0.hcd
                                # ls -l /lib/firmware/brcm/BCM43341B0.hcd
                                -rwxr-xr-x    1 root     root         41424 Jan  1 00:01 /lib/firmware/brcm/BCM43341B0.hcd
                                
                                • Run attach command (You have to use `btattach` from bluez5):
                                # btattach -B /dev/ttyS0 -P bcm -S 3000000
                                Attaching Primary controller to /dev/ttyS0
                                [  293.858310] Bluetooth: HCI UART driver ver 2.3
                                [  293.862867] Bluetooth: HCI UART protocol H4 registered
                                [  293.868759] hci_bcm hci_bcm: BCM irq: 441
                                [  293.872876] hci_bcm hci_bcm: hci_bcm device registered.
                                [  293.878411] Bluetooth: HCI UART protocol Broadcom registered
                                Switched line discipline from 0 to 15
                                Device index 0 attached
                                [  294.065456] Bluetooth: hci0: BCM: chip id 82
                                [  294.069821] Bluetooth: hci0: BCM43341B0 (002.001.014) build 0000
                                [  294.695205] Bluetooth: hci0: BCM (002.001.014) build 0166
                                
                                • Now, open another window and configure interface:
                                # hciconfig -a
                                hci0:   Type: Primary  Bus: UART
                                        BD Address: 43:34:1B:00:1F:AC  ACL MTU: 1021:8  SCO MTU: 64:1
                                        DOWN
                                        RX bytes:2306 acl:0 sco:0 events:265 errors:0
                                        TX bytes:42129 acl:0 sco:0 commands:265 errors:0
                                        Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
                                        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
                                        Link policy: RSWITCH SNIFF 
                                        Link mode: SLAVE ACCEPT 
                                # hciconfig hci0 up
                                # hciconfig -a
                                hci0:   Type: Primary  Bus: UART
                                        BD Address: 43:34:1B:00:1F:AC  ACL MTU: 1021:8  SCO MTU: 64:1
                                        UP RUNNING 
                                        RX bytes:2960 acl:0 sco:0 events:298 errors:0
                                        TX bytes:42540 acl:0 sco:0 commands:298 errors:0
                                        Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
                                        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
                                        Link policy: RSWITCH SNIFF 
                                        Link mode: SLAVE ACCEPT
                                        Name: 'BCM43340B0 37.4 MHz WLBGA_iTR Intel Edison-0122-N'
                                        Class: 0x000000
                                        Service Classes: Unspecified
                                        Device Class: Miscellaneous,
                                        HCI Version: 4.0 (0x6)  Revision: 0xa6
                                        LMP Version: 4.0 (0x6)  Subversion: 0x410e
                                        Manufacturer: Broadcom Corporation (15)
                                
                                • Run scan, for example (by some unknown reason it often just hangs):
                                # hcitool scan
                                Scanning ...
                                        C0:EE:FB:FE:89:43       OnePlus 3T
                                

                                 

                                So, if anyone can do more tests and perhaps has some insights what it's going on there. It might be a problem in the driver, firmware, somewhere else, though I have no experience with bluetooth, can't tell what it is.

                                 

                                I have played with different speeds and I found even another firmware, but that didn't improve a situation anyhow.

                                • 73. Re: Newer Kernel on Edison (OpenWrt)
                                  0andriy

                                  Okay, the tools such as hcitool, hciconfig are deprecated in bluez5_utils 5.44. Bluetooth works with bluetoothctl. It's not 100% reliable though but would be usable anyway.

                                  1 3 4 5 6 7 8 Previous Next