Remove audio kernel modules (#444)

* Remove audio kernel modules

* cleanup

* lil more
This commit is contained in:
Adeeb Shihadeh
2025-01-25 18:06:02 -08:00
committed by GitHub
parent 1c91865aa3
commit e9a87569a2
5 changed files with 2 additions and 24 deletions

View File

@@ -100,12 +100,6 @@ build_kernel() {
dd if=/dev/zero of=$BOOT_IMG.sig.padded bs=2048 count=1
dd if=$BOOT_IMG.sig of=$BOOT_IMG.sig.padded conv=notrunc
cat $BOOT_IMG.nonsecure $BOOT_IMG.sig.padded > $BOOT_IMG
# Copy to output dir
mkdir -p $OUTPUT_DIR
mv $BOOT_IMG $OUTPUT_DIR/
cp $DIR/agnos-kernel-sdm845/out/techpack/audio/asoc/snd-soc-sdm845.ko $OUTPUT_DIR/
cp $DIR/agnos-kernel-sdm845/out/techpack/audio/asoc/codecs/snd-soc-wcd9xxx.ko $OUTPUT_DIR/
}
# Run build_kernel in container

View File

@@ -18,13 +18,6 @@ OUT_IMAGE="$OUTPUT_DIR/system.img"
# Create temp dir if non-existent
mkdir -p $BUILD_DIR $OUTPUT_DIR
# Copy kernel modules
if ! ls $OUTPUT_DIR/*.ko >/dev/null 2>&1; then
echo "Kernel modules missing. Run ./build_kernel.sh first"
exit 1
fi
cp $OUTPUT_DIR/snd*.ko $DIR/userspace/usr/comma/sound/
# Download Ubuntu Base if not done already
if [ ! -f $UBUNTU_FILE ]; then
echo -e "Downloading Ubuntu Base: $UBUNTU_FILE"

View File

@@ -5,16 +5,10 @@ cd "$(dirname "$0")"
DEVICE=${DEVICE:-comma-ethernet}
scp output/boot.img output/*.ko $DEVICE:/data/tmp/
scp output/boot.img $DEVICE:/data/tmp/
ssh $DEVICE <<EOF
sudo dd if=/data/tmp/boot.img of=/dev/disk/by-partlabel/boot_a
sudo dd if=/data/tmp/boot.img of=/dev/disk/by-partlabel/boot_b
sudo mount -o rw,remount /
sudo resize2fs $(findmnt -n -o SOURCE /)
sudo mv /data/tmp/snd-soc-sdm845.ko /usr/comma/sound/snd-soc-sdm845.ko
sudo mv /data/tmp/snd-soc-wcd9xxx.ko /usr/comma/sound/snd-soc-wcd9xxx.ko
rm -rf /data/tmp/*
sudo mount -o ro,remount / || true
sudo reboot
EOF

View File

@@ -2,9 +2,6 @@
/usr/comma/sound/adsp-start.sh
insmod /usr/comma/sound/snd-soc-wcd9xxx.ko
insmod /usr/comma/sound/snd-soc-sdm845.ko
echo "waiting for sound card to come online"
while [ ! -d /proc/asound/sdm845tavilsndc ] || [ "$(cat /proc/asound/card0/state 2> /dev/null)" != "ONLINE" ] ; do
sleep 0.01