Visual Studio 2019 설치 Create a new project 원격 시스템 추가 컴파일 속성
[카테고리:] Linux
bladeRF & GQRX 설치 방법
user = not root (ex, ubuntu) Ubuntu 20.04 필요한 패키지 설치 ~$# sudo apt-get install libusb-1.0-0-dev libusb-1.0-0 build-essential cmake libncurses5-dev libtecla1 libtecla-dev pkg-config git ~$# sudo apt-get install w-get (no hyphen) bladeRF 설치 git clone https://github.com/Nuand/bladeRF.gitcd ./bladeRFcd host/mkdir buildcd buildcmake -DENABLE_BACKEND_LIBUSB=TRUE ../make -j$(nproc)sudo make installsudo ldconfig FPGA image 파일 다운로드 download hostedx40-latest.rbf (2021-10-04-v0.14.0)https://www.nuand.com/fpga_images/hostedx40-latest.rbf mv hostedx40-latest.rbf더 보기bladeRF & GQRX 설치 방법[…]
라즈베리파이 내장 UART 사용시 주의 사항
디폴트 환경에서는 CPU/VPU 클럭 속도의 변화(절전 등)에 따라서 UART 속도가 같이 변하므로 다음과 같이 설정을 변경해야 한다. 옵션 1. CPU/VPU 클럭 속도 고정 /boot/config.txt 편집enable_uart=1force_turbo=1 옵션 2. 블루투스 비활성화 /boot/config.txt 편집enable_uart=1dtoverlay=disable-bt 부팅 정보 UART 출력 비활성화 /boot/cmdline.txt 편집console=serial0,115200 삭제 systemd에서 hciuart 제거 (부팅시 hciuart 실행 안함) ~$# sudo systemctl disable hciuart 디바이스 포트 /dev/ttyAMA0 포트를더 보기라즈베리파이 내장 UART 사용시 주의 사항[…]
리눅스에서 fdisk로 파티션 사이즈 변경하기
Check the partition ~$# fdisk -l Unmount the partition ~$# umount /dev/sdc1 Run fdisk ~$# fdisk /dev/sdc Check the partition table using p option Edit the partition table using d -> n -> w option Run e2fsck ~$# e2fsck -f /dev/sdc1 Run resize2fs ~$# resize2fs /dev/sdc1
json-c library compile & install
~$# git clone https://github.com/json-c/json-c.git~$# mkdir json-c-build~$# cd json-c-build~$# cmake ../json-c ~$# make ~$# sudo make installjson-c installed to /usr/local
리눅스 vi 에디터에서 ^M 문자 제거 방법
리눅스와 윈도우를 오가면서 소스를 편집하다 보면 다음과 같이 vi 에디터에서 ^M이 표시되는것을 볼수 있다. 리눅스는 개행 문자가 LF = ‘\n’ = 0x0A이고, 윈도우는 CRLF = ‘\r’ + ‘\n’ = 0x0D 0x0A 인데, 파일 안에 LF와 CRLF가 섞여있으면 vi 에디터는 CRLF를 ^M으로 표시한다. :%s/^M//g (^M은 Ctrl + V + M을 입력) 명령을 수행하면 ^M 문자가 제거된다.
리눅스 시간(타임존)을 한국 표준시(KST)로 변경하기
현재 시간 확인 (현재 타임존) ~$# dateWed Oct 21 05:03:15 UTC 2020 현재 타임존 확인 ~$# ls -al /etc/localtime/etc/localtime -> /usr/share/zoneinfo/Etc/UTC 타임존을 한국 표준시(KST)로 변경 ~$# ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime 변경된 타임존 확인 ~$# ls -al /etc/localtime/etc/localtime -> /usr/share/zoneinfo/Asia/Seoul 현재 시간 확인 (변경된 타임존) ~$# dateWed Oct 21 14:03:43 KST 2020
debootstrap으로 armhf용 debian 루트파일시스템 만들기
필요한 패키지 설치 (공통) ~$# sudo apt install debootstrap~$# sudo apt install qemu-user-static Target Debian 버전 = buster (Debian 10) armhf용 debian 루트파일시스템 만들기 ~$# sudo debootstrap –arch=armhf –foreign buster rootfs_buster http://deb.debian.org/debian/~$# sudo cp /usr/bin/qemu-arm-static rootfs_buster/usr/bin/~$# sudo chroot rootfs_buster /bin/bash /debootstrap/debootstrap –second-stage~$# sudo chroot rootfs_buster /usr/bin/apt update qemu 에뮬레이터를 이용한 armhf debian으로 진입해서 시험 및더 보기debootstrap으로 armhf용 debian 루트파일시스템 만들기[…]
Ubuntu에서 Eclipse for C/C++ 설치하기
Java 설치 ~$# sudo apt install default-jre Eclipse 최신 버전 설치 ~$# sudo snap install eclipse –classic 특정 버전 설치 (예, Eclipse IDE 2019-06) Application 등록 ~$# sudo vi /usr/share/applications/eclipse.desktop [Desktop Entry] Name=Eclipse Exec=/opt/eclipse/eclipse Terminal=false Type=Application Icon=/opt/eclipse/icon.xpm Categories=Application; 추가 설치 옵션
How to Run a Linux Program on Startup (systemd based)
실행 파일 위치 /home/user/my_app service 파일 생성 & 편집 ~$# sudo vi /lib/systemd/system/my_app.service [Unit]Description=My Application After=multi-user.target [Service]ExecStart=/home/user/my_app WorkingDirectory=/home/user/ Environment=”LD_LIBRARY_PATH=/home/user/” Restart=always [Install]WantedBy=multi-user.target 자동 실행 등록 ~$# sudo systemctl enable my_app.service /etc/systemd/system/multi-user.target.wants/my_app.service 심볼릭 링크가 생성됨 ~$# sudo systemctl daemon-reload~$# sudo reboot