本帖最后由 robe.zhang 于 2018-3-19 15:43 编辑
【BPI-M2 zero试用】自制纯净Debian系统
发帖背景:
armbian 系统,5.36 版本,upgrade 之后,无法启动,系统上的文件被破坏了,以前的 ubuntu 也不稳定,不好用,当前没有稳定好用的系统。然后就自己动手,编译制作了一个纯净版 linux 系统,准备把这个当作一个小项目来搞,利用业余时间持续更新优化。
目标系统信息:
uboot:主线版本 2018.01
kernel:主线版本 4.14.20
debian:9,
系统特点:
- 稳定性还是相当厉害,很有保证。
- 系统比较纯净,干干净净的,除了系统的基本组件,其他所有软件都需要自己安装。
- 操作系统外围组件,python-gpio 这些东西一个没有,纯净系统,不要这些。
- 硬件驱动全部支持,官方系统有的,这个系统也有,一个都不少。
- 系统开发文件全部安装,对软件开发很有用的。
- 现在存在的问题:后台信息容易往控制台上刷,这个问题,是为了调试内核,专门调出来的,稍后内核不再变动的时候关了,现在先开着,调试方便点。
- 没联网的话,开机有几个网络服务不能启动,连上网就好了。
ubuntu 大家都熟悉,Ubuntu 就是基于 debian 二次开发的;树莓派系统也是基于 debian 开发的;香蕉派 BPI-M2 zero 不能落下,也要跟上去,哈哈
当前进度:
uboot kernel 已经调通,文件系统也就绪了,sd 卡手动调出来了,现在已经可用,稍后完善后就可以打包,算是bate 版本吧。有兴趣的小伙伴在楼下留言可以内测,使用过程中碰到的系统问题告诉我,我准备花一个月时间,持续优化这个版本。
优化的原则:
系统的问题,优化,非系统问题,不关注,特别是树莓派移植的那些 gpio 库,这些东西就不关注了,集中精力搞一个纯净稳定好用的 debian 最小化系统。如果哪位有时间在这个基础上集成一些库,那就更好了,一起合作。
下面贴上一些系统信息,今天全部重新编译的:
uboot:- U-Boot SPL 2018.01 (Mar 18 2018 - 07:16:07)
- DRAM: 512 MiB
- Trying to boot from MMC1
- BPI: skip sunxi_mmc_getcd pin 166(1)
- U-Boot 2018.01 (Mar 18 2018 - 07:16:07 -0400) Allwinner Technology
- CPU: Allwinner H3 (SUN8I 1680)
- Model: Banana Pi BPI-M2-Zero
- DRAM: 512 MiB
- MMC: SUNXI SD/MMC: 0
- BPI: skip sunxi_mmc_getcd pin 166(1)
- *** Warning - bad CRC, using default environment
- In: serial
- Out: serial
- Err: serial
- Net: No ethernet found.
- starting USB...
复制代码 kernel:- ## Booting kernel from Legacy Image at 40008000 ...
- Image Name: Linux-4.14.20-BPI-Kernel
- Image Type: ARM Linux Kernel Image (uncompressed)
- Data Size: 7104640 Bytes = 6.8 MiB
- Load Address: 40008000
- Entry Point: 40008000
- Verifying Checksum ... OK
- ## Flattened Device Tree blob at 43000000
- Booting using the fdt blob at 0x43000000
- Loading Kernel Image ... OK
- Loading Device Tree to 49ff5000, end 49fffade ... OK
- Starting kernel ...
- [ 0.000000] Booting Linux on physical CPU 0x0
- [ 0.000000] Linux version 4.14.20-BPI-Kernel (root@debian) (gcc version 6.3.0 20170516 (Debian 6.3.0-18)) #4 SMP Sun Mar 18 10:38:25 EDT 2018
- [ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=50c5387d
- [ 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: Banana Pi BPI-M2-Zero
- [ 0.000000] Memory policy: Data cache writealloc
- [ 0.000000] Reserved memory: created CMA memory pool at 0x5c000000, size 64 MiB
- [ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
- [ 0.000000] On node 0 totalpages: 131072
- [ 0.000000] free_area_init_node: node 0, pgdat c0dd9d80, node_mem_map dbb59000
- [ 0.000000] Normal zone: 1152 pages used for memmap
- [ 0.000000] Normal zone: 0 pages reserved
- [ 0.000000] Normal zone: 131072 pages, LIFO batch:31
- [ 0.000000] random: fast init done
- [ 0.000000] percpu: Embedded 17 pages/cpu @dbafd000 s39884 r8192 d21556 u69632
- [ 0.000000] pcpu-alloc: s39884 r8192 d21556 u69632 alloc=17*4096
- [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
- [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 129920
- [ 0.000000] Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait rootfstype=ext4 panic=10 consoleblank=0
- [ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
- [ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
- [ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
- [ 0.000000] allocated 524288 bytes of page_ext
- [ 0.000000] Memory: 439052K/524288K available (8192K kernel code, 949K rwdata, 2432K rodata, 1024K init, 346K bss, 19700K reserved, 65536K cma-reserved, 0K highmem)
- [ 0.000000] Virtual kernel memory layout:
- [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
- [ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
- [ 0.000000] vmalloc : 0xe0800000 - 0xff800000 ( 496 MB)
- [ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
- [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
- [ 0.000000] modules : 0xbf800000 - 0xbfe00000 ( 6 MB)
- [ 0.000000] .text : 0xc0008000 - 0xc0900000 (9184 kB)
- [ 0.000000] .init : 0xc0c00000 - 0xc0d00000 (1024 kB)
复制代码 debian:- [ OK ] Started Getty on tty4.
- [ OK ] Started Getty on tty6.
- [ OK ] Started Getty on tty3.
- [ OK ] Reached target Login Prompts.
- [ OK ] Reached target Multi-User System.
- [ OK ] Reached target Graphical Interface.
- [ 11.926187] thermal thermal_zone0: failed to read out thermal zone (-110)
- [ 12.143652] asoc-simple-card sound: i2s-hifi <-> 1c22800.i2s mapping ok
- [ 12.364949] brcmfmac: brcmf_fw_map_chip_to_name: using brcm/brcmfmac43430-sdio.bin for chip 0x00a9a6(43430) rev 0x000001
- [ 12.396429] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43430-sdio.bin failed with error -2
- [ 12.406225] brcmfmac mmc1:0001:1: Falling back to user helper
- Debian GNU/Linux 9 debian-robe ttyS0
- debian-robe login: [ 13.446123] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
- [ 14.459356] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50
复制代码 关机信息:- [ OK ] Stopped target Timers.
- [ OK ] Stopped Daily Cleanup of Temporary Directories.
- [ OK ] Stopped Daily apt upgrade and clean activities.
- [ OK ] Stopped target Sound Card.
- [ OK ] Closed Load/Save RF Kill Switch Status /dev/rfkill Watch.
- [ OK ] Reached target Unmou Stopping Serial Getty on ttyS0...
- Stopping Getty on tty1...
- Stopping Getty on tty2...
- Stopping Getty on tty5...
- [ OK ] Stopped Daily apt download activities.
- [ OK ] Stopped target System Time Synchronized.
- Stopping Getty on tty4...
- Stopping System Logging Service...
- [ OK ] Stopped Regular background program processing daemon.
- [ OK ] Stopped System Logging Service.
- [ OK ] Stopped Serial Getty on ttyS0.
- [ OK ] Stopped Getty on tty1.
- [ OK ] Stopped Getty on tty5.
- [ OK ] Stopped Getty on tty2.
- [ OK ] Stopped Getty on tty4.
- [ OK ] Stopped Getty on tty6.
- [ OK ] Stopped Getty on tty3.
- [ OK ] Removed slice system-getty.slice.
- [ OK ] Removed slice system-serial\x2dgetty.slice.
- Stopping Permit User Sessions...
- [ OK ] Stopped Permit User Sessions.
- [ OK ] Stopped target Network.
- Stopping Raise network interfaces...
- [ OK ] Stopped target Remote File Systems.
- [ OK ] Stopped target Basic System.
- [ OK ] Stopped target Slices.
- [ OK ] Stopped target System Initialization.
- [ OK ] Stopped target Swap.
- [ OK ] Stopped target Encrypted Volumes.
- Stopping Load/Save Random Seed...
- [ OK ] Stopped target Sockets.
- [ OK ] Closed Syslog Socket.
- [ OK ] Stopped target Paths.
- [ OK ] Stopped Dispatch Password Requests to Console Directory Watch.
- [ OK ] Stopped Forward Password Requests to Wall Directory Watch.
- [ OK ] Stopped Load/Save Random Seed.
- [ OK ] Stopped Raise network interfaces.
- [ OK ] Stopped target Local File Systems.
- [ OK ] Stopped target Local File Systems (Pre).
- [ OK ] Stopped Create Static Device Nodes in /dev.
- [ OK ] Stopped Remount Root and Kernel File Systems.
- [ OK ] Stopped Apply Kernel Variables.
- [ OK ] Stopped Load Kernel Modules.
- [ OK ] Reached target Shutdown.
- [ 208.624129] systemd-shutdow: 21 output lines suppressed due to ratelimiting
- [ 208.717936] systemd-shutdown[1]: Sending SIGTERM to remaining processes...
- [ 208.746308] systemd-journald[146]: Received SIGTERM from PID 1 (systemd-shutdow).
- [ 208.780972] systemd-shutdown[1]: Sending SIGKILL to remaining processes...
- [ 208.821736] systemd-shutdown[1]: Unmounting file systems.
- [ 208.828143] systemd-shutdown[1]: Remounting '/' read-only with options 'data=ordered'.
- [ 208.847389] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
- [ 208.853442] systemd-shutdown[1]: Remounting '/' read-only with options 'data=ordered'.
- [ 208.861699] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
- [ 208.872776] systemd-shutdown[1]: All filesystems unmounted.
- [ 208.878497] systemd-shutdown[1]: Deactivating swaps.
- [ 208.883708] systemd-shutdown[1]: All swaps deactivated.
- [ 208.889036] systemd-shutdown[1]: Detaching loop devices.
- [ 208.897948] systemd-shutdown[1]: All loop devices detached.
- [ 208.909794] reboot: System halted
复制代码 等系统优化后,这些系统信息都要关了,不要了,使用起来就清静了。
< 怎么艾特这个版主 sinovoip,我要申请精华和置顶,行不行,这个可是个优质项目,嘿嘿 >
|