-
Flash and run it.
03/16/2017 at 14:54 • 0 commentsThe standard build of u-boot works!
#Instructions taken from https://github.com/csimmonds/a4b-scripts/blob/master/write-sdcard-beagleboneblack.sh
mkimage -A arm -O linux -T ramdisk -d out/target/product/beagleboneblack/ramdisk.img uRamdisk
# I used gparted to create these partitions
# Create 4 primary partitons on the sd card
# 1: boot: FAT32, 64 MiB, boot flag
# 2: system: Linux, 512 MiB
# 3: data: Linux, 3072 MiB
# 4: cache: Linux, 256 MiBsudo cp uRamdisk /media/jeramy/BOOT cd ../BBB/u-boot_stock cp MLO /media/jeramy/BOOT cp u-boot.img /media/jeramy/BOOT cp ~/android-AOSP/device/ti/beagleboneblack/uEnv.txt /media/jeramy/BOOT cd ../
# http://elinux.org/BeagleBone_DTBs cat bb-kernel/KERNEL/arch/arm/boot/zImage bb-kernel/KERNEL/arch/arm/boot/dts/am335x-boneblack-hdmi-overlay.dtb > zImage-dtb-hdmi
bb-kernel/KERNEL/scripts/mkuboot.sh -A arm -O linux -C none -T kernel -a 0x80008000 -e 0x80008000 -n 'Linux-4.4' -d zImage-dtb-hdmi uImage-dtb-hdmi
sudo cp uImage-dtb-hdmi /media/jeramy/BOOT/uImage sudo umount /media/jeramy/BOOT
# I used `disks` to restore images to the appropriate partition
#~/android-AOSP/out/target/product/beagleboneblack/system.img
#~/android-AOSP/out/target/product/beagleboneblack/cache.img
#~/android-AOSP/out/target/product/beagleboneblack/userdata.img
jeramy@jeramy-pc2:~/BBB$ adb devices -l
List of devices attached
123456789 device usb:2-2 product:beagleboneblack_sd model:BeagleBone_Black_on_SD_card device:beagleboneblack
jeramy@jeramy-pc2:~/BBB$ adb shell
root@beagleboneblack:/ #
root@beagleboneblack:/ # cat /proc/version
Linux version 4.4.53-bone16 (jeramy@jeramy-pc2) (gcc version 5.4.1 20161213 (Linaro GCC 5.4-2017.01) ) #1 SMP Wed Mar 15 17:46:44 EDT 2017
root@beagleboneblack:/ # getprop ro.build.version.release
6.0.1
root@beagleboneblack:/ # getprop ro.build.version.sdk
23
root@beagleboneblack:/ # getprop
[dalvik.vm.dex2oat-Xms]: [64m]
[dalvik.vm.dex2oat-Xmx]: [512m]
[dalvik.vm.dex2oat-filter]: [verify-at-runtime]
[dalvik.vm.heapgrowthlimit]: [48m]
[dalvik.vm.heapmaxfree]: [2m]
[dalvik.vm.heapminfree]: [512k]
[dalvik.vm.heapsize]: [128m]
[dalvik.vm.heapstartsize]: [5m]
[dalvik.vm.heaptargetutilization]: [0.75]
[dalvik.vm.image-dex2oat-Xms]: [64m]
[dalvik.vm.image-dex2oat-Xmx]: [64m]
[dalvik.vm.image-dex2oat-filter]: [verify-at-runtime]
[dalvik.vm.isa.arm.features]: [default]
[dalvik.vm.isa.arm.variant]: [generic]
[dalvik.vm.lockprof.threshold]: [500]
[dalvik.vm.stack-trace-file]: [/data/anr/traces.txt]
[dalvik.vm.usejit]: [true]
[debug.atrace.tags.enableflags]: [0]
[debug.force_rtl]: [0]
[dev.bootcomplete]: [1]
[dhcp.eth0.result]: [failed]
[gsm.current.phone-type]: [1]
[gsm.network.type]: [Unknown]
[gsm.operator.alpha]: []
[gsm.operator.iso-country]: []
[gsm.operator.isroaming]: [false]
[gsm.operator.numeric]: []
[gsm.sim.operator.alpha]: []
[gsm.sim.operator.iso-country]: []
[gsm.sim.operator.numeric]: []
[gsm.sim.state]: [NOT_READY]
[hw.nobattery]: [true]
[init.svc.adbd]: [running]
[init.svc.bootanim]: [stopped]
[init.svc.console]: [running]
[init.svc.debuggerd]: [running]
[init.svc.dhcpcd_eth0]: [stopped]
[init.svc.drm]: [running]
[init.svc.gatekeeperd]: [running]
[init.svc.healthd]: [running]
[init.svc.installd]: [running]
[init.svc.keystore]: [running]
[init.svc.lmkd]: [running]
[init.svc.logd]: [running]
[init.svc.logd-reinit]: [stopped]
[init.svc.media]: [running]
[init.svc.netd]: [running]
[init.svc.perfprofd]: [running]
[init.svc.servicemanager]: [running]
[init.svc.surfaceflinger]: [running]
[init.svc.ueventd]: [running]
[init.svc.vold]: [running]
[init.svc.zygote]: [running]
[net.bt.name]: [Android]
[net.change]: [net.qtaguid_enabled]
[net.hostname]: [android-6f4322d0401fae47]
[net.qtaguid_enabled]: [0]
[net.tcp.default_init_rwnd]: [60]
[persist.sys.dalvik.vm.lib.2]: [libart.so]
[persist.sys.profiler_ms]: [0]
[persist.sys.strictmode.disable]: [1]
[persist.sys.strictmode.visual]: [0]
[persist.sys.usb.config]: [adb]
[ro.allow.mock.location]: [1]
[ro.baseband]: [unknown]
[ro.board.platform]: [omap3]
[ro.boot.console]: [ttyS0]
[ro.boot.hardware]: [am335xevm]
[ro.boot.selinux]: [permissive]
[ro.bootimage.build.date]: [Wed Mar 15 19:58:24 EDT 2017]
[ro.bootimage.build.date.utc]: [1489622304]
[ro.bootimage.build.fingerprint]: [Android/beagleboneblack_sd/beagleboneblack:6.0.1/MOB31S/jeramy03151851:eng/test-keys]
[ro.bootloader]: [unknown]
[ro.bootmode]: [unknown]
[ro.build.characteristics]: [tablet,nosdcard]
[ro.build.date]: [Wed Mar 15 19:12:01 EDT 2017]
[ro.build.date.utc]: [1489619521]
[ro.build.description]: [beagleboneblack_sd-eng 6.0.1 MOB31S eng.jeramy.20170315.184841 test-keys]
[ro.build.display.id]: [beagleboneblack_sd-eng 6.0.1 MOB31S eng.jeramy.20170315.184841 test-keys]
[ro.build.fingerprint]: [Android/beagleboneblack_sd/beagleboneblack:6.0.1/MOB31S/jeramy03151851:eng/test-keys]
[ro.build.flavor]: [beagleboneblack_sd-eng]
[ro.build.host]: [jeramy-pc2]
[ro.build.id]: [MOB31S]
[ro.build.product]: [beagleboneblack]
[ro.build.tags]: [test-keys]
[ro.build.type]: [eng]
[ro.build.user]: [jeramy]
[ro.build.version.all_codenames]: [REL]
[ro.build.version.base_os]: []
[ro.build.version.codename]: [REL]
[ro.build.version.incremental]: [eng.jeramy.20170315.184841]
[ro.build.version.preview_sdk]: [0]
[ro.build.version.release]: [6.0.1]
[ro.build.version.sdk]: [23]
[ro.build.version.security_patch]: [2017-01-05]
[ro.carrier]: [unknown]
[ro.config.alarm_alert]: [Alarm_Classic.ogg]
[ro.config.low_ram]: [true]
[ro.config.notification_sound]: [pixiedust.ogg]
[ro.config.ringtone]: [Ring_Synth_04.ogg]
[ro.crypto.state]: [unencrypted]
[ro.dalvik.vm.native.bridge]: [0]
[ro.debuggable]: [1]
[ro.hardware]: [am335xevm]
[ro.kernel.android.checkjni]: [1]
[ro.kernel.androidboot.console]: [ttyS0]
[ro.kernel.androidboot.hardware]: [am335xevm]
[ro.kernel.androidboot.selinux]: [permissive]
[ro.kernel.cape_universal]: [enable]
[ro.kernel.console]: [ttyS0,115200n8]
[ro.kernel.qemu]: [1]
[ro.kernel.qemu.gles]: [0]
[ro.kernel.security]: [selinux]
[ro.product.board]: [beagleboneblack]
[ro.product.brand]: [Android]
[ro.product.cpu.abi]: [armeabi-v7a]
[ro.product.cpu.abi2]: [armeabi]
[ro.product.cpu.abilist]: [armeabi-v7a,armeabi]
[ro.product.cpu.abilist32]: [armeabi-v7a,armeabi]
[ro.product.cpu.abilist64]: []
[ro.product.device]: [beagleboneblack]
[ro.product.locale]: [en-US]
[ro.product.manufacturer]: [BeagleBoard.org]
[ro.product.model]: [BeagleBone Black on SD card]
[ro.product.name]: [beagleboneblack_sd]
[ro.revision]: [0]
[ro.runtime.firstboot]: [946684878742]
[ro.secure]: [0]
[ro.serialno]: []
[ro.sf.lcd_density]: [160]
[ro.wifi.channels]: []
[ro.zygote]: [zygote32]
[selinux.reload_policy]: [1]
[service.bootanim.exit]: [1]
[sys.boot_completed]: [1]
[sys.sysctl.extra_free_kbytes]: [9216]
[sys.usb.config]: [adb]
[sys.usb.configfs]: [1]
[sys.usb.controller]: [musb-hdrc.0.auto]
[sys.usb.ffs.ready]: [1]
[sys.usb.state]: [adb]
[vold.has_adoptable]: [0]
[vold.post_fs_data_done]: [1]
[wlan.driver.status]: [unloaded] -
Building the Kernel for Android - Maybe
03/15/2017 at 22:42 • 0 comments#Instructions modified from https://github.com/csimmonds/a4b-scripts/blob/master/build-beagleboneblack.sh cd ~/android-AOSP/device mkdir ti cd ti git clone https://github.com/csimmonds/a4b-beagleboneblack cd a4b* git checkout m6.0 cd .. mkdir beagleboneblack mv -v ~/android-AOSP/device/a4b-beagleboneblack/* ~/android-AOSP/device/ti/beagleboneblack/ rm -rf a4b-beagleboneblack
THIS IS STILL MUDDY WATER. There needs to be a different patch file because I modified some of the files. WARNING: Don't follow the instructions here.
cd ~/BBB mkdir u-boot_stock mv -v u-boot/* u-boot_stock/ rm -rf u-boot git clone https://github.com/csimmonds/u-boot.git cd u-boot git checkout am335x-v2013.01.01-bbb-fb cd .. mkdir u-boot_droid mv -v u-boot/* u-boot_droid/ rm -rf u-boot git clone https://github.com/beagleboard/bb.org-overlays.git git clone https://github.com/csimmonds/a4b-scripts.git cd a4b* git checkout m6.0 cd .. cd bb-kernel mkdir patches/a4b cp ~/android-AOSP/device/ti/beagleboneblack/ti-kernel-patches/config-android-4.1 patches/defconfig cp ~/android-AOSP/device/ti/beagleboneblack/ti-kernel-patches/*.patch patches/a4b patch -p1 < patches/a4b/0001-Add-a4b-patch.patch
Output:
patch -p1 < patches/a4b/0001-Add-a4b-patch.patch
patching file patch.sh
Hunk #1 succeeded at 1174 with fuzz 2 (offset 223 lines).
Hunk #2 FAILED at 988.
1 out of 2 hunks FAILED -- saving rejects to file patch.sh.rej
Solution:
add `a4b` to line# 1218 of patch.sh, and save file
comment out selinux patches in patch.sh (just not putting them into patch.sh would be better. come back to this.)NOTE:
When I did this a second time, re-pulling the kernel to get a fresh start it I had the same problem, but with a different error message, the solution was roughly the same regardless. Also, the second time I downloaded the kernel I got 4.4.53 instead of 4.4.52
Also, as I stated in the I disabled all touchscreen inuput, and DVB front end modules and built-ins. I was getting compiler errors, so I shut it all off. The kernel built, but I'll have to see if it works.
./build_kernel.sh cd KERNEL *** cat arch/arm/boot/zImage arch/arm/boot/dts/am335x-boneblack-emmc-overlay.dtb > zImage-dtb mkdir ~/android-AOSP/device/ti/beagleboneblack-kernel cp zImage-dtb ~/android-AOSP/device/ti/beagleboneblack-kernel *** I am not really sure about this step, because later when I move files to the sd card for android I create a different image. mkdir ~/android-AOSP/device/ti/beagleboneblack/modules MODULES=`find -name "*.ko"` for f in $MODULES; do cp $f ~/android-AOSP/device/ti/beagleboneblack/modules/`basename $f` done cd ../../bb.org-overlays make DTC=../bb-kernel/KERNEL/scripts/dtc/dtc cp src/arm/*.dtbo ~/android-AOSP/device/ti/beagleboneblack/dtbo
cd ../u-boot_droid
. ../bb-kernel/.CCYeah, u-boot is a mess too. I'm not sure how this is going to work out.
cd ~/android-AOSP make -j8
Now, time to get some beer. I'm done for the night.
-
Notes on Packaging a Kernel with Android
03/13/2017 at 00:54 • 0 commentsI may be reinventing the wheel. I will have to try this soon, then move on to Nougat.
https://github.com/csimmonds/android4beagle
https://eewiki.net/display/AOA/BeagleBone+Black
This is a mess. I am trying to figure out what will work.
(I am essentially going through the manifest here https://github.com/csimmonds/android4beagle/blob/master/default.xml and getting what I think I need)
cd device
git clone https://github.com/csimmonds/a4b-beagleboneblack
cd a4b*
git checkout m6.0
cd ..
mv -v ~/android-AOSP/device/a4b-beagleboneblack/* ~/android-AOSP/device/ti/beagleboneblack/
r-rf a4b-beagleboneblack
cd ti/beagleboneblack
git clone https://github.com/csimmonds/u-boot.git
cd u-boot
git checkout am335x-v2013.01.01-bbb-fb
cd ..
git clone https://github.com/beagleboard/bb.org-overlays.git
git clone https://github.com/csimmonds/a4b-scripts.git
cd a4b*
git checkout m6.0
***!!! build-beagleboneblack.sh LN:46
# Append the dtb to zImage because the Android build doesn't know about dtbs
cd KERNEL
cat arch/arm/boot/zImage arch/arm/boot/dts/am335x-boneblack-emmc-overlay.dtb > zImage-dtbPage 8. Would this be necessary if a current u-boot was updated with the proper androidisms for the bbb? is that possible? I am understanding it is a problem with the old u-boot not pointing to the dtb, is that correct?
https://cdn-learn.adafruit.com/downloads/pdf/introduction-to-the-beaglebone-black-device-tree.pdf
Page 4
https://community.arm.com/dev-platforms/b/documents/posts/faq-what-is-device-tree
LN:71
# The Android prebuilt gcc fails to build U-Boot, so use the Linaro gcc which
# was installed to build the ti-kernelIt also failed when I tried to build the kernel with it. Error message said the compiler was buggy and would fail to build kernels properly. Don't waste your time with it.
In settings, I turned off all touch screen modules and built-ins, as well as as all v4l, tv, and radio support. They were causing compiler errors.
-
Building the BeagleBone Black Kernel
03/12/2017 at 20:09 • 0 commentsReferences:
http://elinux.org/Building_BBB_Kernel
http://wiki.beyondlogic.org/index.php/BeagleBoneBlack_Building_Kernel
https://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-Bootloader:U-Boot <--- Mostly this one, it is up to date.
On BBB:
debian@beaglebone:~$ uname -r 3.8.13-bone79
On Build machine:
For what I am doing it is not necessary to build u-boot, or to grab the compiler.
mkdir BBB cd BBB wget -c https://releases.linaro.org/components/toolchain/binaries/5.4-2017.01/arm-linux-gnueabihf/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf.tar.xz tar xf gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf.tar.xz export CC=`pwd`/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
Output:${CC}gcc --version
arm-linux-gnueabihf-gcc (Linaro GCC 5.4-2017.01) 5.4.1 20161213
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.git clone https://github.com/u-boot/u-boot cd u-boot/ git checkout v2017.03-rc2 -b tmp
wget -c https://rcn-ee.com/repos/git/u-boot-patches/v2017.03-rc2/0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch wget -c https://rcn-ee.com/repos/git/u-boot-patches/v2017.03-rc2/0002-U-Boot-BeagleBone-Cape-Manager.patch patch -p1 < 0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch patch -p1 < 0002-U-Boot-BeagleBone-Cape-Manager.patch
make ARCH=arm CROSS_COMPILE=${CC} distclean make ARCH=arm CROSS_COMPILE=${CC} am335x_evm_defconfig make ARCH=arm CROSS_COMPILE=${CC}
cd .. # If you just want to build the kernel start here. git clone https://github.com/RobertCNelson/bb-kernel cd bb-kernel/
# there are a number of options here, 4.4-rt would be a good project for another day # https://wiki.linuxfoundation.org/realtime/start # I think git branch -l will show all of the available branches git checkout origin/am33x-v4.4 -b tmp
sudo apt-get update sudo apt-get install device-tree-compiler lzma zlib1g:i386
I am going to build this as a deb package for ease of installation right now. I just want to test the process.
./build_deb.sh
Setup the kernel the way you want and wait for it to build ...
https://www.kernel.org/doc/html/latest/
deb packages are in the <location you chose>/BBB/bb-kernel/deploy.
I use nautilus to copy them over. `Connect to Server` sftp://debian@192.168.7.2
created a new directory in ~/ called kernel
copied and pasted the debs over to ~/kernel
then in the terminal
ssh debian@192.168.7.2 cd kernel sudo dpkg -i linux-firmware-image-4.4.52-bone16_1cross_armhf.deb sudo dpkg -i linux-headers-4.4.52-bone16_1cross_armhf.deb sudo dpkg -i linux-image-4.4.52-bone16_1cross_armhf.deb sudo dpkg -i linux-libc-dev_1cross_armhf.deb sudo reboot
and once it comes back up, ssh back in:debian@beaglebone:~$ uname -r 4.4.52-bone16
If you wanted to create a full image on an sd card, follow the directions on the web site (the one with an arrow pointing to it.)
-
Building Android, BBBAndroid: Build it.
03/11/2017 at 16:42 • 0 commentsReferences:
https://source.android.com/source/building.html
'Embedded Android' by Karim Yaghmour. build/envsetup.sh
Output:
including sdk/bash_completion/adb.bash
lunch
Output:
You're building on Linux
Lunch menu... pick a combo:
1. beagleboneblack-eng
2. aosp_arm-eng
3. aosp_x86-eng
4. aosp_mips-eng
5. vbox_x86-eng
Which would you like? [aosp_arm-eng]>press [Enter] and build for the emulator for now.
Output:
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.4.4
TARGET_PRODUCT=aosp_arm
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
TARGET_CPU_VARIANT=generic
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.4.0-64-generic-x86_64-with-Ubuntu-16.04-xenial
HOST_BUILD_TYPE=release
BUILD_ID=KTU84P
OUT_DIR=out
============================================make -j4
Output:
build/core/main.mk:45: ********************************************************************************
build/core/main.mk:46: * You are using version 4.1 of make.
build/core/main.mk:47: * Android can only be built by versions 3.81 and 3.82.
build/core/main.mk:48: * see https://source.android.com/source/download.html
build/core/main.mk:49: ********************************************************************************
build/core/main.mk:50: *** stopping. Stop.So role make back.
*** Given the process to build the Marshmallow AOSP, I am going to make an external drive bootable with the ubuntu live cd, and build from there. I suspect that this will take a week to accomplish, but I don't want to make a bunch of changes to my system by installing old packages when what I want in the end is to build more current versions of Android anyway.
Additionally, I need to work this out so that I can build the Linux Kernels on an external drive, as well as experiment with building and installing drivers within a kernel, so I don't make my system inoperable.
-
Building Android, by the book: Build it.
03/11/2017 at 16:41 • 0 commentsReferences:
https://source.android.com/source/building.html
'Embedded Android' by Karim Yaghmour
. build/envsetup.sh
Output:
including device/asus/deb/vendorsetup.sh
including device/asus/flo/vendorsetup.sh
including device/asus/fugu/vendorsetup.sh
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-mips/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including device/htc/flounder/vendorsetup.sh
including device/huawei/angler/vendorsetup.sh
including device/lge/bullhead/vendorsetup.sh
including device/lge/hammerhead/vendorsetup.sh
including device/moto/shamu/vendorsetup.sh
including sdk/bash_completion/adb.bashlunch
Output:
You're building on Linux
Lunch menu... pick a combo:
1. aosp_arm-eng
2. aosp_arm64-eng
3. aosp_mips-eng
4. aosp_mips64-eng
5. aosp_x86-eng
6. aosp_x86_64-eng
7. aosp_deb-userdebug
8. aosp_flo-userdebug
9. full_fugu-userdebug
10. aosp_fugu-userdebug
11. mini_emulator_arm64-userdebug
12. m_e_arm-userdebug
13. mini_emulator_mips-userdebug
14. mini_emulator_x86_64-userdebug
15. mini_emulator_x86-userdebug
16. aosp_flounder-userdebug
17. aosp_angler-userdebug
18. aosp_bullhead-userdebug
19. aosp_hammerhead-userdebug
20. aosp_hammerhead_fp-userdebug
21. aosp_shamu-userdebug
Which would you like? [aosp_arm-eng]>press [Enter] to build for the emulator.
Output:
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=6.0.1
TARGET_PRODUCT=aosp_arm
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.4.0-64-generic-x86_64-with-Ubuntu-16.04-xenial
HOST_BUILD_TYPE=release
BUILD_ID=MOB31S
OUT_DIR=out
============================================make -j4
Output:
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=6.0.1
TARGET_PRODUCT=aosp_arm
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.4.0-64-generic-x86_64-with-Ubuntu-16.04-xenial
HOST_BUILD_TYPE=release
BUILD_ID=MOB31S
OUT_DIR=out
============================================
Checking build tools versions...
************************************************************
You are attempting to build with the incorrect version
of java.
Your version is: openjdk version "1.8.0_121" OpenJDK Runtime Environment (build 1.8.0_121-8u121-b13-0ubuntu1.16.04.2-b13) OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode).
The required version is: "1.7.x"
Please follow the machine setup instructions at
https://source.android.com/source/initializing.html
************************************************************
build/core/main.mk:171: *** stop. Stop.
#### make failed to build some targets (14 seconds) ####I did follow those instructions, but there has been an update to the OpenJDK., and I am building one version of the AOSP behind the current. So roll the JDK back.
sudo apt-get purge openjdk-8-jdk sudo apt-get autoremove #http://askubuntu.com/questions/761127/how-do-i-install-openjdk-7-on-ubuntu-16-04-or-higher sudo add-apt-repository ppa:openjdk-r/ppa sudo apt-get update sudo apt-get install openjdk-7-jdk
make -j4
Output:
...
target SharedLib: libc (out/target/product/generic/obj/SHARED_LIBRARIES/libc_intermediates/LINKED/libc.so)
Install: out/target/product/generic/system/lib/libdl.so
out/host/linux-x86/bin/checkseapp -p out/target/product/generic/obj/ETC/sepolicy_intermediates/sepolicy -o out/target/product/generic/obj/ETC/seapp_contexts_intermediates/seapp_contexts out/target/product/generic/obj/ETC/seapp_contexts_intermediates/seapp_contexts.tmp
Install: out/target/product/generic/root/sepolicy
Install: out/target/product/generic/root/service_contexts
Writing local settings in /home/jeramy/.jack
Stopping background server
ERROR: No Jack server running
Killing background server
ERROR: No Jack server to kill
touch out/host/common/obj/JAVA_LIBRARIES/jack_intermediates/kill_server.stamp
Install: out/host/linux-x86/framework/signapk.jar
clang: error: linker command failed with exit code 1 (use -v to see invocation)
build/core/host_shared_library_internal.mk:51: recipe for target 'out/host/linux-x86/obj/lib/libart.so' failed
make: *** [out/host/linux-x86/obj/lib/libart.so] Error 1
make: *** Waiting for unfinished jobs....
warning: string 'gsm_alphabet_default_charset' has no default translation.
#### make failed to build some targets (04:44:50 (hh:mm:ss)) ####http://oopsmonk.github.io/blog/2016/06/07/android-build-error-on-ubuntu-16-04-lts
I applied the above fix, and got this error:
host C++: libart <= art/runtime/mirror/method.cc
host C++: libart <= art/runtime/mirror/object.cc
host C++: libart <= art/runtime/mirror/reference.cc
/tmp/array-25da80.s: Assembler messages:
/tmp/array-25da80.s:1973: Internal error!
Assertion failure in get_line_subseg at /usr/local/google/home/chh/workdir/precise7/toolchain-src/binutils/binutils-2.23/gas/dwarf2dbg.c line 272.
Please report this bug.
clang++: error: assembler command failed with exit code 1 (use -v to see invocation)
build/core/binary.mk:706: recipe for target 'out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/mirror/array.o' failed
make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/mirror/array.o] Error 1
make: *** Waiting for unfinished jobs....
#### make failed to build some targets (02:33:01 (hh:mm:ss)) ####upon receiving that error I removed the last line in the flags and made my HOST_x86_common.mk file look the same as it does here:
https://android-review.googlesource.com/#/c/223100/
Creating filesystem with parameters:
Size: 1610612736
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 6144
Label: system
Blocks: 393216
Block groups: 12
Reserved block group size: 95
Created filesystem with 1675/98304 inodes and 139519/393216 blocks
Install system fs image: out/target/product/generic/system.img
out/target/product/generic/system.img+ maxsize=1644333504 blocksize=2112 total=1610612736 reserve=16610880
#### make completed successfully (03:30:45 (hh:mm:ss)) ####Total build time was ~6hrs. on an AMD Athlon(tm) 5350 APU with Radeon(tm) R3 with 4 cores using `make -j8`
Test the build:
emulator &
wait for a long long time, and:
-
Building Android, by the book: Setup the Build Environment
03/11/2017 at 14:44 • 0 commentshttps://source.android.com/source/initializing.html
For Ubuntu >= 15.04 (you need a 64bit version of ubuntu. The website says it recommends 14.04, I am using 16.04. )sudo apt-get update
sudo apt-get install openjdk-8-jdksudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 \
lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache \
libgl1-mesa-dev libxml2-utils xsltproc unzipConfigure USB Access. Replace <username> with your username
wget -S -O - http://source.android.com/source/51-android.rules | sed "s/<username>/$USER/" | sudo tee >/dev/null /etc/udev/rules.d/51-android.rules; sudo udevadm control --reload-rules
-
What's inside?
03/09/2017 at 15:45 • 0 commentsAndroid AOSP - Marshmallow - 6.0.1_r78 BBBAndroid - KitKat - 4.4.4_r1.0.1 Description Links abi abi Minimal C++ Run-Time Type Information Support https://developer.android.com/ndk/guides/abis.html art art Android Run Time https://source.android.com/devices/tech/dalvik/ bionic bionic Bionic is the standard C library (including libc, libdl, libm, and libpthread) https://en.wikipedia.org/wiki/Bionic_(software) bootable bootable OTA recovery and bootloader https://source.android.com/devices/tech/ota/tools.html https://source.android.com/devices/tech/ota/inside_packages.html build build The main entry point of the build system resides here http://elinux.org/Android-4.1.1_r4 <--- Seems to be a good reference for many of the folders cts cts Compatability Test Suite http://source.android.com/compatibility/cts/index.html dalvik dalvik Contains Dalvik, see docs folder within http://newandroidbook.com/files/Andevcon-DEX.pdf developers Material for app developers See the readme's in some of the folders development development App development tools and samples http://elinux.org/Android-4.1.1_r4 documentation is created at build time? device device Device specific stuff.
**There may be some good stuff about packaging an androidized kernel in here.**http://elinux.org/images/2/29/Customizing_AOSP_for_my_Device.pdf https://developer.android.com/adk/index.html <-- I think thats for the google folder. There is an arduino example. docs docs http://source.android.com/ There are instructions in the readme external external External Projects antlr, chromium, etc. http://elinux.org/Android-4.1.1_r4 View folder to see what's in there. The list on the website isn't accurate for marshmallow. frameworks frameworks Android internals hardware hardware Drivers & HAL https://sujaiantony.wordpress.com/2012/06/25/an-android-101-hardware-and-hal/ kernel Linux Kernel for BBBAndroid http://elinux.org/Building_BBB_Kernel libcore libcore Apache Harmony See NOTICE in folder libnativehelper libnativehelper Support functions for Android's class libraries See README in folder ndk ndk Android Native Development Kit (NDK) See README.TXT in folder packages packages Standard Android Applications pdk pdk PDK (Platform Development Kit) http://www.theverge.com/2012/6/27/3120980/google-announces-platform-development-kit platform_testing I'm not finding any documentation on this. I assume it is self explanatory. prebuilts prebuilts Toolchains and dev tools https://source.android.com/source/building-kernels.html sdk sdk Software Development Kit See README.txt system system Android System Files tools Gradle & Fat32lib u-boot BBBAndroid boot loader .repo .repo Makefile Makefile patch.sh -
Building Android, BBBAndroid: Get the AOSP
03/06/2017 at 16:18 • 0 commentsThere is a link to the manifest xml file on this page http://bbbandroid.sourceforge.net/. It takes you here https://github.com/hendersa/bbbandroid-manifest/blob/master/bbbandroid-aosp-4.4.4_r1-3.8.xml
# from ~/
mkdir BBBAndroid
cd BBBAndroid
repo init -u https://github.com/hendersa/bbbandroid-manifest.git
repo sync # 50Gb
-
Building Android, by the book: Get the AOSP
03/06/2017 at 14:14 • 0 commentsReferences:
https://source.android.com/source/downloading.html
'Embedded Android' by Karim Yaghmour
Install Repo:
sudo apt-get install curl git mkdir ~/bin PATH=~/bin:$PATH curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo chmod a+x ~/bin/repo
Initialize a Repo Client:
mkdir android-AOSP
cd android-AOSP git config --global user.name "Your Name"
git config --global user.email "you@example.com" # | # I'll come back to this --------------------------------\ /` # v repo init -u https://android.googlesource.com/platform/manifest -b android-6.0.1_r78 # See page 82 in the book for info about pulling from a branch rather than the master repo sync # Additionally you could use the -j switch # This takes a long time. It looks to be a 65.6GB download.