OpenBricks/openbricks

Need help compiling rpi kernel

cedricp opened this issue · 14 comments

Hi,
I successfully built all packages for a bcm2708 platform, the binaries are working fine, but I have no luck to build a working Kernel...
If I use a pre-built one, the rpi boots up normally, but with the Openbrick's one, nop. I use the internal GCC toolchain, tested with version 3.18.16 and 4.1.20...
The generated zImage doesn't work with qemu, too. Is there something I'm missing ?
Regards.

The Raspberries don't use zImage directly. The build script (see https://github.com/OpenBricks/openbricks/blob/master/packages/system/linux/build#L64 ) post-processes them to form kernel.img and kernel7.img, respectively. The script used for this can be found in ./config/platforms/arm/bcm270x/packages/linux/sources/ . The resulting boot files will be placed in <kernel_build_dir>/.install/boot and this is what you should be using.

Thank you for that information, but I used the zImage for QEMU only. I do use the <kernel_build_dir>/.install/boot folder to boot the real RPI, but unsuccessfully, it remains stuck after one green led flash.

Have you ever tested to compile the Kernel with the internal GCC toolchain ? ( I use the latest GIT devel branch with GCC4.9)

By the way, is there a mailing list for Openbricks ? Would like to contribute as far I as can.

3.18.16 is working on the PI, finally :) But still struggling to get a valid QEMU kernel file...

Thanks :)

Have you ever tested to compile the Kernel with the internal GCC toolchain ? ( I use the latest GIT devel branch with GCC4.9)

I just recompiled 4.1.20 (have not tried 3.18 for many moons) and put it on an SD card using our script. It booted right away without any problems.

Did copy config.txt, all the *.dtb files and overlays? Do your 'firmware-arm-raspberrypi' and 'raspberrypi-userland' packages match the kernel version? If you are not sure, clean them out and rebuild them.

Recompiled with 4.1.20, working now... But still looking for a way to build qemu kernel. Seems that I just have to get the generated zImage and give it to QEmu, but I remains stuck at startup... I found that : https://github.com/dhruvvyas90/qemu-rpi-kernel/tree/master/tools
Perhaps I must turn on/off a specific parameter of the Kernel, but I don't know which one !

Unfortunately I have no idea either. Never tried QEMU...

I have updated the RPi kernel to 4.9.15. It now uses pretty much the default config. Maybe it's worth another try. Be sure to update firmware and userland as well...

Can we close this ?

Of course !

Thanks
Feel free to open a new issue if needed