Issue 13967 in chromium-os: Improve hardware components probing method

96 views
Skip to first unread message

chrom...@googlecode.com

unread,
Apr 8, 2011, 7:19:11 AM4/8/11
to chromium...@chromium.org
Status: Untriaged
Owner: ----
CC: wai...@chromium.org, hun...@chromium.org, nsand...@chromium.org,
ta...@chromium.org, v...@chromium.org
Labels: Type-Feature Pri-1 Mstone-X Area-Factory Effort-2 Arch-All

New issue 13967 by hun...@chromium.org: Improve hardware components probing
method
http://code.google.com/p/chromium-os/issues/detail?id=13967

Currently many of our hardware component probing (mostly USB/PCI) relies on
matching to a known list, instead of probing from scratch. That makes many
inconvenient, and hard to recognize difference like "A has something but B
does not".

We need to...
- Improve the approach to probe USB/PCI components
- Allow matching "if a USB/PCI component does not exist"

chrom...@googlecode.com

unread,
Apr 9, 2011, 8:46:13 AM4/9/11
to chromium...@chromium.org

Comment #2 on issue 13967 by hun...@chromium.org: Improve hardware

Ideas:
- use "lshw", it provides good information, but it's slow
- use "hinting" -- guess device information by category / device type info
in pci/usb
- use flimflam to collect 3G/WiFi information

chrom...@googlecode.com

unread,
Apr 11, 2011, 3:38:22 AM4/11/11
to chromium...@chromium.org

Comment #3 on issue 13967 by bugdro...@chromium.org: Improve hardware
components probing method
http://code.google.com/p/chromium-os/issues/detail?id=13967#c3

Commit: b2facbf8f3caf1e8819ab9a4e56d733168db3891
Email: hun...@chromium.org

factor_test_tools: make PCI/USB component probing more robust

We should never rely on "known device number matching" for PCI and USB
devices.

BUG=chromium-os:13967
TEST=gft_hwcomp.py *DEV* # *DEV* contains all '*'
# seeing PCI fields not '*'.

A sample output on Alex, with approved_componenets=all '*':
{'data_display_geometry': ['1280x800'],
'hash_ec_firmware': ['6148...'],
'hash_ro_firmware': ['6219...'],
'key_recovery': ['*'],
'key_root': ['*'],
'part_id_3g': ['05c6:9244 Qualcomm Incorporated Qualcomm Gobi 2000'],
'part_id_audio_codec': ['Realtek ALC272'],
'part_id_bluetooth': ['0cf3:3002'],
'part_id_cardreader': ['*'],
'part_id_chipset': ['8086:a010'],
'part_id_chrontel': ['*'],
'part_id_cpu': ['Intel(R) Atom(TM) CPU N550 @ 1.50GHz'],
'part_id_display_panel': ['SEC:4231'],
'part_id_dram': ['2048'],
'part_id_ec_flash_chip': ['Macronix MX25L1005'],
'part_id_embedded_controller': ['SMSC FDC37M81x (id=0x4d, rev=0x01)'],
'part_id_ethernet': ['0b95:7720 ASIX Elec. Corp. AX88x72A'],
'part_id_flash_chip': ['Macronix MX25L3205'],
'part_id_hwqual': ['SAMSUNG ALEX DEV 6916'],
'part_id_storage': ['ATA SanDisk SSD P4 1'],
'part_id_tpm': ['49465800:1.2.3.18'],
'part_id_usb_hosts': ['8086:27cc 8086:27cb 8086:27ca 8086:27c9 8086:27c8'],
'part_id_vga': ['8086:a011'],
'part_id_webcam': ['2232:1013 Namuga WebCam SC-13HDO10B39N'],
'part_id_wireless': ['168c:0030'],
'vendor_id_touchpad': ['SynPS/2 Synaptics TouchPad'],
'version_rw_firmware': ['1']}

Change-Id: I713fca8945938c24ecfb5000fd32ef5603008409

R=wai...@chromium.org

Review URL: http://codereview.chromium.org/6823023

M gft_hwcomp.py

chrom...@googlecode.com

unread,
Apr 11, 2011, 3:52:30 AM4/11/11
to chromium...@chromium.org
Updates:
Status: Fixed
Owner: hun...@chromium.org

Comment #4 on issue 13967 by hun...@chromium.org: Improve hardware

- now '' always means 'Not present'
- all USB/PCI modules are not probable without knowing their ID, except SD
card (still having power issue)
- chrontel is still not detected by default, unless assigned in db file.

In general, I'd say this is closed (for R12).

To verify, prepare a component list file and make it '*' for every field.
Run it with gft_hwcomp and you should see all components you have on your
device.

chrom...@googlecode.com

unread,
Apr 13, 2011, 12:57:42 AM4/13/11
to chromium...@chromium.org

Comment #5 on issue 13967 by bugdro...@chromium.org: Improve hardware
components probing method
http://code.google.com/p/chromium-os/issues/detail?id=13967#c5

Commit: 3e99d09fd791358b8773af73e12128036b7fd512
Email: hun...@chromium.org

factory_test_tools: support legacy probing mode

The new heuristic probing for USB/PCI devices is good, but it is possible to
have some device that cannot be probed by the sysfs rules.

To solve this issue, a new "legacy mode" is introduced: if an approved
component list is simply full of traditional USB/PCI device info, we should
ignore our heuristic search results and simply compare if the one of the
component in list can be found on system.

ex: id_wireless: ['1a1b:2b3c' '0030:1234],
and the system has 0030:1234 installed but not as 'wlan0'.

Before this fix, probing will result in id_wireless: [''] and give failure,
after this fix probing will give ['0030:1234'] and success.

BUG=chromium-os:13967
TEST=gft_hwcomp.py MODIFIED_COMPONENT # to have legacy fields only

Change-Id: Ib3fb8d5a01bfb24fd84c10d611d9ff6f8637ef23

R=wai...@chromium.org

Review URL: http://codereview.chromium.org/6821072

M gft_hwcomp.py

chrom...@googlecode.com

unread,
Apr 13, 2011, 1:05:45 AM4/13/11
to chromium...@chromium.org

Comment #6 on issue 13967 by bugdro...@chromium.org: Improve hardware
components probing method
http://code.google.com/p/chromium-os/issues/detail?id=13967#c6

Commit: b9645870a11dcdec6725139e9c0446c8c47df42a
Email: hun...@chromium.org

factory_test_tools: merge latest improvements from ToT to R12 factory branch

factory_test_tools: improve gft_hwcomp (hardware_Components) performance
Cherry-Pick URL: http://codereview.chromium.org/6822028

factory_test_tools: support legacy probing mode

Cherry-Pick URL: http://codereview.chromium.org/6821072

BUG=chrome-os-partner:2505,chromium-os:13967
TEST=time gft_hwcomp.py --sync # 18.483s
time gft_hwcomp.py --async # 13.176s
Gets 5.3 second improvements

Review URL: http://codereview.chromium.org/6839009

Change-Id: Ic13cbbbf854e097e9b6e3fb60ebecf7ccc1871cc

M gft_common.py
M gft_hwcomp.py

chrom...@googlecode.com

unread,
Apr 16, 2011, 1:16:02 AM4/16/11
to chromium...@chromium.org

Comment #8 on issue 13967 by bugdro...@chromium.org: Improve hardware
components probing method
http://code.google.com/p/chromium-os/issues/detail?id=13967#c8

Commit: 1b50ff166eff5d52715ba868f04668087bce01b7
Email: hun...@chromium.org

factory_test_tools: use flimflam to get connection info directly.

To preven using "modem status" command, this CL tries to load flimflam
tests directly.

BUG=chromium-os:13967,chrome-os-partner:2952
TEST=./gft_hwcomp # seeing:
'part_id_3g': ['0XXX:XXXX Some Manufaturuer Some Product'],
'version_3g_firmware': ['Some Vendor 09010012'],

Change-Id: I648a1afcfe8a319f4bc3f5c981c12048d0648235

R=yong...@chromium.org,jgla...@chromium.org

Review URL: http://codereview.chromium.org/6835028

M gft_hwcomp.py

Reply all
Reply to author
Forward
0 new messages