Programming/neon2015. 4. 30. 17:08

ARM NEON은 별도의 어셈블리 명령어로 작동하는 독립적인 하드웨어 이기 때문에

이녀석을 편하게 다루기 위한 일종의 매크로가 존재한다.


NEON 본질이라고 해석하면 되려나?


[링크 : http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0205j/BABGHIFH.html]

[링크 : http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0348c/Badcdfad.html]

[링크 : http://hilbert-space.de/?p=22]

[링크 : http://www.armadeus.com/wiki/index.php?title=NEON_HelloWorld]



[링크 : http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0491h/CIHJBEFE.html]

[링크 : https://gcc.gnu.org/onlinedocs/gcc-4.6.1/gcc/ARM-NEON-Intrinsics.html]

'Programming > neon' 카테고리의 다른 글

neon auto vectoring  (0) 2015.05.06
kernel mode neon support?  (0) 2015.05.06
NEON instruction  (0) 2015.05.05
neon 예제 실행 + 커널 교체  (0) 2015.05.04
arm neon 예제 컴파일  (0) 2015.05.03
Posted by 구차니

Depth camera로 검색하다 보니

TOF 라는게 나오는데. 일종의.. 빛의 반사를 이용하여 거리를 재는 기기라고 하면 되려나?

현재로서는.. 키넥트에 포함된 녀석이 짱짱맨인 듯.


[링크 : http://darkpgmr.tistory.com/75]

[링크 : http://talkingaboutme.tistory.com/199] 키넥트

[링크 : http://en.wikipedia.org/wiki/Time_of_flight]


TOF 센서 제조사

Canesta >> MS 인수

Mesa 

Panasonic

SoftKinetic

[링크 : http://cyberkingdom.tistory.com/10]



+

2015.05.06 추가

[링크 : http://www.novitec.co.kr/kor3/technology/technology.html?part=03]

'이론 관련 > 사진 광학 관련' 카테고리의 다른 글

rolling shutter effect / jello effect ..  (0) 2015.05.22
SAD(Sum of Absolute Differences) 알고리즘  (0) 2015.05.06
촛점거리로 부터 거리 계산하기  (0) 2015.04.27
rolling shutter  (0) 2014.08.13
OLPF / MTF  (0) 2013.03.21
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 구차니
Linux2015. 4. 29. 10:06

디바이스 트리는

하드웨어 종속적인 부분(GPIO/timer 등등)을 커널에서 분리시켜 별도의 파일로 관리하는 것으로

기존의 board_*.c 파일을 대체하는 기술이다.


ARM 커널 패치등이 워낙 오래걸려 메인 트리를 적용하는데 오래 걸리다 보니 이런식으로 분리하는데

2013년 정도 부터 적용되었고 그 이전에 2년 정도 코드를 정리하는데 시간이 소요된 것으로 보인다.

그래서 imx6 시리즈 와 같이 2013년 이후 SoC 들에 대한 권장사항으로 device tree를 사용하도록 한다.


[링크 : http://www.devicetree.org/Main_Page]

[링크 : http://en.wikipedia.org/wiki/Device_tree]

    [링크 : http://www.elinux.org/images/a/ad/Arm-soc-checklist.pdf]


dtc는 device tree compiler로

텍스트 파일을 바이너리로 컴파일 해주며 일종의.. 구조체로 변환하는 느낌이다.

[링크 : https://git.kernel.org/cgit/utils/dtc/dtc.git]

[링크 : http://forum.falinux.com/zbxe/index.php?document_srl=613440&mid=lecture_tip]


fdtdump 를 통해서 바이너리의 내용을 덤프 할 수 있다.

$ dtc -@ -I dts -O dtb -o 1st-overlay.dtb 1st-overlay.dts

$ fdtdump 1st-overlay.dtb


/dts-v1/;

// magic:           0xd00dfeed

// totalsize:       0x106 (262)

// off_dt_struct:   0x38

// off_dt_strings:  0xe8

// off_mem_rsvmap:  0x28

// version:         17

// last_comp_version:    16

// boot_cpuid_phys: 0x0

// size_dt_strings: 0x1e

// size_dt_struct:  0xb0


/ {

    compatible = "brcm,bcm2708";

    fragment@0 {

        target = <0xdeadbeef>;

        __overlay__ {

            status = "okay";

        };

    };

    __fixups__ {

        i2s = "/fragment@0:target:0";

    };

};


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


'Linux' 카테고리의 다른 글

IIO - Industrial I/O  (2) 2015.09.03
insmod / modprobe 차이  (0) 2015.08.25
커널 컴파일 옵션 neon 과 cpu feature  (0) 2015.04.28
쓰레드 / 프로세스  (0) 2015.04.27
리눅스 1분만에 커널 빌드하기  (0) 2015.04.06
Posted by 구차니

라즈베리도 yocto project 적용된게 있나 보네..

다음번에 봐야지.. 귀차나...


[링크 : http://mytechpg.blogspot.kr/2013/06/raspberrypi-and-yocto.html]

[링크 : https://delog.wordpress.com/2014/09/16/embedded-linux-system-for-raspberry-pi-with-yocto-project/]

[링크 : http://git.yoctoproject.org/cgit/cgit.cgi/meta-raspberrypi/]

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

imx8 yocto  (0) 2023.08.28
imx8 yocto build on ubuntu 22.04  (0) 2023.02.10
라즈베리 파이 with yocto project  (2) 2015.07.30
yocto project 구조  (0) 2015.07.29
라즈베리 파이 2 yocto 프로젝트?  (0) 2015.06.08
Posted by 구차니
Linux2015. 4. 28. 22:11

기본값으로 컴파일

$ LD_SHOW_AUXV=1 ls

AT_HWCAP:    half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt

AT_PAGESZ:       4096

AT_CLKTCK:       100

AT_PHDR:         0x10034

AT_PHENT:        32

AT_PHNUM:        9

AT_BASE:         0x76fae000

AT_FLAGS:        0x0

AT_ENTRY:        0x13a6d

AT_UID:          1000

AT_EUID:         1000

AT_GID:          1000

AT_EGID:         1000

AT_SECURE:       0

AT_RANDOM:       0x7eb85e2f

AT_HWCAP2:       0x0

AT_EXECFN:       /bin/ls

AT_PLATFORM:     v7l 


menuconfig 에서 NEON 제거

    *** At least one emulation must be selected ***

[*] VFP-format floating point maths                

[ ]   Advanced SIMD (NEON) Extension support     


cpu 플래그 확인 결과 neon 빠짐

$ LD_SHOW_AUXV=1 ls

AT_HWCAP:    half thumb fastmult vfp edsp vfpv3 tls vfpv4 idiva idivt

AT_PAGESZ:       4096

AT_CLKTCK:       100

AT_PHDR:         0x10034

AT_PHENT:        32

AT_PHNUM:        9

AT_BASE:         0x76f84000

AT_FLAGS:        0x0

AT_ENTRY:        0x13a6d

AT_UID:          1000

AT_EUID:         1000

AT_GID:          1000

AT_EGID:         1000

AT_SECURE:       0

AT_RANDOM:       0x7edf9e2f

AT_HWCAP2:       0x0

AT_EXECFN:       /bin/ls

AT_PLATFORM:     v7l 


일단은.. 라즈베리에서는 cpuinfo 에서도 neon이 빠지긴 한다.

$ cat /proc/cpuinfo

processor       : 0

model name      : ARMv7 Processor rev 5 (v7l)

BogoMIPS        : 38.40

Features        : half thumb fastmult vfp edsp vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm

CPU implementer : 0x41

CPU architecture: 7

CPU variant     : 0x0

CPU part        : 0xc07

CPU revision    : 5 


'Linux' 카테고리의 다른 글

insmod / modprobe 차이  (0) 2015.08.25
리눅스 device tree  (0) 2015.04.29
쓰레드 / 프로세스  (0) 2015.04.27
리눅스 1분만에 커널 빌드하기  (0) 2015.04.06
리눅스 무선랜 유틸리티 - iwlist iwconfig  (0) 2015.03.03
Posted by 구차니
embeded/ARM2015. 4. 28. 10:00

jazelle 가속이 ARMv7 부터 사라진거 봐서는 의미가 없는거 같긴한데

Yes Dalvik makes Jazelle useless. The only question is was Jazelle useful to begin with or is it 90% marketing hype? A good JIT or AOT(ahead of Time) compiler tends to give much better performance than trying to use specialized instructions. The register based approach of Dalvik might be faster than a traditional java bytecode interpreter but if the difference in minor between that of an interpreter and that of a JIT. Hopefully one of the next versions of Android has a JIT.


It takes ~5-10 years to write a good virtual machine with state of the art garbage collectors and optimizers. Sun (and Microsoft) have spent those years. Google hasn't. Hopefully they will keep investing in it so that one day Android Java code isn't a 90% slower than it should be.

[링크 : http://stackoverflow.com/questions/1153076/does-android-castrate-the-arms-jazelle-technology] 


결론은.. 실제적으로 실패한 기술이려나?

There are (at least) 4 different ways of executing Java:


1. interpretation

2. direct hardware execution

3. JIT compilation

4. AOT compilation


In order to answer your question of whether an ARM core with Jazelle

would improve performance you first need to state what you are

currently using, which core and what speed. If you use an interpreter,

anything will give a good speedup.


Note there are 2 versions of Jazelle: DBX which executes byte codes

directly (various ARM9's and all ARM11's support this). This gives

around 4x speedup over interpretation and has no memory or startup

overheads. There is also an optimizer which can improve performance

at runtime. However rather than generating native instructions like a

JIT, it optimizes the bytecode itself.


Jazelle-RCT supports either JIT or AOT compilation into the Thumb-2EE

instruction set (Cortex-A8/Cortex-A9). This gives near native performance

but when using a JIT you get the usual startup and memory overheads

(although far less than when using x86 due to ARM's better code density).


[링크 : http://www.embeddedrelated.com/showthread/comp.arch.embedded/109371-1.php] 


[링크 : http://en.wikipedia.org/wiki/Jazelle]

[링크 : http://en.wikipedia.org/wiki/Ahead-of-time_compilation]

[링크 : http://en.wikipedia.org/wiki/Just-in-time_compilation]

'embeded > ARM' 카테고리의 다른 글

cortex-m 시리즈와 포화연산  (0) 2015.08.26
ARM926EJ / ARMv5TE  (0) 2015.07.28
ltib 패키지 요구사항  (0) 2015.04.13
jffs2 on sd card  (0) 2015.04.09
sd 메모리 카드 블럭 사이즈  (0) 2015.04.09
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 구차니