embeded/raspberry pi2018. 5. 18. 10:01

귀찮으니 img 받아서 그냥 까세요 수준으로 대격변 ㄷㄷ

[링크 : https://www.waveshare.com/wiki/3.5inch_RPi_LCD_(A)]


귀찮아서.. 스크립트 분석하면 될걸.. 썡으로 뒤지는중


일단 화면 갱신이 꽤나 느린데

/etc $ grep -rni "fbcp" ./

./rc.local:21:fbcp &

[링크 : https://github.com/tasanakorn/rpi-fbcp]


동영상을 보면 확실히 fbcp를 통해 복사하는거라 그런지 화면 갱신이 느리다. (cpu는 5% 미만이긴 하지만)


그래서 아래처럼 설정하고 다시 찰칵

기분인진 몰라도 확실히 좀 빨라진 기분?


$ cat /boot/config.txt

# For more options and information see

# http://www.raspberrypi.org/documentation/configuration/config-txt.md

# Some settings may impact device functionality. See link above for details


# uncomment if you get no picture on HDMI for a default "safe" mode

#hdmi_safe=1


# uncomment this if your display has a black border of unused pixels visible

# and your display can output without overscan

#disable_overscan=1


# uncomment the following to adjust overscan. Use positive numbers if console

# goes off screen, and negative if there is too much border

#overscan_left=16

#overscan_right=16

#overscan_top=16

#overscan_bottom=16


# uncomment to force a console size. By default it will be display's size minus

# overscan.

#framebuffer_width=1280

#framebuffer_height=720


# uncomment if hdmi display is not detected and composite is being output

#hdmi_force_hotplug=1


# uncomment to force a specific HDMI mode (this will force VGA)

#hdmi_group=1

#hdmi_mode=1


# uncomment to force a HDMI mode rather than DVI. This can make audio work in

# DMT (computer monitor) modes

#hdmi_drive=2


# uncomment to increase signal to HDMI, if you have interference, blanking, or

# no display

#config_hdmi_boost=4


# uncomment for composite PAL

#sdtv_mode=2


#uncomment to overclock the arm. 700 MHz is the default.

#arm_freq=800


# Uncomment some or all of these to enable the optional hardware interfaces

dtparam=i2c_arm=on

#dtparam=i2s=on

dtparam=spi=on

#enable_uart=1

# Uncomment this to enable the lirc-rpi module

#dtoverlay=lirc-rpi


# Additional overlays and parameters are documented /boot/overlays/README


# Enable audio (loads snd_bcm2835)

dtparam=audio=on

dtoverlay=waveshare35a:rotate=270

#dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=1000000,keep_vref_on=1,swapxy=1,pmax=255,xohms=60,xmin=200,xmax=3900,ymin=200,ymax=3900

#hdmi_force_hotplug=1

#max_usb_current=1

#hdmi_group=2

#hdmi_mode=1

#hdmi_mode=87

#hdmi_cvt 480 320 60 6 0 0 0

#hdmi_drive=2

#display_rotate=2 


[링크 : https://github.com/swkim01/waveshare-dtoverlays/issues/7]


$ cat /usr/share/X11/xorg.conf.d/99-fbturbo.conf

# This is a minimal sample config file, which can be copied to

# /etc/X11/xorg.conf in order to make the Xorg server pick up

# and load xf86-video-fbturbo driver installed in the system.

#

# When troubleshooting, check /var/log/Xorg.0.log for the debugging

# output and error messages.

#The driver is made by Waveshare&Spotpear

# Run "man fbturbo" to get additional information about the extra

# configuration options for tuning the driver.


Section "Device"

        Identifier      "Allwinner A10/A13 FBDEV"

        Driver          "fbturbo"

        Option          "fbdev" "/dev/fb0"


        Option          "SwapbuffersWait" "true"

EndSection



Section "Device"

        Identifier      "Waveshare 35a spi"

        Driver          "fbturbo"

        Option          "fbdev" "/dev/fb1"


        Option          "SwapbuffersWait" "true"

EndSection


Section "Monitor"

        Identifier      "primary"

EndSection


Section "Screen"

        Identifier      "primary"

        Device          "Waveshare 35a spi"

        Monitor         "rpi spi"

EndSection 


일단 mame를 깔고

$ sudo apt-get install gnome-video-arcade mame mame-tools

Reading package lists... Done

Building dependency tree

Reading state information... Done

The following additional packages will be installed:

  liblua5.3-0 libsdl2-2.0-0 libsdl2-ttf-2.0-0 mame-data

Suggested packages:

  devhelp mame-doc mame-extra

The following NEW packages will be installed:

  gnome-video-arcade liblua5.3-0 libsdl2-2.0-0 libsdl2-ttf-2.0-0 mame

  mame-data mame-tools

0 upgraded, 7 newly installed, 0 to remove and 49 not upgraded.

Need to get 45.0 MB of archives. 


gnome 어쩌구 말고

mame를 실행하니 CPU는 미쳐 날뛰고(라즈베리 2B인데 오버 해야하나..)


/dev/fb1 덤프해서 보니 RGB565 480x320으로 복원



+

HDMI로 해도 느린건 마찬가지(아니 해상도 높아져서 더 느려진 기분.. 실행이 안되고 뻗는 수준?)

0.78 구버전을 구해서 빌드 해보려니 소스를 못 받는다.. 아놔

Posted by 구차니
Posted by 구차니
Linux/Ubuntu2018. 5. 17. 22:04

부팅하고 나서 바로 업데이트 하거나 설치하려고 하면

dpkg/lock 잠금 파일을 얻을 수 없다고 배째는데

apt나 dpkg로 프로세스 검색해서 죽여도 안되는 경우가 많다.


간단한(?) 해결책으로야 해당 프로세스 죽인후 lock 파일을 삭제하고 진행하는 것인데

$ sudo apt-get update; sudo apt-get upgrade

기존:1 http://ppa.launchpad.net/saiarcot895/myppa/ubuntu xenial InRelease

기존:2 http://ports.ubuntu.com/ubuntu-ports xenial InRelease

기존:3 http://ports.ubuntu.com/ubuntu-ports xenial-updates InRelease

기존:4 http://ports.ubuntu.com/ubuntu-ports xenial-backports InRelease

기존:5 http://ports.ubuntu.com/ubuntu-ports xenial-security InRelease

패키지 목록을 읽는 중입니다... 완료

E: /var/lib/dpkg/lock 잠금 파일을 얻을 수 없습니다 - open (11: Resource temporarily unavailable)

E: 관리 디렉터리를 (/var/lib/dpkg/) 잠글 수 없습니다. 다른 프로세스가 사용하고 있지 않습니까? 


근본적으로는 그에 연관되는 apt.systemd.daily가 문제라고 보여진다.

~$ ps -ef | grep apt

root      2471     1  0 12:42 ?        00:00:00 /bin/sh /usr/lib/apt/apt.systemd.daily update

root      2475  2471  0 12:42 ?        00:00:00 /bin/sh /usr/lib/apt/apt.systemd.daily lock_is_held update

root      3743     1  0 12:45 ?        00:00:00 /bin/sh /usr/lib/apt/apt.systemd.daily install


아무튼 검색을 해보니 아래 명령을 통해서 죽여 놓을 수 있고

$ sudo systemctl stop apt-daily.timer

$ sudo systemctl disable apt-daily.timer

$ sudo systemctl mask apt-daily.service

$ sudo systemctl daemon-reload 


추가로 아래의 파일을 삭제해주면 완벽! 인가?

/usr/lib/apt/apt.systemd.daily 


그리고 저번에 찾았던 를 통해 주기적인 업데이트를 막아 둘 수 있다.

$ sudo vi /etc/apt/apt.conf.d/10periodic

APT::Periodic::Enable "0";


그 외에는  cloud-init 스크립트를 통해서 apt-daily.service가 불려지니 could-init도 같이 죽이는게 나으려나?

Systemd is all about concurrent start of services, so the cloud-init script is run at the same time the apt-daily.service is triggered. By the time cloud-init gets to execute the user-specified payload, apt-get update is already running. So the attempts 2. and 3. failed not because of some namespace magic, but because they altered the system too late for apt.systemd.daily to pick the changes up.


This also means that there is basically no way of preventing apt.systemd.daily from running -- one can only kill it after it's started. 


[링크 : https://unix.stackexchange.com/.../how-to-disable-apt-daily-service-on-ubuntu-cloud-vm-image]

'Linux > Ubuntu' 카테고리의 다른 글

tmux  (0) 2018.08.13
우분투 자동 업데이트  (0) 2018.05.21
apt-mark 사용자가 수동으로 설치한 패키지 목록  (0) 2018.05.08
powertop  (0) 2018.05.04
ubuntu auto update 끄기  (0) 2018.04.19
Posted by 구차니
하드웨어/Storage2018. 5. 17. 17:45

마킹이라고 하니 시리얼 번호 이런거 표시로 나오는데

내가 원하는 내용은 각종 로고들에 대한 의미?

아무튼...


이번에 혼동이 생긴게 UHS인데

SD 메모리 상에 아래처럼 써있으면 UHS-1 BUS를 지원하는 것이고

BUS는 UHS-1(SD spec 3.0)과 UHS-2(SD spec 4.0)가 존재한다.

Ultra High Speed, Phase I (UHS-I) bus design for SDHC and SDXC cards was added in SD spec 3.0. This is a design enhancement to increase the performance of SDHC/SDXC cards.


UHS-I specification defines two bus architecture options for up to 50MB/s (UHS-50) and 104MB/s (UHS-104) data transfer rates. These are theoretical maximum limits and actual maximum performance for a specific card is defined on it label or in advertising.

UHS is an enhancement to the original SD interface specifications. Host devices will obtain the UHS maximum speed when both the card and host device support UHS. Otherwise, the host device and card will use the slower SD maximum speed obtainable.

There is no compatibility problem using a UHS card with a non-UHS device. 


Ultra High Speed Phase II (UHS-II) bus design for SDHC and SDXC was added in SD spec 4.0. This is an additional design enhacement with connector interface modifications to increase performance.

UHS-II specification defines bus architecture for options of 156MB/s and 312MB/s. Manufacturers implemented the 312MB/s option in memory cards. These are theoretical maximum limits and actual maximum performance for a specific card is defined on the label or in advertising.

Host devices will obtain the maximum UHS-II speed when both the card and the host device support UHS-II. Otherwise, the host device and card will use the highest compatible UHS-I or SD bus speed.

There is no compatibility problem using a USH-II card in a UHS-I or non-UHS device.

[링크 : https://kb.sandisk.com/app/answers/detail/a_id/2520/kw/uhs/related/1]


다만 내가 혼동을 느낀건 이 망할 UHS Speed Class 인데

얘는 버스 규격이랑 상관이 없다(왜냐면 UHS-1이던 UHS-2던 둘다 커버 가능한 대역폭이니)

UHS Speed Class (UHS Bus)

UHS Class

Minimum Speed

1

10MB/s

 3

 30MB/s

[링크 : https://kb.sandisk.com/app/answers/detail/a_id/4968/kw/uhs/related/1]



UHS라는 말이 혼용돼 쓰이기 때문에 조금 헷갈릴 수 있습니다. UHS-I, UHS-II 등은 SD카드의 버스 규격입니다. 파일을 주고 받을 수 있는 틀이라고 보면 됩니다. 그리고 이는 다시 U1, U3 등으로 나뉩니다. 이는 ‘UHS 스피드 클래스’라고 부릅니다. U1은 초당 최소 10MB, U3는 30MB를 쓸 수 있다는 표기입니다. 클래스와 비슷하다고 보면 됩니다.


현재 나오는 제품들은 거의 UHS-I 버스를 씁니다. 그리고 플래시메모리에 따라 실제 속도는 U1과 U3 정도로 나뉜다고 보면 됩니다. 4K 영상을 찍으려면 U3 정도 속도가 필요하고, 풀HD라면 클래스10, 혹은 U1이라고 표기된 제품이면 됩니다. 

[링크 : http://www.bloter.net/archives/230516]



아래꺼 샀는데.. 

말로는 Read 90MB/s Write 60MB/s 라는데 내꺼에 써보니 14MB/s 밖에 안나온다 ㅠㅠ


Supports next-generation memory cards including SDHC UHS-I, SDXC UHS-I, micro SDHC UHS-I, micro SDXC UHS-I 

[링크 : https://www.transcend-info.com/Products/No-396]


아무튼.. UHS-1을 지원하지만 class 10 SD 메모리라면

USB 3.0 UHS 지원하는 리더를 사용하더라도

Write 속도는 14MB/s 정도 밖에 안나오는게 당연한거다.. 라는 결론인가? ㅠㅠ

(나름 Ultra 16GB 제품인데 ㅠㅠ)

Posted by 구차니
개소리 왈왈/독서2018. 5. 17. 12:49

arduipilot 을 이용하여 드론을 만들거나

상용 제품(syma x5)을 개조하는 내용에 대한 책


드론 자작을 하거나, 개조해보려는 사람에게

ardupilot에 관심 있을 사람에게는 좋은 책


PID 제어와 각종 필터에 대한 간략한 설명이 꽤 마음에 든다.


[링크 : http://www.hanbit.co.kr/store/books/look.php?p_code=B3835033636]

Posted by 구차니
프로그램 사용/MAME2018. 5. 16. 08:16

음.. 일단 설정파일은 찾았는데

저 숫자가 GPIO 기준인가?


$ sudo nano /etc/modprobe.d/mk_arcade_joystick_rpi.conf

options mk_arcade_joystick_rpi map=5 gpio=2,3,4,17,9,10,22,27,11,24,23,25 

[링크 : http://www.toad.es/setup/]

[링크 : https://retropie.org.uk/docs/RetroArch-Configuration/]

[링크 : https://retropie.org.uk/docs/First-Installation/]

[링크 : http://www.rasplay.org/?p=23760]

'프로그램 사용 > MAME' 카테고리의 다른 글

ubunutu mame  (0) 2018.05.18
retropie pstree 그리고 fbcp  (0) 2018.05.18
retropie spi lcd  (0) 2018.05.16
relcabox / retropie 블루투스 연결  (0) 2018.03.07
MAME 조이스틱 설정  (0) 2018.03.03
Posted by 구차니
개소리 왈왈/독서2018. 5. 16. 08:05

출근길에 잠시 훑어본 책

학부 2년생이면 충분할 초심자용 책을 목표로 만들었다고 한다.

수식도 코드도 별로 없기에 이론서로서는 좋으나, 이걸 보고 무언가를 따라 만들기에는 부족한 내용

그래도 목표로 삼은 학부 2년생 이상이라면 적절할 것으로 보인다.


[링크 : http://www.kyobobook.co.kr/product/detailViewKor.laf?barcode=9791185890944]


+

걍 예전부터 생각해오던 거 끄적끄적


지능, 기억

무언가 잊었을때 문맥이나 역방향 추적을 통해 잊은걸 복원해 내는게 사람에게는 당연한 일이다.

명사 동사 db에 각각 단방향 데이터가 서로를 있고 유사함을 검색하여 카테고리로 분류 하는 기능이라도 있는 걸까?

아무튼 이러한 양방향 데이터에 의해서 잊었다고 하더라도, 반대로 무엇을 하려고 했더라? 하면서

문맥을 통해 손실된 데이터를 복원할 수 있는 능력이 사람에게는 존재한다.


단순화

모든 데이터를 처리하지 않고 데이터의 양을 줄이기 위해 랜덤이나 우선순위 데이터베이스를 통해

필요한 데이터만을 추려낸다. 길을 건널때 모든차를 보는게 아니라 횡단보도 방향의 차들만 추려내고

그중에 나와 충돌 코스인 차들만 주의 깊게 보고 피하면 끝~


기호화

영상이 아닌 내부 로직을 위한 기호화. 추상화를 통해 데이터 축소

사람이 꿈을 이야기 하는건 언어적 한계도 있지만, 반대로 언어가 가지는 함축성과 모호함을 통해

기호화 하고 추상화 함으로서 단순화를 같이 이루기도 한다.

우리가 영상을 컴퓨터에서 인식할떄는 픽셀 단위로 모든 화면을 봐야 하지만

인간의 뇌는 영상 픽셀을 보는게 아니라 사물을 본다.

그 과정이 많이 생략된 느낌이지만, 점이 아닌 사물을 봄으로서

사물의 특성 값 몇개로 시뮬레이션 하기 용이하도록 데이터가 줄어든다.



Posted by 구차니
프로그램 사용/MAME2018. 5. 16. 06:44

fbcp는 필수고

waveshare에서 제품을 사용하면 con2fbmap 를 사용하지 않아도 된다 인가?


$ sudo apt-get install cmake

$ git clone https://github.com/tasanakorn/rpi-fbcp

$ cd rpi-fbcp/

$ mkdir build

$ cd build/

$ cmake ..

$ make

$ sudo install fbcp /usr/local/bin/fbcp

[링크 : https://retropie.org.uk/forum/topic/295/retropie-and-waveshare-32b/3]

[링크 : https://sudomod.com/forum/viewtopic.php?t=2312]


con2fbmap은 con(console)을 FB로 연결해주는 것인 듯?

console 1이니까 TTY1 을 FB1에 연결하라는 건가?

$ sudo apt-get install fbset

$ con2fbmap 1 1 

# Map console 1 to framebuffer 1, login screen will show up on the display

[링크 : https://wiki.up-community.org/TFT_Display_HATs#Console_con2fbmap]


+

2018.05.18

retropie 설치하고

fbcp 설치하고 하니 나오긴 한데.. 기분인가.. 딜레이가 좀 있는 느낌

(emulation station만 보는 중)

[링크 : https://retropie.org.uk/forum/topic/4157/guide-retropie-3-5-inch-rpi-lcd-v3-0-no-brand/2]

'프로그램 사용 > MAME' 카테고리의 다른 글

retropie pstree 그리고 fbcp  (0) 2018.05.18
레트로 파이 coin select GPIO로 연결하기  (0) 2018.05.16
relcabox / retropie 블루투스 연결  (0) 2018.03.07
MAME 조이스틱 설정  (0) 2018.03.03
어트랙트 모드  (0) 2018.02.27
Posted by 구차니

음.. 살까 말까

KSP 처럼 사놓고 안할거 같긴한데..


스팀에서는 약 10$

험블번들 출근전인데 5.25$

회사가면 얼마나 오를까?

[링크 : https://www.humblebundle.com/games/hooked-on-multiplayer-2018-bundle]

5.25$로 구매해서 비시즈 획득!


케케케케케


Posted by 구차니
개소리 왈왈/컴퓨터2018. 5. 15. 19:44

노트북 LCD로 모니터 만드는거니까 한 10인치 근처일 듯한데

3T 로도 충분히 버텨준 듯

[링크 : http://rsplacekor.blogspot.kr/2015/04/with.html]


근데 집에 21.5 인치니까.. 3T로 버텨 줄수 있을까 싶기도 하고..

막상 문구점 가서 5T 짜리 보니까 자를 용기도 안날 정도로 튼튼해서

3T 정도로 타협을 볼까 보고 싶기도 하고?


대충 견적을 보니 판금 가공 개당 20만 정도 하지 않을까? 라고 하셨는데(회사 기구 담당에게 물어 보시니)

이쁘진 않아도 검은색 포맥스 3T로 타협을 보는것도 썩 나쁘지 않을듯

다만, VESA 마운트를 어떻게 결합해주지?


+

오피스 디포 같은 문구점 가서

포맥스랑 우드락을 만져보니 확실히 다르다.

우드락은 좀 딱딱한 스치로폴 느낌이라면

포맥스는 불투명한 아크릴 같은 느낌?


나중에 우드락을 살지 포맥스를 살지 둘다 살지 모르겠지만

모니터에는 포맥스를 쓰고

공기청정기에는 우드락을 쓰면 무난할듯?

'개소리 왈왈 > 컴퓨터' 카테고리의 다른 글

transcend USB3.0 SD 리더  (0) 2018.08.02
lg xnote p430 수리  (4) 2018.07.28
심심하니 네이버 메일을 까자 ㅋㅋㅋ  (2) 2018.04.11
애플의 탈 intel? 탈 x86?  (0) 2018.04.04
java Oracle win!  (0) 2018.03.29
Posted by 구차니