From 91c96027f0ace228753e86aeec1ac6c611d5058d Mon Sep 17 00:00:00 2001 From: Stefan Junker Date: Tue, 3 Nov 2015 00:54:53 +0100 Subject: [PATCH] uboot: support CompuLab Utilite Pro --- pkgs/misc/uboot/default.nix | 14 ++++++++++++++ .../uboot/u-boot-enable-distro-defaults-mx6.patch | 13 +++++++++++++ pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 pkgs/misc/uboot/u-boot-enable-distro-defaults-mx6.patch diff --git a/pkgs/misc/uboot/default.nix b/pkgs/misc/uboot/default.nix index 17cad9940ad7c..6c9a294cc4b7c 100644 --- a/pkgs/misc/uboot/default.nix +++ b/pkgs/misc/uboot/default.nix @@ -86,4 +86,18 @@ in rec { filesToInstall = ["u-boot"]; patches = [ ./vexpress-Use-config_distro_bootcmd.patch ]; }; + + # Non-upstream U-Boots: + ubootUtilitePro = common rec { + defconfig = "cm_fx6_config"; + targetPlatforms = ["armv7l-linux"]; + filesToInstall = ["cm-fx6-firmware"]; + patches = [ ./u-boot-enable-distro-defaults-mx6.patch ]; + + preInstall = '' + dd if=/dev/zero count=500 bs=1K | tr '\000' '\377' > cm-fx6-firmware + dd if=SPL of=cm-fx6-firmware bs=1K seek=1 conv=notrunc + dd if=u-boot.img of=cm-fx6-firmware bs=1K seek=64 conv=notrunc + ''; + }; } diff --git a/pkgs/misc/uboot/u-boot-enable-distro-defaults-mx6.patch b/pkgs/misc/uboot/u-boot-enable-distro-defaults-mx6.patch new file mode 100644 index 0000000000000..79aa143f8d346 --- /dev/null +++ b/pkgs/misc/uboot/u-boot-enable-distro-defaults-mx6.patch @@ -0,0 +1,13 @@ +diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h +index 12734a1..a5236fe 100644 +--- a/include/configs/cm_fx6.h ++++ b/include/configs/cm_fx6.h +@@ -13,6 +13,8 @@ + + #include "mx6_common.h" + ++#include ++ + /* Machine config */ + #define CONFIG_SYS_LITTLE_ENDIAN + #define CONFIG_MACH_TYPE 4273 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 780077e4b8e14..0ba55ab21eb42 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10365,9 +10365,9 @@ let ubootPcduino3Nano ubootRaspberryPi ubootVersatileExpressCA9 + ubootUtilitePro ; - # Non-upstream U-Boots: ubootSheevaplug = callPackage ../misc/uboot/sheevaplug.nix { }; ubootNanonote = callPackage ../misc/uboot/nanonote.nix { };