Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
125 additions
and
0 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
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,12 @@ | ||
# MNT Reform 2.0 - Nitrogen8M | ||
|
||
## Things working and tested: | ||
|
||
* [x] U-boot | ||
* [ ] Self-hosted Linux lernel | ||
* [x] NVME | ||
* [x] Ethernet | ||
* [x] HID | ||
* [ ] Sound | ||
* [ ] Display | ||
* [ ] SD installer image |
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,26 @@ | ||
{ config, lib, pkgs, ... }: | ||
|
||
{ | ||
|
||
boot = { | ||
kernelParams = [ "cma=512M" "console=ttymxc0,115200" "pci=nomsi" ]; | ||
loader = { | ||
generic-extlinux-compatible.enable = lib.mkDefault true; | ||
grub.enable = lib.mkDefault false; | ||
}; | ||
}; | ||
|
||
environment.systemPackages = with pkgs; [ brightnessctl ]; | ||
|
||
hardware.pulseaudio.daemon.config.default-sample-rate = lib.mkDefault "48000"; | ||
|
||
nixpkgs = { | ||
system = "aarch64-linux"; | ||
overlays = [ | ||
(final: super: | ||
let inherit (final) callPackage; | ||
in { ubootReformImx8mq = callPackage ./u-boot { }; }) | ||
]; | ||
}; | ||
|
||
} |
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,16 @@ | ||
{ buildUBoot, fetchgit }: | ||
|
||
buildUBoot rec { | ||
pname = "uboot-reform2-imx8mq"; | ||
version = "2020-06-01"; | ||
src = fetchgit { | ||
url = "https://source.mntmn.com/MNT/reform-boundary-uboot.git"; | ||
rev = version; | ||
sha256 = "0ychnwhisjqm0gzyz0nv9xynl9g114xmxpwz4vm0l5w6sc60jshw"; | ||
}; | ||
defconfig = "nitrogen8m_som_4g_defconfig"; | ||
extraMeta.platforms = [ "aarch64-linux" ]; | ||
filesToInstall = [ "flash.bin" ]; | ||
patches = [ ./shell-syntax.patch ./env_vars.patch ]; | ||
makeFlags = filesToInstall; | ||
} |
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,57 @@ | ||
commit 32ba0e0bf12827a67959f435e457fb4594a6708f | ||
Author: Emery Hemingway <ehmry@posteo.net> | ||
Date: Mon Jul 27 10:18:38 2020 +0200 | ||
|
||
reform: set envvars for booting NixOS | ||
|
||
diff --git a/board/boundary/nitrogen8m_som/nitrogen8m_som.c b/board/boundary/nitrogen8m_som/nitrogen8m_som.c | ||
index d4d866001d..d1fac5934f 100644 | ||
--- a/board/boundary/nitrogen8m_som/nitrogen8m_som.c | ||
+++ b/board/boundary/nitrogen8m_som/nitrogen8m_som.c | ||
@@ -322,17 +322,13 @@ void init_usb_clk(int usbno); | ||
|
||
static void set_env_vars(void) | ||
{ | ||
- printf("set_env_vars()"); | ||
- env_set("board", "MNT Reform 2.0"); // "nitrogen8m_som"); | ||
+#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG | ||
+ if (!env_get("board")) | ||
+ env_set("board", "nitrogen8m_som"); | ||
env_set("soc", "imx8mq"); | ||
env_set("imx_cpu", get_imx_type((get_cpu_rev() & 0xFF000) >> 12)); | ||
env_set("uboot_defconfig", CONFIG_DEFCONFIG); | ||
- | ||
- // MNT Reform 2 | ||
- env_set("fdt_addr", "0x50000000"); | ||
- env_set("bootargs", "noinitrd root=/dev/mmcblk1p1 rootwait rw console=ttymxc0,115200 console=tty1 cma=512M no_console_suspend pci=nomsi"); | ||
- env_set("bootcmd", "ext4load mmc 1 ${loadaddr} /Image; ext4load mmc 1 ${fdt_addr} /imx8mq-mnt-reform2.dtb; booti ${loadaddr} - ${fdt_addr}"); | ||
- env_set("bootdelay", "1"); | ||
+#endif | ||
} | ||
|
||
void board_set_default_env(void) | ||
diff --git a/include/configs/nitrogen8m_som.h b/include/configs/nitrogen8m_som.h | ||
index 3ada3900db..548e7cd71c 100644 | ||
--- a/include/configs/nitrogen8m_som.h | ||
+++ b/include/configs/nitrogen8m_som.h | ||
@@ -208,7 +208,7 @@ | ||
#define SYS_AUXCORE_BOOTDATA_DDR 0x80000000 | ||
#define SYS_AUXCORE_BOOTDATA_TCM 0x007E0000 | ||
|
||
-/*#define CONFIG_EXTRA_ENV_SETTINGS \ | ||
+#define CONFIG_EXTRA_ENV_SETTINGS \ | ||
"console=" BD_CONSOLE "\0" \ | ||
"env_dev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ | ||
"env_part=" __stringify(CONFIG_SYS_MMC_ENV_PART) "\0" \ | ||
@@ -247,7 +247,10 @@ | ||
"setenv ipaddr 10.0.0.2; " \ | ||
"setenv netmask 255.255.255.0; " \ | ||
"setenv serverip 10.0.0.1;\0" \ | ||
- BOOTENV*/ | ||
+ BOOTENV \ | ||
+ "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ | ||
+ "ramdisk_addr_r=0x42800000\0" \ | ||
+ "fdt_addr_r=0x43000000\0" | ||
|
||
/* | ||
* PCI express |
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,13 @@ | ||
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib | ||
index f8c3fff1d1..bb68e119e2 100644 | ||
--- a/scripts/Makefile.lib | ||
+++ b/scripts/Makefile.lib | ||
@@ -299,7 +299,7 @@ quiet_cmd_dtc = DTC $@ | ||
# Modified for U-Boot | ||
# Bring in any U-Boot-specific include at the end of the file | ||
cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ | ||
- (cat $<; $(if $(u_boot_dtsi),echo '\#include "$(u_boot_dtsi)"')) > $(pre-tmp); \ | ||
+ (cat $<; $(if $(u_boot_dtsi),echo '#include "$(u_boot_dtsi)"')) > $(pre-tmp); \ | ||
$(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $(pre-tmp) ; \ | ||
$(DTC) -O dtb -o $@ -b 0 \ | ||
-i $(dir $<) $(DTC_FLAGS) \ |