how to hack edison

Download How to Hack Edison

Post on 05-Jul-2015

3.476 views

Category:

Technology

0 download

Embed Size (px)

DESCRIPTION

Bay Area Kernel/VM Hackers, Nov 3, 2014

TRANSCRIPT

  • 1. Agenda What is Edison? Play with Edison Yocto 101 Connect Hardware

2. What is Edison? 3. Overview Tiny computer to make IoT/Wearable device Dual x86 core SoC (Atom Z34XX + Quark) WiFi/BT combo (BCM43340) W/ chip antenna No graphics at all GPU has been disabled Linux kernel is available Forked from 3.10 yocto kernel 4. What you can do Run Linux kernel W/ WiFi+BT functions Run Arduino sketch (top on Linux) 5. What you cannot do (So far...) No BSP other than Linux Play with Quark Unleash GPU power Hardware video enc/dec acceleration 6. Edison Alternatives?Application Processorbased Microcontroller based 7. Edison Alternatives?Linux Video/Graphics Low-power Making your own device(Custom PCB)Arduino No No Yes Very Easy(AT Mega)mbed No No Yes Easy(Cortex-M devices)Raspberry Pi Yes Yes No(C)Almost Impossible(BCM2835)Beagle Bone Yes Yes No Difcult(AM335x)Edison Yes No Reasonable Easy 8. Edison is something diferent Yes it's x86. No Video/Graphics, but full featured Linux. Not low-power as uCs, but still reasonablepower consumption. Approx. 200mA without connectivity You can sleep device easily Tiny integrated module, not a dev board 9. Current Buying Options+ + +For wimpsDecent choiceFor rich peopleFortrue enthusiasts 10. Current Buying OptionsSparkFun Amazon Mouser Fry's SunnyvaleEdison 49.95 49.99 53.40@10 49.99Edison + Minibreakout74.95 67.84 69.00 59.99Edison +Arduino board99.95 N/A 99.00 84.99Edison +Sparkfun boards(Pre-Order)79.90 200 ormoreN/A N/A N/AGO FRY'S NOW 11. Why you should not buyArduino board You want Arduino-compatible-pin-header?Really? Price is expensive Too much components to make it compatiblewith Arduino shields* Though Intel recommend beginners to buy thisboard, documents are crap.*Edison logic level is 1.8Vc 12. Play with Edison 13. Powering up 14. Booting******************************PSH KERNEL VERSION: b0182727WR: 20104000******************************SCU IPC: 0x800000d0 0xfffce92cPSH miaHOB version: TNG.B0.VVBD.0000000cmicrokernel built 23:15:13 Apr 24 2014******* PSH loader *******PCM page cache size = 192 KBCache Constraint = 0 PagesArming IPC driver ..Adding page store pool ..PagestoreAddr(IMR Start Address) = 0x04899000pageStoreSize(IMR Size) = 0x00080000*** Ready to receive application ***U-Boot 2014.04 (Nov 01 2014 - 02:50:55)Watchdog enabledDRAM: 980.6 MiBMMC: tangier_sdhci: 0In: serialOut: serialErr: serialHit any key to stop autoboot: 0 15. Powering up(Mini Breakout)USB Micro B(For Console)USB Micro AB(For OTG)Ext. Power 7-17VLi-PoBattery 3 Methods 5V via OTG External DC-in Li-Po Battery OTG host will onlyworks with DC-in Li-Po will charged at190mA i.e. Connect 190mAhor higherEdisonRecommend external DC-InBE CAREFUL WITH POLARITY 16. Powering up(Bare Module)EdisonVSYSWhere VSYS is: 3.15-4.5V i.e. VBAT voltageDo NOT connect 5V 17. Booting******************************PSH KERNEL VERSION: b0182727WR: 20104000******************************SCU IPC: 0x800000d0 0xfffce92cPSH miaHOB version: TNG.B0.VVBD.0000000cmicrokernel built 23:15:13 Apr 24 2014******* PSH loader *******PCM page cache size = 192 KBCache Constraint = 0 PagesArming IPC driver ..Adding page store pool ..PagestoreAddr(IMR Start Address) = 0x04899000pageStoreSize(IMR Size) = 0x00080000*** Ready to receive application ***U-Boot 2014.04 (Nov 01 2014 - 02:50:55)Watchdog enabledDRAM: 980.6 MiBMMC: tangier_sdhci: 0In: serialOut: serialErr: serialHit any key to stop autoboot: 0 18. Boot processTrusted Boot ROM U-Boot Kernel 19. Working with WiFi Intel ofers quick setup script calledconfgure_edison Many people use this script. Intel also ofers connection manager daemoncalled ConnMan Many people think it is more difficult to handle,which is not. Easy to use, and scalable. 20. Quick Start ConnMan~# systemctl start connman~# systemctl start wpa_supplicant~# connmanctlconnmanctl> enable wificonnmanctl> scan wificonnmanctl> agent onconnmanctl> connect wifi_xxxxxxxxxxxx_xxx_xxx 21. Quick Start ConnMan Make sure connman and wpa_supplicant isworking connmanctl is a tiny CLI to full accessconnman API 22. ConnMan Overview Connection manager developed by Intel It was a part of Moblin/MeeGo project Fully modular system Lightweight Designed to be running on embedded device,tablet, phone. 23. ConnMan API All APIs are D-Bus interface Manager API Technology API Service API Session API Agent API VPN 24. Technology API Enable Disable rfkill Settings Scan AP Scan Tethering Edison supportstethering! 25. Service API Connect Disconnect Get details SSID Strength 26. Session APIWiFiServiceWiFiServiceLTEServiceLTEServiceEtherServiceKeep one Session whileusing many Services 27. Agent API API layer for UI ConnMan requestspassphrase input viaAgent APIExample:Requesting a passphrase for WPA2 networkRequestInput("/service1",{ "Passphrase" : { "Type" : "psk","Requirement" : "mandatory"}} ==> { "Passphrase" : "secret123" } 28. Quick Start SSHvi /lib/systemd/system/sshd.socket[Unit]Conflicts=sshd.service[Socket]ExecStartPre=/bin/mkdir -p /var/run/sshdListenStream=22# restrict access to wired access for security reasons# comment this line to remove restrictionBindToDevice=usb0