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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
1,856 次查看
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,

标签 (2)
标记 (2)
1 解答
1,372 次查看
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.

在原帖中查看解决方案

2 回复数
1,373 次查看
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,372 次查看
gusarambula
NXP TechSupport
NXP TechSupport

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

0 项奖励