Firefly开源社区

打印 上一主题 下一主题

Firefly Ubuntu开发入门之(1)自已编译内核

97

积分

0

威望

0

贡献

游客

积分
97
发表于 2016-9-23 22:00:56      楼主
本帖最后由 dalton.lai 于 2016-9-24 15:06 编辑
牛头 发表于 2016-9-23 14:11
不知道你那边是什么原因,我这里没有问题。看看2楼的贴子。

sorry, I have no Chinese IME in this NB.

I have ever post this issue at 9/14/2016 09:58:54 in English forum, too.

make[1]: *** No rule to make target 'firmware/brcm/brcmfmac4339-sdio.bin', needed by 'firmware/brcm/brcmfmac4339-sdio.bin.gen.o'.  Stop.

https://wireless.wiki.kernel.org/en/users/Drivers/brcm80211

Both brcmsmac and brcmfmac drivers require firmware files that need to be separately downloaded. Firmware is available from the Linux firmware repository at:I have no idea if this is the root casue~

The test result is failed....
Kernel compiled pass, but crashed during boot.....

And, further one, I found if we execute "make distclean", below file will be deleted.
/firefly-3.14-kernel/firmware/brcm/brcmfmac4339-sdio.txt

Thanks

brcmfmac4339-sdio.tar.gz

280.05 KB, 下载次数: 23, 下载积分: 灯泡 -1 , 经验 -1

回复

使用道具 举报

97

积分

0

威望

0

贡献

游客

积分
97
发表于 2016-9-24 12:20:08      沙发
牛头 发表于 2016-9-24 10:55
1、是否修改过内核配置??
2、用的内核代码是否为 :T-Firefly/firefly-3.14-kernel.git ??


No, I have not changed anything, just follow the steps you provided~
回复

使用道具 举报

97

积分

0

威望

0

贡献

游客

积分
97
发表于 2016-9-24 16:38:53      板凳
本帖最后由 dalton.lai 于 2016-9-24 17:11 编辑
牛头 发表于 2016-9-24 15:12
我这里没有这个目录,能正常编译通过。
感觉编译不过的内核代码,不是教程里提到的代码。

thanks a lot for your help to check this
seems we have different code base

in my site, we have:
https://github.com/T-Firefly/firefly-3.14-kernel/tree/master/firmware/brcm

the latest one was committed by zouxf on Sep. 12, 2016
the commit digest is: f1d612a
回复

使用道具 举报

97

积分

0

威望

0

贡献

游客

积分
97
发表于 2016-9-26 08:34:16      地板
本帖最后由 dalton.lai 于 2016-9-26 13:19 编辑

Ha, thanks a lot for your great help.
It can compile successfully, I'll test it on the board.

Thanks

here comes the test result as below:

1. with ubuntu 14.04 rootfs, successfully boot into system with wifi work well
2. with ubuntu 16.04 rootfs, boot into rootfs with below hang-up message:
    brcmfmac: brcmf_p2p_create_p2pdev: timeout occurred

I have no idea if this is driver revision issue, so I check the driver folder, /drivers/net.
There are totally four wifi drivers:
wireless
wireless-3.8
wireless-3.16
wireless-3.18

In kernel makefile, we have this "export WIFIVERSION=-3.8"
In /net makefile, we have "obj-$(CONFIG_WLAN) += wireless$(WIFIVERSION)/"
In /drivers/net/wireless-3.8/brcm80211/brcmfmac, we have:
ccflags-y += \
    -Idrivers/net/wireless-3.8/brcm80211/brcmfmac    \
    -Idrivers/net/wireless-3.8/brcm80211/include

so, the question is: should we apply wireless driver 3.16 or 3.18 (or other one) for ubuntu 16.04 rootfs?
Thanks a lot.
回复

使用道具 举报

97

积分

0

威望

0

贡献

游客

积分
97
发表于 2016-10-10 10:38:47      5#
hi 牛头,

I have test this compilation again, and found one more question.
There are 5 partitions in old firmware, and dtb file is concatenated into resource.img.
But there are only three partitions in new firmware, and dtb file is concatenated into zImage.

Here comes the make file in detail:
kernel.img: zImage
        $(Q)$(srctree)/mkkrnlimg $(objtree)/arch/arm/boot/zImage $(objtree)/kernel.img >/dev/null
        @echo '  Image:  kernel.img is ready'

%_kernel.img: %.dtb zImage
        $(Q)cat $(objtree)/arch/arm/boot/zImage $(objtree)/arch/arm/boot/dts/$*.dtb > $(objtree)/zImage-dtb && \
        $(srctree)/mkkrnlimg $(objtree)/zImage-dtb $(objtree)/kernel.img >/dev/null && \
        rm -f $(objtree)/zImage-dtb
        @echo '  Image:  kernel.img (with $*.dtb) is ready'

LOGO := $(notdir $(wildcard $(srctree)/logo.bmp))
%.img: %.dtb kernel.img $(LOGO)
        $(Q)$(srctree)/resource_tool $(objtree)/arch/arm/boot/dts/$*.dtb $(LOGO)
        @echo '  Image:  resource.img (with $*.dtb $(LOGO)) is ready'

I have try to enable dtb in zImage by change below kernel options:
Boot options => Build a concatenated zImage/dtb by default
Boot options => Use appended device tree blob to zImage (EXPERIMENTAL)

In your description, we have two way to make our kernel.img:
1. dtb file in zImage
make -j4 zImage
make firefly-rk3288.dtb
cat arch/arm/boot/zImage arch/arm/boot/dts/firefly-rk3288.dtb > zImage-dtb
mkkrnlimg -a zImage-dtb kernel.img

ERROR messages:
mkkrnlimg V20120220
cmd:-a zImage-dtb [kernel.img]
Makimg kernel Image: zImage-dtb for MID!
input open NG !

2. dtb file in resource.img
make -j8 firefly-rk3288.img

So, the question need your help is:
How should I do to update the kernel in 3 partitions firmware?
1. how to enable dtb with zImage in kernel options?
2. how to fix the issue with mkkrnlimg?

Thanks a lot.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表