먼저 ROS 설치 사이트를 방문한다.

 

http://wiki.ros.org/ROS/Installation

 

ROS/Installation - ROS Wiki

ROS Installation Options There is more than one ROS distribution supported at a time. Some are older releases with long term support, making them more stable, while others are newer with shorter support life times, but with binaries for more recent platfor

wiki.ros.org

ROS는 Kinetic Kame, Melodic Morenia 두가지 버전이 있고, Linux Mint 19.3 Tricia는 Ubuntu Bionic (18.04 LTS)기반으로 만들어 졌기 때문에 Melodic Morenia버전을 설치해야 한다.

 

http://wiki.ros.org/melodic/Installation/Ubuntu

 

melodic/Installation/Ubuntu - ROS Wiki

We are building Debian packages for several Ubuntu platforms, listed below. These packages are more efficient than source-based builds and are our preferred installation method for Ubuntu. Note that there are also packages available from Ubuntu upstream. P

wiki.ros.org

이제 여기서 설치하면 되는데 문제가 되는 부분은 바로 여기이다.

 

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

 

저기 중간에 보면 $(lsb_release -sc) 가 있는데 이건 ubuntu 과 mint에서의 결과가 다르다.

 

mint에서는 

 

tricia가 나오고 저 명령어에서 원하는 글자는 bionic이기 때문에 설치가 안된다.

(이건 PinkWink님 Blog를 보고 힌트를 얻었다.)

https://pinkwink.kr/1181

 

Linux Mint에서 ROS 설치하기

최근 ROS Kinetic 버전을 설치하기 위해, 리눅스 민트 Sylvia 버전(18.3)을 맥에서 패러럴즈로 설치했는데요. 이번에는 거기에 이어서 민트에서 ROS를 설치하려구요^^ Kinetic 설치 안내페이지로 갑니다. 그냥 이..

pinkwink.kr

 

그래서 명령어의 저 부분을 bionic 으로 바꿔주면 설치가 잘된다.

 

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu bionic main" > /etc/apt/sources.list.d/ros-latest.list'

 

그 이후는 ros 설치 Page에서 시키면 아주 잘된다.

 

 

잘된다.

106 page까지 열심히 하다가

 

번역기를 돌린듯한 내용과 잘 안되는 예제.....때문에 잠시 중단하고 다른 공부하러 간다.

$ ./format-sdcard.sh sdb
bash: ./format-sdcard.sh: /bin/bash^M: bad interpreter: 그런 파일이나 디렉터리가 없습니다

 

저런 error가 발생한다.

 

구글 검색을 해보니 윈도우에서 작성된 file이라 code line 끝마다 ^M 이 들어가 있어서 그렇다고 한다.

 

$ vi -b format-sdcard.sh

 

위 명령어로 파일을 열어보면

 

 

위처럼 끝에 ^M가 붙어있는것을 볼수 있다.

 

저 문자는 유닉스 개행문자와 도스 개행문자가 섞여 있는 경우에 나타난다고 한다.

 

해결방법은 다음 blog를 참고하였다.

 

https://securus.tistory.com/entry/binbashM-bad-interpreter-%EA%B7%B8%EB%9F%B0-%ED%8C%8C%EC%9D%BC%EC%9D%B4%EB%82%98-%EB%94%94%EB%A0%89%ED%84%B0%EB%A6%AC%EA%B0%80-%EC%97%86%EC%8A%B5%EB%8B%88%EB%8B%A4

 

[Linux] /bin/bash^M: bad interpreter: 그런 파일이나 디렉터리가 없습니다

Linux 에서 쉘스크립트를 실행했을 때 발생한 에러. 유닉스 개행문자와 도스 개행문자가 섞여 있는 경우 ^M 문자가 나타난다고 한다. 해결 방법은 ^M 이 문자들을 제거하는 것. 1. 해당 파일을 열때 옵션을 준다...

securus.tistory.com

다음 option으로 파일을 연다.

 

$ vi -b format-sdcard.sh

 

vim 명령줄에 다음 명령어를 입력한다.

 

:%s/^M//g

위의 ^M은 다음 방법으로 입력해야 한다.

 

^ : ctrl + v
M : ctrl + M

 

그리고 저장후 종료하면 끝

:wq!

102~103p 에 있는데로 하면 안된다..

 

내가 못하는건지....

 

암튼 아래 사이트에서 시키는데로 했고 성공하였다.

 

https://www.digikey.com/eewiki/display/linuxonarm/BeagleBone+Black

 

BeagleBone Black - Linux on ARM - eewiki

페이지 Home 배너의 맨 끝으로 배너의 맨 처음으로 BeagleBone Black 메타 데이터의 끝으로 건너뛰기 Robert Nelson님이 작성, 1월 08, 2020에 최종 변경 메타 데이터의 시작으로 이동 This is a page about TI's Cortex-A8 based; BeagleBone Black. Availability Boards: BeagleBone Black at Digi-Key BeagleBone Green at Digi-K

www.digikey.com

 

61page에 crosstool-NG 설치 과정은 다음과 같다.

 

$ git clone https://github.com/crosstool-ng/crosstool-ng.git
$ cd crosstool-ng
$ git checkout crosstool-ng-1.22.0
$ ./bootstrap
$ ./configure --enable-local
$ make
$ make install

 

하지만 안된다....

 

여러차례 삽질끝에 성공한 명령어는 다음과 같다

 

$ sudo apt install help2man
$ sudo apt install libtool-bin
$ git clone https://github.com/crosstool-ng/crosstool-ng.git
$ cd crosstool-ng/
$ ./bootstrap 
$ ./configure --enable-local
$ make
$ sudo make install

 

http://www.kyobobook.co.kr/product/detailViewKor.laf?ejkGb=KOR&mallGb=KOR&barcode=9791161752549&orderClick=LAG&Kc=

 

임베디드 리눅스 프로그래밍 완전정복

임베디드 리눅스를 이용해서 장치를 만들 때 고려할 하드...

www.kyobobook.co.kr

10일안에 끝낼수 있으려나...

 

암튼 시작!!

'Study(pending) > 임베디드 리눅스 프로그래밍 완전정복' 카테고리의 다른 글

잠시 중단  (0) 2020.01.14
p.106 format-sdcard.sh 실행 error  (0) 2020.01.13
p.102 U-Boot 빌드  (0) 2020.01.13
p.61 crosstool-NG 설치  (2) 2020.01.13

3일정도 공부를 하였고, 책을 끝까지 보았다.

 

임베디드 OS를 공부할때 이 책보다 좋은 책이 있을까 싶다.

nographic 옵션으로 실행된 QEMU를 종료하는 방법은 다음 링크에 나와있다.

 

https://superuser.com/questions/1087859/how-to-quit-the-qemu-monitor-when-not-using-a-gui

 

How to quit the QEMU monitor when not using a GUI?

I'm running QEMU on Linux without GUI. After running starting my custom kernel with QEMU, I can't kill and return to host by pressing Ctrl+C. Is there any way to get back to host OS?

superuser.com

 

1. QEMU가 실행된 terminal 창에서 Ctrl + A 를 누른다.

2. 손을 뗀다

3. x 를 누른다.

 

이렇게 하면 아래처럼 kill 된다.

 

 

 

 

+ Recent posts