2013年10月24日 星期四

Port screen to ARMv8 on ARM Foundation Model

最近在看ARMv8的kvm hypervisor source code
依照open virtual system的guide可以用Foundation model開host跟guest OS

一個大問題就是把host的窗執行kvm tool開guest後就沒有host的窗了
因為不知道怎用ssh連進host, 只能用telnet localhost來連,一次只能開一個窗

後來想到可以用screen在host中開很多的窗,其中一個用來開guest,其他的窗依然還是host

之前一直有這個問題,以前在ARMv7跑fast model時有成功ssh進去可是忘記怎麼做了
現在看ARMv8的code要看到開VM,突然又有這個需求

廢話不多說以下是build screen on ARMv8的過程
主要是參考這個網站的方式
這邊是screen的source code

我邊的時候一直遇到-lcurses not found
火大用想用ncurses取代curses,因為我一直找不到如何build curses跟source
但是就要先build ncurses for arm64,參考這個網站
build ncurses for arm64
  1. $ tar zvxf ncurses-5.9.tar.gz  
  2. $ cd ncurses-5.9/  
  3. $ ./configure CC=aarch64-linux-gnu-gcc (sudo apt-get install gcc-aarch64-linux-gnu to get if don't have) --prefix=$PWD/_install --host=arm-linux --with-shared 
  4. $ make && make install
cp ncurses-5.9/_install/lib to /usr/aarch64-linux-gnu/lib

把screen的Makefile -lcurses 換成-lncurses
然後照第一個連結做就OK囉! 我沒有加-static就是了

Related Posts:

  • Linux memory layout每一個user process看到的vitrual memory共有4G(32 bit machine) 其中通常切成3G:1G 0x00000000-0xbfffffff: user process(3GB) 0xc0000000-0xffffffff: kernel space (1GB) 而user process(3G)是每支user process不同的,甚至每支user thread也是不同    &… Read More
  • Memory zoneReference : Understaning the Linux Kernel Chap.8 Ideal computer architecture上,任意page frame都是可以被access的 但實際上的電腦架構在硬體上會有些限制住page frame被使用 Linux kernel must deal with two hardware constraints of the 80 × 86 architecture: • The D… Read More
  • About kernel structureDOS was designed for running only one dsedicated process.    => Is the perfect for some real-time, dedicated applications.UNIX, however, was designed for multi-user, multi-tasking applications.Kernel runs in… Read More
  • Booting ARM system from bootloader to linux kernel有空來讀一下 會以u-boot code當作bootloader base 開到start_kernel之前的組語部分可以參考 http://gicl.cs.drexel.edu/people/sevy/linux/ARM_Linux_boot_sequence.html… Read More
  • 紀錄一下/proc/pid/maps的使用在跑起來的一支程式,可用cat /proc/pid/maps 來看他的memory layout (似乎只看的到user space的) 以下是這段code看到的資訊: address - The starting and ending address of the region in the process's address space permissions - rwx就不用講了,p代表的是private(not shared),… Read More

0 意見:

張貼留言