FROM fedora:41 as builder


RUN dnf install --setopt=install_weak_deps=false -y git make gcc gcc-c++ which file diffutils wget cpio rsync bc lzop zip patch perl tar qemu-system-aarch64 qemu-img unzboot uboot-tools kmod

RUN git clone --depth 1 --branch 2025.05-rc2  https://github.com/buildroot/buildroot /buildroot

WORKDIR /buildroot

ADD overlay ./overlay
ADD ti_defconfig ./configs
RUN ls /buildroot/overlay
RUN make ti_defconfig && make
RUN mkimage -f flasher.its flasher.itb
