• Stars
    star
    473
  • Rank 89,743 (Top 2 %)
  • Language
    C
  • License
    Other
  • Created over 15 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

How do I submit patches to Android Common Kernels

  1. BEST: Make all of your changes to upstream Linux. If appropriate, backport to the stable releases. These patches will be merged automatically in the corresponding common kernels. If the patch is already in upstream Linux, post a backport of the patch that conforms to the patch requirements below.

    • Do not send patches upstream that contain only symbol exports. To be considered for upstream Linux, additions of EXPORT_SYMBOL_GPL() require an in-tree modular driver that uses the symbol -- so include the new driver or changes to an existing driver in the same patchset as the export.
    • When sending patches upstream, the commit message must contain a clear case for why the patch is needed and beneficial to the community. Enabling out-of-tree drivers or functionality is not not a persuasive case.
  2. LESS GOOD: Develop your patches out-of-tree (from an upstream Linux point-of-view). Unless these are fixing an Android-specific bug, these are very unlikely to be accepted unless they have been coordinated with [email protected]. If you want to proceed, post a patch that conforms to the patch requirements below.

Common Kernel patch requirements

  • All patches must conform to the Linux kernel coding standards and pass scripts/checkpatch.pl
  • Patches shall not break gki_defconfig or allmodconfig builds for arm, arm64, x86, x86_64 architectures (see https://source.android.com/setup/build/building-kernels)
  • If the patch is not merged from an upstream branch, the subject must be tagged with the type of patch: UPSTREAM:, BACKPORT:, FROMGIT:, FROMLIST:, or ANDROID:.
  • All patches must have a Change-Id: tag (see https://gerrit-review.googlesource.com/Documentation/user-changeid.html)
  • If an Android bug has been assigned, there must be a Bug: tag.
  • All patches must have a Signed-off-by: tag by the author and the submitter

Additional requirements are listed below based on patch type

Requirements for backports from mainline Linux: UPSTREAM:, BACKPORT:

  • If the patch is a cherry-pick from Linux mainline with no changes at all
    • tag the patch subject with UPSTREAM:.
    • add upstream commit information with a (cherry picked from commit ...) line
    • Example:
      • if the upstream commit message is
        important patch from upstream

        This is the detailed description of the important patch

        Signed-off-by: Fred Jones <[email protected]>
  • then Joe Smith would upload the patch for the common kernel as
        UPSTREAM: important patch from upstream

        This is the detailed description of the important patch

        Signed-off-by: Fred Jones <[email protected]>

        Bug: 135791357
        Change-Id: I4caaaa566ea080fa148c5e768bb1a0b6f7201c01
        (cherry picked from commit c31e73121f4c1ec41143423ac6ce3ce6dafdcec1)
        Signed-off-by: Joe Smith <[email protected]>
  • If the patch requires any changes from the upstream version, tag the patch with BACKPORT: instead of UPSTREAM:.
    • use the same tags as UPSTREAM:
    • add comments about the changes under the (cherry picked from commit ...) line
    • Example:
        BACKPORT: important patch from upstream

        This is the detailed description of the important patch

        Signed-off-by: Fred Jones <[email protected]>

        Bug: 135791357
        Change-Id: I4caaaa566ea080fa148c5e768bb1a0b6f7201c01
        (cherry picked from commit c31e73121f4c1ec41143423ac6ce3ce6dafdcec1)
        [joe: Resolved minor conflict in drivers/foo/bar.c ]
        Signed-off-by: Joe Smith <[email protected]>

Requirements for other backports: FROMGIT:, FROMLIST:,

  • If the patch has been merged into an upstream maintainer tree, but has not yet been merged into Linux mainline
    • tag the patch subject with FROMGIT:
    • add info on where the patch came from as (cherry picked from commit <sha1> <repo> <branch>). This must be a stable maintainer branch (not rebased, so don't use linux-next for example).
    • if changes were required, use BACKPORT: FROMGIT:
    • Example:
      • if the commit message in the maintainer tree is
        important patch from upstream

        This is the detailed description of the important patch

        Signed-off-by: Fred Jones <[email protected]>
  • then Joe Smith would upload the patch for the common kernel as
        FROMGIT: important patch from upstream

        This is the detailed description of the important patch

        Signed-off-by: Fred Jones <[email protected]>

        Bug: 135791357
        (cherry picked from commit 878a2fd9de10b03d11d2f622250285c7e63deace
         https://git.kernel.org/pub/scm/linux/kernel/git/foo/bar.git test-branch)
        Change-Id: I4caaaa566ea080fa148c5e768bb1a0b6f7201c01
        Signed-off-by: Joe Smith <[email protected]>
  • If the patch has been submitted to LKML, but not accepted into any maintainer tree
    • tag the patch subject with FROMLIST:
    • add a Link: tag with a link to the submittal on lore.kernel.org
    • add a Bug: tag with the Android bug (required for patches not accepted into a maintainer tree)
    • if changes were required, use BACKPORT: FROMLIST:
    • Example:
        FROMLIST: important patch from upstream

        This is the detailed description of the important patch

        Signed-off-by: Fred Jones <[email protected]>

        Bug: 135791357
        Link: https://lore.kernel.org/lkml/[email protected]/
        Change-Id: I4caaaa566ea080fa148c5e768bb1a0b6f7201c01
        Signed-off-by: Joe Smith <[email protected]>

Requirements for Android-specific patches: ANDROID:

  • If the patch is fixing a bug to Android-specific code
    • tag the patch subject with ANDROID:
    • add a Fixes: tag that cites the patch with the bug
    • Example:
        ANDROID: fix android-specific bug in foobar.c

        This is the detailed description of the important fix

        Fixes: 1234abcd2468 ("foobar: add cool feature")
        Change-Id: I4caaaa566ea080fa148c5e768bb1a0b6f7201c01
        Signed-off-by: Joe Smith <[email protected]>
  • If the patch is a new feature
    • tag the patch subject with ANDROID:
    • add a Bug: tag with the Android bug (required for android-specific features)

More Repositories

1

platform_frameworks_base

Java
10,545
star
2

platform_development

Python
2,699
star
3

platform_frameworks_support

Java
1,658
star
4

platform_system_core

C++
1,179
star
5

platform_bionic

Objective-C
583
star
6

platform_packages_apps_settings

Java
489
star
7

platform_dalvik

Java
445
star
8

platform_build

Makefile
418
star
9

platform_packages_apps_music

Java
291
star
10

platform_packages_apps_contacts

Java
279
star
11

platform_packages_apps_calendar

Java
268
star
12

platform_manifest

233
star
13

platform_packages_apps_mms

Java
212
star
14

tools_repo

Python
193
star
15

platform_packages_apps_browser

Java
192
star
16

platform_packages_apps_camera

Java
182
star
17

platform_packages_apps_calculator

Java
167
star
18

platform_packages_apps_email

Java
134
star
19

platform_packages_apps_alarmclock

Java
127
star
20

platform_packages_apps_launcher

Java
126
star
21

kernel_msm

125
star
22

platform_packages_apps_packageinstaller

Java
120
star
23

platform_external_qemu

C
107
star
24

platform_external_protobuf

C++
103
star
25

platform_packages_apps_phone

97
star
26

platform_hardware_libhardware

C++
91
star
27

platform_external_webkit

C++
78
star
28

platform_packages_providers_downloadprovider

Java
71
star
29

platform_packages_providers_contactsprovider

Java
69
star
30

platform_external_opencore

C++
67
star
31

platform_external_openssl

57
star
32

platform_external_skia

C++
56
star
33

platform_hardware_ril

C++
56
star
34

platform_packages_apps_soundrecorder

Java
56
star
35

platform_packages_providers_telephonyprovider

Java
50
star
36

platform_frameworks_policies_base

Java
50
star
37

platform_prebuilt

C
49
star
38

platform_packages_providers_mediaprovider

Java
48
star
39

platform_packages_apps_stk

Java
44
star
40

platform_system_bluetooth

C
40
star
41

platform_external_wpa_supplicant

C
39
star
42

platform_external_apache-http

Java
39
star
43

platform_packages_apps_htmlviewer

Java
38
star
44

platform_external_libpcap

C
38
star
45

platform_external_sqlite

C++
36
star
46

platform_packages_providers_calendarprovider

Java
36
star
47

platform_external_freetype

C
35
star
48

platform_external_libxml2

C
34
star
49

platform_external_iptables

C
31
star
50

platform_external_sonivox

C
28
star
51

platform_packages_apps_googlesearch

Java
27
star
52

platform_external_icu4c

C++
26
star
53

platform_packages_apps_im

Java
26
star
54

platform_external_zlib

C
24
star
55

platform_packages_apps_voicedialer

Java
24
star
56

platform_external_giflib

C
23
star
57

platform_external_bluez

C
22
star
58

platform_external_netcat

C
22
star
59

platform_frameworks_opt_com.google.android

Makefile
22
star
60

platform_external_strace

C
22
star
61

platform_external_dhcpcd

C
21
star
62

platform_external_expat

C
21
star
63

platform_external_libpng

C
20
star
64

platform_external_ppp

C
19
star
65

platform_external_tcpdump

C
19
star
66

platform_external_dbus

C
19
star
67

platform_packages_apps_sync

18
star
68

platform_external_jpeg

C
17
star
69

platform_external_elfutils

C
17
star
70

platform_external_jdiff

Java
16
star
71

platform_external_srec

Roff
16
star
72

platform_external_emma

Java
16
star
73

platform_external_oprofile

C
14
star
74

platform_external_netperf

C
14
star
75

platform_external_aes

C
14
star
76

platform_packages_apps_updater

14
star
77

platform_external_jhead

C
14
star
78

platform_external_dropbear

C
13
star
79

platform_external_fdlibm

C
13
star
80

platform_packages_providers_googlecontactsprovider

Makefile
13
star
81

platform_external_gdata

Java
13
star
82

platform_packages_providers_drmprovider

Java
13
star
83

platform_external_tagsoup

Java
13
star
84

platform_packages_providers_improvider

Java
12
star
85

platform_system_wlan_ti

C
12
star
86

aosp-mirror.github.io

HTML
12
star
87

platform_external_ping

12
star
88

platform_external_googleclient

Makefile
12
star
89

platform_external_clearsilver

C
12
star
90

platform_external_esd

C
11
star
91

platform_external_neven

C
11
star
92

platform_external_tinyxml

C++
11
star
93

platform_external_yaffs2

C
11
star
94

platform_external_libffi

C
10
star
95

platform_external_tremor

C
9
star
96

platform_external_elfcopy

C
9
star
97

platform_external_safe-iop

C
9
star
98

.github

A repository for GitHub-specific configurations.
8
star
99

.allstar

2
star