Fail to insmod Linux module into Chrome os in DEV mode

761 views
Skip to first unread message

hemin zhao

unread,
Jun 5, 2015, 1:53:45 AM6/5/15
to chromium-...@chromium.org
I use the new Pixel Chromebook, and I have set it to DEV mode. In the bash shell, I can run insmod command and the simple Hello_world module is loaded (lsmod shows it), but in dmesg, there is no output of the module. What is the problem then? How can I load my Linux driver into Chrome OS? 
BTW, the Chrome OS in Pixel is as follow:
版本 42.0.2311.153 (64-bit)
平台 6812.88.0 (Official Build) stable-channel samus
固件 Google_Samus.6300.103.0


And it seems that the shell is not a full bash shell, because some commands such as locate, apt-get and so on can not be found.

Mike Frysinger

unread,
Jun 5, 2015, 2:06:38 AM6/5/15
to liuli...@gmail.com, Chromium OS discuss
sorry, but we don't really do general kernel development support here.  if `insmod` worked and you see the module in `lsmod`, then that's about where we stop.  you might want to try a general list like lkml (see linux-kernel at http://vger.kernel.org/vger-lists.html).

as for the shell, it is bash.  what you're describing isn't the shell but tools that come with the distro.  Chromium OS isn't built using Debian, so trying to use Debian tools (like apt-get) won't work.  if you want to install some additional dev packages, see `dev_install`:
-mike

--
--
Chromium OS discuss mailing list: chromium-...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-discuss?hl=en


hemin zhao

unread,
Jun 5, 2015, 2:58:53 AM6/5/15
to chromium-...@chromium.org, liuli...@gmail.com
Mike, thanks for your rapid reply. 
I want to do some driver development for Chromebook, so is there any way to accomplish it? Should I download the Chromium OS source code and rebuild it with my Linux driver installed? Or is there any other way?

As xrandr is not supported, in the framework of Freon the concept of source output and sink output provider is included? If so is there any way to set the provider capabilities?

在 2015年6月4日星期四 UTC-7下午11:06:38,Mike Frysinger写道:

Mike Frysinger

unread,
Jun 5, 2015, 4:06:28 AM6/5/15
to liuli...@gmail.com, Chromium OS discuss
if you want to do general driver development, we generally recommend to not use Chromium OS :).  using a stock off the shelf distro (like Ubuntu) tends to be easier for people getting started because it doesn't have all the security features CrOS has enabled, and when you search Google for problems, it's more likely you'll find someone asking the same question for your distro.

i'd also recommend looking into QEMU/KVM as that allows you to boot a kernel and debug things from the command line ... no need to build/test/reboot/crash the same machine you're developing on.

wrt freon, let's keep that line of questioning in your other freon thread.
-mike

hemin zhao

unread,
Jun 5, 2015, 4:43:53 AM6/5/15
to chromium-...@chromium.org, liuli...@gmail.com
Thanks, Mike. I have developed my device driver on Ubuntu, and now I want to load the driver into Chome OS to test if my device and driver can work on Chromebook. How to load my driver into Chrome OS? 
Is it possible to disable the security features in Chrome OS? And how?

在 2015年6月5日星期五 UTC-7上午1:06:28,Mike Frysinger写道:

Mike Frysinger

unread,
Jun 5, 2015, 4:50:48 AM6/5/15
to hemin zhao, Chromium OS discuss
in the Chromium OS world, we don't really do third party kernel drivers.  you could certainly build and bundle in your own local builds, but we don't allow arbitrary drivers as the normal course of things.  that means you could manually do it on your own chromebook in dev mode, but it wouldn't be usable otherwise.

if the module shows up in `lsmod`, then you've gotten past all the security checks we have in place.  i can't explain why it works on your Ubuntu system but not your chromebook.
-mike

hemin zhao

unread,
Jun 5, 2015, 5:53:57 AM6/5/15
to chromium-...@chromium.org, liuli...@gmail.com

Do you mean that kernel driver module can work in dev mode if it is shown in 'lsmod'?
Will  'printk'  message in the module shown in 'dmesg'?

在 2015年6月5日星期五 UTC+8下午4:50:48,Mike Frysinger写道:

Mike Frysinger

unread,
Jun 5, 2015, 5:56:17 AM6/5/15
to hemin zhao, Chromium OS discuss
yes, if you see it in `lsmod`, it means it was successfully loaded.  our security checks exist at `insmod` time ... if you were going to get rejected, it would have been then, in which case the module would not show up in `lsmod`.

printk should work like normal.
-mike

hemin zhao

unread,
Jun 10, 2015, 10:18:20 PM6/10/15
to chromium-...@chromium.org, liuli...@gmail.com
Hi Mike, I tried the uvcvideo driver which was loaded in Chrome os by default. The uvcvideo.ko file is placed in /lib/modules/3.14.0/kernel/drivers/media/usb/uvc and the module can be 'rmmod' and 'insmod', and in 'dmesg' the register and unregister message of the uvcvideo driver can be seen. And UVC device is found when USB camera is connected to USB 3.0 port.

As an experiment I compiled the uvcvideo module myself and it can be loaded into Chrome OS (shown in 'lsmod'). But no message is shown in 'dmesg' and  no UVC device found when USB camera is connected to USB3.0 port.

It seems that the third-party module can not work though it can be loaded by 'insmod'. Is there any configuration about this in Chrome OS? Do you think it will work if I download the Chromium source code and rebuild it with the third party driver built-in?

在 2015年6月5日星期五 UTC+8下午5:56:17,Mike Frysinger写道:
Reply all
Reply to author
Forward
0 new messages