summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorthorpej <thorpej@pkgsrc.org>2020-06-20 22:29:12 +0000
committerthorpej <thorpej@pkgsrc.org>2020-06-20 22:29:12 +0000
commit4dca9973a23267cf4ab5c344f8517f423afc04fa (patch)
treeaa636832006ccb55d93f19e4289a921c74a3437b /sysutils
parentb9271ee139b17c8fd49a43501d6e624a1154634a (diff)
downloadpkgsrc-4dca9973a23267cf4ab5c344f8517f423afc04fa.tar.gz
U-boot package for the NVIDIA Jetson Nano.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/u-boot-jetson-nano/DESCR5
-rw-r--r--sysutils/u-boot-jetson-nano/Makefile20
-rw-r--r--sysutils/u-boot-jetson-nano/PLIST3
-rw-r--r--sysutils/u-boot-jetson-nano/distinfo7
-rw-r--r--sysutils/u-boot-jetson-nano/patches/patch-include_image.h37
5 files changed, 72 insertions, 0 deletions
diff --git a/sysutils/u-boot-jetson-nano/DESCR b/sysutils/u-boot-jetson-nano/DESCR
new file mode 100644
index 00000000000..223a2dd4654
--- /dev/null
+++ b/sysutils/u-boot-jetson-nano/DESCR
@@ -0,0 +1,5 @@
+U-Boot is a bootloader for embedded boards based on PowerPC, ARM, MIPS and
+several other processors, which can be installed in a boot ROM and used to
+initialize and test the hardware or to download and run application code.
+
+This package provides U-Boot for the NVIDIA Jetson Nano.
diff --git a/sysutils/u-boot-jetson-nano/Makefile b/sysutils/u-boot-jetson-nano/Makefile
new file mode 100644
index 00000000000..53fc056d95d
--- /dev/null
+++ b/sysutils/u-boot-jetson-nano/Makefile
@@ -0,0 +1,20 @@
+# $NetBSD: Makefile,v 1.1 2020/06/20 22:29:12 thorpej Exp $
+
+UBOOT_TARGET= jetson-nano
+UBOOT_CONFIG= p3450-0000_defconfig
+UBOOT_BIN= u-boot u-boot-dtb.bin
+
+UBOOT_VERSION= 2020.04
+
+DISTINFO_FILE= ${.CURDIR}/../../sysutils/u-boot-jetson-nano/distinfo
+PATCHDIR= ${.CURDIR}/../../sysutils/u-boot-jetson-nano/patches
+DISTFILES= ${DEFAULT_DISTFILES}
+
+# This could be moved to u-boot.mk as long as we don't have support for
+# any imx8 boards.
+CHECK_PORTABILITY_SKIP+= tools/imx8m_image.sh
+
+# Switch to EL1 before booting kernel (required for 32-bit support)
+PKG_DEFAULT_OPTIONS+= el1
+
+.include "../../sysutils/u-boot/u-boot-arm64.mk"
diff --git a/sysutils/u-boot-jetson-nano/PLIST b/sysutils/u-boot-jetson-nano/PLIST
new file mode 100644
index 00000000000..d5493c5f466
--- /dev/null
+++ b/sysutils/u-boot-jetson-nano/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1 2020/06/20 22:29:12 thorpej Exp $
+share/u-boot/jetson-nano/u-boot
+share/u-boot/jetson-nano/u-boot-dtb.bin
diff --git a/sysutils/u-boot-jetson-nano/distinfo b/sysutils/u-boot-jetson-nano/distinfo
new file mode 100644
index 00000000000..c900d6db12e
--- /dev/null
+++ b/sysutils/u-boot-jetson-nano/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2020/06/20 22:29:12 thorpej Exp $
+
+SHA1 (u-boot-2020.04.tar.bz2) = 0821ce2dac9bbd9ec5883779ddad78b8610366e3
+RMD160 (u-boot-2020.04.tar.bz2) = 8f13836ea4d9d7235aa83f6b713b76e047ce27f1
+SHA512 (u-boot-2020.04.tar.bz2) = e04fe54883149123730605b084324ac0d1d72ce6913467bbe587a5a2675bcf7bb393405d9a446dc0c64ba42abc1e862ae5a132e9e51aa7390e2e9fce045af8d8
+Size (u-boot-2020.04.tar.bz2) = 15065656 bytes
+SHA1 (patch-include_image.h) = 46f9efc0b9bbeea407e18f2b7e02b265dc0b58e1
diff --git a/sysutils/u-boot-jetson-nano/patches/patch-include_image.h b/sysutils/u-boot-jetson-nano/patches/patch-include_image.h
new file mode 100644
index 00000000000..db11e064e5b
--- /dev/null
+++ b/sysutils/u-boot-jetson-nano/patches/patch-include_image.h
@@ -0,0 +1,37 @@
+$NetBSD: patch-include_image.h,v 1.1 2020/06/20 22:29:12 thorpej Exp $
+
+Ensure the correct byte order macros are used when image.h is included
+in a host tool.
+
+--- include/image.h.orig 2020-06-20 13:48:00.000000000 +0000
++++ include/image.h 2020-06-20 13:51:12.000000000 +0000
+@@ -16,7 +16,6 @@
+ #define __IMAGE_H__
+
+ #include "compiler.h"
+-#include <asm/byteorder.h>
+ #include <stdbool.h>
+
+ /* Define this to avoid #ifdefs later on */
+@@ -26,6 +25,13 @@ struct fdt_region;
+ #ifdef USE_HOSTCC
+ #include <sys/types.h>
+
++#include <endian.h>
++#if _BYTE_ORDER == _BIG_ENDIAN
++# include <linux/byteorder/big_endian.h>
++#else
++# include <linux/byteorder/little_endian.h>
++#endif
++
+ /* new uImage format support enabled on host */
+ #define IMAGE_ENABLE_FIT 1
+ #define IMAGE_ENABLE_OF_LIBFDT 1
+@@ -40,6 +46,7 @@ struct fdt_region;
+
+ #else
+
++#include <asm/byteorder.h>
+ #include <lmb.h>
+ #include <asm/u-boot.h>
+ #include <command.h>