| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: u-boot-rockchip.mk,v 1.6 2020/04/02 09:12:54 tnn Exp $ | | 1 | # $NetBSD: u-boot-rockchip.mk,v 1.7 2020/05/19 20:02:51 rillig Exp $ |
2 | # | | 2 | # |
3 | # should be used by sysutils/u-boot-rock64/Makefile | | 3 | # should be used by sysutils/u-boot-rock64/Makefile |
4 | # used by sysutils/u-boot-rockpro64/Makefile | | 4 | # used by sysutils/u-boot-rockpro64/Makefile |
5 | # used by sysutils/u-boot-pinebook-pro/Makefile | | 5 | # used by sysutils/u-boot-pinebook-pro/Makefile |
6 | | | 6 | |
7 | # Common makefile fragment for rockchip based u-boot targets. | | 7 | # Common makefile fragment for rockchip based u-boot targets. |
8 | # | | 8 | # |
9 | # Set these variables: | | 9 | # Set these variables: |
10 | # | | 10 | # |
11 | # U_BOOT_IMAGE_TYPE ("rk3399", "rk3328") | | 11 | # U_BOOT_IMAGE_TYPE ("rk3399", "rk3328") |
12 | # | | 12 | # |
13 | | | 13 | |
14 | UBOOT_VERSION?= 2020.01-rc5 | | 14 | UBOOT_VERSION?= 2020.01-rc5 |
| @@ -21,26 +21,21 @@ MAKE_ENV+= BL31=${PREFIX}/share/arm-tru | | | @@ -21,26 +21,21 @@ MAKE_ENV+= BL31=${PREFIX}/share/arm-tru |
21 | | | 21 | |
22 | post-build: | | 22 | post-build: |
23 | # wrap everything up into a single file that can be written to an SD card | | 23 | # wrap everything up into a single file that can be written to an SD card |
24 | cp ${WRKSRC}/idbloader.img ${WRKSRC}/rksd_loader.img | | 24 | cp ${WRKSRC}/idbloader.img ${WRKSRC}/rksd_loader.img |
25 | dd if=${WRKSRC}/u-boot.itb seek=448 conv=notrunc of=${WRKSRC}/rksd_loader.img | | 25 | dd if=${WRKSRC}/u-boot.itb seek=448 conv=notrunc of=${WRKSRC}/rksd_loader.img |
26 | # build SPI NOR flash image. See dev-ayufan/build.mk. | | 26 | # build SPI NOR flash image. See dev-ayufan/build.mk. |
27 | set -e; b=0; while [ "$$b" != 128 ]; do \ | | 27 | set -e; b=0; while [ "$$b" != 128 ]; do \ |
28 | dd bs=2k count=1; \ | | 28 | dd bs=2k count=1; \ |
29 | dd if=/dev/zero bs=2k count=1; \ | | 29 | dd if=/dev/zero bs=2k count=1; \ |
30 | b=$$(expr $$b + 1); \ | | 30 | b=$$(expr $$b + 1); \ |
31 | done < ${WRKSRC}/idbloader.img > ${WRKSRC}/rkspi_loader.img 2> /dev/null | | 31 | done < ${WRKSRC}/idbloader.img > ${WRKSRC}/rkspi_loader.img 2> /dev/null |
32 | dd if=${WRKSRC}/u-boot.itb seek=1024 conv=notrunc of=${WRKSRC}/rkspi_loader.img | | 32 | dd if=${WRKSRC}/u-boot.itb seek=1024 conv=notrunc of=${WRKSRC}/rkspi_loader.img |
33 | | | 33 | |
34 | SUBST_CLASSES+= makefitpath | | | |
35 | SUBST_STAGE.makefitpath= pre-configure | | | |
36 | SUBST_FILES.makefitpath= arch/arm/mach-rockchip/make_fit_atf.py | | | |
37 | SUBST_SED.makefitpath= -e "s| python3| python|g" | | | |
38 | | | | |
39 | PYTHON_VERSIONS_ACCEPTED+= 37 38 | | 34 | PYTHON_VERSIONS_ACCEPTED+= 37 38 |
40 | REPLACE_INTERPRETER+= python3 | | 35 | REPLACE_INTERPRETER+= python3 |
41 | REPLACE.python3.old= python3 | | 36 | REPLACE.python3.old= python3 |
42 | REPLACE.python3.new= ${PYTHON3BIN} | | 37 | REPLACE.python3.new= ${PYTHON3BIN} |
43 | REPLACE_FILES.python2= arch/arm/mach-rockchip/make_fit_atf.py | | 38 | REPLACE_FILES.python2= arch/arm/mach-rockchip/make_fit_atf.py |
44 | | | 39 | |
45 | .include "../../sysutils/arm-trusted-firmware-${U_BOOT_IMAGE_TYPE}/buildlink3.mk" | | 40 | .include "../../sysutils/arm-trusted-firmware-${U_BOOT_IMAGE_TYPE}/buildlink3.mk" |
46 | .include "../../sysutils/u-boot/u-boot-arm64.mk" | | 41 | .include "../../sysutils/u-boot/u-boot-arm64.mk" |