Git Product home page Git Product logo

kirisakura_pantah's Introduction

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 script/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)

kirisakura_pantah's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

kirisakura_pantah's Issues

Proper support for battery idle mode

Currently trying to enable idle battery mode using ACC and getting inconsistent results.
Issuing here due to the strict kernel relationship

Device: Pixel 7, TQ1A.230205.002

Available chargers:

  1. Automatic
  2. battery/bd_trickle_cnt 0 1
  3. maxfg/offmode_charger 0 1
  4. dc/current_max 687500 0
  5. gcpm/constant_charge_current_max 4000000 0
  6. gcpm/current_max 3000000 0
  7. main-charger/current_max 3000000 0
  8. usb/current_max 3000000 0
  9. wireless/current_max 700000 0
  10. battery/constant_charge_voltage 4260000 voltage_now
  11. gcpm/constant_charge_voltage_max 4200000 voltage_now
  12. gcpm/voltage_max 4200000 voltage_now
  13. main-charger/voltage_max 4200000 voltage_now
  14. pca94xx-mains/voltage_max 4175000 voltage_now

While more than one charger seems to work + idle support, the device doesn't seem to respond reliably even when tests (acc -t ..) are positive more than twice

Notable behaviour:

  • Frequent replugs when hitting pause%
  • acc -i status causes replug and battery % to fluctuate
  • Charging doesn't exactly stop when plugged over the pause%
  • Amperage on idle is brought to +-10mA with some chargers (expected behaviour): some others don't
  • Idle mode is not detected by AccA

Steps to reproduce:

  1. Install ACC through magisk
  2. Install a terminal app such as Termux
  3. Install some root explorer app such as Total Commander
  4. Plug AC charger
  5. in the terminal, type
    su
    acc -t
  6. Check for working chargers (+ idle supported)
  7. Test again one working charger with acc -t (charger)

Example in my case: acc -t gcpm/constant_charge_current_max 4000000 0

  1. Assign the charger using acc -ss
  2. Using the root explorer edit /data/adb/vr25/acc-data/config.txt the line prioritizeBattIdleMode=true and save
  3. Back to the terminal, type acc and select start/restart daemon then select quit
  4. Type in your pause and resume percentages: example acc 75 70
  5. Observe behaviour

Expected:

  • charge to pause% then battery idle
  • amperage apps should report 0 or around -10mA
  • acc -i status should report Idle
  • acc -i status shouldn't cause the brief percentage fluctuation
  • no replugs (noticeable through sounds)

Perhaps this might come in handy:
https://github.com/xxmustafacooTR/android_kernel_samsung_universal9810/search?q=battery+idle&type=commits

Hoping for a positive response and a fix for everyone's longer battery lifespan
Have a great day

boot loop????

Pixel 7 only goes as far as the Google splash screen after flashing kernel

(Compilation error) Missing fw_sample.i

Hi, I'm trying to make a custom build of the kernel in hopes to add GUD.
Compiling a clean build first, I stumbled in this error:

  CC [M]  google-modules/uwb/kernel/drivers/net/ieee802154/dw3000_nfcc_coex_msg.o
../google-modules/wlan/bcmdhd/bcm4389/Kbuild:33: : ** out-of-tree Kbuild BCMDHD_ROOT=../google-modules/wlan/bcmdhd/bcm4389**
  CC [M]  google-modules/wlan/bcmdhd/bcm4389/dhd_pno.o
  CC [M]  google-modules/uwb/kernel/drivers/net/ieee802154/dw3000_nfcc_coex_mcps.o
  CC [M]  google-modules/uwb/kernel/net/mcps802154/fproc.o
  CC [M]  google-modules/uwb/kernel/drivers/net/ieee802154/dw3000_pctt_mcps.o
  CC [M]  google-modules/uwb/kernel/drivers/net/ieee802154/dw3000_calib.o
  CC [M]  google-modules/wlan/bcmdhd/bcm4389/dhd_common.o
  CHK     kernel/kheaders_data.tar.xz
  CC [M]  google-modules/wlan/bcmdhd/bcm4389/dhd_ip.o
../google-modules/touch/focaltech/ft3658/focaltech_flash.c:48:10: fatal error: 'include/firmware/fw_sample.i' file not found
#include FTS_UPGRADE_FW_FILE
         ^~~~~~~~~~~~~~~~~~~
../google-modules/touch/focaltech/ft3658/focaltech_config.h:322:50: note: expanded from macro 'FTS_UPGRADE_FW_FILE'
#define FTS_UPGRADE_FW_FILE                      "include/firmware/fw_sample.i"
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1  CC [M]  google-modules/uwb/kernel/drivers/net/ieee802154/dw3000_chip_c0.o
 error generated.
make[4]: *** [../scripts/Makefile.build:321: google-modules/touch/focaltech/ft3658/focaltech_flash.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [../scripts/Makefile.build:588: google-modules/touch/focaltech/ft3658] Error 2
make[2]: *** [../scripts/Makefile.build:588: google-modules/touch/focaltech/ft3658] Error 2
make[2]: *** Waiting for unfinished jobs....

I'm surely missing something

Could you provide steps/requirements to build?
What I've done so far:

Thank you

Can't compile kernel

Trying to compile the kernel gives this error.....

error: modpost: "pcie_sysmmu_set_use_iocc" [drivers/pci/controller/dwc/pcie-exynos-core.ko] undefined

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.