embeded/odroid2016. 10. 23. 20:54

일단 다시 검색해서 해보려는데 영안되는건 마찬가지네..

[링크 : http://forum.odroid.com/viewtopic.php?f=99&t=6611]


$ blender

Color management: using fallback mode for management

connect failed: No such file or directory

libGL error: MESA-LOADER: malformed or no PCI ID

libGL error: dlopen /usr/lib/arm-linux-gnueabihf/dri/exynos_dri.so failed (/usr/lib/arm-linux-gnueabihf/dri/exynos_dri.so: cannot open shared object file: No such file or directory)

libGL error: dlopen ${ORIGIN}/dri/exynos_dri.so failed (${ORIGIN}/dri/exynos_dri.so: cannot open shared object file: No such file or directory)

libGL error: dlopen /usr/lib/dri/exynos_dri.so failed (/usr/lib/dri/exynos_dri.so: cannot open shared object file: No such file or directory)

libGL error: unable to load driver: exynos_dri.so

libGL error: driver pointer missing

libGL error: failed to load driver: exynos

Writing: /tmp/blender.crash.txt

Segmentation fault 


/usr/lib/arm-linux-gnueabihf$ ll libdrm_exynos.*

-rw-r--r-- 1 root root 12118 may 12 03:41 libdrm_exynos.a

lrwxrwxrwx 1 root root    22 may 12 03:40 libdrm_exynos.so -> libdrm_exynos.so.1.0.0

lrwxrwxrwx 1 root root    22 may 12 03:40 libdrm_exynos.so.1 -> libdrm_exynos.so.1.0.0

-rw-r--r-- 1 root root 13732 may 12 03:41 libdrm_exynos.so.1.0.0 


drm은 존재하나 dri는 존재하지 않는다!?!?

/usr/lib/arm-linux-gnueabihf/dri$ ll

total 21116

drwxr-xr-x  2 root root    4096 oct  8 21:28 ./

drwxr-xr-x 94 root root   94208 oct 23 21:11 ../

-rw-r--r--  1 root root   13884 abr 16  2014 dummy_drv_video.so

-rw-r--r--  1 root root 2632560 ene 13  2016 nouveau_dri.so

-rw-r--r--  4 root root 2482560 ene 13  2016 nouveau_vieux_dri.so

-rw-r--r--  4 root root 2482560 ene 13  2016 r200_dri.so

-rw-r--r--  1 root root 2186172 ene 13  2016 r300_dri.so

-rw-r--r--  1 root root 2550644 ene 13  2016 r600_dri.so

-rw-r--r--  4 root root 2482560 ene 13  2016 radeon_dri.so

-rw-r--r--  1 root root 2086952 ene 13  2016 radeonsi_dri.so

-rw-r--r--  4 root root 2482560 ene 13  2016 swrast_dri.so

-rw-r--r--  1 root root 2096024 ene 13  2016 vmwgfx_dri.so 


odroid-utiltity.sh 실행중에 업데이트 되는 녀석이 있는데

얘는 X11 DDX 인가. .먼가 그거 업데이트 하는 녀석

$ armsoc.sh

bash: /usr/local/bin/armsoc.sh: Permission denied 


$ cat /usr/local/bin/armsoc.sh

#!/bin/bash


rebuild_armsoc() { 

get_board 

if [ "$BOARD" = "odroidxu" ]; then

armsoc_err_not_supported

return

fi

if [ "$BOARD" = "odroidc" ]; then

apt-get -y update

apt-get -y dist-upgrade

msgbox "All updates performed. You don't need to run any other updates."

return

fi

do_5422_1504_apt_update

if [ "$DISTRO" = "ubuntu" ]; then

armsoc_rebuild_ubuntu

elif [ "$DISTRO" = "debian" ]; then

armsoc_rebuild_debian

else

armsoc_err_not_supported

fi

}


armsoc_rebuild_ubuntu() { 

if [ "$BOARD" = "odroidxu3" ]; then

msgbox "ODROID-XU3 isn't supported yet"

return

fi

root=/tmp/armsoc-update

buildlog=/root/armsoc-update-$DATE.txt

mkdir -p $root

cd $root

# Install dependencies.

apt-get -y build-dep xserver-xorg-video-armsoc

# Download the blobs

dlf builder.mdrjr.net/tools/u3/4412_r5p0_x11.tar.xz "Downloading Mali Binaries" $root/mali.tar.xz

# Download armsoc DDX from github

dlf https://github.com/mdrjr/xf86-video-armsoc/archive/r4p0.zip "Downloading ARMSOC DDX Sources from Github" $root/ddx.zip

echo "Building Mali DDX and Installing Binaries. Please wait"

echo "Saving build logs to $buildlog"

# Unpack

xz -d mali.tar.xz &>> $buildlog

tar xf mali.tar &>> $buildlog

unzip -qq ddx.zip &>> $buildlog

# Build DDX

cd xf86-video-armsoc-r4p0

./autogen.sh --with-drmmode=exynos --prefix=/usr &>> $buildlog

make -j4 &>> $buildlog

make install &>> $buildlog

cd ..

# Install new Binaries

cd mali

cp -aRP lib* /usr/lib

cp -aRP lib* /usr/lib/arm-linux-gnueabihf/mali-egl

ldconfig

cp config/xorg.conf /etc/X11/xorg.conf

sync

msgbox "Mali is now updated. If something fails or isn't working report on the forums with the following file: $buildlog"

}


armsoc_rebuild_debian() { 

if [ "$BOARD" = "odroidxu3" ]; then

msgbox "ODROID-XU3 isn't supported yet"

return

fi

root=/tmp/armsoc-update

buildlog=/root/armsoc-update-$DATE.txt

mkdir -p $root

cd $root

echo "Debian requires some extra packages to build. We are installing it.. Please wait."

# debian requires some extra packages to build the DDX. So.. lets install it

apt-get -y build-dep xserver-xorg-video-modesetting xserver-xorg-video-nouveau &>> $buildlog

apt-get -y install build-essential git xz-utils xserver-xorg-dev libudev-dev &>> $buildlog

# Download the blobs

dlf builder.mdrjr.net/tools/u3/4412_r5p0_x11.tar.xz "Downloading Mali Binaries" $root/mali.tar.xz

# Download armsoc DDX from github

dlf https://github.com/mdrjr/xf86-video-armsoc/archive/r4p0.zip "Downloading ARMSOC DDX Sources from Github" $root/ddx.zip

echo "Building Mali DDX and Installing Binaries. Please wait"

echo "Saving build logs to $buildlog"

# Unpack

xz -d mali.tar.xz &>> $buildlog

tar xf mali.tar &>> $buildlog

unzip -qq ddx.zip &>> $buildlog

# Build DDX

cd xf86-video-armsoc-r4p0

./autogen.sh --with-drmmode=exynos --prefix=/usr &>> $buildlog

make -j4 &>> $buildlog

make install &>> $buildlog

cd ..

# Install new Binaries

cd mali

cp -aRP lib* /usr/lib

ldconfig

cp config/xorg.conf /etc/X11/xorg.conf

cd /tmp && rm -fr $root

sync

msgbox "Mali is now updated. If something fails or isn't working report on the forums with the following file: $buildlog"

}


armsoc_err_not_supported() {

msgbox "ARMSOC: Your distro isn't supported. Report this on the forums -> Distro $DISTRO and board $BOARD"

}


DDX 깔고 나니 먼가 추가되긴 한데...

/usr/lib/arm-linux-gnueabihf/mali-egl$ ll

total 1172

drwxr-xr-x  2 root root    4096 oct 23 22:19 ./

drwxr-xr-x 94 root root   94208 oct 23 21:11 ../

-rw-r--r--  1 root root      38 may  8  2014 ld.so.conf

lrwxrwxrwx  1 root root      11 feb 18  2015 libEGL.so -> libEGL.so.1*

lrwxrwxrwx  1 root root      13 feb 18  2015 libEGL.so.1 -> libEGL.so.1.4*

lrwxrwxrwx  1 root root      10 feb 18  2015 libEGL.so.1.4 -> libMali.so*

lrwxrwxrwx  1 root root      17 feb 18  2015 libGLESv1_CM.so -> libGLESv1_CM.so.1*

lrwxrwxrwx  1 root root      19 feb 18  2015 libGLESv1_CM.so.1 -> libGLESv1_CM.so.1.1*

lrwxrwxrwx  1 root root      10 feb 18  2015 libGLESv1_CM.so.1.1 -> libMali.so*

lrwxrwxrwx  1 root root      14 feb 18  2015 libGLESv2.so -> libGLESv2.so.2*

lrwxrwxrwx  1 root root      16 feb 18  2015 libGLESv2.so.2 -> libGLESv2.so.2.0*

lrwxrwxrwx  1 root root      10 feb 18  2015 libGLESv2.so.2.0 -> libMali.so*

-rwxr-xr-x  1 root root 1066735 feb 18  2015 libMali.so*

-rw-r--r--  1 root root   22232 feb 22  2013 libUMP.so


Open Source Mali GPUs Linux EXA/DRI2 and X11 Display Drivers

[링크 : http://malideveloper.arm.com/.../open-source-mali-gpus-linux-exadri2-and-x11-display-drivers/...]



log$ grep "EE" Xorg.0.log

[   593.576] (EE) AIGLX error: dlopen of /usr/lib/arm-linux-gnueabihf/dri/armsoc_dri.so failed (/usr/lib/arm-linux-gnueabihf/dri/armsoc_dri.so: cannot open shared object file: No such file or directory)

[   593.576] (EE) AIGLX: reverting to software rendering 


아놔.. 이거 하고 나니 이제 odroid 계정으로 xwin을 구동할수도 없네 -_-

머야?!?!

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

X 시작을 못하는 이유..2  (0) 2016.10.25
X 시작을 못하는 이유..?  (0) 2016.10.24
odorid u3 emmc+sd 설치 순서  (0) 2016.10.22
odroid u3 릴리즈 노트의 중요한... 내용?  (0) 2016.10.22
넌 또 왜 난리니 ㅠㅠ  (0) 2016.10.21
Posted by 구차니
embeded/Cortex-M4 Ti2016. 10. 22. 14:27

음.. lm3s랑 tm4c driverlib을 보다 보니..


tm4c

static void

_HibernateWriteComplete(void)

{

    //

    // Spin until the write complete bit is set.

    //

    while(!(HWREG(HIB_CTL) & HIB_CTL_WRC))

    {

    }

}


void

HibernateEnableExpClk(uint32_t ui32HibClk)

{

    //

    // Turn on the clock enable bit.

    //

    HWREG(HIB_CTL) |= HIB_CTL_CLK32EN;


    //

    // Wait for write complete following register load (above).

    //

    _HibernateWriteComplete();


코드 분위기를 보아하니.. HibernateEnableExpClk()는 쓰지 말고, 얘를 쓰면 될 듯?

void

HibernateClockConfig(uint32_t ui32Config)

{

    uint32_t ui32HIBCtl;


    ASSERT((ui32Config & ~(HIBERNATE_OSC_HIGHDRIVE | HIBERNATE_OSC_LOWDRIVE |

                           HIBERNATE_OSC_DISABLE)) == 0);


    ui32HIBCtl = HWREG(HIB_CTL);


    //

    // Clear the current configuration bits.

    //

    ui32HIBCtl &= ~(HIBERNATE_OSC_HIGHDRIVE | HIBERNATE_OSC_LOWDRIVE |

                    HIBERNATE_OSC_LFIOSC | HIBERNATE_OSC_DISABLE);


    //

    // Set the new configuration bits.

    //

    ui32HIBCtl |= ui32Config & (HIBERNATE_OSC_HIGHDRIVE |

                                HIBERNATE_OSC_LOWDRIVE |

                                HIBERNATE_OSC_LFIOSC |

                                HIBERNATE_OSC_DISABLE);


    //

    // Must be sure that the 32KHz clock is enabled if the hibernate is about

    // to switch to it.

    //

    if(ui32Config & HIBERNATE_OSC_LFIOSC)

    {

        ui32HIBCtl |= HIB_CTL_CLK32EN;

    }


    //

    // Set the hibernation clocking configuration.

    //

    HWREG(HIB_CTL) = ui32HIBCtl;


    //

    // Wait for write completion

    //

    _HibernateWriteComplete();


    //

    // Write the output clock configuration for devices that support

    // controlling the output clocks from the hibernate module.

    //

    if(HIBERNATE_CLOCK_OUTPUT)

    {

        HWREG(HIB_CC) = ui32Config & (HIBERNATE_OUT_SYSCLK |

                                      HIBERNATE_OUT_ALT1CLK);

    }


lm3s

void

HibernateEnableExpClk(unsigned long ulHibClk)

{

    //

    // Turn on the clock enable bit.

    //

    HWREG(HIB_CTL) |= HIB_CTL_CLK32EN;


    //

    // For Fury-class devices, compute the number of delay loops that must be

    // used to achieve the desired delay for writes to the hibernation

    // registers.  This value will be used in calls to SysCtlDelay().

    //

    if(CLASS_IS_FURY)

    {

        g_ulWriteDelay = (((ulHibClk / 1000) * DELAY_USECS) /

                          (1000L * LOOP_CYCLES));

        g_ulWriteDelay++;

    }

}


tm4c 레지스터

WRC는 WR Complete 확인용인데 여기서 벗어나질 못하네



CLK32EN은.. tm4c 되면서 클럭이 무조건 32k로 바뀌었으니..



+

크리스탈이 발진 안하면 루프를 못 빠져 나오나?


The only time that I know of if the code loops like this is if the 32768Hz clock is not getting started. if this is a custom board can you make sure that the 32768Hz crystal is well mounted/soldered?

[링크 : https://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/t/393107]

'embeded > Cortex-M4 Ti' 카테고리의 다른 글

tm4c hibernate module oscillator 관련  (0) 2016.10.26
tm4c 비교표  (0) 2016.10.26
tm4c ..어라? hibernate...  (0) 2016.10.20
tm4c123 rtc hibernate module  (0) 2016.09.28
tm4c uart fifo/buffer 문제  (0) 2016.09.28
Posted by 구차니
embeded/odroid2016. 10. 22. 10:50

아니.. 은근 까다로운 녀석일세..

부팅시 장치명 문제로 인해서

파티션 재조정하다가 뻗는 등 이상한 현상이.. 끄응



1. win32Imager로 eMMC에 쓴다.

2. eMMC를 꼽고 sd를 제거하고 부팅을 한다.

3. odroid-utiltiy.sh를 통해 파티션 조정을 예약한다.

4. sd를 꼽지 말고 재부팅한다.

5. 패키지 업데이트 한다.

6. odroid-utiltiy.sh를 통해 커널을 원복한다.



아오....

Posted by 구차니
embeded/odroid2016. 10. 22. 09:52

크롬 가속이랑 창이 느리게 옮겨지는건 window manager를 바꾸라는데

그러면 단축키가 지원하지 않는다고?

끄응..


GPU acceleration on the Chromium Web browser

/etc/chromium-browser/default

CHROMIUM_FLAGS=" --use-gl=egl --ignore-gpu-blacklist --disable-accelerated-2d-canvas --num-raster-threads=2"


Slow window moving

menu/settings/Default applications for LXSession –> Core applications –> Windows manager –> metacity

Note that, the metacity doesn't support the short-cut keys well. 


[링크 : http://odroid.com/dokuwiki/doku.php?id=en:u3_ubuntu_release_note_20150224]


+

원래는 openbox인데 이걸


metacity로 설정하면 확실히 빨라는 지는데

스크린샷이라던가 터미널 단축키라던가 안되는 소소한(?) 문제가 있다.

해결할 방법이 영 없네...


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

odroid에서 blender 재시도.. 실패 -_-  (0) 2016.10.23
odorid u3 emmc+sd 설치 순서  (0) 2016.10.22
넌 또 왜 난리니 ㅠㅠ  (0) 2016.10.21
odroid u3 커널빌드... 재시도  (0) 2016.10.19
odroid ubuntu 14.04 LTS / gcc-4.7  (0) 2016.10.19
Posted by 구차니
embeded/odroid2016. 10. 21. 08:51

집에 가서 odroid 가지고 놀고 끄고 다시 켜려는데

어라 한대가 갑자기 안켜진다?!?!?


아놔... 결국(?)에는 eMMC 랑 또 주말에 씨름해야 하나? ㅠㅠ



엌? 커널 업데이트 하다가 커널 날아갔나?

OK


U-Boot 2010.12-svn (May 12 2014 - 15:05:46) for Exynox4412



CPU: S5PC220 [Samsung SOC on SMP Platform Base on ARM CortexA9]

APLL = 1000MHz, MPLL = 880MHz

DRAM:  2 GiB


PMIC VERSION : 0x00, CHIP REV : 3

TrustZone Enabled BSP

BL10version: 20121128



Checking Boot Mode ... EMMC4.41

REVISION: 2.0

Manufacture ID 0x11 [ 7456MB ]

NAME: S5P_MSHC4

MMC Device 0: 7456 MB

MMC Device 1: 14804 MB

MMC Device 2 not found

*** Warning - using default environment


USB3503 NINT = OUTPUT0LOW!

ModeKey Check... run normal_boot

No ethernet found.

Hit any0key to stop autoboot:  0

Exynos4412 # boot

do_fat_cfgload : cmd = fatload mmc 0:1 0x41000000 boot.ini

reading boot.ini

** Unable0to read file boot.ini **

NAME: S5P_MSHC4

NAME: S5P_MSHC4

>>> Load Boot Script from mmc 0:1 <<<

reading boot.scr

Warning : Reads a file that is smaller than the cluster size.

355 bytes read in 46 ms (6.8 KiB/s)

##0Executing script at 40008000

reading zImage

** Unable to read file zImage **

reading0uInitrd

Warning : Reads a file that is smaller than the cluster size.

64 bytes read in 32 ms (2 KiB/s)

## Booting kernel from Legacy Image at 40008000 ...

   Image0Name:  0

  0Image Type:   ARM Linux Script (uncompressed)

   Data Size:    291 Bytes = 291 Bytes

  0Load Address: 00000000

   Entry Point:  00000000

   Contents:

   0 0Image 0: 283 Bytes = 283 Bytes

0 0Verifying Checksum ... OK

Wrong Image Type for bootm command

ERROR: can't get kernel image!

Exynos4412 # 


+

커널 복사해줘도 자동 부팅 안되서

결론 에라이 걍 밀자 -_-

Exynos44120# pri

baudrate=115200

bootargs=fb_x_res=1280 fb_y_res=720 hdmi_phy_res=720

bootcmd=    cfgload; mmc rescan 0:1; mmc rescan 0:2;  if run loadbootscript_1;

bootdelay=1

bootscript=source 40008000

cfg_file_name=boot.ini

cfg_load_base_mem=41000000

cfg_load_device=0

cfg_load_partition=1

cfg_load_partition_type=fat

copy_uboot_emmc2sd=emmc open 0;movi r z f 0 40000000;emmc close 0;movi0w f 1 40;

copy_uboot_sd2emmc=movi r f 0 40000000;emmc open 1;movi w z f 1 40000000;emmc c;

default_bootcmd=echo0>>> Run Default Bootcmd <<<;movi read kernel 0 40008000;mo0

erase_uboot_env=mmc write 0 0x40008000 0x977 0x20;

ethaddr=00:40:5c:26:0a:5b

extra_arg_0=0

extra_arg_1=0

extra_arg_2=0

extra_arg_3=0

gatewayip=192.168.0.1

ipaddr=192.168.0.20

loadbootscript_1=echo >>> Load Boot Script from mmc 0:1 <<<;fatload mmc 0:1 400r

loadbootscript_2=echo >>> Load Boot Script from mmc 0:2 <<<;fatload mmc 0:20400r

netmask=255.255.255.0

serverip=192.168.0.10

usb_invert_clken=0


Environment size: 1706/16380 bytes 


우찌된게..

시리얼만 꽂아 두기만 해도 부팅이 멈추지?

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

odorid u3 emmc+sd 설치 순서  (0) 2016.10.22
odroid u3 릴리즈 노트의 중요한... 내용?  (0) 2016.10.22
odroid u3 커널빌드... 재시도  (0) 2016.10.19
odroid ubuntu 14.04 LTS / gcc-4.7  (0) 2016.10.19
gcc std c99와 asm  (0) 2016.10.19
Posted by 구차니
embeded/Cortex-M4 Ti2016. 10. 20. 22:22

driverlib 데이터시트..


HIBRTCSS가 헤더에 없다 -ㅁ-?

이걸 써야 hibernate module rtc counter mode를 쓸수 있는데?!?!





'embeded > Cortex-M4 Ti' 카테고리의 다른 글

tm4c 비교표  (0) 2016.10.26
tm4c HibernateEnableExpClk() 차이점  (0) 2016.10.22
tm4c123 rtc hibernate module  (0) 2016.09.28
tm4c uart fifo/buffer 문제  (0) 2016.09.28
lm3s tm4c 시스템 클럭 차이점  (0) 2016.09.24
Posted by 구차니
embeded/odroid2016. 10. 19. 21:00

make 자체에 -std=gnu89 가 포함되어 있는데..

3.8.y 브랜치만 받아서 다시 시도하니 또 되는거 같기도 하고.. 머지?


[링크 : https://github.com/hardkernel/linux/commit/0796298c8e592c664b7013e02fccdfa56a5da132]


한시간이 채 안걸린거 같은데..

성능이 의외로 좋아진건가?


$ find ./ -name zImage

./arch/arm/boot/zImage 


+

도대체 머가 꼬여서 이런 개고생을 한거지 ㄷㄷㄷ


real    27m3.279s

user    94m24.020s

sys     7m43.415s



시간 상으로는 대충.. 9:32 ~ 10:00

28분.. 예상외로 성능 좋네... AMD 싱글 코어 보다 나은듯(어?)

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

odroid u3 릴리즈 노트의 중요한... 내용?  (0) 2016.10.22
넌 또 왜 난리니 ㅠㅠ  (0) 2016.10.21
odroid ubuntu 14.04 LTS / gcc-4.7  (0) 2016.10.19
gcc std c99와 asm  (0) 2016.10.19
odroid 커널 빌드(on odroid) 실패  (0) 2016.10.17
Posted by 구차니
embeded/odroid2016. 10. 19. 20:08

강제로 실행은 되려나..

옵션이.. c99가 빠져있네..


$ sudo apt-get install gcc-4.7

$ gcc-4.7 -v

Using built-in specs.

COLLECT_GCC=/usr/bin/gcc-4.7.real

COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.7/lto-wrapper

Target: arm-linux-gnueabihf

Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.7.3-12ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-gnu-unique-object --disable-libmudflap --disable-libitm --enable-plugin --with-system-zlib --enable-objc-gc --with-cloog --enable-cloog-backend=ppl --disable-cloog-version-check --disable-ppl-version-check --enable-multiarch --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-werror --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf

Thread model: posix

gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-12ubuntu1)


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

넌 또 왜 난리니 ㅠㅠ  (0) 2016.10.21
odroid u3 커널빌드... 재시도  (0) 2016.10.19
gcc std c99와 asm  (0) 2016.10.19
odroid 커널 빌드(on odroid) 실패  (0) 2016.10.17
odroid 커널 distcc 성공?  (0) 2016.10.17
Posted by 구차니
embeded/odroid2016. 10. 19. 18:37

c99 에서는 asm 확장을 지원하지 않는다라..


asm() doesn't seem to work with -std=c99. It's a bad idea in my opinion, since the standard actually suggests that compilers support an asm() keyword, but it isn't mandatory. 


Try -std=gnu99


[링크 : http://stackoverflow.com/questions/755457/asm-in-c-gives-an-error-with-std-c99]



-std=

Determine the language standard. This option is currently only supported when compiling C or C ++ .

The compiler can accept several base standards, such as c89 or c++98, and GNU dialects of those standards, such as gnu89 or gnu++98. By specifying a base standard, the compiler will accept all programs following that standard and those using GNU extensions that do not contradict it. For example, -std=c89 turns off certain features of GCC that are incompatible with ISO C90, such as the "asm" and "typeof" keywords, but not other GNU extensions that do not have a meaning in ISO C90, such as omitting the middle term of a "?:" expression. On the other hand, by specifying a GNU dialect of a standard, all features the compiler support are enabled, even when those features change the meaning of the base standard and some strict-conforming programs may be rejected. The particular standard is used by -pedantic to identify which features are GNU extensions given that version of the standard. For example -std=gnu89 -pedantic would warn about C ++ style // comments, while -std=gnu99 -pedantic would not.


A value for this option must be provided; possible values are


c89

iso9899:1990

Support all ISO C90 programs (certain GNU extensions that conflict with ISO C90 are disabled). Same as -ansi for C code.

iso9899:199409

ISO C90 as modified in amendment 1.

c99

c9x


iso9899:1999

iso9899:199x

ISO C99. Note that this standard is not yet fully supported; see <http://gcc.gnu.org/gcc-4.4/c99status.html> for more information. The names c9x and iso9899:199x are deprecated.

gnu89

GNU dialect of ISO C90 (including some C99 features). This is the default for C code.

gnu99

gnu9x

GNU dialect of ISO C99. When ISO C99 is fully implemented in GCC , this will become the default. The name gnu9x is deprecated.

c++98

The 1998 ISO C ++ standard plus amendments. Same as -ansi for C ++ code.

gnu++98

GNU dialect of -std=c++98. This is the default for C ++ code.

c++0x

The working draft of the upcoming ISO C ++ 0x standard. This option enables experimental features that are likely to be included in C ++ 0x. The working draft is constantly changing, and any feature that is enabled by this flag may be removed from future versions of GCC if it is not part of the C ++ 0x standard.

gnu++0x

GNU dialect of -std=c++0x. This option enables experimental features that may be removed in future versions of GCC . 


[링크 : https://linux.die.net/man/1/gcc]

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

odroid u3 커널빌드... 재시도  (0) 2016.10.19
odroid ubuntu 14.04 LTS / gcc-4.7  (0) 2016.10.19
odroid 커널 빌드(on odroid) 실패  (0) 2016.10.17
odroid 커널 distcc 성공?  (0) 2016.10.17
odroid UART0 ...  (0) 2016.10.16
Posted by 구차니
embeded/odroid2016. 10. 17. 23:36

크로스 컴파일은 잘만되던데.. 왜 얘는 안되나... 

include 헤더 문제일려나?


  CC      arch/arm/mach-exynos/cpu-exynos4.o

In file included from include/linux/posix_types.h:4:0,

                 from include/linux/types.h:17,

                 from include/linux/capability.h:16,

                 from include/linux/sched.h:53,

                 from arch/arm/mach-exynos/cpu-exynos4.c:11:

include/linux/stddef.h:10:16: error: expected identifier or ‘(’ before ‘void’

 #define NULL ((void *)0)

                ^

arch/arm/plat-s5p/include/plat/exynos4.h:34:24: note: in expansion of macro ‘NULL’

 #define exynos4_map_io NULL

                        ^

arch/arm/mach-exynos/cpu-exynos4.c:222:13: note: in expansion of macro ‘exynos4_map_io’

 void __init exynos4_map_io(void)

             ^

include/linux/stddef.h:10:23: error: expected ‘)’ before numeric constant

 #define NULL ((void *)0)

                       ^

arch/arm/plat-s5p/include/plat/exynos4.h:34:24: note: in expansion of macro ‘NULL’

 #define exynos4_map_io NULL

                        ^

arch/arm/mach-exynos/cpu-exynos4.c:222:13: note: in expansion of macro ‘exynos4_map_io’

 void __init exynos4_map_io(void)

             ^

include/linux/stddef.h:10:16: error: expected identifier or ‘(’ before ‘void’

 #define NULL ((void *)0)

                ^

arch/arm/plat-s5p/include/plat/exynos4.h:32:29: note: in expansion of macro ‘NULL’

 #define exynos4_init_clocks NULL

                             ^

arch/arm/mach-exynos/cpu-exynos4.c:279:13: note: in expansion of macro ‘exynos4_init_clocks’

 void __init exynos4_init_clocks(int xtal)

             ^

include/linux/stddef.h:10:23: error: expected ‘)’ before numeric constant

 #define NULL ((void *)0)

                       ^

arch/arm/plat-s5p/include/plat/exynos4.h:32:29: note: in expansion of macro ‘NULL’

 #define exynos4_init_clocks NULL

                             ^

arch/arm/mach-exynos/cpu-exynos4.c:279:13: note: in expansion of macro ‘exynos4_init_clocks’

 void __init exynos4_init_clocks(int xtal)

             ^

include/linux/stddef.h:10:16: error: expected identifier or ‘(’ before ‘void’

 #define NULL ((void *)0)

                ^

arch/arm/plat-s5p/include/plat/exynos4.h:35:22: note: in expansion of macro ‘NULL’

 #define exynos4_init NULL

                      ^

arch/arm/mach-exynos/cpu-exynos4.c:410:12: note: in expansion of macro ‘exynos4_init’

 int __init exynos4_init(void)

            ^

include/linux/stddef.h:10:23: error: expected ‘)’ before numeric constant

 #define NULL ((void *)0)

                       ^

arch/arm/plat-s5p/include/plat/exynos4.h:35:22: note: in expansion of macro ‘NULL’

 #define exynos4_init NULL

                      ^

arch/arm/mach-exynos/cpu-exynos4.c:410:12: note: in expansion of macro ‘exynos4_init’

 int __init exynos4_init(void)

            ^

arch/arm/mach-exynos/cpu-exynos4.c:49:24: warning: ‘exynos4_iodesc’ defined but not used [-Wunused-variable]

 static struct map_desc exynos4_iodesc[] __initdata = {

                        ^

arch/arm/mach-exynos/cpu-exynos4.c:148:24: warning: ‘exynos4210_iodesc’ defined but not used [-Wunused-variable]

 static struct map_desc exynos4210_iodesc[] __initdata = {

                        ^

arch/arm/mach-exynos/cpu-exynos4.c:167:24: warning: ‘exynos4210_iodesc_rev_0’ defined but not used [-Wunused-variable]

 static struct map_desc exynos4210_iodesc_rev_0[] __initdata = {

                        ^

arch/arm/mach-exynos/cpu-exynos4.c:176:24: warning: ‘exynos4210_iodesc_rev_1’ defined but not used [-Wunused-variable]

 static struct map_desc exynos4210_iodesc_rev_1[] __initdata = {

                        ^

arch/arm/mach-exynos/cpu-exynos4.c:185:24: warning: ‘exynos4212_iodesc’ defined but not used [-Wunused-variable]

 static struct map_desc exynos4212_iodesc[] __initdata = {

                        ^

arch/arm/mach-exynos/cpu-exynos4.c:209:13: warning: ‘exynos4_idle’ defined but not used [-Wunused-function]

 static void exynos4_idle(void)

             ^

arch/arm/mach-exynos/cpu-exynos4.c:335:26: warning: ‘exynos4_sysdev’ defined but not used [-Wunused-variable]

 static struct sys_device exynos4_sysdev = {

                          ^

arch/arm/mach-exynos/cpu-exynos4.c:395:13: warning: ‘exynos4_sw_reset’ defined but not used [-Wunused-function]

 static void exynos4_sw_reset(void)

             ^

arch/arm/mach-exynos/cpu-exynos4.c:405:22: warning: ‘exynos4_pmu_init_zero’ defined but not used [-Wunused-variable]

 static void __iomem *exynos4_pmu_init_zero[] = {

                      ^

make[1]: *** [arch/arm/mach-exynos/cpu-exynos4.o] Error 1

make: *** [arch/arm/mach-exynos] Error 2 


$ cat ./include/linux/stddef.h

#ifndef _LINUX_STDDEF_H

#define _LINUX_STDDEF_H


#include <linux/compiler.h>


#undef NULL

#if defined(__cplusplus)

#define NULL 0

#else

#define NULL ((void *)0)

#endif


#ifdef __KERNEL__


enum {

        false   = 0,

        true    = 1

};


#undef offsetof

#ifdef __compiler_offsetof

#define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER)

#else

#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)

#endif

#endif /* __KERNEL__ */


#endif 



응?

하늘별

2013-08-20 09:55

220.90.137.100

github에 있는 커널은 리눅스용으로 안드로이드를 지원하고 있지 않습니다. BSP으로 따로 배포하는 커널을 사용 하시기 바랍니다. 

[링크 : http://com.odroid.com/sigong/nf_board/nboard_view.php?brd_id=odroid-x2&kind=&bid=3359]


+

gcc -E - <<<'#include<stddef.h>' | grep stddef.h

[링크 : http://stackoverflow.com/questions/31285258/why-usr-include-linux-stddef-h-is-empty]


+

GCC is taking steps towards C++11, which is probably why you now need to include cstddef in order to use the NULL constant. The preferred way in C++11 is to use the new nullptr keyword, which is implemented in GCC since version 4.6

[링크 : http://stackoverflow.com/questions/462165/error-null-was-not-declared-in-this-scope]



+

x86용 크로스 컴파일러 옵션

$ arm-linux-gnueabihf-gcc -v

Using built-in specs.

COLLECT_GCC=arm-linux-gnueabihf-gcc

COLLECT_LTO_WRAPPER=/opt/toolchains/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/../libexec/gcc/arm-linux-gnueabihf/4.7.3/lto-wrapper

Target: arm-linux-gnueabihf

Configured with: /cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/src/gcc-linaro-4.7-2013.04/configure --build=i686-build_pc-linux-gnu --host=i686-build_pc-linux-gnu --target=arm-linux-gnueabihf --prefix=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/install --with-sysroot=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/install/arm-linux-gnueabihf/libc --enable-languages=c,c++,fortran --enable-multilib --with-arch=armv7-a --with-tune=cortex-a9 --with-fpu=vfpv3-d16 --with-float=hard --with-pkgversion='crosstool-NG linaro-1.13.1-4.7-2013.04-20130415 - Linaro GCC 2013.04' --with-bugurl=https://bugs.launchpad.net/gcc-linaro --enable-__cxa_atexit --enable-libmudflap --enable-libgomp --enable-libssp --with-gmp=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static --with-mpfr=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static --with-mpc=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static --with-ppl=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static --with-cloog=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static --with-libelf=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static --with-host-libstdcxx='-L/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/.build/arm-linux-gnueabihf/build/static/lib -lpwl' --enable-threads=posix --disable-libstdcxx-pch --enable-linker-build-id --enable-gold --with-local-prefix=/cbuild/slaves/oorts/crosstool-ng/builds/arm-linux-gnueabihf-linux/install/arm-linux-gnueabihf/libc --enable-c99 --enable-long-long --with-mode=thumb

Thread model: posix

gcc version 4.7.3 20130328 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.04-20130415 - Linaro GCC 2013.04) 


ubuntu 14.04 / odroid용 컴파일러 옵션

$ gcc -v

Using built-in specs.

COLLECT_GCC=/usr/bin/gcc-4.8.real

COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.8/lto-wrapper

Target: arm-linux-gnueabihf

Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.8.4-2ubuntu1~14.04.3' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-armhf/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-armhf --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-armhf --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-werror --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf

Thread model: posix

gcc version 4.8.4 (Ubuntu/Linaro 4.8.4-2ubuntu1~14.04.3) 


설마.. c99 옵션 차이는 아니겠지?

찾아보니.. long-long에 가깝네..

--enable-c99

The long long type was introduced in C99, along with many other functions for wide characters, and math classification macros, etc. If enabled, all C99 functions not specified by the C++ standard will be put into namespace __gnu_cxx, and then all these names will be injected into namespace std, so that C99 functions can be used "as if" they were in the C++ standard (as they will eventually be in some future revision of the standard, without a doubt). By default, C99 support is on, assuming the configure probes find all the necessary functions and bits necessary. This option can change the library ABI. 


[링크 : https://gcc.gnu.org/onlinedocs/libstdc++/manual/configure.html]

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

odroid ubuntu 14.04 LTS / gcc-4.7  (0) 2016.10.19
gcc std c99와 asm  (0) 2016.10.19
odroid 커널 distcc 성공?  (0) 2016.10.17
odroid UART0 ...  (0) 2016.10.16
odroid u3 uart 마지막... 희망(?)  (0) 2016.10.15
Posted by 구차니