1# Copyright (C) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED. 2# 3# This program is free software; you can redistribute it and/or 4# modify it under the terms of the GNU General Public License 5# as published by the Free Software Foundation; either version 2 6# of the License, or (at your option) any later version. 7# 8# This program is distributed in the hope that it will be useful, 9# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# GNU General Public License for more details. 12# 13# You should have received a copy of the GNU General Public License 14# along with this program; if not, write to the Free Software 15# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 16 17.PHONY:all 18#export MACH 19 20BIT_WIDTH:=$(shell getconf LONG_BIT) 21 22ifeq ($(BIT_WIDTH),64) 23MACH:=m64 24else 25MACH:=m32 26endif 27 28all: ddrinit rsa2048pem_gen rsa4096pem_gen 29ddrinit: 30 pushd ddr_init;make;./mkddrinit.sh u-boot-original.bin;popd 31 cp ./ddr_init/ddr_init_reg_info.bin ./ 32 33rsa2048pem_gen: ddrinit 34 ./rsa2048pem.sh 35 sh create_secure_boot.sh rsa2048pem_gen 36 37rsa4096pem_gen: ddrinit 38 ./rsa4096pem.sh 39 sh create_secure_boot.sh rsa4096pem_gen 40 41clean: 42 pushd ddr_init;make clean;popd 43 find . -name "*.bin" -exec rm -rf {} \; 44distclean:clean 45 rm rsa2048pem/* 46 rm rsa4096pem/* 47 rm -rf aes_otp_cfg.txt 48