FC2ブログ

[NEEK][Linux]組み込みLinuxまでの手順(1)

NiosII /f使わないとサクサク動画再生にはほど遠そうなのでちょっと一息。
最後まで上手く行くか不明だがやったことをメモ。

■手順(参考=http://nigateblog.jugem.jp/?cid=3)

 ・VMware Playerをインストール。

 ・以下からVMware用Ubuntuデータ(ubuntu-ja-8.04-vmware-i386.zip(仮想マシン本体))をゲット。
    http://www.ubuntulinux.jp/products/JA-Localized/vmware

  zipを解凍。その中の.plを(確か)実行した。(sudo perl xxxx.pl)

 ・UbuntuのTerminal上で以下実行。これが長い・・・まだ終わってないがざっと2時間以上かな。
   wget http://www.niosftp.com/pub/linux/nios2-linux-20100621.tar

 ・sha1sum nios2-linux-20100621.tar を実行。

 ・tar xf nios2-linux-20100621.tar を実行。

 ・cd nios2-linux を実行してから、./checkout を実行。

bob@ubuntu-vm:~/nios2-linux$ ./checkout
./checkout: line 6: git: コマンドが見つかりません
./checkout: line 6: git: コマンドが見つかりません
./checkout: line 6: git: コマンドが見つかりません
./checkout: line 6: git: コマンドが見つかりません
./checkout: line 6: git: コマンドが見つかりません
./checkout: line 6: git: コマンドが見つかりません
./checkout: line 6: git: コマンドが見つかりません
./checkout: line 6: git: コマンドが見つかりません
./checkout: line 6: git: コマンドが見つかりません
./checkout: line 6: git: コマンドが見つかりません




(2011/9/10追記)
以下資料page6以降を参考に続行。
http://www.akiron.com/FPGA/nios2linuxinstall.pdf

 ・sudo apt-get update

 ・「uboot-mkimageなし」の方のコマンドを実行。(uboot-mkimageありの方はエラー出たので)
   sudo apt-get install git-core git-gui make gcc ncurses-dev bison flex gawk gettext ccache
  途中で、「続行するには2x.xMB空き容量が必要になる」と言われ、Yを入力して続行。

 ・さっきのコマンドの後半が抜けてたので、再度実行
   sudo apt-get install git-core git-gui make gcc ncurses-dev bison flex gawk gettext ccache zlib1g-dev libx11-dev texinfo liblzo2-dev pax-utils corkscrew

 ・uboot-mkimageを別途入手して、インストール。

   wget http://ftp.de.debian.org/debian/pool/main/u/uboot-mkimage/uboot-mkimage_0.4.tar.gz
   tar xf uboot-mkimage_0.4.tar.gz
   cd uboot-mkimage
   make
   sudo make install

 ・「/bin/sh -> dash」をbashに変更。
   sudo \rm /bin/sh
   sudo ln -s bash /bin/sh

 ・gccとccのバージョン確認し、両方が同じである事を確認。

bob@ubuntu-vm:/bin$ gcc -v
Using built-in specs.
Target: i486-linux-gnu
コンフィグオプション: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
スレッドモデル: posix
gcc バージョン 4.2.4 (Ubuntu 4.2.4-1ubuntu4)

bob@ubuntu-vm:/bin$ cc -v
Using built-in specs.
Target: i486-linux-gnu
コンフィグオプション: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
スレッドモデル: posix
gcc バージョン 4.2.4 (Ubuntu 4.2.4-1ubuntu4)



・gccバージョン確認。

   bob@ubuntu-vm:/usr/bin$ ls -l gcc
   lrwxrwxrwx 1 root root 7 2011-09-06 23:47 gcc -> gcc-4.2

  4.2だから資料とも一致するしOKと判断。

 ・Nios2-linuxを入手、解凍。現時点で既に実行してたので、資料の通りコマンドメモだけ。
  ちなみに、既に入手しているのは「nios2-linux-20100621.tar」

   wget http://www.niosftp.com/pub/linux/nios2-linux-20090929.tar
   tar xf download/nios2-linux-20090929.tar

 ・/home/bob/nios2-linux/checkoutを実行してチェックアウト。
  途中でCドライブのディスクがフルになり、整理してから再度checkout実行すると、
  以下エラー出る。

   bob@ubuntu-vm:~/nios2-linux$ sudo ./checkout
   fatal: unable to create '.git/index.lock': File exists
   fatal: unable to create '.git/index.lock': File exists



  .git/index.lockの場所を探すため、以下でそれらしいのが2つ見つかった。

   bob@ubuntu-vm:~/nios2-linux$ pwd
   /home/bob/nios2-linux
   bob@ubuntu-vm:~/nios2-linux$ sudo find */ -name '*index.lock*'
   linux-2.6/.git/index.lock
   uClinux-dist/.git/index.lock



  ・試しに以下の1つだけ削除してから、checkout実行したら今度はエラー無く開始した。

   \rm -rf linux-2.6/.git/index.lock

   っと思ったら、やはりエラー。両方消したら、エラー消えた。
   しかし、外付けSDカードにVMware入れてるせいか、完了までに数時間かかった。
   \rm -rf uClinux-dist/.git/index.lock

  ・ブランチを確認。

   bob@ubuntu-vm:~/nios2-linux/linux-2.6$ pwd
   /home/bob/nios2-linux/linux-2.6
   bob@ubuntu-vm:~/nios2-linux/linux-2.6$ git branch -l
   * nios2mmu
    test-nios2



  ・以下実行。
    git checkout test-nios2

error: git-checkout-index: unable to create file drivers/net/wireless/Makefile (File exists)
error: git-checkout-index: unable to create file drivers/net/wireless/adm8211.c (File exists)
error: git-checkout-index: unable to create file drivers/net/wireless/adm8211.h (File exists)
error: git-checkout-index: unable to create file drivers/net/wireless/airo.c (File exists)
error: git-checkout-index: unable to create file drivers/net/wireless/airo_cs.c (File exists)
fatal: cannot create directory at drivers/net/wireless/ar9170



   sudoでやらなかった事が原因と思い、やり直すと・・・

    bob@ubuntu-vm:~/nios2-linux/linux-2.6$ sudo git checkout test-nios2
    [sudo] password for bob:

   こんなエラーが出た。

    fatal: Entry '.gitignore' not uptodate. Cannot merge.

(2011/9/11追記)

  ・ここを見て、次のように試した。
    http://ml.enneenne.com/pipermail/linuxpps/2007-May/000713.html

    sudo \rm .gitignore
    git-checkout-index .gitignore  → 再び.gitignoreが生成された。

  ・再度トライ。
    sudo git checkout test-nios2

   今度はこんなエラー。
    fatal: Entry 'CREDITS' not uptodate. Cannot merge.

   同じ手順で、CREDITSを消して、git-checkout-indexで生成すると、今度はこれ。
    fatal: Entry 'Documentation/00-INDEX' not uptodate. Cannot merge.

   その後はこれ。
    fatal: Entry 'Documentation/ABI/testing/ima_policy' not uptodate. Cannot merge.
    fatal: Entry 'Documentation/ABI/testing/procfs-diskstats' not uptodate. Cannot merge.
    fatal: Entry 'Documentation/ABI/testing/sysfs-block' not uptodate. Cannot merge.
    fatal: Entry 'Documentation/ABI/testing/sysfs-bus-pci' not uptodate. Cannot merge.
    fatal: Entry 'Documentation/ABI/testing/sysfs-bus-usb' not uptodate. Cannot merge.

   これらを同じ対策したら、次はこんなエラーが。
    fatal: Untracked working tree file 'Documentation/ABI/testing/sysfs-class-usb_host' would be overwritten by merge.

(2011/9/12追記)
  ・ここを見て、次のコマンドで試してみた。
    http://groups.google.com/group/github/browse_thread/thread/2c27ca62a50a2cd9/b397579ca58bec99?pli=1

    git clean -f Documentation/ABI/testing/sysfs-class-usb_host

   すると、エラーは消えた。上手く行ったのかな?

  ・その後は、ひたすらこのエラーを先に書いた方法で修正。
    fatal: Entry 'xxxx' not uptodate. Cannot merge.
   たまにこちらも発生。
    fatal: Untracked working tree file 'xxxx' would be overwritten by merge.

(2011/9/13追記)
  ・案の定、いつまで消しても終わらないので、以下コマンドで一括削除。上手くいくかな?
   (このコマンドやる前に、sudo git clean -fで試してる。しかしこっちは、その後、git checkout test-nios2
    やると、同じエラー出たので、-dをつけて再度トライ)

bob@ubuntu-vm:~/nios2-linux/linux-2.6$ sudo git clean -d -f
Removing Documentation/i2c/chips/
Removing arch/arm/mach-imx/
Removing arch/arm/mach-s3c2442/
Removing arch/arm/mach-s3c6400/
Removing arch/arm/mach-s3c6410/
Removing arch/arm/plat-omap/include/mach/
Removing arch/arm/plat-s3c/
Removing arch/arm/plat-s3c64xx/
Removing arch/ia64/ia32/
Removing arch/mips/basler/
Removing arch/mips/include/asm/mach-excite/
Removing arch/mips/include/asm/mach-lemote/
Removing arch/mips/lemote/
Removing arch/mips/sibyte/cfe/
Removing arch/sh/boards/mach-titan/
Removing arch/sh/kernel/timers/
Removing drivers/i2c/chips/



  ・その後、sudo git checkout test-nios2をやっても、エラー無く、何やら実行中・・・
   ほったらかしにしたら、いつの間にか終わってた。エラー無く成功。

    bob@ubuntu-vm:~/nios2-linux/linux-2.6$ sudo git checkout test-nios2
    Switched to branch "test-nios2"

  ・ツールチェインビルド
    /home/bob/nios2-linux/toolchain-build
    sudo setarch i386 make gcc elf2flt gdb-host

  ・以下のエラーが。

bob@ubuntu-vm:~/nios2-linux/toolchain-build$ sudo setarch i386 make gcc elf2flt gdb-host
[sudo] password for bob:
mkdir -p /build/linux
make -C /../linux-2.6 ARCH=nios2 CC=gcc INSTALL_HDR_PATH=/build/linux headers_install
make: *** /../linux-2.6: No such file or directory. 中止.
make: *** [/build/linux/.configured] エラー 2



  ・なんだか良くわからんが、Makefile内の、カレントディレクトリ設定がおかしいと思い、「$(pwd)」でなく「.」へ修正。
   するとコンパイルが走り出した。

Makefileの編集箇所
#TOPDIR ?= $(PWD)
TOPDIR ?= .



bob@ubuntu-vm:~/nios2-linux/toolchain-build$ sudo setarch i386 make gcc elf2flt gdb-host
u-boot.mk:11: Board not defined! Using EP1S10 as default.
mkdir -p ./build/linux
make -C ./../linux-2.6 ARCH=nios2 CC=gcc INSTALL_HDR_PATH=./build/linux headers_install
make[1]: ディレクトリ `/home/bob/nios2-linux/linux-2.6' に入ります
CHK include/linux/version.h
UPD include/linux/version.h
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
HOSTCC scripts/basic/hash
HOSTCC scripts/unifdef
INSTALL build/linux/include/asm-generic/ (12 files)
INSTALL build/linux/include/drm/ (12 files)
INSTALL build/linux/include/linux/byteorder/ (2 files)
INSTALL build/linux/include/linux/can/ (3 files)
INSTALL build/linux/include/linux/dvb/ (8 files)
INSTALL build/linux/include/linux/hdlc/ (1 file)
INSTALL build/linux/include/linux/isdn/ (1 file)
INSTALL build/linux/include/linux/netfilter/ (57 files)
INSTALL build/linux/include/linux/netfilter_arp/ (2 files)
INSTALL build/linux/include/linux/netfilter_bridge/ (16 files)
INSTALL build/linux/include/linux/netfilter_ipv4/ (46 files)
INSTALL build/linux/include/linux/netfilter_ipv6/ (21 files)
INSTALL build/linux/include/linux/nfsd/ (6 files)
INSTALL build/linux/include/linux/raid/ (2 files)
INSTALL build/linux/include/linux/spi/ (1 file)
INSTALL build/linux/include/linux/sunrpc/ (1 file)
INSTALL build/linux/include/linux/tc_act/ (6 files)
INSTALL build/linux/include/linux/tc_ematch/ (4 files)
INSTALL build/linux/include/linux/usb/ (8 files)
INSTALL build/linux/include/linux/wimax/ (1 file)
INSTALL build/linux/include/linux/ (349 files)
INSTALL build/linux/include/mtd/ (6 files)
INSTALL build/linux/include/rdma/ (1 file)
INSTALL build/linux/include/sound/ (9 files)
INSTALL build/linux/include/video/ (3 files)
INSTALL build/linux/include/ (0 file)
INSTALL build/linux/include/asm/ (32 files)
make[1]: ディレクトリ `/home/bob/nios2-linux/linux-2.6' から出ます
touch ./build/linux/.configured
cp -f ./config/uClibc.config ./../uClibc/.config
make -C ./../uClibc \
PREFIX=./build/sysroot/ \
DEVEL_PREFIX=/usr/ \
RUNTIME_PREFIX=./build/sysroot/ \
KERNEL_HEADERS=./build/linux/include \
oldconfig
make[1]: ディレクトリ `/home/bob/nios2-linux/uClibc' に入ります
install -d include/bits
gcc -DCURSES_LOC="" -DLOCALE -MM *.c > .depend 2>/dev/null || :
gcc -DCURSES_LOC="" -DLOCALE -c conf.c -o conf.o
gcc -DCURSES_LOC="" -DLOCALE -c kxgettext.c -o kxgettext.o
gcc -DCURSES_LOC="" -DLOCALE -c lxdialog/checklist.c -o lxdialog/checklist.o
gcc -DCURSES_LOC="" -DLOCALE -c lxdialog/inputbox.c -o lxdialog/inputbox.o
gcc -DCURSES_LOC="" -DLOCALE -c lxdialog/menubox.c -o lxdialog/menubox.o
gcc -DCURSES_LOC="" -DLOCALE -c lxdialog/textbox.c -o lxdialog/textbox.o
gcc -DCURSES_LOC="" -DLOCALE -c lxdialog/util.c -o lxdialog/util.o
gcc -DCURSES_LOC="" -DLOCALE -c lxdialog/yesno.c -o lxdialog/yesno.o
gcc -DCURSES_LOC="" -DLOCALE -c mconf.c -o mconf.o
cat zconf.tab.c_shipped > zconf.tab.c
cat lex.zconf.c_shipped > lex.zconf.c
cat zconf.hash.c_shipped > zconf.hash.c
gcc -DCURSES_LOC="" -DLOCALE -I. -c zconf.tab.c -o zconf.tab.o
gcc -DCURSES_LOC="" -DLOCALE -lncurses conf.o zconf.tab.o -o conf
*
* uClibc Configuration
*
Target Architecture
1. alpha (TARGET_alpha)
2. arm (TARGET_arm)
3. bfin (TARGET_bfin)
4. cris (TARGET_cris)
5. e1 (BROKEN) (TARGET_e1)
6. frv (BROKEN) (TARGET_frv)
7. h8300 (BROKEN) (TARGET_h8300)
8. hppa (TARGET_hppa)
9. i386 (TARGET_i386)
10. i960 (BROKEN) (TARGET_i960)
11. ia64 (TARGET_ia64)
12. m68k (TARGET_m68k)
13. microblaze (BROKEN) (TARGET_microblaze)
14. mips (TARGET_mips)
15. nios (TARGET_nios)
> 16. nios2 (TARGET_nios2)
17. powerpc (TARGET_powerpc)
18. superh (TARGET_sh)
19. sh64 (TARGET_sh64)
20. sparc (TARGET_sparc)
21. v850 (BROKEN) (TARGET_v850)
22. vax (TARGET_vax)
23. x86_64 (TARGET_x86_64)
choice[1-23?]: 16
*
* Target Architecture Features and Options
*
Target File Format
1. FDPIC ELF (UCLIBC_FORMAT_FDPIC_ELF)
> 2. STATIC FLAT (UCLIBC_FORMAT_FLAT)
3. STATIC FLAT (sep-data) (UCLIBC_FORMAT_FLAT_SEP_DATA)
4. SHARED FLAT (UCLIBC_FORMAT_SHARED_FLAT)
choice[1-4]: 2
*
* Using Little Endian
*
*
* Target CPU lacks a memory management unit (MMU)
*
Enable floating point number support (UCLIBC_HAS_FLOATS) [Y/n/?] y
Target CPU has a floating point unit (FPU) (UCLIBC_HAS_FPU) [N/y/?] n
Enable full C99 math library support (DO_C99_MATH) [Y/n/?] y
Linux kernel header location (KERNEL_HEADERS) []
*
* General Library Settings
*
Support global constructors and destructors (UCLIBC_CTOR_DTOR) [Y/n/?] y
POSIX Threading Support (UCLIBC_HAS_THREADS) [Y/n/?] y
Build pthreads debugging support (PTHREADS_DEBUG_SUPPORT) [N/y/?] n
Use the older (stable) version of linuxthreads (LINUXTHREADS_OLD) [Y/n/?] y
Large File Support (UCLIBC_HAS_LFS) [Y/n/?] y
Malloc Implementation
> 1. malloc (MALLOC)
2. malloc-simple (MALLOC_SIMPLE)
choice[1-2?]: 1
Malloc returns live pointer for malloc(0) (MALLOC_GLIBC_COMPAT) [Y/n/?] y
Dynamic atexit() Support (UCLIBC_DYNAMIC_ATEXIT) [Y/n/?] y
Old (visible) atexit Support (COMPAT_ATEXIT) [N/y/?] n
Enable SuSv3 LEGACY functions (UCLIBC_SUSV3_LEGACY) [N/y/?] n
Enable SuSv3 LEGACY macros (UCLIBC_SUSV3_LEGACY_MACROS) [N/y/?] n
Shadow Password Support (UCLIBC_HAS_SHADOW) [Y/n/?] y
Support for program_invocation_name (UCLIBC_HAS_PROGRAM_INVOCATION_NAME) [N/y/?] n
Support for __progname (UCLIBC_HAS___PROGNAME) [Y/n/?] y
Support only Unix 98 PTYs (UNIX98PTY_ONLY) [N/y/?] n
Assume that /dev/pts is a devpts or devfs file system (ASSUME_DEVPTS) [Y/n/?] y
Support 'struct tm' timezone extension fields (UCLIBC_HAS_TM_EXTENSIONS) [Y/n/?] y
Enable caching of the last valid timezone 'TZ' string (UCLIBC_HAS_TZ_CACHING) [Y/n/?] y
Enable '/etc/TZ' file support to set a default timezone (uClibc-specific) (UCLIBC_HAS_TZ_FILE) [Y/n/?] y
Repeatedly read the '/etc/TZ' file (UCLIBC_HAS_TZ_FILE_READ_MANY) [Y/n/?] y
Path to the 'TZ' file for setting the global timezone (UCLIBC_TZ_FILE_PATH) [/etc/TZ] /etc/TZ
*
* Advanced Library Settings
*
Buffer size for getpwnam() and friends (UCLIBC_PWD_BUFFER_SIZE) [256] 256
Buffer size for getgrnam() and friends (UCLIBC_GRP_BUFFER_SIZE) [256] 256
*
* Networking Support
*
IP version 6 Support (UCLIBC_HAS_IPV6) [N/y/?] n
Remote Procedure Call (RPC) support (UCLIBC_HAS_RPC) [Y/n/?] y
Full RPC support (UCLIBC_HAS_FULL_RPC) [Y/n/?] y
Reentrant RPC support (UCLIBC_HAS_REENTRANT_RPC) [Y/n/?] y
Use netlink to query interfaces (UCLIBC_USE_NETLINK) [N/y/?] n
Support res_close() (bsd-compat) (UCLIBC_HAS_BSD_RES_CLOSE) [N/y/?] n
*
* String and Stdio Support
*
Use glibc generic string functions (UCLIBC_HAS_STRING_GENERIC_OPT) [Y/n/?] y
Use arch-specific string functions (UCLIBC_HAS_STRING_ARCH_OPT) [Y/n/?] y
Use Table Versions Of 'ctype.h' Functions. (UCLIBC_HAS_CTYPE_TABLES) [Y/n/?] y
Support Signed Characters In 'ctype.h' Functions. (UCLIBC_HAS_CTYPE_SIGNED) [Y/n/?] y
ctype argument checking
1. Do not check -- unsafe (UCLIBC_HAS_CTYPE_UNSAFE)
> 2. Detect and handle appropriately (UCLIBC_HAS_CTYPE_CHECKED)
3. Issue a diagnostic and abort() (UCLIBC_HAS_CTYPE_ENFORCED)
choice[1-3?]: 2
Wide Character Support (UCLIBC_HAS_WCHAR) [Y/n/?] y
Locale Support (UCLIBC_HAS_LOCALE) [N/y/?] n
Support hexadecimal float notation (UCLIBC_HAS_HEXADECIMAL_FLOATS) [Y/n/?] y
Support glibc's register_printf_function() (glibc-compat) (UCLIBC_HAS_GLIBC_CUSTOM_PRINTF) [Y/n/?] y
Maximum number of positional args. Either 0 or >= 9. (UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS) [9] 9
Support glibc's 'a' flag for scanf string conversions (not implemented) (UCLIBC_HAS_SCANF_GLIBC_A_FLAG) [Y/n/?] y
Stdio buffer size
1. 256 (minimum ANSI/ISO C99 value) (UCLIBC_HAS_STDIO_BUFSIZ_256)
2. 512 (UCLIBC_HAS_STDIO_BUFSIZ_512)
3. 1024 (UCLIBC_HAS_STDIO_BUFSIZ_1024)
4. 2048 (UCLIBC_HAS_STDIO_BUFSIZ_2048)
> 5. 4096 (UCLIBC_HAS_STDIO_BUFSIZ_4096)
6. 8192 (UCLIBC_HAS_STDIO_BUFSIZ_8192)
choice[1-6?]: 5
Stdio builtin buffer size (uClibc-specific)
> 1. None (UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE)
2. 4 (UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4)
3. 8 (UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8)
choice[1-3?]: 1
Attempt to shutdown stdio subsystem when abort() is called. (UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT) [N/y/?] n
Provide a macro version of getc() (UCLIBC_HAS_STDIO_GETC_MACRO) [Y/n/?] y
Provide a macro version of putc() (UCLIBC_HAS_STDIO_PUTC_MACRO) [Y/n/?] y
Support auto-r/w transition (UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION) [Y/n/?] y
Support an fopen() 'F' flag for large file mode (uClibc-specific) (UCLIBC_HAS_FOPEN_LARGEFILE_MODE) [N/y/?] n
Support an fopen() 'x' flag for exclusive mode (glibc-compat) (UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE) [Y/n/?] y
Support fmemopen(), open_memstream(), and fopencookie() (glibc-compat) (UCLIBC_HAS_GLIBC_CUSTOM_STREAMS) [Y/n/?] y
Support the '%m' specifier in printf format strings (glibc-compat) (UCLIBC_HAS_PRINTF_M_SPEC) [Y/n/?] y
Include the errno message text in the library (UCLIBC_HAS_ERRNO_MESSAGES) [Y/n/?] y
Support sys_errlist[] (obsolete-compat) (UCLIBC_HAS_SYS_ERRLIST) [N/y/?] n
Include the signum message text in the library (UCLIBC_HAS_SIGNUM_MESSAGES) [Y/n/?] y
Support sys_siglist[] (bsd-compat) (UCLIBC_HAS_SYS_SIGLIST) [N/y/?] n
Support gnu getopt (UCLIBC_HAS_GNU_GETOPT) [Y/n/?] y
Support glibc getsubopt (UCLIBC_HAS_GNU_GETSUBOPT) [Y/n/?] y
*
* Big and Tall
*
Regular Expression Support (UCLIBC_HAS_REGEX) [Y/n/?] y
Use the older (stable) regular expression code (UCLIBC_HAS_REGEX_OLD) [Y/n/?] y
fnmatch Support (UCLIBC_HAS_FNMATCH) [Y/n/?] y
Use the older (stable) fnmatch code (UCLIBC_HAS_FNMATCH_OLD) [Y/n/?] y
Support the wordexp() interface (UCLIBC_HAS_WORDEXP) [N/y/?] n
Support the ftw() and nftw() interfaces (UCLIBC_HAS_FTW) [Y/n/?] y
Support the glob() interface (UCLIBC_HAS_GLOB) [Y/n/?] y
Support gnu glob() interface (UCLIBC_HAS_GNU_GLOB) [Y/n/?] y
*
* Library Installation Options
*
uClibc runtime library directory (RUNTIME_PREFIX) [/] /
uClibc development environment directory (DEVEL_PREFIX) [/usr/] /usr/
*
* Security options
*
Include the arc4random() function (UCLIBC_HAS_ARC4RANDOM) [N/y/?] n
Support for propolice smashing stack protector (UCLIBC_HAS_SSP) [N/y/?] n
Build uClibc with noexecstack marking (UCLIBC_BUILD_NOEXECSTACK) [N/y/?] n
*
* uClibc development/debugging options
*
Cross-compiling toolchain prefix (CROSS_COMPILER_PREFIX) []
Enter any extra CFLAGS to use to build uClibc (UCLIBC_EXTRA_CFLAGS) []
Build uClibc with debugging symbols (DODEBUG) [N/y/?] n
Build pthread with debugging output (DODEBUG_PT) [N/y/?] n
Strip libraries and executables (DOSTRIP) [Y/n/?] y
Build uClibc with run-time assertion testing (DOASSERTS) [N/y/?] n
Build malloc with debugging support (UCLIBC_MALLOC_DEBUGGING) [N/y/?] n
Compiler Warnings (WARNINGS) [-Wall] -Wall
Enable extra annoying warnings (EXTRA_WARNINGS) [N/y/?] n
Compile all sources at once into an object (DOMULTI) [N/y/?] n
Manuel's hidden warnings (UCLIBC_MJN3_ONLY) [N/y/?] n
#
# configuration written to .config
#
make[1]: ディレクトリ `/home/bob/nios2-linux/uClibc' から出ます
touch ./../uClibc/.config
mkdir -p ./build/sysroot/usr/include
mkdir -p ./build/sysroot/usr/lib
mkdir -p ./build/sysroot/lib
make -C ./../uClibc \
PREFIX=./build/sysroot/ \
DEVEL_PREFIX=/usr/ \
RUNTIME_PREFIX=./build/sysroot/ \
KERNEL_HEADERS=./build/linux/include \
pregen install_headers
make[1]: ディレクトリ `/home/bob/nios2-linux/uClibc' に入ります
*
* uClibc Configuration
*
Target Architecture
1. alpha (TARGET_alpha)
2. arm (TARGET_arm)
3. bfin (TARGET_bfin)
4. cris (TARGET_cris)
5. e1 (BROKEN) (TARGET_e1)
6. frv (BROKEN) (TARGET_frv)
7. h8300 (BROKEN) (TARGET_h8300)
8. hppa (TARGET_hppa)
9. i386 (TARGET_i386)
10. i960 (BROKEN) (TARGET_i960)
11. ia64 (TARGET_ia64)
12. m68k (TARGET_m68k)
13. microblaze (BROKEN) (TARGET_microblaze)
14. mips (TARGET_mips)
15. nios (TARGET_nios)
> 16. nios2 (TARGET_nios2)
17. powerpc (TARGET_powerpc)
18. superh (TARGET_sh)
19. sh64 (TARGET_sh64)
20. sparc (TARGET_sparc)
21. v850 (BROKEN) (TARGET_v850)
22. vax (TARGET_vax)
23. x86_64 (TARGET_x86_64)
choice[1-23?]: 16
*
* Target Architecture Features and Options
*
Target File Format
1. FDPIC ELF (UCLIBC_FORMAT_FDPIC_ELF)
> 2. STATIC FLAT (UCLIBC_FORMAT_FLAT)
3. STATIC FLAT (sep-data) (UCLIBC_FORMAT_FLAT_SEP_DATA)
4. SHARED FLAT (UCLIBC_FORMAT_SHARED_FLAT)
choice[1-4]: 2
*
* Using Little Endian
*
*
* Target CPU lacks a memory management unit (MMU)
*
Enable floating point number support (UCLIBC_HAS_FLOATS) [Y/n/?] y
Target CPU has a floating point unit (FPU) (UCLIBC_HAS_FPU) [N/y/?] n
Enable full C99 math library support (DO_C99_MATH) [Y/n/?] y
Linux kernel header location (KERNEL_HEADERS) []
*
* General Library Settings
*
Support global constructors and destructors (UCLIBC_CTOR_DTOR) [Y/n/?] y
POSIX Threading Support (UCLIBC_HAS_THREADS) [Y/n/?] y
Build pthreads debugging support (PTHREADS_DEBUG_SUPPORT) [N/y/?] n
Use the older (stable) version of linuxthreads (LINUXTHREADS_OLD) [Y/n/?] y
Large File Support (UCLIBC_HAS_LFS) [Y/n/?] y
Malloc Implementation
> 1. malloc (MALLOC)
2. malloc-simple (MALLOC_SIMPLE)
choice[1-2?]: 1
Malloc returns live pointer for malloc(0) (MALLOC_GLIBC_COMPAT) [Y/n/?] y
Dynamic atexit() Support (UCLIBC_DYNAMIC_ATEXIT) [Y/n/?] y
Old (visible) atexit Support (COMPAT_ATEXIT) [N/y/?] n
Enable SuSv3 LEGACY functions (UCLIBC_SUSV3_LEGACY) [N/y/?] n
Enable SuSv3 LEGACY macros (UCLIBC_SUSV3_LEGACY_MACROS) [N/y/?] n
Shadow Password Support (UCLIBC_HAS_SHADOW) [Y/n/?] y
Support for program_invocation_name (UCLIBC_HAS_PROGRAM_INVOCATION_NAME) [N/y/?] n
Support for __progname (UCLIBC_HAS___PROGNAME) [Y/n/?] y
Support only Unix 98 PTYs (UNIX98PTY_ONLY) [N/y/?] n
Assume that /dev/pts is a devpts or devfs file system (ASSUME_DEVPTS) [Y/n/?] y
Support 'struct tm' timezone extension fields (UCLIBC_HAS_TM_EXTENSIONS) [Y/n/?] y
Enable caching of the last valid timezone 'TZ' string (UCLIBC_HAS_TZ_CACHING) [Y/n/?] y
Enable '/etc/TZ' file support to set a default timezone (uClibc-specific) (UCLIBC_HAS_TZ_FILE) [Y/n/?] y
Repeatedly read the '/etc/TZ' file (UCLIBC_HAS_TZ_FILE_READ_MANY) [Y/n/?] y
Path to the 'TZ' file for setting the global timezone (UCLIBC_TZ_FILE_PATH) [/etc/TZ] /etc/TZ
*
* Advanced Library Settings
*
Buffer size for getpwnam() and friends (UCLIBC_PWD_BUFFER_SIZE) [256] 256
Buffer size for getgrnam() and friends (UCLIBC_GRP_BUFFER_SIZE) [256] 256
*
* Networking Support
*
IP version 6 Support (UCLIBC_HAS_IPV6) [N/y/?] n
Remote Procedure Call (RPC) support (UCLIBC_HAS_RPC) [Y/n/?] y
Full RPC support (UCLIBC_HAS_FULL_RPC) [Y/n/?] y
Reentrant RPC support (UCLIBC_HAS_REENTRANT_RPC) [Y/n/?] y
Use netlink to query interfaces (UCLIBC_USE_NETLINK) [N/y/?] n
Support res_close() (bsd-compat) (UCLIBC_HAS_BSD_RES_CLOSE) [N/y/?] n
*
* String and Stdio Support
*
Use glibc generic string functions (UCLIBC_HAS_STRING_GENERIC_OPT) [Y/n/?] y
Use arch-specific string functions (UCLIBC_HAS_STRING_ARCH_OPT) [Y/n/?] y
Use Table Versions Of 'ctype.h' Functions. (UCLIBC_HAS_CTYPE_TABLES) [Y/n/?] y
Support Signed Characters In 'ctype.h' Functions. (UCLIBC_HAS_CTYPE_SIGNED) [Y/n/?] y
ctype argument checking
1. Do not check -- unsafe (UCLIBC_HAS_CTYPE_UNSAFE)
> 2. Detect and handle appropriately (UCLIBC_HAS_CTYPE_CHECKED)
3. Issue a diagnostic and abort() (UCLIBC_HAS_CTYPE_ENFORCED)
choice[1-3?]: 2
Wide Character Support (UCLIBC_HAS_WCHAR) [Y/n/?] y
Locale Support (UCLIBC_HAS_LOCALE) [N/y/?] n
Support hexadecimal float notation (UCLIBC_HAS_HEXADECIMAL_FLOATS) [Y/n/?] y
Support glibc's register_printf_function() (glibc-compat) (UCLIBC_HAS_GLIBC_CUSTOM_PRINTF) [Y/n/?] y
Maximum number of positional args. Either 0 or >= 9. (UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS) [9] 9
Support glibc's 'a' flag for scanf string conversions (not implemented) (UCLIBC_HAS_SCANF_GLIBC_A_FLAG) [Y/n/?] y
Stdio buffer size
1. 256 (minimum ANSI/ISO C99 value) (UCLIBC_HAS_STDIO_BUFSIZ_256)
2. 512 (UCLIBC_HAS_STDIO_BUFSIZ_512)
3. 1024 (UCLIBC_HAS_STDIO_BUFSIZ_1024)
4. 2048 (UCLIBC_HAS_STDIO_BUFSIZ_2048)
> 5. 4096 (UCLIBC_HAS_STDIO_BUFSIZ_4096)
6. 8192 (UCLIBC_HAS_STDIO_BUFSIZ_8192)
choice[1-6?]: 5
Stdio builtin buffer size (uClibc-specific)
> 1. None (UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE)
2. 4 (UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4)
3. 8 (UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8)
choice[1-3?]: 1
Attempt to shutdown stdio subsystem when abort() is called. (UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT) [N/y/?] n
Provide a macro version of getc() (UCLIBC_HAS_STDIO_GETC_MACRO) [Y/n/?] y
Provide a macro version of putc() (UCLIBC_HAS_STDIO_PUTC_MACRO) [Y/n/?] y
Support auto-r/w transition (UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION) [Y/n/?] y
Support an fopen() 'F' flag for large file mode (uClibc-specific) (UCLIBC_HAS_FOPEN_LARGEFILE_MODE) [N/y/?] n
Support an fopen() 'x' flag for exclusive mode (glibc-compat) (UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE) [Y/n/?] y
Support fmemopen(), open_memstream(), and fopencookie() (glibc-compat) (UCLIBC_HAS_GLIBC_CUSTOM_STREAMS) [Y/n/?] y
Support the '%m' specifier in printf format strings (glibc-compat) (UCLIBC_HAS_PRINTF_M_SPEC) [Y/n/?] y
Include the errno message text in the library (UCLIBC_HAS_ERRNO_MESSAGES) [Y/n/?] y
Support sys_errlist[] (obsolete-compat) (UCLIBC_HAS_SYS_ERRLIST) [N/y/?] n
Include the signum message text in the library (UCLIBC_HAS_SIGNUM_MESSAGES) [Y/n/?] y
Support sys_siglist[] (bsd-compat) (UCLIBC_HAS_SYS_SIGLIST) [N/y/?] n
Support gnu getopt (UCLIBC_HAS_GNU_GETOPT) [Y/n/?] y
Support glibc getsubopt (UCLIBC_HAS_GNU_GETSUBOPT) [Y/n/?] y
*
* Big and Tall
*
Regular Expression Support (UCLIBC_HAS_REGEX) [Y/n/?] y
Use the older (stable) regular expression code (UCLIBC_HAS_REGEX_OLD) [Y/n/?] y
fnmatch Support (UCLIBC_HAS_FNMATCH) [Y/n/?] y
Use the older (stable) fnmatch code (UCLIBC_HAS_FNMATCH_OLD) [Y/n/?] y
Support the wordexp() interface (UCLIBC_HAS_WORDEXP) [N/y/?] n
Support the ftw() and nftw() interfaces (UCLIBC_HAS_FTW) [Y/n/?] y
Support the glob() interface (UCLIBC_HAS_GLOB) [Y/n/?] y
Support gnu glob() interface (UCLIBC_HAS_GNU_GLOB) [Y/n/?] y
*
* Library Installation Options
*
uClibc runtime library directory (RUNTIME_PREFIX) [/] /
uClibc development environment directory (DEVEL_PREFIX) [/usr/] /usr/
*
* Security options
*
Include the arc4random() function (UCLIBC_HAS_ARC4RANDOM) [N/y/?] n
Support for propolice smashing stack protector (UCLIBC_HAS_SSP) [N/y/?] n
Build uClibc with noexecstack marking (UCLIBC_BUILD_NOEXECSTACK) [N/y/?] n
*
* uClibc development/debugging options
*
Cross-compiling toolchain prefix (CROSS_COMPILER_PREFIX) []
Enter any extra CFLAGS to use to build uClibc (UCLIBC_EXTRA_CFLAGS) []
Build uClibc with debugging symbols (DODEBUG) [N/y/?] n
Build pthread with debugging output (DODEBUG_PT) [N/y/?] n
Strip libraries and executables (DOSTRIP) [Y/n/?] y
Build uClibc with run-time assertion testing (DOASSERTS) [N/y/?] n
Build malloc with debugging support (UCLIBC_MALLOC_DEBUGGING) [N/y/?] n
Compiler Warnings (WARNINGS) [-Wall] -Wall
Enable extra annoying warnings (EXTRA_WARNINGS) [N/y/?] n
Compile all sources at once into an object (DOMULTI) [N/y/?] n
Manuel's hidden warnings (UCLIBC_MJN3_ONLY) [N/y/?] n
#
# configuration written to .config
#
./extra/scripts/conf-header.sh .config > include/bits/uClibc_config.h
:1:24: error: no include path in which to search for asm/unistd.h
:1:24: error: no include path in which to search for asm/unistd.h
install -d ./build/sysroot//usr/include
printf ".svn\n.cvsignore\nCVS\n" > tar_exclude ; \
tar -chf - -X tar_exclude include \
| tar -xf - -C ./build/sysroot//usr/
rm -f tar_exclude
printf '#ifndef _LIBC_INTERNAL_H\n#define _LIBC_INTERNAL_H 1\n#endif\n' > \
./build/sysroot//usr/include/libc-internal.h
echo '/* Dont use _syscall#() macros; use the syscall() function */' > \
./build/sysroot//usr/include/bits/syscalls.h
rm -f ./build/sysroot//usr/include/dl-osinfo.h
rm -f ./build/sysroot//usr/include/_lfs_64.h
rm -f ./build/sysroot//usr/include/bits/uClibc_uintmaxtostr.h
rm -f ./build/sysroot//usr/include/bits/kernel_sigaction.h
rm -f ./build/sysroot//usr/include/bits/kernel_stat.h
# Remove iconv header since locale support is disabled.
rm -f ./build/sysroot//usr/include/iconv.h
# Remove xlocale header since extended locale support is disabled.
rm -f ./build/sysroot//usr/include/xlocale.h
# Remove libintl header since gettext support is disabled.
rm -f ./build/sysroot//usr/include/libintl.h
# Remove wordexp header since wordexp support is disabled.
rm -f ./build/sysroot//usr/include/wordexp.h
# Remove thread_db header since thread debug support is disabled.
rm -f ./build/sysroot//usr/include/thread_db.h
chown -R `id | sed 's/^uid=\([0-9]*\).*gid=\([0-9]*\).*$/\1:\2/'` ./build/sysroot//usr/include
make[1]: ディレクトリ `/home/bob/nios2-linux/uClibc' から出ます
cp -fpLR ./build/linux/include/asm ./build/sysroot/usr/include/
cp: cannot stat `./build/linux/include/asm': No such file or directory
make: *** [build/sysroot//.configured] エラー 1

スポンサーサイト



コメントの投稿

非公開コメント

カレンダー
01 | 2020/02 | 03
- - - - - - 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
累積訪問者
現在の訪問者
現在の閲覧者数:
最新記事
最新トラックバック
最新コメント
月別アーカイブ
カテゴリ
プロフィール

bobgosso

Author:bobgosso
FPGAのブログへようこそ!

検索フォーム
RSSリンクの表示
リンク
ブロとも申請フォーム

この人とブロともになる

QRコード
QRコード