Alpine Linux Porting (1.999) The light at the end of tunnel

一样先上进度log:

+ exec /bin/busybox switch_root /sysroot /sbin/init

   OpenRC 0.44.5.af85a2aa85 is starting up Linux 5.10.0 (riscv32)

 * /proc is already mounted
 * Mounting /run ...[  997.108243] tmpfs: Unknown parameter 'mode'
mount: mounting tmpfs on /run failed: Invalid argument
 * Unable to mount tmpfs on /run.
 * Can't continue.
 * Caching service dependencies ... [ ok ]
 * Clock skew detected with `(null)'
 * Adjusting mtime of `/run/openrc/deptree' to Tue Sep 21 16:34:03 2021
 * WARNING: clock skew detected!
 * Remounting devtmpfs on /dev ... [ ok ]
 * Mounting /dev/shm ...[ 1196.469000] tmpfs: Unknown parameter 'mode'
mount: mounting shm on /dev/shm failed: Invalid argument
 [ !! ]
 * Mounting modloop  ... [ !! ]
 * ERROR: modloop failed to start
 * Starting busybox mdev .../lib/rc/sh/openrc-run.sh: line 21: can't create /proc/sys/kernel/hotplug: nonexistent directory
 [ ok ]
 * Loading hardware drivers ... [ ok ]
 * WARNING: clock skew detected!
 * Mounting modloop  ... [ !! ]
 * ERROR: modloop failed to start
 * Setting the local clock based on last shutdown time ... * swclock: settimeofday: Function not implemented
 [ !! ]
 * ERROR: swclock failed to start
 * Loading modules ...modprobe: can't change directory to '/lib/modules': No such file or directory
modprobe: can't change directory to '/lib/modules': No such file or directory
 [ ok ]
 * Checking local filesystems  ... [ ok ]
 * Remounting filesystems ... [ ok ]
 * Mounting local filesystems ... [ ok ]
 * Configuring kernel parameters ...sysctl: error: 'net.ipv4.tcp_syncookies' is an unknown key
sysctl: error: 'kernel.unprivileged_bpf_disabled' is an unknown key
 [ ok ]
 * Migrating /var/lock to /run/lock ... [ ok ]
 * Creating user login records ... [ ok ]
 * Clock skew detected with `(null)'
 * Cleaning /var/run ... [ ok ]
 * Wiping /tmp directory ... [ ok ]
 * Caching service dependencies ... [ ok ]
 * Clock skew detected with `(null)'
 * Adjusting mtime of `/run/openrc/deptree' to Tue Sep 21 16:34:03 2021
 * WARNING: clock skew detected!
 * Remounting devtmpfs on /dev ... [ ok ]
 * Mounting /dev/shm ...mount: mounting shm on /dev/shm failed: Invalid argument
 [ !! ]
 * Mounting modloop  ... [ !! ]
 * ERROR: modloop failed to start
 * Starting busybox mdev .../lib/rc/sh/openrc-run.sh: line 21: can't create /proc/sys/kernel/hotplug: nonexistent directory
 [ ok ]
 * Loading hardware drivers ... [ ok ]
 * Setting the local clock based on last shutdown time ... * swclock: settimeofday: Function not implemented
 [ !! ]
 * ERROR: swclock failed to start
 * Loading modules ...modprobe: can't change directory to '/lib/modules': No such file or directory
modprobe: can't change directory to '/lib/modules': No such file or directory
 [ ok ]
 * Checking local filesystems  ... [ ok ]
 * Remounting filesystems ... [ ok ]
 * Mounting local filesystems ... [ ok ]
 * Configuring kernel parameters ...sysctl: error: 'net.ipv4.tcp_syncookies' is an unknown key
sysctl: error: 'kernel.unprivileged_bpf_disabled' is an unknown key
 [ ok ]
 * /var/lock does not point to /run/lock.
 * Setting /var/lock to point to /run/lock.
 * Creating user login records ... [ ok ]
 * Cleaning /var/run ... [ ok ]
 * Wiping /tmp directory ... [ ok ]
can't open /dev/liteuart: No such file or directory
Welcome to Alpine Linux 3.15.0_alpha20210804 (edge)
Kernel 5.10.0 on an riscv32 (/dev/ttyLXU0)
can't open /dev/liteuart: No such file or directory
can't open /dev/liteuart: No such file or directory
can't open /dev/liteuart: No such file or directory
(none) login: 
Kernel 5.10.0 on an riscv32 (/dev/ttyLXU0)

在QEMU上验证完後,摆放到实体板子上就是另一个重要的课题了。
目前是能够进到kernel的login shell,但是会遇到 OpenRC 设定的问题,这会在下一篇时,开始跳进去看OpenRC有什麽sysinit相关的target需要作调整。

细项来说,今天遇到的实体问题是:因为在真实硬体上,我的RAM空间是有限的,不能像我在QEMU上可以直接把Alpine的apk们强塞进initramfs。所以实际上我是透过OrangeCrab上的spi_mmc、去mount SD卡上来给Alpine Init去安装,这边还算顺利,就单纯的试误。中间遇到的小插曲是Linux-on-LitexVexriscv的buildroot config中,没有打开CONFIG_TMPFS、只有传统的ramfs,这点对Alpine来说太harsh了很难tweak,最後我还是妥协重编了一次buildroot kernel,最後卡在的点就是如面log所示,他进userspace时,会疯狂抱怨Litex/VexRiscv的UART - - LiteUART 消失了,这点我必须要深入Alpine的OpenRC里面,去看看到底是哪个环节炸裂掉。

下集待续~


<<:  JS Library 学习笔记:嘿!有听过 GSAP 吗? (四)

>>:  Day 20:1566. Detect Pattern of Length M Repeated K or More Times

JAVAFX 跳出新窗格

请问我该怎麽让他按下purchas这个action後能购开启一个新视窗 ...

Day 24 Encapsulation

物件导向程序设计有三大特性:封装、继承、多型,今天要来介绍封装。 封装顾名思义就是把属性封在类别里面...

[从0到1] C#小乳牛 练成基础程序逻辑 Day 12 - 四大套路 读懂程序码 Sequence

套路程序码的4种方法 | 一步一步来 | DEMO 🐄点此填写今日份随堂测验 ...

Day17:今天来谈一下Microsoft 365 的威胁防护简介

威胁是攻击者可以用来渗透组织的潜在弱点,攻击者会跨越多个网域 (例如电子邮件、身分识别、端点和应用程...

Day 24:Ansible 的一些设定

昨天简单介绍完 Ansible 的基本概念了,今天来谈谈该如何使用 Ansible 来做事吧。 设定...