80c37c7b36
This does the following: 1. Fetches mkimage_imx8 (same used with imx9) source code 2. Fetches the ELE / AHAB binary 3. Extracts the ELE / AHAB binary 4. Compiles the mkimage with hostcc 5. Utilizes the mkimage tool to create a bootable SD image, combining the ELE / AHAB image with the NuttX bootloader 6. dd is used to prepend empty space in place of BL31 7. Outputs sdimage.img which is a bootable binary 8. Removes all binaries, sources code images that have been downloaded Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
48 lines
1.6 KiB
Makefile
48 lines
1.6 KiB
Makefile
############################################################################
|
|
# tools/imx9/Makefile.host
|
|
#
|
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
# contributor license agreements. See the NOTICE file distributed with
|
|
# this work for additional information regarding copyright ownership. The
|
|
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
# "License"); you may not use this file except in compliance with the
|
|
# License. You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
#
|
|
############################################################################
|
|
|
|
-include $(TOPDIR)/Make.defs
|
|
all: mkimage_imx9
|
|
default: mkimage_imx9
|
|
.PHONY: clean
|
|
|
|
# Add CFLAGS=-g on the make command line to build debug versions
|
|
|
|
CFLAGS = -g -O2 -Wall -std=c99 -static
|
|
|
|
# mkimage_imx9 - combine and sign a bootloader image for flashing
|
|
|
|
mkimage_imx9: imx8qxb0.c mkimage_imx8.c
|
|
@gcc $(CFLAGS) -o mkimage_imx9 imx8qxb0.c mkimage_imx8.c
|
|
|
|
clean:
|
|
ifneq ($(CONFIG_WINDOWS_NATIVE),y)
|
|
$(Q) rm -rf *.dSYM
|
|
endif
|
|
$(call DELFILE, mkimage_imx9)
|
|
$(call DELFILE, mkimage_imx9.exe)
|
|
$(call DELFILE, mkimage_imx8.c)
|
|
$(call DELFILE, imx8qxb0.c)
|
|
$(call DELFILE, mkimage_common.h)
|
|
$(call DELFILE, build_info.h)
|
|
$(call DELFILE, firmware-ele-imx-0.1.1.bin)
|
|
$(call DELDIR, firmware-ele-imx-0.1.1)
|
|
$(call CLEAN)
|