Adding instructions for creating custom packages
@@ -6,7 +6,7 @@ will include the :doc:`Kubos core services <../services/core-services>`, but not
As a result, customers will need to manually enable the services and packages corresponding to the devices present in their system.
-Additionally, customers may create and include their own :doc:`system packages <TODO>`.
+Additionally, customers may create and include their own :ref:`system packages <custom-packages>`.
Reference Documents
-------------------
@@ -14,6 +14,7 @@ Reference Documents
- :doc:`kubos-linux-on-bbb`
- :doc:`kubos-linux-on-iobc`
- :doc:`kubos-linux-on-mbm2`
+- `Adding New Packages to Buildroot <https://buildroot.org/downloads/manual/manual.html#adding-packages>`__
Selecting Hardware Services
---------------------------
@@ -69,3 +70,31 @@ If you would like to save the custom configuration you have created, run ``sudo
This will overwrite the configuration file you intially set for the build. For example, ``kubos-linux-build/config/pumpkin-mbm2_defconfig``.
Going forward, this new file can be fed into any new builds, removing the need to manually select the additional packages.
+
+.. _custom-packages:
+
+Adding Custom Packages
+----------------------
+
+While some work has been done by Kubos in order to support :doc:`hardware devices <../services/hardware-services>`,
+it is entirely possible that a customer might want to use a device which is not currently supported.
+In this case the customer should write their own support package, and then include it in their Kubos Linux build
+using the previous instructions.
+
+The Buildroot manual provides in-depth instructions about `how to create a package <https://buildroot.org/downloads/manual/manual.html#adding-packages>`__.
+
+At a high-level, the instructions are:
+
+- Create a new folder, "your-package", in `kubos-linux-build/packages` containing at least:
+
+ - Config.in - The `KConfig file <https://buildroot.org/downloads/manual/manual.html#writing-rules-config-in>`__ defining ``BR2_PACKAGE_{YOUR_PACKAGE}``,
+ along with any additional configuration options
+ - {your-package}.mk - The Makefile defining the package and containing the build (``{YOUR_PACKAGE}_BUILD_CMDS``) and installation (``{YOUR_PACKAGE}_INSTALL_TARGET_CMDS``) commands.
+
+- Update `kubos-linux-build/Config.in` to point to your new package's `Config.in` file
+
+Once these changes have been made, you can run ``sudo make menuconfig`` in order to select the new package.
+
+Once selected, you can run ``sudo make`` to do a full build, or ``sudo make {your-package}`` in order to test building only your package.
+
+If you make changes to your package, you can run ``sudo make {your-package}-rebuild`` in order to recompile it.
\ No newline at end of file
