Skip to content

Commit

Permalink
Add lpi4a mainline support
Browse files Browse the repository at this point in the history
Signed-off-by: Han Gao <[email protected]>
  • Loading branch information
RevySR committed Jan 12, 2024
1 parent 9712944 commit 53bded2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
model: [lpi4a, ahead, console]
model: [lpi4a, ahead, console, lpi4amain]

runs-on: ubuntu-22.04
env:
Expand Down
Binary file added addons/lpi4amain/perf-th1520
Binary file not shown.
14 changes: 13 additions & 1 deletion mkrootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ ROOT_MOUNTPOINT=""
KERNEL_lpi4a="linux-headers-5.10.113-lpi4a linux-image-5.10.113-lpi4a linux-perf-thead"
KERNEL_ahead="linux-headers-5.10.113-ahead linux-image-5.10.113-ahead linux-perf-thead"
KERNEL_console="linux-headers-5.10.113-lpi4a linux-image-5.10.113-lpi4a linux-perf-thead"
KERNEL_lpi4amain="linux-headers-6.7.0-lpi4a linux-image-6.7.0-lpi4a th1520-mainline-opensbi"
KERNEL=$(eval echo '$'"KERNEL_${BOARD}")

BASE_TOOLS="binutils file tree sudo bash-completion u-boot-menu initramfs-tools openssh-server network-manager dnsmasq-base libpam-systemd ppp wireless-regdb wpasupplicant libengine-pkcs11-openssl iptables systemd-timesyncd vim usbutils libgles2 parted exfatprogs systemd-sysv mesa-vulkan-drivers pkexec"
Expand Down Expand Up @@ -97,6 +98,9 @@ make_rootfs()
mount -B /run "$CHROOT_TARGET"/run
mount -B /dev "$CHROOT_TARGET"/dev
mount -B /dev/pts "$CHROOT_TARGET"/dev/pts
mount -t tmpfs tmpfs "$CHROOT_TARGET"/tmp
mount -t tmpfs tmpfs "$CHROOT_TARGET"/var/tmp
mount -t tmpfs tmpfs "$CHROOT_TARGET"/var/cache/apt/archives/

# move boot contents back to /boot
mv -v "$CHROOT_TARGET"/mnt/* "$CHROOT_TARGET"/boot/
Expand All @@ -108,7 +112,7 @@ make_rootfs()
make_bootable()
{
# Install kernel
chroot "$CHROOT_TARGET" sh -c "apt install $KERNEL"
chroot "$CHROOT_TARGET" sh -c "apt install -y $KERNEL"

# Add update-u-boot config
chroot "$CHROOT_TARGET" sh -c "echo 'U_BOOT_PROMPT=\"2\"' >> /etc/default/u-boot"
Expand Down Expand Up @@ -243,6 +247,14 @@ EOF
sed -i 's/#greeter-setup-script=/greeter-setup-script=\/opt\/display-setup.sh/g' "$CHROOT_TARGET"/etc/lightdm/lightdm.conf
fi

if [ "${BOARD}" == "lpi4amain" ]; then
echo "lpi4amain No GPU: Disable lightdm"
# lpi4a-main No GPU
chroot "$CHROOT_TARGET" sh -c "systemctl disable lightdm"
# Install perf-th1520 (new perf for c9xx pmu)
cp -rp addons/lpi4amain/perf-th1520 rootfs/bin
fi

# refresh so libs
chroot "$CHROOT_TARGET" sh -c "rm -v /etc/ld.so.cache"
chroot "$CHROOT_TARGET" sh -c "ldconfig"
Expand Down

0 comments on commit 53bded2

Please sign in to comment.