Difference between revisions of "Vim"

From ArmadeusWiki
Jump to: navigation, search
(New page: I'm trying to install vim on apf9328, then I will explain on this page the story. == Source == The source of vim can be found on the official site here [http://www.vim.org/download.php#u...)
 
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
 +
Vim is under buildroot by default : package -> Text editors -> vim
 +
 +
<strike>
 
I'm trying to install vim on apf9328, then I will explain on this page the story.
 
I'm trying to install vim on apf9328, then I will explain on this page the story.
  
Line 5: Line 9:
 
The source of vim can be found on the official site here [http://www.vim.org/download.php#unix]. I downloaded it and unpacked on my /opt/ directory.
 
The source of vim can be found on the official site here [http://www.vim.org/download.php#unix]. I downloaded it and unpacked on my /opt/ directory.
 
  tar -jxvf vim-7.2.tar.bz2
 
  tar -jxvf vim-7.2.tar.bz2
 +
 +
== Libraries ==
 +
 +
To be functional, vim need libc and ncurse. NCurse can be installed via buildroot in menu ''Package Selection for the target -> Graphic libraries and applications (graphic/text) -> ncurse''. Once compiled, simply copy libncurses.a and libncurses.so on your /usr/lib/ target rootfs directory.
 +
<source lang="bash">
 +
buildroot/project_build_arm/armadeus/root/usr/lib/libncurses.a
 +
buildroot/project_build_arm/armadeus/root/usr/lib/libncurses.so
 +
buildroot/project_build_arm/armadeus/root/usr/lib/libncurses.so.5
 +
</source>
  
 
== Compiling ==
 
== Compiling ==
  
 
The first problem is to know how cross-compile vim on x86 platform for arm platform.
 
The first problem is to know how cross-compile vim on x86 platform for arm platform.
 +
 +
Some host packets are necessary to compile it :
 +
 +
<source lang="bash">
 +
sudo apt-get install libncursesw5-dev
 +
</source>
  
 
There is a mail to explain how to do that here [http://www.mail-archive.com/vim_dev@googlegroups.com/msg00887.html], I'm reading it and I will try this.
 
There is a mail to explain how to do that here [http://www.mail-archive.com/vim_dev@googlegroups.com/msg00887.html], I'm reading it and I will try this.
 +
According to the documentation I compiled with these options :
 +
<source lang="bash">
 +
ac_cv_sizeof_int=4 \
 +
vim_cv_getcwd_broken=no \
 +
vim_cv_memmove_handles_overlap=yes \
 +
vim_cv_stat_ignores_slash=yes \
 +
vim_cv_tgetent=zero \
 +
vim_cv_terminfo=yes \
 +
vim_cv_toupper_broken=no \
 +
vim_cv_tty_group=world \
 +
./configure \
 +
        --build=i586-linux \
 +
        --host=arm-linux \
 +
        --target=arm-linux \
 +
        --with-tlib=ncurses
 +
</source>
 +
 +
Don't forget to set your arm-linux-gcc path before, personally, I set it in my ~/.bashrc
 +
 +
<source lang="bash">
 +
export PATH=$PATH:~/armadeus/buildroot/build_arm/staging_dir/usr/bin/
 +
</source>
 +
 +
And I make:
 +
make
 +
 +
 +
Once compiled, I tried to launch it via serial debug on nfs partition:
 +
<source lang="bash">
 +
# cd /mnt/host/vim72/src
 +
# ./vim
 +
E437: terminal capability "cm" required
 +
Press ENTER or type command to continue
 +
</source>
 +
 +
But it seem to has some problems on serial debug, but '''throught ssh that work''' !
 +
 +
 +
= Launch it =
 +
 +
With last version of armadeus (v3 rev940) that work well via nfs with :
 +
 +
<source lang="bash">
 +
/mnt/host/vim72/src/vim /etc/fstab
 +
</source>
 +
 +
= TODO =
 +
 +
* Try to use it throught serial debug <span style="color:green">Done</span>
 +
* reduce size in minimum
 +
* Use color
 +
* Configure the strange behaviour with serial debug
 +
* Make a buildroot package
 +
</strike>

Latest revision as of 13:32, 12 December 2008

Vim is under buildroot by default : package -> Text editors -> vim

I'm trying to install vim on apf9328, then I will explain on this page the story.

Source

The source of vim can be found on the official site here [1]. I downloaded it and unpacked on my /opt/ directory.

tar -jxvf vim-7.2.tar.bz2

Libraries

To be functional, vim need libc and ncurse. NCurse can be installed via buildroot in menu Package Selection for the target -> Graphic libraries and applications (graphic/text) -> ncurse. Once compiled, simply copy libncurses.a and libncurses.so on your /usr/lib/ target rootfs directory.

 buildroot/project_build_arm/armadeus/root/usr/lib/libncurses.a
 buildroot/project_build_arm/armadeus/root/usr/lib/libncurses.so
 buildroot/project_build_arm/armadeus/root/usr/lib/libncurses.so.5

Compiling

The first problem is to know how cross-compile vim on x86 platform for arm platform.

Some host packets are necessary to compile it :

sudo apt-get install libncursesw5-dev

There is a mail to explain how to do that here [2], I'm reading it and I will try this. According to the documentation I compiled with these options :

ac_cv_sizeof_int=4 \
vim_cv_getcwd_broken=no \
vim_cv_memmove_handles_overlap=yes \
vim_cv_stat_ignores_slash=yes \
vim_cv_tgetent=zero \
vim_cv_terminfo=yes \
vim_cv_toupper_broken=no \
vim_cv_tty_group=world \
./configure \
        --build=i586-linux \
        --host=arm-linux \
        --target=arm-linux \
        --with-tlib=ncurses

Don't forget to set your arm-linux-gcc path before, personally, I set it in my ~/.bashrc

export PATH=$PATH:~/armadeus/buildroot/build_arm/staging_dir/usr/bin/

And I make:

make


Once compiled, I tried to launch it via serial debug on nfs partition:

# cd /mnt/host/vim72/src
# ./vim
E437: terminal capability "cm" required
Press ENTER or type command to continue

But it seem to has some problems on serial debug, but throught ssh that work !


Launch it

With last version of armadeus (v3 rev940) that work well via nfs with :

/mnt/host/vim72/src/vim /etc/fstab

TODO

  • Try to use it throught serial debug Done
  • reduce size in minimum
  • Use color
  • Configure the strange behaviour with serial debug
  • Make a buildroot package