meraki-builder icon indicating copy to clipboard operation
meraki-builder copied to clipboard

Build Documentation

Open randlor opened this issue 4 years ago • 4 comments

Whilst the current build documentation provides a good high level overview of the build process, there would be some benefit to expanding on it to encourage community uptake in the project.

Detailing prerequisites and procedures for building the following:

  • Buildroot
  • Building OpenWRT
  • Stage 1/2 make scripts

It would be helpful to highlight what each phase produces, and how the output is then used in the next phase in a step-by-step manner.

Happy to do this, and expand on the current build scripts to automate the process further where possible also.

randlor avatar Sep 06 '20 14:09 randlor

Sure, I should note though that "stage2" make script is completely irrelevant for postmerkOS. It only applies if you are interested in disassembling or rebuilding the Meraki stock firmware.

The "OpenWrt" toolchain from Meraki is only important if you want to rebuild the kernel. I'll see if I can integrate building the kernel into buildroot, as that would eliminate the need to build yet another toolchain. It's probably best to shove as much as possible into buildroot, since it's a well maintained project and building is roughly as simple as make menuconfig and then make


But perhaps I'm just proving your point that it's too confusing to know what you need to do to build :D

halmartin avatar Sep 07 '20 16:09 halmartin

Ah ha, now you've explained it that makes sense! I took the documented steps on the front page all too literally. :) Buildroot -> Stage 1 -> Stage 2... probably explains why I wasn't having a lot of success in getting the images to the correct size!

Getting everything into buildroot would certainly be great, and very much appreciated. Thanks again for your efforts! :)

randlor avatar Sep 07 '20 22:09 randlor

@randlor I've done some testing and it seems like it should be possible and relatively simple to build the kernel using the buildroot toolchain. I've opened #8 to track this effort.

halmartin avatar Sep 22 '20 11:09 halmartin

Since u-boot supports the luton26 and mainline Linux support will come soon™ I have created a post-image script that buildroot executes to create a flashable image. For anyone interested, you can find the post-image script here.

This technically works now, if you use u-boot and buildroot to compile the kernel, but there are some issues with this (e.g. I'm still working out the correct device tree for u-boot and for some reason that I have not debugged, buildroot built kernels do not boot).

It does mean in the future that you can just run make in buildroot and at the end you'll have a flashable image in output/images

halmartin avatar Nov 30 '20 19:11 halmartin