embeded/raspberry pi2015. 5. 12. 13:03


기본 통합된건 없는것 같긴한데..

라즈베리 파이용 GPIO 컨트롤 라이브러리 라고 하면 되려나?

[링크 : http://wiringpi.com/download-and-install/]


pi4j는 wireing PI의 자바버전

[링크 : http://pi4j.com/]



void pinMode (int pin, int mode) ;

void pullUpDnControl (int pin, int pud) ;

void digitalWrite (int pin, int value) ;

void pwmWrite (int pin, int value) ;

int digitalRead (int pin) ;

analogRead (int pin) ;

analogWrite (int pin, int value) ;

[링크 : http://wiringpi.com/reference/core-functions/]

[링크 : http://wiringpi.com/reference/raspberry-pi-specifics/]

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

openelec 5.0.8 lirc 활성화 확인  (0) 2015.05.12
openELEC 5.0.8  (0) 2015.05.12
UHS 지원여부?  (0) 2015.05.11
cortex-a7 / NEON 그리고.. 멀티프로세서  (0) 2015.05.07
라즈베리 파이 2- 라즈비안 lirc  (0) 2015.05.05
Posted by 구차니
embeded/raspberry pi2015. 5. 11. 14:41


라즈베리에서는 UHS SD 스펙을 지원하지 않는건가?


[링크 : http://www.hardkernel.com/main/products/prdt_info.php]


일단.. SD 위원회 자료로는 UHS SD 카드라고 해도 장비에서 지원하지 않으면

Class 10 으로 하향 접속이 되는 것으로 보인다.

[링크 : https://www.sdcard.org/developers/overview/speed_class/]

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

openELEC 5.0.8  (0) 2015.05.12
wiring Pi  (0) 2015.05.12
cortex-a7 / NEON 그리고.. 멀티프로세서  (0) 2015.05.07
라즈베리 파이 2- 라즈비안 lirc  (0) 2015.05.05
BCM2708/BCM2835 ???  (0) 2015.04.30
Posted by 구차니
embeded/raspberry pi2015. 5. 7. 10:20

그림 상으로는 프로세서 코어 별로 NEON과 VFP가 독립적으로 내장되어 있는데..

4코어니까

openMP로 4 프로세스를 프로세서 별로 돌리면서 각각 NEON을 돌리는게 가능하려나?




[링크 : http://www.arm.com/products/processors/cortex-a/cortex-a7.php]

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

wiring Pi  (0) 2015.05.12
UHS 지원여부?  (0) 2015.05.11
라즈베리 파이 2- 라즈비안 lirc  (0) 2015.05.05
BCM2708/BCM2835 ???  (0) 2015.04.30
라즈베리 파이 SoC 관련  (0) 2015.04.29
Posted by 구차니
embeded/raspberry pi2015. 5. 5. 21:39

음..

로그를 기록하진 못했는데..


dmesg 존재

interrupt 누락

lsmod 존재

gpio 설정내용 누락


openelec 보다 더 지원이 안되는 것 같다.

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

UHS 지원여부?  (0) 2015.05.11
cortex-a7 / NEON 그리고.. 멀티프로세서  (0) 2015.05.07
BCM2708/BCM2835 ???  (0) 2015.04.30
라즈베리 파이 SoC 관련  (0) 2015.04.29
라즈베리 파이 2 - openelec 디바이스 트리 덤프  (0) 2015.04.29
Posted by 구차니
embeded/raspberry pi2015. 4. 30. 11:12

결국 소득은.. 공식적인건 없고..

broadcom 에서 bcm2708 family로 그중에 실제 칩이름이 bcm2385 라는건가..

(요녀석은 ARM11 계열)



그래서..

bcm2709/bcm2836 cortex-a7 quad core 라고 명명된건가...



Power-on Value of User ID Register 0x2708A000 

[링크 : https://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf]


[PATCH] ARM: add support for BCM2708/BCM2835 and Raspberry Pi

[링크 : http://www.spinics.net/lists/arm-kernel/msg192883.html

Posted by 구차니
embeded/raspberry pi2015. 4. 29. 22:14

라즈베리 파이 2로 하면.. bcm2709나 bcm2708이 보이는데

공식홈페이지에는 bcm2836으로 기재가 된다.. 머지?


bcm2708 / bcm2835 ARM1176 - A/B/B+/Compute Module

bcm2709 / bcm2836 Cortex-A7 - 2 B


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

    [링크 : http://sourceforge.net/p/lcdproc/discussion/312/thread/c106d4b8/]

[링크 : http://www.raspberry-projects.com/pi/pi-hardware/bcm2835]


Technically 2708 is the family, and 2835 is a specific implementation

I actually get the impression all VC4 SoCs are based on the bcm2708, while VC3 is bcm2707

[링크 : http://raspberrypi.stackexchange.com/...sometimes-referred-to-as-bcm2708-sometimes-bcm2835]


음.. 결론은.. bmc270x는 GPU only 제품이고

bcm2836이 라즈베리 파이에 정식 cpu 명칭인건가? 모호하네...

도대체 커널에서 무수히 뿌려대는 bcm2708 bcm2709는 멀까?



[링크 : https://en.wikipedia.org/wiki/VideoCore#Table_of_SoCs_adopting_VideoCore_SIP_blocks]

Posted by 구차니
embeded/raspberry pi2015. 4. 29. 22:05




$ dtc

프로그램 'dtc'을(를) 설치하지 않습니다. 다음을 입력해 설치할 수 있습니다:

sudo apt-get install device-tree-compiler 


$ fdtdump bcm2709-rpi-2-b.dtb

/dts-v1/;

// magic:               0xd00dfeed

// totalsize:           0x163a (5690)

// off_dt_struct:       0x38

// off_dt_strings:      0x139c

// off_mem_rsvmap:      0x28

// version:             17

// last_comp_version:   16

// boot_cpuid_phys:     0x0

// size_dt_strings:     0x29e

// size_dt_struct:      0x1364


/ {

    #address-cells = <0x00000001>;

    #size-cells = <0x00000001>;

    compatible = "brcm,bcm2709";

    model = "Raspberry Pi 2 Model B";

    interrupt-parent = <0x00000001>;

    chosen {

        bootargs = [00];

    };

    aliases {

        soc = "/soc";

        spi0 = "/soc/spi@7e204000";

        i2c0 = "/soc/i2c@7e205000";

        i2c1 = "/soc/i2c@7e804000";

        i2s = "/soc/i2s@7e203000";

        gpio = "/soc/gpio";

        intc = "/soc/interrupt-controller";

        leds = "/soc/leds";

        sound = "/sound";

    };

    memory {

        device_type = "memory";

        reg = <0x00000000 0x736f6300>;

    };

    soc {

        compatible = "simple-bus";

        #address-cells = <0x00000001>;

        #size-cells = <0x00000001>;

        ranges = <0x7e000000 0x00000004 0x00000004>;

        linux,phandle = <0x00000013>;

        phandle = <0x00000013>;

        interrupt-controller {

            compatible = "brcm,bcm2708-armctrl-ic";

            reg = <0x7e00b200 0x00000097>;

            interrupt-controller;

            #interrupt-cells = <0x00000002>;

            linux,phandle = <0x00000001>;

            phandle = <0x00000001>;

        };

        gpio {

            compatible = "brcm,bcm2835-gpio";

            reg = <0x7e200000 0x000000bd>;

            interrupts = <0x00000002 0x00000003 0x00000004 0x00000000>;

            gpio-controller;

            #gpio-cells = <0x00000002>;

            interrupt-controller;

            #interrupt-cells = <0x00000002>;

            linux,phandle = <0x00000008>;

            phandle = <0x00000008>;

            spi0_pins {

                brcm,pins = <0x00000007 0x0000000b 0x00000004 0x00000004 0x00000004>;

                brcm,function = <0x00000004>;

                linux,phandle = <0x00000004>;

                phandle = <0x00000004>;

            };

            i2c0 {

                brcm,pins = <0x00000000 0x000000ee>;

                brcm,function = <0x00000004>;

                linux,phandle = <0x00000006>;

                phandle = <0x00000006>;

            };

            i2c1 {

                brcm,pins = <0x00000002 0x000000ee>;

                brcm,function = <0x00000004>;

                linux,phandle = <0x00000007>;

                phandle = <0x00000007>;

            };

            i2s {

                brcm,pins = <0x00000012 0x00000003 0x00000003 0x00000003>;

                brcm,function = <0x00000004>;

                linux,phandle = <0x00000002>;

                phandle = <0x00000002>;

            };

        };

        i2s@7e203000 {

            compatible = "brcm,bcm2708-i2s";

            reg = <0x7e203000 0x00000003 0x78000000 0x64697361>;

            dma-names = "tx", "rx";

            status = "disabled";

            #sound-dai-cells = <0x00000000>;

            pinctrl-names = "default";

            pinctrl-0 = <0x00000002>;

            linux,phandle = <0x0000000d>;

            phandle = <0x0000000d>;

        };

        spi@7e204000 {

            compatible = "brcm,bcm2708-spi";

            reg = <0x7e204000 0x000000bd>;

            interrupts = <0x00000002 0x00000136>;

            clocks = <0x00000003>;

            #address-cells = <0x00000001>;

            #size-cells = <0x00000000>;

            status = "disabled";

            pinctrl-names = "default";

            pinctrl-0 = <0x00000004>;

            linux,phandle = <0x0000000e>;

            phandle = <0x0000000e>;

            spidev@0 {

                compatible = "spidev";

                reg = <0x00000000>;

                #address-cells = <0x00000001>;

                #size-cells = <0x00000000>;

                spi-max-frequency = <0x0007a120>;

            };

            spidev@1 {

                compatible = "spidev";

                reg = <0x00000001>;

                #address-cells = <0x00000001>;

                #size-cells = <0x00000000>;

                spi-max-frequency = <0x0007a120>;

            };

        };

        i2c@7e205000 {

            compatible = "brcm,bcm2708-i2c";

            reg = <0x7e205000 0x000000bd>;

            interrupts = <0x00000002 0x00000136>;

            clocks = <0x00000005>;

            #address-cells = <0x00000001>;

            #size-cells = <0x00000000>;

            status = "disabled";

            pinctrl-names = "default";

            pinctrl-0 = <0x00000006>;

            clock-frequency = <0x000186a0>;

            linux,phandle = <0x0000000f>;

            phandle = <0x0000000f>;

        };

        i2c@7e804000 {

            compatible = "brcm,bcm2708-i2c";

            reg = <0x7e804000 0x000000bd>;

            interrupts = <0x00000002 0x00000136>;

            clocks = <0x00000005>;

            #address-cells = <0x00000001>;

            #size-cells = <0x00000000>;

            status = "disabled";

            pinctrl-names = "default";

            pinctrl-0 = <0x00000007>;

            clock-frequency = <0x000186a0>;

            linux,phandle = <0x00000010>;

            phandle = <0x00000010>;

        };

        leds {

            compatible = "gpio-leds";

            linux,phandle = <0x00000014>;

            phandle = <0x00000014>;

            act {

                label = "led0";

                linux,default-trigger = "mmc0";

                gpios = <0x00000008 0x00000004 0x00000004>;

                linux,phandle = <0x00000011>;

                phandle = <0x00000011>;

            };

            pwr {

                label = "led1";

                linux,default-trigger = "input";

                gpios = <0x00000008 0x00000004 0x00000004>;

                linux,phandle = <0x00000012>;

                phandle = <0x00000012>;

            };

        };

        arm-pmu {

            compatible = "arm,cortex-a7-pmu";

            interrupts = <0x00000003 0x00000001>;

        };

    };

    clocks {

        compatible = "simple-bus";

        #address-cells = <0x00000001>;

        #size-cells = <0x00000000>;

        i2c {

            compatible = "fixed-clock";

            reg = <0x00000001>;

            #clock-cells = <0x00000000>;

            clock-frequency = <0x0ee6b280>;

            linux,phandle = <0x00000005>;

            phandle = <0x00000005>;

        };

        clock@2 {

            compatible = "fixed-clock";

            reg = <0x00000002>;

            #clock-cells = <0x00000000>;

            clock-output-names = "spi";

            clock-frequency = <0x0ee6b280>;

            linux,phandle = <0x00000003>;

            phandle = <0x00000003>;

        };

    };

    timer {

        compatible = "arm,armv7-timer";

        clock-frequency = <0x0124f800>;

        interrupts = <0x00000003 0x00000003 0x00000003 0x00000001 0x00000004 0x00000004 0x00000004 0x00000004>;

        always-on;

    };

    cpus {

        #address-cells = <0x00000001>;

        #size-cells = <0x00000000>;

        linux,phandle = <0x00000015>;

        phandle = <0x00000015>;

        cpu@0 {

            device_type = "cpu";

            compatible = "arm,cortex-a7";

            reg = <0x00000f00>;

            clock-frequency = <0x2faf0800>;

            linux,phandle = <0x00000009>;

            phandle = <0x00000009>;

        };

        cpu@1 {

            device_type = "cpu";

            compatible = "arm,cortex-a7";

            reg = <0x00000f01>;

            clock-frequency = <0x2faf0800>;

            linux,phandle = <0x0000000a>;

            phandle = <0x0000000a>;

        };

        cpu@2 {

            device_type = "cpu";

            compatible = "arm,cortex-a7";

            reg = <0x00000f02>;

            clock-frequency = <0x2faf0800>;

            linux,phandle = <0x0000000b>;

            phandle = <0x0000000b>;

        };

        cpu@3 {

            device_type = "cpu";

            compatible = "arm,cortex-a7";

            reg = <0x00000f03>;

            clock-frequency = <0x2faf0800>;

            linux,phandle = <0x0000000c>;

            phandle = <0x0000000c>;

        };

    };

    __overrides__ {

        arm_freq = <0x00000009 0x6e63793a 0x66726571 0x636c6f63 0x30000000 0x75656e63 0x00000059 0x00000003 0x73746174 0x0000004f 0x00000003 0x73746174 0x000001b8 0x65717565 0x00000016 0x6b2d6672 0x00000003 0x6770696f 0x000001e1 0x00000003 0x6c696e75 0x69676765>;

        i2s = [00 00 00 0d 73 74 61 74 75 73 00];

        spi = [00 00 00 0e 73 74 61 74 75 73 00];

        i2c0 = [00 00 00 0f 73 74 61 74 75 73 00];

        i2c1 = [00 00 00 10 73 74 61 74 75 73 00];

        i2c0_baudrate = [00 00 00 0f 63 6c 6f 63 6b 2d 66 72 65 71 75 65 6e 63 79 3a 30 00];

        i2c1_baudrate = [00 00 00 10 63 6c 6f 63 6b 2d 66 72 65 71 75 65 6e 63 79 3a 30 00];

        act_led_gpio = <0x00000011 0x0000000c 0x733a3800>;

        act_led_activelow = <0x00000011 0x0000001a 0x782c6465>;

        act_led_trigger = [00 00 00 11 6c 69 6e 75 78 2c 64 65 66 61 75 6c 74 2d 74 72 69 67 67 65 72 00];

        pwr_led_gpio = <0x00000012 0x0000000c 0x733a3800>;

        pwr_led_activelow = <0x00000012 0x0000001a 0x782c6465>;

        pwr_led_trigger = [00 00 00 12 6c 69 6e 75 78 2c 64 65 66 61 75 6c 74 2d 74 72 69 67 67 65 72 00];

    };

    sound {

        linux,phandle = <0x00000016>;

        phandle = <0x00000016>;

    };

    __symbols__ {

        soc = "/soc";

        intc = "/soc/interrupt-controller";

        gpio = "/soc/gpio";

        spi0_pins = "/soc/gpio/spi0_pins";

        i2c0_pins = "/soc/gpio/i2c0";

        i2c1_pins = "/soc/gpio/i2c1";

        i2s_pins = "/soc/gpio/i2s";

        i2s = "/soc/i2s@7e203000";

        spi0 = "/soc/spi@7e204000";

        i2c0 = "/soc/i2c@7e205000";

        i2c1 = "/soc/i2c@7e804000";

        leds = "/soc/leds";

        act_led = "/soc/leds/act";

        pwr_led = "/soc/leds/pwr";

        clk_i2c = "/clocks/i2c";

        clk_spi = "/clocks/clock@2";

        cpus = "/cpus";

        v7_cpu0 = "/cpus/cpu@0";

        v7_cpu1 = "/cpus/cpu@1";

        v7_cpu2 = "/cpus/cpu@2";

        v7_cpu3 = "/cpus/cpu@3";

        sound = "/sound";

    };

};

overlays$ fdtdump lirc-rpi-overlay.dtb

/dts-v1/;

// magic:               0xd00dfeed

// totalsize:           0x594 (1428)

// off_dt_struct:       0x38

// off_dt_strings:      0x4b4

// off_mem_rsvmap:      0x28

// version:             17

// last_comp_version:   16

// boot_cpuid_phys:     0x0

// size_dt_strings:     0xe0

// size_dt_struct:      0x47c


/ {

    compatible = "brcm,bcm2708";

    fragment@0 {

        target-path = "/";

        __overlay__ {

            lirc_rpi {

                compatible = "rpi,lirc-rpi";

                pinctrl-names = "default";

                pinctrl-0 = <0x00000001>;

                status = "okay";

                rpi,sense = <0xffffffff>;

                rpi,softcarrier = <0x00000001>;

                rpi,invert = <0x00000000>;

                rpi,debug = <0x00000000>;

                linux,phandle = <0x00000002>;

                phandle = <0x00000002>;

            };

        };

    };

    fragment@1 {

        target = <0xdeadbeef>;

        __overlay__ {

            lirc_pins {

                brcm,pins = <0x00000011 0x00000084>;

                brcm,function = <0x00000001 0x00000092>;

                brcm,pull = <0x00000000 0x00000065>;

                linux,phandle = <0x00000001>;

                phandle = <0x00000001>;

            };

        };

    };

    __overrides__ {

        gpio_out_pin = <0x00000001 0x00000003 0x6272636d 0x00000010>;

        gpio_in_pin = <0x00000001 0x00000003 0x6272636d 0x00000010>;

        gpio_in_pull = <0x00000001 0x00000003 0x7270692c 0x00000016>;

        sense = <0x00000002 0x00000003 0x7270692c 0x30000000>;

        softcarrier = [00 00 00 02 72 70 69 2c 73 6f 66 74 63 61 72 72 69 65 72 3a 30 00];

        invert = [00 00 00 02 72 70 69 2c 69 6e 76 65 72 74 3a 30 00];

        debug = <0x00000002 0x00000002 0x735f5f00 0x2f667261>;

    };

    __symbols__ {

        lirc_rpi = "/fragment@0/__overlay__/lirc_rpi";

        lirc_pins = "/fragment@1/__overlay__/lirc_pins";

    };

    __fixups__ {

        gpio = "/fragment@1:target:0";

    };

    __local_fixups__ {

        fixup = "/fragment@0/__overlay__/lirc_rpi:pinctrl-0:0", "/__overrides__:gpio_out_pin:0", "/__overrides__:gpio_in_pin:0", "/__overrides__:gpio_in_pull:0", "/__overrides__:sense:0", "/__overrides__:softcarrier:0", "/__overrides__:invert:0", "/__overrides__:debug:0";

    };

}; 

Posted by 구차니
embeded/raspberry pi2015. 4. 28. 08:23
사용하고 있던 커널 기본 설정이 먼지 까먹었는데..
기본 값으로 initramfs 쪽이 설정되어 있지 않았던것 같아
부팅이 진행될 수 없다고 에러가 뜬거 같으니..
그걸 설정해주거나 initramfs를 아예 끄고 해볼까나..


[링크 : https://www.raspberrypi.org/forums/viewtopic.php?f=24&t=7626]

    [링크 : https://wiki.gentoo.org/wiki/Raspberry_Pi_Kernel_Compilation]

[링크 : https://github.com/raspberrypi/linux/blob/rpi-patches/arch/arm/configs/bcmrpi_defconfig]


CONFIG_BLK_DEV_INITRD=y

CONFIG_INITRAMFS_SOURCE="../target_fs"

[링크 : https://github.com/raspberrypi/linux/blob/rpi-patches/arch/arm/configs/bcmrpi_emergency_defconfig] 


[링크 : https://www.raspberrypi.org/forums/viewtopic.php?f=24&t=7626]

[링크 : https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=10532]



음? 다시 보니.. 블럭 0 에 파일은 찾았는데 LZMA 방식으로 압축이 되어 있었나?

일단.. initramfs에서 LZMA를 지원하게 안했으니 압축포맷은 다 지원하게 해주고 해볼 필요도 있을듯


[    2.465182] RAMDISK: lzma image found at block 0

[    2.469881] RAMDISK: lzma decompressor not configured!

[    2.475016] Invalid ramdisk decompression routine.  Select appropriate config option.

[    2.482897] Kernel panic - not syncing: Could not decompress initial ramdisk image.


-*- Kernel->user space relay support (formerly relayfs)           

[*] Initial RAM filesystem and RAM disk (initramfs/initrd) support

()    Initramfs source file(s)                                    

[*]   Support initial ramdisks compressed using gzip              

[ ]   Support initial ramdisks compressed using bzip2             

[ ]   Support initial ramdisks compressed using LZMA              

[ ]   Support initial ramdisks compressed using XZ                

[ ]   Support initial ramdisks compressed using LZO               

[ ]   Support initial ramdisks compressed using LZ4               

[ ] Optimize for size                                             

-*- Configure standard kernel features (expert users)  --->       

[*] Embedded system                                               

    Kernel Performance Events And Counters  --->                  

[*] Enable VM event counters for /proc/vmstat                     

[*] Enable SLUB debugging support                                 


2015/04/14 - [개소리 왈왈/라즈베리 파이 2] - 라즈베리 파이 2 커널 바꿔치기.. 실패 ㅠㅠ



음.. 기본값으로 initrd.img를 끌어가게 되어 있는건가?

일단 압축포맷만 LZMA를 지원하도록 해주면 될 것 같기도 하네..

$ file *

COPYING.linux:          Pascal source, ASCII text

LICENCE.broadcom:       ASCII text

a:                      directory

b:                      directory

bcm2708-rpi-b-plus.dtb: data

bcm2708-rpi-b.dtb:      data

bootcode.bin:           data

cmdline.txt:            ASCII text

config.txt:             ASCII text

fixup.dat:              data

fixup_cd.dat:           data

fixup_x.dat:            data

initrd.img:             LZMA compressed data, streamed

kernel.img:             Linux kernel ARM boot executable zImage (little-endian)

kernel7.img:            Linux kernel ARM boot executable zImage (little-endian)

overlays:               directory

snappy-system.txt:      ASCII text, with very long lines

start.elf:              ELF 32-bit LSB  executable, version 1 (SYSV), statically linked, stripped

start_cd.elf:           ELF 32-bit LSB  executable, version 1 (SYSV), statically linked, stripped

start_x.elf:            ELF 32-bit LSB  executable, version 1 (SYSV), statically linked, stripped

uEnv.txt:               empty


2015/04/14 - [개소리 왈왈/라즈베리 파이 2] - 라즈베리 파이 2 - RootFS in linux 


+

집에와서 해보니 ramdisk lzma 지원추가하니 된다!!

일단 raspbian 에서 kernel7.img 만 zImage로 대체

내가 한 커널이라는 증거는 리눅스 커널 버전에 출력되는 계정과 시간! 으허허허허

즉, initramfs 설정관련해서는 config.txt 쪽에서 끌어가거나 기본 로더에서 추가하는 것으로 보인다


Uncompressing Linux... done, booting the kernel.

[    0.000000] Booting Linux on physical CPU 0xf00

[    0.000000] Initializing cgroup subsys cpu

[    0.000000] Initializing cgroup subsys cpuacct

[    0.000000] Linux version 3.18.10-v7+ (minimonk@devdesk) (gcc version 4.8.3 20140106 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2014.01 - Linaro GCC 2013.11) ) #4 SMP PREEMPT Tue Apr 28 21:20:55 KST 2015

[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d

[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache

[    0.000000] Machine: BCM2709

[    0.000000] cma: Reserved 8 MiB at 0x39800000

[    0.000000] Memory policy: Data cache writealloc

[    0.000000] [bcm2709_smp_init_cpus] enter (8620->f3003010)

[    0.000000] [bcm2709_smp_init_cpus] ncores=4

[    0.000000] PERCPU: Embedded 10 pages/cpu @ba369000 s11456 r8192 d21312 u40960

[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 239776

[    0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2709.boardrev=0xa21041 bcm2709.serial=0xa37ce24e smsc95xx.macaddr=B8:27:EB:7C:E2:4E bcm2708_fb.fbswap=1 bcm2709.disk_led_gpio=47 bcm2709.disk_led_active_low=0 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000  dwc_otg.lpm_enable=0 console=ttyAMA0,115200 root=/dev/disk/by-label/system-a init=/lib/systemd/systemd ro panic=-1 fixrtc elevator=deadline rootwait

[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)

[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)

[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)

[    0.000000] Memory: 928208K/966656K available (5717K kernel code, 397K rwdata, 1748K rodata, 388K init, 763K bss, 38448K reserved)

[    0.000000] Virtual kernel memory layout:

[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)

[    0.000000]     fixmap  : 0xffc00000 - 0xffe00000   (2048 kB)

[    0.000000]     vmalloc : 0xbb800000 - 0xff000000   (1080 MB)

[    0.000000]     lowmem  : 0x80000000 - 0xbb000000   ( 944 MB)

[    0.000000]     modules : 0x7f000000 - 0x80000000   (  16 MB)

[    0.000000]       .text : 0x80008000 - 0x8075287c   (7467 kB)

[    0.000000]       .init : 0x80753000 - 0x807b4000   ( 388 kB)

[    0.000000]       .data : 0x807b4000 - 0x8081747c   ( 398 kB)

[    0.000000]        .bss : 0x8081747c - 0x808d61d4   ( 764 kB)

[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1

[    0.000000] Preemptible hierarchical RCU implementation.

[    0.000000] NR_IRQS:608

[    0.000000] Architected cp15 timer(s) running at 19.20MHz (virt).

[    0.000014] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 3579139424256ns

[    0.000036] Switching to timer-based delay loop, resolution 52ns

[    0.000313] Console: colour dummy device 80x30

[    0.000349] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)

[    0.000377] pid_max: default: 32768 minimum: 301

[    0.000780] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)

[    0.000803] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)

[    0.002046] Initializing cgroup subsys memory

[    0.002097] Initializing cgroup subsys devices

[    0.002126] Initializing cgroup subsys freezer

[    0.002152] Initializing cgroup subsys net_cls

[    0.002175] Initializing cgroup subsys blkio

[    0.002278] CPU: Testing write buffer coherency: ok

[    0.002361] ftrace: allocating 19590 entries in 58 pages

[    0.050685] missing device node for CPU 0

[    0.050723] missing device node for CPU 1

[    0.050737] missing device node for CPU 2

[    0.050747] missing device node for CPU 3

[    0.050769] CPU0: thread -1, cpu 0, socket 15, mpidr 80000f00

[    0.050784] [bcm2709_smp_prepare_cpus] enter

[    0.050914] Setting up static identity map for 0x527b38 - 0x527b6c

[    0.110660] [bcm2709_boot_secondary] cpu:1 started (0) 18

[    0.110951] CPU1: Booted secondary processor

[    0.110960] [bcm2709_secondary_init] enter cpu:1

[    0.111014] CPU1: thread -1, cpu 1, socket 15, mpidr 80000f01

[    0.130645] [bcm2709_boot_secondary] cpu:2 started (0) 18

[    0.130881] CPU2: Booted secondary processor

[    0.130889] [bcm2709_secondary_init] enter cpu:2

[    0.130922] CPU2: thread -1, cpu 2, socket 15, mpidr 80000f02

[    0.150692] [bcm2709_boot_secondary] cpu:3 started (0) 16

[    0.150917] CPU3: Booted secondary processor

[    0.150924] [bcm2709_secondary_init] enter cpu:3

[    0.150955] CPU3: thread -1, cpu 3, socket 15, mpidr 80000f03

[    0.151048] Brought up 4 CPUs

[    0.151080] SMP: Total of 4 processors activated (153.60 BogoMIPS).

[    0.151091] CPU: All CPU(s) started in SVC mode.

[    0.152103] devtmpfs: initialized

[    0.176863] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5

[    0.178817] pinctrl core: initialized pinctrl subsystem

[    0.179596] NET: Registered protocol family 16

[    0.185269] DMA: preallocated 4096 KiB pool for atomic coherent allocations

[    0.186386] bcm2709.uart_clock = 3000000

[    0.188734] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.

[    0.188751] hw-breakpoint: maximum watchpoint size is 8 bytes.

[    0.188783] mailbox: Broadcom VideoCore Mailbox driver

[    0.188890] bcm2708_vcio: mailbox at f300b880

[    0.189253] bcm_power: Broadcom power driver

[    0.189270] bcm_power_open() -> 0

[    0.189282] bcm_power_request(0, 8)

[    0.689968] bcm_mailbox_read -> 00000080, 0

[    0.689981] bcm_power_request -> 0

[    0.690104] Serial: AMBA PL011 UART driver

[    0.690236] dev:f1: ttyAMA0 at MMIO 0x3f201000 (irq = 83, base_baud = 0) is a PL011 rev3

[    1.195351] console [ttyAMA0] enabled

[    1.263851] SCSI subsystem initialized

[    1.267829] usbcore: registered new interface driver usbfs

[    1.273468] usbcore: registered new interface driver hub

[    1.278913] usbcore: registered new device driver usb

[    1.285800] Switched to clocksource arch_sys_counter

[    1.321396] FS-Cache: Loaded

[    1.324590] CacheFiles: Loaded

[    1.338877] NET: Registered protocol family 2

[    1.344505] TCP established hash table entries: 8192 (order: 3, 32768 bytes)

[    1.351730] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)

[    1.358404] TCP: Hash tables configured (established 8192 bind 8192)

[    1.364854] TCP: reno registered

[    1.368114] UDP hash table entries: 512 (order: 2, 16384 bytes)

[    1.374078] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)

[    1.380781] NET: Registered protocol family 1

[    1.385842] RPC: Registered named UNIX socket transport module.

[    1.391762] RPC: Registered udp transport module.

[    1.396505] RPC: Registered tcp transport module.

[    1.401204] RPC: Registered tcp NFSv4.1 backchannel transport module.

[    1.408004] Trying to unpack rootfs image as initramfs...

[   14.839907] Freeing initrd memory: 12660K (ba393000 - baff0000) 


Posted by 구차니
embeded/raspberry pi2015. 4. 27. 20:14


OpenELEC:~ # modprobe lirc_rpi debug=1

OpenELEC:~ # cat /sys/kernel/debug/gpio
GPIOs 0-53, platform/3f200000.gpio, pinctrl-bcm2835:
 gpio-35  (led1                ) in  lo
 gpio-47  (led0                ) out lo

OpenELEC:~ # cat /proc/interrupts
            CPU0       CPU1       CPU2       CPU3
 16:          0          0          0          0   ARMCTRL  16  bcm2708_fb dma
 24:         98          0          0          0   ARMCTRL  24  DMA IRQ
 25:       1539          0          0          0   ARMCTRL  25  DMA IRQ
 32:     390117          0          0          0   ARMCTRL  32  dwc_otg, dwc_otg_pcd, dwc_otg_hcd:usb1
 49:          0          0          0          0   ARMCTRL  49  3f200000.gpio:bank0
 50:          0          0          0          0   ARMCTRL  50  3f200000.gpio:bank1
 65:         30          0          0          0   ARMCTRL  65  ARM Mailbox IRQ
 66:     290877          0          0          0   ARMCTRL  66  VCHIQ doorbell
 75:          1          0          0          0   ARMCTRL  75
 84:       6518          0          0          0   ARMCTRL  84  mmc0
 99:      65543      47405      39193      57753   ARMCTRL  99  arch_timer
497:          0          0          0          0  pinctrl-bcm2835  17  lirc_rpi
FIQ:              usb_fiq
IPI0:          0          0          0          0  CPU wakeup interrupts
IPI1:          0          0          0          0  Timer broadcast interrupts
IPI2:      16388      33373      85486     101209  Rescheduling interrupts
IPI3:          1          4          6          5  Function call interrupts
IPI4:          2          1          2          6  Single function call interrupts
IPI5:          0          0          0          0  CPU stop interrupts
IPI6:          0          0          0          0  IRQ work interrupts
IPI7:          0          0          0          0  completion interrupts
Err:          0 

OpenELEC:~ # dmesg | grep -i lirc

[    5.898084] lirc_dev: IR Remote Control driver registered, major 248

[    5.925459] lirc_rpi: module is from the staging directory, the quality is unknown, you have been warned.

[    6.822622] lirc_rpi: auto-detected active high receiver on GPIO pin 17

[    6.823177] lirc_rpi lirc_rpi: lirc_dev: driver lirc_rpi registered at minor = 0

[    6.823195] lirc_rpi: driver registered!

[    7.268732] input: lircd as /devices/virtual/input/input3


OpenELEC:~ # lsmod | grep irc

lirc_rpi                5982  3

lirc_dev                7578  1 lirc_rpi

rc_core                14603  1 lirc_dev


mount -t debugfs debugfs /sys/kernel/debug
cat /sys/kernel/debug/gpio 

The output should be something like this (you should see two gpio pins allocated to the lirc_rpi driver):
GPIOs 0-53, bcm2708_gpio:
 gpio-16  (led0                ) out hi
 gpio-17  (lirc_rpi ir/out     ) in  lo
 gpio-18  (lirc_rpi ir/in      ) in  hi
Check dmesg after loading the module with the debug parameter.
modprobe lirc_rpi debug=1

lirc_dev: IR Remote Control driver registered, major 252 
lirc_rpi: module is from the staging directory, the quality is unknown, you have been warned.
lirc_rpi lirc_rpi.0: lirc_dev: driver lirc_rpi registered at minor = 0
lirc_rpi: driver registered!
lirc_rpi: is_right_chip bcm2708_gpio 0
lirc_rpi: to_irq 103
lirc_rpi: auto-detected active low receiver on GPIO pin 18
Run irw then check if the module succesfuly requested an irq.
cat /proc/interrupts
           CPU0       
  3:      88963   ARMCTRL  BCM2708 Timer Tick
 52:       3251   ARMCTRL  BCM2708 GPIO catchall handler
 65:          2   ARMCTRL  ARM Mailbox IRQ
 66:          1   ARMCTRL  VCHIQ doorbell
 75:   51434882   ARMCTRL  dwc_otg, dwc_otg_pcd, dwc_otg_hcd:usb1
 77:        223   ARMCTRL  bcm2708_sdhci (dma)
 83:         24   ARMCTRL  uart-pl011
 84:       7123   ARMCTRL  mmc0
103:       3251      GPIO  lirc_rpi

[링크 : http://aron.ws/projects/lirc_rpi/] 


OpenELEC:~ # mode2 -d /dev/lirc0

mode2: could not open /dev/lirc0

mode2: default_init(): Device or resource busy


[링크 : http://aron.ws/projects/lirc_rpi/openelec_howto.html]



+2015.04.28


gpio -g write 16 1

dtoverlay=lirc-rpi,gpio_out_pin=16,gpio_in_pin=17,debug=on

dtoverlay=lirc-rpi,gpio_out_pin=25,gpio_in_pin=18

[링크 : https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=99085] 


File:   lirc-rpi-overlay.dtb

Info:   Configures lirc-rpi (Linux Infrared Remote Control for Raspberry Pi)

        Consult the module documentation for more details.

Load:   dtoverlay=lirc-rpi,<param>=<val>,...

Params: gpio_out_pin             GPIO pin for output (default "17")


        gpio_in_pin              GPIO pin for input (default "18")


        gpio_in_pull             Pull up/down/off on the input pin

                                 (default "down")


        sense                    Override the IR receive auto-detection logic:

                                   "1" = force active high

                                   "0" = force active low

                                   "-1" = use auto-detection

                                 (default "-1")


        softcarrier              Turn the software carrier "on" or "off"

                                 (default "on")


        invert                   "on" = invert the output pin (default "off")


        debug                    "on" = enable additional debug messages

                                 (default "off")


[링크 : https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=97314]



+ 2015.04.28

config.txt

dtoverlay=lirc-rpi,gpio_in_pin=18,debug=on


OpenELEC:~ # dmesg | grep -i lirc

[    5.656942] lirc_dev: IR Remote Control driver registered, major 248

[    5.703156] lirc_rpi: module is from the staging directory, the quality is unknown, you have been warned.

[    5.705297] lirc_rpi: to_irq 498

[    6.595845] lirc_rpi: auto-detected active high receiver on GPIO pin 18

[    6.596240] lirc_rpi lirc_rpi: lirc_dev: driver lirc_rpi registered at minor = 0

[    6.596255] lirc_rpi: driver registered!

[    6.769256] input: lircd as /devices/virtual/input/input0

[    7.791546] lirc_rpi: Interrupt 498 obtained

[    7.791573] lirc_rpi: in init_timing_params, freq=38000 pulse=13157, space=13158


OpenELEC:~ #  modprobe lirc_rpi debug=1


OpenELEC:~ # cat /sys/kernel/debug/gpio

GPIOs 0-53, platform/3f200000.gpio, pinctrl-bcm2835:

 gpio-35  (led1                ) in  lo

 gpio-47  (led0                ) out lo


OpenELEC:~ # cat /proc/interrupts

            CPU0       CPU1       CPU2       CPU3

 16:          0          0          0          0   ARMCTRL  16  bcm2708_fb dma

 24:         42          0          0          0   ARMCTRL  24  DMA IRQ

 25:       1532          0          0          0   ARMCTRL  25  DMA IRQ

 32:      22278          0          0          0   ARMCTRL  32  dwc_otg, dwc_otg_pcd, dwc_otg_hcd:usb1

 49:          0          0          0          0   ARMCTRL  49  3f200000.gpio:bank0

 50:          0          0          0          0   ARMCTRL  50  3f200000.gpio:bank1

 65:         32          0          0          0   ARMCTRL  65  ARM Mailbox IRQ

 66:      46149          0          0          0   ARMCTRL  66  VCHIQ doorbell

 75:          1          0          0          0   ARMCTRL  75

 84:       5845          0          0          0   ARMCTRL  84  mmc0

 99:       8864       7960       6038       4639   ARMCTRL  99  arch_timer

498:          0          0          0          0  pinctrl-bcm2835  18  lirc_rpi

FIQ:              usb_fiq

IPI0:          0          0          0          0  CPU wakeup interrupts

IPI1:          0          0          0          0  Timer broadcast interrupts

IPI2:      14513      40888       8299       7798  Rescheduling interrupts

IPI3:          2          4          5          2  Function call interrupts

IPI4:          1          5          0          1  Single function call interrupts

IPI5:          0          0          0          0  CPU stop interrupts

IPI6:          1          0          0          0  IRQ work interrupts

IPI7:          0          0          0          0  completion interrupts

Err:          0



Posted by 구차니
embeded/raspberry pi2015. 4. 24. 08:20

테스터가 없어서

회사 들고와서 전압을 체크 했는데

통전 시험 ok

전압 3.3v ok

전압 5.5v ok


머지 -ㅁ-?


---

device tree overlay 관련해서 lirc-rpi만 했는데

아래것들도 해줘야 하는건가 ...

# Uncomment this to enable the lirc-rpi module

#dtoverlay=lirc-rpi


# Uncomment this to override the defaults for the lirc-rpi module

#dtparam=gpio_out_pin=16

#dtparam=gpio_in_pin=17

#dtparam=gpio_in_pull=down


[링크 : https://www.raspberrypi.org/documentation/configuration/device-tree.md] 


dtoverlay=lirc-rpi

dtparam=gpio_out_pin=16

dtparam=gpio_in_pin=17

dtparam=gpio_in_pull=down

or appended to the overlay line like this:


dtoverlay=lirc-rpi:gpio_out_pin=16,gpio_in_pin=17,gpio_in_pull=down 


[링크 : https://www.raspberrypi.org/documentation/configuration/device-tree.md]



GPIO16/17은 먼데 설정을 해주지 -ㅁ-?


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



+

[링크 : http://alexba.in/blog/2013/01/06/setting-up-lirc-on-the-raspberrypi/]

[링크 : http://aron.ws/projects/lirc_rpi/]

Posted by 구차니