From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: Building a bootable disk image for A20-OLinuXino Date: Sun, 12 Jan 2020 12:55:08 +0100 Message-ID: <87blr8sxcz.fsf@gnu.org> References: <87r22p3trp.fsf@gnu.org> <87ftj4vqcy.fsf@gmail.com> <87mud59d47.fsf@gnu.org> <877e46b9ld.fsf@gmail.com> <878soeo2c5.fsf@gnu.org> <878snwvwiz.fsf@gmail.com> <87a781bdvk.fsf@gnu.org> <87imlx3453.fsf_-_@gnu.org> <87v9pwc0cc.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:40225) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iqbpo-00014j-Dc for guix-devel@gnu.org; Sun, 12 Jan 2020 06:55:17 -0500 In-Reply-To: <87v9pwc0cc.fsf@gmail.com> (Mathieu Othacehe's message of "Tue, 31 Dec 2019 10:26:27 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane-mx.org@gnu.org Sender: "Guix-devel" To: Mathieu Othacehe Cc: guix-devel --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Mathieu! Mathieu Othacehe skribis: >> (bootloader (bootloader-configuration >> (bootloader u-boot-a20-olinuxino-micro-bootloader) >> (target "/dev/mmcblk0"))) >> >> =E2=80=A6 this time with offloading to an actual ARM machine. I wrote t= he >> resulting image to an SD card, but the result appears to be unbootable. >> >> What am I doing wrong? > > Well, I prefer to set target to "/dev/vda", produce the image, then dd > it on the SD card. This way, you have an image with the bootloader > installed. But, this should work too. Looking at the code (=E2=80=98write-file-on-device=E2=80=99 called from =E2=80=98install-allwinner-u-boot=E2=80=99), it looks like it has to be =E2= =80=9C/dev/vda=E2=80=9D, indeed! > The only way to debug is to plug an UART cable[1] :p. Most of the time, t= he > initrd is missing some drivers to mount the SD card ("sunxi-mmc" and > "sd_mod" maybe?). > > To find missing modules, I usually remove the "quiet" kernel argument > and compare dmesg output with a Raspbian, or whatever is booting. I don=E2=80=99t have a UART cable at hand, so I=E2=80=99m really shooting i= n the dark until I get one. :-) Attached is the latest config I=E2=80=99ve tested, to no avail. I=E2=80=99= d say that the kernel boots, because the Ethernet socket starts blinking, but there=E2=80=99s no heartbeat. Danny, I think you added U-Boot support for this board; did you get it to work on the metal? Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline; filename=olimex-configuration.scm Content-Transfer-Encoding: quoted-printable Content-Description: the config (use-modules (gnu) (gnu bootloader u-boot)) (use-service-modules networking ssh avahi) (use-package-modules screen linux pulseaudio wget) (use-modules (srfi srfi-1)) ;; /sbin/agetty --keep-baud 115200 38400 9600 ttyS0 vt102 ;; # redefine green led to blink until shutdown, try to switch OTG port to = host ;; (echo heartbeat >/sys/class/leds/*green*/trigger) 2>/dev/null ;; echo 0 > /sys/bus/platform/devices/sunxi_usb_udc/otg_role 2>/dev/null ;; olimex@A20-OLinuXino:~$ cat .config/pulse/default.pa ;; load-module module-alsa-sink ;; load-module module-rtp-recv ;; load-module module-native-protocol-unix (define heartbeat-service (simple-service 'heartbeat activation-service-type #~(catch 'system-error (lambda () (call-with-output-file "/sys/class/leds/green:ph02:led1/trigger" (lambda (port) (display "heartbeat\n" port)))) (const #f)))) (define %ludo-key (local-file "/home/ludo/.ssh/id_rsa.pub")) (operating-system (host-name "olimex") (timezone "Europe/Paris") (locale "en_US.utf8") (bootloader (bootloader-configuration (bootloader u-boot-a20-olinuxino-micro-bootloader) (target "/dev/vda"))) ;"/dev/mmcblk0" (firmware '()) (initrd-modules '("sunxi-mmc" "ahci-sunxi" "sunxi-nand" "sunxi" "sd_mod" ;; Taken from /etc/modules in the Debian image. ;; "sw_ahci_platform" ;SATA support "ahci_platform" ;; "lcd" ;; "hdmi" ;; "ump" ;; "disp" ;; "sunxi-emac" ;; "sunxi-gmac" ;; "nand" ;; "gt2005" ;; sun4i_csi0 i2c_addr=3D0x78 ccm=3D"gt2005" ;; mali "sun4i_ts" ;; "sunxi_cedar_mod" ;; "gpio_sunxi" ;; "sun4i-keyboard" ;; "g-ether" ;; "pwm-sunxi" ;; sun4i_csi0 ;; ft5x_ts ;; "spi-sun7i" ;; "sunxi_can" ;; Taken from %BASE-INITRD-MODULES: "usb-storage" "uas" "usbhid" "hid-generic" "nls_iso8859-1")) (file-systems (cons (file-system (device (file-system-label "root")) (mount-point "/") (type "ext4")) %base-file-systems)) (users (cons (user-account (name "ludo") (comment "Ludovic Court=C3=A8s") (group "users") (supplementary-groups '("wheel" "audio" "video"))) %base-user-accounts)) (packages (cons* screen ;strace pulseaudio wget %base-packages)) (services (append (list heartbeat-service (service dhcp-client-service-type) (service openssh-service-type (openssh-configuration (permit-root-login 'without-password) (authorized-keys `(("ludo" ,%ludo-key) ("root" ,%ludo-key))))) ;; (service dropbear-service-type ;; (dropbear-configuration ;; (port-number 2222) ;; (root-login? #t))) (tor-hidden-service "ssh" '((22 "127.0.0.1:22") (80 "127.0.0.1:8080"))) (service agetty-service-type (agetty-configuration (tty "ttyS0") (keep-baud? #t) (term "vt102") (baud-rate "115200,38400,9600"))) (service ntp-service-type) (service avahi-service-type)) %base-services)) (name-service-switch %mdns-host-lookup-nss)) --=-=-=--