How Would I Build a Kernel Using My Own "initramfs.cpio.gz" (JB4.3_1.1.0 GA)

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

How Would I Build a Kernel Using My Own "initramfs.cpio.gz" (JB4.3_1.1.0 GA)

Jump to solution
1,821 Views
freewaymad
Contributor IV

Hi,

How would I build a kernel using my own "initramfs.cpio.gz" (JB4.3_1.1.0 GA) ? I am not sure what to change on the "gen_initramfs_list.sh" to point to my "initramfs.cpio.gz" file.

Please help,

Thanks,

Labels (2)
Tags (2)
1 Solution
1,337 Views
freewaymad
Contributor IV

What I found,

Take the initramfs.cpio.gz and unpack it (assuming it is compressed). Take initramfs and extract it from the .cpio. You now have the folder with your files in it.  I named mine "cpio". Put it in the "kernel_imx folder. Open a terminal follow the procedure to build a kernel:

$ export PATH=~/mydroid/jb/bootable/bootloader/uboot-imx/tools:$PATH

$ cd ~/myandroid/kernel_imx

$ export ARCH=arm

$ export CROSS_COMPILE=~/mydroid/jb/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-

$ echo $ARCH && echo $CROSS_COMPILE

$ make distclean

$ make imx6_android_defconfig

Now type:

$ make menuconfig

A menu will come up. Select "General Setup" then select "Initramfs source files". Type in the full path to folder; an example of this:

/home/base/myandroid/kernel_imx/cpio   (assuming the folder is named "cpio")

select "ok" then "exit" then "exit" again. You will get this in the terminal:

*** End of the configuration.

*** Execute 'make' to start the build or try 'make help'.

Type:

$ make uImage

With a successful build, the generated kernel image is ~/myandroid/kernel_imx/arch/arm/boot/uImage.

Every time the "make distclean" is used, the configuration will be cleared. So, it will have to be reset if you want to use it again.

View solution in original post

2 Replies
1,338 Views
freewaymad
Contributor IV

What I found,

Take the initramfs.cpio.gz and unpack it (assuming it is compressed). Take initramfs and extract it from the .cpio. You now have the folder with your files in it.  I named mine "cpio". Put it in the "kernel_imx folder. Open a terminal follow the procedure to build a kernel:

$ export PATH=~/mydroid/jb/bootable/bootloader/uboot-imx/tools:$PATH

$ cd ~/myandroid/kernel_imx

$ export ARCH=arm

$ export CROSS_COMPILE=~/mydroid/jb/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-

$ echo $ARCH && echo $CROSS_COMPILE

$ make distclean

$ make imx6_android_defconfig

Now type:

$ make menuconfig

A menu will come up. Select "General Setup" then select "Initramfs source files". Type in the full path to folder; an example of this:

/home/base/myandroid/kernel_imx/cpio   (assuming the folder is named "cpio")

select "ok" then "exit" then "exit" again. You will get this in the terminal:

*** End of the configuration.

*** Execute 'make' to start the build or try 'make help'.

Type:

$ make uImage

With a successful build, the generated kernel image is ~/myandroid/kernel_imx/arch/arm/boot/uImage.

Every time the "make distclean" is used, the configuration will be cleared. So, it will have to be reset if you want to use it again.

1,337 Views
gusarambula
NXP TechSupport
NXP TechSupport

Thanks for posting your findings! I’m sure they will help other users on the community!

0 Kudos