OpenBricks / openbricks

Embedded Linux Framework
http://www.geexbox.org/
GNU General Public License v2.0
82 stars 42 forks source link

Need help compiling rpi kernel #61

Closed cedricp closed 7 years ago

cedricp commented 7 years ago

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.

warped-rudi commented 7 years ago

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 /.install/boot and this is what you should be using.

cedricp commented 7 years ago

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

cedricp commented 7 years ago

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

cedricp commented 7 years ago

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

cedricp commented 7 years ago

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

tomlohave commented 7 years ago

Le 08/02/2017 à 13:51, CED a écrit :

Hello,

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

yes there is : https://groups.google.com/forum/#!forum/geexbox-devel — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/OpenBricks/openbricks/issues/61#issuecomment-278320850, or mute the thread https://github.com/notifications/unsubscribe-auth/ABgAfstXs3R6FffG9ycUcz5a7h6IEwwZks5rabpkgaJpZM4L6rhP.

cedricp commented 7 years ago

Thanks :)

warped-rudi commented 7 years ago

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.

cedricp commented 7 years ago

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 !

warped-rudi commented 7 years ago

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

warped-rudi commented 7 years ago

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

tomlohave commented 7 years ago

Can we close this ?

cedricp commented 7 years ago

Of course !

tomlohave commented 7 years ago

Thanks Feel free to open a new issue if needed