Skip to content

Commit

Permalink
use only a config image hook for the turing rk1
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua-Riek committed May 5, 2024
1 parent a555b6d commit badf8ec
Showing 1 changed file with 1 addition and 28 deletions.
29 changes: 1 addition & 28 deletions config/boards/turing-rk1.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,8 @@ UBOOT_PACKAGE="u-boot-turing-rk3588"
UBOOT_RULES_TARGET="turing-rk1-rk3588"

function config_image_hook__turing-rk1() {
# Create udev audio rules
if [ "${RELEASE}" == "jammy" ]; then
echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-hdmi0-sound", ENV{SOUND_DESCRIPTION}="HDMI0 Audio"' > ${chroot_dir}/etc/udev/rules.d/90-naming-audios.rules
echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-dp0-sound", ENV{SOUND_DESCRIPTION}="DP0 Audio"' >> ${chroot_dir}/etc/udev/rules.d/90-naming-audios.rules
fi

return 0
}

function build_image_hook__turing-rk1() {
# The RK1 uses UART9 for console output
if [[ "${KERNEL_TARGET}" == "mainline" ]]; then
sed -i 's/console=ttyS2,1500000/console=ttyS0,115200/g' ${mount_point}/system-boot/ubuntuEnv.txt
else
sed -i 's/console=ttyS2,1500000/console=ttyS9,115200/g' ${mount_point}/writable/etc/kernel/cmdline

# Mount the temporary API filesystems
mkdir -p ${mount_point}/writable/{proc,sys,run,dev,dev/pts}
mount -t proc /proc ${mount_point}/writable/proc
mount -o bind /dev ${mount_point}/writable/dev
mount -o bind /dev/pts ${mount_point}/writable/dev/pts

# Populate the boot firmware path
chroot ${mount_point}/writable /bin/bash -c "u-boot-update"

# Umount temporary API filesystems
umount -lf ${mount_point}/writable/dev/pts 2> /dev/null || true
umount -lf ${mount_point}/writable/* 2> /dev/null || true
fi
sed -i 's/console=ttyS2,1500000/console=ttyS9,115200/g' ${chroot_dir}/etc/kernel/cmdline

# Install panfork
chroot ${chroot_dir} add-apt-repository -y ppa:jjriek/panfork-mesa
Expand Down

0 comments on commit badf8ec

Please sign in to comment.