move DB410c back to main folder

This commit is contained in:
Robert Wolff 2016-06-20 14:26:43 -07:00
parent 94d3eb0f3f
commit e7a601472c
8 changed files with 1067 additions and 0 deletions

View file

@ -0,0 +1,46 @@
## AOSP RPB 16.03 - Build from Source
Additional AOSP repositories are hosted at:
- [https://github.com/96boards/android_device_linaro_db410c](https://github.com/96boards/android_device_linaro_db410c)
- [https://github.com/96boards/android_manifest](https://github.com/96boards/android_manifest)
- [https://github.com/rsalveti/linux (branch qcomlt-4.4)](https://github.com/rsalveti/linux)
- [https://github.com/robherring/mesa](https://github.com/robherring/mesa)
- [https://github.com/robherring/drm_gralloc](https://github.com/robherring/drm_gralloc)
- https://github.com/robherring/drm_hwcomposer](https://github.com/robherring/drm_hwcomposer)
*Build setup:*
Please setup the host machine by following the instructions here: [http://source.android.com/source/initializing.html](http://source.android.com/source/initializing.html)
Also install make sure to install the following packages:
```shell
sudo apt-get install libfdt-dev python-mako get text
```
*Download the firmware blobs:*
```shell
mkdir android/
cd android/
mkdir -p vendor/db410c
cd vendor/db410c
wget http://developer.qualcomm.com/download/db410c/firmware-410c-1.2.0.bin
sh firmware-410c-1.2.0.bin
cd -
```
*Build the image:*
```shell
repo init -u https://android.googlesource.com/platform/manifest -b android-6.0.1_r16
cd .repo
git clone https://github.com/96boards/android_manifest -b android-6.0-db410c local_manifests
cd -
repo sync -j8
source build/envsetup.sh
lunch db410c-userdebug
make droidcore -j8
cd out/target/product/db410c
```

View file

@ -0,0 +1,281 @@
## Debian RPB 16.06 - Build from Source
- Building Linux Kernel from Source
- Step 1: Setting up your environment on your host computer
- Step 2: Download the Linaro cross compiler toolchain and Skales Tool
- Step 3: Export path to cross compiler tool and confirm version
- Step 4: Clone the Reference Platform kernel
- Step 5: Set the right kernel .config file
- Step 6: Build kernel image
- Step 7: Copy Modules
- Step 8: Find kernel release string
- Step 9: Generate modules.dep and map files
- Step 10: Find DragonBoard™ 410c IP Address
- Step 11: Transfer the modules to the target DragonBoard™ 410c
- Step 12: Generate the initramfs
- Step 13: Create the device tree image and boot image
- Customize Bootloader
- Build Rootfs from source
***
#### Building the Linux kernel from source
The Linux kernel used in this release is available via tags in the git [repository](https://github.com/96boards/linux)
```shell
git: https://github.com/96boards/linux
Dynamic tag: 96b-kernelci
Fixed tag: 96b/releases/2016.06
defconfig: arch/arm64/defconfig kernel/configs/distro.config
```
The kernel image (`Image`) is located in the `boot` image and partition and the kernel modules are installed in the root file system. It is possible for a user to rebuild the kernel and run a custom kernel image instead of the released kernel. You can build the kernel using any recent GCC release using the git tree, tag and defconfig mentioned above. This release only supports booting with device tree, as such both the device tree blobs need to be built as well.
The DragonBoard 410c is an ARMv8 platform, and the kernel is compiled for the Aarch64 target. Even though it is possible to build natively, on the target board, It is recommended to build the Linux kernel on a PC development host. In which case you need to install a cross compiler for the ARM architecture. It is recommended to download the Linaro GCC cross compiler [Aarch64 little-endian](http://releases.linaro.org/components/toolchain/binaries/latest-5.1/aarch64-linux-gnu/gcc-linaro-5.1-2015.08-x86_64_aarch64-linux-gnu.tar.xz).
To build the Linux kernel, you can use the following instructions:
#### Step 1: Setting up your environment on your host computer
- Open your Terminal and cd into your desired directory
- Make a new folder using `mkdir` and call is something relevant
```shell
#Example of desired directory
$ cd ~/Desktop
#Example of relevant folder
$ mkdir DB410c-16.06
$ cd DB410c-16.06
```
#### Step 2: Download the Linaro cross compiler toolchain and Skales Tool
- From within the directory you just made
- Download and unzip by executing the following commands
###### Linaro Cross Compiler
```shell
#Download
$ wget http://releases.linaro.org/components/toolchain/binaries/latest-5.1/aarch64-linux-gnu/gcc-linaro-5.1-2015.08-x86_64_aarch64-linux-gnu.tar.xz
#Unzip
$ tar -Jxvf gcc-linaro-5.1-2015.08-x86_64_aarch64-linux-gnu.tar.xz
```
###### Skales tool
```shell
$ sudo apt-get install libfdt-dev
$ git clone git://codeaurora.org/quic/kernel/skales /tmp/skales
$ export PATH=$PATH:/tmp/skales
```
>Skales will be used later when creating the device tree
#### Step 3: Export path to cross compiler tool and confirm version
- Exporting path will allow build system can find and use the right kernel
```shell
#Create path
$ export PATH=gcc-linaro-5.1-2015.08-x86_64_aarch64-linux-gnu/bin/:$PATH
#Check version
$ aarch64-linux-gnu-gcc --version
aarch64-linux-gnu-gcc (Linaro GCC 5.1-2015.08) 5.1.1 20150608
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```
#### Step 4: Clone the Reference Platform kernel
- **96b-kernelci** is the development branch
- This branch will have the latest changes
```shell
$ git clone -b 96b-kernelci http://github.com/96boards/linux.git
```
- Cloning the kernel may take a few minutes
- Once kernel source has been cloned cd into its directory
```shell
$ cd kernel
```
#### Step 5: Set the right kernel .config file
- This step creates the '.config' file
- The .config file is used by the build system when compiling the kernel
- Current Reference Platform config can be made by using distro.config
- From with in kernel directory execute the following command:
```shell
$ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- defconfig distro.config
```
- New .config file will be hidden but can be seen by executing `ls -a` from within kernel folder
- To view all current configuration the .config file can be opened with a text editor such a `vim`
#### Step 6: Build kernel image
- This step will take some time (~20-30 minutes or more), depending on your cpu/memory
```shell
#Replace X from -jX with the number of cores on your host computer
$ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -jX
```
#### Step 7: Copy Modules
- Modules must be local (host computer) before transferring to target device
- Still within linux directory
- Make temp folder
- Create modules
```shell
$ mk tmp/modules
$ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- modules_install INSTALL_MOD_PATH=/tmp/modules INSTALL_MOD_STRIP=1
```
#### Step 8: Find kernel release string
- This was created during the kernel build
- In this example the kernel.release is 4.4.0+
```shell
$ cat include/config/kernel.release
#Output
$ 4.4.0+
```
#### Step 9: Generate modules.dep and map files
- Helps kernel find modules when system boots
- Note: `4.4.0+` was the output from `cat include/config/kernel.release` in Step 8
```shell
$ depmod -a -b /tmp/modules 4.4.0+
```
#### Step 10: Find DragonBoard™ 410c IP Address
- On your DragonBoard™ 410c
- Connect to the internet through WIFI
- Open one of the Terminal applications
```shell
$ /sbin/ifconfig
```
- Look for your `wlan0` connection
- Here you will see an `inet addr`
- This is your board's IP address and should look something like this: `192.168.0.10`
#### Step 11: Transfer the modules to the target DragonBoard™ 410c
- Using your board's IP Address for linaro@<yourIPaddress>
```shell
$ tar -cjf /tmp/modules.tar.bz2 -C /tmp modules
$ scp /tmp/modules.tar.bz2 linaro@192.168.1.15:~/
$ ssh linaro@192.168.1.15
#DragonBoard™ 410c shell
db410c $ tar -jxvf modules.tar.bz2
db410c $ sudo cp -r modules/lib/modules/4.4.0+ /lib/modules/
```
#### Step 12: Generate the initramfs
- You should still be in the DragonBoard™ 410c shell
```shell
db410c $ sudo update-initramfs -k 4.4.0+ -c
```
- Copy back the new initramfs
- This will be used when creating the boot.mg
#### Step 13: Create the device tree image and boot image
###### Device tree
```shell
$ dtbTool -o dt.img -s 2048 arch/arm64/boot/dts/qcom
```
###### Boot image
```shell
$ mkbootimg --kernel arch/arm64/boot/Image --ramdisk initrd.img-4.4.0+ --output boot.img --dt dt.img --pagesize "2048" --base "0x80000000" --cmdline "root=/dev/disk/by-partlabel/rootfs rw rootwait console=tty0 console=ttyMSM0,115200n8"
```
Congratulations! Boot image is now ready to be flashed to your DragonBoard™ 410c.
- Flashing the boot image can be done using fastboot
- Board must be booted into fastboot mode
- With USB to microUSB cable still connect execute the following:
```shell
$ sudo fastboot flash boot boot.img
$ sudo fastboot reboot
```
***
### How to get and customize the bootloader
While the first stage bootloader is proprietary and released as firmware blob available on [Qualcomm Developer Network](https://developer.qualcomm.com/download/linux-ubuntu-board-support-package-v1.zip), the second stage bootloader is `LK` and is open source.
The original LK source code is available on [CodeAurora.org](https://www.codeaurora.org/cgit/quic/la/kernel/lk/), and the source code which is used in this release can be found in the [Linaro Qualcomm Landing Team git repository](https://git.linaro.org/landing-teams/working/qualcomm/lk.git):
```shell
git: http://git.linaro.org/landing-teams/working/qualcomm/lk.git
tag: ubuntu-qcom-dragonboard410c-LA.BR.1.2.4-00310-8x16.0-linaro1
```
To build the LK bootloader, you can use the following instructions:
```shell
git clone git://codeaurora.org/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8.git -b LA.BR.1.1.3.c4-01000-8x16.0
git clone http://git.linaro.org/landing-teams/working/qualcomm/lk.git -b ubuntu-qcom-dragonboard410c-LA.BR.1.2.4-00310-8x16.0-linaro1
cd lk
make -j4 msm8916 EMMC_BOOT=1 TOOLCHAIN_PREFIX=<path to arm-eabi-4.8 tree>/bin/arm-eabi-
```
The second stage bootloader is flashed on the `about` partition, you can now flash your board with:
```shell
sudo fastboot aboot ./build-msm8916/emmc_appsboot.mbn
```
#### How to get and customize Debian packages source code
This release is based on Debian 8.2 "Jessie".
Since all packages installed in Linaro Debian-based images are maintained either in Debian archives or in Linaro repositories, it is possible for users to update their environment with commands such as:
```shell
sudo apt-get update
sudo apt-get upgrade
```
All user space software is packaged using Debian packaging process. As such you can find extensive information about using, patching and building packages in The Debian New Maintainers Guide. If you quickly want to rebuild any package, you can run the following commands to fetch the package source code and install all build dependencies:
```shell
sudo apt-get update
sudo apt-get build-dep <pkg>
apt-get source <pkg>
```
Then you can rebuild the package locally with:
```
cd <pkg-version>
dpkg-buildpackage -b -us -uc
```
#### TO-DO
- Explain how to build the rootfs from source

View file

@ -0,0 +1,196 @@
This page provides instructions to get started with OpenEmbedded and the Yocto Project on the DragonBoard 410c.
# Introduction
This wiki is not an introduction on OpenEmbedded or Yocto Project. If you are not familiar with OpenEmbedded and the Yocto Project, it is very much recommended to read the appropriate documentation first. For example, you can start with:
* http://openembedded.org/wiki/Main_Page
* http://yoctoproject.org/
* https://www.yoctoproject.org/documentation
In this wiki, we assume that the reader is familiar with basic concepts of OpenEmbedded.
The support for DragonBoard 410c is available in the [meta-qcom BSP layer](http://git.yoctoproject.org/cgit/cgit.cgi/meta-qcom).
This layer has been tested with OpenEmbedded Core layer, and is expected to work with any other standard layers and of course any OpenEmbedded based distributions.
The Linux kernel used for the DragonBoard 410c is the Linaro Landing team kernel, e.g. the same kernel used for the Linaro Linux release builds. The graphic stack is based on mesa, using the freedreno driver.
# Package Dependencies
In order to successfully set up your build environment, you will need to install the following package dependencies.
**Step 1**: You will need git installed on your Linux host machine
`$ sudo apt-get install git`
**Step 2**: Visit the OpenEmbedded (Getting Started) wiki to see which distribution specific dependencies you will need
http://www.openembedded.org/wiki/Getting_started
**Step 3**: Install 96Boards specific dependencies (Case specific)
Setting up the build environment will first search for `whiptail`, if it is not present then it will search for `dialog`. You only need one of the following packages to ensure your setup-environement runs correctly:
`$ sudo apt-get install whiptail`
or
`$ sudo apt-get install dialog`
**Please Note**: If you are running Ubuntu 16.04 you will need to add the following line to your `/etc/apt/sources.list`
`deb http://archive.ubuntu.com/ubuntu/ xenial universe`
```shell
$ cd /etc/apt/
#vim text editor is used in this example
#sudo is used to allow editing, sources.list is set to read only
$ sudo vim sources.list
```
All required dependencies should now be installed on your host environment, you are ready to begin your build environment setup.
# Setup the build environment
The Qualcomm BSP layer can be used with any OE based distribution, such as Poky. The following instructions are provided to get started with 96boards Open Embedded Reference Software Platforms.
To manage the various git trees and the OpenEmbedded environment, a repo manifest is provided. If you do not have `repo` installed on your host machine, you first need to install it, using the following instructions (or similar):
mkdir -p ${HOME}/bin
curl https://storage.googleapis.com/git-repo-downloads/repo > ${HOME}/bin/repo
chmod a+x ${HOME}/bin/repo
export PATH=${HOME}/bin:${PATH}
To initialize your build environment, you need to run:
mkdir oe-qcom && cd oe-qcom
repo init -u https://github.com/96boards/oe-rpb-manifest.git -b jethro
repo sync
source setup-environment [<build folder>]
* after the command `repo sync` returns, all the OpenEmbedded recipes have been downloaded locally.
* you will be prompted to choose the target machine, pick `dragonboard-410c`
* you will be prompted to choose the distro, for now, it is recommended to use 'rpb'
* <build folder> is optional, if missing it will default to `build-$DISTRO`
The script `setup-environment` will create sane default configuration files in <build folder>/conf, you can inspect them and modify them if needed. Note that conf/local.conf and conf/bblayers.conf are symlink , and under source control. So it is generally better not to modify them, and use conf/site.conf and conf/auto.conf instead.
# Build a minimal, console-only image
To build a console image, you can run:
$ bitbake rpb-console-image
At the end of the build, your build artifacts will be found in `tmp-eglibc/deploy/images/dragonboard-410c`. The two artifacts you will use to update your DragonBoard are:
* `rpb-console-image-dragonboard-410c.ext4.gz` and
* `boot-dragonboard-410c.img`
# Bootloaders and eMMC partitions
Build artifacts from your OE build will be flashed into the DragonBoard's on-board eMMC (in contrast to some other boards which run their images from an SDcard). The OpenEmbedded BSP layer assumes that the _Linux_ Bootloaders and eMMC partition layout are used on the DragonBoard 410c (not the _Android_ ones; by default DragonBoards come pre-configured with the Android eMMC partition layout). You can download the latest Linux bootloader package from [here](http://builds.96boards.org/releases/dragonboard410c/linaro/rescue/latest/) to your development host, it will be named something like `dragonboard410c_bootloader_emmc_linux-<version>.zip`.
Whether your DragonBoard is using the Android eMMC partition layout or the Linux partition eMMC layout, you will use the Android `fastboot` utility on your development host for managing the board's eMMC partitions. If you are using a relatively recent Linux distribution on your development host, it probably already has a package that includes the `fastboot` utility (it might be named something like `android-tools` or `android-tools-fastboot`) so go ahead and install it on your development host. In order for your development host's fastboot utility to interact with the DragonBoard, the DragonBoard must be booted into a special `fastboot mode`. The procedure to do so is as follows:
* remove power from your DragonBoard
* plug a USB cable from your development host to your DragonBoard's J4 connector
* while holding down S4 on the DragonBoard (the one marked "(-)"), insert the power adapter
* after a few seconds you can release S4
To verify your cables and that the above procedure worked, on your development host run:
# sudo fastboot devices
and you should get a non-empty response, e.g.
# sudo fastboot devices
83581d40 fastboot
If this is your first time using a particular DragonBoard, you will need to switch its eMMC partition layout to the Linux layout, but this procedure only needs to be done once for a given board. After switching your layout, you only have to update your board with your latest build artifacts.
The procedure for updating your eMMC partitions is as follows. Put your DragonBoard into `fastboot mode` (see procedure above) then perform these steps on your development host:
* download the latest Linux bootloader package (e.g. `dragonboard410c_bootloader_emmc_linux-<version>.zip`)
* unzip its contents
* run the `flashall` script (as root) that you will find after unzipping the Linux bootloader package
At this point your eMMC has the following partition layout:
* `/dev/mmcblk0p7` , aka `aboot` is used for the bootloader (LK/fastboot)
* `/dev/mmcblk0p8` , aka `boot` is used for the boot image (kernel, device tree, initrd)
* `/dev/mmcblk0p10` , aka `rootfs` is used for the root file system
# Flashing build artifacts
In the following description, replace `image` with the name of the image you built. For example: if you built `rpb-console-image` then `image` will be `rpb-console-image`.
At the end of any successful build you will end up with the following artifacts (amongst others)
* `image-dragonboard-410c.ext4.gz` and
* `boot-dragonboard-410c.img`
These will be found in your `tmp-eglibc/deploy/images/dragonboard-410c` directory.
To install these to your DragonBoard's eMMC from your development host:
# gzip -d < image-dragonboard-410c.ext4.gz > image-dragonboard-410c.ext4
# fastboot flash rootfs image-dragonboard-410c.ext4
# fastboot flash boot boot-dragonboard-410c.img
# Proprietary firmware blob
When running the `setup-environment` script, you were asked to read/accept the Qualcomm EULA. The EULA is required to access the proprietary firmware, such as the GPU firmware , WLAN, ...
If you accepted the EULA, when building an image for DragonBoard 410c all proprietary firmware are installed automatically in `/lib/firmware`, and a copy of the EULA is added as '/etc/license.txt`.
If you did not accept the EULA, the firmware are not downloaded, and not installed into the image. You can manually manage the firmware and download them separately from [Qualcomm Developer Network](https://developer.qualcomm.com/download/linux-ubuntu-board-support-package-v1.1.zip).
# Build a simple X11 image
To build an X11 image with GPU hardware accelerated support run:
$ bitbake rpb-desktop-image
At the end of the build, the root file system image will be available as `tmp-eglibc/deploy/images/dragonboard-410c/rpb-desktop-image-dragonboard-410c.ext4.gz`.
Then you can finally start the X server, and run any graphical application:
X&
export DISPLAY=:0
glxgears
The default X11 image includes `openbox` window manager, to use it:
X&
export DISPLAY=:0
openbox &
glxgears
Of course, you can easily add another window manager, such as `metacity` in the image. To install `metacity` in the image, add the following to `conf/auto.conf` file:
CORE_IMAGE_EXTRA_INSTALL += "metacity"
and rebuild the `rpb-desktop-image` image, it will now include `metacity`, which can be started like this:
X&
export DISPLAY=:0
metacity&
glxgears
# Build a sample Wayland/Weston image
For Wayland/weston, it is recommended to change the DISTRO and use `rpb-wayland` instead of `rpb`. The main reason is that in the `rpb-wayland` distro, the support for X11 is completely removed. So , in a new terminal prompt, setup a new environment and make sure to use `rpb-wayland` for DISTRO, then, you can run a sample image with:
$ bitbake rpb-weston-image
This image includes a few additional features, such as `systemd`, `connman` which makes it simpler to use. Once built, the image will be available at `tmp-eglibc/deploy/images/dragonboard-410c/rpb-weston-image-dragonboard-410c.ext4.gz`. And it can be flashed into `rootfs` partition.
If you boot this image on the board, you should get a command prompt on the HDMI monitor. A user called `linaro` exists (and has no password). Once logged in a VT, you run start weston with:
weston-launch
And that should get you to the Weston desktop shell.
# Support
For general question or support request, please go to [96boards.org Community forum](https://www.96boards.org/forums/forum/products/dragonboard410c/).
For any bug related to this release, please submit issues to the [96Board.org Bug tracking system](https://bugs.96boards.org/). To submit a bug, follow this [link](https://bugs.96boards.org/enter_bug.cgi?product=Dragonboard%20410c).

View file

@ -0,0 +1,155 @@
[<img src="http://i.imgur.com/jl4GG0d.png" data-canonical-src="http://i.imgur.com/jl4GG0d.png" width="125" height="157" />]()
[<img src="http://i.imgur.com/yRQKDI6.png" data-canonical-src="http://i.imgur.com/yRQKDI6.png" width="125" height="157" />]()
[<img src="http://i.imgur.com/7wy1996.png" data-canonical-src="http://i.imgur.com/7wy1996.png" width="125" height="157" />]()
[<img src="http://i.imgur.com/yRQKDI6.png" data-canonical-src="http://i.imgur.com/yRQKDI6.png" width="125" height="157" />]()
[<img src="http://i.imgur.com/tXXN5bZ.png" data-canonical-src="http://i.imgur.com/tXXN5bZ.png" width="125" height="157" />]()
>**Note:** CE AOSP RPB - 16.03 is a Developer Preview operating system
***
#### Step 1: Read about the Fastboot Method
Fastboot is supported by the board and can be used for installs. This is for advanced users who are most likely modifying/customizing source code and will need to download such updates to the board for test/execution.
This method requires the following hardware:
- DragonBoard™ 410c with power supply
- Host machine (Linux, Mac OS X, or Windows)
- USB to microUSB cable
- USB Mouse and/or keyboard (not required to perform flash)
- HDMI Monitor with full size HDMI cable (not required to perform flash)
***
#### Step 2: Download Android Bootloader and Boot file
- Android Bootloader ([Direct Download](https://builds.96boards.org/releases/dragonboard410c/linaro/rescue/latest/dragonboard410c_bootloader_emmc_android-*.zip) / <a href="https://builds.96boards.org/releases/dragonboard410c/linaro/rescue/latest/" target="_blank">Build Folder</a> )
- Android Boot ([Direct Download](https://builds.96boards.org/releases/reference-platform/aosp/dragonboard410c/16.03/boot-db410c.img.xz) / <a href="https://builds.96boards.org/releases/reference-platform/aosp/dragonboard410c/16.03/" target="_blank">Build Folder</a> )
>Note the location of all downloads, they will be needed once you access your instruction set
#### Step 3: Download all remaining files
- system.img ([Direct Download](https://builds.96boards.org/releases/reference-platform/aosp/dragonboard410c/16.03/system.img.xz) / <a href="https://builds.96boards.org/releases/reference-platform/aosp/dragonboard410c/16.03/" target="_blank">Build Folder</a> )
- userdata.img ([Direct Download](https://builds.96boards.org/releases/reference-platform/aosp/dragonboard410c/16.03/userdata.img.xz) / <a href="https://builds.96boards.org/releases/reference-platform/aosp/dragonboard410c/16.03/" target="_blank">Build Folder</a> )
- cache.img ([Direct Download](https://builds.96boards.org/releases/reference-platform/aosp/dragonboard410c/16.03/cache.img.xz) / <a href="https://builds.96boards.org/releases/reference-platform/aosp/dragonboard410c/16.03/" target="_blank">Build Folder</a> )
>Note the location of all downloads, they will be needed once you access your instruction set
***
#### Step 4: Install Android using Fastboot with Linux host
This section show how to install the Android operating system to your DragonBoard™ 410c using the fastboot method on a Mac OS X host computer.
1 - **Make sure fastboot is set up on host computer**
- Android SDK “Tools only” for Linux can be downloaded <a href="http://developer.android.com/sdk" target="_blank">here</a>
- The Linux “Tools Only” SDK download does not come with fastboot, you will need to use the Android SDK Manager to install platform-tools.
- To do this follow the “SDK Readme.txt” instructions included in your SDK “Tools Only” download.
If you are still having trouble setting up fastboot, <a href="https://youtu.be/W_zlydVBftA" target="_blank">click here</a> for a short tutorial video
2 - **Connect host computer to DragonBoard™ 410c**
- DragonBoard™ 410c must be powered off (unplugged from power)
- Make sure microSD card slot on DragonBoard™ 410c is empty
- S6 switch on DragonBoard™ 410c must be set to 0-0-0-0. All switches should be in “off” position
- Connect USB to microUSB cable from host computer to DragonBoard™ 410c
3 - **Boot DragonBoard™ 410c into fastboot mode**
**Please read all bullet points before attempting**
- Press and hold the Vol (-) button on the DragonBoard™ 410c, this is the S4 button. DragonBoard™ 410c should still NOT be powered on
- While holding the Vol (-) button, power on the DragonBoard™ 410c by plugging it in
- Once DragonBoard™ 410c is plugged into power, release your hold on the Vol (-) button.
- Board should boot into fastboot mode.
From the connected host machine terminal window, run the following commands:
```shell
# Check to make sure device is connected and in fastboot mode
fastboot devices
```
**At this point you should be connected to your DragonBoard™ 410c with a USB to microUSB cable. Your DragonBoard™ 410c should be booted into fastboot mode and ready to be flashed with the appropriate images.**
4 - **Flash Bootloader**
- Use host computer
- Open "Terminal" application
- Recall location of Bootloader download.
- The bootloader file should be named `dragonboard410c_bootloader_emmc_android`
- `cd` to the directory with your unzipped **Bootloader Folder**
```shell
cd <extraction directory>
#Example:
cd /Users/YourUserName/Downloads
#<extraction directory> = /Users/YourUserName/Downloads
#For this example we assume the "Bootloader" is in the Downloads folder.
cd <unzipped Bootloader folder>
#Example:
cd dragonboard410c_bootloader_emmc_android
#<unzipped Bootloader folder> = dragonboard410c_bootloader_emmc_android
# This command will execute the flashall script within the bootloader folder
./flashall
```
5 - **Recall location of all downloaded files from downloads page**
This will include the files listed below:
###### Reference Platform files
- boot.img.tar.xz
- system.img.tar.xz
- userdata.img.tar.xz
- cache.img.tar.xz
6 - **Unzip all files**
7 - **Flash all files to the DragonBoard™ 410c**
- Use host computer
- Use "Terminal" application
- Recall location of all extracted(unzipped) files
- `cd` to the directory with your unzipped files
- From within extraction directory, execute the following commands:
###### Reference Platform
```shell
# (Once again) Check to make sure fastboot device connected
sudo fastboot devices
# cd to the directory the boot image and were extracted
$ cd <extraction directory>
# Make sure you have properly unzipped the downloads
sudo fastboot flash boot boot.img
sudo fastboot flash system system.img
sudo fastboot flash userdata userdata.img
sudo fastboot flash cache cache.img
```
8 - **Reboot DragonBoard™ 410c**
- Unplug power to DragonBoard™ 410c
- Unplug micro USB cable from DragonBoard™ 410c
- Ensure HDMI connection to monitor
- Ensure keyboard and/or mouse connection (Depending on your rootfs selection)
- Plug power back into DragonBoard™ 410c
- Wait for board to boot up
- Board will boot into Android lock screen.
**Congratulations! You are now booting your newly installed OS directly
from eMMC on the DragonBoard™ 410c!**

View file

@ -0,0 +1,155 @@
# Reference Platform Built - 16.06
[<img src="http://i.imgur.com/jl4GG0d.png" data-canonical-src="http://i.imgur.com/jl4GG0d.png" width="125" height="157" />]()
[<img src="http://i.imgur.com/yRQKDI6.png" data-canonical-src="http://i.imgur.com/yRQKDI6.png" width="125" height="157" />]()
[<img src="http://i.imgur.com/OQGR5yY.png" data-canonical-src="http://i.imgur.com/OQGR5yY.png" width="125" height="157" />]()
[<img src="http://i.imgur.com/yRQKDI6.png" data-canonical-src="http://i.imgur.com/yRQKDI6.png" width="125" height="157" />]()
[<img src="http://i.imgur.com/tXXN5bZ.png" data-canonical-src="http://i.imgur.com/tXXN5bZ.png" width="125" height="157" />]()
***
#### Step 1: Read about the Fastboot Method
Fastboot is supported by the board and can be used for installs. This is for advanced users who are most likely modifying/customizing source code and will need to download such updates to the board for test/execution.
This method requires the following hardware:
- DragonBoard™ 410c with power supply
- Host machine (Linux, Mac OS X, or Windows)
- USB to microUSB cable
- USB Mouse and/or keyboard (not required to perform flash)
- HDMI Monitor with full size HDMI cable (not required to perform flash)
***
#### Step 2: Download Debian Bootloader
- Debian Bootloader ([Direct Download](https://builds.96boards.org/releases/dragonboard410c/linaro/rescue/latest/dragonboard410c_bootloader_emmc_linux-*.zip) / <a href="https://builds.96boards.org/releases/dragonboard410c/linaro/rescue/latest/" target="_blank">Build Folder</a> )
#### Step 3: Download Boot image and Root file system
- Debian Boot ([Direct Download](https://builds.96boards.org/snapshots/reference-platform/debian/117/dragonboard410c/dragonboard410c-boot-linux-*.img.gz) / <a href="https://builds.96boards.org/snapshots/reference-platform/debian/117/dragonboard410c/" target="_blank">Build Folder</a> )
- Debian Rootfs (Desktop) ([Direct Download](https://builds.96boards.org/snapshots/reference-platform/debian/117/dragonboard410c/dragonboard410c-rootfs-debian-jessie-alip-*.emmc.img.gz) / <a href="https://builds.96boards.org/snapshots/reference-platform/debian/117/dragonboard410c/" target="_blank">Build Folder</a> )
>Note the location of all downloads, they will be needed once you access your instruction set
***
#### Step 4: Install Debian Using Fastboot with Linux host
This section show how to install the Linaro based Debian operating system to your DragonBoard™ 410c using the fastboot method on a Linux host computer.
1 - **Make sure fastboot is set up on host computer**
- Android SDK “Tools only” for Linux can be downloaded <a href="http://developer.android.com/sdk" target="_blank">here</a>
- The Linux “Tools Only” SDK download does not come with fastboot, you will need to use the Android SDK Manager to install platform-tools.
- To do this follow the “SDK Readme.txt” instructions included in your SDK “Tools Only” download.
If you are still having trouble setting up fastboot, <a href="https://youtu.be/W_zlydVBftA" target="_blank">click here</a> for a short tutorial video
2 - **Connect host computer to DragonBoard™ 410c**
- DragonBoard™ 410c must be powered off (unplugged from power)
- Make sure microSD card slot on DragonBoard™ 410c is empty
- S6 switch on DragonBoard™ 410c must be set to 0-0-0-0. All switches should be in “off” position
- Connect USB to microUSB cable from host computer to DragonBoard™ 410c
3 - **Boot DragonBoard™ 410c into fastboot mode**
**Please read all bullet points before attempting**
- Press and hold the Vol (-) button on the DragonBoard™ 410c, this is the S4 button. DragonBoard™ 410c should still NOT be powered on
- While holding the Vol (-) button, power on the DragonBoard™ 410c by plugging it in
- Once DragonBoard™ 410c is plugged into power, release your hold on the Vol (-) button.
- Wait for about 20 seconds.
- Board should boot into fastboot mode.
From the connected host machine terminal window, run the following commands:
```shell
# Check to make sure device is connected and in fastboot mode
$ fastboot devices
```
Typically it will show as bellow
```shell
de82318 fastboot
```
**At this point you should be connected to your DragonBoard™ 410c with a USB to microUSB cable. Your DragonBoard™ 410c should be booted into fastboot mode and ready to be flashed with the appropriate images.**
4 - **Flash Bootloader**
- Use host computer
- Open "Terminal" application
- Recall location of Bootloader download.
- The bootloader file should be named `dragonboard410c_bootloader_emmc_linux-XX`
- XX represents the release number of the Bootloader
- `cd` to the directory with your unzipped **Bootloader Folder**
```shell
$ cd <extraction directory>
#Example:
cd /Users/YourUserName/Downloads
#<extraction directory> = /Users/YourUserName/Downloads
#For this example we assume the "Bootloader" is in the Downloads folder.
$ cd <unzipped Bootloader folder>
#Example:
cd dragonboard410c_bootloader_emmc_linux-40
#<unzipped Bootloader folder> = dragonboard410c_bootloader_emmc_linux-40
#This example took place during release 40
# This command will execute the flashall script within the bootloader folder
$ ./flashall
```
5 - **Recall location of `boot` and `rootfs` download from the downloads page**
- You should have downloaded the `boot` file
- You should have downloaded ONE of rootfs` file (Either `Developer` or `Desktop - ALIP` version)
6 - **Unzip both 'boot' and 'rootfs' files**
7 - **Flash `boot` image and `rootfs` to the DragonBoard™ 410c**
- Use host computer
- Use "Terminal" application
- Recall location of extracted(unzipped) `boot` file
- Recall location of extracted(unzipped) `rootfs` file (`Developer` or `Desktop - ALIP`)
- `cd` to the directory with your unzipped `boot` and `rootfs` files
- From within extraction directory, execute the following commands:
```shell
# (Once again) Check to make sure fastboot device connected
$ sudo fastboot devices
# It will show similar to bellow if the device is connected successfully
de82318 fastboot
# cd to the directory the boot image and were extracted
$ cd <extraction directory>
# Make sure you have properly unzipped the boot and rootfs downloads
$ sudo fastboot flash boot boot-linaro-jessie-qcom-snapdragon-arm64-**BUILD#**.img
$ sudo fastboot flash rootfs linaro-jessie-developer-qcom-snapdragon-arm64-**BUILD#**.img
```
**Note**: Replace **BUILD#** in the above commands with the file-specific date/build stamp.
8 - **Reboot DragonBoard™ 410c**
- Unplug power to DragonBoard™ 410c
- Unplug micro USB cable from DragonBoard™ 410c
- Ensure HDMI connection to monitor
- Ensure keyboard and/or mouse connection (Depending on your rootfs selection)
- Plug power back into DragonBoard™ 410c
- Wait for board to boot up
- Board will boot into either command line or desktop depending on rootfs
**Note:** the **username** and **password** are both **“linaro”** when the login information is requested.
**Congratulations! You are now booting your newly installed OS directly
from eMMC on the DragonBoard™ 410c!**

View file

@ -0,0 +1,212 @@
## OpenEmbedded RPB 16.03 - Build from Source
This page provides instructions to get started with OpenEmbedded and the Yocto Project on the DragonBoard 410c.
# Introduction
This wiki is not an introduction on OpenEmbedded or Yocto Project. If you are not familiar with OpenEmbedded and the Yocto Project, it is very much recommended to read the appropriate documentation first. For example, you can start with:
* http://openembedded.org/wiki/Main_Page
* http://yoctoproject.org/
* https://www.yoctoproject.org/documentation
In this wiki, we assume that the reader is familiar with basic concepts of OpenEmbedded.
The support for DragonBoard 410c is available in the [meta-qcom BSP layer](http://git.yoctoproject.org/cgit/cgit.cgi/meta-qcom).
This layer has been tested with OpenEmbedded Core layer, and is expected to work with any other standard layers and of course any OpenEmbedded based distributions.
The Linux kernel used for the DragonBoard 410c is the Linaro Landing team kernel, e.g. the same kernel used for the Linaro Linux release builds. The graphic stack is based on mesa, using the freedreno driver.
## OE Layers
| Layer | Description |
|:-----------------------:|:----------------------|
| OE-Core (Base layer) | This is the main collaboration point when working on OpenEmbedded projects and is part of the core recipes. The goal of this layer is to have just enough recipes to build a basic system, this means keeping it as small as possible. |
| Meta-rpb (Distro layer) | This is a very small layer where the distro configurations live. Currently it houses both Reference Platform Build and Wayland Reference Platform Builds. |
| Meta-oe | This layer houses many useful, but sometimes unmaintained recipes. Since the reduction in recipes to the core, meta-oe was created for everything else. There are currently approximately 650 recipes in this layer. |
| Meta-browser | This layer holds the recipes for Firefox and Chromium. Both recipes require a lot of maintenance, because of this a seperate layer was created. |
| Meta-qt5 | This is a cross-platform toolkit. |
| Meta-linaro | This layer is used to get the Linaro toolchain. |
| Meta-linaro-backports | This is an experimental layer used to get newer versions into the build which were not part of the release. |
| Meta-96Boards | This support layer is managed by Linaro and intended for boards that do not have their own board support layer. Currently used for the HiKey Consumer edition board, and eventually the Bubblegum-96 board. If a vendor does not support their own layer, it can be added to this layer. |
| Meta-qcom (BSP) | This is the board support layer for Qualcomm boards. Currently supports IFC6410 and the DragonBoard 410c. |
# Package Dependencies
In order to successfully set up your build environment, you will need to install the following package dependencies.
**Step 1**: You will need git installed on your Linux host machine
`$ sudo apt-get install git`
**Step 2**: Visit the OpenEmbedded (Getting Started) wiki to see which distribution specific dependencies you will need
http://www.openembedded.org/wiki/Getting_started
**Step 3**: Install 96Boards specific dependencies (Case specific)
Setting up the build environment will first search for `whiptail`, if it is not present then it will search for `dialog`. You only need one of the following packages to ensure your setup-environement runs correctly:
`$ sudo apt-get install whiptail`
or
`$ sudo apt-get install dialog`
**Please Note**: If you are running Ubuntu 16.04 you will need to add the following line to your `/etc/apt/sources.list`
`deb http://archive.ubuntu.com/ubuntu/ xenial universe`
```shell
$ cd /etc/apt/
#vim text editor is used in this example
#sudo is used to allow editing, sources.list is set to read only
$ sudo vim sources.list
```
All required dependencies should now be installed on your host environment, you are ready to begin your build environment setup.
# Setup the build environment
The Qualcomm BSP layer can be used with any OE based distribution, such as Poky. The following instructions are provided to get started with 96boards Open Embedded Reference Software Platforms.
To manage the various git trees and the OpenEmbedded environment, a repo manifest is provided. If you do not have `repo` installed on your host machine, you first need to install it, using the following instructions (or similar):
mkdir -p ${HOME}/bin
curl https://storage.googleapis.com/git-repo-downloads/repo > ${HOME}/bin/repo
chmod a+x ${HOME}/bin/repo
export PATH=${HOME}/bin:${PATH}
To initialize your build environment, you need to run:
mkdir oe-qcom && cd oe-qcom
repo init -u https://github.com/96boards/oe-rpb-manifest.git -b jethro
repo sync
source setup-environment [<build folder>]
* after the command `repo sync` returns, all the OpenEmbedded recipes have been downloaded locally.
* you will be prompted to choose the target machine, pick `dragonboard-410c`
* you will be prompted to choose the distro, for now, it is recommended to use 'rpb'
* <build folder> is optional, if missing it will default to `build-$DISTRO`
The script `setup-environment` will create sane default configuration files in <build folder>/conf, you can inspect them and modify them if needed. Note that conf/local.conf and conf/bblayers.conf are symlink , and under source control. So it is generally better not to modify them, and use conf/site.conf and conf/auto.conf instead.
# Build a minimal, console-only image
To build a console image, you can run:
$ bitbake rpb-console-image
At the end of the build, your build artifacts will be found in `tmp-eglibc/deploy/images/dragonboard-410c`. The two artifacts you will use to update your DragonBoard are:
* `rpb-console-image-dragonboard-410c.ext4.gz` and
* `boot-dragonboard-410c.img`
# Bootloaders and eMMC partitions
Build artifacts from your OE build will be flashed into the DragonBoard's on-board eMMC (in contrast to some other boards which run their images from an SDcard). The OpenEmbedded BSP layer assumes that the _Linux_ Bootloaders and eMMC partition layout are used on the DragonBoard 410c (not the _Android_ ones; by default DragonBoards come pre-configured with the Android eMMC partition layout). You can download the latest Linux bootloader package from [here](http://builds.96boards.org/releases/dragonboard410c/linaro/rescue/latest/) to your development host, it will be named something like `dragonboard410c_bootloader_emmc_linux-<version>.zip`.
Whether your DragonBoard is using the Android eMMC partition layout or the Linux partition eMMC layout, you will use the Android `fastboot` utility on your development host for managing the board's eMMC partitions. If you are using a relatively recent Linux distribution on your development host, it probably already has a package that includes the `fastboot` utility (it might be named something like `android-tools` or `android-tools-fastboot`) so go ahead and install it on your development host. In order for your development host's fastboot utility to interact with the DragonBoard, the DragonBoard must be booted into a special `fastboot mode`. The procedure to do so is as follows:
* remove power from your DragonBoard
* plug a USB cable from your development host to your DragonBoard's J4 connector
* while holding down S4 on the DragonBoard (the one marked "(-)"), insert the power adapter
* after a few seconds you can release S4
To verify your cables and that the above procedure worked, on your development host run:
# sudo fastboot devices
and you should get a non-empty response, e.g.
# sudo fastboot devices
83581d40 fastboot
If this is your first time using a particular DragonBoard, you will need to switch its eMMC partition layout to the Linux layout, but this procedure only needs to be done once for a given board. After switching your layout, you only have to update your board with your latest build artifacts.
The procedure for updating your eMMC partitions is as follows. Put your DragonBoard into `fastboot mode` (see procedure above) then perform these steps on your development host:
* download the latest Linux bootloader package (e.g. `dragonboard410c_bootloader_emmc_linux-<version>.zip`)
* unzip its contents
* run the `flashall` script (as root) that you will find after unzipping the Linux bootloader package
At this point your eMMC has the following partition layout:
* `/dev/mmcblk0p7` , aka `aboot` is used for the bootloader (LK/fastboot)
* `/dev/mmcblk0p8` , aka `boot` is used for the boot image (kernel, device tree, initrd)
* `/dev/mmcblk0p10` , aka `rootfs` is used for the root file system
# Flashing build artifacts
In the following description, replace `image` with the name of the image you built. For example: if you built `rpb-console-image` then `image` will be `rpb-console-image`.
At the end of any successful build you will end up with the following artifacts (amongst others)
* `image-dragonboard-410c.ext4.gz` and
* `boot-dragonboard-410c.img`
These will be found in your `tmp-eglibc/deploy/images/dragonboard-410c` directory.
To install these to your DragonBoard's eMMC from your development host:
# gzip -d < image-dragonboard-410c.ext4.gz > image-dragonboard-410c.ext4
# fastboot flash rootfs image-dragonboard-410c.ext4
# fastboot flash boot boot-dragonboard-410c.img
# Proprietary firmware blob
When running the `setup-environment` script, you were asked to read/accept the Qualcomm EULA. The EULA is required to access the proprietary firmware, such as the GPU firmware , WLAN, ...
If you accepted the EULA, when building an image for DragonBoard 410c all proprietary firmware are installed automatically in `/lib/firmware`, and a copy of the EULA is added as '/etc/license.txt`.
If you did not accept the EULA, the firmware are not downloaded, and not installed into the image. You can manually manage the firmware and download them separately from [Qualcomm Developer Network](https://developer.qualcomm.com/download/linux-ubuntu-board-support-package-v1.1.zip).
# Build a simple X11 image
To build an X11 image with GPU hardware accelerated support run:
$ bitbake rpb-desktop-image
At the end of the build, the root file system image will be available as `tmp-eglibc/deploy/images/dragonboard-410c/rpb-desktop-image-dragonboard-410c.ext4.gz`.
Then you can finally start the X server, and run any graphical application:
X&
export DISPLAY=:0
glxgears
The default X11 image includes `openbox` window manager, to use it:
X&
export DISPLAY=:0
openbox &
glxgears
Of course, you can easily add another window manager, such as `metacity` in the image. To install `metacity` in the image, add the following to `conf/auto.conf` file:
CORE_IMAGE_EXTRA_INSTALL += "metacity"
and rebuild the `rpb-desktop-image` image, it will now include `metacity`, which can be started like this:
X&
export DISPLAY=:0
metacity&
glxgears
# Build a sample Wayland/Weston image
For Wayland/weston, it is recommended to change the DISTRO and use `rpb-wayland` instead of `rpb`. The main reason is that in the `rpb-wayland` distro, the support for X11 is completely removed. So , in a new terminal prompt, setup a new environment and make sure to use `rpb-wayland` for DISTRO, then, you can run a sample image with:
$ bitbake rpb-weston-image
This image includes a few additional features, such as `systemd`, `connman` which makes it simpler to use. Once built, the image will be available at `tmp-eglibc/deploy/images/dragonboard-410c/rpb-weston-image-dragonboard-410c.ext4.gz`. And it can be flashed into `rootfs` partition.
If you boot this image on the board, you should get a command prompt on the HDMI monitor. A user called `linaro` exists (and has no password). Once logged in a VT, you run start weston with:
weston-launch
And that should get you to the Weston desktop shell.
# Support
For general question or support request, please go to [96boards.org Community forum](https://www.96boards.org/forums/forum/products/dragonboard410c/).
For any bug related to this release, please submit issues to the [96Board.org Bug tracking system](https://bugs.96boards.org/). To submit a bug, follow this [link](https://bugs.96boards.org/enter_bug.cgi?product=Dragonboard%20410c).

View file

@ -0,0 +1,21 @@
## Dragonboard™ 410c - Reference Platform Build - 16.06
- **Install Instructions:** For "out-of-box" users. Instructions for installing pre-build Reference Platform images onto your 96Boards.
- **Build from Source:** For Advanced users. Instructions for building and installing the various Reference Platform components used by Consumer Edition 96Boards.
- **Known Issues:** List of current bugs and issues for each Reference Platform Build. Includes links to bug reports for tracking resolution progress.
- **Test Report:** Provides test results and bug status for kernel, firmware, and images with a straight forward pass/fail legend.
***
| **CE Debian RPB - 16.06** |
|:-----------------------------:|
| [Install Instructions](InstallDebianRPB-16.06.md) |
| [Build from Source](BFSDebianRPB-16.06.md) |
| [Known issues](../../Known-Issues.md) |
| Test Report - TBD |
***
| **CE OpenEmbedded - 16.03** |
|:-----------------------------:|
| [Install Instructions](InstallOERPB-16.03.md) |