From 921d72d2827fca6b0c1f3be9019c939f772cfb61 Mon Sep 17 00:00:00 2001 From: Sebastian Krzyszkowiak Date: Sun, 24 Jan 2021 06:17:57 +0100 Subject: [PATCH] setup_usb_configfs: Make manufacturer and product strings configurable --- initramfs/init_functions.sh | 4 ++-- src/info-pine64-pinebookpro.sh | 2 ++ src/info-pine64-pinephone.sh | 2 ++ src/info-pine64-pinetab.sh | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/initramfs/init_functions.sh b/initramfs/init_functions.sh index cd194d6..3f0c9af 100755 --- a/initramfs/init_functions.sh +++ b/initramfs/init_functions.sh @@ -28,10 +28,10 @@ setup_usb_configfs() { mkdir $CONFIGFS/g1/strings/0x409 || echo " Couldn't create $CONFIGFS/g1/strings/0x409" # shellcheck disable=SC2154 - echo "Pine64" > "$CONFIGFS/g1/strings/0x409/manufacturer" + echo "$MANUFACTURER" > "$CONFIGFS/g1/strings/0x409/manufacturer" echo "$usb_serialnumber" > "$CONFIGFS/g1/strings/0x409/serialnumber" # shellcheck disable=SC2154 - echo "PinePhone" > "$CONFIGFS/g1/strings/0x409/product" + echo "$PRODUCT" > "$CONFIGFS/g1/strings/0x409/product" # Create rndis/mass_storage function mkdir $CONFIGFS/g1/functions/"$usb_rndis_function" \ diff --git a/src/info-pine64-pinebookpro.sh b/src/info-pine64-pinebookpro.sh index cd0ba95..07006a9 100644 --- a/src/info-pine64-pinebookpro.sh +++ b/src/info-pine64-pinebookpro.sh @@ -1,2 +1,4 @@ PLATFORM=pine64-pinebookpro +MANUFACTURER=Pine64 +PRODUCT="Pinebook Pro" EMMC=/dev/mmcblk2 diff --git a/src/info-pine64-pinephone.sh b/src/info-pine64-pinephone.sh index b771788..803e2c6 100644 --- a/src/info-pine64-pinephone.sh +++ b/src/info-pine64-pinephone.sh @@ -1,4 +1,6 @@ PLATFORM=pine64-pinephone +MANUFACTURER=Pine64 +PRODUCT=PinePhone EMMC=/dev/mmcblk2 SD=/dev/mmcblk0 LED=pinephone\:red\:user diff --git a/src/info-pine64-pinetab.sh b/src/info-pine64-pinetab.sh index 627b849..10bf6c8 100644 --- a/src/info-pine64-pinetab.sh +++ b/src/info-pine64-pinetab.sh @@ -1,4 +1,6 @@ PLATFORM=pine64-pinetab +MANUFACTURER=Pine64 +PRODUCT=PineTab EMMC=/dev/mmcblk2 SD=/dev/mmcblk0 SERIAL_CON=ttyS0