mirror of
https://github.com/ioacademy-jikim/device_driver.git
synced 2026-08-22 05:42:54 +00:00
first sample
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_CFLAGS := -fPIE
|
||||
LOCAL_LDFLAGS := -fPIE -pie
|
||||
LOCAL_MODULE := myapp
|
||||
LOCAL_SRC_FILES := myapp.c
|
||||
include $(BUILD_EXECUTABLE)
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
#include <fcntl.h>
|
||||
int main()
|
||||
{
|
||||
int fd;
|
||||
fd = open( "/dev/mydev", O_RDONLY );
|
||||
close(fd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user