2
votes

I am following building kernel image using http://elinux.org/Building_BBB_Kernel this link.

When i execute this command from the above link reference " make ARCH=arm CROSS_COMPILE=arm-linux-gnu- uImage-dtb.am335x-boneblack " Its throwing me error saying "no rule for target uImage-dtb.am335x-boneblack"

5

5 Answers

1
votes

You may well be using use the procedure you are mentioning with a different kernel source tree this procedure was written for.

The procedure you are referencing is supposed to be applied to an Arago Linux kernel - directly creating a zImage+dtb bundle as a make target seems to be a patch to the standard arch/arm/boot/Makefile, that is this feature may not be part of current mainline kernels build system.

You can get the same result by doing by hand what the patch is doing, that is appending the dtb file to the zImage prior to the uImage file to be created:

make ARCH=arm CROSS_COMPILE=arm-linux-gnu- zImage am335x-boneblack.dtb
cp arch/arm/boot/zImage arch/arm/boot/zImage.original

ls -l arch/arm/boot/zImage arch/arm/boot/dts/am335x-boneblack.dtb
-rw-rw-r-- 1 user user   29162 Oct 16 23:19 arch/arm/boot/dts/am335x-boneblack.dtb
-rwxrwxr-x 1 user user 2030848 Oct 16 23:21 arch/arm/boot/zImage

cat arch/arm/boot/zImage arch/arm/boot/dts/am335x-boneblack.dtb > arch/arm/boot/zImage-dtb
ls -l  arch/arm/boot/zImage-dtb
-rw-rw-r-- 1 user user 2060010 Oct 16 23:25 arch/arm/boot/zImage-dtb

cp  arch/arm/boot/zImage-dtb  arch/arm/boot/zImage
make ARCH=arm CROSS_COMPILE=arm-linux-gnu- uImage LOADADDR=0x80008000
ls -l  arch/arm/boot/uImage
-rw-rw-r-- 1 user user 2060074 Oct 16 23:27 arch/arm/boot/uImage

You will notice that the length of the uImage file is exactly 64 bytes greaterthan the ZImage bundle it was built from, which does correspond to the length of the standard u-boot header.

Finally we can rename the uImage bundle file to the name used in the procedure, and restore the original, non-bundle, zImage back in the case you would need it:

mv arch/arm/boot/uImage arch/arm/boot/uImage-dtb.am335x-boneblack
mv arch/arm/boot/zImage.original arch/arm/boot/zImage

An alternate solution is to patch arch/arm/boot/Makefile - While applying it to my 3.17 mainline kernel, parts of it were rejected, which means changes would have to be made in the makefile, and a new patch for 3.17 be created/saved for future use.

In order for the bundle uImage to be usable, you need to enable CONFIG_ARM_APPENDED_DTB in your kernel configuration file - credit to Srinivas Kandagatla.

1
votes

Alternative approach

Take a look at Buildroot. It provides a BB target:

make beaglebone_defconfig
make

And you're done for the basic root filesystem and the kernel. Then you can select U-Boot to be built etc. BR will take care of toolchain too. So in most case you'll only need to close BR repo and BR will download an compile the rest automatically.

1
votes

Found this page from trying to figure out a similar problem from following this guide: http://processors.wiki.ti.com/index.php/Using_the_WL18xx_Cape_with_BeagleBone_Black

Had the same problem with no target found to make uImage...

I think the patch.sh stops prematurely during a git operation if git isn't configured with a user email address. I did

git config --global user.email "[email protected]" (credit: http://wiki.beyondlogic.org/index.php/BeagleBoneBlack_Building_Kernel)

and successfully reattempted the build sequence.

0
votes

I found a solution which worked for me.

Found at: Compiling the kernel of Beaglebone black

Reason : git global configurations in complete.


Solution:

  1. Do git global configuration of name and email.
  2. Then restart from the instruction of ./patch.sh
0
votes

for building the kernel for the beaglebone black you have to download the appropriate tool chain from the linaro's site. After you export the tool chain correctly you have to run the ./build_kernel.sh script which not only downloads the correct branch of the kernel version fit for BBB but also builds kernel image, along with the modules and the dtbs(device tree binary blobs)

I suggest you follow this link : https://eewiki.net/display/linuxonarm/BeagleBone+Black