BeagleBone Black - Building Custom Kernel

Hello,

I’m trying to build a custom kernel for BBB using the source code from https://github.com/beagleboard/linux/tree/3.8 .

I did
1. make clean
2. make ARCH=arm CROSS_COMPILE=arm-linux- bb.org_defconfig
3. make ARCH=arm CROSS_COMPILE=arm-linux-

using tftpboot I downloaded the Linux uImage to 0x82000000 address and run using bootm 0x82000000.

U-boot~# bootm 81000000 82000000
## Booting kernel from Legacy Image at 81000000 …
Image Name: Embedded Linux-BBB
Created: 2015-12-19 17:12:31 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 9234816 Bytes = 8.8 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum … OK

Starting Linux kernel…

after the above message, kernel hangs. I believe the problem is due missing of debug serial port.

When I tried to configure the debug serial port i.e., UART1 in make ARCH=arm CROSS_COMPILE=arm-linux- menuconfig
I don’t find any UART here.

This particular support should’ve been in Kconfig but I didn’t find that. Can anyone please guide me how I could build the running kernel.

Regards,
Bharath

and where exactly did you load the device tree blob?

This isn't exactly new, as ever since the 3.8.x kernel came out.. (2013-02-18)
we've been using device tree's by DEFAULT on the beaglebone black..

So again,

Regards,

Hello Robert,

Thank you for your quick reply. I’m downloading the Kernel at address 0x81000000 and fdt at address 0x82000000. I’m downloading the default dtb found under arch/arm/boot/dts/am335x-boneblack.dtb

This is log:

U-boot~# tftp 81000000 uImage
link up on port 0, speed 100, full duplex
Using cpsw device
TFTP from server 192.168.1.7; our IP address is 192.168.1.10
Filename ‘uImage’.
Load address: 0x81000000
Loading: #################################################################

Dear Robert,

I’ve flash the new debian image with kernel version 3.8.13 to 4GB eMMC of BBB and retrieved the am335x-boneblack.dtb and tried to run my kernel with this .dtb but same result. when I saw the difference between the dtb that i’ve build and the one found in debian (eMMC), both seem to be same. Since I’m booting the kernel and fdt via tftpboot, do I’ve to change anything in u-boot env variables or bootargs? I’m stuck in this from past 1 week.

Please help me, so that I can jump this hurdle.

Regards,
Bharath

I’m using the ti 4.1 kernel and I use both TFTP and NFS. Robert has already setup everything you need to to do what you want. The only critical piece is the “client_ip” line to use NFS.

Here is my uEnv.txt file

uname_r=4.1.12-ti-r25

##https://www.kernel.org/doc/Documentation/filesystems/nfs/nfsroot.txt

##SERVER: sudo apt-get install tftpd-hpa
##SERVER: TFTP_DIRECTORY defined in /etc/default/tftpd-hpa
##SERVER: zImage/.dtb need to be located here:
##SERVER: TFTP_DIRECTORY/zImage
##SERVER: TFTP_DIRECTORY/dtbs/
.dtb

#cmdline=init=/lib/systemd/systemd
#cmdline=quiet init=/lib/systemd/systemd
#cmdline=ftrace=function_graph trace_buffer_size=100000 FTRACE
#cmdline=init=/lib/sysvinit/init

##client_ip needs to be set for u-boot to try booting via nfs

client_ip=10.100.116.105

#u-boot defaults: uncomment and override where needed

server_ip=10.100.116.100
gw_ip=10.100.116.1
netmask=255.255.255.0
#hostname=
#device=eth0
#autoconf=off
root_dir=/home/john/targetNFS
#nfs_options=,vers=3
#nfsrootfstype=ext4 rootwait fixrtc

dtb=am335x-boneblack.dtb

Regards,
John

hello John,

I’m using Kernel 3.8.13, and I don’t want to change to other kernel version.
From u-boot, I’m able to use tftpboot and download the uImage or zImage and am335x-boneblack.dtb at 0x82000000 and 0x83000000 respectively. No issues in that.

Till now I was using the uImage and zImage created by vmlinux using following commands:

arm-linux-gnueabihf-objcopy -O binary vmlinux linux.bin
mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n “Embedded Linux-BBB” -d linux.bin uImage
gzip -9 linux.bin
mkimage -A arm -O linux -T kernel -C gzip -a 0x80008000 -e 0x80008000 -n “Embedded Linux-BBB” -d linux.bin.gz zImage

the above uImage(size 8.8MB) starts giving the following log and hangs when I do bootm 0x82000000 - 0x83000000
log:
Booting kernel from Legacy Image at 82000000 …
Image Name: Embedded Linux-BBB
Created: 2015-12-19 17:12:31 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 9234816 Bytes = 8.8 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum … OK

Starting Linux kernel…

Well... "vmlinuz" = "zImage"..

Just throw away "mkimage" you don't need it..

Just boot the kernel's version of "vmlinuz", we usually rename it
"zImage" because everyone got use to the "uImage" name..

Regards,

and use the address's:

bootz 0x82000000 - 0x88000000

so you don't over write zImage in memory..

Regards,