How to Access ALsa asoundlib In chromiumOS using Linux build Executable

16 views
Skip to first unread message

ananthith...@gmail.com

unread,
Jul 24, 2015, 7:46:16 AM7/24/15
to Native-Client-Discuss
As I wrote a simple code in C language to access ALSA asoundlib functions and using the output value i do file write operation in the form of commandlineTool and also i attached my simple project in above and i create a makefile like 
 
"CC := cc
CFLAGS := -lasound

APP_NAME := ConsoleApp

SRC := main.c tuningtool.c

all: 
$(CC) -o $(APP_NAME) $(SRC) $(CFLAGS)

clean:
rm -f $(APP_NAME)"

and i run Make command in Linux and it compiled successfully and its working in linux.Now i want to run this executable in Chromium OS like ./ConsoleApp but i cant run this executable.whether i have to change something or is it possible to access alsa through c in chromium OS.if it works in chromium OS means is it possible to run that on ChromeBook chromeOS. 
CommandlineToolVer_0.2.rar

Sam Clegg

unread,
Jul 24, 2015, 6:30:22 PM7/24/15
to native-cli...@googlegroups.com
There is no way to run linux binaries like this on normal ChromeOS
devices. ChromeOS can only run web applications (which themselves can
include native code in the form of NaCl modules). The only way to
run a linux binary like this would be to build a custom version of
ChromeOS, is that what you are trying to do?

cheers,
sam
> --
> You received this message because you are subscribed to the Google Groups
> "Native-Client-Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to native-client-di...@googlegroups.com.
> To post to this group, send email to native-cli...@googlegroups.com.
> Visit this group at http://groups.google.com/group/native-client-discuss.
> For more options, visit https://groups.google.com/d/optout.

Victor Khimenko

unread,
Jul 25, 2015, 6:37:52 AM7/25/15
to Native Client Discuss
On Sat, Jul 25, 2015 at 1:30 AM, Sam Clegg <s...@chromium.org> wrote:
There is no way to run linux binaries like this on normal ChromeOS
devices.  ChromeOS can only run web applications (which themselves can
include native code in the form of NaCl modules).   The only way to
run a linux binary like this would be to build a custom version of
ChromeOS, is that what you are trying to do?

That's not entirely true. You could run such application In dev mode:

Heck, we are doing that regularly to debug issues with NaCl. What you can't do is to use such device as regular ChromeOS device and run such stuff AT THE SAME TIME: many things detect when device is in dev mode and refuse to continue. Think netflix.

ananthith...@gmail.com

unread,
Jul 28, 2015, 3:17:31 AM7/28/15
to Native-Client-Discuss, kh...@chromium.org
you didnt tell about ALSA which i asked in question.As you said i cant access ALSA in Nacl and i want to know whether i can call ALSA api from C file and build my make file with dev mode enabled in chromeOS or I have Desktop with installed chromium OS so in that also whether i can enabled Dev mode and compile my code?

Victor Khimenko

unread,
Jul 28, 2015, 8:45:31 AM7/28/15
to ananthith...@gmail.com, Native-Client-Discuss
On Tue, Jul 28, 2015 at 10:17 AM, <ananthith...@gmail.com> wrote:
you didnt tell about ALSA which i asked in question.As you said i cant access ALSA in Nacl and i want to know whether i can call ALSA api from C file and build my make file with dev mode enabled in chromeOS or I have Desktop with installed chromium OS so in that also whether i can enabled Dev mode and compile my code?

You need to enable dev mode to turn off the image verification and run untrusted code. As for "how to build it" - there are many ways. You could use ChomeOS development system ( https://www.chromium.org/chromium-os/developer-guide ) or you could use Crouton ( https://github.com/dnschneid/crouton ) or you could use any other way to run untrusted binaries on ChromeOS.

Note that all these approaches will ONLY work in dev mode or in your custom build of ChromiumOS, you'll not be able to put such file in the Chrome Web Store and/or the open web. Not sure why would you want such a solution but in any case that thing has nothing to do with NaCl thus you'll need to ask around in the mailing lists for other projects (cros-discuss is you plan to use ChromiumOS build process).
Reply all
Reply to author
Forward
0 new messages