개발 환경
OS : Ubuntu 22.04 LTS (WSL2)
개발 보드 : beaglebone black
crosstool-ng : 1.27.0
참고 문서
1) u-boot Document
https://docs.u-boot.org/en/latest/index.html
2) Mastering-Embedded-Linux-Programming-Second-Edition github
https://github.com/PacktPublishing/Mastering-Embedded-Linux-Programming-Second-Edition
1. u-boot를 위한 crosstool-ng 빌드
먼저 아래 링크의 포스트를 따라하여 crosstool-ng를 빌드해주기 바랍니다.
https://littlebitodd-developer.tistory.com/16
Beaglebone Black를 위한 crosstool-ng 빌드 방법 (v1.27.0)
개발 환경 OS : Ubuntu 22.04 LTS (WSL2) 개발 보드 : beaglebone black 공식 홈페이지의 설치 방법을 따라 설치 하였습니다.https://crosstool-ng.github.io/docs/install/ Installing crosstool-NGBefore installing crosstool-NG, you ma
littlebitodd-developer.tistory.com
2. 사전 패키지 설치
sudo apt-get install bc bison build-essential coccinelle \
device-tree-compiler dfu-util efitools flex gdisk graphviz imagemagick \
liblz4-tool libgnutls28-dev libguestfs-tools libncurses-dev \
libpython3-dev libsdl2-dev libssl-dev lz4 lzma lzma-alone openssl \
pkg-config python3 python3-asteval python3-coverage python3-filelock \
python3-pkg-resources python3-pycryptodome python3-pyelftools \
python3-pytest python3-pytest-xdist python3-sphinxcontrib.apidoc \
python3-sphinx-rtd-theme python3-subunit python3-testtools \
python3-virtualenv swig uuid-dev
3. 소스코드 준비
git clone https://source.denx.de/u-boot/u-boot.git
cd ./u-boot
git checkout v2023.04
4. 환경 변수 설정
PATH=${HOME}/x-tools/arm-cortex_a8-linux-gnueabihf/bin/:$PATH
export CROSS_COMPILE=arm-cortex_a8-linux-gnueabihf-
export ARCH=arm
5. u-boot 빌드
make am335x_evm_defconfig
CROSS_COMPILE=arm-cortex_a8-linuxgnueabihf- make
이전 u-boot에서는 am335x_boneblack_deconfig으로 설정하였지만, 최신 버전에서는 am335x_evm_defconfig으로 통합되었습니다.
해당 내용은 ./u-boot/configs/am335x_evm_defconfig 파일에서 CONFIG_OF_LIST의 내용을 통해 확인 할 수 있습니다.
6. u-boot 결과물 확인
ls ./MLO ./u-boot*
여기서 MLO 파일과 u-boot.img 파일을 SD카드에 넣어 Beaglebone black에서 실행하는 과정은 다른 포스트에서 진행하도록 하겠습니다.
'Embedded > Linux' 카테고리의 다른 글
[Yocto Project] qemu를 위한 리눅스 이미지 빌드 (0) | 2025.03.17 |
---|---|
buildroot 빌드시 PATH 애러 해결 (0) | 2025.03.04 |
Buildroot를 이용하여 Beaglebone용 Linux 빌드 (0) | 2025.03.04 |
Beaglebone Black를 위한 crosstool-ng 빌드 방법 (v1.27.0) (0) | 2025.02.21 |
crosstool-NG 1.22.0 버전 설치 시 kconf_id_lookup 문제 해결 (0) | 2025.02.13 |