forked from apache/nuttx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools/imx9: prepare bootable bootloader image
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 <[email protected]>
- Loading branch information
Showing
4 changed files
with
118 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,3 +62,6 @@ uImage | |
.DS_Store | ||
tools/gdb/__pycache__ | ||
/build | ||
.ccls-cache | ||
compile_commands.json | ||
imx9-sdimage.img |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
############################################################################ | ||
# 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) |