embeded/raspberry pi2015. 3. 2. 18:41

LAN9512의 경우 자체적으로 1 upstream / 2 downstream의 USB HUB를 제공하는데

라즈베리 파이 2 에서는 LAN9512의 다운스트림을 사용하지 않고

USB ROOT HUB 5port 짜리 하나를 사용해서

1번 포트에 SMSC LAN9512를 연결하고

나머지는 순서대로 2/3/4/5 를 사용하는 것으로 보인다.

즉.. USB to Ethernet으로 인한 대역폭을 고려하면..

외장 HDD를 연결해서 사용하려는 나의 장대한(?) 음모는 꽤나 빛을 바래는 듯? ㅠㅠ


 

 Port 2 

 Port 4

 LAN (Port 1)

 Port 3 

 Port 5 



OpenELEC:~ # lsusb -t

/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M

    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/5p, 480M

        |__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=smsc95xx, 480M

        |__ Port 5: Dev 8, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M


OpenELEC:~ # lsusb -t

/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M

    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/5p, 480M

        |__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=smsc95xx, 480M

        |__ Port 3: Dev 9, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M


OpenELEC:~ # lsusb -t

/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M

    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/5p, 480M

        |__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=smsc95xx, 480M

        |__ Port 2: Dev 10, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M


OpenELEC:~ # lsusb -t

/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M

    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/5p, 480M

        |__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=smsc95xx, 480M

        |__ Port 4: Dev 11, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M




---

방열칩 뜯고 보니

smsc lan9514

이녀석은 5포트 USB 허브 내장한 녀석이다

즉 broadcom bcm 칩에는 루트 허브 하나만 있고

lan9514 와 연결해서 4개 포트를 빼내는 형식이다


[링크 : http://ww1.microchip.com/downloads/en/DeviceDoc/9514.pdf]

'embeded > raspberry pi' 카테고리의 다른 글

매스매티카 in raspbian/NOOBS  (0) 2015.03.03
라즈베리 2 / 라즈비언 가지고 놀기  (0) 2015.03.03
라즈베리 2 - NOOB / Scratch  (0) 2015.03.01
라즈베리 파이 2 ubuntu / snappy  (4) 2015.03.01
라즈베리 빌드 관련  (0) 2015.03.01
Posted by 구차니

db를 복구하려는데 에러발생!


$ ll

▒հ▒ 341564

drwx-----x  2 minimonk user      4096 2012-05-06 21:10 m

-rw-r--r--  1 minimonk user 294814223 2015-02-03 11:33 minimonk.sql

-rw-r--r--  1 minimonk user  54933995 2015-03-02 17:30 minimonk.sql.zip

drwx-----x 15 minimonk user      4096 2012-07-18 20:14 www


$ mysql -uusername -p dbname < mediawiki.sql

Enter password:

ERROR 1153 (08S01) at line 18575: 'max_allowed_packet'▒▒▒▒ ▒▒ū ▒▒Ŷ▒ ▒޾ҽ▒ϴ▒.


그래서 한번 검색은 해보고 따라해봤지만

mysql> show variables like 'max_allowed_packet';

+--------------------+---------+

| Variable_name      | Value   |

+--------------------+---------+

| max_allowed_packet | r|

+--------------------+---------+

1 row in set (0.00 sec)

mysql> set global net_buffer_length=1000000;
ERROR 1227 (42000): Access denied; you need the SUPER privilege for this operation
mysql> set global max_allowed_packet=1000000000;
ERROR 1227 (42000): Access denied; you need the SUPER privilege for this operation 


너님 권한없음 ㄴㄴ 외치는 mysql -_-


[링크 : http://stackoverflow.com/.../mysql-error-1153-got-a-packet-bigger-than-max-allowed-packet-bytes]

[링크 : http://www.jquery.kr/...search_keyword=&origin_target=]


max_allowed_packet은 업로드 하는 파일의 용량이고, 네트워크 패킷과는 상관이 없는 값

그런데.. 저 값만 단순하게 보면 1MB 정도이려나?(바이트 라면 1024 * 1024 = 1048576)


[링크 : http://blackbull.tistory.com/12]


+

2015.03.03

저기요 -_- 쉽지 않으니까 유료 서비스 이용하면서 문의하죠 아오 -_-


즐거운 하루 되세요, 우비 입니다.
해당 오류는 해당 DB 테이블에 문제가 발생되어 오류가 호출되고 있는 부분입니다.
오류 해결은 간단하게 해결되지 때문에 해당 부분을 도움드리기 어렵습니다.
해당 테이블을 점검해서 확인 해 보시기 바랍니다.
이용 해 주셔서 감사합니다.

내참.. 드러워서 내가 서버 돌려서 올리고 다시 내려 받고 또 올리던가
그냥 내 서버에서 돌리던가 해야지 에잇 -_-

2015.03.10 추가
서버측에서 설정해야지 mysql client로 한다고 해서 달라지는건 없는 듯. -_-


Posted by 구차니
embeded/raspberry pi2015. 3. 1. 21:09

NOOBS로 부팅하니 이것저것 깔라고 나오는데


다 체크하려니 용량 부족으로 + 다운로드 귀찮아서 네트워크를 필요로 하지 않는

Raspbian / Data Partition / Boot to Scratch를 설치하는데

크어어어엌 -_-a 겁내 오래 걸린다. 걍 파일 받아서 직접 굽는게 빠르니 다시는 그닥 하고 싶지 않은 방법이 되어버림 -_-


암튼 한 10분 넘게 방치해놓고 딴짓하니 끝!

근데 키보드 안붙여 놓고 마우스만 있어서 Shift를 누를수가 없어! ㅠㅠ


Raspbian 과 Raspbian - Boot to Scratch를 둘다 선택해서 설치했더니

다음 부팅시에 어느걸로 켤지 물어 보고 라즈비언은 써봤으니 Boot to Scratch를 해봤더니


으어어어엌 콘솔이다 ㅋㅋ

그냥 냅두면 마우스가 뜨는데 SD 로딩 불도 안들어 오고 고장났나? 해서 마우스를 움직여보니


헐 먼가 이상한 고양이가 나온다 -_-


귀찮아서 About을 누르고 턴 종료!


일종의 애니메이션/게임 저작도구 라고 한다.


Scratch is a visual programming tool which allows the user to create animations and games with a drag-and-drop interface. It allows you to create your own computer games, interactive stories, and animations using some programming techniques without actually having to write code. It’s a great way to get started programming on the Raspberry Pi with young people. To find out more about Scratch, visit the website at scratch.mit.edu or see the Computing At School Raspberry Pi Education Manual.

[링크 : http://www.raspberrypi.org/documentation/usage/scratch/]

Posted by 구차니
embeded/raspberry pi2015. 3. 1. 19:03

로그인은 ubuntu : ubuntu

그런데.. 일단 이녀석.. 콘솔이 기본이다 -_ㅠ

apt-get은 지원안하고 snappy를 사용하래서 써봤더니
야임마!!!! -_-+

login as: ubuntu

ubuntu@192.168.219.165's password:

Welcome to Ubuntu Vivid Vervet (development branch) (GNU/Linux 3.18.3-v7+ armv7l)


 * Documentation:  https://help.ubuntu.com/


The programs included with the Ubuntu system are free software;

the exact distribution terms for each program are described in the

individual files in /usr/share/doc/*/copyright.


Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by

applicable law.


Welcome to the Ubuntu Core rolling development release.


 * See https://ubuntu.com/snappy


It's a brave new world here in snappy Ubuntu Core! This machine

does not use apt-get or deb packages. Please see 'snappy --help'

for app installation and transactional updates.


To run a command as administrator (user "root"), use "sudo <command>".

See "man sudo_root" for details.


ubuntu@localhost:~$ sudo apt-get update

Ubuntu Core does not use apt-get, see 'snappy --help'!

ubuntu@localhost:~$ snappy

Usage:snappy [-h] [-v]

             {info,versions,search,update-versions,update,rollback,install,uninstall,tags,config,build,booted,chroot,framework,fake-version,nap}

             ...

ubuntu@localhost:~$ snappy update

This command needs root, please run with sudo

ubuntu@localhost:~$ sudo snappy update

Traceback (most recent call last):

  File "/usr/bin/snappy", line 25, in <module>

    status = Main().__main__()

  File "/usr/lib/python3/dist-packages/snappy/main.py", line 195, in __main__

    return callback(args)

  File "/usr/lib/python3/dist-packages/snappy/main.py", line 511, in _do_update

    for pkg in ClickDataSource().upgradable_apps]

  File "/usr/lib/python3/dist-packages/snappy/click.py", line 180, in upgradable_apps

    all_updates_list = repo.get_upgradable()

  File "/usr/lib/python3/dist-packages/click/repository.py", line 183, in get_upgradable

    headers={"content-type": "application/json"})

  File "/usr/lib/python3/dist-packages/click/network.py", line 70, in http_request

    curl.perform()

pycurl.error: (60, 'server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none')



로컬에서 xwindow 켜고 해야 하려나? -_-

Posted by 구차니

저번에 올라왔던 기사


새마을 운동 회원들이 태극기를 나누어주었는데(무려!! 무료로!)

전부 주는데 오래 걸렸다고 -_-




문득 오늘 밖을 거니는데 태극기 달린 곳이 별로 없고

아버지께서 그런거 보면 한소리 하시겠구나 싶었는데


저번 태극기 배포건은 오늘 중장년 층과 20~30대의 간극을 벌여

싸움을 붙이기 위한 전초전이 아니었을까? 하는 생각이 드는건 왜일까..

Posted by 구차니
embeded/raspberry pi2015. 3. 1. 11:42

라즈베리를 남이 만들어 놓은것만 쓰려고 산건 아니니 ㅋ

일단 크로스 컴파일러와 커널 소스는 github상에 존재하고

그 외에는 받아서 천천히 보면 어찌 알게 되겠지 머


[링크 : http://www.raspberrypi.org/documentation/linux/kernel/building.md]

[링크 : https://github.com/raspberrypi/tools/tree/master/usbboot] 부트로더

[링크 : https://github.com/raspberrypi/linux] 커널

[링크 : https://github.com/raspberrypi/target_fs] rootfs / busybox 기반

[링크 : https://github.com/raspberrypi/tools] 크로스 컴파일러 - 리눅스 용인듯?



+ 2015.03.01

The BCM2835 device has a number of different modes for booting, the most obvious one is the SD card which looks for a file called bootcode.bin on the first FAT partition of the SD card to boot from.


올 -_-a

칩에서 SD 메모리 인식해서 FAT 면은 자동으로 bootconde.bin을 찾아서 부팅하다니

겁나 똑똑한 칩일세 ㄷㄷ

Posted by 구차니
embeded/raspberry pi2015. 3. 1. 09:56

다 설치는 아직 못해보고 부팅만 해봄



pre-installed NOOBS SD card도 파는데

먼데 돈 받고 팔어!? 라는 생각에 한번 시도


설치법은 의외로 쉬운데

SD 위원회의 SDFormatter라는 프로그램을 받아 설치후 포맷하면 된다.

[링크 : https://www.sdcard.org/downloads/formatter_4/]


다른건 필요없고 option의 FORMAT SIZE ADJUSTMENT를 ON으로 해주면

볼륨 사이즈 상관없이 전체 파티션을 하나로 잡고 자동으로 밀어 준다.

수동으로 한다면.. 단일 파티션으로 잡고 FAT로 포맷하면 될 것 같기도 한데? 문제는...


NOOBS_v1_4_0.zip을 다운로드 받아

옆의 경로 부터 전체를 복사해주면 설치 끝!(엥? 부트섹터도 없어!??!)


[링크 : http://www.raspberrypi.org/help/noobs-setup/]


아무튼 그렇게 하고 나서 켜보니

이런저런걸 install 할 수 있도록 되어 있는데..

NOOB이라고 해서 머 대단한걸 기대했는데 꼴랑랑(?) raspbian이라니 -_ㅠ


+ 2015.03.01

랜선 연결하고 하니

다른 배포판들도 네트워크로 접속해서 다운로드 받을 수 있도록 된다!!!



Posted by 구차니
embeded/ARM2015. 2. 28. 23:37

라즈베리의 cpuinfo에서 arm7l 이라고 나와서 검색


느낌으로는.. 걍 붙는 접두 같긴한데.. (armel armhf랑은 다르게)

h는 hard

t는 thumb

n은 neon의 스멜이... -_-a


Mer port nameOBS scheduler nameRPM architecturesOBS project name in MDSOBS repository name in MDSDescription
i486i586i486Core:i486Core_i486Generic i486+ X86 port
i586i586i586, i686Core:i586Core_i586SSSE3 enabled X86 port
x86_64x86_64x86_64Core:x86_64Core_x86_64Generic 64 bit port
armv6larmv7elarmv6lCore:armv6lCore_armv6lARMv6 + VFP port
armv7larmv7elarmv7lCore:armv7lCore_armv7lARMv7 VFPv3-D16 port, softfp ABI
armv7hlarmv8elarmv7hlCore:armv7hlCore_armv7hlARMv7 VFPv3-D16 port, hardfp ABI
armv7tnhlarmv8elarmv7hl, armv7nhl, armv7tnhl, armv7thlCore:armv7tnhlCore_armv7tnhlARMv7 VFPv3-D16 port, hardfp ABI, NEON, Thumb2
mipselmipsmipselCore:mipselCore_mipselMIPS32 O32 ABI port, hardfloat

[링크 : https://wiki.merproject.org/wiki/OBS_architecture_naming]


그리고 VFPv4 에서는 FMAC를 탑재하고

soft는 소프트웨어 부동소수점 흉내내기(에뮬레이션)

softfp는 소프트웨어적으로 흉내내는 방식을 따르나 자동으로 vfp 레지스터에 쓰도록 하고

hardfp는 vfp 하드웨어 레지스터에 바로 쓰도록 하는 차이가 있다고 한다.


Soft

  • Full software floating point - compiler should refuse to generate a real FPU instruction and -mfpu= is ignored.
  • FPU operations are emulated by the compiler
  • Function calls are generated to pass FP arguments (float, double) in integer registers (one for float, a pair of registers for double)


Softfp

  • To reiterate, function calls are generated to pass FP arguments in integer registers
  • Compiler can make smart choices about when and if it generates emulated or real FPU instructions depending on chosen FPU type (-mfpu=)
  • This means soft and softfp code can be intermixed


Hardfp

  • Full hardware floating point.
  • FP arguments are passed directly in FPU registers
  • Cannot possibly run without the FPU defined in -mfpu= (or a superset of the FPU defined, where relevant)
  • FPU instructions could be emulated by the kernel so that FPU-less systems could run with this ABI but as far as we know this does not exist
  • No function prologue or epilogue requirements for FP arguments, no pipeline stalls, maximum performance (just like in PowerPC and MIPS)

[링크 : https://wiki.debian.org/ArmHardFloatPort/VfpComparison]



FMAC는 Fused Multiply ACCumulator로

하드웨어로 구성된 다중 누산기 라고 해석하면 되려나?

[링크 : http://en.wikipedia.org/wiki/Multiply–accumulate_operation]

Posted by 구차니
embeded/raspberry pi2015. 2. 28. 16:56

지금까지 실험(?)해본 내용


2.5인치 USB HDD >>> 전력부족으로 틱틱틱 -_-a

하드는 아마도.. 3.5 인치 외장전원을 쓰던가 파워드 허브를 써야 할 듯



방열판

50도 -> 35도




USB 4개 있어서 외장 하드 4개 달려는 나의 음모는 이렇게 날아가고..

솔찍히 50도면 칩 보증 온도 내라서 상관없지만

그래서 산거니까 달아주니 마음이 평온해짐 ㅋㅋ


--


USB 3/4번 포트(아마도 랜에서 먼쪽?)은 smsc USB LAN과 하나의 허브를 공유함

랜은 usb to Ethernet

그리고 USB 는 100mA 까지만 전력을 공급이 가능하도록 되어있음


[링크 : http://ko.wikipedia.org/wiki/라즈베리_파이]


smsc LAN9512은

USB 2port hub + Fast Ethernet 칩이다


Two downstream ports, one upstream port

 — Two integrated downstream USB 2.0 PHYs

 — One integrated upstream USB 2.0 PHY

Integrated 10/100 Ethernet MAC with full-duplex support

Integrated 10/100 Ethernet PHY with HP Auto-MDIX


[링크 : http://ww1.microchip.com/downloads/en/DeviceDoc/9512.pdf]

'embeded > raspberry pi' 카테고리의 다른 글

라즈베리 빌드 관련  (0) 2015.03.01
라즈베리 파이 2 - NOOBS  (0) 2015.03.01
라즈베리 파이 2 audio 관련 config.txt 설정  (0) 2015.02.28
라즈베리 pi 2 - openELEC  (0) 2015.02.27
raspberry SD 메모리 구조  (0) 2015.02.27
Posted by 구차니
embeded/raspberry pi2015. 2. 28. 16:17

라즈베리 openELEC을 설치하면

HDMI로 연결했음에도 불구하고 소리가 나지 않는다 -_-


그래서 검색을 해보니...

hdmi_drive=2로 설정을 하라는데


이리저리 찾아보니.. 부트로더가 아니라 라즈베리 설정에 관련된 파일인 config.txt에 하라고 되어있다.

즉, 커널 인자로 넘기는게 아니란것!


################################################################################

#      This file is part of OpenELEC - http://www.openelec.tv

#      Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)

#      Inspired and partly copied from:

#  http://youresuchageek.blogspot.fr/2012/09/howto-raspberry-pi-openelec-on.html

#

#  OpenELEC is free software: you can redistribute it and/or modify

#  it under the terms of the GNU General Public License as published by

#  the Free Software Foundation, either version 2 of the License, or

#  (at your option) any later version.

#

#  OpenELEC is distributed in the hope that it will be useful,

#  but WITHOUT ANY WARRANTY; without even the implied warranty of

#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

#  GNU General Public License for more details.

#

#  You should have received a copy of the GNU General Public License

#  along with OpenELEC.  If not, see <http://www.gnu.org/licenses/>.

################################################################################

# Bootloader configuration - config.txt

################################################################################


################################################################################

# Memory (System/GPU configuration )

################################################################################


# default GPU memory split (do not change if you do not know what you are doing)

  gpu_mem=128


# SDRAM size based GPU memory split, uncomment and setup to override 'gpu_mem'

  gpu_mem_256=112

  gpu_mem_512=160

  gpu_mem_1024=256


################################################################################

# Overclocking settings

# WARNING: Do not change/enable if you do not know what you are doing!

#          The System may become unstable or you can have data corruption or

#          you can loose your warranty if you set wrong settings

#

# please read: http://elinux.org/RPi_config.txt#Overclocking_configuration

################################################################################


# Overclock mode settings.

#

# default recommended values are: arm_freq | core_freq | sdram_freq | over_voltage

# no overclocking               :    700   |    250    |    400     |      0

# mode 'Modest'                 :    800   |    300    |    400     |      0

# mode 'Medium'                 :    900   |    333    |    450     |      2

# mode 'High'                   :    950   |    450    |    450     |      6

# mode 'Turbo'                  :   1000   |    500    |    500     |      6


# arm_freq=700

# core_freq=250

# sdram_freq=400

# over_voltage=0


# set to 'force_turbo=1' to disable dynamic overclocking (you can lose your warranty!)

  force_turbo=0


# If you have any data corruption using Turbo Mode and overclocking

# try with this setting uncommented

# If this still fails, try to use Medium mode without "over_voltage=2"

# If it ultimately keeps failing, forget about this until it gets fixed

# Use a more conservative mode that will works fine in any cases:

# initial_turbo=30


################################################################################

# Overscan settings

################################################################################


# Make display smaller to stop text spilling off the screen

# see also http://www.raspberrypi.org/phpBB3/viewtopic.php?f=67&t=15700

# overscan_scale=1

# disable_overscan=1


# Adapt overscan values to your needs

# overscan_left=57

# overscan_right=59

# overscan_top=20

# overscan_bottom=20


################################################################################

# various settings see also: http://elinux.org/RPi_config.txt

################################################################################


# Force HDMI even if unplugged or powered off

# hdmi_force_hotplug=1


# Doesn't sent initial active source message.

# Avoids bringing CEC (enabled TV) out of standby and channel switch when

# rebooting.

  hdmi_ignore_cec_init=1


################################################################################

# License keys to enable GPU hardware decoding for various codecs

# to obtain keys visit the shop at http://www.raspberrypi.com

################################################################################


# decode_MPG2=0x00000000

# decode_WVC1=0x00000000

# decode_DTS=0x00000000

# decode_DDP=0x00000000


################################################################################

# End of default configuration

# all values below this line were inserted from config.txt.bk (your old config)

# and can be merged with the above values

################################################################################ 


그래서 hdmi_drive=2 로 설정하고 부팅을 하니

hdmi_drive chooses between HDMI and DVI modes


 hdmi_drive=1 Normal DVI mode (No sound)

 hdmi_drive=2 Normal HDMI mode (Sound will be sent if supported and enabled)


[링크 : http://elinux.org/RPiconfig]


HDMI 모니터에 연결하면 소리도 잘나오고 모두 happy~ 이긴한데!

DVI 모니터에 HDMI to DVI 케이블로 연결하면 화면이 안나온다!!!


아마 DMT 방식이라던가 이런 DVI 모니터에서 지원못하는 방식이라서 그런거 같은데

hdmi_group=0으로 하면 EDID로 받는다고 하니 문제가 있는 모니터가 아니라면 0으로 설정해주면 되지 않으려나?

hdmi_group defines the HDMI type

Not specifying the group, or setting to 0 will use the preferred group reported by the edid.


hdmi_group=1   CEA

hdmi_group=2   DMT


[링크 : http://elinux.org/RPiconfig] 


---

뜬금포 결론

DVI로 해서 처음 소리가 안난건

openELEC에서 audio 출력이 HDMI로 되어있고

라즈베리 OS 설정에서는 DVI로 모드로 되어 있어서 서로 엉긴것 -_-


일단 기본값으로는 DVI 출력에 HDMI 오디오 출력이므로

HDMI-DVI로 쓴다면 openELEC 설정에서 Audio 출력을 HDMI and Analogue 로 설정해주어야 한다.


그리고 HDMI로 사용한다면

hdmi_drive=2로 설정해주면 나머지는 설정할 사항이 없다.


System - Settings


System


Audio output - Audio output device HDMI and Analogue로 설정해주면 DVI 사용시 아날로그 출력이 된다.

[링크 : http://openelec.tv/forum/124-raspberry-pi/74408-problems-with-hdmi-audio-on-openelec-5-0]

Posted by 구차니