summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Beare <bruce.j.beare@intel.com>2015-10-23 21:19:30 -0700
committerBruce Beare <bruce.j.beare@intel.com>2015-11-03 23:10:31 -0800
commit9447a9e62c209fe3ad5a3aef02c1012b5073ddc2 (patch)
tree86e6d48a18fc0d1df819e7a0f79370af37c25707
parent2f7415c5a2a19e36a2f4497f03d081041626842e (diff)
downloadedison-9447a9e62c209fe3ad5a3aef02c1012b5073ddc2.tar.gz
Brillo Edison product configuraton and makefiles
Change-Id: I57249325649db18ae23b891097bc0c7f143da6ab Author: Bruce Beare <bruce.j.beare@intel.com> Author: Constantin Musca <constantin.musca@intel.com> Author: David Zeuthen <zeuthen@google.com> Author: Guilhem IMBERTON <guilhem.imberton@intel.com> Author: Jianxun Zhang <jianxun.zhang@intel.com> Author: Lee Campbell <leecam@google.com> Author: Pavlin Radoslavov <pavlin@google.com> Author: Scott D Phillips <scott.d.phillips@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
-rw-r--r--AndroidBoard.mk20
-rw-r--r--BoardConfig.mk54
-rw-r--r--base_product/AndroidProducts.mk21
-rw-r--r--base_product/devicesetup.sh17
-rw-r--r--base_product/edison.mk26
-rw-r--r--base_product/weaved.conf79
-rw-r--r--build/tasks/flashfiles.mk39
-rw-r--r--fstab.device3
-rw-r--r--gpt.ini74
9 files changed, 333 insertions, 0 deletions
diff --git a/AndroidBoard.mk b/AndroidBoard.mk
new file mode 100644
index 0000000..0b7b3f5
--- /dev/null
+++ b/AndroidBoard.mk
@@ -0,0 +1,20 @@
+#
+# Copyright 2015 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# This has to live here for now as the variables it requires are
+# not read when BoardConfig.mk is parsed.
+
+include device/generic/brillo/kernel.mk
diff --git a/BoardConfig.mk b/BoardConfig.mk
new file mode 100644
index 0000000..fae521e
--- /dev/null
+++ b/BoardConfig.mk
@@ -0,0 +1,54 @@
+#
+# Copyright 2015 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Select the SoC
+$(call set_soc, intel, edison)
+
+# Add wifi controller
+$(call add_peripheral, intel, wifi/bcm43340)
+# Add bt controller
+$(call add_peripheral, intel, bluetooth/bcm43340)
+# Add lights HAL
+$(call add_peripheral, intel, light/edison_arduino)
+# Add audio support
+$(call add_peripheral, intel, audio/edison)
+# Add sensor support
+$(call add_peripheral, intel, sensors/edison_arduino)
+
+BOARD_SYSTEMIMAGE_PARTITION_SIZE := 268435456
+BOARD_USERDATAIMAGE_PARTITION_SIZE := 134217728
+BOARD_CACHEIMAGE_PARTITION_SIZE := 268435456
+BOARD_U_BOOT_ENV_SIZE := 0x10000
+BOARD_GPT_INI := device/intel/edison/gpt.ini
+
+
+PRODUCT_COPY_FILES += \
+ device/intel/edison/flash_tools/brillo-flashall-edison.sh:provision-device \
+ device/intel/edison/fstab.device:root/fstab.${soc_name}
+
+WIFI_DRIVER_NVRAM_PATH_PARAM := "/sys/module/bcm4334x/parameters/nvram_path"
+WIFI_DRIVER_FW_PATH_PARAM := "/sys/module/bcm4334x/parameters/firmware_path"
+
+WIFI_DRIVER_NVRAM_PATH := "/vendor/firmware/bcm43340/bcmdhd.cal"
+WIFI_DRIVER_FW_PATH_STA := "/vendor/firmware/bcm43340/fw_bcmdhd_sta.bin"
+WIFI_DRIVER_FW_PATH_AP := "/vendor/firmware/bcm43340/fw_bcmdhd_apsta.bin"
+WIFI_DRIVER_FW_PATH_P2P := "/vendor/firmware/bcm43340/fw_bcmdhd_p2p.bin"
+
+BOARD_SEPOLICY_DIRS += \
+ device/intel/edison/sepolicy
+
+# Must defined at the end of the file
+$(call add_device_packages)
diff --git a/base_product/AndroidProducts.mk b/base_product/AndroidProducts.mk
new file mode 100644
index 0000000..39d221f
--- /dev/null
+++ b/base_product/AndroidProducts.mk
@@ -0,0 +1,21 @@
+#
+# Copyright 2015 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# This file is found by the build system.
+# It defines the base product definition for device bring up.
+
+PRODUCT_MAKEFILES := \
+ $(LOCAL_DIR)/edison.mk
diff --git a/base_product/devicesetup.sh b/base_product/devicesetup.sh
new file mode 100644
index 0000000..9638c51
--- /dev/null
+++ b/base_product/devicesetup.sh
@@ -0,0 +1,17 @@
+#
+# Copyright 2015 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+add_lunch_combo edison-eng
diff --git a/base_product/edison.mk b/base_product/edison.mk
new file mode 100644
index 0000000..00cfba8
--- /dev/null
+++ b/base_product/edison.mk
@@ -0,0 +1,26 @@
+#
+# Copyright 2015 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+$(call inherit-product, device/generic/brillo/brillo_base.mk)
+
+PRODUCT_NAME := edison
+PRODUCT_BRAND := Brillo
+
+PRODUCT_DEVICE := edison
+
+# Install edison-specific config file for weaved.
+PRODUCT_COPY_FILES += \
+ device/intel/edison/base_product/weaved.conf:system/etc/weaved/weaved.conf
diff --git a/base_product/weaved.conf b/base_product/weaved.conf
new file mode 100644
index 0000000..0b8b8d6
--- /dev/null
+++ b/base_product/weaved.conf
@@ -0,0 +1,79 @@
+#
+# Copyright 2015 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# OAuth 2.0 client id.
+client_id=58855907228.apps.googleusercontent.com
+
+# OAuth 2.0 client secret.
+client_secret=eHSAREAHrIqPsHBxCE9zPPBi
+
+# OAuth 2.0 API key.
+api_key=AIzaSyDSq46gG-AxUnC3zoqD9COIPrjolFsMfMA
+
+# Human readable name of the device.
+name=Edison Starter Board
+
+# Human readable description of the device.
+# Defaults to empty string"
+description=Intel Edison Board
+
+# Location of the device.
+# location=
+
+# Manufacturer of the device.
+oem_name=Intel
+
+# Model of the device.
+# Defaults to Brillo.
+model_name=Edison
+
+# Five character code assigned by the cloud registry of device models.
+# Defaults to "AAAAA" (Unregistered model).
+model_id=AAAAA
+
+# Maximum role for local anonymous user.
+# local_anonymous_access_role=viewer
+
+# If true, allows local pairing using Privet API.
+# local_pairing_enabled=true
+
+# If true, allows local discovery using mDns.
+# local_discovery_enabled=true
+
+# GCD service polling interval in milliseconds.
+# polling_period_ms=7000
+
+# GCD service backup polling interval in milliseconds.
+# backup_polling_period_ms=1800000
+
+# Automatic mode causes buffet to automatically bring up a SoftAP for
+# bootstrapping when it looses network connectivity for long enough,
+# and on first boot.
+# wifi_auto_setup_enabled=true
+
+# List of pairing modes supported by device.
+# Values can be one of pinCode, embeddedCode, ultrasound32, audible32.
+# Defaults to pinCode if embedded_code_path is empty, or embeddedCode otherwise.
+pairing_modes=embeddedCode
+
+# Absolute path to file specifying an embedded pairing code. The file at
+# embedded_code_path should be a file in key value format, with a key
+# embedded_code.
+# Defaults to empty path.
+embedded_code_path=/etc/weaved/weaved.conf
+
+# Embedded code.
+embedded_code=hello
diff --git a/build/tasks/flashfiles.mk b/build/tasks/flashfiles.mk
new file mode 100644
index 0000000..635738f
--- /dev/null
+++ b/build/tasks/flashfiles.mk
@@ -0,0 +1,39 @@
+# Rule to make a distribution zipfile with all that is needed to flash the Edison
+
+ifeq ($(TARGET_DEVICE),edison)
+
+edisonname := $(TARGET_PRODUCT)
+ifeq ($(TARGET_BUILD_TYPE),debug)
+ edisonname := $(edisonname)_debug
+endif
+edisonname := $(edisonname)-flashfiles-$(FILE_NAME_TAG)
+
+EDISON_ZIP := $(TARGET_OUT_INTERMEDIATES)/$(edisonname).zip
+EDISON_DEVICE := device/intel/edison
+EDISON_IFWI := $(EDISON_DEVICE)/ifwi_firmware
+EDISON_UBOOT := $(EDISON_DEVICE)/uboot_firmware
+EDISON_TOOLS := $(EDISON_DEVICE)/flash_tools
+
+EDISON_FLASHFILES := $(INSTALLED_BOOTIMAGE_TARGET)
+EDISON_FLASHFILES += $(INSTALLED_SYSTEMIMAGE)
+EDISON_FLASHFILES += $(INSTALLED_USERDATAIMAGE_TARGET)
+EDISON_FLASHFILES += $(PRODUCT_OUT)/gpt.bin
+EDISON_FLASHFILES += $(EDISON_IFWI)/edison_ifwi-dbg-00.bin \
+ $(EDISON_IFWI)/edison_dnx_fwr.bin \
+ $(EDISON_IFWI)/edison_dnx_osr.bin
+EDISON_FLASHFILES += $(EDISON_UBOOT)/u-boot-edison.bin $(EDISON_UBOOT)/u-boot-edison.img
+EDISON_FLASHFILES += $(EDISON_TOOLS)/FlashEdison.json \
+ $(EDISON_TOOLS)/brillo-flashall-edison.bat \
+ $(EDISON_TOOLS)/brillo-flashall-edison.sh \
+ $(EDISON_TOOLS)/README
+
+
+$(EDISON_ZIP): $(EDISON_FLASHFILES)
+ $(hide) echo "Package flashfiles: $@"
+ $(hide) rm -rf $@
+ $(hide) mkdir -p $(dir $@)
+ $(hide) zip -j $@ $(EDISON_FLASHFILES)
+
+$(call dist-for-goals, dist_files, $(EDISON_ZIP))
+
+endif
diff --git a/fstab.device b/fstab.device
new file mode 100644
index 0000000..4757e5b
--- /dev/null
+++ b/fstab.device
@@ -0,0 +1,3 @@
+/dev/block/by-name/system /system ext4 ro,barrier=1,discard wait,slotselect
+/dev/block/by-name/data /data ext4 nosuid,nodev,barrier=1,noauto_da_alloc,discard wait,check,encryptable=footer
+/dev/block/by-name/misc /misc emmc defaults defaults
diff --git a/gpt.ini b/gpt.ini
new file mode 100644
index 0000000..a101b22
--- /dev/null
+++ b/gpt.ini
@@ -0,0 +1,74 @@
+[base]
+partitions = u-boot factory panic recovery boot_a system_a oem_a misc boot_b system_b oem_b data
+
+[partition.u-boot]
+label = u-boot
+len = 6
+type = linux
+guid = d05ba25c-1e89-44fb-b75f-be247860f48a
+
+[partition.factory]
+label = factory
+len = 1
+type = factory
+guid = d41eff7d-9a94-404e-8a81-ea68cb8bfbb9
+
+[partition.panic]
+label = panic
+len = 24
+type = linux
+guid = 7d804919-4017-4d77-a04c-522d8e874a20
+
+[partition.recovery]
+label = recovery
+len = 32
+type = boot
+guid = 96f79696-a347-443e-9dd9-c68e1876d139
+
+[partition.boot_a]
+label = boot_a
+len = 32
+type = boot
+guid = 58194d5b-26cd-4a5b-bf7f-0db38f7e7fdf
+
+[partition.system_a]
+label = system_a
+len = 384
+type = linux
+guid = effafa61-6a39-4d77-896f-4f0d8c74e57b
+
+[partition.oem_a]
+label = oem_a
+len = 96
+type = linux
+guid = 9c26e1c5-f1d1-4856-8eac-f3bd977a07da
+
+[partition.misc]
+label = misc
+len = 1
+type = misc
+guid = 88d9b380-ca80-41db-8537-9769bb764840
+
+[partition.boot_b]
+label = boot_b
+len = 32
+type = boot
+guid = ce8c0051-4db2-4aad-94e8-93c232052226
+
+[partition.system_b]
+label = system_b
+len = 384
+type = linux
+guid = bcd476f2-df0b-4ef4-8220-95ef7452452d
+
+[partition.oem_b]
+label = oem_b
+len = 96
+type = linux
+guid = a623cc5c-7eab-49d7-9314-61366c560ebc
+
+[partition.data]
+label = data
+len = -1
+type = linux
+guid = b1e70484-b6f7-4c2d-9b5f-f40862361369