mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-16 16:27:27 +00:00
d3f4e68512
Imported from: https://github.com/kraj/meta-clang.git Commit 87d41f7dd7a69bbf159 This version is on the one hand newer than the version currently in meta-openembedded (version 10 vs 5) and on the other hand based on the debian sources, which already contain some makefiles added by debian (android normally compiles with Android.bp files) and should thus be easier to maintain than current version. Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
36 lines
782 B
Bash
36 lines
782 B
Bash
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
manufacturer=RPB
|
|
model="Android device"
|
|
serial=0123456789ABCDEF
|
|
|
|
if [ -r /etc/android-gadget-setup.machine ] ; then
|
|
. /etc/android-gadget-setup.machine
|
|
fi
|
|
|
|
[ -d /sys/kernel/config/usb_gadget ] || modprobe libcomposite
|
|
|
|
cd /sys/kernel/config/usb_gadget
|
|
|
|
[ -d adb ] && /usr/bin/android-gadget-cleanup || true
|
|
|
|
mkdir adb
|
|
cd adb
|
|
|
|
mkdir configs/c.1
|
|
mkdir functions/ffs.usb0
|
|
mkdir strings/0x409
|
|
mkdir configs/c.1/strings/0x409
|
|
echo 0x18d1 > idVendor
|
|
echo 0xd002 > idProduct
|
|
echo "$serial" > strings/0x409/serialnumber
|
|
echo "$manufacturer" > strings/0x409/manufacturer
|
|
echo "$model" > strings/0x409/product
|
|
echo "Conf 1" > configs/c.1/strings/0x409/configuration
|
|
ln -s functions/ffs.usb0 configs/c.1
|
|
|
|
mkdir -p /dev/usb-ffs/adb
|
|
mount -t functionfs usb0 /dev/usb-ffs/adb
|