Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
Tags
- bare metal
- vscode
- Debugging
- AArch64
- GPIO
- Arduino
- 리눅스
- BeagleBone
- C++
- QEMU
- Linux
- STM32
- 디버깅
- nucleo
- UART
- avr-gcc
- atmel
- Debug
- yocto
- buildroot
- Raspberry
- 라즈베리파이
- esp32
- Visual Studio
- platformio
- USART
- raspberrypi
- Visual Studio Code
- AVR
- 아두이노
Archives
- Today
- Total
임베디드를 좋아하는 조금 특이한 개발자?
[Yocto Project] RaspberryPI4를 위한 리눅스 이미지 빌드 본문
1. 개발 환경
WSL2 (Ubuntu 22.04 LTS)
개발 보드 : Raspberrypi 4
2. 필요 패키지 설치
sudo apt install build-essential chrpath cpio debianutils diffstat file gawk gcc git iputils-ping libacl1 liblz4-tool locales python3 python3-git python3-jinja2 python3-pexpect python3-pip python3-subunit socat texinfo unzip wget xz-utils zstd
3. Poky 코드 준비
git clone git://git.yoctoproject.org/poky
cd poky
git checkout scarthgap
저는 Scarthgap버전을 사용하였습니다. 아래 링크를 통해 최신의 Yocto project의 relese를 확인 할 수 있습니다.
https://wiki.yoctoproject.org/wiki/Releases
Releases - Yocto Project
wiki.yoctoproject.org
3. build 환경 구축
source oe-init-build-env build-rpi4
4. 레이어(Layer) 추가
RaspberryPI4를 위한 이미지를 빌드하기 위해서는 라즈베리파이 제단에서 제공하는 레이어를 추가하여야 합니다.
# build-rpi4에서 poky로 이동
cd ..
# meta-oe와 meta-python를 추가하기 위한 코드 준비
git clone git://git.openembedded.org/meta-openembedded --branch scarthgap
# meta-raspberrypi를 추가하기 위한 코드 준비
git clone git://git.yoctoproject.org/meta-raspberrypi --branch scarthgap
#poky에서 build-rpi4로 이동
cd build-rpi4
# 레이어를 추가
bitbake-layers add-layer ../meta-openembedded/meta-oe
bitbake-layers add-layer ../meta-openembedded/meta-python
bitbake-layers add-layer ../meta-raspberrypi
# 현재 추가된 레이어 확인
bitbake-layers show-layers
5. 머신(Machine) 설정
./poky/build-rpi4/local.conf 내 MACHINE 변수 값을 "raspberrypi4-64"로 변경합니다.
또한, LICENSE_FLAGS_ACCEPTED를 추가해주어야 합니다.
MACHINE ??= "raspberrypi4-64"
LICENSE_FLAGS_ACCEPTED = "synaptics-killswitch"
6. 이미지 빌드
bitbake core-image-base
7. SD카드에 Image 설치
SD 카드 확인
lsblk
이미지 위치 : ./poky/build-rpi4/tmp/depoly/images/raspberrypi4-64/core-image-base-raspberrypi4-64.wic.bz2
# 이미지 설치 패키지 설치
sudo apt install bmap-tools
# SD 카드에 이미지 설치
sudo bmaptool copy ./tmp/deploy/images/raspberrypi4-64/core-image-base-raspberrypi4-64.rootfs.wic.bz2 /dev/sdd
'Embedded > Yocto Project' 카테고리의 다른 글
[Yocto Project] initialization manager를 systemd으로 변경 (0) | 2025.03.31 |
---|---|
[Yocto Project] RaspberryPI4를 UART로 사용 (0) | 2025.03.27 |
[Yocto Project] qemu를 위한 리눅스 이미지 빌드 (0) | 2025.03.17 |
Beaglebone Black를 위한 crosstool-ng 빌드 방법 (v1.27.0) (0) | 2025.02.21 |
crosstool-NG 1.22.0 버전 설치 시 kconf_id_lookup 문제 해결 (0) | 2025.02.13 |