Firefly开源社区

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

923

积分

86

威望

63

贡献

超级版主

Rank: 8Rank: 8

积分
923
发表于 2016-9-24 17:33:22     
csersoft 发表于 2016-9-24 17:31
最新提交应该是8fc3d070b5765b55dbb93067d1ef7f7fba04dbd5吧,f1d612a0af756bf8fcccff46d06b816f6de8418c ...

谢谢提醒,已经修改过来了。
回复

使用道具 举报

64

积分

0

威望

0

贡献

技术小白

积分
64
发表于 2016-9-24 19:50:31     
牛头 发表于 2016-9-24 17:22
确实是有问题存在,请更新到最新代码,问题已经解决。

哎哟word妈啊,可算解决了。这可卡了我一个初学者快一个星期的时间了。。。
回复

使用道具 举报

923

积分

86

威望

63

贡献

超级版主

Rank: 8Rank: 8

积分
923
发表于 2016-9-25 22:25:31     
readsa 发表于 2016-9-24 19:50
哎哟word妈啊,可算解决了。这可卡了我一个初学者快一个星期的时间了。。。

我写教程时github代码还没更新,没想到在中间的时间更新了个有问题的代码。
回复

使用道具 举报

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.
回复

使用道具 举报

64

积分

0

威望

0

贡献

技术小白

积分
64
发表于 2016-9-26 15:00:29     
牛头 发表于 2016-9-25 22:25
我写教程时github代码还没更新,没想到在中间的时间更新了个有问题的代码。

Some problems still exist...
It seems you have not added the new files into a file list.  So if you run 'make clean', 4339.bin will be deleted and needs to be added again.
回复

使用道具 举报

97

积分

0

威望

0

贡献

游客

积分
97
发表于 2016-10-10 10:38:47     
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.
回复

使用道具 举报

24

积分

0

威望

0

贡献

游客

积分
24
发表于 2016-10-12 22:27:06     
请问能直接编译android sdk里的linux内核来运行吗
回复

使用道具 举报

129

积分

0

威望

0

贡献

技术小白

积分
129
发表于 2016-10-19 15:10:32     
readsa 发表于 2016-9-20 23:48
我把Android4.4的sdk的kernel抽出来编译了一下,这次没有问题了,看来是官方给的这个内核有问题

你的怎么解决的
回复

使用道具 举报

54

积分

0

威望

0

贡献

游客

积分
54
发表于 2016-11-2 16:11:25     
执行make -j8 firefly-rk3288.img的时候 就出现错误 不能生成kernel.img
/home/yanbib/Documents/UbuntuDev/firefly-3.14-kernel-master/arch/arm/Makefile:356: recipe for target 'kernel.img' failed
make: *** [kernel.img] Error 127
回复

使用道具 举报

42

积分

0

威望

0

贡献

游客

积分
42
发表于 2016-11-22 10:15:35     
用了最新版的,但还是没有编译出zImage。firefly-3.14-kernel-8fc3d070b5765b55dbb93067d1ef7f7fba04dbd5。我用的是linux系统,ubuntu14.04.
回复

使用道具 举报

*滑块验证:
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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