Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for building debian trixie with 10.00 BSPs #54

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
gpg curl
sudo apt install --fix-broken
sudo pip3 install toml-cli
sudo pip3 install yamllint
curl -s --compressed https://texasinstruments.github.io/ti-debpkgs/KEY.gpg | \
gpg --dearmor | \
sudo tee /usr/share/keyrings/ti-debpkgs.gpg > /dev/null
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ sudo apt install -y \
python3-yaml python3-jsonschema python3-cryptography
sudo apt install --fix-broken
sudo pip3 install toml-cli
sudo pip3 install yamllint
```

## Usage
Expand Down
22 changes: 15 additions & 7 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,16 @@ do
validate_section "Build" ${build} "${topdir}/builds.toml"

machine=($(read_build_config ${build} machine))
bsp_version=($(read_build_config ${build} bsp_version))
distro_variant=($(read_build_config ${build} distro_variant))
distro_codename=($(read_build_config ${build} distro_codename))
rt_linux=($(read_build_config ${build} rt_linux))

if [ ${rt_linux} == "true" ]; then
distro=${distro_codename}-rt-${machine}
else
distro=${distro_codename}-${machine}
fi

bsp_version=($(read_bsp_config ${distro_codename} bsp_version))

export host_arch=`uname -m`
export native_build=false
Expand All @@ -51,18 +59,18 @@ do

echo "machine: ${machine}"
echo "bsp_version: ${bsp_version}"
echo "distro_variant: ${distro_variant}"
echo "distro: ${distro}"
echo "host_arch: ${host_arch}"

setup_build_tools

setup_log_file "${build}"

validate_build ${machine} ${bsp_version} ${distro_variant}
validate_build ${machine} ${bsp_version} ${distro_codename}/${distro}.yaml

generate_rootfs ${build} ${machine} ${distro_variant}
build_bsp ${build} ${machine} ${bsp_version}
package_and_clean ${build}
generate_rootfs ${distro} ${distro_codename} ${machine}
build_bsp ${distro} ${machine} ${bsp_version}
package_and_clean ${distro}

done

143 changes: 102 additions & 41 deletions builds.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,66 +2,127 @@

# Builds for GitHub Actions
builds = [
"am62p-bookworm-09.02.01.010",
"am62p-bookworm-09.02.01.010-rt",
"am62-bookworm-09.02.01.010",
"am62-bookworm-09.02.01.010-rt",
"am62lp-bookworm-09.02.01.010",
"am62lp-bookworm-09.02.01.010-rt",
"am62sip-bookworm-09.02.01.010",
"am62sip-bookworm-09.02.01.010-rt",
"am64-bookworm-09.02.01.010",
"am64-bookworm-09.02.01.010-rt",
"trixie-am62pxx-evm",
"trixie-rt-am62pxx-evm",
"trixie-am62xx-evm",
"trixie-rt-am62xx-evm",
"trixie-am62xx-lp-evm",
"trixie-rt-am62xx-lp-evm",
"trixie-am62xxsip-evm",
"trixie-rt-am62xxsip-evm",
"trixie-am64xx-evm",
"trixie-rt-am64xx-evm",
"bookworm-am62pxx-evm",
"bookworm-rt-am62pxx-evm",
"bookworm-am62xx-evm",
"bookworm-rt-am62xx-evm",
"bookworm-am62xx-lp-evm",
"bookworm-rt-am62xx-lp-evm",
"bookworm-am62xxsip-evm",
"bookworm-rt-am62xxsip-evm",
"bookworm-am64xx-evm",
"bookworm-rt-am64xx-evm",
]

# List of all valid builds
[am62p-bookworm-09.02.01.010]
# List of all valid trixie builds
[trixie-am62pxx-evm]
machine = "am62pxx-evm"
bsp_version = "09.02.00.010"
distro_variant = "am62p-bookworm"
distro_codename = "trixie"
rt_linux = "false"

[am62p-bookworm-09.02.01.010-rt]
[trixie-rt-am62pxx-evm]
machine = "am62pxx-evm"
bsp_version = "09.02.00.010-rt"
distro_variant = "am62p-bookworm-rt"
distro_codename = "trixie"
rt_linux = "true"

[am62-bookworm-09.02.01.010]
[trixie-am62xx-evm]
machine = "am62xx-evm"
bsp_version = "09.02.00.010"
distro_variant = "am62-bookworm"
distro_codename = "trixie"
rt_linux = "false"

[am62-bookworm-09.02.01.010-rt]
[trixie-rt-am62xx-evm]
machine = "am62xx-evm"
bsp_version = "09.02.00.010-rt"
distro_variant = "am62-bookworm-rt"
distro_codename = "trixie"
rt_linux = "true"

[am62lp-bookworm-09.02.01.010]
[trixie-am62xx-lp-evm]
machine = "am62xx-lp-evm"
bsp_version = "09.02.00.010"
distro_variant = "am62-bookworm"
distro_codename = "trixie"
rt_linux = "false"

[am62lp-bookworm-09.02.01.010-rt]
[trixie-rt-am62xx-lp-evm]
machine = "am62xx-lp-evm"
bsp_version = "09.02.00.010-rt"
distro_variant = "am62-bookworm-rt"
distro_codename = "trixie"
rt_linux = "true"

[am62sip-bookworm-09.02.01.010]
[trixie-am62xxsip-evm]
machine = "am62xxsip-evm"
bsp_version = "09.02.00.010"
distro_variant = "am62-bookworm"
distro_codename = "trixie"
rt_linux = "false"

[am62sip-bookworm-09.02.01.010-rt]
[trixie-rt-am62xxsip-evm]
machine = "am62xxsip-evm"
bsp_version = "09.02.00.010-rt"
distro_variant = "am62-bookworm-rt"
distro_codename = "trixie"
rt_linux = "true"

[am64-bookworm-09.02.01.010]
[trixie-am64xx-evm]
machine = "am64xx-evm"
bsp_version = "09.02.00.010"
distro_variant = "am64-bookworm"
distro_codename = "trixie"
rt_linux = "false"

[am64-bookworm-09.02.01.010-rt]
[trixie-rt-am64xx-evm]
machine = "am64xx-evm"
bsp_version = "09.02.00.010-rt"
distro_variant = "am64-bookworm-rt"
distro_codename = "trixie"
rt_linux = "true"

# List of all valid bookworm builds
[bookworm-am62pxx-evm]
machine = "am62pxx-evm"
distro_codename = "bookworm"
rt_linux = "false"

[bookworm-rt-am62pxx-evm]
machine = "am62pxx-evm"
distro_codename = "bookworm"
rt_linux = "true"

[bookworm-am62xx-evm]
machine = "am62xx-evm"
distro_codename = "bookworm"
rt_linux = "false"

[bookworm-rt-am62xx-evm]
machine = "am62xx-evm"
distro_codename = "bookworm"
rt_linux = "true"

[bookworm-am62xx-lp-evm]
machine = "am62xx-lp-evm"
distro_codename = "bookworm"
rt_linux = "false"

[bookworm-rt-am62xx-lp-evm]
machine = "am62xx-lp-evm"
distro_codename = "bookworm"
rt_linux = "true"

[bookworm-am62xxsip-evm]
machine = "am62xxsip-evm"
distro_codename = "bookworm"
rt_linux = "false"

[bookworm-rt-am62xxsip-evm]
machine = "am62xxsip-evm"
distro_codename = "bookworm"
rt_linux = "true"

[bookworm-am64xx-evm]
machine = "am64xx-evm"
distro_codename = "bookworm"
rt_linux = "false"

[bookworm-rt-am64xx-evm]
machine = "am64xx-evm"
distro_codename = "bookworm"
rt_linux = "true"

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ mmdebstrap:
- /usr/share/keyrings/debian-archive-keyring.gpg
suite: bookworm
variant: standard
hostname: am62pxx-evm
components:
- main
- contrib
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ mmdebstrap:
- /usr/share/keyrings/debian-archive-keyring.gpg
suite: bookworm
variant: standard
hostname: am62xx-evm
components:
- main
- contrib
Expand Down
118 changes: 118 additions & 0 deletions configs/bdebstrap_configs/bookworm/bookworm-am62xx-lp-evm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
---
mmdebstrap:
architectures:
- arm64
mode: auto
keyrings:
- /usr/share/keyrings/debian-archive-keyring.gpg
suite: bookworm
variant: standard
hostname: am62xx-evm
components:
- main
- contrib
- non-free-firmware
packages:
- build-essential
- gpg
- curl
- firmware-ti-connectivity
- init
- iproute2
- less
- libdrm-dev
- libpam-systemd
- locales
- neofetch
- network-manager
- net-tools
- openssh-server
- sudo
- vim
- k3conf
- weston
- alsa-utils
- libasound2-plugins
- gstreamer1.0-tools
- gstreamer1.0-plugins-base
- gstreamer1.0-plugins-good
- gstreamer1.0-plugins-bad
- i2c-tools
- linux-image-6.1.83-k3
- linux-headers-6.1.83-k3
- linux-libc-dev
- cryptodev-linux-dkms
- ti-img-rogue-driver-am62-dkms
- ti-img-rogue-firmware-am62
- ti-img-rogue-tools-am62
- ti-img-rogue-umlibs-am62
- firmware-ti-ipc-am62
- firmware-cnm-wave
- libti-rpmsg-char
- libti-rpmsg-char-dev
- libd3dadapter9-mesa-dev
- libd3dadapter9-mesa
- libegl-mesa0
- libegl1-mesa
- libgbm1
- libgl1-mesa-dri
- libgl1-mesa-glx
- libglapi-mesa
- libgles2-mesa
- libglx-mesa0
- libosmesa6
- libwayland-egl1-mesa
- mesa-opencl-icd
- mesa-va-drivers
- mesa-vdpau-drivers
- mesa-vulkan-drivers
- libpru-pssp-dev
- pru-pssp
- parted
- e2fsprogs
mirrors:
- http://deb.debian.org/debian
setup-hooks:
# Setup TI Debian Package Repository
- 'mkdir -p $1/etc/apt/sources.list.d/'
- 'wget https://raw.githubusercontent.com/TexasInstruments/ti-debpkgs/main/ti-debpkgs.sources -P $1/etc/apt/sources.list.d/'
# Setup Apt repository preferences
- 'mkdir -p $1/etc/apt/preferences.d/'
- 'printf "Package: *\nPin: origin TexasInstruments.github.io\nPin-Priority: 1001" >> $1/etc/apt/preferences.d/ti-debpkgs'
# Setup Kernel post-install scripts
- 'mkdir -p $1/etc/kernel/postinst.d/'
- 'echo "PWD = $PWD"'
- 'upload target/kernel/postinst.d/cp-kernel-and-overlays /etc/kernel/postinst.d/cp-kernel-and-overlays'
- 'chmod a+x $1/etc/kernel/postinst.d/cp-kernel-and-overlays'
essential-hooks:
# FIXME: Find a better workaround instead of sleep
- 'sleep 10' # workaround for /proc resource busy unable to umount issue
customize-hooks:
# Remove passwd for root user
- 'chroot "$1" passwd --delete root'
# Fix apt install mandb permission issue
- 'chroot "$1" chown -R man: /var/cache/man/'
- 'chroot "$1" chmod -R 755 /var/cache/man/'
# update packages to avoid mandatory update after first boot
- 'chroot "$1" apt-get update'
# Setup .bashrc for clean command-line experience
- 'chroot "$1" cp /etc/skel/.bashrc ~/.bashrc'
# Weston Service and Config Files
- 'chroot "$1" mkdir -p /etc/systemd/system/'
- 'upload target/weston/weston.service /etc/systemd/system/weston.service'
- 'upload target/weston/weston.socket /etc/systemd/system/weston.socket'
- 'chroot "$1" mkdir -p /etc/default/'
- 'upload target/weston/weston /etc/default/weston'
- '$BDEBSTRAP_HOOKS/enable-units "$1" weston'
- 'chroot "$1" echo "export WAYLAND_DISPLAY=wayland-1" >> $1/etc/profile'
# Enable ssh to root user without password
- 'chroot "$1" echo "PermitRootLogin yes" >> $1/etc/ssh/sshd_config'
- 'chroot "$1" echo "PermitEmptyPasswords yes" >> $1/etc/ssh/sshd_config'
# Resize Rootfs Service
- 'chroot "$1" mkdir -p /usr/bin'
- 'upload target/resize_rootfs/resize_rootfs.sh /usr/bin/resize_rootfs.sh'
- 'chroot "$1" chmod a+x /usr/bin/resize_rootfs.sh'
- 'chroot "$1" mkdir -p /etc/systemd/system/'
- 'upload target/resize_rootfs/resize_rootfs.service /etc/systemd/system/resize_rootfs.service'
- '$BDEBSTRAP_HOOKS/enable-units "$1" resize_rootfs'

Loading
Loading