Yocto and Android 5.0

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Yocto and Android 5.0

Jump to solution
9,989 Views
AndyHo
Contributor III

Hi,
We are now using iMx6Q SDB and ready to porting the android 5.0 bsp to new our new hardware (EMMC boot).

The android 5.0_1.0.0 BSP can be built and download into SDB EMMC successfully, but it fail to download into our hardware

The only difference are the MMC port and DDR, the DDR has tuned to pass DDR stress test, the parameter has been apply into uboot of android BSP, and MFGtool emmc number has been changed.

After some research, I think I should rebuild the ram image in the MFGtool by using Yocto, because the RAM parameters and Uboot parameter and kernel need to be modified, I choose Yocto-3.14.28-1.0.0, I follow the user guides, the ram images can be built by using fsl-image-mfgtool-initramfs only "once", after modify the code, only initramfs.cpioxxxxx can be built our by running same command again.

So my questions are:

1. Can/should I use Yocto to build mfgtool uboot/kernel/rootfsto replace ram images under MFGtool for android 5.0?

2. Why fsl-image-mfgtool-initramfs can't build out uboot,kernel automatically again?even add -f, -clean , -cleanstate, besides -cleanall, How to build all using fsl-image-mfgtool-initramfs after modify codes? Some post suggest to use yocto to make a toolchain for manually build, but it is hard because you don't know what actions is performed by Yocto.

3. If I need build uboot manually, is it true the bitbake u-boot-mfgtool build the same u-boot as running fsl-image-mfgtool-initramfs?

4. If I need build kernel manually, Unlike Yocto user guide said, there is no linux-imx-mfgtool, so can't to bitbake, you can find several simular name of mfgtool kernels ( linux-mfgtool, mfgtool-linux-imx, linux-imx....etc), which one is correct for MFGtool andorid5?

5  If I need build rootfs manually, each time run fsl-image-mfgtool-initramfs, a new set of ramfs and zimages files are created, how to clean those old files/binaries before rebuild, including uboot and kernel, like clean build?
6. Since fsl-image-mfgtool only build all when first build, I don't know whether the updated version of initramfs will be created after I rebuild kernel?

Thanks to anyone look or answer those questions.

Labels (4)
1 Solution
4,145 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Andy Ho,

(1) The Linux BSP and Android BSP use different manufacturing tools. The Yocto BSP release is intended to be used to build the Linux images, not Android. These things being said, you should be able to port the Kernel baked with Yocto although there may be some changes involved in order to integrate with Android (I would check the patches that are included on the Android BSP).

I would recommend starting with the Android BSP and perhaps builing the kernel manually with the toolchain instead of switching to a Yocto project. (2) This goes to the second question. Since Yocto is designed more for Distribution than Development of BSPs, it is a good practice work on your code building manually with the toolchain instead of using Yocto. However, if you use the cleanall command you would delete the resulting files. Cleanstate also erases the fetched source code.

$ bitbake –c cleanall u-boot-mfgtool

(3) Both of the Manufacturing tool recipes should produce the same u-boot.

(4) I don’t think there is a kernel in Yocto with the Android Manufacturing tools in mind. I would recommend checking the following document on how to build the Kernel from within Yocto and manually.

Building Linux Kernel

As for cleaning the old binaries before rebuild you may use cleanall. Just be careful that this also deletes the downloaded source files so perhaps you would rather want to use clean. You can see a bit more in detail what each of these options do on the Yocto Reference Manual

Yocto Project Reference Manual

I’m not sure I understood your question correctly (6) but Yocto does not really follow changes made to the code so if bitbake already created these files they won’t be rebuild.

View solution in original post

0 Kudos
3 Replies
4,145 Views
bordonkuo
Contributor II

Dear all

I have the same problem. Do you have any action ?

0 Kudos
4,146 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Andy Ho,

(1) The Linux BSP and Android BSP use different manufacturing tools. The Yocto BSP release is intended to be used to build the Linux images, not Android. These things being said, you should be able to port the Kernel baked with Yocto although there may be some changes involved in order to integrate with Android (I would check the patches that are included on the Android BSP).

I would recommend starting with the Android BSP and perhaps builing the kernel manually with the toolchain instead of switching to a Yocto project. (2) This goes to the second question. Since Yocto is designed more for Distribution than Development of BSPs, it is a good practice work on your code building manually with the toolchain instead of using Yocto. However, if you use the cleanall command you would delete the resulting files. Cleanstate also erases the fetched source code.

$ bitbake –c cleanall u-boot-mfgtool

(3) Both of the Manufacturing tool recipes should produce the same u-boot.

(4) I don’t think there is a kernel in Yocto with the Android Manufacturing tools in mind. I would recommend checking the following document on how to build the Kernel from within Yocto and manually.

Building Linux Kernel

As for cleaning the old binaries before rebuild you may use cleanall. Just be careful that this also deletes the downloaded source files so perhaps you would rather want to use clean. You can see a bit more in detail what each of these options do on the Yocto Reference Manual

Yocto Project Reference Manual

I’m not sure I understood your question correctly (6) but Yocto does not really follow changes made to the code so if bitbake already created these files they won’t be rebuild.

0 Kudos
4,145 Views
AndyHo
Contributor III

Hi Gusarambula,

Thank you very much for the reply,

1. Do you mean I can build those images using Android BSP? There is no much information about how those images prooduced, the one and the only document "Manufacturing Tool V2 Linux or Android Firmware Development Guide V2" in different MFGtools are the same and old.
    For android bsp, you can't find xxxx_mfg defconfig, xxx_updater.cf, CONFIG_xxxx defines under uboot-imx and kernel_imx like the document describe, even it points out we must use LTIB tool?(new version linux use Bitbake? that is why I study yocto build environment), especially in this document you can only see:

How to Generate U-Boot and Kernel Image for MFG
Please refer to the BSP User Guide, chapter Build Manufacturing Firmware. <----which BSP user guide?

How to Add UUC into Rootfs for MFGTool.


There is no mfgtool images information in Android BSP user guide, but I can only find  few useful imformation in Yocto linux user guide ( Freescale_Yocto_Project_User's_Guide @ fsl-yocto-3.14.28-1.0.0, sec. 6.2 ) ?

All I want to do is modify some uboot/kernel code then build all necesssary files to replace files under mfgtool\Profiles\Linux\OS Firmware\firmware, please tell me how to do it without Yocto, how to build those files using android BSP.

2. Based on 1, If noway to build those files using android BSP, the only way is to use Yocto+bitbake to build mfgtool images, the problem is, we need bitbake fsl-image-mfgtool-initramfs can build uboot,kernel,rootfs "everytime", so that we dont need to build them individually. Please note that you can bitbake -c compile u-boot-mfgtool, and -c deploy to build new uboot "everytime", why not fsl-image-mfgtool-initramfs?  I think some actions are missing so bitbake can't build all images again.

3. All related posts I see only talk about build the uboot/kernel manually, but even you can build uboot/kernel successfully, there are many other actions in fsl-image-mfgtool, not only compile, like uuc,rootfs,packages....,It's complicate for users to build them individually, and usually users need to build them because the hardware configuration is different from sabresd, it's sad for user to take long time to make those images without any guides, hope we can get more details from Freescale.

Thank you.