Hi,

Yes I will download the Xiaomi boot image by ebuild.

I had proposed this small project so that it can be successfully completed within the time frame of three months.
Eliminating the concept of boot image is feasible.
If you recommend, I would like to extend my proposal by adding it.
Aboot the application bootloader of Redmi Note 4 reads boot image and loads kernel+ramdisk into RAM.
On the other hand, bootloader on computer reads kernel and ramdisk ,and loads those into RAM.
We can make Aboot function like a computer bootloader by editing its source code [1].
However we will require Xiaomi's permission  to allow us install the newly built Aboot because Aboot gets checked by SBL(Secondary boot loader) [2].

I recently got familiar with basics of Gentoo.
I have been using Ubuntu since 2 years.
I have Ubuntu on my desktop computer and laptop.
I use Ubuntu for compiling ASM, C and MATLAB codes.
I also use it for running Guitarix,Rakarrack ( virtual guitar amplifiers) and Audacity sound recorder.
Through Ubuntu I got to know about initramfs as well as list of services that are started by sysvinit and upstart.
i.e. udev, pulseaudio , x-sever, lightdm, dbus, cron etc.
I have experimented with these sevices by starting and stopping.
I have not contributed to any community or solved bugs so far.
I have Dell Venue 7 3740 which is an Intel powered Android device.This device is my main device for Android development.
https://opensource.dell.com/releases/Venue_7_3740_Merrifield/developer-edition/A195/

On Thu, Mar 22, 2018 at 9:37 AM, Benda Xu <heroxbd@gentoo.org> wrote:
Hi Mishal,

Mishal Roy <roymishal210@gmail.com> writes:

> As a proof of my proposed concept I have written a kernel ebuild which
> successfully builds x86 linux kernel from source code present in
> /usr/src/linux directory of Gentoo liveDVD. I have attached the ebuild
> and images related to it.

Thank you for trying this out.

You still have a lot to learn about the basics of ebuild.  Alice is on
the Kernel Team.  She might have more to comment.

> x86kernelbuild-1.0.ebuild

The version number should be the same as upstream.  No
architecture-specific name, like 'x86, should be used in the name.

> EAPI=0

EAPI=0 is no longer encourage in Gentoo.  Check out EAPI-6

> DESCRIPTION="This is an ebuild that compiles x86 linux kernel"

> SLOT="0"

> KEYWORDS="~x86"

> pkg_preinst()

pkg_preinst is not used like this.  Check out src_compile.

>
> {
> cd /usr/src/linux
> make ARCH=x86 i386_defconfig
> make && make modules_install
> }

> builds x86 linux kernel from source code present in /usr/src/linux
> directory of Gentoo liveDVD

This is not how Gentoo ebuild works, the build should prepare the source
code.


Kernel is a specific piece of software.  Traditionally users take care
of the final installation.  But there is a genkernel helper to automate
the process.  Please check out

  https://wiki.gentoo.org/wiki/Genkernel

for inspirations.


Cheers,
Benda