# 데비안: BeagleY-AI 입문 가이드

**URL:** <https://forum.digikey.com/t/beagley-ai/66852>\
**Category:** 기술 조언\
**Tags:** linux-guides, embedded, tech-tips\
**Created:** [March 20, 2026, 2:38am UTC](https://forum.digikey.com/t/beagley-ai/66852 "2026-03-20T02:38:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian\_Lee](https://sea2.discourse-cdn.com/digikey/user_avatar/forum.digikey.com/brian_lee/32/12387_2.png) [@Brian\_Lee](https://forum.digikey.com/u/Brian_Lee)\
**Post date:** [March 20, 2026, 2:38am UTC](https://forum.digikey.com/t/beagley-ai/66852/1 "2026-03-20T02:38:32Z")

</div>

이 글은 BeagleBoard의 [BeagleY-AI](https://www.beagleboard.org/boards/beagley-ai)와 관련된 글입니다.

# 구매 정보

- 보드: [BeagleY-AI](https://www.digikey.kr/ko/products/detail/beagleboard/102991834/22532596)
- 시리얼 케이블: [라즈베리 파이 디버그 프로브](https://www.digikey.kr/ko/products/detail/raspberry-pi/SC0889/17877576)
- 방열판: [라즈베리 파이 액티브 쿨러](https://www.digikey.kr/ko/products/detail/raspberry-pi/SC1148/21658255)

# 기본 요구 사항

- OS 가상화 소프트웨어 없이, x86 64비트 기반 PC에서 최신 지원 버전의 데비안, 페도라 또는 우분투 실행.
- 아래에 나열된 명령어 대부분의 기본 셸은 /bin/bash로 가정.
- [Kernel.org](http://Kernel.org) 크로스 컴파일러 – [https://mirrors.edge.kernel.org/pub/tools/crosstool/](https://mirrors.edge.kernel.org/pub/tools/crosstool/)
- 부트로더
  - Das U-Boot – 범용 부트 로더: [http://www.denx.de/wiki/U-Boot](http://www.denx.de/wiki/U-Boot)
  - 소스 코드: [https://github.com/u-boot/u-boot/](https://github.com/u-boot/u-boot/)

- 리눅스 커널
  - 리누스의 메인라인 트리: [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git)

- arm64 기반 rootfs
  - 데비안: [https://www.debian.org](https://www.debian.org)

# 크로스 컴파일러: 32비트 arm-linux-gnueabi-gcc

이는 일반적인 리눅스 환경에서 실행되는 사전 빌드된 64비트 버전의 GCC입니다. 죄송하지만 32비트 x86 사용자분들은 업그레이드가 필요합니다.

다운로드 및 압축 해제:

```bash
#user@localhost:~$
wget -c https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/11.5.0/x86_64-gcc-11.5.0-nolibc-arm-linux-gnueabi.tar.xz
tar -xf x86_64-gcc-11.5.0-nolibc-arm-linux-gnueabi.tar.xz
export CC32=`pwd`/gcc-11.5.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-

```

크로스 컴파일러 테스트:

```bash
#user@localhost:~$
${CC32}gcc --version

```

```bash
#Test Output:
arm-linux-gnueabi-gcc (GCC) 11.5.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

```

# 크로스 컴파일러: 64비트 aarch64-linux-gcc

이는 일반적인 리눅스 환경에서 실행되는 사전 빌드된 64비트 버전의 GCC입니다. 죄송하지만 32비트 x86 사용자분들은 업그레이드가 필요합니다.

다운로드 및 압축 해제:

```bash
#user@localhost:~$
wget -c https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/11.5.0/x86_64-gcc-11.5.0-nolibc-aarch64-linux.tar.xz
tar -xf x86_64-gcc-11.5.0-nolibc-aarch64-linux.tar.xz
export CC64=`pwd`/gcc-11.5.0-nolibc/aarch64-linux/bin/aarch64-linux-

```

크로스 컴파일러 테스트:

```bash
#user@localhost:~$
${CC64}gcc --version

```

```bash
#Test Output:
aarch64-linux-gcc (GCC) 11.5.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

```

# 부트로더:

이후 모든 구성 요소를 빌드하는 데 사용할 build-essential과 git을 포함해 몇 가지 호스트 패키지를 미리 설치합니다.

**호스트 패키지 요구 사항**

```bash
#user@localhost:~$
sudo apt update ; \
sudo apt-get install -y build-essential git

```

# 부트로더: TI 리눅스 펌웨어

시스템 동작을 위해 TI 펌웨어가 필요합니다: [https://git.ti.com/gitweb?p=processor-firmware/ti-linux-firmware.git;a=shortlog;h=refs/heads/ti-linux-firmware](https://git.ti.com/gitweb?p=processor-firmware/ti-linux-firmware.git;a=shortlog;h=refs/heads/ti-linux-firmware)

다운로드:

```bash
#user@localhost:~$
git clone -b 11.01.03 https://github.com/beagleboard/ti-linux-firmware.git --depth=1

```

# 부트로더: TF-A (Trusted Firmware-A)

Arm A-프로파일 CPU용 TF: [https://git.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a.git/](https://git.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a.git/)

다운로드:

```bash
#user@localhost:~$
git clone -b lts-v2.12.4 https://github.com/TrustedFirmware-A/trusted-firmware-a.git --depth=1

```

빌드:

```bash
#user@localhost:~$
make -C ./trusted-firmware-a/ -j4 CROSS_COMPILE=${CC64} PLAT=k3 ARCH=aarch64 SPD=opteed TARGET_BOARD=lite all

```

# 부트로더: OP-TEE (Open Portable Trusted Execution Environment)

Arm TrustZone 기반의 오픈소스 TEE: [https://github.com/OP-TEE/optee\_os](https://github.com/OP-TEE/optee_os)

**호스트 패키지 요구 사항**

```bash
#user@localhost:~$
sudo apt update ; \
sudo apt-get install -y python3-cryptography python3-minimal ; \
sudo apt-get install -y python3-pyelftools

```

다운로드:

```bash
#user@localhost:~$
git clone -b 4.6.0 https://github.com/OP-TEE/optee_os.git --depth=1

```

빌드:

```bash
#user@localhost:~$
make -C ./optee_os/ -j4 CROSS_COMPILE=${CC32} CROSS_COMPILE64=${CC64} CFG_ARM64_core=y PLATFORM=k3-am62x all

```

# 부트로더: U-Boot

Das U-Boot – 범용 부트 로더: [http://www.denx.de/wiki/U-Boot](http://www.denx.de/wiki/U-Boot)

**호스트 패키지 요구 사항**

```bash
#user@localhost:~$
sudo apt update ; \
sudo apt-get install -y bc bison flex libgnutls28-dev libssl-dev; \
sudo apt-get install -y python3-dev python3-jsonschema ; \
sudo apt-get install -y python3-setuptools python3-yaml ; \
sudo apt-get install -y swig uuid-dev yamllint

```

다운로드:

```bash
#user@localhost:~$
git clone -b v2025.07-rc5-Beagle https://github.com/beagleboard/u-boot.git --depth=1

```

구성 및 빌드: Cortex-R4

```bash
#user@localhost:~$
make -C ./u-boot/ O=../CORTEXR CROSS_COMPILE=${CC32} am67a_beagley_ai_r5_defconfig ; \
make -C ./u-boot/ -j4 O=../CORTEXR CROSS_COMPILE=${CC32} BINMAN_INDIRS=../ti-linux-firmware/

```

빌드 결과물 복사: Cortex‑R4

```bash
#user@localhost:~$
mkdir -p ./input/ ; \
cp -v ./CORTEXR/tiboot3-j722s-hs-fs-evm.bin ./input/

```

구성 및 빌드: Cortex-A53

```bash
#user@localhost:~$
make -C ./u-boot/ O=../CORTEXA CROSS_COMPILE=${CC64} am67a_beagley_ai_a53_defconfig ; \
make -C ./u-boot/ -j4 O=../CORTEXA CROSS_COMPILE=${CC64} BL31=../trusted-firmware-a/build/k3/lite/release/bl31.bin TEE=../optee_os/out/arm-plat-k3/core/tee-pager_v2.bin BINMAN_INDIRS=../ti-linux-firmware/

```

빌드 결과물 복사: Cortex-A53

```bash
#user@localhost:~$
cp -v ./CORTEXA/tispl.bin ./input/ ; \
cp -v ./CORTEXA/u-boot.img ./input/

```

# 리눅스 커널

이 스크립트는 리눅스 커널, 커널 모듈, 디바이스 트리 바이너리를 빌드한 후 deploy 디렉터리에 복사합니다.

다운로드:

```bash
#user@localhost:~$
git clone https://github.com/RobertCNelson/arm64-multiplatform ./kernelbuildscripts
cd kernelbuildscripts/

```

v6.15.x‑arm64‑k3 (6.15.x) 기준:

```bash
#user@localhost:~/kernelbuildscripts$
git checkout origin/v6.15.x-arm64-k3 -b tmp

```

빌드:

```bash
#user@localhost:~/kernelbuildscripts$
./build_kernel.sh

```

# 루트 파일 시스템

### 데비안 12

| 사용자 | 비밀번호 |
| --- | --- |
| debian | temppwd |

다운로드:

```bash
#user@localhost:~$
wget -c https://rcn-ee.com/rootfs/eewiki/minfs/debian-12.11-minimal-arm64-2025-05-28.tar.xz

```

검증:

```bash
#user@localhost:~$
sha256sum debian-12.11-minimal-arm64-2025-05-28.tar.xz

```

```bash
#sha256sum output:
1c1683ff874a0efe130a924de67362171422132a8f5aeacc3db9214bcadcbcd2 debian-12.11-minimal-arm64-2025-05-28.tar.xz

```

압축 해제:

```bash
#user@localhost:~$
tar xf debian-12.11-minimal-arm64-2025-05-28.tar.xz

```

# 커널 및 루트 파일 시스템 설치

초보 사용자를 위해 설명하자면, 커널 버전은 매일 변경될 수 있기 때문에 이 글에서 고정된 버전을 사용하지는 않습니다. 대신, 이 글에 사용된 커널 빌드 스크립트가 어떤 커널 버전이 빌드 되었는지에 대한 힌트를 제공합니다.

```bash
-----------------------------
Script Complete
eewiki.net: [user@localhost:~$ export kernel_version=5.X.Y-Z]
-----------------------------

```

커널 빌드 스크립트가 출력한 커널 버전을 복사하여 “export kernel\_version=5.X.Y-Z” 형식 그대로 커널을 빌드 한 데스크톱의 터미널에 붙여 넣고 엔터를 누르면, 이후에 사용될 해당 커널 버전의 환경 변수가 생성됩니다.

```bash
export kernel_version=5.X.Y-Z

```

### genimage를 사용해 루트 파일 시스템 생성:

마이크로SD 카드에 직접 접근하는 방식 대신 sdcard.img 이미지를 사용할 것이므로, [genimage 도구](https://github.com/pengutronix/genimage)를 사용하여 sdcard.img에 포함될 루트 파일 시스템과 구성 요소들을 준비합니다.

**호스트 패키지 요구 사항**

```bash
#user@localhost:~$
sudo apt update ; \
sudo apt-get install -y dosfstools genimage mtools

```

### genimage를 위한 작업 디렉터리 생성:

```bash
#user@localhost:~$
sudo mkdir -p ./input/.rootfs

```

### 루트 파일 시스템 복사:

```bash
#user@localhost:~$
sudo tar xfvp ./debian-*-*-arm64-*/arm64-rootfs-*.tar -C ./input/.rootfs/
sync

```

### 첫 부팅 시 시스템 사용자 정의 활성화:

```bash
#user@localhost:~$
sudo cp ./input/.rootfs/etc/bbb.io/templates/sysconf.txt ./input/

```

텍스트 편집기에서 _ **./input/sysconf.txt** _ 파일을 열고 사용자 설정을 변경합니다.

- _ **user\_name=** _
- _ **user\_password=** _
- _ **hostname=** _

```bash
#user@localhost:~$
sudo nano ./input/sysconf.txt

```

### extlinux.conf 설정

```bash
#user@localhost:~$
sudo sh -c "echo 'label Linux' > ./input/extlinux.conf"
sudo sh -c "echo ' kernel /Image.gz' >> ./input/extlinux.conf"
sudo sh -c "echo ' fdtdir /' >> ./input/extlinux.conf"
sudo sh -c "echo ' append console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02860000 root=/dev/mmcblk1p2 ro rootfstype=ext4 rootwait net.ifnames=0' >> ./input/extlinux.conf"

```

### 커널 이미지 복사

커널 이미지:

```bash
#user@localhost:~$
sudo cp -v ./kernelbuildscripts/deploy/${kernel_version}.Image ./input/Image.gz

```

### 커널 디바이스 트리 바이너리 복사

```bash
#user@localhost:~$
sudo mkdir -p ./input/dtbs/
sudo tar xfv ./kernelbuildscripts/deploy/${kernel_version}-dtbs.tar.gz -C ./input/dtbs/
sudo cp -v ./input/dtbs/ti/k3-am67a-beagley-ai.dtb ./input/k3-am67a-beagley-ai.dtb

```

### 커널 모듈 복사

```bash
#user@localhost:~$
sudo tar xfv ./kernelbuildscripts/deploy/${kernel_version}-modules.tar.gz -C ./input/.rootfs/usr/

```

### 파일 시스템 테이블 (/etc/fstab)

```bash
#user@localhost:~/$
sudo sh -c "echo '/dev/mmcblk1p2 / auto errors=remount-ro 0 1' >> ./input/.rootfs/etc/fstab"
sudo sh -c "echo '/dev/mmcblk1p1 /boot/firmware vfat user,uid=1000,gid=1000,defaults 0 2' >> ./input/.rootfs/etc/fstab"

```

### 파티션 크기 확인

루트 파일 시스템의 파티션 크기를 확인합니다. 이 크기를 사용해 아래 seek 값을 수정하면 파티션 크기를 조정할 수 있습니다.

```bash
#user@localhost:~$
sudo du -sh ./input/.rootfs/

```

### rootfs.ext4 생성

```bash
#user@localhost:~$
sudo dd if=/dev/zero of=./input/rootfs.ext4 bs=1 count=0 seek=1600M
sudo mkfs.ext4 -F ./input/rootfs.ext4 -d ./input/.rootfs/

```

# genimage를 사용해 sdcard.img 생성

이제 [genimage 도구](https://github.com/pengutronix/genimage)를 사용하여, sdcard.img 이미지를 생성합니다.

### genimage.cfg 파일 생성

```bash
#user@localhost:~$
nano genimage.cfg

```

```bash
#genimage.cfg
image boot.vfat {
        vfat {
            files = {
                    "tispl.bin",
                    "u-boot.img",
                    "Image.gz",
                    "sysconf.txt",
            }
            file tiboot3.bin {
                    image = "tiboot3-j722s-hs-fs-evm.bin"
            }
            file ti/k3-am67a-beagley-ai.dtb {
                    image = "k3-am67a-beagley-ai.dtb"
            }
            file extlinux/extlinux.conf {
                    image = "extlinux.conf"
            }
        }
        size = 256M
}
image sdcard.img {
        hdimage {}
        partition u-boot {
                partition-type = 0xC
                bootable = "true"
                image = "boot.vfat"
        }
        partition rootfs {
                partition-type = 0x83
                image = "rootfs.ext4"
        }
}

```

### genimage.cfg를 사용하여 genimage 실행

```bash
#user@localhost:~$
sudo genimage --rootpath `mktemp` --config genimage.cfg

```

### genimage 출력

생성된 sdcard.img 파일은 [bb-imager-rs](https://github.com/beagleboard/bb-imager-rs), [rpi-imager](https://github.com/raspberrypi/rpi-imager) 또는 사용자가 선호하는 이미지 플래싱 소프트웨어를 사용하여 마이크로SD 카드에 저장할 수 있습니다.

```bash
#user@localhost:~$
tree images/
images/
└── sdcard.img

1 directory, 1 file

```

# 최종 조정 (rootfs 파티션 확장)

이 시점에서는 플래싱된 sdcard.img로 대상 보드를 실행 중일 것입니다.

저장 장치에 남아 있는 가용 공간을 모두 사용할 수 있도록 rootfs 파티션을 확장합니다.

### growpart를 사용하여 파티션 테이블의 파티션 크기를 확장

```bash
sudo growpart /dev/mmcblk1 2

```

```bash
voodoo@eewiki:~$ sudo growpart /dev/mmcblk1 2
CHANGED: partition=2 start=524289 old: size=3276800 end=3801088 new: size=61809630 end=62333918

```

### 첫 번째 재부팅

```bash
sudo reboot

```

### resize2fs를 사용하여 기존의 파일시스템 크기를 확장

```bash
sudo resize2fs /dev/mmcblk1p2

```

```bash
voodoo@eewiki:~$ sudo resize2fs /dev/mmcblk1p2
resize2fs 1.47.0 (5-Feb-2023)
Filesystem at /dev/mmcblk1p2 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 4
The filesystem on /dev/mmcblk1p2 is now 7726203 (4k) blocks long.

```

### 두 번째 재부팅

부팅 과정에서 fsck가 파티션을 검사하기 때문에 이 마지막 재부팅은 다소 시간이 걸릴 수 있습니다.

```bash
sudo reboot

```

# 의견 및 문의

질문이나 의견이 있으시면 [디지키 테크포럼](https://forum.digikey.com/c/embedded/linux-discussions/5)에 남겨주시기 바랍니다.

  
  

영문 원본: Debian: [Getting Started with the BeagleY-AI](https://forum.digikey.com/t/debian-getting-started-with-the-beagley-ai/55792)
