* Pinebook pro build @ 2021-04-18 20:06 Grant Wilson II 2021-04-18 23:03 ` Leo Famulari 0 siblings, 1 reply; 11+ messages in thread From: Grant Wilson II @ 2021-04-18 20:06 UTC (permalink / raw) To: help-guix I am attempting to build a bare bones image for the pinebook pro. Either using `guix system image` or `guix system init`. I have noodled around with many approaches but all have failed. At the moment I am trying to cross compile this from an x86_64 system. The following build command is failing and I am not sure why. `guix build --target=aarch64-linux-gnu -e "(@ (gnu packages bootloaders) u-boot-pinebook-pro-rk3399)"` " ... starting phase `set-environment' Backtrace: 9 (primitive-load "/gnu/store/720rvsfh0wgq2dik4jvi3m357hr…") In ice-9/eval.scm: 191:35 8 (_ #f) In guix/build/gnu-build-system.scm: 838:2 7 (gnu-build #:source _ #:outputs _ #:inputs _ #:phases . #) In ice-9/boot-9.scm: 1736:10 6 (with-exception-handler _ _ #:unwind? _ # _) In srfi/srfi-1.scm: 857:16 5 (every1 #<procedure 7ffff19d7580 at guix/build/gnu-bui…> …) In guix/build/gnu-build-system.scm: 847:30 4 (_ _) In ice-9/eval.scm: 619:8 3 (_ #(#(#<directory (guile-user) 7ffff1baff00>) (# # …))) 159:9 2 (_ #(#(#<directory (guile-user) 7ffff1baff00>) (# # …))) In unknown file: 1 (string-append #f "/bl31.elf") In ice-9/boot-9.scm: 1669:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1669:16: In procedure raise-exception: In procedure string-append: Wrong type (expecting string): #f builder for `/gnu/store/rlfcsy66wi25sr75ll6b2gbx0j4sfxhs-u-boot-pinebook-pro-rk3399-2021.04.drv' failed with exit code 1 build of /gnu/store/rlfcsy66wi25sr75ll6b2gbx0j4sfxhs-u-boot-pinebook-pro-rk3399-2021.04.drv failed View build log at '/var/log/guix/drvs/rl/fcsy66wi25sr75ll6b2gbx0j4sfxhs-u-boot-pinebook-pro-rk3399-2021.04.drv.bz2'. guix build: error: build of `/gnu/store/rlfcsy66wi25sr75ll6b2gbx0j4sfxhs-u-boot-pinebook-pro-rk3399-2021.04.drv' failed " I am curious about this specific issue, but any suggestions on how to accomplish my main goal of building any guixsd image for a pinebook-pro are welcome. Thank you! ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Pinebook pro build 2021-04-18 20:06 Pinebook pro build Grant Wilson II @ 2021-04-18 23:03 ` Leo Famulari 2021-04-18 23:27 ` Grant Wilson II 0 siblings, 1 reply; 11+ messages in thread From: Leo Famulari @ 2021-04-18 23:03 UTC (permalink / raw) To: Grant Wilson II; +Cc: help-guix On Sun, Apr 18, 2021 at 04:06:35PM -0400, Grant Wilson II wrote: > In unknown file: > 1 (string-append #f "/bl31.elf") > In ice-9/boot-9.scm: > 1669:16 0 (raise-exception _ #:continuable? _) > > ice-9/boot-9.scm:1669:16: In procedure raise-exception: > In procedure string-append: Wrong type (expecting string): #f This comes from (gnu packages bootloaders): https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/bootloaders.scm?id=1eb26d0e07ad439c935b324c1ed858f50e9dcccd#n928 It seems that no value was passed for the "firmware" input. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Pinebook pro build 2021-04-18 23:03 ` Leo Famulari @ 2021-04-18 23:27 ` Grant Wilson II 2021-04-19 4:03 ` Leo Famulari 2021-04-19 22:55 ` Vagrant Cascadian 0 siblings, 2 replies; 11+ messages in thread From: Grant Wilson II @ 2021-04-18 23:27 UTC (permalink / raw) To: Leo Famulari; +Cc: help-guix Hi Leo, Thanks for the help! I did take a peek at the source but did not find that it helped me understand or fix the error. If I interpret the source correctly, "firmware" is being provided to the package as a native input. When I attempt the build without cross compiling then it does succeed... `guix build -e "(@ (gnu packages bootloaders) u-boot-pinebook-pro-rk3399)"` However that does defeat the purpose. Why would the "firmware" native input not be available when targeting aarch64-linux-gnu? Or perhaps that is not the correct question to ask... On Sun, Apr 18, 2021 at 7:04 PM Leo Famulari <leo@famulari.name> wrote: > On Sun, Apr 18, 2021 at 04:06:35PM -0400, Grant Wilson II wrote: > > In unknown file: > > 1 (string-append #f "/bl31.elf") > > In ice-9/boot-9.scm: > > 1669:16 0 (raise-exception _ #:continuable? _) > > > > ice-9/boot-9.scm:1669:16: In procedure raise-exception: > > In procedure string-append: Wrong type (expecting string): #f > > This comes from (gnu packages bootloaders): > > > https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/bootloaders.scm?id=1eb26d0e07ad439c935b324c1ed858f50e9dcccd#n928 > > It seems that no value was passed for the "firmware" input. > ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Pinebook pro build 2021-04-18 23:27 ` Grant Wilson II @ 2021-04-19 4:03 ` Leo Famulari 2021-04-19 22:55 ` Vagrant Cascadian 1 sibling, 0 replies; 11+ messages in thread From: Leo Famulari @ 2021-04-19 4:03 UTC (permalink / raw) To: Grant Wilson II; +Cc: Vagrant Cascadian, help-guix Yeah, something isn't right. I've CC-ed a Guix contributor with more experience with aarch64. Hopefully they can help! On Sun, Apr 18, 2021 at 07:27:57PM -0400, Grant Wilson II wrote: > Hi Leo, > > Thanks for the help! > I did take a peek at the source but did not find that it helped me > understand or fix the error. > If I interpret the source correctly, "firmware" is being provided to the > package as a native input. > When I attempt the build without cross compiling then it does succeed... > `guix build -e "(@ (gnu packages bootloaders) u-boot-pinebook-pro-rk3399)"` > > However that does defeat the purpose. > > Why would the "firmware" native input not be available when targeting > aarch64-linux-gnu? > > Or perhaps that is not the correct question to ask... > > > On Sun, Apr 18, 2021 at 7:04 PM Leo Famulari <leo@famulari.name> wrote: > > > On Sun, Apr 18, 2021 at 04:06:35PM -0400, Grant Wilson II wrote: > > > In unknown file: > > > 1 (string-append #f "/bl31.elf") > > > In ice-9/boot-9.scm: > > > 1669:16 0 (raise-exception _ #:continuable? _) > > > > > > ice-9/boot-9.scm:1669:16: In procedure raise-exception: > > > In procedure string-append: Wrong type (expecting string): #f > > > > This comes from (gnu packages bootloaders): > > > > > > https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/bootloaders.scm?id=1eb26d0e07ad439c935b324c1ed858f50e9dcccd#n928 > > > > It seems that no value was passed for the "firmware" input. > > ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Pinebook pro build 2021-04-18 23:27 ` Grant Wilson II 2021-04-19 4:03 ` Leo Famulari @ 2021-04-19 22:55 ` Vagrant Cascadian 2021-04-20 0:24 ` Leo Famulari 2021-04-20 1:10 ` Vagrant Cascadian 1 sibling, 2 replies; 11+ messages in thread From: Vagrant Cascadian @ 2021-04-19 22:55 UTC (permalink / raw) To: Grant Wilson II, Leo Famulari; +Cc: help-guix [-- Attachment #1: Type: text/plain, Size: 2073 bytes --] On 2021-04-18, Grant Wilson II wrote: > If I interpret the source correctly, "firmware" is being provided to the > package as a native input. > When I attempt the build without cross compiling then it does succeed... > `guix build -e "(@ (gnu packages bootloaders) u-boot-pinebook-pro-rk3399)"` > > However that does defeat the purpose. > > Why would the "firmware" native input not be available when targeting > aarch64-linux-gnu? That seems to be the problem, yes... It is failing in the set-environment phase... (define-public u-boot-pinebook-pro-rk3399 ... (add-after 'unpack 'set-environment (lambda* (#:key inputs #:allow-other-keys) (setenv "BL31" (string-append (assoc-ref inputs "firmware") "/bl31.elf")) #t)) Works: guix build arm-trusted-firmware-rk3399 guix build u-boot-pinebook-pro-rk3399 guix build --target=aarch64-linux arm-trusted-firmware-rk3399 Fails: guix build --target=aarch64-linux u-boot-pinebook-pro-rk3399 So the firmware (arm-trusted-firmware-rk3399) exists, but for some reason isn't available while cross-building. It appears to be present in the both the cross-built and "regular" firmware package: $ guix build --target=aarch64-linux arm-trusted-firmware-rk3399 /gnu/store/v3nkj3hiihllwp9kn65ih7xi2bjbp58v-arm-trusted-firmware-rk3399-2.4 $ guix build arm-trusted-firmware-rk3399 /gnu/store/jpm4hfqh08s9ns3pd5h3r798z7pdbp0m-arm-trusted-firmware-rk3399-2.4 $ ls /gnu/store/v3nkj3hiihllwp9kn65ih7xi2bjbp58v-arm-trusted-firmware-rk3399-2.4 /gnu/store/jpm4hfqh08s9ns3pd5h3r798z7pdbp0m-arm-trusted-firmware-rk3399-2.4 /gnu/store/jpm4hfqh08s9ns3pd5h3r798z7pdbp0m-arm-trusted-firmware-rk3399-2.4: bl31.elf rk3399m0.bin rk3399m0.elf rk3399m0pmu.bin rk3399m0pmu.elf share /gnu/store/v3nkj3hiihllwp9kn65ih7xi2bjbp58v-arm-trusted-firmware-rk3399-2.4: bl31.elf rk3399m0.bin rk3399m0.elf rk3399m0pmu.bin rk3399m0pmu.elf share So... I'm not very familiar with how --target=ARCH cross-building works in guix, but that somehow appears to trigger the issue... live well, vagrant [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 227 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Pinebook pro build 2021-04-19 22:55 ` Vagrant Cascadian @ 2021-04-20 0:24 ` Leo Famulari 2021-04-20 7:26 ` Efraim Flashner 2021-04-20 1:10 ` Vagrant Cascadian 1 sibling, 1 reply; 11+ messages in thread From: Leo Famulari @ 2021-04-20 0:24 UTC (permalink / raw) To: Vagrant Cascadian; +Cc: Grant Wilson II, help-guix [-- Attachment #1: Type: text/plain, Size: 287 bytes --] On Mon, Apr 19, 2021 at 03:55:05PM -0700, Vagrant Cascadian wrote: > So... I'm not very familiar with how --target=ARCH cross-building works > in guix, but that somehow appears to trigger the issue... Thanks for your analysis. I wonder if anyone else can help us further... More pings! [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Pinebook pro build 2021-04-20 0:24 ` Leo Famulari @ 2021-04-20 7:26 ` Efraim Flashner 2021-04-24 8:44 ` Vincent Legoll 0 siblings, 1 reply; 11+ messages in thread From: Efraim Flashner @ 2021-04-20 7:26 UTC (permalink / raw) To: Leo Famulari; +Cc: Vagrant Cascadian, Grant Wilson II, help-guix [-- Attachment #1: Type: text/plain, Size: 1224 bytes --] On Mon, Apr 19, 2021 at 08:24:38PM -0400, Leo Famulari wrote: > On Mon, Apr 19, 2021 at 03:55:05PM -0700, Vagrant Cascadian wrote: > > So... I'm not very familiar with how --target=ARCH cross-building works > > in guix, but that somehow appears to trigger the issue... > > Thanks for your analysis. I wonder if anyone else can help us further... > More pings! I agree with vagrant that building u-boot-* is supposed to automagically create a working binary for whichever system it is meant for. Also I see that there's a pinebook-pro.scm in gnu/system/images, and I was able to build it with `guix system build --image-type=pinebook-pro-raw gnu/system/images/pinebook-pro.scm --target=aarch64-linux-gnu` In the past when I've built images for my pine64 I generally build a minimal image using --target=aarch64-linux and then reconfigure on the board with the full config. Except when test building I've never really tried to build it piecemeal; Guix is setup to take care of all of that. -- Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Pinebook pro build 2021-04-20 7:26 ` Efraim Flashner @ 2021-04-24 8:44 ` Vincent Legoll 0 siblings, 0 replies; 11+ messages in thread From: Vincent Legoll @ 2021-04-24 8:44 UTC (permalink / raw) To: Leo Famulari, Vagrant Cascadian, Grant Wilson II, help-guix Hello, I did try to get guix running on the pbp earlier, with the images, first trying to cross-build them myself, then with the cuirass built ones. I'm not sure I got anything working at all (no console output, serial console problem). I now got some time to try again, and chose a different path, seeing that Janneke go it to work, I tried to replicate what he's done, and it worked, I've now got guixrunning on my pbp, yay ! Some of the steps were different in my attempt, but that's not really important, I could have done the whole thing on the pbp itself too. I chose that because the pbp is slower (CPU and storage-wise) than the Odroid N2. So, what I did is the following: on an Odroid N2 with the guix binary tarball installed over Armbian on the eMMC with the help from guix-install.sh script. I put /gnu on an external USB3 SSD that is way bigger and also faster than the eMMC. I had to make the guix-daemon use a TMPDIR in there, as the system one was too small (2GB tmpfs): sudo mkdir /gnu/tmp sudo chmod 1777 /gnu/tmp sudo chmod 644 /etc/systemd/system/guix-daemon.service sudo vi /etc/systemd/system/guix-daemon.service # Add to "[Service]" section: # Environment=TMPDIR=/gnu/tmp sudo systemctl daemon-reload sudo systemctl restart guix-daemon then plugged an sdcard and did: SDCARD=/dev/mmcblk1 sudo parted -- ${SDCARD} mkpart p 0% -1 sudo parted -- ${SDCARD} set 1 boot on sudo mkfs.ext4 -F ${SDCARD}p1 sudo e2label ${SDCARD}p1 GUIXROOT blkid sudo mkdir /mnt/tmp sudo mount ${SDCARD}p1 /mnt/tmp git clone git://git.savannah.gnu.org/guix.git cd guix git checkout wip-pinebook-pro guix environment guix ./bootstrap ./configure --localstatedir=/var make -j 7 cp gnu/system/examples/pinebook-pro.tmpl ./config-pbp.scm vi config-pbp.scm # Set bootloader target to ${SDCARD} # Set filesystem / to uuid you got by the above blkid, or to label GUIXROOT sudo -E ./pre-inst-env guix system init config-pbp.scm /mnt/tmp --fallback I checked that he final section from Janneke's blog post was not needed anymore grep DEFAULT_FDT /gnu/store/*u-boot*pinebook*/libexec/.config grep FDT /mnt/tmp/boot/extlinux/extlinux.conf find /mnt/tmp/gnu/store/z1kmpmyvm3shh59fsnw5v7s41bdi2fs1-linux-libre-pinebook-pro-5.10.29/lib/dtbs/ -name rk3399-pinebook-pro.dtb cat /mnt/tmp/boot/extlinux/extlinux.conf sudo umount /mnt/tmp unplug the sdcard from the N2 and put it in the pinebook pro, turn it on, enjoy. Hope that report is helpful. Many thanks to Janneke, his blog post is very nice and simple to follow. And to the guix community for all the good work done ! Regards -- Vincent Legoll ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Pinebook pro build 2021-04-19 22:55 ` Vagrant Cascadian 2021-04-20 0:24 ` Leo Famulari @ 2021-04-20 1:10 ` Vagrant Cascadian 2021-04-20 2:02 ` Leo Famulari 1 sibling, 1 reply; 11+ messages in thread From: Vagrant Cascadian @ 2021-04-20 1:10 UTC (permalink / raw) To: Grant Wilson II, Leo Famulari; +Cc: help-guix [-- Attachment #1: Type: text/plain, Size: 1091 bytes --] On 2021-04-19, Vagrant Cascadian wrote: > On 2021-04-18, Grant Wilson II wrote: >> If I interpret the source correctly, "firmware" is being provided to the >> package as a native input. >> When I attempt the build without cross compiling then it does succeed... >> `guix build -e "(@ (gnu packages bootloaders) u-boot-pinebook-pro-rk3399)"` ... > Works: > > guix build arm-trusted-firmware-rk3399 > guix build u-boot-pinebook-pro-rk3399 > guix build --target=aarch64-linux arm-trusted-firmware-rk3399 > > Fails: > > guix build --target=aarch64-linux u-boot-pinebook-pro-rk3399 ... > So... I'm not very familiar with how --target=ARCH cross-building works > in guix, but that somehow appears to trigger the issue... I should also mention that arm-trusted-firmware and u-boot packages have support for cross-building when not using --target=ARCH. e.g. Building these packages on x86_64 builds working binaries for the aarch64 boot firmware. Maybe somehow the internal cross-building support is interfering with how the --target=ARCH style cross-building works? live well, vagrant [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 227 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Pinebook pro build 2021-04-20 1:10 ` Vagrant Cascadian @ 2021-04-20 2:02 ` Leo Famulari 2021-04-20 3:40 ` Brian Woodcox 0 siblings, 1 reply; 11+ messages in thread From: Leo Famulari @ 2021-04-20 2:02 UTC (permalink / raw) To: Vagrant Cascadian; +Cc: Grant Wilson II, help-guix [-- Attachment #1: Type: text/plain, Size: 327 bytes --] On Mon, Apr 19, 2021 at 06:10:01PM -0700, Vagrant Cascadian wrote: > I should also mention that arm-trusted-firmware and u-boot packages have > support for cross-building when not using --target=ARCH. e.g. Building > these packages on x86_64 builds working binaries for the aarch64 boot > firmware. Oooh, that's good to know! [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Pinebook pro build 2021-04-20 2:02 ` Leo Famulari @ 2021-04-20 3:40 ` Brian Woodcox 0 siblings, 0 replies; 11+ messages in thread From: Brian Woodcox @ 2021-04-20 3:40 UTC (permalink / raw) To: Leo Famulari; +Cc: Vagrant Cascadian, Grant Wilson II, help-guix Hi All, I was able to create an image to run on the PineBook Pro —> https://lists.gnu.org/archive/html/guix-patches/2020-04/msg01101.html <https://lists.gnu.org/archive/html/guix-patches/2020-04/msg01101.html> I haven’t updated this lately, but I have it running on 4 PineBook Pro’s. I hope it might help you out. Brian. > On Apr 19, 2021, at 8:02 PM, Leo Famulari <leo@famulari.name> wrote: > > On Mon, Apr 19, 2021 at 06:10:01PM -0700, Vagrant Cascadian wrote: >> I should also mention that arm-trusted-firmware and u-boot packages have >> support for cross-building when not using --target=ARCH. e.g. Building >> these packages on x86_64 builds working binaries for the aarch64 boot >> firmware. > > Oooh, that's good to know! ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2021-04-24 8:45 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-04-18 20:06 Pinebook pro build Grant Wilson II 2021-04-18 23:03 ` Leo Famulari 2021-04-18 23:27 ` Grant Wilson II 2021-04-19 4:03 ` Leo Famulari 2021-04-19 22:55 ` Vagrant Cascadian 2021-04-20 0:24 ` Leo Famulari 2021-04-20 7:26 ` Efraim Flashner 2021-04-24 8:44 ` Vincent Legoll 2021-04-20 1:10 ` Vagrant Cascadian 2021-04-20 2:02 ` Leo Famulari 2021-04-20 3:40 ` Brian Woodcox
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/guix.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.