Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107147395
D15602.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D15602.diff
View Options
Index: head/release/tools/arm.subr
===================================================================
--- head/release/tools/arm.subr
+++ head/release/tools/arm.subr
@@ -92,6 +92,41 @@
return 0
}
+arm_setup_usb_otg() {
+ # Set up virtual serial port over USB OTG / device mode.
+ echo >> ${CHROOTDIR}/${DESTDIR}/etc/devd.conf
+ echo '# Required for USB OTG virtual serial port.' \
+ >> ${CHROOTDIR}/${DESTDIR}/etc/devd.conf
+ echo 'notify 100 {' \
+ >> ${CHROOTDIR}/${DESTDIR}/etc/devd.conf
+ echo ' match "system" "DEVFS";' \
+ >> ${CHROOTDIR}/${DESTDIR}/etc/devd.conf
+ echo ' match "subsystem" "CDEV";' \
+ >> ${CHROOTDIR}/${DESTDIR}/etc/devd.conf
+ echo ' match "type" "CREATE";' \
+ >> ${CHROOTDIR}/${DESTDIR}/etc/devd.conf
+ echo ' match "cdev" "ttyU[0-9]+";' \
+ >> ${CHROOTDIR}/${DESTDIR}/etc/devd.conf
+ echo ' action "/sbin/init q";' \
+ >> ${CHROOTDIR}/${DESTDIR}/etc/devd.conf
+ echo '};' \
+ >> ${CHROOTDIR}/${DESTDIR}/etc/devd.conf
+
+ echo '# USB OTG virtual serial port' \
+ >> ${CHROOTDIR}/${DESTDIR}/etc/ttys
+ echo 'ttyU0 "/usr/libexec/getty 3wire" vt100 onifconsole secure' \
+ >> ${CHROOTDIR}/${DESTDIR}/etc/ttys
+ echo 'ttyU1 "/usr/libexec/getty 3wire" vt100 onifconsole secure' \
+ >> ${CHROOTDIR}/${DESTDIR}/etc/ttys
+
+ echo '# Configure USB OTG; see usb_template(4).' \
+ >> ${CHROOTDIR}/${DESTDIR}/boot/loader.conf
+ echo 'hw.usb.template=3' \
+ >> ${CHROOTDIR}/${DESTDIR}/boot/loader.conf
+ echo 'umodem_load="YES"' \
+ >> ${CHROOTDIR}/${DESTDIR}/boot/loader.conf
+}
+
arm_install_base() {
chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${DESTDIR}
eval chroot ${CHROOTDIR} make -C ${WORLDDIR} \
@@ -102,6 +137,7 @@
chroot ${CHROOTDIR} mkdir -p ${DESTDIR}/boot/msdos
arm_create_user
+ arm_setup_usb_otg
echo '# Custom /etc/fstab for FreeBSD embedded images' \
> ${CHROOTDIR}/${DESTDIR}/etc/fstab
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 11, 8:37 PM (20 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15757597
Default Alt Text
D15602.diff (1 KB)
Attached To
Mode
D15602: Enable USB OTG serial terminal on ARM SD card images
Attached
Detach File
Event Timeline
Log In to Comment