New Revision: https://docs.blackfin.uclinux.org/doku.php?id=linux-kernel
:pc_ubuntu_setup
Old Revision: https://docs.blackfin.uclinux.org/doku.php?id=linux-kernel
:pc_ubuntu_setup&rev=1406001692
Edit Summary: rearrange setting up sequence for it can be easily got foll
owed up
@@ -3,41 +3,13 @@
*We use the latest ubuntu 12.04 system for the regression PCs.
- *Find a CD which have the ubuntu 12.04 iso image, and press the F12
in the beginning to enable the PC enter the CD/DVD start.
- *Set default language to English.
- *Set the user name as "test" and the password is also "test", for ex
ample.
- *Press Ctrl+Alt+t to open a terminal.
+ *Find a CD which have the ubuntu 12.04 iso image, and press the F12
in the beginning to enable the PC enter the CD/DVD start. \\ In the pro
cess of install linux system, there will be serveral configuration pages f
or you to make selection. Generally we make default choices except that we
set default language to English, and set the user name as "test" and the
password also "test". \\ After finishing the installation, start the ma
chine, we get ubuntu graphics interface started, we start a shell as our t
erminal/console from which we can start our specific setting.
- Config the PC ubuntu
*Set the root password as "blackfin":<xterm>**$ sudo passwd root**</
xterm>
- *Change hostname. Edit /etc/hostname and change to the new value.<xt
erm>**$ sudo vi /etc/hostname**</xterm>Edit /etc/hosts and change the old
127.0.1.1 line to your new hostname.<xterm>**$ sudo vi /etc/hosts**</xterm
>Now after a reboot, hostname will be the new one. To change without a reb
oot, you can run following command:<xterm>**$ sudo service hostname start*
*</xterm>
- *Add user test to dialout group for using minicom.<xterm> **$ sudo a
dduser test dialout**</xterm>
- *Use apt-get install to install the following packages. <xterm>**$ s
udo apt-get install openssh-server expect default-jdk minicom ckermit \
- git-core g++ bison flex gettext texinfo libncurses5-dev subversion m
eld \
- vim-nox rsh-client mpg123 python-setuptools python-dev netperf tftpd-h
pa \
- uuid-dev genromfs samba xz-utils intltool ethtool wakeonlan **</xterm>Pa
ckage mpg123 is for audio test. Package uuid-dev is for host-e2fsprogs. Pa
ckage genromfs is for xip test. Package intltool is for linphone test. Pac
kage wakeonlan is for ethernet wakeup test. Install vim-nox is for tool vi
mdiff. Install default-jdk is for openjdk-6-jdk.
- *How to install funkload <xterm>**$ apt-get install python-setuptool
s python-webunit python-docutils gnuplot
- $ sudo easy_install -U funkload **</xterm>
- *Minicom setup:
- *Type in command "sudo minicom -s", choose “Serial port se
tup”, set “Serial Device” to /dev/ttyS0, set Bps/Par/Bits" to 57600 8N1 and “Hardware Flow Control to No.
- *Choose “Modem and dialing” to delete useless log
(A B C D E F G H K L). Finally "Save setup as dfl".
- *Tftp server.
- * On ubuntu 12.04, it supports tftpd-hpa as the server quite well
. \\ 1. Install tftpd-hpa <xterm>**$ sudo apt-get install tftpd-hpa -y**</
xterm> 2. Default tftp server directory is /etc/default/tftpd-hpa. Need to
generate /tftpboot directory and change tftp server directory to /tftpboo
t. <xterm>**sudo vi /etc/default/tftpd-hpa**</xterm> Change TFTP_DIRECTORY
to /tftpboot.<code># /etc/default/tftpd-hpa
-
- TFTP_USERNAME="tftp"
- TFTP_DIRECTORY="/tftpboot"
- TFTP_ADDRESS="0.0.0.0:69"
- TFTP_OPTIONS="--secure"
- </code> <xterm>**$ sudo mkdir /tftpboot
- $ sudo chmod 777 /tftpboot
- $ sudo service tftpd-hpa restart**</xterm> Run "ps auxf" on host, seeing
the following line to make sure tftpd is started:<code>
- /usr/sbin/in.tftpd --listen --user tftp --address 0.0.0.0:69 --secure /
tftpboot</code> Notice: If there is /etc/xinetd.d/tftp exists, it would co
nflict with tftpd-hpa setting, so make sure only enable tftpd-hpa. \\ 3. A
fter reboot PC, if tftp server still seems not work, run following command
to restart tftp server:<xterm>**$ sudo service tftpd-hpa restart**</xterm
> You can also add file /etc/network/if-up.d/tftpd-hpa with following scri
pts to make sure tftpd-hpa is started after ethernet is up. <code>#!/bin/s
h
- service tftpd-hpa restart
- </code> Don't forget to change mode of file tftpd-hpa to 755. <xterm>**$
sudo chmod 755 tftpd-hpa**</xterm>
*Network config:
- *If eth* is not in desired order, modify file /etc/udev/rules.d/70
-persistent-net.rules.
*Don't use network-manager as it handles multiple network cards ba
dly. Disable network-manager in file /etc/rc.local by adding following scr
ipts:<code>
service network-manager stop
ifup eth0 eth1</code>
- *Set ethernet config in /etc/network/interfaces, bellow is an exam
ple. Usually we set eth0 to 10.99.29.xx subnet, and eth1 to 10.100.4.xx su
bnet. Modify file /etc/udev/rules.d/70-persistent-net.rules to ensure eth0
is on-board NIC. For Ubuntu 12.04, don't edit resolv.conf directly for dn
s setting, add dns setting here.<code>
+ *Set ethernet config in /etc/network/interfaces, bellow is an exam
ple. Usually we set eth0 to 10.99.29.xx subnet, and eth1 to 10.100.4.xx su
bnet. If eth* is not in desired order, modify file /etc/udev/rules.d/70-pe
rsistent-net.rules to ensure eth0 is on-board NIC. For Ubuntu 12.04, don't
edit resolv.conf directly for dns setting, add dns setting here.<code>
auto lo
iface lo inet loopback
iface eth0 inet static
@@ -54,19 +26,45 @@
address 10.100.4.174
netmask 255.255.255.0
broadcast 10.100.4.255
</code>
- *SSH config:
+ *install SSH server and config:
+ *<code>sudo apt-get install openssh-server</code> this command can
install ssh server and after then we can operate the host machine remotel
y.
*If log in via ssh is slow, set UseDNS to no in /etc/ssh/sshd_conf
ig may help. Then restart ssh server.<code>
sudo service ssh restart</code>
+ *Use apt-get install to install the following packages. <xterm>**$ s
udo apt-get install expect default-jdk minicom ckermit \
+ git-core g++ bison flex gettext texinfo libncurses5-dev subversion m
eld \
+ vim-nox rsh-client mpg123 python-setuptools python-dev netperf tftpd-h
pa \
+ uuid-dev genromfs samba xz-utils intltool ethtool wakeonlan **</xterm>Pa
ckage mpg123 is for audio test. Package uuid-dev is for host-e2fsprogs. Pa
ckage genromfs is for xip test. Package intltool is for linphone test. Pac
kage wakeonlan is for ethernet wakeup test. Install vim-nox is for tool vi
mdiff. Install default-jdk is for openjdk-6-jdk.
+ *How to install funkload <xterm>**$ apt-get install python-setuptool
s python-webunit python-docutils gnuplot
+ $ sudo easy_install -U funkload **</xterm>
+ *Minicom setup:
+ *Type in command "sudo minicom -s", choose “Serial port se
tup”, set “Serial Device” to /dev/ttyS0, set Bps/Par/Bits" to 57600 8N1 and “Hardware Flow Control to No.
+ *Choose “Modem and dialing” to delete useless log
(A B C D E F G H K L). Finally "Save setup as dfl".
+ * Add user test to dialout group for using minicom.<xterm> **$ sud
o adduser test dialout**</xterm>
+ *Tftp server.
+ * On ubuntu 12.04, it supports tftpd-hpa as the server quite well
. \\ 1. Install tftpd-hpa <xterm>**$ sudo apt-get install tftpd-hpa -y**</
xterm> 2. Default tftp server directory is /etc/default/tftpd-hpa. Need to
generate /tftpboot directory and change tftp server directory to /tftpboo
t. <xterm>**sudo vi /etc/default/tftpd-hpa**</xterm> Change TFTP_DIRECTORY
to /tftpboot.<code># /etc/default/tftpd-hpa
+
+ TFTP_USERNAME="tftp"
+ TFTP_DIRECTORY="/tftpboot"
+ TFTP_ADDRESS="0.0.0.0:69"
+ TFTP_OPTIONS="--secure"
+ </code> <xterm>**$ sudo mkdir /tftpboot
+ $ sudo chmod 777 /tftpboot
+ $ sudo service tftpd-hpa restart**</xterm> Run "ps auxf" on host, seeing
the following line to make sure tftpd is started:<code>
+ /usr/sbin/in.tftpd --listen --user tftp --address 0.0.0.0:69 --secure /
tftpboot</code> Notice: If there is /etc/xinetd.d/tftp exists, it would co
nflict with tftpd-hpa setting, so make sure only enable tftpd-hpa. \\ 3. A
fter reboot PC, if tftp server still seems not work, run following command
to restart tftp server:<xterm>**$ sudo service tftpd-hpa restart**</xterm
> You can also add file /etc/network/if-up.d/tftpd-hpa with following scri
pts to make sure tftpd-hpa is started after ethernet is up. <code>#!/bin/s
h
+ service tftpd-hpa restart
+ </code> Don't forget to change mode of file tftpd-hpa to 755. <xterm>**$
sudo chmod 755 tftpd-hpa**</xterm>
+
*Configure prompt
*Ubuntu has a prompt which is too long and complicated, and makes
serial test fail. So in /home/test/.bashrc I reset PS1 value(example is in
10.99.29.85): PS1='\u@\h:\W\$ '.
- *Nfs server <code>
+ *Change hostname. Edit /etc/hostname and change to the new value.<xt
erm>**$ sudo vi /etc/hostname**</xterm>Edit /etc/hosts and change the old
127.0.1.1 line to your new hostname.<xterm>**$ sudo vi /etc/hosts**</xterm
>Now after a reboot, hostname will be the new one. To change without a reb
oot, you can run following command:<xterm>**$ sudo service hostname start*
*</xterm>
+ * Nfs server <code>
sudo apt-get install nfs-kernel-server
sudo vi /etc/exports
(add) /tftpboot *(rw,sync,no_root_squash,no_subtree_check)
sudo /etc/init.d/nfs-kernel-server start or sudo service nfs-kernel-serv
er start </code>
- * samba: add configure sector in /etc/samba/smb.conf ;<code>
+ * Samba: add configure sector in /etc/samba/smb.conf ;<code>
[users]
comment = All users
browseable = yes
path = /home
@@ -86,9 +84,9 @@
*Hardware connection: connect audio card in and out to PC headphon
e and mic in front panel.
*Then run alsamixer to configure audio setting in PC.<xterm>**$ su
do alsamixer**</xterm>
*When configure playback in alsamixer, diable Front Mic and adjust
master/PCM/headphone to a proper level.
*When configure Capture in alsamixer, set Input Source to Front Mi
c and adjust Capture to a proper level.
- * Set up node
+ * Set up node machine for Jenkins
* use ssh mode to start node.
* copy usefull tar packages to /home/test/workspace/dl to shor
ten the time for first build.
* copy toolchain.
* copy reset_board to host PC.
|