I am trying to build Linux with flex-builder for our new board. The build crashes on not finding the DTB file in the correct folder. The DTB is generated down in the folder
flexbuild_lsdk2012\build\linux\kernel\arm64\LS\output\LSDK-20.12-V5.4\arch\arm64\boot\dts\freescale
But is not being copied to the folder
flexbuild_lsdk2012\build\linux\kernel\arm64\LS
If I manually copy the file, the the build completes. However, if I then try to boot Linux with the resultant ITB file, then it hangs on BMan.
Using the same ITB file, I can boot the ls1046ardb and it completes to a prompt. Comparing the boot messages of the two different boots, when my board is the target, then a bunch of stuff gets assigned the DMA which then later fails. On the ls1046ardb boot, this does not get assigned to DMA. Below are the differences.
**************************
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000fb000000, size 8 MiB
[ 0.000000] OF: reserved mem: initialized node qman-fqd, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000f8000000, size 32 MiB
[ 0.000000] OF: reserved mem: initialized node qman-pfdr, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x00000000fa000000, size 16 MiB
[ 0.000000] OF: reserved mem: initialized node bman-fbpr, compatible id shared-dma-pool
[ 1.858118] bman-fbpr addr 0x0000000000000000 size 0x1000000
[ 1.864159] Bman err interrupt handler present
[ 1.868869] Can't get bman-portal@0 property 'cell-index'
[ 1.874318] Can't get bman-portal@10000 property 'cell-index'
[ 1.880116] Can't get bman-portal@20000 property 'cell-index'
[ 1.885913] Can't get bman-portal@30000 property 'cell-index'
[ 1.891710] Can't get bman-portal@40000 property 'cell-index'
[ 1.897507] Can't get bman-portal@50000 property 'cell-index'
[ 1.903303] Can't get bman-portal@60000 property 'cell-index'
[ 1.909099] Can't get bman-portal@70000 property 'cell-index'
[ 1.914895] Can't get bman-portal@80000 property 'cell-index'
[ 1.920692] Can't get bman-portal@90000 property 'cell-index'
[ 1.926490] No BMan portals available!
********************************************
Questions:
1. What additional script of Makefile do I need to modify to get it to copy the DTB file to the proper folder?
2. What is incorrect or missing in my configuration that I get this BMan error which hangs the boot?
Thanks.
Solved! Go to Solution.
Please add the line to copy dts neosem_hp_ibir-sdk.dtb as the fllowing.
ls $$opdir/arch/$$locarch/boot/dts/$$dtbstr | xargs -I {} cp {} $(FBOUTDIR)/linux/$(KERNEL_TREE)/$(DESTARCH)/$(SOCFAMILY) && \
cp $$opdir/arch/$$locarch/boot/dts/neosem_hp_ibir-sdk.dtb $(FBOUTDIR)/linux/$(KERNEL_TREE)/$(DESTARCH)/$(SOCFAMILY) && \
Thank you. I got it to build the sdk wrapper version and it does not hang at BMan any more. However, I still have to manually copy the dtb file from
flexbuild_lsdk2012\build\linux\kernel\arm64\LS\output\LSDK-20.12-V5.4\arch\arm64\boot\dts\freescale
to flexbuild_lsdk2012\build\linux\kernel\arm64\LS
If I do not copy it manually, then the build will not complete.
Do you know what makefile, config file or script does this copy? I think I have to add my new board to that list of DTB files that it copies.
Thanks.
Thank you.
I tried adding that code, but when I do, then the build script fails. If I remove the lines, it runs again, but then complains that the dtb is not found.
The error message is shown below. It is not the modified makefile that is failing, but some higher level makefile since the line numbers do not match. I copied the three lines and only changed the DTB file name. I also tried various indents on the second and third lines, but no difference. If I have this included in the makefile at line 82, then it fails. Below I pasted my makefile contents from line 79 through 85 to show where I inserted it. Did I put it into the wrong place?
rm -rf $$opdir/tmp && \
$(MAKE) -j$(JOBS) modules -C $(KERNEL_PATH) O=$$opdir && \
$(MAKE) -j$(JOBS) modules_install INSTALL_MOD_PATH=$$opdir/tmp -C $(KERNEL_PATH) O=$$opdir && \
ifeq ($(CONFIG_KERL_LINUX), y)
ls $$opdir/arch/$$locarch/boot/dts/$$dtbstr | xargs -I {} cp {} $(FBOUTDIR)/linux/$(KERNEL_TREE)/$(DESTARCH)/$(SOCFAMILY) && \
+ cp $$opdir/arch/$$locarch/boot/dts/neosem_hp_ibir-sdk.dtb $(FBOUTDIR)/linux/$(KERNEL_TREE)/$(DESTARCH)/$(SOCFAMILY) && \
$(MAKE) -j$(JOBS) headers_install INSTALL_HDR_PATH=$$opdir/tmp -C $(KERNEL_PATH) O=$$opdir && \
*****************************************************************
CONFIGLIST: build_lsdk.cfg
make: Entering directory '/home/apps/appwork/BitBucket_SourceCode/neosem-linux/linux-5.4.47/flexbuild_lsdk2012'
make[1]: Entering directory '/home/apps/appwork/BitBucket_SourceCode/neosem-linux/linux-5.4.47/flexbuild_lsdk2012/packages/linux'
/bin/bash: -c: line 56: syntax error near unexpected token `y,'
/bin/bash: -c: line 56: `ifeq (y, y)'
Makefile:26: recipe for target 'build_kernel' failed
make[1]: *** [build_kernel] Error 1
Please add the line to copy dts neosem_hp_ibir-sdk.dtb as the fllowing.
ls $$opdir/arch/$$locarch/boot/dts/$$dtbstr | xargs -I {} cp {} $(FBOUTDIR)/linux/$(KERNEL_TREE)/$(DESTARCH)/$(SOCFAMILY) && \
cp $$opdir/arch/$$locarch/boot/dts/neosem_hp_ibir-sdk.dtb $(FBOUTDIR)/linux/$(KERNEL_TREE)/$(DESTARCH)/$(SOCFAMILY) && \
Thank you. I finally got it working. The change was the two additional lines only. I did not need the
ifeq ($(CONFIG_KERL_LINUX), y) statement . In addition, to that removal. I also had to change the path of the source file in the copy. The file is actually down one more level in the "freescale" folder. Once I added that extra level, then it worked. For anyone else, the two extra lines are shown below. The webpage may display these on more than two lines. When you paste them in, it should be only two lines with each terminated by a "\". As usual with makefile, turn on special characters and watch your indents and terminations. The special characters should match other similar lines in the existing makefile. If not, then you have some copy and paste artifacts that will need fixing. When using this as an example, verify the folder level of the source file and of course change the name of the DTB file to match what your project is named.
ls $$opdir/arch/$$locarch/boot/dts/$$dtbstr | xargs -I {} cp {} $(FBOUTDIR)/linux/$(KERNEL_TREE)/$(DESTARCH)/$(SOCFAMILY) && \
cp $$opdir/arch/$$locarch/boot/dts/freescale/your_company-sdk.dtb $(FBOUTDIR)/linux/$(KERNEL_TREE)/$(DESTARCH)/$(SOCFAMILY) && \
If I rename the fsl-ls1046a-rdb.dtb to the name of my board, then it still hangs at BMan as above. However, if I rename the fsl-ls1046a-rdb-sdk.dtb to the name of my board, then it will boot all the way to the Linux prompt. Therefore, this is a device tree issue and it is some additional code added by the sdk extension that is fixing the issue. According to the LSDK user guide, this is supposed to invoke a private Ethernet driver in the sdk version and a public Linux one in the other version. However, it seems to do much more than that.
Can anyone give me a clue as to what I need to copy out of the SDK version?
Thank you.
You only need to modify the following section according to your custom board in fsl-ls1046a-rdb-sdk.dts, and keep all the other content. You need to modify fsl-ls1046a-rdb.dts according to your custom board, which is imported in fsl-ls1046a-rdb-sdk.dts.
&fsldpaa {
ethernet@0 {
status = "disabled";
};
ethernet@1 {
status = "disabled";
};
ethernet@9 {
compatible = "fsl,dpa-ethernet";
fsl,fman-mac = <&enet7>;
dma-coherent;
};
};