Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Honored Contributor II
2,901 Views

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

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 http://alextgalileo.altervista.org/blog/install-kernel-from-repo-onto-edison-official-image/ How to install a kernel from my repo onto Edison with the official image

20 Replies
Highlighted
6 Views

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

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?

0 Kudos
Highlighted
New Contributor III
6 Views

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

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

Highlighted
6 Views

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

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.
0 Kudos
Highlighted
New Contributor III
6 Views

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

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.

0 Kudos
Highlighted
6 Views

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

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 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!

0 Kudos
Highlighted
Honored Contributor II
6 Views

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

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

0 Kudos
Highlighted
Honored Contributor II
6 Views

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

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.

0 Kudos
Highlighted
New Contributor I
6 Views

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

Great post Alex. I updated the IoT Dev Kit libmraa, UPM.

 

Based on https://github.com/intel-iot-devkit/mraa libmraa Git Repo I added /etc/opkg/mraa-upm.conf with this content "src mraa-upm http://iotdk.intel.com/repos/1.1/intelgalactic http://iotdk.intel.com/repos/1.1/intelgalactic"

MRAA and UPM are updated:

mailto:root@edison1 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?

0 Kudos
Highlighted
6 Views

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

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.

0 Kudos
Highlighted
Honored Contributor II
6 Views

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

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

0 Kudos
Highlighted
Honored Contributor II
6 Views

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

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?

0 Kudos
Highlighted
Beginner
6 Views

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

I tried following instructions at: http://alextgalileo.altervista.org/blog/install-kernel-from-repo-onto-edison-official-image 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 >

Highlighted
Beginner
6 Views

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

+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 data. Interrupted 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.

 

 

0 Kudos
Highlighted
Honored Contributor II
6 Views

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

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.

0 Kudos
Highlighted
Beginner
6 Views

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

/message/278134# 278134 14. /message/278134# 278134 Re: How to install a kernel from my repo onto Edison with the official image

Thanks, Alex. Here it is.

Re: "ls mmc 0:7" -- no response; it looks like I've got into one lower level of prompt...

Hit any key to stop autoboot: 0

boot > mmc part

Partition Map for MMC device 0 -- Partition Type: EFI

Part Start LBA End LBA Name

Attributes

Type GUID

Partition GUID

1 0x00000800 0x000017ff "u-boot0"

attrs: 0x0000000000000000

type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7

guid: d117f98e-6f2c-d04b-a5b2-331a19f91cb2

2 0x00001800 0x00001fff "u-boot-env0"

attrs: 0x0000000000000000

type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7

guid: 25718777-d0ad-7443-9e60-02cb591c9737

3 0x00002000 0x00002fff "u-boot1"

attrs: 0x0000000000000000

type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7

guid: 8a4bb8b4-e304-ae48-8536-aff5c9c495b1

4 0x00003000 0x000037ff "u-boot-env1"

attrs: 0x0000000000000000

type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7

guid: 08992135-13c6-084b-9322-3391ff571e19

5 0x00003800 0x00003fff "factory"

attrs: 0x0000000000000000

type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7

guid: 333a128e-d3e3-b94d-92f4-d3ebd9b3224f

6 0x00004000 0x0000ffff "panic"

attrs: 0x0000000000000000

type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7

guid: f20aa902-1c5d-294a-9177-97a513e3cae4

7 0x00010000 0x0001ffff "boot"

attrs: 0x0000000000000000

type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7

guid: db88503d-34a5-3e41-836d-c757cb682814

8 0x00020000 0x0011ffff "rootfs"

attrs: 0x0000000000000000

type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7

guid: 012b3303-34ac-284d-99b4-34e03a2335f4

9 0x00120000 0x0029ffff "update"

attrs: 0x0000000000000000

type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7

guid: faec2ecf-8544-e241-b19d-757e796da607

10 0x002a0000 0x00747fde "home"

attrs: 0x0000000000000000

type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7

guid: f13a0978-b1b5-1a4e-8821-39438e24b627

boot > ls mmc 0:7

>

0 Kudos
Highlighted
Honored Contributor II
6 Views

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

Okay, the number of partitions looks generally okay. Let's try that ls again - maybe there's just some symbol got cut and pasted or something? This is quite important information to understand what happened there. If the partition layout is okay (and is seems like it is okay), then my next hypothesis is that there's something wrong with the contents of /boot, which causes the problem you see. We should see that in the ls output.

0 Kudos
Highlighted
Beginner
6 Views

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

Aha, got it this time

boot > ls mmc 0:7

0 ldlinux.c32

0 ldlinux.sys

0 syslinux.cfg

0 vmlinuz

4 file(s), 0 dir(s)

boot >

0 Kudos
Highlighted
Honored Contributor II
6 Views

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

Hmm, that's interesting-looks like if everything is okay there, though I would check what those zeros mean (I'm not at the computer to check uboot's man) .

I would also compare the partition table with the known good board.

Right now I'm out of ideas. You can simply reflash the board using flashall script with --recovery option (search the forum for instructions). I'll try to look into this further when I have some time, unfortunately it's been harder to find it than ever lately.

0 Kudos
Highlighted
New Contributor III
6 Views

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

Hi AlexT_Intel,

I have the latest image ww05, I tried to follow your istruction but I can go after step 6. because in the /boot there is not a bzImage-3.10.17-poky-edison+ file

If I perform the other steps but the update of bcm4334x fails, networking die and I need to reflash the Edison (see below):

root@proto0:~# opkg install --force-reinstall kernel-module-bcm4334x

Removing package kernel-module-bcm4334x from root...

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 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.

root@proto0:~# modprobe -r bcm4334x

modprobe: FATAL: Module bcm4334x not found.

root@proto0:~# modprobe bcm4334x

modprobe: FATAL: Module bcm4334x not found.

Can you please help me?

Thanks

-massimo

0 Kudos