android cross compile 과정중..

88youiju의 이미지

ovs를 안드로이드용으로 컴파일을 하기 위해서 현재 작업중인데..
잘 안되고 있어서 문의 드립니다.

일단 arm64용 컴파일을 만들기 위해서

./android-ndk-r14b/build/tools/make_standalone_toolchain.py --arch arm64 --install-dir ~/arm

를 줘서 arm64용 컴파일을 만들었고

ovs폴더로 가서

./configure CC=/home/ppp/arm/bin/aarch64-linux-android-gcc CXX=/home/ppp/arm/bin/aarch64-linux-android-g++ CPPFLAGS=-I/home/ppp/arm/include LDFLAGS="-Wl,-rpath-link=/home/ppp/arm/lib -L/home/ppp/arm/lib" --prefix=/home/ppp/crs_out --host=aarch64

를 하고
make
make install을 했습니다. 결과물로 여러 파일과 폴더가 나오는데

bin폴더에 elf파일이 있어서 이 파일을 android에 system/bin 폴더에 넣어서 실행을 하니까

Not executable: 64 bit ELF file 에러가 발생하는데

정확한 지식이 없어서 다른 오픈소스 크로스 컴파일을 보고 따라 해보고 있긴한데
이렇게 하는게 맞는지

맞아도 configure 옵션이 잘못된건지 아니면 더 과정이 남아 있는건지 궁금합니다.

ndk build도 남아 있긴 하던데.....

익명 사용자의 이미지

오류 메시지가 정확히 저게 맞나요? 그리고 어떤 안드로이드 장치에서 실행시켰고 그 장치 CPU가 arm64가 맞나요?

88youiju의 이미지

오류 메세지는 맞습니다.

기종은 nexus 6p cpu가 arm64라고 xda 포럼에서 확인했었습니다.

bushi의 이미지

x86_64 로 컴파일 됐을 것 같습니다. (입력하신 커맨드를 보나 실패없이 깔끔하게 컴파일이 됐다는 결과로 보나...)
file 명령으로 파일을 종류를 쉽게 (대부분) 알아 볼 수 있습니다.
elf 파일이 확실하다면 readelf -h 명령으로 자세한 정보를 볼 수 있습니다.

환경 변수를 바꾸는 설정은 실행파일의 앞에 써 줍니다.
CC=xxx ./configure --blah-blah 같은 식으로요.

크로스 컴파일은... 보통은 의존성이 걸린 다른 라이브러리들을 가져다 먼저 컴파일해서 설치해놓아야 하는 번거로움이 있습니다.
여기에 더해서... android 는 glibc 가 아니므로 뭔가를 컴파일 한다는 것 자체가 쉽지 않을 수도 있습니다.
(ndk 가 어떻게 구성되어 있는지는 모르겠지만) ./configure 스크립트가 잘 구동 될지도 의문이고, 설령 잘 구동됐다해도 그 결과가 올바를 것인지도 의문입니다.

88youiju의 이미지

늦어서 죄송합니다.

일단 말씀해주신대로 file 명령을 통해서 파일을 확인해보았습니다.

ovs-vsctl: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=9e65536ad3a31084cb7be2449bd714544dc2b89d, not stripped

이렇게 나오더라구요. 말씀하신대로 x86_64로 컴파일이 된거 같습니다.

configure 옵션을 바꿔봤는데

./configure CXX=/home/ppp/crs_out/aarch64-tool/bin/aarch64-linux-android-g++ CPPFLAGS=-I/home/ppp/crs_out/aarch64-tool/include LDFLAGS="-Wl,-rpath-link=/home/ppp/crs_out/aarch64-tool/lib -L/home/ppp/crs_out/aarch64-tool/lib" --prefix=/home/ppp/crs_out --host=aarch64-linux-android --target=x86_64-linux-android

여전히 파일 정보는 본래의 모습과 같더라구요. 해보니까 제가 아직 제대로 알지 못하고 막무가내로 하고있는거 같은데 어렵네요.

안드로이드에서 제공하는 툴체인을 통해서 컴파일러를 만들어서 그걸로 크로스 컴파일을 시도하고 있는거 같긴한데 커맨드 부분에서 원하는 amd64용으로 컴파일을 시키려면 어디 부분을 확인 해봐야 할까요 ?

bushi의 이미지

위 댓글에 빈 줄로 띄워서 세가지 조언을 드렸습니다.
각각은 앞으로 님께서 해야 할, 혹은 맞닥드릴 상황에 대한 조언을 시간 순서로 적은 것이었습니다.
이제 겨우 첫번째 단락 수행하신 다음에 다시 질문을 하셨는데, 이번 질문에 대한 조언은 이전 댓글의 두번째 단락입니다.

88youiju의 이미지

를 올리자면 어렵네요.

일단

export LDFLAGS="-L/home/ppp/crs_out/aarch64-tool/aarch64-linux-android/lib"
export CPPFLAGS="-I/home/ppp/crs_out/aarch64-tool/include"
export CC="/home/ppp/crs_out/aarch64-tool/bin/aarch64-linux-android-gcc "

이후

./configure \
--prefix=/home/ppp/crs_out/out \
KARCH=arm64 \
--build=x86_64-pc-linux-gnu \
--host=aarch64-linux-android \
--with-sysroot=/home/ppp/android-ndk-r14b/platforms/android-24/arch-arm64 \
-with-linux=/home/ppp/msm

를 해 주었습니다. 안드로이드용 커널을 연결을 해줘야하는게 있더라구요. 그러고 나니 이런 에러가 발생합니다.
아무래도 aarch64 즉 arm64로 되어야하는데 x86_64로 진행이 되는거 같더라구요.

make[4]: 디렉터리 '/home/ppp/msm' 들어감
CC [M] /home/ppp/ovs/openvswitch-2.5.4/datapath/linux/actions.o
In file included from /home/ppp/msm/arch/x86/include/asm/segment.h:148:0,
from /home/ppp/msm/arch/x86/include/asm/ptrace.h:4,
from /home/ppp/msm/arch/x86/include/asm/vm86.h:5,
from /home/ppp/msm/arch/x86/include/asm/processor.h:10,
from /home/ppp/msm/arch/x86/include/asm/thread_info.h:22,
from include/linux/thread_info.h:54,
from include/linux/preempt.h:9,
from include/linux/spinlock.h:50,
from include/linux/mm_types.h:8,
from include/linux/kmemcheck.h:4,
from include/linux/skbuff.h:18,
from /home/ppp/ovs/openvswitch-2.5.4/datapath/linux/compat/include/linux/skbuff.h:17,
from /home/ppp/ovs/openvswitch-2.5.4/datapath/linux/actions.c:21:
/home/ppp/msm/arch/x86/include/asm/cache.h:7:25: error: ‘CONFIG_X86_L1_CACHE_SHIFT’ undeclared here (not in a function)
#define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)
^
/home/ppp/msm/arch/x86/include/asm/cache.h:8:30: note: in expansion of macro ‘L1_CACHE_SHIFT’
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
^
include/linux/cache.h:12:25: note: in expansion of macro ‘L1_CACHE_BYTES’
#define SMP_CACHE_BYTES L1_CACHE_BYTES
^
/home/ppp/msm/arch/x86/include/asm/processor.h:131:30: note: in expansion of macro ‘SMP_CACHE_BYTES’
} __attribute__((__aligned__(SMP_CACHE_BYTES)));
^
In file included from include/linux/list.h:7:0,
from /home/ppp/ovs/openvswitch-2.5.4/datapath/linux/compat/include/linux/list.h:4,
from include/linux/mm_types.h:7,
from include/linux/kmemcheck.h:4,
from include/linux/skbuff.h:18,
from /home/ppp/ovs/openvswitch-2.5.4/datapath/linux/compat/include/linux/skbuff.h:17,
from /home/ppp/ovs/openvswitch-2.5.4/datapath/linux/actions.c:21:
/home/ppp/msm/arch/x86/include/asm/processor.h: In function ‘load_cr3’:
/home/ppp/msm/arch/x86/include/asm/page_32_types.h:16:28: error: ‘CONFIG_PAGE_OFFSETUL’ undeclared (first use in this function)
#define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
^
/home/ppp/msm/include/uapi/linux/const.h:19:20: note: in definition of macro ‘__AC’
#define __AC(X,Y) (X##Y)
^
/home/ppp/msm/arch/x86/include/asm/page_32_types.h:16:24: note: in expansion of macro ‘_AC’
#define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
^
/home/ppp/msm/arch/x86/include/asm/page_types.h:30:38: note: in expansion of macro ‘__PAGE_OFFSET’
#define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
^
/home/ppp/msm/arch/x86/include/asm/page_32.h:12:39: note: in expansion of macro ‘PAGE_OFFSET’
#define __phys_addr_nodebug(x) ((x) - PAGE_OFFSET)
^
/home/ppp/msm/arch/x86/include/asm/page_32.h:16:25: note: in expansion of macro ‘__phys_addr_nodebug’
#define __phys_addr(x) __phys_addr_nodebug(x)
^
/home/ppp/msm/arch/x86/include/asm/page.h:40:18: note: in expansion of macro ‘__phys_addr’
#define __pa(x) __phys_addr((unsigned long)(x))
^
/home/ppp/msm/arch/x86/include/asm/processor.h:203:12: note: in expansion of macro ‘__pa’
write_cr3(__pa(pgdir));
^
/home/ppp/msm/arch/x86/include/asm/page_32_types.h:16:28: note: each undeclared identifier is reported only once for each function it appears in
#define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
^
/home/ppp/msm/include/uapi/linux/const.h:19:20: note: in definition of macro ‘__AC’
#define __AC(X,Y) (X##Y)
^
/home/ppp/msm/arch/x86/include/asm/page_32_types.h:16:24: note: in expansion of macro ‘_AC’
#define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
^
/home/ppp/msm/arch/x86/include/asm/page_types.h:30:38: note: in expansion of macro ‘__PAGE_OFFSET’
#define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
^
/home/ppp/msm/arch/x86/include/asm/page_32.h:12:39: note: in expansion of macro ‘PAGE_OFFSET’
#define __phys_addr_nodebug(x) ((x) - PAGE_OFFSET)
^
/home/ppp/msm/arch/x86/include/asm/page_32.h:16:25: note: in expansion of macro ‘__phys_addr_nodebug’
#define __phys_addr(x) __phys_addr_nodebug(x)
^
/home/ppp/msm/arch/x86/include/asm/page.h:40:18: note: in expansion of macro ‘__phys_addr’
#define __pa(x) __phys_addr((unsigned long)(x))
^
/home/ppp/msm/arch/x86/include/asm/processor.h:203:12: note: in expansion of macro ‘__pa’
write_cr3(__pa(pgdir));
^
In file included from /home/ppp/msm/arch/x86/include/asm/segment.h:148:0,
from /home/ppp/msm/arch/x86/include/asm/ptrace.h:4,
from /home/ppp/msm/arch/x86/include/asm/vm86.h:5,
from /home/ppp/msm/arch/x86/include/asm/processor.h:10,
from /home/ppp/msm/arch/x86/include/asm/thread_info.h:22,
from include/linux/thread_info.h:54,
from include/linux/preempt.h:9,
from include/linux/spinlock.h:50,
from include/linux/mm_types.h:8,
from include/linux/kmemcheck.h:4,
from include/linux/skbuff.h:18,
from /home/ppp/ovs/openvswitch-2.5.4/datapath/linux/compat/include/linux/skbuff.h:17,
from /home/ppp/ovs/openvswitch-2.5.4/datapath/linux/actions.c:21:
include/linux/mmzone.h: At top level:
/home/ppp/msm/arch/x86/include/asm/cache.h:12:31: error: ‘CONFIG_X86_INTERNODE_CACHE_SHIFT’ undeclared here (not in a function)
#define INTERNODE_CACHE_SHIFT CONFIG_X86_INTERNODE_CACHE_SHIFT
^
include/linux/cache.h:57:35: note: in expansion of macro ‘INTERNODE_CACHE_SHIFT’
__attribute__((__aligned__(1 << (INTERNODE_CACHE_SHIFT))))
^
include/linux/mmzone.h:109:3: note: in expansion of macro ‘____cacheline_internodealigned_in_smp’
} ____cacheline_internodealigned_in_smp;
^
In file included from include/linux/list.h:7:0,
from /home/ppp/ovs/openvswitch-2.5.4/datapath/linux/compat/include/linux/list.h:4,
from include/linux/mm_types.h:7,
from include/linux/kmemcheck.h:4,
from include/linux/skbuff.h:18,
from /home/ppp/ovs/openvswitch-2.5.4/datapath/linux/compat/include/linux/skbuff.h:17,
from /home/ppp/ovs/openvswitch-2.5.4/datapath/linux/actions.c:21:
/home/ppp/msm/arch/x86/include/asm/pgtable.h: In function ‘pmd_page_vaddr’:
/home/ppp/msm/arch/x86/include/asm/page_32_types.h:16:28: error: ‘CONFIG_PAGE_OFFSETUL’ undeclared (first use in this function)
#define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
^
/home/ppp/msm/include/uapi/linux/const.h:19:20: note: in definition of macro ‘__AC’
#define __AC(X,Y) (X##Y)
^
/home/ppp/msm/arch/x86/include/asm/page_32_types.h:16:24: note: in expansion of macro ‘_AC’
#define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
^
/home/ppp/msm/arch/x86/include/asm/page_types.h:30:38: note: in expansion of macro ‘__PAGE_OFFSET’
#define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
^
/home/ppp/msm/arch/x86/include/asm/page.h:54:48: note: in expansion of macro ‘PAGE_OFFSET’
#define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET))
^
/home/ppp/msm/arch/x86/include/asm/pgtable.h:456:24: note: in expansion of macro ‘__va’
return (unsigned long)__va(pmd_val(pmd) & PTE_PFN_MASK);
^
/home/ppp/msm/arch/x86/include/asm/pgtable.h: In function ‘pud_page_vaddr’:
/home/ppp/msm/arch/x86/include/asm/page_32_types.h:16:28: error: ‘CONFIG_PAGE_OFFSETUL’ undeclared (first use in this function)
#define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
^
/home/ppp/msm/include/uapi/linux/const.h:19:20: note: in definition of macro ‘__AC’
#define __AC(X,Y) (X##Y)
^
/home/ppp/msm/arch/x86/include/asm/page_32_types.h:16:24: note: in expansion of macro ‘_AC’
#define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
^
/home/ppp/msm/arch/x86/include/asm/page_types.h:30:38: note: in expansion of macro ‘__PAGE_OFFSET’
#define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
^
/home/ppp/msm/arch/x86/include/asm/page.h:54:48: note: in expansion of macro ‘PAGE_OFFSET’
#define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET))
^
/home/ppp/msm/arch/x86/include/asm/pgtable.h:529:24: note: in expansion of macro ‘__va’
return (unsigned long)__va((unsigned long)pud_val(pud) & PTE_PFN_MASK);
^
/home/ppp/msm/arch/x86/include/asm/pgtable.h: In function ‘pgd_page_vaddr’:
/home/ppp/msm/arch/x86/include/asm/page_32_types.h:16:28: error: ‘CONFIG_PAGE_OFFSETUL’ undeclared (first use in this function)
#define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
^
/home/ppp/msm/include/uapi/linux/const.h:19:20: note: in definition of macro ‘__AC’
#define __AC(X,Y) (X##Y)
^
/home/ppp/msm/arch/x86/include/asm/page_32_types.h:16:24: note: in expansion of macro ‘_AC’
#define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
^
/home/ppp/msm/arch/x86/include/asm/page_types.h:30:38: note: in expansion of macro ‘__PAGE_OFFSET’
#define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
^
/home/ppp/msm/arch/x86/include/asm/page.h:54:48: note: in expansion of macro ‘PAGE_OFFSET’
#define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET))
^
/home/ppp/msm/arch/x86/include/asm/pgtable.h:569:24: note: in expansion of macro ‘__va’
return (unsigned long)__va((unsigned long)pgd_val(pgd) & PTE_PFN_MASK);
^
In file included from /home/ppp/msm/arch/x86/include/asm/page.h:70:0,
from /home/ppp/msm/arch/x86/include/asm/thread_info.h:11,
from include/linux/thread_info.h:54,
from include/linux/preempt.h:9,
from include/linux/spinlock.h:50,
from include/linux/mm_types.h:8,
from include/linux/kmemcheck.h:4,
from include/linux/skbuff.h:18,
from /home/ppp/ovs/openvswitch-2.5.4/datapath/linux/compat/include/linux/skbuff.h:17,
from /home/ppp/ovs/openvswitch-2.5.4/datapath/linux/actions.c:21:
include/linux/mm.h: In function ‘virt_to_head_page’:
/home/ppp/msm/arch/x86/include/asm/page_32_types.h:16:28: error: ‘CONFIG_PAGE_OFFSETUL’ undeclared (first use in this function)
#define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
^
include/asm-generic/memory_model.h:51:40: note: in definition of macro ‘__pfn_to_page’
#define __pfn_to_page(pfn) (vmemmap + (pfn))
^
/home/ppp/msm/include/uapi/linux/const.h:20:18: note: in expansion of macro ‘__AC’
#define _AC(X,Y) __AC(X,Y)
^
/home/ppp/msm/arch/x86/include/asm/page_32_types.h:16:24: note: in expansion of macro ‘_AC’
#define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
^
/home/ppp/msm/arch/x86/include/asm/page_types.h:30:38: note: in expansion of macro ‘__PAGE_OFFSET’
#define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
^
/home/ppp/msm/arch/x86/include/asm/page_32.h:12:39: note: in expansion of macro ‘PAGE_OFFSET’
#define __phys_addr_nodebug(x) ((x) - PAGE_OFFSET)
^
/home/ppp/msm/arch/x86/include/asm/page_32.h:16:25: note: in expansion of macro ‘__phys_addr_nodebug’
#define __phys_addr(x) __phys_addr_nodebug(x)
^
/home/ppp/msm/arch/x86/include/asm/page.h:40:18: note: in expansion of macro ‘__phys_addr’
#define __pa(x) __phys_addr((unsigned long)(x))
^
/home/ppp/msm/arch/x86/include/asm/page.h:63:41: note: in expansion of macro ‘__pa’
#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
^
include/linux/mm.h:437:22: note: in expansion of macro ‘virt_to_page’
struct page *page = virt_to_page(x);
^
In file included from include/linux/list.h:7:0,
from /home/ppp/ovs/openvswitch-2.5.4/datapath/linux/compat/include/linux/list.h:4,
from include/linux/mm_types.h:7,
from include/linux/kmemcheck.h:4,
from include/linux/skbuff.h:18,
from /home/ppp/ovs/openvswitch-2.5.4/datapath/linux/compat/include/linux/skbuff.h:17,
from /home/ppp/ovs/openvswitch-2.5.4/datapath/linux/actions.c:21:
include/linux/mm.h: In function ‘lowmem_page_address’:
/home/ppp/msm/arch/x86/include/asm/page_32_types.h:16:28: error: ‘CONFIG_PAGE_OFFSETUL’ undeclared (first use in this function)
#define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
^
/home/ppp/msm/include/uapi/linux/const.h:19:20: note: in definition of macro ‘__AC’
#define __AC(X,Y) (X##Y)
^
/home/ppp/msm/arch/x86/include/asm/page_32_types.h:16:24: note: in expansion of macro ‘_AC’
#define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
^
/home/ppp/msm/arch/x86/include/asm/page_types.h:30:38: note: in expansion of macro ‘__PAGE_OFFSET’
#define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
^
/home/ppp/msm/arch/x86/include/asm/page.h:54:48: note: in expansion of macro ‘PAGE_OFFSET’
#define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET))
^
include/linux/mm.h:781:9: note: in expansion of macro ‘__va’
return __va(PFN_PHYS(page_to_pfn(page)));
^
/home/ppp/msm/arch/x86/include/asm/io.h: In function ‘virt_to_phys’:
/home/ppp/msm/arch/x86/include/asm/page_32_types.h:16:28: error: ‘CONFIG_PAGE_OFFSETUL’ undeclared (first use in this function)
#define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
^
/home/ppp/msm/include/uapi/linux/const.h:19:20: note: in definition of macro ‘__AC’
#define __AC(X,Y) (X##Y)
^
/home/ppp/msm/arch/x86/include/asm/page_32_types.h:16:24: note: in expansion of macro ‘_AC’
#define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
^
/home/ppp/msm/arch/x86/include/asm/page_types.h:30:38: note: in expansion of macro ‘__PAGE_OFFSET’
#define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
^
/home/ppp/msm/arch/x86/include/asm/page_32.h:12:39: note: in expansion of macro ‘PAGE_OFFSET’
#define __phys_addr_nodebug(x) ((x) - PAGE_OFFSET)
^
/home/ppp/msm/arch/x86/include/asm/page_32.h:16:25: note: in expansion of macro ‘__phys_addr_nodebug’
#define __phys_addr(x) __phys_addr_nodebug(x)
^
/home/ppp/msm/arch/x86/include/asm/page.h:40:18: note: in expansion of macro ‘__phys_addr’
#define __pa(x) __phys_addr((unsigned long)(x))
^
/home/ppp/msm/arch/x86/include/asm/io.h:123:9: note: in expansion of macro ‘__pa’
return __pa(address);
^
/home/ppp/msm/arch/x86/include/asm/io.h: In function ‘phys_to_virt’:
/home/ppp/msm/arch/x86/include/asm/page_32_types.h:16:28: error: ‘CONFIG_PAGE_OFFSETUL’ undeclared (first use in this function)
#define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
^
/home/ppp/msm/include/uapi/linux/const.h:19:20: note: in definition of macro ‘__AC’
#define __AC(X,Y) (X##Y)
^
/home/ppp/msm/arch/x86/include/asm/page_32_types.h:16:24: note: in expansion of macro ‘_AC’
#define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
^
/home/ppp/msm/arch/x86/include/asm/page_types.h:30:38: note: in expansion of macro ‘__PAGE_OFFSET’
#define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
^
/home/ppp/msm/arch/x86/include/asm/page.h:54:48: note: in expansion of macro ‘PAGE_OFFSET’
#define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET))
^
/home/ppp/msm/arch/x86/include/asm/io.h:141:9: note: in expansion of macro ‘__va’
return __va(address);
^
In file included from /home/ppp/msm/arch/x86/include/asm/page.h:70:0,
from /home/ppp/msm/arch/x86/include/asm/thread_info.h:11,
from include/linux/thread_info.h:54,
from include/linux/preempt.h:9,
from include/linux/spinlock.h:50,
from include/linux/mm_types.h:8,
from include/linux/kmemcheck.h:4,
from include/linux/skbuff.h:18,
from /home/ppp/ovs/openvswitch-2.5.4/datapath/linux/compat/include/linux/skbuff.h:17,
from /home/ppp/ovs/openvswitch-2.5.4/datapath/linux/actions.c:21:
include/linux/scatterlist.h: In function ‘sg_set_buf’:
/home/ppp/msm/arch/x86/include/asm/page_32_types.h:16:28: error: ‘CONFIG_PAGE_OFFSETUL’ undeclared (first use in this function)
#define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
^
include/asm-generic/memory_model.h:51:40: note: in definition of macro ‘__pfn_to_page’
#define __pfn_to_page(pfn) (vmemmap + (pfn))
^
/home/ppp/msm/include/uapi/linux/const.h:20:18: note: in expansion of macro ‘__AC’
#define _AC(X,Y) __AC(X,Y)
^
/home/ppp/msm/arch/x86/include/asm/page_32_types.h:16:24: note: in expansion of macro ‘_AC’
#define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
^
/home/ppp/msm/arch/x86/include/asm/page_types.h:30:38: note: in expansion of macro ‘__PAGE_OFFSET’
#define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
^
/home/ppp/msm/arch/x86/include/asm/page_32.h:12:39: note: in expansion of macro ‘PAGE_OFFSET’
#define __phys_addr_nodebug(x) ((x) - PAGE_OFFSET)
^
/home/ppp/msm/arch/x86/include/asm/page_32.h:16:25: note: in expansion of macro ‘__phys_addr_nodebug’
#define __phys_addr(x) __phys_addr_nodebug(x)
^
/home/ppp/msm/arch/x86/include/asm/page.h:40:18: note: in expansion of macro ‘__phys_addr’
#define __pa(x) __phys_addr((unsigned long)(x))
^
/home/ppp/msm/arch/x86/include/asm/page.h:63:41: note: in expansion of macro ‘__pa’
#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
^
include/linux/scatterlist.h:117:18: note: in expansion of macro ‘virt_to_page’
sg_set_page(sg, virt_to_page(buf), buflen, offset_in_page(buf));
^
include/asm-generic/dma-mapping-common.h: In function ‘dma_map_single_attrs’:
/home/ppp/msm/arch/x86/include/asm/page_32_types.h:16:28: error: ‘CONFIG_PAGE_OFFSETUL’ undeclared (first use in this function)
#define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
^
include/asm-generic/memory_model.h:51:40: note: in definition of macro ‘__pfn_to_page’
#define __pfn_to_page(pfn) (vmemmap + (pfn))
^
/home/ppp/msm/include/uapi/linux/const.h:20:18: note: in expansion of macro ‘__AC’
#define _AC(X,Y) __AC(X,Y)
^
/home/ppp/msm/arch/x86/include/asm/page_32_types.h:16:24: note: in expansion of macro ‘_AC’
#define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
^
/home/ppp/msm/arch/x86/include/asm/page_types.h:30:38: note: in expansion of macro ‘__PAGE_OFFSET’
#define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
^
/home/ppp/msm/arch/x86/include/asm/page_32.h:12:39: note: in expansion of macro ‘PAGE_OFFSET’
#define __phys_addr_nodebug(x) ((x) - PAGE_OFFSET)
^
/home/ppp/msm/arch/x86/include/asm/page_32.h:16:25: note: in expansion of macro ‘__phys_addr_nodebug’
#define __phys_addr(x) __phys_addr_nodebug(x)
^
/home/ppp/msm/arch/x86/include/asm/page.h:40:18: note: in expansion of macro ‘__phys_addr’
#define __pa(x) __phys_addr((unsigned long)(x))
^
/home/ppp/msm/arch/x86/include/asm/page.h:63:41: note: in expansion of macro ‘__pa’
#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
^
include/asm-generic/dma-mapping-common.h:20:28: note: in expansion of macro ‘virt_to_page’
addr = ops->map_page(dev, virt_to_page(ptr),
^
In file included from include/linux/elf.h:4:0,
from include/linux/module.h:14,
from /home/ppp/ovs/openvswitch-2.5.4/datapath/linux/compat/include/linux/in.h:6,
from /home/ppp/ovs/openvswitch-2.5.4/datapath/linux/actions.c:22:
/home/ppp/msm/arch/x86/include/asm/elf.h: In function ‘elf_common_init’:
/home/ppp/msm/arch/x86/include/asm/elf.h:173:3: error: ‘struct thread_struct’ has no member named ‘fs’
t->fs = t->gs = 0;
^
In file included from include/linux/module.h:22:0,
from /home/ppp/ovs/openvswitch-2.5.4/datapath/linux/compat/include/linux/in.h:6,
from /home/ppp/ovs/openvswitch-2.5.4/datapath/linux/actions.c:22:
/home/ppp/msm/arch/x86/include/asm/module.h: At top level:
/home/ppp/msm/arch/x86/include/asm/module.h:57:2: error: #error unknown processor family
#error unknown processor family
^
In file included from /home/ppp/msm/include/uapi/linux/unistd.h:7:0,
from /home/ppp/msm/arch/x86/include/asm/seccomp_64.h:4,
from /home/ppp/msm/arch/x86/include/asm/seccomp.h:4,
from include/linux/seccomp.h:11,
from include/linux/sched.h:39,
from /home/ppp/msm/arch/x86/include/asm/compat.h:8,
from include/linux/compat.h:18,
from include/linux/ethtool.h:15,
from include/linux/netdevice.h:42,
from /home/ppp/ovs/openvswitch-2.5.4/datapath/linux/compat/include/linux/netdevice.h:4,
from include/net/inet_sock.h:24,
from include/net/ip.h:30,
from /home/ppp/ovs/openvswitch-2.5.4/datapath/linux/compat/include/net/ip.h:4,
from /home/ppp/ovs/openvswitch-2.5.4/datapath/linux/compat/include/linux/netfilter_ipv6.h:7,
from /home/ppp/ovs/openvswitch-2.5.4/datapath/linux/actions.c:25:
/home/ppp/msm/arch/x86/include/asm/unistd.h:23:29: fatal error: asm/unistd_64.h: 그런 파일이나 디렉터리가 없습니다
compilation terminated.
scripts/Makefile.build:308: '/home/ppp/ovs/openvswitch-2.5.4/datapath/linux/actions.o' 타겟에 대한 명령이 실패했습니다

그리고 크로스 컴파일전에 의존성이 걸린 라이브러리를 먼저 설치가 필요하다고 말씀하셨는데 그게 무엇인지 뭐뭐가 필요로한지는 어떻게 알수있나요 ? 제가 못찾는거 같지만 공식홈이나 그런데서 딱히 보이지가 않습니다.

bushi의 이미지

configure 스크립트가 에러 없이 종료되건 에러로 종료되건 config.log 파일을 한줄 한줄 읽으면서 눈으로 확인을 다 하시고요.
에러 없이 종료됐다면, config.h 파일을 한줄 한줄 읽으면서 눈으로 확인을 다 하시고 Makefile 들도 한줄 한줄 읽으면서 눈으로 확인을 다 하시고요.

적으신 에러는 커널 모듈을 빌드하다 발생한 것 같습니다.
커널 모듈까지도 새로 빌드해서 사용해야 할 상황이라면,
/home/ppp/msm 에 있는 커널 소스는 현재 돌아가고 있는 커널의 소스여야 하고 빌드 완료 여부는 상관없지만 최소한 config 까지는 마친 상태여야 합니다.
그리고 그 커널 소스의 Makefile 내에서 ARCH 와 CROSS_COMPILE 을 하드 코딩하지 않았다면, 환경 변수를 이용해서 지정해 주거나 make 커맨드의 파라미터로 넘겨줘야 합니다.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.