Permalink
Browse files

standardize file headers and add MIT licensee

  • Loading branch information...
1 parent 5aa2902 commit e5a8d5b75e740ea0340f3cb9c89dbe085cb57788 @falconindy committed May 1, 2011
Showing with 63 additions and 19 deletions.
  1. +6 −0 Makefile
  2. +2 −3 README
  3. +23 −0 geninit
  4. +6 −7 geninit.api
  5. +12 −9 geninit.conf
  6. +5 −0 geninit.quirks
  7. +9 −0 init.c
View
@@ -1,3 +1,9 @@
+#
+# Makefile
+#
+# This file is part of geninit.
+#
+
VERSION = 0.1
all: init doc
View
5 README
@@ -3,8 +3,7 @@ geninit - a modular initramfs creation utility
it's fast.
it's flexible.
it's familiar.
-it's clean.
-it's hackable.
+it's clean and hackable.
it might even do your dishes...
@@ -40,7 +39,7 @@ user 0m4.293s
sys 0m0.115s
-And building a pair lighter images for my custom kernel...
+And building a pair of lighter images for my custom kernel...
# time geninit -p kernel26-rampage
:: Building image from preset: kernel26-rampage-default
==> -k 2.6.38.4-rampage -c /etc/geninit.conf -g /boot/initramfs-rampage
View
23 geninit
@@ -1,4 +1,27 @@
#!/bin/bash
+#
+# geninit - modular initramfs creation tool
+#
+# Copyright (C) 2011 by Dave Reisner <d@falconindy.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+#
shopt -s extglob
shopt -s nullglob
View
@@ -1,14 +1,13 @@
#!/bin/bash
-
#
-# geninit public API
+# geninit.api
#
-# To authors of builders:
-# these functions should be used over other functions in geninit such as
-# __add_file, which have no awareness of things such as $basedir or $kernver.
+# This file is part of geninit.
+#
+# declares intended public API calls for builders to use. These functions
+# should be used over other functions in geninit such as __add_file, which have
+# no awareness of things such as $basedir or $kernver.
#
-
-shopt -s extglob
add_dir() { # {{{
# add a directory (with parents)
View
@@ -1,8 +1,11 @@
-# This is the most important setting in this file. builders control the modules
-# and scripts added to the initramfs, and what happens at boot time. Order is
-# important, and it is recommended that you do not change the order in which
-# builders are added. Run 'mkinitcpio -H <builder>' for help on a given
-# builder.
+#!/bin/bash
+#
+# geninit.conf
+#
+# builders control the modules and hooks added to the initramfs, and what
+# happens at boot time. Order is important, and it is recommended that you do
+# not change the order in which builders are added. Run 'geninit -H <builder>'
+# for help on a given builder, and 'geninit -L' to list all available builders.
#
# Guidelines:
# 'base' is required unless you know what you're doing.
@@ -11,7 +14,7 @@
# 'filesystems' is required unless you add your fs modules in the `modules'
# array.
#
-# examples:
+# Examples:
# This setup requires that all modules are in the `modules' array.
# builders=(base)
#
@@ -31,7 +34,6 @@
builders=(base udev autodetect ata scsi filesystems)
-# MODULES
# modules are added in addition to any modules discovered by the builders
# defined above. Dependent modules will be discovered and added. At runtime,
# these specific modules are all loaded by modprobe prior to running any
@@ -42,8 +44,9 @@ builders=(base udev autodetect ata scsi filesystems)
modules=()
-# Extra files (scripts, binaries, config files) you may wish to add to the
-# image. This accepts one of two forms:
+# files (scripts, binaries, config files) you may wish to add to the image.
+#
+# This accepts one of two forms:
#
# /path/to/source
# OR
View
@@ -1,4 +1,9 @@
#!/bin/bash
+#
+# geninit.quirks
+#
+# This file declares quirks for modules which have non-explicit dependencies.
+#
declare -A modquirks
View
9 init.c
@@ -1,3 +1,12 @@
+/*
+ * init.c
+ *
+ * This file is part of geninit.
+ *
+ * PID 1 for early userspace.
+ *
+ */
+
#define _GNU_SOURCE
#include <ctype.h>
#include <dirent.h>

0 comments on commit e5a8d5b

Please sign in to comment.