How to change Device Tree Blob (.dtb) file since the kernel does not have capemgr to load overlays.

Hi,

Our board uses arago project on it. The kernel is 3.12 and in the directory /sys/devices/, there is no capemgr.* . Therefore, I am not able to use the device tree overlays (.dtbo).

We want to change the pinmux on the P8 and P9 header and also turn the internal pull up resistor of the UART0_RX on. Therefore, we need to modify the current beaglebone black .dtb file.

My question are as follows:

  1. Can I just replace the current am335x-boneblack.dtb with the new .dtb file to make the pinmux changes? Or do i need to load the new .dtb file up and how?

  2. I see that there are a lot of .dtb in the /boot/ folder. How to load different .dtb when board boots up?

Regards,
Shu

Depending on your "bootloader" specify:

dtb=file.dtb

but you might have an "old" u-boot so use the older "fdtfile"
fdtfile=file.dtb

in /boot/uEnv.txt

Regards,

Robert,

Thanks for your reply.

We do not have the bootloader source. We only use the bootloader image file.

There are two partitions in the SD card.
In the boot partition, there are only MLO and u-boot.img.
In the rootfs partition, in the folder /boot/, there are .dtb files and zImage files.

There is no uEnv.txt file. So the uEnv.txt is the bootloader’s specification?

How can create the uEnv.txt file and make changes in it to let the uboot to use the new .dtb file?

Regards,
Shu

Sounds like your in a pickle...

stop u-boot and type "printenv" it's a simple scripting language,
figure out what file get's loaded and override ftdfile.

Regards,

Robert,

This is what i see from the “printenv”. It loads the “fdtfile=am335x-boneblack.dtb” device tree file.

Can I create a new .dtb and replace the “am335x-boneblack.dtb” to load my new .dtb? Or how to create an uEnv.txt ?

Regareds,

Shu

Robert,

I do not know why I posted a reply with an image like 3 hours ago and it did not show up until now. Below are the logs I got by typing “printenv”.

The board loads the fdtfile=am335x-boneblack.dtb. I used find -iname “*.dts” and I do not see any device tree source in the SD card. I will look for one online.

My question are:

  1. Is the uEnv.txt needed for the board? If so, how to create the file?

  2. After making the pinmux changes in the .dts file, how to recompile the kernel and the device tree source using the following commands? Or is there an easy way to do the device tree change in the 3.12 kernel?

make omap2plus_defconfig
make zImage dtbs
make modules
make modules_install INSTALL_MOD_PATH=

I am really new to Linux. If you can answer my questions, I would be really appreciate it.

U-Boot# printenv
arch=arm
baudrate=115200
board=am335x
board_name=A335BNLT
board_rev=¦¦¦¦
bootcmd=gpio set 53; i2c mw 0x24 1 0x3e; run findfdt; mmc dev 0; if mmc rescan ; then echo micro SD card found;setenv mmcdev 0;else echo No micro SD card found, setting mmcdev to 1;setenv mmcdev 1;fi;setenv bootpart ${mmcdev}:2;mmc dev ${mmcdev}; if mmc rescan; then gpio set 54; echo SD/MMC found on device ${mmcdev};if run loadbootenv; then echo Loaded environment from ${bootenv};run importbootenv;fi;if test -n $uenvcmd; then echo Running uenvcmd …;run uenvcmd;fi;gpio set 55; if run loaduimage; then gpio set 56; run loadfdt;run mmcboot;fi;fi;
bootdelay=1
bootdir=/boot
bootenv=uEnv.txt
bootfile=uImage
bootpart=0:2
console=ttyO0,115200n8
cpu=armv7
dfu_alt_info_emmc=rawemmc mmc 0 3751936
dfu_alt_info_mmc=boot part 0 1;rootfs part 0 2;MLO fat 0 1;MLO.raw mmc 100 100;u-boot.img.raw mmc 300 3C0;u-boot.img fat 0 1;uEnv.txt fat 0 1
dfu_alt_info_nand=SPL part 0 1;SPL.backup1 part 0 2;SPL.backup2 part 0 3;SPL.backup3 part 0 4;u-boot part 0 5;kernel part 0 7;rootfs part 0 8
ethact=cpsw
ethaddr=1c:ba:8c:95:7b:cf
fdt_high=0xffffffff
fdtaddr=0x80F80000
fdtfile=am335x-boneblack.dtb
findfdt=if test $board_name = A33515BB; then setenv fdtfile am335x-evm.dtb; fi; if test $board_name = A335X_SK; then setenv fdtfile am335x-evmsk.dtb; fi;if test $board_name = A335BONE; then setenv fdtfile am335x-bone.dtb; fi; if test $board_name = A335BNLT; then setenv fdtfile am335x-boneblack.dtb; fi
importbootenv=echo Importing environment from mmc …; env import -t $loadaddr $filesize
kloadaddr=0x80007fc0
loadaddr=0x80200000
loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}

echo "fdtfile=am335x-custom.dtb" > ./uEnv.txt

Just have it in the directory/partition u-boot is looking for..

Regards,

prolly because you have not registered as a BBB group member and your
post needed to be approved first.

Bingo!

Gerald