all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Timothy Sample <samplet@ngyro.com>
To: Vagrant Cascadian <vagrant@debian.org>
Cc: guix-devel@gnu.org
Subject: Re: Guix on the ASUS C201PA
Date: Sun, 17 Mar 2019 11:20:25 -0400	[thread overview]
Message-ID: <877ecxzfwm.fsf@ngyro.com> (raw)
In-Reply-To: <874l82ngip.fsf@ponder> (Vagrant Cascadian's message of "Sat, 16 Mar 2019 23:47:58 -0700")

[-- Attachment #1: Type: text/plain, Size: 1133 bytes --]

Vagrant Cascadian <vagrant@debian.org> writes:

> With libreboot re-installed, it's working for me as well!

Hooray!

> I haven't tried just applying the minimal patches and/or configuration
> on top of Guix's linux-libre, but that seems like a logical next step...

One thing worth trying might be to turn off the patches in PrawnOS
kernel, to see if they make a difference for booting.  I think it is
mostly the configuration that is making the difference.

Also, I wrote a little script (see attached) that looks for semantic
differences in kernel configuration files.  I’ll attach it in case you
could use it.  My approach was to compare the PrawnOS and Arch Linux ARM
configurations against the Guix one, and find things that former two
have in common that Guix lacks.  To this end, you can run

    guile --no-auto-compile kconfig.scm guix.cfg prawnos.cfg alarm.cfg

and it should tell you all the things that both the working
configurations explicitly enable (either as “m” or “y”) that Guix does
not.  (I found the output a little cleaner than using “diff”, “sort”,
and friends.)


[-- Attachment #2: kconfig.scm --]
[-- Type: text/plain, Size: 1651 bytes --]

(use-modules (ice-9 match)
             (ice-9 rdelim))

(define (read-config path)
  (call-with-input-file path
    (lambda (port)
      (let loop ((line (read-line port)) (acc '()))
        (if (eof-object? line)
            acc
            (match (string-split line #\=)
              ((key-part value-part)
               (let ((key (string->symbol key-part))
                     (value (match value-part
                              ("y" #t)
                              ("n" #f)
                              ("m" 'm)
                              ((? (lambda (x) (string-prefix? "0x" x)))
                               (string->number (substring value-part 2) 16))
                              (_ (call-with-input-string value-part read)))))
                 (loop (read-line port) (cons `(,key . ,value) acc))))
              (_ (loop (read-line port) acc))))))))

(define (kequal? a b)
  (or (equal? a b)
      (and (memq a '(m #t))
           (memq b '(m #t)))))

(match (program-arguments)
  ((_ p1 p2 p3)
   (let ((c1 (read-config p1))
         (c2 (read-config p2))
         (c3 (read-config p3)))
     (for-each (match-lambda
                 ((k2 . v2)
                  (let ((v1 (match (assq k2 c1)
                              ((_ . v1) v1)
                              (#f 'nil)))
                        (v3 (match (assq k2 c3)
                              ((_ . v3) v3)
                              (#f 'nil))))
                    (unless (or (kequal? v1 v2)
                                (kequal? v1 v3))
                      (write `(,k2 ,v1 -> ,v2 / ,v3))
                      (newline)))))
               c2))))

[-- Attachment #3: Type: text/plain, Size: 986 bytes --]


>> I did manage to get the rockchip.usb_uart with a hacked up USB cable to
>> produce a serial console for debugging and actually seeing the kernel
>> logs rather than them scrolling pass the screen only to give a kernel
>> panic.
>>
>>   (kernel-arguments '("console=ttyS2,115200" "rockchip.usb_uart"))
>
> To be clear, this feature doesn't actually make a serial console over
> USB, it somehow "rewires" one of the USB ports to have a ground, rx and
> tx serial-ttl pinout. So you pretty much need a custom USB-A plug and
> solder/crimp the bare wires to a serial-ttl adapter. Slightly more
> details in Documentation/admin-guide/kernel-parameters.txt.

I made one of these cables, but wasn’t sure if it worked, and I didn’t
know what settings I needed in the kernel to make it work.  Thanks for
figuring this out!  I hope that it gives you a nicer way to debug the
kernel when it boots to a white screen.

Thanks for testing and working on this.


-- Tim

  reply	other threads:[~2019-03-17 15:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-06  7:20 Guix on the ASUS C201PA Timothy Sample
2019-03-06  8:59 ` Vagrant Cascadian
2019-03-06 14:33   ` Timothy Sample
2019-03-10  2:42     ` Vagrant Cascadian
2019-03-17  6:47       ` Vagrant Cascadian
2019-03-17 15:20         ` Timothy Sample [this message]
2019-03-18  5:38           ` Vagrant Cascadian
2019-03-19  7:22             ` Danny Milosavljevic
2019-03-23 16:33             ` Ludovic Courtès
2019-03-23 19:10               ` Mark H Weaver
2019-03-23 21:04               ` Vagrant Cascadian
2019-03-24 18:19                 ` Vagrant Cascadian
2019-03-06 12:02 ` swedebugia
2019-03-06 15:46 ` mikadoZero
2019-03-15 11:23 ` Ludovic Courtès
2019-03-15 17:39   ` Timothy Sample

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877ecxzfwm.fsf@ngyro.com \
    --to=samplet@ngyro.com \
    --cc=guix-devel@gnu.org \
    --cc=vagrant@debian.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.