Commit 7c074c2bb0cc9282ac4f6286e4f9c3071632568b

Authored by faqiang.zhu
Committed by Ye Li
1 parent 60bb4d5a27

MA-14916-1 adapt to the directory change of libavb

libavb is now under the directory of lib/, not lib/avb/ as before, to
adapt to this change, some modifications are made:
1. header file inclusion change, including parameter of -I option in
   Makefile
2. remove fsl_avb_sysdeps_uboot.c as the functions have been defined in
   avb_sysdeps_posix.c.

Change-Id: I4216e3ddb4e3e810783e4f46b953eda510c2627b
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry pick from 58010b99560eea2027dd39909eb5b35404e6030e)

Showing 4 changed files with 2 additions and 73 deletions Side-by-side Diff

drivers/fastboot/fb_fsl/Makefile
... ... @@ -4,7 +4,7 @@
4 4 # SPDX-License-Identifier: GPL-2.0+
5 5 #
6 6  
7   -ccflags-y += -I./lib/avb
  7 +ccflags-y += -I./lib
8 8  
9 9 ifndef CONFIG_SPL_BUILD
10 10 obj-y += fb_fsl_dev.o fb_fsl_boot.o fb_fsl_command.o fb_fsl_common.o fb_fsl_getvar.o fb_fsl_partitions.o
1   -subdir-ccflags-y += -I./lib/avb \
  1 +subdir-ccflags-y += -I./lib \
2 2 -D_FILE_OFFSET_BITS=64 \
3 3 -D_POSIX_C_SOURCE=199309L \
4 4 -Wa,--noexecstack \
lib/avb/fsl/Makefile
1 1 ifndef CONFIG_SPL_BUILD
2 2 obj-y += fsl_avb.o
3 3 obj-y += fsl_bootctl.o
4   -obj-y += fsl_avb_sysdeps_uboot.o
5 4 endif
6 5  
7 6 obj-y += fsl_avbkey.o
lib/avb/fsl/fsl_avb_sysdeps_uboot.c
1   -/*
2   - * Copyright (C) 2016 The Android Open Source Project
3   - *
4   - * Permission is hereby granted, free of charge, to any person
5   - * obtaining a copy of this software and associated documentation
6   - * files (the "Software"), to deal in the Software without
7   - * restriction, including without limitation the rights to use, copy,
8   - * modify, merge, publish, distribute, sublicense, and/or sell copies
9   - * of the Software, and to permit persons to whom the Software is
10   - * furnished to do so, subject to the following conditions:
11   - *
12   - * The above copyright notice and this permission notice shall be
13   - * included in all copies or substantial portions of the Software.
14   - *
15   - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16   - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17   - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18   - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
19   - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20   - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21   - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22   - * SOFTWARE.
23   - */
24   -
25   -#include <common.h>
26   -#include <stdlib.h>
27   -#include <linux/string.h>
28   -
29   -#include "../libavb/libavb.h"
30   -
31   -int avb_memcmp(const void* src1, const void* src2, size_t n) {
32   - return memcmp(src1, src2, n);
33   -}
34   -
35   -void* avb_memcpy(void* dest, const void* src, size_t n) {
36   - return memcpy(dest, src, n);
37   -}
38   -
39   -void* avb_memset(void* dest, const int c, size_t n) {
40   - return memset(dest, c, n);
41   -}
42   -
43   -int avb_strcmp(const char* s1, const char* s2) { return strcmp(s1, s2); }
44   -
45   -size_t avb_strlen(const char* str) { return strlen(str); }
46   -
47   -void avb_abort(void) { panic("avb_abort!\n"); }
48   -
49   -void avb_print(const char* message) { printf("%s", message); }
50   -
51   -void avb_printv(const char* message, ...) {
52   - va_list ap;
53   - const char* m;
54   -
55   - va_start(ap, message);
56   - for (m = message; m != NULL; m = va_arg(ap, const char*)) {
57   - printf("%s", m);
58   - }
59   - va_end(ap);
60   -}
61   -
62   -void* avb_malloc_(size_t size) { return malloc(size); }
63   -
64   -void avb_free(void* ptr) { free(ptr); }
65   -
66   -uint32_t avb_div_by_10(uint64_t* dividend) {
67   - uint32_t rem = (uint32_t)(*dividend % 10);
68   - *dividend /= 10;
69   - return rem;
70   -}