用buildroot打造自己的Linux Toolchain

For quite a long time, building a cross toolchain from the scratch seems like a nightmare to most embedded software engineers. This used to require hanlding a lot of interdependent source packages as well as their patches carefully.

With the assist of buildroot, which is made available along with well-known uclibc, things used to be a mess can be well handled by just a few simple commands.

Below is my attempt to build an arm toolchain:

1) Download the latest buildroot snapshot from uclibc.org. Like all other packages offered by uclibc, it has a fantastic DAILY snapshot.

2) Unpack the buildroot snapshot package like this:
# tar -jxvf buildroot-200xxxxxx.tar.bz2

3) Configure the buildroot. This looks quite alike with configuring linux kernel features. For me, I just need an arm toolchain integrated with the lightweight uclibc instead of the heavy glibc. So, I just made some simple changes within the toolchain menu. Probably, buildroot can be used to build other embedded components like linux kernel, busybox, even tinyx.

# make menuconfig  

4) Execute the build command. This supposes to take quite a long while to do a batch of traffic jobs like downloading different source packages, applying patches, compling the source code and etc. Please find youself a favorite computer game to kill the time..

# make


5) Finally, if everything is all right, you will have your toolchain in the build_arm sub-folder. To make the toolchain work, probably you have to add the path that contains the executable files like arm-linux-gcc, arm-linux-g++ into your $PATH environment.

Enjoy it.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值