您尚未登录。

楼主 #1 2020-09-10 09:49:38

Iron
会员
注册时间: 2018-10-23
已发帖子: 65
积分: 29.5
个人网站

Allwinner V3s SD 运行 Alpine Linux 发行版总结(适用于 H3 等其他 ARM 板)

Alpine Linux is a security-oriented, lightweight Linux distribution based on musl libc and busybox.
https://www.alpinelinux.org/
特点:
- 根文件系统采用 tmpfs,掉电会丢失当前运行参数,重新恢复到原系统状态
- 采用 lbu commit 可以保存配置等信息
- 采用 apk 包管理系统

1. SD 卡格式化为 FAT 格式,可选添加其他分区

2. 编译和烧写 u-boot 到 SD 卡

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- LicheePi_Zero_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-

sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/<sdx> bs=1024 seek=8

3. 下载解压 Generic ARM 压缩文件至 SD boot 分区 FAT 目录
  http://dl-cdn.alpinelinux.org/alpine/v3.12/releases/armv7/alpine-uboot-3.12.0-armv7.tar.gz

4. 上电即可运行,系统配置和管理参考
wiki 链接:https://wiki.alpinelinux.org/wiki/Main_Page
apk 镜像源:https://mirrors.alpinelinux.org/

5. 关于外设驱动
- alpine linux 内核编译配置信息在 boot 目录 config-lts
- alpine linux usb kernel 驱动配置为 "host" 模式,v3s 设备树默认为 "otg", 修改设备树为 usb dr_mode 为 "host", 参考 H3 添加 ohci0 ehci0, 重新编译设备树即可识别 USB 外设,已实测可以 U盘,USB WiFi 网卡,4G 模块。。
- V3s 驱动和 H3 类似,例如以太网,LCD 参考 H3 设备树配置即可

最近编辑记录 Iron (2020-09-10 09:50:49)

离线

#2 2020-09-10 11:03:50

zhjerry
会员
注册时间: 2019-12-03
已发帖子: 43
积分: 33

Re: Allwinner V3s SD 运行 Alpine Linux 发行版总结(适用于 H3 等其他 ARM 板)

看了WIKI说安装使用的最小内存是256M和128M, 那么64M的V3S是不够的。 楼主试了吗?

离线

楼主 #3 2020-09-10 11:26:49

Iron
会员
注册时间: 2018-10-23
已发帖子: 65
积分: 29.5
个人网站

Re: Allwinner V3s SD 运行 Alpine Linux 发行版总结(适用于 H3 等其他 ARM 板)

zhjerry 说:

看了WIKI说安装使用的最小内存是256M和128M, 那么64M的V3S是不够的。 楼主试了吗?

有兴趣可以看下面运行日志,mount sd卡其他分区到 /usr 目录,可以安装 gcc,gdb, openssl-server 等, 实测可以用 Windows Visual Studio 通过 ssh 开发 V3s 的 linux 程序。

alpine:~# free
              total        used        free      shared  buff/cache   available
Mem:          51088       25892       11828        6528       13368       18860
Swap:       1048572           0     1048572
alpine:~# df -h
Filesystem                Size      Used Available Use% Mounted on
devtmpfs                 10.0M         0     10.0M   0% /dev
shm                      24.9M         0     24.9M   0% /dev/shm
/dev/mmcblk0p1          511.7M    207.0M    304.8M  40% /media/mmcblk0p1
tmpfs                    24.9M      6.3M     18.7M  25% /
tmpfs                     5.0M     88.0K      4.9M   2% /run
/dev/loop0               27.5M     27.5M         0 100% /.modloop
/dev/mmcblk0p2            5.6G    406.0M      4.9G   8% /usr

完整运行日志

U-Boot SPL 2020.07 (Jul 31 2020 - 15:28:00 +0800)
DRAM: 64 MiB
Trying to boot from MMC1


U-Boot 2020.07 (Jul 31 2020 - 15:28:00 +0800) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   mmc@01c0f000: 0
Loading Environment from FAT... OK
In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000
Net:   No ethernet found.
starting USB...
No working controllers found
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinux.conf
246 bytes read in 4 ms (59.6 KiB/s)
1:	Linux lts
Retrieving file: /boot/initramfs-lts
6900974 bytes read in 318 ms (20.7 MiB/s)
Retrieving file: /boot/vmlinuz-lts
4948480 bytes read in 230 ms (20.5 MiB/s)
append: modules=loop,squashfs,sd-mod,usb-storage,ext4
Retrieving file: /boot/dtbs-lts/sun8i-v3s-licheepi-ethernet.dtb
10072 bytes read in 50 ms (196.3 KiB/s)
## Flattened Device Tree blob at 41800000
   Booting using the fdt blob at 0x41800000
   Loading Ramdisk to 4276b000, end 42dffcee ... OK
   Loading Device Tree to 42765000, end 4276a757 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.4.43-1-lts (buildozer@build-3-12-armv7) (gcc version 9.3.0 (Alpine 9.3.0)) #2-Alpine SMP Thu, 28 May 2020 20:13:48 UTC
[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Lichee Pi Zero Ethernet
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Failed to reserve 48 MiB
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: Using PSCI v0.1 Function IDs from DT
[    0.000000] percpu: Embedded 20 pages/cpu s51596 r8192 d22132 u81920
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16240
[    0.000000] Kernel command line: modules=loop,squashfs,sd-mod,usb-storage,ext4
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.000000] Memory: 43324K/65536K available (7168K kernel code, 592K rwdata, 2416K rodata, 1024K init, 2807K bss, 22212K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] random: get_random_u32 called from cache_random_seq_create+0x98/0x148 with crng_init=0
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] kmemleak: Kernel memory leak detector disabled
[    0.000000] ftrace: allocating 26545 entries in 52 pages
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] GIC: GICv2 detected, but range too small and irqchip.gicv2_force_probe not set
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000008] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000021] Switching to timer-based delay loop, resolution 41ns
[    0.000547] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.001158] Console: colour dummy device 80x30
[    0.001586] printk: console [tty0] enabled
[    0.001669] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.001708] pid_max: default: 32768 minimum: 301
[    0.001974] LSM: Security Framework initializing
[    0.002029] Yama: becoming mindful.
[    0.002206] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.002246] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.003793] CPU: Testing write buffer coherency: ok
[    0.004623] /cpus/cpu@0 missing clock-frequency property
[    0.004683] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.005967] Setting up static identity map for 0x40300000 - 0x403000ac
[    0.006620] rcu: Hierarchical SRCU implementation.
[    0.007255] EFI services will not be available.
[    0.007584] smp: Bringing up secondary CPUs ...
[    0.007619] smp: Brought up 1 node, 1 CPU
[    0.007637] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[    0.007654] CPU: All CPU(s) started in HYP mode.
[    0.007667] CPU: Virtualization extensions available.
[    0.008718] devtmpfs: initialized
[    0.012687] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.013621] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.013712] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[    0.014369] pinctrl core: initialized pinctrl subsystem
[    0.016193] DMI not present or invalid.
[    0.016924] NET: Registered protocol family 16
[    0.017599] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.018451] audit: initializing netlink subsys (disabled)
[    0.023252] audit: type=2000 audit(0.020:1): state=initialized audit_enabled=0 res=1
[    0.028317] cpuidle: using governor ladder
[    0.028373] cpuidle: using governor menu
[    0.028885] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.028934] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.036444] Serial: AMBA PL011 UART driver
[    0.116843] fbcon: Taking over console
[    0.119984] pps_core: LinuxPPS API ver. 1 registered
[    0.120037] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.120100] PTP clock support registered
[    0.131246] NetLabel: Initializing
[    0.131303] NetLabel:  domain hash size = 128
[    0.131319] NetLabel:  protocols = UNLABELED CIPSOv4 CALIPSO
[    0.131497] NetLabel:  unlabeled traffic allowed by default
[    0.133587] clocksource: Switched to clocksource arch_sys_counter
[    0.176891] VFS: Disk quotas dquot_6.6.0
[    0.177073] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.233028] thermal_sys: Registered thermal governor 'fair_share'
[    0.233039] thermal_sys: Registered thermal governor 'step_wise'
[    0.234431] NET: Registered protocol family 2
[    0.236369] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.236480] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.236531] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.236569] TCP: Hash tables configured (established 1024 bind 1024)
[    0.236797] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.236863] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.237495] NET: Registered protocol family 1
[    0.237587] NET: Registered protocol family 44
[    0.238645] Trying to unpack rootfs image as initramfs...
[    0.832906] Freeing initrd memory: 6740K
[    0.838651] Initialise system trusted keyrings
[    0.841009] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[    0.879500] Key type asymmetric registered
[    0.879559] Asymmetric key parser 'x509' registered
[    0.880350] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[    0.881389] io scheduler mq-deadline registered
[    0.881438] io scheduler kyber registered
[    0.899395] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.917310] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.928126] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pb not found, using dummy regulator
[    0.949772] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 31, base_baud = 1500000) is a U6_16550A
[    1.576464] printk: console [ttyS0] enabled
[    1.582345] Serial: AMBA driver
[    1.587524] msm_serial: driver initialized
[    1.633091] brd: module loaded
[    1.639195] libphy: Fixed MDIO Bus: probed
[    1.648553] sun6i-rtc 1c20400.rtc: registered as rtc0
[    1.653872] sun6i-rtc 1c20400.rtc: RTC enabled
[    1.665153] ledtrig-cpu: registered to indicate activity on CPUs
[    1.674920] ashmem: initialized
[    1.684601] Key type dns_resolver registered
[    1.688975] ThumbEE CPU extension supported.
[    1.693279] Registering SWP/SWPB emulation handler
[    1.699439] registered taskstats version 1
[    1.703795] Loading compiled-in X.509 certificates
[    1.710486] Key type ._fscrypt registered
[    1.715281] Key type .fscrypt registered
[    1.728758] sun6i-rtc 1c20400.rtc: setting system clock to 2020-09-10T03:19:22 UTC (1599707962)
[    1.744818] Freeing unused kernel memory: 1024K
[    1.763799] Run /init as init process
Alpine Init 3.4.5-r3
 * Loading boot drivers: [    1.889631] loop: module loaded
[    1.896977] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    1.914530] SCSI subsystem initialized
[    1.934639] usbcore: registered new interface driver usbfs
[    1.941062] usbcore: registered new interface driver hub
[    1.947081] usbcore: registered new device driver usb
[    1.959026] usbcore: registered new interface driver usb-storage
ok.
 * Mounting boot media: [    2.860588] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator
[    2.896357] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    2.905696] sun8i-v3s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pg not found, using dummy regulator
[    2.941682] sunxi-mmc 1c10000.mmc: initialized, max. request size: 16384 KB
[    2.958369] mmc0: host does not support reading read-only switch, assuming write-enable
[    2.974554] mmc1: queuing unknown CIS tuple 0x01 (3 bytes)
[    2.995903] mmc0: new high speed SDHC card at address 1234
[    3.007654] mmc1: queuing unknown CIS tuple 0x1a (5 bytes)
[    3.026869] mmc1: queuing unknown CIS tuple 0x1b (8 bytes)
[    3.045674] mmc1: queuing unknown CIS tuple 0x80 (1 bytes)
[    3.055954] mmcblk0: mmc0:1234 SA08G 7.21 GiB 
[    3.064187] mmc1: queuing unknown CIS tuple 0x81 (1 bytes)
[    3.073905] mmc1: queuing unknown CIS tuple 0x82 (1 bytes)
[    3.080014] mmc1: new high speed SDIO card at address 0001
[    3.085946]  mmcblk0: p1 p2 p3
[    4.368575] FAT-fs (mmcblk0p1): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
[    4.403364] random: fast init done
[    4.598556] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
ok.
 * Loading user settings from /media/mmcblk0p1/alpine.apkovl.tar.gz: ok.
 * Installing packages to root filesystem: (1/56) Installing musl (1.1.24-r9)
(2/56) Installing busybox (1.31.1-r19)
Executing busybox-1.31.1-r19.post-install
(3/56) Installing alpine-baselayout (3.2.0-r7)
Executing alpine-baselayout-3.2.0-r7.pre-install
Executing alpine-baselayout-3.2.0-r7.post-install
(4/56) Installing openrc (0.42.1-r11)
Executing openrc-0.42.1-r11.post-install
(5/56) Installing alpine-conf (3.9.0-r1)
(6/56) Installing libcrypto1.1 (1.1.1g-r0)
(7/56) Installing libssl1.1 (1.1.1g-r0)
(8/56) Installing ca-certificates-bundle (20191127-r4)
(9/56) Installing libtls-standalone (2.9.1-r1)
(10/56) Installing ssl_client (1.31.1-r19)
(11/56) Installing zlib (1.2.11-r3)
(12/56) Installing apk-tools (2.10.5-r1)
(13/56) Installing busybox-suid (1.31.1-r19)
(14/56) Installing busybox-initscripts (3.2-r2)
Executing busybox-initscripts-3.2-r2.post-install
(15/56) Installing scanelf (1.2.6-r0)
(16/56) Installing musl-utils (1.1.24-r9)
(17/56) Installing libc-utils (0.7.2-r3)
(18/56) Installing alpine-keys (2.2-r0)
(19/56) Installing alpine-base (3.12.0-r0)
(20/56) Installing libcap (2.27-r0)
(21/56) Installing chrony (3.5.1-r0)
Executing chrony-3.5.1-r0.pre-install
(22/56) Installing chrony-openrc (3.5.1-r0)
(23/56) Installing libgcc (9.3.0-r2)
(24/56) Installing libstdc++ (9.3.0-r2)
  3% #                                           [    7.964107] apk invoked oom-killer: gfp_mask=0x100cca(GFP_HIGHUSER_MOVABLE), order=0, oom_score_adj=0
[    7.973376] CPU: 0 PID: 1130 Comm: apk Not tainted 5.4.43-1-lts #2-Alpine
[    7.980166] Hardware name: Allwinner sun8i Family
[    7.984871] Backtrace: 
[    7.987346] [<8030e3dc>] (dump_backtrace) from [<8030e73c>] (show_stack+0x20/0x24)
[    7.994925]  r7:00000548 r6:60000013 r5:00000000 r4:80e8a110
[    8.000593] [<8030e71c>] (show_stack) from [<809759ac>] (dump_stack+0xc4/0xd8)
[    8.007831] [<809758e8>] (dump_stack) from [<804a29fc>] (dump_header+0x64/0x1b4)
[    8.015233]  r7:00000548 r6:80ba8c6c r5:83be0000 r4:829edd28
[    8.020900] [<804a2998>] (dump_header) from [<804a1db4>] (oom_kill_process+0x168/0x174)
[    8.028909]  r7:00000548 r6:80ba8c6c r5:829edd28 r4:83be0000
[    8.034575] [<804a1c4c>] (oom_kill_process) from [<804a2824>] (out_of_memory+0x260/0x33c)
[    8.042758]  r7:80e06494 r6:80e09640 r5:829edd28 r4:83be0000
[    8.048429] [<804a25c4>] (out_of_memory) from [<804ee800>] (__alloc_pages_nodemask+0xdf0/0x1130)
[    8.057218]  r6:829ec000 r5:00000000 r4:00000000
[    8.061849] [<804eda10>] (__alloc_pages_nodemask) from [<804b77e0>] (shmem_alloc_page+0x44/0x68)
[    8.070641]  r10:82270148 r9:8396d800 r8:000000dc r7:00000005 r6:82270038 r5:80e06744
[    8.078471]  r4:82ae1008
[    8.081015] [<804b779c>] (shmem_alloc_page) from [<804b9300>] (shmem_getpage_gfp.constprop.0+0x180/0x888)
[    8.090581]  r4:82ae1008
[    8.093125] [<804b9180>] (shmem_getpage_gfp.constprop.0) from [<804bb130>] (shmem_fallocate+0x3a4/0x550)
[    8.102611]  r10:829ec000 r9:822700c0 r8:000000dc r7:0000011a r6:00000000 r5:00000000
[    8.110441]  r4:82270038
[    8.112985] [<804bad8c>] (shmem_fallocate) from [<80515bdc>] (vfs_fallocate+0x178/0x2a4)
[    8.121082]  r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:804bad8c r5:83a21b40
[    8.128913]  r4:00000000
[    8.131453] [<80515a64>] (vfs_fallocate) from [<8051681c>] (ksys_fallocate+0x50/0x84)
[    8.139290]  r10:00000160 r9:829ec000 r8:83a21b40 r7:00000000 r6:00000000 r5:00000000
[    8.147120]  r4:83a21b40
[    8.149661] [<805167cc>] (ksys_fallocate) from [<80516874>] (sys_fallocate+0x24/0x2c)
[    8.157497]  r8:80301204 r7:00000160 r6:7e86f034 r5:00000000 r4:00119644
[    8.164204] [<80516850>] (sys_fallocate) from [<80301000>] (ret_fast_syscall+0x0/0x4c)
[    8.172124] Exception stack(0x829edfa8 to 0x829edff0)
[    8.177182] dfa0:                   00119644 00000000 00000008 00000000 00000000 00000000
[    8.185366] dfc0: 00119644 00000000 7e86f034 00000160 00000008 7e871574 7e871190 00000000
[    8.193546] dfe0: 00000003 7e86ef1c 004ff0c1 76fae12a
[    8.198600]  r5:00000000 r4:00119644
[    8.202347] Mem-Info:
[    8.204694] active_anon:5389 inactive_anon:3658 isolated_anon:0
[    8.204694]  active_file:1 inactive_file:0 isolated_file:0
[    8.204694]  unevictable:0 dirty:1 writeback:0 unstable:0
[    8.204694]  slab_reclaimable:950 slab_unreclaimable:1348
[    8.204694]  mapped:631 shmem:5943 pagetables:19 bounce:0
[    8.204694]  free:207 free_pcp:5 free_cma:0
[    8.236446] Node 0 active_anon:21556kB inactive_anon:14632kB active_file:4kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:2524kB dirty:4kB writeback:0kB shmem:23772kB writeback_tmp:0kB unstable:0kB all_unreclaimable? yes
[    8.258997] Normal free:828kB min:832kB low:1040kB high:1248kB active_anon:21556kB inactive_anon:14632kB active_file:4kB inactive_file:0kB unevictable:0kB writepending:4kB present:65536kB managed:51088kB mlocked:0kB kernel_stack:320kB pagetables:76kB bounce:0kB free_pcp:20kB local_pcp:20kB free_cma:0kB
[    8.285774] lowmem_reserve[]: 0 0 0
[    8.289272] Normal: 17*4kB (UE) 11*8kB (UE) 10*16kB (UE) 4*32kB (UM) 2*64kB (ME) 0*128kB 1*256kB (E) 0*512kB 0*1024kB 0*2048kB 0*4096kB = 828kB
[    8.302180] 5945 total pagecache pages
[    8.305947] 0 pages in swap cache
[    8.309266] Swap cache stats: add 0, delete 0, find 0/0
[    8.314505] Free swap  = 0kB
[    8.317388] Total swap = 0kB
[    8.320269] 16384 pages RAM
[    8.323064] 0 pages HighMem/MovableOnly
[    8.326919] 3612 pages reserved
[    8.330063] 0 pages cma reserved
[    8.333292] Tasks state (memory values in pages):
[    8.338009] [  pid  ]   uid  tgid total_vm      rss pgtables_bytes swapents oom_score_adj name
[    8.346658] [   1130]     0  1130     3892     3583    26624        0             0 apk
[    8.354690] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),global_oom,task_memcg=/,task=apk,pid=1130,uid=0
[    8.364840] Out of memory: Killed process 1130 (apk) total-vm:15568kB, anon-rss:12356kB, file-rss:0kB, shmem-rss:1976kB, UID:0 pgtables:26kB oom_score_adj:0
[    8.386275] oom_reaper: reaped process 1130 (apk), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
Killed
ok.


   OpenRC 0.42.1.188bfebd7f is starting up Linux 5.4.43-1-lts (armv7l)

 * /proc is already mounted
 * Mounting /run ... * /run/openrc: creating directory
 * /run/lock: creating directory
 * /run/lock: correcting owner
 * Caching service dependencies ... [ ok ]
 * Remounting devtmpfs on /dev ... [ ok ]
 * Mounting /dev/mqueue ... [ ok ]
 * Mounting modloop  ... * Missing openssl. Modloop verification disabled!
 [ ok ]
 * Mounting security filesystem ... [ ok ]
 * Mounting debug filesystem ... [ ok ]
 * Mounting persistent storage (pstore) filesystem ... [ ok ]
 * Starting busybox mdev ... [ ok ]
 * Loading hardware drivers ... [ ok ]
 * Loading modules ... [ ok ]
 * Setting system clock using the hardware clock [UTC] ... [ ok ]
 * Checking local filesystems  ...fsck: fsck.ext4: No such file or directory
 [ ok ]
 * Remounting filesystems ... [ ok ]
 * Mounting local filesystems ... [ ok ]
 * Configuring kernel parameters ... [ ok ]
 * Migrating /var/lock to /run/lock ... [ ok ]
 * Creating user login records ... [ ok ]
 * Wiping /tmp directory ... [ ok ]
 * Setting hostname ... [ ok ]
 * Setting keymap ... [ ok ]
 * Starting networking ... *   lo ... [ ok ]
 *   eth0 ...udhcpc: started, v1.31.1
udhcpc: sending discover
udhcpc: sending select for 192.168.10.233
udhcpc: lease of 192.168.10.233 obtained, lease time 86400
 [ ok ]
 * Starting busybox syslog ... [ ok ]
 * Starting busybox acpid ... [ ok ]
 * Starting chronyd ... [ ok ]
 * Starting busybox crond ... [ ok ]

Welcome to Alpine Linux 3.12
Kernel 5.4.43-1-lts on an armv7l (/dev/ttyS0)

alpine login: root
Password: 
Welcome to Alpine!

The Alpine Wiki contains a large amount of how-to guides and general
information about administrating Alpine systems.
See <http://wiki.alpinelinux.org/>.

You can setup the system with the command: setup-alpine

You may change this message by editing /etc/motd.

alpine:~# df -h
Filesystem                Size      Used Available Use% Mounted on
devtmpfs                 10.0M         0     10.0M   0% /dev
shm                      24.9M         0     24.9M   0% /dev/shm
/dev/mmcblk0p1          511.7M    207.0M    304.8M  40% /media/mmcblk0p1
tmpfs                    24.9M      6.3M     18.7M  25% /
tmpfs                     5.0M     88.0K      4.9M   2% /run
/dev/loop0               27.5M     27.5M         0 100% /.modloop
/dev/mmcblk0p2            5.6G    406.0M      4.9G   8% /usr
alpine:~# free
              total        used        free      shared  buff/cache   available
Mem:          51088       25596       12192        6528       13300       19168
Swap:             0           0           0
alpine:~# swapon /dev/mmcblk0p3
alpine:~# free
              total        used        free      shared  buff/cache   available
Mem:          51088       25852       11924        6528       13312       18908
Swap:       1048572           0     1048572
alpine:~# fdisk -l
Disk /dev/mmcblk0: 7386 MB, 7744782336 bytes, 15126528 sectors
236352 cylinders, 4 heads, 16 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device       Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/mmcblk0p1 *  0,32,33     65,101,36         2048    1050623    1048576  512M  e Win95 FAT16 (LBA)
/dev/mmcblk0p2    65,101,37   811,10,31      1050624   13029375   11978752 5849M 83 Linux
/dev/mmcblk0p3    811,10,32   941,148,39    13029376   15126527    2097152 1024M 82 Linux swap
alpine:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 06:BF:32:25:66:3A  
          inet addr:192.168.10.233  Bcast:0.0.0.0  Mask:255.255.255.0
          inet6 addr: fe80::4bf:32ff:fe25:663a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:106 errors:0 dropped:1 overruns:0 frame:0
          TX packets:29 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:12659 (12.3 KiB)  TX bytes:2986 (2.9 KiB)
          Interrupt:32 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

alpine:~# top
Mem: 39256K used, 11832K free, 6528K shrd, 1204K buff, 12156K cached
CPU:   0% usr   0% sys   0% nic 100% idle   0% io   0% irq   0% sirq
Load average: 0.02 0.04 0.01 1/57 2088
  PID  PPID USER     STAT   VSZ %VSZ CPU %CPU COMMAND
 2081  2080 root     S     1336   3%   0   0% -ash
 1947     1 root     S     1312   3%   0   0% /sbin/syslogd -t
 2088  2081 root     R     1300   3%   0   0% top
 2052     1 root     S     1296   3%   0   0% /usr/sbin/crond -c /etc/crontabs
    1     0 root     S     1292   3%   0   0% /sbin/init
 2080     1 root     S     1292   3%   0   0% /bin/login -- root
 2076     1 root     S     1292   3%   0   0% /sbin/getty 38400 tty6
 2064     1 root     S     1292   3%   0   0% /sbin/getty 38400 tty3
 2068     1 root     S     1292   3%   0   0% /sbin/getty 38400 tty4
 2069     1 root     S     1292   3%   0   0% /sbin/getty 38400 tty5
 1892     1 root     S     1292   3%   0   0% udhcpc -b -R -p /var/run/udhcpc.et
 2060     1 root     S     1292   3%   0   0% /sbin/getty 38400 tty2
 2059     1 root     S     1292   3%   0   0% /sbin/getty 38400 tty1
 2027     1 chrony   S      868   2%   0   0% /usr/sbin/chronyd -f /etc/chrony/c
   10     2 root     IW       0   0%   0   0% [rcu_sched]
 1079     2 root     IW<      0   0%   0   0% [kworker/0:2H-kb]
    9     2 root     SW       0   0%   0   0% [ksoftirqd/0]
   15     2 root     IW       0   0%   0   0% [kworker/u2:1-ev]
   63     2 root     IW       0   0%   0   0% [kworker/0:1-eve]
  968     2 root     IW<      0   0%   0   0% [kworker/0:1H-kb]

离线

#4 2024-10-19 16:46:07

xichuangxue
会员
注册时间: 2018-06-04
已发帖子: 23
积分: 204

Re: Allwinner V3s SD 运行 Alpine Linux 发行版总结(适用于 H3 等其他 ARM 板)

在H3上试了一下, 楼主,请问下,每次开机后,我修改的启动脚本,安装的软件,重新上电后都没了,看官网说明是因为使用的是 initRam FS, 请问有什么解决方法吗?

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn