Running android on i.MX6 sabreauto reference board

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

Running android on i.MX6 sabreauto reference board

Jump to solution
2,857 Views
brucebye
Contributor II

Has anybody tried/succeeded running Android on the Sabreauto ref board?  I'm trying to cobble together a suitable u-boot binary, but so far with no joy.  I was hoping to just put in the bare minimum config, starting with mx6q_sabreauto.h copied to mx6q_sabreauto_android.h and adding in the android bits based on android config for other boards.

I've managed to build a u-boot binary this way by doing without such features as fastboot and android recovery, but so far have not produced a binary that will bring up my board.  With a bit of luck, somebody out there has already trodden this path!

(I'm doing this on a quad board so far, but will want to do the same for the Sabreauto solo afterwards - hopefully the second flavour will be a smaller step further.)

Labels (4)
1 Solution
1,223 Views
lily_zhang
NXP Employee
NXP Employee

Attachment is the patch for your reference.


View solution in original post

10 Replies
1,223 Views
lily_zhang
NXP Employee
NXP Employee

We have made Android running with SabreAI board. The formal support bout SabreAI board will be added into future Android release. If you just want to bring SabreAI board simply, you can refer to SabreSD to add minor changes to enable it.

For bootloader change with recovery and fastboot support, you can copy fastboot and recovery code from SabreSD board file and create SabreAI android configure file. For example:

diff --git a/board/freescale/mx6q_sabreauto/mx6q_sabreauto.c b/board/freescale/mx6q_sabreauto/mx6q_sabreauto.c

index d97647f..d6c2dda 100644

--- a/board/freescale/mx6q_sabreauto/mx6q_sabreauto.c

+++ b/board/freescale/mx6q_sabreauto/mx6q_sabreauto.c

@@ -1219,3 +1219,54 @@ int checkboard(void)

  }

  return 0;

}

+

+#ifdef CONFIG_IMX_UDC

+#define SABREAUTO_MAX7310_1_BASE_ADDR IMX_GPIO_NR(8, 0)

+#define SABREAUTO_MAX7310_2_BASE_ADDR IMX_GPIO_NR(8, 8)

+#define SABREAUTO_MAX7310_3_BASE_ADDR IMX_GPIO_NR(8, 16)

+

+#define SABREAUTO_IO_EXP_GPIO1(x) (SABREAUTO_MAX7310_1_BASE_ADDR + (x))

+#define SABREAUTO_IO_EXP_GPIO2(x) (SABREAUTO_MAX7310_2_BASE_ADDR + (x))

+#define SABREAUTO_IO_EXP_GPIO3(x) (SABREAUTO_MAX7310_3_BASE_ADDR + (x))

+

+#define SABREAUTO_USB_HOST1_PWR  SABREAUTO_IO_EXP_GPIO2(7)

+#define SABREAUTO_USB_OTG_PWR  SABREAUTO_IO_EXP_GPIO3(1)

+

+void udc_pins_setting(void)

+{

+ mxc_iomux_v3_setup_pad(MX6X_IOMUX(PAD_ENET_RX_ER__ANATOP_USBOTG_ID));

+

+ /* USB_OTG_PWR = 0 */

+ gpio_direction_output(SABREAUTO_USB_OTG_PWR, 0);

+ /* USB_H1_POWER = 1 */

+ gpio_direction_output(SABREAUTO_USB_HOST1_PWR, 1);

+

+ mxc_iomux_set_gpr_register(1, 13, 1, 0);

+

+}

+#endif

+

+#ifdef CONFIG_ANDROID_RECOVERY

+

+#define GPIO_VOL_DN_KEY IMX_GPIO_NR(5, 14)

+

+int check_recovery_cmd_file(void)

+{

+ int button_pressed = 0;

+ int recovery_mode = 0;

+

+ recovery_mode = check_and_clean_recovery_flag();

+

+ /* Check Recovery Combo Button press or not. */

+ mxc_iomux_v3_setup_pad(MX6X_IOMUX(PAD_DISP0_DAT20__GPIO_5_14));

+

+ gpio_direction_input(GPIO_VOL_DN_KEY);

+

+ if (gpio_get_value(GPIO_VOL_DN_KEY) == 0) { /* VOL_DN key is low assert */

+  button_pressed = 1;

+  printf("Recovery key pressed\n");

+ }

+

+ return recovery_mode || button_pressed;

+}

1,223 Views
brucebye
Contributor II

Awesome - that's just the kind of thing I was trying to cobble together!  I or a colleague will be giving it another try in a couple of months.

0 Kudos
1,224 Views
lily_zhang
NXP Employee
NXP Employee

Attachment is the patch for your reference.


1,223 Views
daiane_angolini
NXP Employee
NXP Employee

Sorry, I´m confused. What is the error/problem/issue you´ve been facing?

Are you using imx6q sabre auto board or any custom board?

What changes did you make on Android source code?

0 Kudos
1,223 Views
jimmychan
NXP TechSupport
NXP TechSupport
0 Kudos
1,223 Views
brucebye
Contributor II

Yes, I'm using the source from the Freescale imx android BSP.

0 Kudos
1,223 Views
daiane_angolini
NXP Employee
NXP Employee

Why are you changing u-boot?

What u-boot source code are you using?

0 Kudos
1,223 Views
brucebye
Contributor II

I was trying to get a version of u-boot that would bring up my SABRE Auto that also had support for the booti command to boot from the android boot partition.

Source is from the Freescale Android BSP (imx-android-r13.4-ga.01.tar.gz).

For the moment, I'm no longer trying to use the boot.img way of writing the SD card, instead loading uImage and ramdisk separately with a u-boot image from the Linux BSP, until an official Android build for SABRE Auto becomes available.

0 Kudos
1,223 Views
karina_valencia
NXP Apps Support
NXP Apps Support

DaianeAngolini jimmychan can you continue the follow up of this case?

0 Kudos
1,223 Views
daiane_angolini
NXP Employee
NXP Employee

And is it working?

Please, share any log, or step by step, I can try to help you or reproduce it over here

0 Kudos