Skip to content
Snippets Groups Projects
  1. Oct 05, 2022
  2. Sep 30, 2020
    • Clemens Terasa's avatar
      Merge branch 'add-LICENSE' into 'master' · 4a91482c
      Clemens Terasa authored
      LICENSE: Add the GPL-2.0 from the Linux kernel
      
      See merge request garz-fricke/tools/gfpnmtologo!1
      4a91482c
    • Clemens Terasa's avatar
      LICENSE: Add the GPL-2.0 from the Linux kernel · 8f00b390
      Clemens Terasa authored
      Add the GPL v2.0 from
      https://raw.githubusercontent.com/torvalds/linux/master/LICENSES/preferred/GPL-2.0
      
      The source code comes directly from the Linux kernel.
      So also take the original version of the license from there.
      It contains more than just the license Text but also the SPDX
      annotations. Keep on the safe side and use the original version.
      8f00b390
    • Clemens Terasa's avatar
      gfpnmtologo: Add the format command line parameter · a4f47dba
      Clemens Terasa authored
      Add a parameter "-f" to define the output format. Choose between C
      style source code to be used in the Linux kernel tree or a binary
      representation.
      a4f47dba
    • Clemens Terasa's avatar
      gfpnmtologo: Replace logo_ globals with structure · a7d1135c
      Clemens Terasa authored
      Replace the global variables prefixed with "logo_" with a global
      structure that resembles the kernel internal structure linux_logo.
      
      With this it is possible to write the logo structure directly to the
      binary. Add also the offset calculation for the binary into the
      write_header_bin function.
      a7d1135c
    • Clemens Terasa's avatar
      gfpnmtologo: Add binary write functions · 2f34ae50
      Clemens Terasa authored
      Add the binary functions that write a binary based on a struct
      linux_logo.
      
      The binary will be the densely packed variant of the C-file variant.
      The structure is
       +------------+-----------------------------+---------------------+
       | linux_logo |             data            |         clut        |
       +------------+-----------------------------+---------------------+
       0
      
      The logo variable is not yet filled with data and the format_bin format
      cannot be chosen from the command line.
      2f34ae50
    • Clemens Terasa's avatar
      gfpnmtologo: Add the struct linux_logo · c839b39d
      Clemens Terasa authored
      Add the struct linux_logo from the linux kernel definition.
      
      It is currently not used but will be used in upcoming commits.
      c839b39d
    • Clemens Terasa's avatar
      gfpnmtologo: Use format abstarction · 074909d4
      Clemens Terasa authored
      Use the previously introduced file write abstraction and rewrite the
      file writing calls accordingly.
      
      Add the suffix "_c" to the file writing functions to make them unique
      if another format will be used.
      Use the renamed functions in the default output format structure
      format_c.
      
      Also use the write_clut_header function if available.
      
      Now we should be prepared to add a binary writing format.
      074909d4
    • Clemens Terasa's avatar
      gfpnmtologo: Abstract file writing functions · 535906f6
      Clemens Terasa authored
      Add an abstraction layer for the file writing function to be able to
      implement a different writing scheme.
      
      The plan is to write a binary representation of the pnm logo that can be
      directly read by the kernel. However the current implementation only
      allows a C file as output. This is fine if we want to compile the logo
      into the Kernel directly.
      
      However, if we want to supply it differently, say via a prepared memory
      block, we need a binary representation.
      
      To output a binary representation we can leverage the most parsing and
      clut determining code, and only the writing functions need to be
      exchanged. Add the struct out_mode type to prepare for the exchange.
      
      Add a new function write_clut_header that writes the section in between
      the data and the clut part. By this we can get rid of the file writeing
      calls in write_logo_clut224() in a later commit.
      535906f6
  3. Sep 29, 2020
Loading