미친감자~~

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



오~~~

성공~~~~!!!


할렐루야~~

미친감자~~

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분은 넘은것 같은데

아직도…

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


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







+ Recent posts