summaryrefslogtreecommitdiffstats
path: root/src/commonlib/Makefile.inc
diff options
context:
space:
mode:
authorWerner Zeh <werner.zeh@siemens.com>2019-02-19 13:34:12 +0100
committerPatrick Georgi <pgeorgi@google.com>2019-02-26 11:14:41 +0000
commitbd660e23382a74b399fa25ca01b9a9cd9c7683e9 (patch)
tree7caf9845c770b379dba2cab680c214bf38f9bbea /src/commonlib/Makefile.inc
parent38b6ccfed9d0a9ff0605f2def02033cc9523ee94 (diff)
downloadcoreboot-bd660e23382a74b399fa25ca01b9a9cd9c7683e9.tar.gz
coreboot-bd660e23382a74b399fa25ca01b9a9cd9c7683e9.tar.bz2
coreboot-bd660e23382a74b399fa25ca01b9a9cd9c7683e9.zip
commonlib: Add Bubble sort algorithm
Add an implementation for Bubble sort. For now, only integers can be sorted in an ascending or descending order. It can be later simply extended to cover other datasets like strings if needed. The reasons for choosing bubble sort are: * it is a simple algorithm * bubble sort is stable, i.e. it does not exchange entries which are not needed to be sorted as they are already in order Change-Id: I2c5e0b5685a907243b58ebe6682078272d316bf6 Signed-off-by: Werner Zeh <werner.zeh@siemens.com> Reviewed-on: https://review.coreboot.org/c/31544 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/commonlib/Makefile.inc')
-rw-r--r--src/commonlib/Makefile.inc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/commonlib/Makefile.inc b/src/commonlib/Makefile.inc
index 4d89c48e5a35..b6e8913cd101 100644
--- a/src/commonlib/Makefile.inc
+++ b/src/commonlib/Makefile.inc
@@ -36,3 +36,5 @@ verstage-y += lz4_wrapper.c
romstage-y += lz4_wrapper.c
ramstage-y += lz4_wrapper.c
postcar-y += lz4_wrapper.c
+
+ramstage-y += sort.c