1 2 Previous Next 20 Replies Latest reply on Apr 23, 2015 2:02 PM by AlexT_Intel

    How to install a kernel from my repo onto Edison with the official image

    AlexT_Intel

      I've just wrote a post on this in my blog and this thread is for asking questions or your feedback.

       

      Check it out at How to install a kernel from my repo onto Edison with the official image

        • 1. Re: How to install a kernel from my repo onto Edison with the official image
          intel_jassowski

          Alex,

            Thanks for the repo.  I followed the directions on your blog, and everything seemed to go smoothly.  The new kernel is up, but for some reason wlan0 does not work, and I can't bring it up:

          # ifup wlan0

          ifup: can't open '/etc/network/interfaces': No such file or directory

           

          With the original ww42 kernel, networking did work after I ran configure_edison --setup.

          Now, when I run configure_edison --wifi, it starts a scan, but then times out:

           

          A dependency job for wpa_supplicant.service failed. See 'journalctl -xn' for details.
          Failed to connect to non-global ctrl_ifname: (null)  error: No such file or directory
          Failed to connect to non-global ctrl_ifname: (null)  error: No such file or directory


          0 :     Rescan for networks
          1 :     Manually input a hidden SSID


          Enter 0 to rescan for networks.
          Enter 1 to input a hidden network SSID:

           

          Here's the output of journalctl -xn:

          -- Logs begin at Sat 2000-01-01 00:00:10 UTC, end at Tue 2014-11-18 22:03:54 UT
          C. --
          Nov 18 21:50:32 edison_mini sshd[247]: lastlog_openseek: Couldn't stat /var/log/lastlog: No such file or directory
          Nov 18 22:00:11 edison_mini systemd[1]: Stopped Hostap daemon service.
          Nov 18 22:00:13 edison_mini systemd[1]: Expecting device sys-subsystem-net-devices-wlan0.device...
          Nov 18 22:01:43 edison_mini systemd[1]: [[1;39mJob sys-subsystem-net-devices-wlan0.device/start timed out.[[0m
          Nov 18 22:01:43 edison_mini systemd[1]: [[1;31mTimed out waiting for device sys-subsystem-net-devices-wlan0.device.[[0m
          Nov 18 22:01:43 edison_mini systemd[1]: [[1;31mDependency failed for WPA supplicant service.[[0m
          Nov 18 22:03:54 edison_mini systemd[1]: Starting Cleanup of Temporary Directories...
          Nov 18 22:03:54 edison_mini systemd[1]: Started Cleanup of Temporary Directories.

           

          Which is strange... wifi was working, otherwise opkg would not have been able to update the kernel.

           

          If I move the old kernel back and reboot, networking starts fine.

          Any ideas?

          • 2. Re: How to install a kernel from my repo onto Edison with the official image
            mmi

            Maybe you forgot to install the 'bcm4334x' module? "lsmod" shows if it is loaded.

            • 3. Re: How to install a kernel from my repo onto Edison with the official image
              intel_jassowski

              Yes, that's it.  But why didn't it load (all I did was change the kernel, not any of the installed modules).  Looking at the console, I did notice an error which suggested I run:

               

              root@edison_mini:~# systemctl -l status systemd-modules-load.service
              ● systemd-modules-load.service - Load Kernel Modules
                 Loaded: loaded (/lib/systemd/system/systemd-modules-load.service; static)
                 Active: failed (Result: exit-code) since Tue 2014-11-18 22:21:34 UTC; 1min 59s ago
                   Docs: man:systemd-modules-load.service(8)
                         man:modules-load.d(5)
                Process: 100 ExecStart=/lib/systemd/systemd-modules-load (code=exited, status=1/FAILURE)
              Main PID: 100 (code=exited, status=1/FAILURE)

              Nov 18 22:21:25 edison_mini systemd-modules-load[100]: Failed to insert 'bcm4334x': Timer expired
              Nov 18 22:21:34 edison_mini systemd-modules-load[100]: Inserted module 'bcm_bt_lpm'
              Nov 18 22:21:34 edison_mini systemd[1]: systemd-modules-load.service: main process exited, code=exited, status=1/FAILURE
              Nov 18 22:21:34 edison_mini systemd[1]: Failed to start Load Kernel Modules.
              Nov 18 22:21:34 edison_mini systemd[1]: Unit systemd-modules-load.service entered failed state.
              Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

               

              So, OK... The bcm4334x kernel module timed out. Why?

               

              Just for grins... here is the output from the same command with the original ww42 kernel:

              root@edison_mini:~# systemctl -l status systemd-modules-load.service
              ● systemd-modules-load.service - Load Kernel Modules
                 Loaded: loaded (/lib/systemd/system/systemd-modules-load.service; static)
                 Active: active (exited) since Sat 2000-01-01 00:00:11 UTC; 14 years 10 months ago
                   Docs: man:systemd-modules-load.service(8)
                         man:modules-load.d(5)
                Process: 101 ExecStart=/lib/systemd/systemd-modules-load (code=exited, status=0/SUCCESS)
              Main PID: 101 (code=exited, status=0/SUCCESS)
                 CGroup: /system.slice/systemd-modules-load.service

              Jan 01 00:00:11 edison_mini systemd-modules-load[101]: Inserted module 'bcm4334x'
              Jan 01 00:00:11 edison_mini systemd-modules-load[101]: Inserted module 'bcm_bt_lpm'
              Jan 01 00:00:11 edison_mini systemd[1]: Started Load Kernel Modules.
              Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

              • 4. Re: How to install a kernel from my repo onto Edison with the official image
                mmi

                If you install a new kernel you should install also all the modules belonging to this new kernel.

                You have mixed some modules which belong to the older kernel, that's absolutely not recommendable.

                • 5. Re: How to install a kernel from my repo onto Edison with the official image
                  intel_jassowski

                  I installed the kernel modules listed on the instruction page... I notice that bcm4334x is not on that list.  So, let's give that one a try:

                   

                  root@edison_mini:~# opkg install kernel-module-bcm4334x

                  Installing kernel-module-bcm4334x (1.141-r47) to root...

                  Downloading http://repo.opkg.net/edison/repo/edison/kernel-module-bcm4334x_1.141-r47_edison.ipk.

                  Configuring kernel-module-bcm4334x.

                  modprobe: FATAL: Module bcm4334x not found.

                   

                  Hmmm. so the module was found and downloaded, but couldn't be properly configured?

                  But wait:

                  root@edison_mini:~# lsmod

                  Module                  Size  Used by

                  usb_f_acm              14335  1

                  u_serial               18582  6 usb_f_acm

                  g_multi                70703  0

                  libcomposite           39245  2 usb_f_acm,g_multi

                  bcm_bt_lpm             13676  0

                  bcm4334x              578947  0

                   

                  A reboot later, everything seems to be working fine with the new kernel (though I haven't tried the USB audio -- I think I need to work out the cabling on the mini-expander.

                  Thanks for the help!

                  • 6. Re: How to install a kernel from my repo onto Edison with the official image
                    AlexT_Intel

                    Thanks for the report, first of all, @intel_jassowski

                     

                    That's actually interesting, because I've run through all the steps starting with a WW42 unmodified image and I haven't seen this problem. WiFi was working just fine all along for me even with the old module.

                     

                    Generally speaking, even though I recommend updating modules to get the package meta-data right, I would assume (and I've tested a coupel of them) they should work with either kernel, because they're both built out of identical sources, it's just that in my one I activate a couple of additional options, which shouldn't affect this side of the functionality though.

                     

                    But in a very generic case, the rule of thumb is to install modules built exactly with this specific kernel, just because that is the Right Way, so @mmi is right.

                     

                    I'll double-test the thing you've observed hopefully this weekend and I'll update the blog post and this thread with my findings. Thanks again for the feedback, I appreciate that

                    • 7. Re: How to install a kernel from my repo onto Edison with the official image
                      AlexT_Intel

                      So I've just tried it again and it worked just fine for me with the new kernel and old module. I've tried rebooting, running ifdown/ifup manually - all worked just fine.

                       

                      I've anyway added an additional step for updating and reloading the bcm4334x module, so it should be covered now in any case.

                      • 8. Re: How to install a kernel from my repo onto Edison with the official image
                        IFarkas

                        Great post Alex. I updated the IoT Dev Kit libmraa, UPM.
                        Based on libmraa Git Repo I added /etc/opkg/mraa-upm.conf with this content "src mraa-upm http://iotdk.intel.com/repos/1.1/intelgalactic"

                        MRAA and UPM are updated:

                        root@edison1:~# opkg info libmraa0 | head -n 2
                        Package: libmraa0
                        Version: 0.5.2.42

                         

                        root@edison1:~# opkg info upm | head -n 2
                        Package: upm
                        Version: 0.1.8.55

                         

                        When I do your update it reverts them back to an older version.

                        root@edison1:/etc/opkg# opkg info libmraa0 | head -n 2
                        Package: libmraa0
                        Version: 0.4.4c-r0

                         

                        root@edison1:/etc/opkg# opkg info upm | head -n 2
                        Package: upm
                        Version: 0.1.7-r0

                         

                        How can I have both up-to-date, please?

                        • 9. Re: How to install a kernel from my repo onto Edison with the official image
                          intel_jassowski

                          Alex,

                          It turns out I was not using the WW42 kernel, but a newer one: which explains why the module was not compatible and had to be re-installed.

                          • 10. Re: How to install a kernel from my repo onto Edison with the official image
                            AlexT_Intel

                            Ah, I see - good to know and thanks for reporting.

                            • 11. Re: How to install a kernel from my repo onto Edison with the official image
                              AlexT_Intel

                              I'll see if I can add those into my repository, however it's interesting how you ended up with these packages downgraded - nothing in my instructions actually mentions them and opkg won't downgrade packages unles explicitly told so. Care to share the exact sequence of steps you've executed that resulted in this?

                              • 12. Re: How to install a kernel from my repo onto Edison with the official image
                                c1ovis

                                I tried following instructions at: How to install a kernel from my repo onto Edison with the official image and have wound up stuck after reboot. The device seems stuck in a loop until any key is pressed and just repeats as below. When I hit a key I wind up at a "boot>" prompt and cannot exit back to the command line. Can you advise on how to get out of this state and back to where I was? Thanks!  -C

                                 

                                Target:blank

                                Partitioning already done...

                                Flashing already done...

                                GADGET DRIVER: usb_dnl_dfu

                                reading vmlinuz

                                ** Unable to read file vmlinuz **

                                Error: Invalid Boot Flag (found 0xffef, expected 0xaa55)

                                ## Kernel loading failed ...

                                zboot - Boot bzImage

                                 

                                 

                                Usage:

                                zboot [addr] [size] [initrd addr] [initrd size]

                                      addr -        The optional starting address of the bzimage.

                                                    If not set it defaults to the environment

                                                    variable "fileaddr".

                                      size -        The optional size of the bzimage. Defaults to

                                                    zero.

                                      initrd addr - The address of the initrd image to use, if any.

                                      initrd size - The size of the initrd image to use, if any.

                                 

                                 

                                Unknown boot mode: boot

                                Saving Environment to MMC...

                                Writing to redundant MMC(0)... done

                                Resetting to default boot mode and reboot...

                                resetting ...

                                 

                                 

                                 

                                 

                                ******************************

                                PSH KERNEL VERSION: b0182727

                                                WR: 20104000

                                ******************************

                                 

                                 

                                SCU IPC: 0x800000d0  0xfffce92c

                                 

                                 

                                PSH miaHOB version: TNG.B0.VVBD.0000000c

                                 

                                 

                                microkernel built 23:15:13 Apr 24 2014

                                 

                                 

                                ******* PSH loader *******

                                PCM page cache size = 192 KB

                                Cache Constraint = 0 Pages

                                Arming IPC driver ..

                                Adding page store pool ..

                                PagestoreAddr(IMR Start Address) = 0x04899000

                                pageStoreSize(IMR Size)          = 0x00080000

                                 

                                 

                                *** Ready to receive application ***

                                 

                                 

                                 

                                 

                                U-Boot 2014.04 (Oct 14 2014 - 15:19:04)

                                 

                                 

                                       Watchdog enabled

                                DRAM:  980.6 MiB

                                MMC:   tangier_sdhci: 0

                                In:    serial

                                Out:   serial

                                Err:   serial

                                Hit any key to stop autoboot:  0

                                boot >

                                • 13. Re: How to install a kernel from my repo onto Edison with the official image
                                  Setogit

                                  +1 on the infinite loop posted by c1ovis at Jan 17, 2015 1:00 PM, i.e., infinite auto-reboot after Backup the data/Resize the partition/Restore dataInterrupted the loop by hitting any key. 


                                  What do I do under "boot >" prompt to get out of this state?   Image version is edison-image-rel1-maint-rel1-ww42-14 and opkg updated on Feb. 5, 2015.



                                  • 14. Re: How to install a kernel from my repo onto Edison with the official image
                                    AlexT_Intel

                                    c1ovis, sorry looks like I missed your post.

                                     

                                    Setogit, c1ovis, well, this most definitely looks like something went wrong at the /boot partition resizing step or maybe the one with copying the kernel back. Based on the log you've provided, it's hard to say what exactly could that be, the commands I have in my blog are rather straightforward in what they do and unless they failed, there's no room for deviations.

                                     

                                    Let's start with checking what exactly do you have right now in terms of partitions in general and files on the /boot partition. Please post the output of the "mmc part" and "ls mmc 0:7" commands, which is available in U-Boot (that "boot >" prompt is U-Boot's shell). Note that U-Boot may complain from time to time with something like "Unknown command 'ls' - try 'help'", even though the command is perfectly ok - just repeat the command again.

                                    1 2 Previous Next