Contact Us
EnglishRussianGreek
Home Wiki

Talk:Porting Android

From GizmoForYou Wiki

Jump to: navigation, search

PenguinOfDeath

Very useful information. After following these instructions, I have a few further comments regarding the port:

  • In the "latest release package", some of the scripts can be rather destructive if there is an error (especially android-rootfs-install.sh, if the disk is not inserted)
    • Quick-fix: add this line at the beginning of the script file (see this for more info - the script exits upon error):
      set -o errexit
  • I had a hard time getting Android to find the wireless binaries (sd8686.bin, sd8686_helper.bin, available from Marvell)
    • Quick-fix: compile the firmware into the kernel
      • Edit the defconfig file for overo
      • Change the line CONFIG_EXTRA_FIRMWARE="" to:
CONFIG_EXTRA_FIRMWARE="sd8686_helper.bin sd8686.bin" 
CONFIG_EXTRA_FIRMWARE_DIR="/abs/path/to/firmware"
  • I am a bit unsure what the right way is to load wireless in Android, but I tried to mesh together what worked in Angstrom and what Android seemed to expect:
    • Edit mydroid/external/wpa_supplicant/Android.mk
      • Ensure this line exists in this state:
        • WPA_BUILD_SUPPLICANT := true
      • This causes Android to build its own wpa_supplicant
    • Edit mydroid/external/wpa_supplicant/.config
      • Ensure these lines exist in this state:
        • CONFIG_DRIVER_WEXT=y
        • CONFIG_WIRELESS_EXTENSION=y
        • CONFIG_CTRL_IFACE=y
    • Edit mydroid/external/wpa_supplicant/wpa_supplicant.conf
      • Change the line "ctrl_interface=..." to:
        ctrl_interface=DIR=/data/system/wpa_supplicant/ GROUP=system
      • This changes wpa_supplicant to use /data/system/wpa_supplicant/ for its control interfaces, and allow access to other system services
    • I made a few changes to mydroid/hardware/libhardware_legacy/wifi/wifi.c for debugging, compatibility, reading from the right place, etc.. This is what git diff returns from mydroid/hardware/libhardware_legacy: wifi.patch (this might be applicable using patch, I'm kind of a n00b)
    • I added the services for wpa_supplicant and dhcpcd to init.rc, as well as insmoding all of the kernel objects for the wireless at boot (probably a bit overkill...) see it all in: init.rc

Did you know?

Banner