Differences between revisions 15 and 21 (spanning 6 versions)
Revision 15 as of 2021-06-04 04:43:28
Size: 7779
Editor: PaulWise
Comment: wording
Revision 21 as of 2021-06-06 02:00:27
Size: 8720
Editor: PaulWise
Comment: clarify some items, soften language
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
This page documents the approximate procedure for creating a new port and getting it included into Debian. It is a work in progress and is based on the [[PortTemplate|port template]] wiki page. This is an aspirational document describing the most ideal procedure for creating a new port and getting it included into Debian. Since every port will have different circumstances, the procedure may differ for your port, but the best way to do it should be documented below. It is a work in progress and is based on the [[PortTemplate|port template]] wiki page.
Line 3: Line 3:
/!\ Do not skip any of the steps. /!\ It is best to not skip any of the steps.
Line 5: Line 5:
/!\ Complete each step before moving to later steps. /!\ It is best to complete each item before moving to later steps.
Line 13: Line 13:
  * Register accounts for each team member on the bug trackers and subscribe to the mailing lists for upstream projects: [[https://savannah.gnu.org/projects/config|GNU config]], [[https://www.gnu.org/software/binutils/|binutils]], [[https://gcc.gnu.org/|gcc]], [[https://www.gnu.org/software/gdb/|gdb]], [[https://www.qemu.org/|qemu]], kernel (such as [[https://www.kernel.org/|Linux]]), and libc (such as [[https://sourceware.org/glibc/|glibc]])
Line 19: Line 17:
  * Prepare kernel and toolchain patches supporting the port and get the necessary changes included into these upstream projects: [[https://savannah.gnu.org/projects/config|GNU config]] ([[https://git.savannah.gnu.org/cgit/config.git/tree/config.guess|instructions]]), [[https://www.gnu.org/software/binutils/|binutils]], gcc ([[https://gcc.gnu.org/contribute.html|instructions]]), gdb ([[https://www.gnu.org/software/gdb/contribute/|instructions]]), qemu ([[https://www.qemu.org/contribute/|instructions]]), the kernel (such as Linux ([[https://kernelnewbies.org/|info]])) and the libc (such as glibc ([[https://sourceware.org/glibc/wiki/Contribution%20checklist|instructions]]) (in that order)   * Register accounts for each team member on the bug trackers and subscribe to the mailing lists for upstream projects: [[https://savannah.gnu.org/projects/config|GNU config]], [[https://www.gnu.org/software/binutils/|binutils]], [[https://gcc.gnu.org/|gcc]], [[https://www.gnu.org/software/gdb/|gdb]], [[https://www.qemu.org/|qemu]], kernel (such as [[https://www.kernel.org/|Linux]]), and libc (such as [[https://sourceware.org/glibc/|glibc]])

  * Prepare kernel and toolchain patches supporting the port and get the necessary changes included into these upstream projects: [[https://savannah.gnu.org/projects/config|GNU config]] ([[https://git.savannah.gnu.org/cgit/config.git/tree/config.guess|instructions]]), [[https://www.gnu.org/software/binutils/|binutils]], gcc ([[https://gcc.gnu.org/contribute.html|instructions]]), gdb ([[https://www.gnu.org/software/gdb/contribute/|instructions]]), the kernel (such as Linux ([[https://kernelnewbies.org/|info]])) and the libc (such as glibc ([[https://sourceware.org/glibc/wiki/Contribution%20checklist|instructions]])) (in that order)

  * If hardware supporting your port is not yet available or your hardware or FPGA softcore or software model is quite slow, prepare patches for the appropriate simulator/emulator upstream project (such as qemu ([[https://www.qemu.org/contribute/|instructions]])). If you do not need this, it will still be very useful to complete at some point, so consider completing it later on.
Line 29: Line 31:
  * Discuss the port with the community. Please send an email to the DebianList:FIXME mailing list. If the port is related to some other architectures, ensure you CC the mailing list for the architecture family. Also join the #debian-bootstrap and #debian-ports [[IRC]] channels.   * Discuss the port with the community. Please send an email to the DebianList:debian-devel mailing list. If the port is related to some other architectures, ensure you CC the mailing list for the architecture family. Also join the #debian-bootstrap and #debian-ports [[IRC]] channels.
Line 33: Line 35:
  * Get any necessary changes included into dpkg ([[Teams/Dpkg/FAQ#new-arch|instructions]]), to get the new Debian architecture name supported (which is the name that end-users will use for the architecture), this requires having the
 
[[ArchitectureSpecificsMemo|architecture ABI details]] clear, the [[Multiarch/Tuples|Debian multiarch tuple]] is derived from the Debian architecture tuple.
  * Get any necessary changes included into dpkg ([[Teams/Dpkg/FAQ#new-arch|instructions]]), to get the new Debian architecture name supported (which is the name that end-users will use for the architecture), this requires having the [[ArchitectureSpecificsMemo|architecture ABI details]] clear, the [[Multiarch/Tuples|Debian multiarch tuple]] is derived from the Debian architecture tuple.
Line 68: Line 69:
  * Donate hardware for the [[https://gcc.gnu.org/wiki/CompileFarm|GCC compile farm]].   * Optionally, donate hardware for the [[https://gcc.gnu.org/wiki/CompileFarm|GCC compile farm]]. It is recommended to do this so that people outside Debian also have access to hardware for testing toolchains or other software on your port.
Line 70: Line 71:
  * Setup porterboxen for package maintainers to login to and port packages.   * Setup porterboxen for Debian package maintainers to login to and port packages.
Line 72: Line 73:
  * Optionally, donate hardware for [[https://debomatic.github.io/|debomatic]].   * Optionally, donate hardware for [[https://debomatic.github.io/|debomatic]]. It is recommended to do this so Debian package maintainers have a way to automatically trigger custom package builds.
Line 104: Line 105:
  * Make the port more performant by porting or optimising various libraries (ToDo: add examples).   * Make the port more performant by porting or optimising various libraries, language runtimes and signal processing algorithms and cryptography libraries, for example: openssl, gnutls, openjdk, v8, ffmpeg, golang, gccgo, ghc, ocaml

This is an aspirational document describing the most ideal procedure for creating a new port and getting it included into Debian. Since every port will have different circumstances, the procedure may differ for your port, but the best way to do it should be documented below. It is a work in progress and is based on the port template wiki page.

/!\ It is best to not skip any of the steps.

/!\ It is best to complete each item before moving to later steps.

Preparation

  • Assemble a team of people working on the port and find a financial sponsor to support the team's work.

Upstreaming

  • Decide on the architecture ABI details and the GNU triplet. A different GNU triplet is required for each ABI, which includes bitness, endianness, soft/hard-float, calling convention, or whether object files can be inter-linked.

  • Register accounts for each team member on the bug trackers and subscribe to the mailing lists for upstream projects: GNU config, binutils, gcc, gdb, qemu, kernel (such as Linux), and libc (such as glibc)

  • Prepare kernel and toolchain patches supporting the port and get the necessary changes included into these upstream projects: GNU config (instructions), binutils, gcc (instructions), gdb (instructions), the kernel (such as Linux (info)) and the libc (such as glibc (instructions)) (in that order)

  • If hardware supporting your port is not yet available or your hardware or FPGA softcore or software model is quite slow, prepare patches for the appropriate simulator/emulator upstream project (such as qemu (instructions)). If you do not need this, it will still be very useful to complete at some point, so consider completing it later on.

Downstreaming

  • Identify related ports and ISAs, decide that the port is worth creating and detail the reasons why.
  • Register accounts for each team member on the Debian wiki (registration) and Salsa (register).

  • Register and verify accounts for each team member on the OFTC IRC chat network and join the #debian-bootstrap, #debian-ports and other Debian IRC channels.

  • Discuss the port with the community. Please send an email to the debian-devel mailing list. If the port is related to some other architectures, ensure you CC the mailing list for the architecture family. Also join the #debian-bootstrap and #debian-ports IRC channels.

  • Finalise the architecture details, especially including the ABI and CPU baseline requirements.
  • Get any necessary changes included into dpkg (instructions), to get the new Debian architecture name supported (which is the name that end-users will use for the architecture), this requires having the architecture ABI details clear, the Debian multiarch tuple is derived from the Debian architecture tuple.

Bootstrap

  • Prepare patches supporting the port in rebootstrap and other Debian-specific packages.

  • Use your modified rebootstrap, the other patches and manual bootstrapping to build all of build-essential.

  • Keep working on the bootstrap process until all of build-essential is installable with debootstrap.
  • Continue building as many packages as you can using the new build-essential packages.
  • Get any remaining changes included into the upstream projects that you have modified.
  • Get any necessary changes included into rebootstrap and other projects involved in the bootstrap process.

Unofficial port

  • Register the port on the Debian wiki, replace "example" throughout the page with the chosen architecture details and fill out as many details as you have.

  • Summarise the details of the architecture and ABI on the arch summary wiki page.

  • Setup communication channels for the architecture. Use the architecture family as the name of any communication channels you create, just in case additional related architectures are created later. A mailing list and IRC channel are recommended.

  • Add your architecture to the bugs arch usertags page.

  • Get the port included amongst the unofficial ports.

  • Setup unofficial buildd servers for the port, either in qemu or hardware.

  • Include the port on the ports list on the Debian website and add the end-user name for the port to the website arches data. If you create a page on the website, create one named after the architecture family, just in case additional related architectures are created later.

  • Monitor build failures (1 2) and continually fix issues.

  • Optionally, donate hardware for the GCC compile farm. It is recommended to do this so that people outside Debian also have access to hardware for testing toolchains or other software on your port.

  • Setup porterboxen for Debian package maintainers to login to and port packages.
  • Optionally, donate hardware for debomatic. It is recommended to do this so Debian package maintainers have a way to automatically trigger custom package builds.

  • Port the Debian installer so that it works on the hardware you have available.

  • Use the Debian installer to install Debian on the hardware you have available.
  • Write some documentation about installing the arch on the hardware you have installed.

  • Submit installation reports for the hardware you have installed.

  • Submit some hardware probes for the hardware you have installed.

Official port

Released port

Other work

  • Improve the port based on reports from users and QA services.
  • Make the port more performant by porting or optimising various libraries, language runtimes and signal processing algorithms and cryptography libraries, for example: openssl, gnutls, openjdk, v8, ffmpeg, golang, gccgo, ghc, ocaml
  • Make the bootstrap process more trustworthy through Bootstrappable Builds.