From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id aQBLNGSGNmG0LgEAgWs5BA (envelope-from ) for ; Mon, 06 Sep 2021 23:21:40 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id gKU3L2SGNmEbbQAAB5/wlQ (envelope-from ) for ; Mon, 06 Sep 2021 21:21:40 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 016661864D for ; Mon, 6 Sep 2021 23:21:40 +0200 (CEST) Received: from localhost ([::1]:56840 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNM3f-00049C-2p for larch@yhetil.org; Mon, 06 Sep 2021 17:21:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNM3N-000493-NP for help-guix@gnu.org; Mon, 06 Sep 2021 17:21:21 -0400 Received: from dustycloud.org ([50.116.34.160]:58546) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNM3K-0000Dh-27 for help-guix@gnu.org; Mon, 06 Sep 2021 17:21:21 -0400 Received: from twig (localhost [127.0.0.1]) by dustycloud.org (Postfix) with ESMTPS id 6E4BE2661B; Mon, 6 Sep 2021 17:21:16 -0400 (EDT) References: <87ftcaqxer.fsf@dustycloud.org> <874kbogf1h.fsf@dustycloud.org> <877dgjd441.fsf@d2.com> <87mtordcqq.fsf@dustycloud.org> <87h7exd41b.fsf@dustycloud.org> <875yvdh4w7.fsf@posteo.net> User-agent: mu4e 1.6.2; emacs 27.2 From: Christine Lemmer-Webber To: Fredrik Salomonsson Subject: Re: Guix on the MNT Reform Date: Mon, 06 Sep 2021 16:50:36 -0400 In-reply-to: <875yvdh4w7.fsf@posteo.net> Message-ID: <87czplcsdw.fsf@dustycloud.org> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=50.116.34.160; envelope-from=cwebber@dustycloud.org; helo=dustycloud.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: help-guix@gnu.org Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1630963300; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=+WCW0Es99XGgh3ZIq4LGKhuomSf+S+oZy5QmBz5TNm4=; b=otq300uVecdsObFp+IGz3NG/YLFqbGEnFvOQrre09Fbvo/P1AczcTnLtOMcqQRXfwPaGtH 9W9YpYkZSBx5ViEWYluA5ul7HbaxBtfPom/XZPnamDe+UvL0/SB/aD/5TwrOoGvM3YnVD/ WglXqvINFrjhWp361Lj5W4PcmJZ0QsqplcGQHOon79dCvXMBDux7haVXTC9pu0zZgDxW0F 2DkRrYWfi33bPs+rD/TR8plg3l340ZA5aD3VZiPWG8ZrIva2W/dARjJBxQ/E6fM+D08Sic 35DksqHcG2V0KexqTHkgOn+NEoqy+ID0MwqBwIUhYmFPluXFn5AzkOdDh4siWQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630963300; a=rsa-sha256; cv=none; b=sFuwJTZKJaBIyKa8dVWWAEJ9J3AHUTJplS/8IJpOYjAswOgVYrgq8n+DmkEK0QuGZArqln AYjXoXGqYfr1iRqB+1hoCw9hInMJw39TZEkFqQtn41HwxOPzBWN4aiY93tyL2csUdhNACy tXmTPqpGNXUoCH6iF4nm9/64GuCMVX/lN6gSejzEFC/g34FIEQ5myKRqfIknckskcGeB8K ZjzXRPEuAt7eKVhGrsJI/wrMoofGVMKkB6I5H/3rX6CHngQWtCHmG9V0Nd7qKfdeJhBq1C 6jDgi1ofZEHw8Ski9Dw1FjtccTN9Qa+dNDoYcM/cbmeYk368fo7rztuEVrfA3g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Spam-Score: 2.38 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: 016661864D X-Spam-Score: 2.38 X-Migadu-Scanner: scn0.migadu.com X-TUID: wEM4ReJVedKX Fredrik Salomonsson writes: > Christine Lemmer-Webber writes: > >>> Cool! Hope it gets up and running soon. > > Thanks, I got it running somewhat. My batteries are still a bit messed > up after I accidentally let it drain them too low. I ordered a battery > charger so hopefully I can get them in great shape again. Ooh! This is a great email. Thank you for your help. >>> In the meanwhile, some local notes... >>> >>> It looks like the relevant info to get going is here: >>> >>> https://mntre.com/reform2/handbook/advanced.html#system-boot >>> >>> There's a script to compile a custom u-boot: >>> >>> https://source.mnt.re/reform/reform-system-image/-/blob/main/reform2-imx8mq/mkuboot.sh >>> >>> #+BEGIN_SRC bash >>> if [ ! -d u-boot ] >>> then >>> echo "Cloning U-Boot..." >>> git clone --depth 1 https://source.mnt.re/reform/reform-boundary-uboot.git u-boot >>> fi >>> >>> cd u-boot >>> cp mntreform-config .config >>> >>> export CROSS_COMPILE=aarch64-linux-gnu- >>> export ARCH=arm >>> >>> # build rescue u-boot first (loads kernel from eMMC) >>> make -j$(nproc) flash.bin KCPPFLAGS='-DMNTREFORM_BOOT_EMMC' >>> cp flash.bin flash-rescue.bin >>> >>> # build normal u-boot second (loads kernel from SD card) >>> make -j$(nproc) flash.bin >>> >>> cd .. >>> #+END_SRC >>> >>> So that doesn't look to complicated. >>> >>> Here's the custom u-boot: >>> >>> https://source.mnt.re/reform/reform-boundary-uboot >>> >>> It says: >>> >>> "Fork of the vendor (Boundary Devices) u-boot for Reform 2, with >>> minor tweaks. The goal is to migrate to mainstream u-boot or barebox >>> ASAP. The main impediment so far is the 4GB RAM config." >>> >>> So we probably want to make a u-boot-mnt-reform in >>> gnu/packages/bootloaders.scm >>> >>> So we probably want to use "guix system image" and then add: >>> >>> gnu/system/images/mnt-reform.scm >>> >>> Ideally in the end we should be able to do: >>> >>> guix system image --image-type=mnt-reform my-os.scm >>> >>> So yeah, the rest of the pieces to figuring it out seem to be all here: >>> >>> https://mntre.com/reform2/handbook/advanced.html#system-boot >>> >>> It *seems* like this should all be possible... >>> >>> - Christine > > Thanks for the notes! I've just been poking around in the guix source > code to get a grasp how it works plus reading the Guix on an ARM Board > by Julien Lepiller [0] > > [0] https://guix.gnu.org/blog/2019/guix-on-an-arm-board/ > >> >> Here's the progress I've made so far: >> >> #+BEGIN_SRC diff >> diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm >> index 2889a90d54..17a7abc657 100644 >> --- a/gnu/packages/bootloaders.scm >> +++ b/gnu/packages/bootloaders.scm >> @@ -953,6 +953,38 @@ to Novena upstream, does not load u-boot.img from the first partition.") >> `(("firmware" ,arm-trusted-firmware-rk3399) >> ,@(package-native-inputs base)))))) >> >> +(define-public u-boot-mnt-reform2 >> + (let ((base (make-u-boot-package "mnt-reform2" "aarch64-linux-gnu")) >> + (commit "bdcdce7434b9db19aabd59181014f24d66af0db8")) >> + (package >> + (inherit base) >> + (version "2021.06") >> + (name "u-boot-mnt-reform2") >> + (source (origin >> + (method git-fetch) >> + (uri (git-reference >> + (url "https://source.mnt.re/reform/reform-boundary-uboot.git") >> + (commit commit))) >> + (file-name (git-file-name name version)) >> + (sha256 >> + (base32 >> + "1pwmcaaxx5zvn26gznwz4rjki4w3wwfzdnipxfr7d8067fmwgjp3")))) >> + (arguments >> + (substitute-keyword-arguments (package-arguments base) >> + ((#:phases phases) >> + `(modify-phases ,phases >> + (replace 'configure >> + (lambda _ >> + (copy-file "mntreform-config" ".config"))) >> + >> + ;; Phases do not succeed on the bl31 ELF. >> + #;(delete 'strip) >> + #;(delete 'validate-runpath))))) >> + #;(native-inputs >> + `(("firmware" ,arm-trusted-firmware-rk3399) >> + ,@(package-native-inputs base)))) >> + )) >> + >> (define-public vboot-utils >> (package >> (name "vboot-utils") >> #+END_SRC >> >> However, I hit this error when trying to compile: >> >> #+BEGIN_VERBATIM >> starting phase `build' >> HOSTCC scripts/basic/fixdep >> In file included from /gnu/store/dj05znzsk7fq43zj5r719ll8ldgh9xxi-u-boot-mnt-reform2-2021.06-checkout/include/stdlib.h:9:0, >> from scripts/basic/fixdep.c:112: >> /gnu/store/dj05znzsk7fq43zj5r719ll8ldgh9xxi-u-boot-mnt-reform2-2021.06-checkout/include/malloc.h:875:22: error: missing binary operator before token "(" >> #if CONFIG_IS_ENABLED(SYS_MALLOC_SIMPLE) >> ^ >> In file included from scripts/basic/fixdep.c:113:0: >> /gnu/store/dj05znzsk7fq43zj5r719ll8ldgh9xxi-u-boot-mnt-reform2-2021.06-checkout/include/stdio.h:18:14: error: expected declaration specifiers or '...' before numeric constant >> int __printf(1, 2) printf(const char *fmt, ...); >> ^ >> /gnu/store/dj05znzsk7fq43zj5r719ll8ldgh9xxi-u-boot-mnt-reform2-2021.06-checkout/include/stdio.h:18:17: error: expected declaration specifiers or '...' before numeric constant >> int __printf(1, 2) printf(const char *fmt, ...); >> ^ >> /gnu/store/dj05znzsk7fq43zj5r719ll8ldgh9xxi-u-boot-mnt-reform2-2021.06-checkout/include/stdio.h:53:14: error: expected declaration specifiers or '...' before numeric constant >> int __printf(2, 3) fprintf(int file, const char *fmt, ...); >> ^ >> /gnu/store/dj05znzsk7fq43zj5r719ll8ldgh9xxi-u-boot-mnt-reform2-2021.06-checkout/include/stdio.h:53:17: error: expected declaration specifiers or '...' before numeric constant >> int __printf(2, 3) fprintf(int file, const char *fmt, ...); >> ^ >> scripts/basic/fixdep.c: In function 'usage': >> scripts/basic/fixdep.c:130:2: warning: implicit declaration of function 'fprintf' [-Wimplicit-function-declaration] >> fprintf(stderr, "Usage: fixdep \n"); >> ^~~~~~~ >> scripts/basic/fixdep.c:130:2: warning: incompatible implicit declaration of built-in function 'fprintf' >> scripts/basic/fixdep.c:130:2: note: include '' or provide a declaration of 'fprintf' >> scripts/basic/fixdep.c:130:10: warning: passing argument 1 of 'fprintf' makes pointer from integer without a cast [-Wint-conversion] >> fprintf(stderr, "Usage: fixdep \n"); >> ^~~~~~ >> scripts/basic/fixdep.c:130:10: note: expected 'void *' but argument is of type 'int' >> scripts/basic/fixdep.c:131:2: warning: implicit declaration of function 'exit' [-Wimplicit-function-declaration] >> exit(1); >> ^~~~ >> scripts/basic/fixdep.c:131:2: warning: incompatible implicit declaration of built-in function 'exit' >> scripts/basic/fixdep.c:131:2: note: include '' or provide a declaration of 'exit' >> scripts/basic/fixdep.c: In function 'print_cmdline': >> scripts/basic/fixdep.c:139:2: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration] >> printf("cmd_%s := %s\n\n", target, cmdline); >> ^~~~~~ >> scripts/basic/fixdep.c:139:2: warning: incompatible implicit declaration of built-in function 'printf' >> scripts/basic/fixdep.c:139:2: note: include '' or provide a declaration of 'printf' >> scripts/basic/fixdep.c: In function 'define_config': >> scripts/basic/fixdep.c:185:3: warning: implicit declaration of function 'perror'; did you mean 'strerror'? [-Wimplicit-function-declaration] >> perror("fixdep:malloc"); >> ^~~~~~ >> strerror >> scripts/basic/fixdep.c:186:3: warning: incompatible implicit declaration of built-in function 'exit' >> exit(1); >> ^~~~ >> scripts/basic/fixdep.c:186:3: note: include '' or provide a declaration of 'exit' >> scripts/basic/fixdep.c: In function 'use_config': >> scripts/basic/fixdep.c:208:2: warning: incompatible implicit declaration of built-in function 'printf' >> printf(" $(wildcard include/config/"); >> ^~~~~~ >> scripts/basic/fixdep.c:208:2: note: include '' or provide a declaration of 'printf' >> scripts/basic/fixdep.c:215:3: warning: implicit declaration of function 'putchar' [-Wimplicit-function-declaration] >> putchar(c); >> ^~~~~~~ >> scripts/basic/fixdep.c: In function 'do_config_file': >> scripts/basic/fixdep.c:302:3: warning: incompatible implicit declaration of built-in function 'fprintf' >> fprintf(stderr, "fixdep: error opening config file: "); >> ^~~~~~~ >> scripts/basic/fixdep.c:302:3: note: include '' or provide a declaration of 'fprintf' >> scripts/basic/fixdep.c:302:11: warning: passing argument 1 of 'fprintf' makes pointer from integer without a cast [-Wint-conversion] >> fprintf(stderr, "fixdep: error opening config file: "); >> ^~~~~~ >> scripts/basic/fixdep.c:302:11: note: expected 'void *' but argument is of type 'int' >> scripts/basic/fixdep.c:304:3: warning: incompatible implicit declaration of built-in function 'exit' >> exit(2); >> ^~~~ >> scripts/basic/fixdep.c:304:3: note: include '' or provide a declaration of 'exit' >> scripts/basic/fixdep.c:307:3: warning: incompatible implicit declaration of built-in function 'fprintf' >> fprintf(stderr, "fixdep: error fstat'ing config file: "); >> ^~~~~~~ >> scripts/basic/fixdep.c:307:3: note: include '' or provide a declaration of 'fprintf' >> scripts/basic/fixdep.c:307:11: warning: passing argument 1 of 'fprintf' makes pointer from integer without a cast [-Wint-conversion] >> fprintf(stderr, "fixdep: error fstat'ing config file: "); >> ^~~~~~ >> scripts/basic/fixdep.c:307:11: note: expected 'void *' but argument is of type 'int' >> scripts/basic/fixdep.c:309:3: warning: incompatible implicit declaration of built-in function 'exit' >> exit(2); >> ^~~~ >> scripts/basic/fixdep.c:309:3: note: include '' or provide a declaration of 'exit' >> scripts/basic/fixdep.c: In function 'parse_dep_file': >> scripts/basic/fixdep.c:387:7: warning: incompatible implicit declaration of built-in function 'printf' >> printf("source_%s := %s\n\n", >> ^~~~~~ >> scripts/basic/fixdep.c:387:7: note: include '' or provide a declaration of 'printf' >> scripts/basic/fixdep.c:394:6: warning: incompatible implicit declaration of built-in function 'printf' >> printf(" %s \\\n", s); >> ^~~~~~ >> scripts/basic/fixdep.c:394:6: note: include '' or provide a declaration of 'printf' >> scripts/basic/fixdep.c:406:3: warning: incompatible implicit declaration of built-in function 'fprintf' >> fprintf(stderr, "fixdep: parse error; no targets found\n"); >> ^~~~~~~ >> scripts/basic/fixdep.c:406:3: note: include '' or provide a declaration of 'fprintf' >> scripts/basic/fixdep.c:406:11: warning: passing argument 1 of 'fprintf' makes pointer from integer without a cast [-Wint-conversion] >> fprintf(stderr, "fixdep: parse error; no targets found\n"); >> ^~~~~~ >> scripts/basic/fixdep.c:406:11: note: expected 'void *' but argument is of type 'int' >> scripts/basic/fixdep.c:407:3: warning: incompatible implicit declaration of built-in function 'exit' >> exit(1); >> ^~~~ >> scripts/basic/fixdep.c:407:3: note: include '' or provide a declaration of 'exit' >> scripts/basic/fixdep.c:410:2: warning: incompatible implicit declaration of built-in function 'printf' >> printf("\n%s: $(deps_%s)\n\n", target, target); >> ^~~~~~ >> scripts/basic/fixdep.c:410:2: note: include '' or provide a declaration of 'printf' >> scripts/basic/fixdep.c: In function 'print_deps': >> scripts/basic/fixdep.c:422:3: warning: incompatible implicit declaration of built-in function 'fprintf' >> fprintf(stderr, "fixdep: error opening depfile: "); >> ^~~~~~~ >> scripts/basic/fixdep.c:422:3: note: include '' or provide a declaration of 'fprintf' >> scripts/basic/fixdep.c:422:11: warning: passing argument 1 of 'fprintf' makes pointer from integer without a cast [-Wint-conversion] >> fprintf(stderr, "fixdep: error opening depfile: "); >> ^~~~~~ >> scripts/basic/fixdep.c:422:11: note: expected 'void *' but argument is of type 'int' >> scripts/basic/fixdep.c:424:3: warning: incompatible implicit declaration of built-in function 'exit' >> exit(2); >> ^~~~ >> scripts/basic/fixdep.c:424:3: note: include '' or provide a declaration of 'exit' >> scripts/basic/fixdep.c:427:3: warning: incompatible implicit declaration of built-in function 'fprintf' >> fprintf(stderr, "fixdep: error fstat'ing depfile: "); >> ^~~~~~~ >> scripts/basic/fixdep.c:427:3: note: include '' or provide a declaration of 'fprintf' >> scripts/basic/fixdep.c:427:11: warning: passing argument 1 of 'fprintf' makes pointer from integer without a cast [-Wint-conversion] >> fprintf(stderr, "fixdep: error fstat'ing depfile: "); >> ^~~~~~ >> scripts/basic/fixdep.c:427:11: note: expected 'void *' but argument is of type 'int' >> scripts/basic/fixdep.c:429:3: warning: incompatible implicit declaration of built-in function 'exit' >> exit(2); >> ^~~~ >> scripts/basic/fixdep.c:429:3: note: include '' or provide a declaration of 'exit' >> scripts/basic/fixdep.c:432:3: warning: incompatible implicit declaration of built-in function 'fprintf' >> fprintf(stderr,"fixdep: %s is empty\n",depfile); >> ^~~~~~~ >> scripts/basic/fixdep.c:432:3: note: include '' or provide a declaration of 'fprintf' >> scripts/basic/fixdep.c:432:11: warning: passing argument 1 of 'fprintf' makes pointer from integer without a cast [-Wint-conversion] >> fprintf(stderr,"fixdep: %s is empty\n",depfile); >> ^~~~~~ >> scripts/basic/fixdep.c:432:11: note: expected 'void *' but argument is of type 'int' >> scripts/basic/fixdep.c: In function 'traps': >> scripts/basic/fixdep.c:456:3: warning: incompatible implicit declaration of built-in function 'fprintf' >> fprintf(stderr, "fixdep: sizeof(int) != 4 or wrong endianness? %#x\n", >> ^~~~~~~ >> scripts/basic/fixdep.c:456:3: note: include '' or provide a declaration of 'fprintf' >> scripts/basic/fixdep.c:456:11: warning: passing argument 1 of 'fprintf' makes pointer from integer without a cast [-Wint-conversion] >> fprintf(stderr, "fixdep: sizeof(int) != 4 or wrong endianness? %#x\n", >> ^~~~~~ >> scripts/basic/fixdep.c:456:11: note: expected 'void *' but argument is of type 'int' >> scripts/basic/fixdep.c:458:3: warning: incompatible implicit declaration of built-in function 'exit' >> exit(2); >> ^~~~ >> scripts/basic/fixdep.c:458:3: note: include '' or provide a declaration of 'exit' >> make[2]: *** [scripts/Makefile.host:97: scripts/basic/fixdep] Error 1 >> make[1]: *** [Makefile:411: scripts_basic] Error 2 >> make: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'. Stop. >> command "make" "-j" "8" "HOSTCC=gcc" "CROSS_COMPILE=aarch64-linux-gnu-" failed with status 2 >> note: keeping build directory `/tmp/guix-build-u-boot-mnt-reform2-2021.06.drv-1' >> builder for `/gnu/store/ahqnc7qa9mam5k6ycc61jw8df10af19m-u-boot-mnt-reform2-2021.06.drv' failed with exit code 1 >> build of /gnu/store/ahqnc7qa9mam5k6ycc61jw8df10af19m-u-boot-mnt-reform2-2021.06.drv failed >> View build log at '/var/log/guix/drvs/ah/qnc7qa9mam5k6ycc61jw8df10af19m-u-boot-mnt-reform2-2021.06.drv.bz2'. >> guix build: error: build of `/gnu/store/ahqnc7qa9mam5k6ycc61jw8df10af19m-u-boot-mnt-reform2-2021.06.drv' failed >> #+END_VERBATIM >> >> I guess here's where my lack of knowledge of C-land is failing me. >> >> Any thoughts or ideas? >> >> - Christine > > Sounds like the error: > >> /gnu/store/dj05znzsk7fq43zj5r719ll8ldgh9xxi-u-boot-mnt-reform2-2021.06-checkout/include/malloc.h:875:22: error: missing binary operator before token "(" >> #if CONFIG_IS_ENABLED(SYS_MALLOC_SIMPLE) >> ^ > > is due to the =CONFIG_IS_ENABLED= not being defined and causing the > preprocessor to error out. That seems right. I don't understand the config system that's here to know what to do. I noticed that the source/README directory says the following: #+BEGIN_QUOTE - CONFIG_SYS_MALLOC_SIMPLE Provides a simple and small malloc() and calloc() for those boards which do not use the full malloc in SPL (which is enabled with CONFIG_SYS_SPL_MALLOC_START). #+END_QUOTE Now note that by following their custom instructions, I had set a rule in the package definition above to copy =mntreform-config= to =.config= But I also just noticed something strange. The build directory is: /tmp/guix-build-u-boot-mnt-reform2-2021.06.drv-0/source yet the error appears as: /gnu/store/dj05znzsk7fq43zj5r719ll8ldgh9xxi-u-boot-mnt-reform2-2021.06-checkout/include/malloc.h I don't know how common this is, but this surprised me to see that it was pointing at something from the checkout rather than in the build directory. So, I changed where the copy config step was and put it in the source section. Then, since the config step incorrectly identified this as not being a valid board (we're really doing the config step manually) I deleted it: #+BEGIN_SRC scheme (define-public u-boot-mnt-reform2 (let ((base (make-u-boot-package "mnt-reform2" "aarch64-linux-gnu")) (commit "bdcdce7434b9db19aabd59181014f24d66af0db8")) (package (inherit base) (version "2021.06") (name "u-boot-mnt-reform2") (source (origin (method git-fetch) (uri (git-reference (url "https://source.mnt.re/reform/reform-boundary-uboot.git") (commit commit))) (file-name (git-file-name name version)) (sha256 (base32 "1pwmcaaxx5zvn26gznwz4rjki4w3wwfzdnipxfr7d8067fmwgjp3")) (snippet '(copy-file "mntreform-config" ".config")))) (arguments (substitute-keyword-arguments (package-arguments base) ((#:phases phases) `(modify-phases ,phases (delete 'configure)))))))) #+END_SRC Now things compile! Now note that it looks like we need to do two steps, so this probably is not complete. From the mkuboot.sh mentioned previously: #+BEGIN_SRC sh # build rescue u-boot first (loads kernel from eMMC) make -j$(nproc) flash.bin KCPPFLAGS='-DMNTREFORM_BOOT_EMMC' cp flash.bin flash-rescue.bin # build normal u-boot second (loads kernel from SD card) make -j$(nproc) flash.bin #+END_SRC So maybe we need to incorporate that before using this. However, I'm actually disturbed by looking at a few things in the "environment-variables" file spit out in the build file. It says the following: #+BEGIN_SRC sh export TEMP=\ "/tmp/guix-build-u-boot-mnt-reform2-2021.06.drv-0" export TEMPDIR=\ "/tmp/guix-build-u-boot-mnt-reform2-2021.06.drv-0" export TMP=\ "/tmp/guix-build-u-boot-mnt-reform2-2021.06.drv-0" export TMPDIR=\ "/tmp/guix-build-u-boot-mnt-reform2-2021.06.drv-0" #+END_SRC But here's the weird thing. This is in: /tmp/guix-build-u-boot-mnt-reform2-2021.06.drv-4 Now wait a minute. Look at that last number. What the hell is going on here? Is this a bug in Guix? Why is it pointing at -0 in the -4 build directory?