• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/docs/manual/writing-rules.txt
Julien Viard de GalbertJulien Viard de Galbert committed 5284dcf7de717 May 2015
Raw file
Source viewDiff to previous
 
1
// -*- mode:doc; -*-
2
// vim: set syntax=asciidoc:
3
​
4
== Coding style
5
​
6
Overall, these coding style rules are here to help you to add new files in
7
Buildroot or refactor existing ones.
8
​
9
If you slightly modify some existing file, the important thing is
10
to keep the consistency of the whole file, so you can:
11
​
12
* either follow the potentially deprecated coding style used in this
13
file,
14
​
15
* or entirely rework it in order to make it comply with these rules.
16
​
17
[[writing-rules-config-in]]
18
​
19
=== +Config.in+ file
20
​
21
+Config.in+ files contain entries for almost anything configurable in
22
Buildroot.
23
​
24
An entry has the following pattern:
25
​
26
---------------------
27
config BR2_PACKAGE_LIBFOO
28
    bool "libfoo"
29
    depends on BR2_PACKAGE_LIBBAZ
30
    select BR2_PACKAGE_LIBBAR
31
    help
32
      This is a comment that explains what libfoo is.
33
​
34
      http://foosoftware.org/libfoo/
35
---------------------
36
​
37
* The +bool+, +depends on+, +select+ and +help+ lines are indented
38
  with one tab.
39
​
40
* The help text itself should be indented with one tab and two
41
  spaces.
42
​
43
* The help text should be wrapped to fit 72 columns.
44
​
45
The +Config.in+ files are the input for the configuration tool
46
used in Buildroot, which is the regular _Kconfig_. For further
47
details about the _Kconfig_ language, refer to
48
http://kernel.org/doc/Documentation/kbuild/kconfig-language.txt[].
49
​
50
[[writing-rules-mk]]
51
​
52
=== The +.mk+ file
53
​
54
* Header: The file starts with a header. It contains the module name,
55
preferably in lowercase, enclosed between separators made of 80 hashes. A
56
blank line is mandatory after the header:
57
+
58
---------------------
59
################################################################################
60
#
61
# libfoo
62
#
63
################################################################################
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.