미친감자~~

Buildroot라는 것에 대해서 설명해봐~


잘 모르겠는데요…

빌드루트?

그게 뭐죠?~~


미친감자…나는 평화주의자야..

예수님의 이름으로 용서할께

싸다구같은것은 안떄릴께..

얼른 찾아봐..



예수쟁이 미감

예수님 감사합니다~~


루트 파일 시스템을  만들어주는 툴입니다.

루트 파일 시스템은  뭐냐?하면..

여기를 보시면 됩니다.

https://goo.gl/vPc4An

https://goo.gl/O1laQF


자...

그럼 제가 구글링고 어쩌고 해서 정리한 것 설명해볼께요~

자...

먼저 git으로 소스를 받아옵니다.(음..rpm은 없나?)

[root@localhost ~]# git clone git://git.buildroot.net/buildroot

Cloning into 'buildroot'...

remote: Counting objects: 188132, done.

remote: Compressing objects: 100% (59389/59389), done.

remote: Total 188132 (delta 129479), reused 186192 (delta 127847)

Receiving objects: 100% (188132/188132), 45.70 MiB | 327.00 KiB/s, done.

Resolving deltas: 100% (129479/129479), done.

Checking connectivity... done.

[root@localhost ~]# cd buildroot/

[root@localhost buildroot]# make menuconfig

.

.

.

음...menuconfig에서

구성을 설정해줍니다.


여기에서 중요한게 있어요~!

#make menuconfig

에서

“Filesystem images”

“ext2/3/4 root filesystem”을 선택해줘야

ext2파임의 root file system 이미지가 만들어집니다.

(이상하네요..이전에는 이런것 선택하지 않아도 알아서 rootfs.ext2을

만들어 줬는데...

암튼...

이번에는

잘 만들어졌습니다.)

결론은,


[root@localhost buildroot]# make clean && make -j4


이렇게 했는데..말입니다.


...이렇게

빌드를 했는데...


저같은 경우


에러가 났습니다...


이렇게요

make[1]: Leaving directory '/root/buildroot'

Your Perl installation is not complete enough; at least the following

modules are missing:


        Thread::Queue


support/dependencies/dependencies.mk:28: recipe for target 'core-dependencies' failed

make: *** [core-dependencies] Error 1



펄 모듈중 Thread::Queue라는 모듈이 없는가 봅니다.


흐…


구글링했습니다...ㅎㅎㅎ

방법은

http://paguilar.org/?p=426 ← 이곳에서 찾았습니다.

cpan이라는 것을 설치하고

Thread::Queue 모듈을 설치하라고 합니다.




$ cpan

cpan shell -- CPAN exploration and modules installation (v2.00)

Enter 'h' for help.


cpan[1]> install Thread/Queue.pm



위 화면은...cpan에서 Thread./Queue를 설치하는 화면입니다.


자 그래서 cpan 부터해서 Thread::Queue 까지 설치했습니다.

다음과 같이요~~~~

[root@localhost buildroot]# dnf install cpan

Last metadata expiration check performed 0:44:25 ago on Tue Dec  1 22:05:13 2015.

Dependencies resolved.

.

.

.



Complete!


cpan 설치하고...



[root@localhost buildroot]# cpan

Loading internal null logger. Install Log::Log4perl for logging messages


CPAN.pm requires configuration, but most of it can be done automatically.

If you answer 'no' below, you will enter an interactive dialog for each

configuration option instead.


Would you like to configure as much as possible automatically? [yes] y


Perl site library directory "/usr/local/share/perl5" does not exist.

Perl site library directory "/usr/local/share/perl5" created.

Perl site library directory "/usr/local/lib/perl5" does not exist.

Perl site library directory "/usr/local/lib/perl5" created.


Autoconfiguration complete.


commit: wrote '/root/.local/share/.cpan/CPAN/MyConfig.pm'


You can re-run configuration any time with 'o conf init' in the CPAN shell

Terminal does not support AddHistory.


cpan shell -- CPAN exploration and modules installation (v2.11)

Enter 'h' for help.


cpan[1]> install Thread/Queue.pm

Fetching with HTTP::Tiny:



이제 설치한

capn을

실행하고...

install Thread/Queue.pm 해주고..

다시 빌드!!!


그런데 빌드하는데 시간이 왜이리 오래 걸리죠?

10분은 넘은 것 같은데

아직도…

계속 빌딩중인군요~~!!


성공여부는 담에…~~!!


그런데...

실패 하고 말았습니다. ^_^;


랜선이 연결되지 않는 바람에...말이다.;;;;;;이런 황당한;;;인간의 실수여~~~~!!!



다시 make ~~~~~

이번에는

음...잘됩니다.

컴파일 잘됩니다.


저것 파이썬 모듈 설치만 하고 나면..잘됩니다.



몇칠이 지나...~~

다시 리눅스를 설치하고

패도라를 설치했어요

다시 buildroot를

빌드했는데...


계속 에러가 나네요...

cap_user_header_t가 정의되어 있지 않다고 하면서 말입니다.


그래서 이번에도

#dnf install openssl-devel gnutls-devel libcap-devel

구굴링해보니까..위에것들을 설치안해서 그런 것 같다고 해서..

다 설치해주고..

https://github.com/hugsy/sstoper/issues/1


에러나는 부분이..

커널에 정의 되어 있는 부분이니까...

} __user *cap_user_header_t;


include\uapi\linux\capability.h

커널 빌드환경도 만들어주고...

# yum install kernel-devel-`uname -r`

이렇게요...


그리고...build 과정에서 이런 메시지를 봤으니까..

which: no flex in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)

which: no bison in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)

>>> host-fakeroot 1.20.2 Building

flex와 bison이 없다고 하는것 같아...

#dnf install flex

#dnf install bison

flex와 bison을 설치했습니다.


음...

이제..

이제~~ 잘되겠죠~~~



음....


에러없이 잘 마무리 되었습니다.


[root@localhost images]# ls -la

total 2800

drwxr-xr-x. 2 root root    4096 Dec  4 19:22 .

drwxr-xr-x. 6 root root    4096 Dec  4 19:18 ..

-rw-r--r--. 1 root root 2286592 Dec  4 19:22 rootfs.ext2

-rw-r--r--. 1 root root 1454080 Dec  4 19:22 rootfs.tar

[root@localhost images]# pwd

/root/buildroot/output/images



rootfs.ext2 파일 보이시죠^^

성공입니다.

ㅋㅋㅋㅋ


자 이제 QEMU로 올려봅시다.

[root@localhost linux]#qemu-system-i386 -kernel arch/x86/boot/bzImage -smp 1 -boot c -m 128M -hda /root/buildroot/output/images/rootfs.ext2 -append "root=/dev/sda rw console=tty0 console=ttyS0 acpi=off" -serial stdio -display none

...

sck is recommended

[    1.978252] EXT4-fs (sda): mounted filesystem without journal. Opts: (null)

[    1.979301] VFS: Mounted root (ext4 filesystem) on device 8:0.

[    1.992502] devtmpfs: mounted

[    2.031514] Freeing unused kernel memory: 804K (c0e3f000 - c0f08000)

[    2.034240] Write protecting the kernel text: 7056k

[    2.035579] Write protecting the kernel read-only data: 2696k

[    2.204451] EXT4-fs (sda): re-mounted. Opts: errors=remount-ro

Starting logging: OK

[    2.458735] random: nonblocking pool is initialized

Initializing random number generator... done.

Starting network...


Welcome to Buildroot

buildroot login: root



오~~~

성공~~~~!!!


할렐루야~~


rm -rf /test/

이렇게 하면

^____^

/test라는 디렉토리 밑의 모든

하위 디렉토리 및 파일을

삭제한다.

음.../

음.../

gdb는 어떻게 멈출수 있죠?


윈도우즈 같은 경우…

Ctrl+Break

키를 눌러주면…

잘 돌다가도 멈춘다…


그런데 gdb는 어떻게 멈출까요?



“미친감자 그걸 몰라?”

“실망이구먼~미친감자”


“예 죄송합니다.”

“구글링해보겠습니다.”;;;






E.8 Interrupts

When a program on the remote target is running, gdb may attempt to interrupt it by sending a ‘Ctrl-C’, BREAK or a BREAK followed by g, control of which is specified via gdb's ‘interrupt-sequence’.


출처 : https://sourceware.org/gdb/onlinedocs/gdb/Interrupts.html




Ctrl + C

흐흐흐.
gdb는 ‘Ctrl + C’를 입력 해주면..

달리다 멈춥니다.


윈도우 Windbg 는 ‘Ctrl + Break’ ~!

gdb는 ‘Ctrl + C’~!



​​




예수님께서 말씀하신 믿음의 수준​~~~
​마음으로 하는것이 죄다
그게 살인 하는 마음이다
그렇다 난 살인자인것이다
마음으로 미워했으니까
미워하고 있으니까
그렇다 사실이더라도
미워하지 말아야한다
왜냐하면 하나님의 형상에게 한것이니까

인간은 하나님의 말씀의 수준을 교묘하게 낮춘다

명령에는 두가지가 있다
ㅡ언제까지 하지마가 있고(기간)
ㅡ영원히 하지마가 있다(평생)

언제까지의 명령 중에는 예수님때까지가 많다

내 안에 있는 것으로 심판한다.
드러난것도 심판하시만~

구약의 요약은 '내가 거룩한것 처럼 너희도 거룩하라'이다

하나님을 누가 대적하죠?
적그리스도?
믿는자들도 대적한다 이 건 무서운 사실이다

하나님의 수준에 맞는 거룩함의 몸부림이 있어야하는데 그게 없으면, 그게 하나님을 대적하는 것이다

살인은 육체적인것 만은 아니라 마음과 생각으로 하는것도 예수님께서 말씀하신 살인이다.

촌철살인 : 한마디로 사람을 죽이는 것

다른 사람에 대해서는 내 마음속에서 부터 나보다 낫게 생각하는것이 예수를 믿는것 이다


촌철활인 : 한마디로 사람을 살리는 것

로제카이로 일화^^





하나님은 영혼을 육체보다 더 중요시 여기신다






저는 리눅스를 

사랑할려고 합니다.

그러기에...

그 속으로 들어갑니다.~~~~

GDB와 함께~~~~

아자 

Holy Spirit~~

Give me the wisdom~~!!


미친감자~~

Buildroot라는 것에 대해서 설명해봐~


잘 모르겠는데요…

빌드루트?

그게 뭐죠?~~


미친감자…나는 평화주의자야..

예수님의 이름으로 용서할께

싸다구같은것은 안떄릴께..

얼릉 찾아봐..



예수님 감사합니다~~(저는 완전 예수쟁이입니다.)


그런데..에러가 납니다.



[root@localhost ~]# git clone git://git.buildroot.net/buildroot

Cloning into 'buildroot'...

remote: Counting objects: 188132, done.

remote: Compressing objects: 100% (59389/59389), done.

remote: Total 188132 (delta 129479), reused 186192 (delta 127847)

Receiving objects: 100% (188132/188132), 45.70 MiB | 327.00 KiB/s, done.

Resolving deltas: 100% (129479/129479), done.

Checking connectivity... done.

[root@localhost ~]# cd buildroot/

[root@localhost buildroot]# make menuconfig

.

.

.





[root@localhost buildroot]# make clean && make -j4


이렇게 했는데..말입니다.

미친감자님~~에러가 납니다.



make[1]: Leaving directory '/root/buildroot'

Your Perl installation is not complete enough; at least the following

modules are missing:


        Thread::Queue


support/dependencies/dependencies.mk:28: recipe for target 'core-dependencies' failed

make: *** [core-dependencies] Error 1



이렇게 했는데..말입니다.

펄 모듈중 Thread::Queue라는 모듈이 없는가 봅니다.


흐…


방법은

http://paguilar.org/?p=426 ← 이곳에서 찾았습니다.





$ cpan

cpan shell -- CPAN exploration and modules installation (v2.00)

Enter 'h' for help.


cpan[1]> install Thread/Queue.pm



이렇게 하랍니다.



자 해봅니다.

자 그래서 cpan 부터해서 Thread::Queue 까지 설치했습니다.



[root@localhost buildroot]# dnf install cpan

Last metadata expiration check performed 0:44:25 ago on Tue Dec  1 22:05:13 2015.

Dependencies resolved.

.

.

.



Complete!


cpan 설치하고...



[root@localhost buildroot]# cpan

Loading internal null logger. Install Log::Log4perl for logging messages


CPAN.pm requires configuration, but most of it can be done automatically.

If you answer 'no' below, you will enter an interactive dialog for each

configuration option instead.


Would you like to configure as much as possible automatically? [yes] y


Perl site library directory "/usr/local/share/perl5" does not exist.

Perl site library directory "/usr/local/share/perl5" created.

Perl site library directory "/usr/local/lib/perl5" does not exist.

Perl site library directory "/usr/local/lib/perl5" created.


Autoconfiguration complete.


commit: wrote '/root/.local/share/.cpan/CPAN/MyConfig.pm'


You can re-run configuration any time with 'o conf init' in the CPAN shell

Terminal does not support AddHistory.


cpan shell -- CPAN exploration and modules installation (v2.11)

Enter 'h' for help.


cpan[1]> install Thread/Queue.pm

Fetching with HTTP::Tiny:




음…

capn을 실행하고...

install Thread/Queue.pm 해주고..

다시 빌드!!!


그런데 빌드하는데 시간이 왜이리 오래 걸리죠?

10분은 넘은것 같은데

아직도…

계속 빌딩중인군요~~!!


성공여부는 담에…~~!!







리눅스에서 현재 시간을 알고 싶을 땐


date 를 입력하세요~~~

[root@localhost ~]# date

2015. 11. 24. (화) 22:22:56 KST





참고

http://mwultong.blogspot.com/2006/10/linux-date-command.html


자 이번에는

리눅스에서

하위 디렉토리에서 파일의 내용을 찾는 명령은?


grep -r "찾을 문자열" ./*


대소문자 구분하지 않기?


-i : 지정한 문자열에 대소문자 구분하지 않기




grep -ri "찾을 문자열" ./*


이렇게 하면 된다는것~~



+ Recent posts