Closed wongsyrone closed 9 years ago
someone says DTB not attached cuz ARM uses Device Tree while MIPS uses loaders to boot do some search, gcc 4.9 issue, find some upstream patches
based on link: https://developer.ridgerun.com/wiki/index.php/Common_Problems_-_Linux_kernel_doesnt_boot
The last data sent to the console by u-boot is the string Starting kernel .... The next output is generated by Linux. If you are not seeing any output after Starting kernel ..., then something has gone wrong with either Linux sending the output to the right UART, a mismatch in u-boot and kernel images, or the kernel image is corrupt.
we need kernel console configuration, machine ID and well-built kernel image to boot, and kernel console information was coded in DTS file.
look for: [ ] compile DTB correctly [ ] compile kernel and make image correctly
https://github.com/wongsyrone/openwrt-1/blob/master/target/linux/mvebu/patches-3.18/001-add_mamba_support.patch#L101 console info here, but this info not passed to linux kernel, maybe DTB corrupted or kernel image corrupted
try with
try to add buildroot's gcc 4.9.x patches
check openembedded patches https://github.com/openembedded/oe-core/tree/master/meta/recipes-devtools/gcc/gcc-4.9
Reported: https://dev.openwrt.org/ticket/19916
Giving up, and waiting upstream fix EDIT: try to enable early_printk() in kernel and see logs
bootargs = "console=ttyS0,115200";
finally https://github.com/openwrt-mirror/openwrt/commit/53a77a939215c571f27c44c436cf5f715ffc6235 , waiting......
switching to self-added gcc 5.1 and need test
failed on gcc 4.9, 5.1 and 5.2
Still broken on official GCC 5.2.0
can you try to insert / add to KCFLAGS (i dont know where - probably somewhere in kernel make templates)
-fno-ipa-sra
source: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65932
also from there:
The issue is also present when compiling kernels for OMAP1/2 platforms. Also looks like -Os is needed to trigger this. Kernels compiled with -O2 seem to work.
so changing default flags might be worth a try
Thanks, I will try. https://github.com/wongsyrone/openwrt-1/blob/master/include/target.mk
@plntyk Please refer to https://github.com/wongsyrone/openwrt-1/commit/35308f2435ec75192324d68817e7702e3b257e71 and https://github.com/wongsyrone/openwrt-1/commit/93c0a5173414cfa7684547de3c3a1f3dc4240383 If you want to send these changes to OpenWrt's mailing list, feel free to do it.
nbd pushed a better solution from gcc guys, I will revert my changes.
official gcc 4.9 and self-added 4.9 -------- kernel boot freeze
MIPS can use gcc 4.9 and works well http://kmoving.blog.163.com/blog/static/20504919720123151533819/
it should be a linaro gcc bug https://github.com/gcc-mirror/gcc/commits/linaro/gcc-4_9-branch