这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 嵌入式开发 » 软件与操作系统 » 【一点一滴学嵌入式Linux】VirtualBox and scientific

共13条 1/2 1 2 跳转至

【一点一滴学嵌入式Linux】VirtualBox and scientific linux +ubuntu

菜鸟
2013-06-09 09:57:56     打赏

我原来装的是vm virtualbox + ubuntu 12.后来下载了Redhat 5.5,到环境配置,服务器配置时,无法完全照指导做,并且我没有使用vmware,而且很多软件是支持ubuntu,所以我就卸载了重新安装ubuntu.因为不是很熟悉,上次使用ubuntu + uclinux +skyeye就没有能够完全编译成功,可能写的会有很多错误,只是记录一下我的操作顺序。

ubuntu中没有超级管理员,命令时,可以使用su,进入超级管理员模式。

进入终端使用ctr+arl+T,我现在也不知道如何从程序中进入超级终端模式。

下载完的ubuntu系统,很多软件包没有下载,一般会使用apt -get命令下载相应软件包,所以如果网络不通,想完全使用比较困难。

使用Virtualbox时,一般第一个硬盘会使用8G,此时需要两个操作,一个是与Windows的文件共享,第二个是增加另一个硬盘。在使用uclinux时,需要空间比较大。

具体操作方法,以后再详细描述。




关键词: 一点一滴     嵌入式     Linux     VirtualBox    

菜鸟
2013-06-25 22:29:57     打赏
2楼

1 First step:add the root password

add root password,use the command :sudo passwd

indicate input the password ,the password is the root password,then you can use the command "su"

2 the next step is:add the chinese input

system setting ->language support ,add Chinese simple.

apt-get install ibus-googlepinyin ,apt-get install ibus-m17n增加多种语言输入,

然后在system settings->language support 中keyboard input method 中选择ibus,然后启动电脑,则可以输入中文。

3 文件共享:virtualbox -download -guest addtions

http://download.virtualbox.org/virtualbox/

选择相应版本的guest addtions

解压缩VBoxLinuxAdditions.run ,安装 run 文件,chmod +x ./VB~.run,       ./VB~.run

mount -t vboxsf temp ./D ,temp为共享文件名,/D~为关联目录

4 c++编译环境 anjuta   apt-get install anjuta

5 安装skyeye

 方法1,apt-get install

 方法2:下载原代码编译

  configure, makelib,make ,make install,其中会有一些插件没有安装,需要根据需要安装相应插件,安装方式如下configure会提示没有g++编译器,则安装apt-get install g++,make中会发现有些函数没有定义,首先从baidu上搜索此函数是在那个插件中,然后下载相应插件,如果baidu上没有相应结果,则可能需要看configure文件等,但此步骤我没有试过,可能麻烦一定,并且baidu上一般都有解释


菜鸟
2013-06-26 22:10:44     打赏
3楼

6-30

查了一下资料,redhat为企业版,其中的开源版本,为centos与scientific linux,因为s为研究机构支持,所以选择了此操作系统,更改ubuntu为scientific linux

1,网站上下载s 6.4,安装时选择web development workstation

2.because install english version,so must install chinese input,

 system-preference-input method-use ibus可以加入所需要的输入法

3,安装guest additions,与ubuntu安装方式一致

4,因为我选择的是web develop,所以eclipse 安装的为java



增加另外硬盘


1,主要参考百度文件-virtualbox 扩展ubuntu容量空间

2,关闭系统下virtualbox增加一个硬盘

3,启动

  su    超级用户

  fdisk /dev/sdb

  m  帮助

  n 新建

  p 基本分区

  1

   default   1

   default  1024

   wq 保存退出

  mkfs -t ext4 /dev/sdb1  格式化

    cd /mnt

   ls

   mkdir userdisk
   mount /dev/sdb1 /mnt/userdisk

安装扩展硬盘主要让临时文件装在扩展硬盘中。


安装skyeye

1 cp skyeye-1.3.5_rc1.tar.bz2 /mnt/userdisk
2 tar -xvsf

3 进入相应文件夹

 ./configure

 make lib

 make

 出现错误,缺少cannot find -lltdl

yum install libltdl.so.7提示已经安装

ldconfig -p |grep ltdl

libmcrypt-2.5.8/libltdl   ./configure  –enable-ltdl-install  make make install

cannot find -liconv
安装cd libiconv-1.14
make

make install

make install_lib

/opt/skyeye/bin/skyeye
libltdl.so.3: cannot open shared object file:
cp /usr/lib/libltdl.so.7 /opt/skyeye/lib
cd /opt/skyeye/lib

ln ./libltdl.so.7 ./libltdl.so.3

cp ./skyeye /usr/bin


[root@localhost arm_hello]# skyeye -e arm_hello

start

  We need xterm
yum install xterm


菜鸟
2013-06-26 22:10:49     打赏
4楼

uclinux

1, mrproper

2 make menuconfig 选择gdb arme

3 make dep   3.x不需要

提示需要安装arm-linux-gcc

下载arm-linux-gcc,并解压缩

cp -ri ./* /usr/local

vi /etc/profile;在出现pathmunge 的语句段后添加pathmunge /usr/local/arm/4.4.3(版本号)/bin;

保存对profile的修改后,执行source /etc/profile就OK了

arm-linux-gcc -v 查看版本

no arm-linux-20070808-gcc

ln -s /usr/local/arm/4.4.3/bin/arm-linux-gcc /usr/local/arm/4.4.3/bin/arm-linux-20070808-gcc

ln -s /usr/local/arm/4.4.3/bin/arm-linux-ar /usr/local/arm/4.4.3/bin/arm-linux-20070808-ar

根据需要增加一些软链接。

libc/sysdeps/linux/arm/syscall.c:28: error: '__NR_syscall' undeclared (first use in this function


4.  3.x以上问题编译不通过

5  选择2.4编译make  dep    make

cc1: error: unrecognized command line option "-mapcs-32"
make 不通过

6  选择glibc 库 2.5,3.x进行编译

checking sysdep dirs... configure: error: The arm is not supported.

7 编译不通过,可能为arm-linux编译器问题,应该使用2007版本



2013/10/15

使用uclinux官网上的arm-linux,3.0版本可以编译通过,注意uclinux光盘与arm-linux版本需要配套使用







菜鸟
2013-06-26 22:10:55     打赏
5楼

网,络

tftp

1,yum install tftp 客户端

2 yum install tftp-server 服务器端

3.mkdir /tftpboot

4 vi  /etc/xinetd.d/tftp  不需要修改

5 tftp 127.0.0.1


 用yum安装Apache,Mysql,PHP. 
2.1安装Apache 
yum install httpd httpd-devel 
安装完成后,用/etc/init.d/httpd start 启动apache 
设为开机启动:chkconfig httpd on 

2 http://localhost/

3


1. yum -y install vsftpd (yum 自动安装);  
2. 修改vsftpd的配置:
在/etc/vsftpd/vsftpd.conf 文件,修改默认配置,包括监听地址和端口,是否打开 tcp、psav模式等等

3.启动vsftpd服务:
运行service vsftpd start即可,或者运行/etc/init.d/vsftpd start
4 yum -y install ftp







菜鸟
2013-06-26 22:11:00     打赏
6楼

2013/9/10


1 add second net card to host only for qnx test.This card can comunicate with the host,but can not visit the internet.


2 change su password

ctrl+alt+T enter the terminal

sudo passwd

3 vboxlinuxaddtion

sudo chmod a+x ./

./

4 share folders

in virtualbox ,add share folders

sudo mkdir soft

sudo mount -t vboxsf soft soft

5 add hard disk

in virtualbox ,storage add a new hard disk ,then there is a disk in /dev/sdb

sudo fdisk /dev/sdb

n add a new partition

p primary (default)

1 partition number (default)

2048 First sector (default)

67~ Last sector (default)

w werite table to disk and exit

sudo mkfst -t ext4 /dev/sdb1

6 mout

sudo mkdir /mnt/userdisk

sudo mount /dev/sdb1 /mnt/userdisk

7 install arm-linux-gcc

copy the file to the root,then tar,and modify the enervioment

you can download them from uclinux -net

PATH usr/local/bin

8 install java

download java (www.java.com)

tar

set

sudo vi /etc/profile

JAVA_HOME=/jre1.7.0_25

PATH=$JAVA_HOME/bin:$PATH CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar sourc /etc/profile

9 install qnx

install 32 bit lib

sudo apt-get install ia32-libs

sudo chmod a+x ./~

sudo ./

10 install eclipse

tar

11 install qemu

sudo apt-get install qemu-kvm

sudo apt-get install qemu-kvm-extras

12 install linaro

sudo add-apt-repository ppa:linaro-maintainers/tools(I do not know what this means)

sudo apt-get updates

sudo apt-get install linaro-image-tools

13 create image

sudo linaro-media-create --image_file beagle_sd.img --dev beagle --binary nano-n-tar-20110823-1.tar.gz --hwpack hwpack_linaro-omap3_20110823-0_armel_supported.tar.gz

(here will install some packet)

sudo qemu-system-arm -M beaglexm -m 512 -sd ./beagle_sd.img -clock unix -serial stdio 14 uclinux

sudo tar

sudo make xconfig

sudo apt-get install libgtk2.0-dev

sudo apt-get install libglade2-dev

sudo make

sudo apt-get install libncurses5-dev

sudo apt-get install genromfs

get image file form ./images

15 skyeye

./configure

make lib

make

cannot find -lltdl (sudp apt-get install libltdl-dev)

cannot find -liconv(download libiconv-1.14, sudo ./configure,sudo make,sudo make install)

Python.h (sudo apt-get install python-dev)

sudo make install

sudo make install_lib

add path to /etc/profile

skyeye

undefined symbol:pyfloat_type

reinstall python

python ./configure --enable-shared --enable-unicode

sudo make

_bsddb

_sqlite3 (sudo apt-get install libsqlite3-dev,

sudo apt-get install sqlite3)

_tkinter (sudo apt-get build-dep python-gdbm)

bsddb185

bz2 (sudo apt-get install bzip2 libbz2-dev)

dbm (sudo apt-get build-dep python-gdbm)

dl

gdbm (sudo apt-get build-dep python-gdbm)

imageop

readline (sudo apt-get install libreadline-dev)

sunaudiodev

sudo make install

16 install quartus

do not need sudo.

 


菜鸟
2013-06-26 23:35:46     打赏
7楼

2013/10/15

qemu -beaglebone仿真qnx系统

17 qemu

qemu-system-arm -kernel zImage.integrator -initrd arm_root.img

qemu-bsp:

su (first install qnx,then log with root,)

for qemu,must modify beagle.build

make

18 qnx - bsp file

make ,need ksh

sudo apt-get install ksh

I must make the project in root user.But the root user have not permission to visit the qnx bin.There are no mkifs.So must use source /etc/profile to set the enviment.

Make step is following:

su

source /etc/profile

make

then we can get the image file

19 make nand file

./mknand.sh test.img ../bsp/images/ifs-omap3530-beagle.bin

./nand_ecc test.img 0x0 0xe80000 (gcc -o nand_ecc nand_ecc.c)get nand_ecc

20 qemu

qemu-system-arm -M beagle -m 256 -mtdblock test.img -nographic

nand read 0x80100000 0x280000 0x400000;go 0x80100000

21 comm debug

beagle.build

#startup for Dsplink 2M

startup-omap3530 -L 0x87E00000,0x200000 -v -D8250.0x49020000^2.9600.48000000.16 beagle(Change the.0.part of the startup command to.9600.(decent baud rate for the debugger)

gdb_kdebug -D0 -v -K (Add the debugger to the bootstrap section, following the startup command (the-Kfor an initial breakpoint is optional)

[+keeplinked uid=0 gid=0 perms=0700] PATH=:/proc/boot:/sbin:/bin:/usr/sbin:/usr/bin LD_LIBRARY_PATH=:/proc/boot:/lib:/usr/lib:/lib/dll procnto-instr -v

(## PATH set here is the *safe* path for executables.
#PATH=:/proc/boot:/sbin:/bin:/usr/sbin:/usr/bin LD_LIBRARY_PATH=:/proc/boot:/lib:/usr/lib:/lib/dll procnto -v
PATH=:/proc/boot:/sbin:/bin:/usr/sbin:/usr/bin LD_LIBRARY_PATH=:/proc/boot:/lib:/usr/lib:/lib/dll procnto-instr -v

Add akeeplinkeddirective to theprocntoline:)


菜鸟
2013-10-15 13:41:56     打赏
8楼

2013/10/15

in /usr/ (not linux-2.6.x/usr

sudo mkdir myapp (add dir)

sudo vi demo.c

#include <stdlib.h>

#include <stdio.h>

void main(void)

{

printf("welcome uclinux");

}


sudo vi Makefile


EXEC = demo

OBJS = demo.o

all:$(EXEC)    

$(EXEC):$(OBJS)

    $(CC)$(LDFLAGS) -o $@ $(OBJS) $(LDLIBS$(LDLIBS_$@)) #must have tab for command

#please compare with other Makefile,must add lib

romfs:

    $(ROMFSINST) /bin/$(EXEC)

clean:

    rm -f $(EXEC) *.elf *.gdb *.o


cd ..

sudo vi Makefile (in user add myapp)


dir_$(CONFIG_USER_MYAPP_DEMO) +=myapp


cd ..

cd config

sudo vi config.in


mainmenu_option next_comment

comment 'My new application'

bool 'demo' CONFIG_USER_MYAPP_DEMO


comment 'My new application'

endmenu


rebuild uclinux


sudo make menuconfig (select user kernel)

select myapplication

sudo make

in romfs/bin have demo


程序可以采用skyeye仿真,或者直接在romfs/bin中运行

Makefile中,命令需要加tab按键


菜鸟
2013-10-15 15:19:21     打赏
9楼

1 appache work

2

mkdir svn

sudo svnadmin create /home/julei/svn/project

sudo svn import -m "new import" ./ file://localhost/home/julei/svn/project


sudo adduser lei

sudo addgroup subversion

sudo addgroup subversion


sudo chown -R root:subversion project

sudo chmod -R g+rws project


sudo svnadmin create /home/julei/svn/

cd conf

 

sudo vi passwd



[users]

lei = 123456

 

sudo vi svnserve.conf


[general]

anon-access = none #for log,if it is read,then show log error

auth-access = write

password-db = passwd

authz-db = quthz

realm = My First Repository

 

sudo vi authz


[goups]

subversion = lei

[project:/project]

lei = rw

* = r

[/]

lei = rw

 


sudo svnserve -d -r /home/julei/svn (must use sudo,or authorithy error.

can't open file '.../write-lock':permission denied)

2013/10/16 svn  http:


二、HTTP:// [apache]

sudo apt-get install libapache2-svn

sudo chown -R www-data:www-data /home/julei/svn/project

sudo vi /etc/apache2/mods-available/dav_svn.conf

<Location /svn>

DAV svn

SVNPath /home/julei/svn/project

AuthType Basic

AuthName "Subversion Repository"

AuthUserFile /etc/apache2/dav_svn.passwd

Require valid-user

</Location>

sudo htpasswd -c /etc/apache2/dav_svn.passwd lei

sudo /etc/init.d/apache2 restart


http://192.168.56.101/svn/ (ifconfig get the ip)

 

 

 


菜鸟
2013-10-15 15:22:58     打赏
10楼
1 mkdir gittutorcn
cd gittutorcn
git init-db
    Initialized empty Git repository in /home/julei/myprogram/gittutorcn/.git/
vi hello
git add hello
git status
sudo git commit -m "Initial"
git diff
git commit -a -m "add text"
2
git branch julei
git checkout julei
Switched to branch 'julei'
git branch
cat .git/HEAD

git show-branch
git whatchanged

git checkout master
git merge "Merger the file" HEAD julei
cat hello

gitweb
1. sudo apt-get install gitweb
sudo apt-get install apache2
mkdir gitweb
sudo ln -sf /usr/share/gitweb/* /home/julei/myprogram/gitweb

sudo vi /etc/gitweb.conf
$projectroot = "/home/julei/myprogram/gitweb"

sudo vi /etc/apache2/conf.d/gitweb <VirtualHost *:80> ServerName 192.168.56.101 #you can get the address by $ifconig ScriptAlias /gitweb/ /usr/lib/cgi-bin/ DirectoryIndex /gitweb/gitweb.cgi DocumentRoot /home/julei/clean/gitweb Drrorlog /var/log/apache2/git.pcware.cn-error.log Customlog "/var/log/apacher/git.pcware.cn-access.log" combined </VirtualHost>
sudo /etc/init.d/apache2 restart Then you can add git project file,if you have "git init-db",then you can chmod 755 ./.git/hooks/post-update

共13条 1/2 1 2 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]