Linux Ubuntu on Android Box

Hi,

I have tried following the khadas docs to build a linux distribution. I built a u-boot first, and got stuck when building the linux kernel ffrom the khadas/linux in github. So I downloaded a different kernel source from another site and built the kernel. Then downloaded a prebuilt image of ubuntu from the link in the docs, but the kernel is different as the downloaded image had a kernel within itself.

I need help to flash a USB drive with the u-boot and the image and install linux on an Android box. I need help on this issue.

what’s the question?Can you provider the build log for me?

The kernel source from another site don’t match our board . You need to follow this to build the kernel.

You can follow this to update your image

About More docs, you can look here

I followed the linux kernel source doc and i am running into many compilation errors. Do I need an Ubuntu box to compile the Kernel? I am using CentOS

I didn’t compile the kernel using CentOS. You can search the compilation errors by google.

I think you’d better compile the Kernel using ubuntu.

okay. Another doubt: Can you please share the directory structure to be set for the bootloader, ramdisk, rootfs and steps to create the final image and flashing onto the box with sd card. I am newbie. Hope you understand.

Before booting the image, is there anything I need to do on the Android box? as shown here? Like modifying the u-boot environment?

You can follow this to build the bootloader and ramdisk. Also you can follow this to create the roots.
About packing the final image,you can follow this

It is only support to flash the image onto the box with usb

You don’t need to do anythings

do i need to do the preparations as specified in this link, if I am trying to build the image for Android Box also?

Yes,you need to do the preparations

in this link, Do I need to create a single folder and clone all the repositories one by one to the same folder or should I follow as in the doc: first get clone u-boot, go to u-boot dir, then build the bootloader, without going back, clone the linux repo to this directory and then build the linux kernel, and build the ramfs into the same disk?

In the preparations, Do I need to modify some parameters using the USB to TTL debug board to access the U-boot in Android Box? or just use the pacakges necessary for the installation?

Yes,you need to do it by this

If you only flash the final image onto your EMMC,you don’ need to use the Usb TTL

You also can flash our official Ubuntu firmware and look this

Hi, Allan:
Does your issues got resolved? Just let us know if still get stuck.

Thanks!

Hi,

I haven’t still got the issues resolved. What I have is a boot.img, and a rootfs.img. I am still stuck at getting both the images onto an SD card as a single image file and install on the Android box. Please let me know, how can I continue from here. I tried all the links. But couldn’t find the /aml_upgrade_package.conf or the upgrade or the update.img from this link

You can check images_upgrade repository on Github for details.

Note that there are two configuration files in the repository:

  • package.conf: for Linux Distro
  • package_dualos.conf: for Android + Linux Distro dual boot

Seems that we need got the documents updated. :smile:

since im using an Android box, should I need to go with the dualos conf?

I’m not quite sure what do you mean here about an Android box? do you mean Khadas VIM?

Up to you, try it if you want to build dual boot ROM.