old_ufo: (Default)
[personal profile] old_ufo
Некоторое время назад довольно много времени потратил на установку Linux и его последующую настройку на плате IGEP v2


Поскольку я Linux знаю довольно слабо (и более того, не особо горю желанием его осваивать сверх необходимого минимума - ну не интересно это мне), то изрядно потоптался по граблям. Судя по Гуглу, не я один такой (причем большинство из найденных ссылок не помогает), так что решил описать все, что делал. Чтобы не писать два раза, дальше будет на английском.

What is the goal? To get platform with Linux, OpenCV, QT and drivers to PTGrey Camera. 

00)This board has Poky Linux in internal memory but I don`t like it. That is why I decided to install Linaro distributive.

0)For the beginning I suppose that you connected board with monitor via HDMI, and keyboard/mouse via USB. And you have ethernet cable with internet also connetcted to IGEPv2.

1)Instead of HDD IGEPv2 uses microSD cards. I used good step-by-step tutorial http://labs.isee.biz/index.php/How_to_boot_from_MicroSD_Card
It is better than Linaro tutorial http://labs.isee.biz/index.php/How_to_get_the_Linaro_distribution, because
  • you will know how your board boot works;
  • you can use larger SD (8-16-32 Gb);
  • it is almost as fast as getting ready image.
2) If you have done all points from tutorial and boot, you will see flashing cursor. To show console you have to press Ctrl+Alt+F1 (for root user) or Ctrl+Alt+F2(3,4,5,6) for log-in screen via tty. I reccomend to use Ctrl+Alt+F2 (no root user). Default user name is "linaro" and no password.
No password is bad (for example if you will work via ssh) that is why you have to set one.
Type "passwd", press Enter, and then 2 times new password.

!!!)Type "sudo apt-get update" to get package lists from server.

3)type "sudo apt-get install nano" to install text-editor nano that uses no GUI, widows or mouse. That is why you can use it in console and ssh, for example. Linaro already have vim but it is too complicated for me.
To open file with nano, type in console "nano file_name". To save file, press Ctrl+O, to quit Ctrl+X.

4)If you haven`t another monitor and use one from your home computer, it is very useful to communicate with a board via ssh from your home computer. 
If you type "ssh localhost" you`ll have error message:

>ssh: connect to host localhost port 22: Connection refused
That is because Linaro-nano has ssh-client tools, but haven`t server ones. That is why type
"sudo apt-get install openssh-server"
After installation, open ssh-server-config file with command "sudo nano /etc/ssh/sshd_config"
search for this lines:

X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes

If they are commented (like #X11Forwarding yes, erase "#"). That save file and restart server with "sudo /etc/init.d/ssh restart".

5)Than, if you want to use sometimes GUI-based apps (or you want write them yourself), type 
"sudo apt-get install xorg" that will install X11 tools
After installation type "startx".
If all is OK, you`ll see black screen with command line typed by other font (or Gnome-session desktop)
You can open this screnn by pressing Ctrl+Alt+F7 or see console output by pressing Ctrl+Alt+F2.

If you see just black screen in 7-th screen and error "no protocol specified" in 2-nd screen, then open other console (Ctrl+Alt+F3), type "rm ~/.Xauthority" and then "xhost +", "xauth $DISPLAY". (Ctrl+C for exit)

Then type "xcalc". It has to be ok and you`ll see calculator window.
If you see error "Failed to initialize for relative axes", but X11 works, it is OK.

6)Type "ifconfig" to get information about your IP-adress (connection eth0, my IP was 192.168.1.4).

7)Type "sudo poweroff" for shutdown board ("sudo reboot" for restart)

8)Disconnect board monitor/mouse/keyboard (but RJ45 remains) and connect them back to your home computer. If you use Windows, start putty and connect via ssh port 22) using board IP-adress (i.e.  192.168.1.4). If all is OK, you can use board in console mode this way. 
If you use Linux, type "ssh -X linaro@192.168.1.4" (use board IP-adress instead 192.168.1.4) and type password.
If all is OK, then you can use not only command line interface, but GUI-based apps too. To test it, type "xcalc". You`ll see calculator window on your desktop. If no, in your home computer type "sudo nano /etc/ssh/ssh_config" and find lines like
"ForwardX11 yes
ForwardX11Trusted yes".
If 'no' or commented - correct.

Next time I`ll write about installing OpenCV libraries and Qt. 

upd. My friend wrote how to complile another Linux distributive there.

Date: 2012-06-14 04:19 pm (UTC)
From: [identity profile] vertolet4itsa.livejournal.com
Обожаю такие посты!
Обожаю!
Ничегошеньки не понятно было сразу, но я все-таки зашла под кат, усугубить, так сказать)))

Date: 2012-06-16 09:22 am (UTC)
From: [identity profile] grafinya-orlova.livejournal.com
Да, я тоже вдохновилась))

Date: 2012-06-14 08:43 pm (UTC)
From: [identity profile] silnaja-vorona.livejournal.com
Димка, лучше бы ты готовил!))) Или пел))) Сашенька, ну как я вас понимаю) А вот пост Дмитрия - не-а. Это при том, что 7 лет бок о бок с Информатиками)))

Date: 2012-06-16 06:35 pm (UTC)
From: [identity profile] medl.livejournal.com
Дима, исправь Linux на Linaro Linux. Или Debian/Ubuntu или что там было, так как менеджер пакетов apt-get только в Debian-семействе есть.
Я бы посоветовал вместо описания чего делаем+команда отдельно описание, а с новой строчки команда, с описанием пользователя и/или права доступа, к примеру:
linaro@названиемашины:~$

а если root:
root@названиемашины:~#

таким образом лучше написать вот так:
Shutdown board:
$ sudo poweroff

or restart it:
$ sudo reboot

под рутом:
# poweroff
# reboot

Так пишут инструкции практически ко всем *nix системам и заинтересованным людям будет проще понять чего ты делаешь.
https://wiki.archlinux.org/index.php/Disable_root_password_and_gain_su_sudo_with_no_password#Disable_root_login - так тут к примеру пишется

for log-in screen via tty - наверное, имел ввиду putty? Или а то tty есть команда, но о ней далее ни слова. Или ты как всё семейство телетайпов имеешь ввиду?

В целом, мне понравилось описание. Я все понял чего делаешь и для чего. И X11 через ssh - это круто. Я еще не пробовал)

А какая файловая система используется на sd-карточках? Чем тебя не устроил Poky? Для чего вообще будет плата? Для чего Qt используется? Она же тяжеловесна для ARM вроде бы.

Date: 2012-06-16 07:46 pm (UTC)
From: [identity profile] medl.livejournal.com
аааааа))) да, $ и # - первые ошибки начинающего линуксоида))

окошки с видеопотоком и распознанными объектами - а это наверняка OpenCV. Круто)

Да, в таком случаи мой комментарий на счет Qt полный бред) Я тут как раз решил восполнить свой пробел в знаниях *nix OS, поэтому с большим интересом прочитал)

Я только что еще раз по спецификации пробежал - на плате три процессора? DM3730, ARM Cortex A8 и C64+ DSP? Я пока вообще непредставляю, как это все добро тогда вместе работает) Главный А8?

Я во время учебы DSP так и не пощупал) Успехов, успехов и еще раз успехов!

Profile

old_ufo: (Default)
old_ufo

December 2017

S M T W T F S
     12
3456789
10111213141516
1718 1920212223
24252627282930
31      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Mar. 10th, 2026 03:21 am
Powered by Dreamwidth Studios