diff --git a/meta/classes/patch.bbclass b/meta/classes/patch.bbclass
index ac6c1ce..9f99e38 100644
--- a/meta/classes/patch.bbclass
+++ b/meta/classes/patch.bbclass
@@ -18,6 +18,7 @@ python patch_do_patch() {
 		"patch": oe.patch.PatchTree,
 		"quilt": oe.patch.QuiltTree,
 		"git": oe.patch.GitApplyTree,
+		"gitam": oe.patch.GitAmTree,
 	}
 
 	cls = patchsetmap[d.getVar('PATCHTOOL', 1) or 'quilt']
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index f4ccb3e..06965ba 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -176,6 +176,20 @@ class GitApplyTree(PatchTree):
 
         return runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
 
+class GitAmTree(PatchTree):
+    def __init__(self, dir, d):
+        PatchTree.__init__(self, dir, d)
+
+    def _applypatch(self, patch, force = False, reverse = False, run = True):
+        shellcmd = ["git", "am"]
+
+        shellcmd.append(patch['file'])
+
+        if not run:
+            return "sh" + "-c" + " ".join(shellcmd)
+
+        return runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
+
 
 class QuiltTree(PatchSet):
     def _runcmd(self, args, run = True):
