Hi all,
finally I have launched myself to build a new kernel for my BeaglBone Black, as this is my first time, I have read lot of links and follow the steps proposed at some of them.
I have been able to cconfigure and compile the kernel, but there is no way to upload the kernel to target, BeagleBone Black. So, I can’t verify if it is working or not.
I’m going to explain all the steps I have done, and what I have tested in order to get your help.
BeagleBone Black Configuration:
-
Hardware: BeagleBone Black 4GB rev.C
-
OS: Debian 4.6.3-14
-
Kernel (current): 3.8.13-bone79
-
Internet connection: USB (‘USB0’)
Configure and Compile the Kernel: [Link]
- ARM Cross Compiler: arm-linux-gnueabihf-
- GIT → downloaded kernel 4.1
- Installed ‘lzop’ tool and ‘libssl-dev’.
- Downloaded U-Boot tools, made and installed (included ‘mkimage’ tool).
wget ftp://ftp.denx.de/pub/u-boot/u-boot-latest.tar.bz2 tar -xjf u-boot-latest.tar.bz2 cd into u-boot directory make sandbox_defconfig tools-only sudo install tools/mkimage /usr/local/bin
- Compiled the BeagleBone Black kernel.
git clone git://github.com/beagleboard/linux.git
cd linux
git checkout 4.1
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bb.org_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig (To modify some features)
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j4
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage dtbs LOADADDR=0x80008000 -j4
- Build kernel modules.
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules -j4
- Rootfs folder:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=/home/user/export/rootfs modules_install
Once, kernel is built, it is upload time. For such action, I have test both suggestions from link above, also another one.
Now, I will explain how I have tried to do it and the results, moreover my doubts.
Upload Kernel:
- Way1 (brute force):
- To be fast, ‘4.1.15’ modules were copied to ‘/lib/modules/4.1.15’ path.
- uImage was copied from ‘arch/arm/boot’ on Host-PC to ‘/boot/uboot’ on BBB.
- am335x-boneblack.dtb was copied from ‘arch/arm/boot/dts’ on Host-PC to ‘/boot/uboot/dtbs’ on BBB.
- Then, BBB is rebooted, but BBB is halted at boot. The four leds are switched on permanently.
- I have to restore the BBB with the SD Card.
Which is the right kernel image, uImage or zImage? I have compiled uImage but I saw at so many websites that the image to upload is zImage.
-
Way2 (tftp):
-
Created and configured tftp server on Host-PC.
-
Connected Serial-USB adapter to BBB’s serial port.
-
Opened uBoot console, and set ip variables, both ipaddr and serverip.
-
Added to ‘uEnv.txt’:
console=ttyO0, 115200n8
ipaddr=192.168.7.2
serverip=192.168.7.1
rootpath=/home/user/uboot/export/
netargs=setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=${ipaddr}:${serverip}:192.168.7.1:255.255.255.0:beaglebone:usb0:none:192.168.7.1
netboot=echo Booting from network ...; tftp ${loadaddr} ${bootfile}; tftp $(fdraddr} ${fdtfile}; run netargs; bootz ${loadaddr} - ${fdtaddr}
uenvcmd=run netboot
- From here, no more steps worked. There is no USB connection at uBoot, so I can’t communicate with Host-PC
How can I solve the issue and send the kernel to BeagleBone?
Please, any hint or tip you can provide me it will be helpful.
KR!