Skip to content

Instantly share code, notes, and snippets.

@RobertCNelson
Last active November 15, 2017 21:37
Show Gist options
  • Select an option

  • Save RobertCNelson/5103e2035f26418c6bf9 to your computer and use it in GitHub Desktop.

Select an option

Save RobertCNelson/5103e2035f26418c6bf9 to your computer and use it in GitHub Desktop.
UDOO neo
user:pass [udooer:udooer]
/boot/uEnv.txt
mmcroot=/dev/mmcblk0p2 rootwait rootfstype=ext4 rw
fdt_file=dtbs/imx6sx-udoo-neo-hdmi.dtb
echo "default username:password is [udooer:udooer]" >> /etc/issue
Ubuntu 14.04.3 LTS udoo ttyGS0
default username:password is [udooer:udooer]
udoo login:
/etc/udev/rules.d/70-persistent-net.rules
usb dongle -> rename0 instead of eth1 use (DRIVERS=="fec")
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="fec", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
cat /etc/init/u_serial.conf
start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]
respawn
exec /sbin/getty 115200 ttyGS0
init script:
sudo modprobe g_multi file=/dev/mmcblk0p1
host pc:
[28092.506198] usb 5-1.2: new high-speed USB device number 8 using ehci-pci
[28092.599780] usb 5-1.2: New USB device found, idVendor=1d6b, idProduct=0104
[28092.599787] usb 5-1.2: New USB device strings: Mfr=3, Product=4, SerialNumber=0
[28092.599791] usb 5-1.2: Product: Multifunction Composite Gadget
[28092.599795] usb 5-1.2: Manufacturer: Linux 3.14.28-imx-r0.3 with 2184000.usb
[28092.604356] rndis_host 5-1.2:1.0 usb0: register 'rndis_host' at usb-0000:00:12.2-1.2, RNDIS device, 6e:cb:c4:b8:6d:55
[28092.605467] cdc_acm 5-1.2:1.2: ttyACM0: USB ACM device
[28092.607285] usb-storage 5-1.2:1.4: USB Mass Storage device detected
[28092.607889] scsi host14: usb-storage 5-1.2:1.4
[28092.650467] rndis_host 5-1.2:1.0 enx6ecbc4b86d55: renamed from usb0
[28092.676741] IPv6: ADDRCONF(NETDEV_UP): enx6ecbc4b86d55: link is not ready
[28093.606117] scsi 14:0:0:0: Direct-Access Linux File-Stor Gadget 0314 PQ: 0 ANSI: 2
[28093.606690] sd 14:0:0:0: Attached scsi generic sg1 type 0
[28093.607208] sd 14:0:0:0: [sdb] 65536 512-byte logical blocks: (33.5 MB/32.0 MiB)
[28093.717797] sd 14:0:0:0: [sdb] Write Protect is off
[28093.717806] sd 14:0:0:0: [sdb] Mode Sense: 0f 00 00 00
[28093.827689] sd 14:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[28094.056657] sdb:
#serial:
gtkterm -p /dev/ttyACM0 -s 115200
#!/bin/bash
#needs: sudo apt-get install udhcpd
#sudo sed -i -e 's:no:yes:g' /etc/default/udhcpd
SerialNumber="0C-1234BBBK5678"
Manufacturer="SECO"
Product="UDOO NEO"
#host_addr/dev_addr
#Should be "constant" for a particular unit, if not specified g_multi/g_ether will
#randomly generate these, this causes interesting problems in windows/systemd/etc..
#
#systemd: ifconfig -a: (mac = device name)
#enx4e719db78204 Link encap:Ethernet HWaddr 4e:71:9d:b7:82:04
host_addr="4e:71:9d:b7:82:04"
dev_addr="4e:71:9d:b7:82:05"
usb0_address="192.168.7.2"
usb0_gateway="192.168.7.1"
usb0_netmask="255.255.255.252"
udhcp_start=${usb0_gateway}
udhcp_end=${usb0_gateway}
udhcp_interface=usb0
udhcp_max_leases=1
udhcp_option="subnet ${usb0_netmask}"
unset root_drive
root_drive="$(cat /proc/cmdline | sed 's/ /\n/g' | grep root=UUID= | awk -F 'root=' '{print $2}' || true)"
if [ ! "x${root_drive}" = "x" ] ; then
root_drive="$(/sbin/findfs ${root_drive} || true)"
else
root_drive="$(cat /proc/cmdline | sed 's/ /\n/g' | grep root= | awk -F 'root=' '{print $2}' || true)"
fi
g_network="iSerialNumber=${SerialNumber} iManufacturer=${Manufacturer} iProduct=${Product} host_addr=${host_addr} dev_addr=${dev_addr}"
#In a single partition setup, dont load g_multi, as we could trash the linux file system...
if [ "x${root_drive}" = "x/dev/mmcblk0p1" ] || [ "x${root_drive}" = "x/dev/mmcblk1p1" ] ; then
if [ -f /usr/sbin/udhcpd ] ; then
#Make sure (# CONFIG_USB_ETH_EEM is not set), otherwise this shows up as "usb0" instead of ethX on host pc..
modprobe g_ether ${g_network} || true
else
#serial:
modprobe g_serial || true
fi
else
boot_drive="${root_drive%?}1"
modprobe g_multi file=${boot_drive} cdrom=0 ro=0 stall=0 removable=1 nofua=1 ${g_network} || true
fi
if [ -f /usr/sbin/udhcpd ] ; then
#allow g_multi/g_ether/g_serial to load...
sleep 1
# Will start or restart udhcpd
/sbin/ifconfig usb0 ${usb0_address} netmask ${usb0_netmask} || true
if [ -f /etc/udhcpd.conf ] ; then
echo "start ${udhcp_start}" > /etc/udhcpd.conf
echo "end ${udhcp_end}" >> /etc/udhcpd.conf
echo "interface ${udhcp_interface}" >> /etc/udhcpd.conf
echo "max_leases ${udhcp_max_leases}" >> /etc/udhcpd.conf
echo "option ${udhcp_option}" >> /etc/udhcpd.conf
fi
/usr/sbin/udhcpd -S /etc/udhcpd.conf
#FIXME check for g_ether/usb0 module loaded, as it sometimes takes a little bit...
sleep 1
/etc/init.d/udhcpd restart
fi
[ 5.113465] cfg80211: Calling CRDA to update world regulatory domain
[ 5.241256] random: nonblocking pool is initialized
[ 5.276147] wl18xx_driver wl18xx.0.auto: Direct firmware load failed with error -2
[ 5.276160] wl18xx_driver wl18xx.0.auto: Falling back to user helper
[ 5.278005] wlcore: ERROR could not get configuration binary ti-connectivity/wl18xx-conf.bin: -2
[ 5.309168] cfg80211: World regulatory domain updated:
[ 5.309183] cfg80211: DFS Master region: unset
[ 5.309189] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[ 5.309199] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 5.309207] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 5.309214] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[ 5.309223] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[ 5.309232] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[ 5.309240] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[ 5.309247] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[ 5.309255] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[ 5.313219] wlcore: WARNING falling back to default config
[ 5.592231] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
[ 5.605662] wlcore: loaded
[ 5.855923] Bluetooth: Core ver 2.20
[ 5.858348] NET: Registered protocol family 31
[ 5.858362] Bluetooth: HCI device and connection manager initialized
[ 5.858389] Bluetooth: HCI socket layer initialized
[ 5.858400] Bluetooth: L2CAP socket layer initialized
[ 5.858461] Bluetooth: SCO socket layer initialized
[ 6.533407] Timeout detect video signal mod=0x2c
[ 6.533422] video mode NTSC
[ 6.533431] vadc driver loaded
[ 6.765653] init: failsafe main process (348) killed by TERM signal
[ 8.250324] NET: Registered protocol family 10
udooer@udoo:/$ sudo modinfo wl18xx
filename: /lib/modules/3.14.28-imx-r0.5/kernel/backports/drivers/net/wireless/ti/wl18xx/wl18xx.ko
firmware: ti-connectivity/wl18xx-fw-4.bin
author: Luciano Coelho <[email protected]>
license: GPL v2
version: backported from Linux (v4.1.7-0-g0c5c1f1) using backports v4.1.1-1-0-g8286954
srcversion: F0760E161D01C062A96CC55
alias: platform:wl18xx
depends: wlcore,mac80211,cfg80211
intree: Y
vermagic: 3.14.28-imx-r0.5 SMP preempt mod_unload modversions ARMv7 p2v8
parm: ht_mode:Force HT mode: wide or siso20 (charp)
parm: board_type:Board type: fpga, hdk (default), evb, com8 or dvp (charp)
parm: checksum:Enable TCP checksum: boolean (defaults to false) (bool)
parm: dc2dc:External DC2DC: u8 (defaults to 0) (int)
parm: n_antennas_2:Number of installed 2.4GHz antennas: 1 (default) or 2 (int)
parm: n_antennas_5:Number of installed 5GHz antennas: 1 (default) or 2 (int)
parm: low_band_component:Low band component: u8 (default is 0x01) (int)
parm: low_band_component_type:Low band component type: u8 (default is 0x05 or 0x06 depending on the board_type) (int)
parm: high_band_component:High band component: u8, (default is 0x01) (int)
parm: high_band_component_type:High band component type: u8 (default is 0x09) (int)
parm: pwr_limit_reference_11_abg:Power limit reference: u8 (default is 0xc8) (int)
parm: num_rx_desc:int
parm: num_rx_desc_param:Number of Rx descriptors: u8 (default is 32)
udooer@udoo:/$ cd ~/
udooer@udoo:~$ lsmod
Module Size Used by
ipv6 295310 14
bluetooth 459832 6
wl18xx 83455 0
wlcore 208502 1 wl18xx
mac80211 334607 2 wl18xx,wlcore
cfg80211 208695 3 mac80211,wl18xx,wlcore
mxc_vadc 8482 1
mxc_dcic 6565 0
mx6s_capture 17070 0
fxos8700 11366 0
fxas2100x 7949 0
wlcore_sdio 8174 0
ci_hdrc_imx 8956 0
usbmisc_imx 8844 1 ci_hdrc_imx
ci_hdrc 32387 1 ci_hdrc_imx
udc_core 9665 1 ci_hdrc
ehci_hcd 66976 1 ci_hdrc
usbcore 200404 2 ehci_hcd,ci_hdrc
usb_common 3308 3 udc_core,usbcore,ci_hdrc
fuse 74449 0
udooer@udoo:~$ uname -r
3.14.28-imx-r0.5
udooer@udoo:~$
sudo ifconfig wlan0 up
sudo iw wlan0 scan
BSS e8:ba:70:c3:a4:c0(on wlan0)
TSF: 5560914297046 usec (64d, 08:41:54)
freq: 2462
beacon interval: 204 TUs
capability: ESS Privacy RadioMeasure (0x1011)
signal: -76.00 dBm
last seen: 4450 ms ago
Information elements from Probe Response frame:
SSID: \x00
Supported rates: 5.5 11.0* 12.0 24.0 54.0
DS Parameter set: channel 11
TIM: DTIM Count 0 DTIM Period 2 Bitmap Control 0x1 Bitmap[0] 0x0
Country: US Environment: Indoor/Outdoor
Channels [1 - 11] @ 30 dBm
BSS Load:
* station count: 2
* channel utilisation: 69/255
* available admission capacity: 23437 [*32us]
ERP: Barker_Preamble_Mode
HT capabilities:
Capabilities: 0x182c
HT20
SM Power Save disabled
RX HT20 SGI
No RX STBC
Max AMSDU length: 7935 bytes
DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 8 usec (0x06)
HT RX MCS rate indexes supported: 0-15
HT TX MCS rate indexes are undefined
RSN: * Version: 1
* Group cipher: CCMP
* Pairwise ciphers: CCMP
* Authentication suites: PSK
* Capabilities: 4-PTKSA-RC 4-GTKSA-RC (0x0028)
HT operation:
* primary channel: 11
* secondary channel offset: no secondary
* STA channel width: 20 MHz
* RIFS: 0
* HT protection: non-HT mixed
* non-GF present: 1
* OBSS non-GF present: 0
* dual beacon: 0
* dual CTS protection: 0
* STBC beacon: 0
* L-SIG TXOP Prot: 0
* PCO active: 0
* PCO phase: 0
Extended capabilities: Proxy ARP Service, WNM-Notification
WMM: * Parameter version 1
* u-APSD
* BE: CW 15-1023, AIFSN 3
* BK: CW 15-1023, AIFSN 7
* VI: CW 7-15, AIFSN 2, TXOP 3008 usec
* VO: acm CW 3-7, AIFSN 2, TXOP 1504 usec
@sarnold
Copy link

sarnold commented Nov 15, 2017

Have you worked on this lately? The dtb file looks like not-mainline; did you use udoo/fslc kernel? I just did mainline kernel/u-boot and it works fine, minus the extra (subtype) dtb files. I have patches for imx-rproc if you want... I already made this copying your wiki stuff right before I found your gist ;) https://gist.github.com/sarnold/2e244fa8580ec715321a515c72535d4f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment