← Back to team overview

ubuntu-phone team mailing list archive

How do I verify my build setup for Nexus 5? (could not boot)

 

I wanted to keep up with newer builds for the Nexus 5, so decided to set up
my build environment. I know there is a system-server for Ubuntu Touch on
the N5 that is community developed and community managed. The devel build
is from late August but runs well (I use it as my daily), the daily builds
do not boot. I wanted to be able to keep using my N5 and make sure it stays
current. I took the steps outlined below:

I followed the Porting to a new Device guide, keeping in mind that there is
a running boot, recovery and kernel for the N5
https://developer.ubuntu.com/en/start/ubuntu-for-devices/porting-new-device/
(also reviewed this page
https://wiki.ubuntu.com/Touch/Install_UT_on_android4.4.2)

Did this:
sudo add-apt-repository ppa:phablet-team/tools
sudo apt-get update
sudo apt-get install phablet-tools

sudo apt-get install git gnupg flex bison gperf build-essential zip bzr
curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386
libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib
tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386 schedtool
g++-4.8-multilib

Could not locate mingw32. Installed mingw-w64. Have no idea if I really had
to. Also noticed some of the tools are for 386. Should I have selected the
64 boot versions instead? (I'm running 64 bit Ubuntu 15.10)

Followed Build repo procedures:

phablet-dev-bootstrap -c phablet
failed, had to enter the following:
  git config --global user.email "Bruce.Griffis@xxxxxxxxx"
  git config --global user.name "Bruce Griffis"

Ran: phablet-dev-bootstrap -c phablet

cd phablet
export USE_CCACHE=1
. build/envsetup.sh
lunch
    selected Option 9, hammerhead

Grabbed cd image. In browser went to
http://cdimage.ubuntu.com/ubuntu-touch/vivid/daily-preinstalled/current/
Downloaded vivid-preinstalled-touch-armhf.tar.gz
Copied to my orking directory.
cp /home/bruce/Downloads/vivid-preinstalled-touch-armhf.tar.gz
vivid-preinstalled-touch-armhf.tar.gz

Installed android tools
sudo apt-get install android-tools-fsutils
sudo apt-get install android-tools-adb (this was already installed)

cd /home/bruce/phablet/out/target/product/hammerhead
copied my boot, recovery (well, all .img file and the cdimage file to this
directory)

Then booted:
adb devices
adb reboot bootloader
fastboot flash recovery recovery.img
fastboot flash boot boot.img
(these step worked)

bzr branch lp:project-rootstock-ng
cd project-rootstock-ng/
./rootstock-touch-install
/home/bruce/phablet/out/target/product/hammerhead/project-rootstock-ng/vivid-preinstalled-touch-armhf.tar.gz
/home/bruce/phablet/out/target/product/hammerhead/system.img

took forever. copied *.img files and vivid-preinstalled to
out/target/product/hammerhead directory. tried again
Still took forever. Booted into recovery mode and cleared /cache on my N5.
This speeded up the process significantly

while in the /out/target/product/hammerhead directory where I copied my
.img files and vivid-preinstalled file, issued:
project-rootstock-ng/rootstock-touch-install
vivid-preinstalled-touch-armhf.tar.gz system.img

My phone showed that it copied and unpacked boot, system and android files.
Then it automatically went to reboot itself. When rebooting, the device
stayed on the Google screen. I tried xenial. I then tried 14.09, figuring
that should simply work. So I think my build environment must have
problems. I also read that the N5 community developer patched the kernel,
but am not sure if the one I selected above when I selected Hammerhead has
the same patches.

How should I capture error messages when building, to see if I have
problems there? If the build runs to completion, should I assume I have a
good build? How would I capture error messages when booting my phone?