• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2#
3# Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#     http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16# Description: Menuconfig entry
17#
18set -e
19CROOT=$(pwd)
20
21build_uboot_patch() {
22	if [ ! -d $CROOT/third_party/u-boot-v2019.07/u-boot-v2019.07/ ]; then
23		tar -zxf u-boot-v2019.07.tar.gz
24		cd u-boot-v2019.07
25		patch -p1 < ./../patch/CVE-2019-13103.patch
26		patch -p1 < ./../patch/CVE-2019-13104.patch
27		patch -p1 < ./../patch/CVE-2019-13105.patch
28		patch -p1 < ./../patch/CVE-2019-13106.patch
29		patch -p1 < ./../patch/CVE-2019-14192-14193-14199.patch
30		patch -p1 < ./../patch/CVE-2019-14194-14198.patch
31		patch -p1 < ./../patch/CVE-2019-14195.patch
32		patch -p1 < ./../patch/CVE-2019-14196.patch
33		patch -p1 < ./../patch/CVE-2019-14197-14200-14201-14202-14203-14204.patch
34		patch -p1 < ./../hisilicon_patch/hisilicon-u-boot-v2019.07.patch
35	fi
36}