티스토리 뷰

OS/Banana Pi /BPI-Bit

BPI-M4

파란크리스마스 2020. 3. 28. 22:58
728x90

출처

리눅스 정보 확인

CPU 정보 확인

$ cat /proc/cpuinfo
processor       : 0
BogoMIPS        : 54.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4
 
processor       : 1
BogoMIPS        : 54.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4
 
processor       : 2
BogoMIPS        : 54.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4
 
processor       : 3
BogoMIPS        : 54.00
Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4

instruction set architecture (ISA) 정보

$ uname -i
aarch64

커널에 대한 정보

$ uname -a
Linux bpi-iot-ros-ai 4.9.119-BPI-M4-Kernel #1 SMP PREEMPT Tue Apr 16 10:39:33 CST 2019 aarch64 aarch64 aarch64 GNU/Linux

OS버전에 대한 정보

$ cat /etc/issue
Ubuntu 18.04.4 LTS \n \l

논리 코어 수 확인

$ grep -c processor /proc/cpuinfo
4

spirom 펌웨어 업데이트

2020년 5월 이전 생산된 모델의 경우 1GB 보드는 spirom 펌웨어를 업데이트해야 새로운 Linux 이미지 실행 가능

부팅로그 - 디버그 USB to UART로 Serial로 확인 - 1G가 모델에서 2G로 표시되는 오류

C1:80000000
C2
?_?
C3h
hwsetting size: 00000950
C4
f 
5-5
Goto FSBL: 0x80008000
Welcome to FSBL ....

REG32(VO_SW_SEC_1)=01C00000
[FSBL] Secure: 0x0000BEEE
[FSBL] DCache Enable: 0x00000000
[FSBL] SVP = N
********** FW_TYPE_BOOTCODE **********
    FW Image to 0x00100000, size=0x000841E0 (0x001841E0)
    FW Image fr 0x881313E8 
kmcp_bypass copy audio bin
FSBL: plat_gic_setup
FSBL: plat_gic_setup_percpu
FSBL Jumps to LK


U-Boot 2015.07 (May 27 2019 - 09:38:38 +0800)

CPU  : Cortex-A53 Quad Core - AARCH64
Board: Realtek QA Board
DRAM:  2 GiB
Watchdog: Disabled
mapping memory 0x20000000-0x40000000 non-cached
flushing dcache successfully.
nor flash id [0x00ef4018]
sector 256k en: 0

Flash the spirom

1. Prepare a bootable sdcard with bpi linux image flashed.
2. Connect debug serial cable to PC terminal.
3. Prepare a udisk with fat32 format, copy the right spirom firmware, spiloader-1GB.bin or spiloader-2GB.bin to udisk. Plug udisk to board.3.Press "Esc" and power on the board to enter uboot command mode.
4. Flash the firmware to board,

Net:   Realtek PCIe GBE Family Controller mcfg = 0024
dev->name=r8168#0
Checking default environment
Hit Esc or Tab key to enter console mode or rescue linux:  3 
------------can't find tmp/factory/recovery
------------finished reboot_action

Press Esc Key

Enter console mode, disable watchdog ...

BPI-M4> usb start
starting USB...
rtk_usb_power_on:213: Realtek-usb: UFP cc2 detect type_c have power (status=0x18)
USB0:   Register 1000140 NbrPorts 1
Starting the controller
USB XHCI 1.10
scanning bus 0 for devices... Unknown request , typeReq = 0x200c 
1 USB Device(s) found
USB1:   Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus 1 for devices... Unknown request , typeReq = 0x200c 
unknown Description Type : b
4 USB Device(s) found
       scanning usb for storage devices...  address 4
1 Storage Device(s) found
BPI-M4>
BPI-M4> fatload usb 0:1 0x01500000 spiloader-1GB.bin
reading spiloader-1GB.bin
761248 bytes read in 60 ms (12.1 MiB/s)
BPI-M4> go 0x01500000
Starting application at 0x01500000 ...
flash_type: SPI
begin: 

nor flash id [0x00EF4018]
      sector 256k en: 0x00000000
      sector  64k en: 0x00000001
      sector  32k en: 0x00000001
      sector   4k en: 0x00000001
      page_program  : 0x00000001
      max capacity  : 0x01000000
      spi type name : WINBOND_W325Q128BV_128Mbit
init
spi : erase 0x00200000 bytes from 0x88100000
////////////////////////////////
spi : write hw setting&signature, start=0x88130800, len=0x00000BE8
..
spi : write bootcode, start=0x881313E8, len=0x00080B80
..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
spi : write bootcode signature, start=0x881B1F68, len=0x00000020

spi : write fsbl, start=0x881B1F88, len=0x00007A08
..............................
spi : write parameter, start=0x88130000, len=0x00000428
.exit
Finish
reset...
C1:80000000
C2
?_?
C3h
hwsetting size: 00000950

적용 확인

C4
f 
5-5
Goto FSBL: 0x80008000
Welcome to FSBL ....

REG32(VO_SW_SEC_1)=01C00000
[FSBL] Secure: 0x0000BEEE
[FSBL] DCache Enable: 0x00000000
[FSBL] SVP = N
********** FW_TYPE_BOOTCODE **********
    FW Image to 0x00100000, size=0x00080BA0 (0x00180BA0)
    FW Image fr 0x881313E8 
kmcp_bypass copy audio bin
FSBL: plat_gic_setup
FSBL: plat_gic_setup_percpu
FSBL Jumps to LK


U-Boot 2015.07 (May 13 2020 - 17:12:53 +0800)

CPU  : Cortex-A53 Quad Core - AARCH64
Board: Realtek QA Board
DRAM:  1 GiB
Watchdog: Disabled

SD 확장

SD 확장전 용량확인

$ df -l
Filesystem     1K-blocks    Used Available Use% Mounted on
udev              269344       0    269344   0% /dev
tmpfs              58016    1752     56264   4% /run
/dev/mmcblk0p2   6993924 5948764    673500  90% /
tmpfs             290076       0    290076   0% /dev/shm
tmpfs               5120       4      5116   1% /run/lock
tmpfs             290076       0    290076   0% /sys/fs/cgroup
tmpfs             290076       4    290072   1% /tmp
tmpfs              58012      24     57988   1% /run/user/1000
overlaid           58012      24     57988   1% /run/user/1000/pi-chromium
/dev/mmcblk0p1    258095  103390    154706  41% /media/pi/BPI-BOOT

SD FDisk

pi@bpi-iot-ros-ai:~$ sudo fdisk /dev/mmcblk0

Welcome to fdisk (util-linux 2.31.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/mmcblk0: 29.7 GiB, 31914983424 bytes, 62333952 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x4ca45e69

Device         Boot  Start      End  Sectors  Size Id Type
/dev/mmcblk0p1      204800   729087   524288  256M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      729088 14940159 14211072  6.8G 83 Linux

Command (m for help): d
Partition number (1,2, default 2): 2

Partition 2 has been deleted.

Command (m for help): n
Partition type
   p   primary (1 primary, 0 extended, 3 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (2-4, default 2): 2
First sector (2048-62333951, default 2048): 729088
Last sector, +sectors or +size{K,M,G,T,P} (729088-62333951, default 62333951): 

Created a new partition 2 of type 'Linux' and of size 29.4 GiB.
Partition #2 contains a ext4 signature.

Do you want to remove the signature? [Y]es/[N]o: Y

The signature will be removed by a write command.

Command (m for help): w
The partition table has been altered.
Syncing disks.

pi@bpi-iot-ros-ai:~$ sudo shutdown -r now

SD 확장

$ sudo resize2fs /dev/mmcblk0p2
resize2fs 1.44.1 (24-Mar-2018)
Filesystem at /dev/mmcblk0p2 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 2
The filesystem on /dev/mmcblk0p2 is now 7700608 (4k) blocks long.

SD 확장 확인

$ df -l
Filesystem     1K-blocks    Used Available Use% Mounted on
udev              269344       0    269344   0% /dev
tmpfs              58016    1740     56276   3% /run
/dev/mmcblk0p2  30323692 5966332  23041984  21% /
tmpfs             290076       0    290076   0% /dev/shm
tmpfs               5120       4      5116   1% /run/lock
tmpfs             290076       0    290076   0% /sys/fs/cgroup
tmpfs             290076       4    290072   1% /tmp
tmpfs              58012      16     57996   1% /run/user/1000
overlaid           58012      16     57996   1% /run/user/1000/pi-chromium
/dev/mmcblk0p1    258095  103390    154706  41% /media/pi/BPI-BOOT

eMMC에 OS 설치

$ sudo apt install pv
$ curl -sL https://github.com/BPI-SINOVOIP/bpi-tools/raw/master/bpi-tools | sudo -E bash
$ sudo bpi-copy 2020-05-18-ubuntu-18.04-mate-desktop-bpi-m4-aarch64-sd-emmc.img
[sudo] password for pi: 
SRC=2020-05-18-ubuntu-18.04-mate-desktop-bpi-m4-aarch64-sd-emmc.img
DST=
COPYMODE=imagetodisk
imagetodisk
bpi-copy(v1.3.4(github)), bananapi image & disk tools
 
Usage: bpi-copy [OPTIONS]...
       bpi-copy [ --help | -v | --version ]
       bpi-copy IMGFILE
       bpi-copy IMGDIR
       bpi-copy IMGFILE DEVICE
       bpi-copy DEVICE IMGFILE
 
Warning: Try to write 2020-05-18-ubuntu-18.04-mate-desktop-bpi-m4-aarch64-sd-emmc.img to BOOTDISK /dev/mmcblk1
==============================================================
Sun May 31 21:35:03 CST 2020
*** start COPY (blue led on ) .....
INFO: /dev/mmcblk1 : SD/eMMC !!
umount device: /dev/mmcblk1
umount /dev/mmcblk1p1
umount /dev/mmcblk1p2
==============================================================
IMGFILE=2020-05-18-ubuntu-18.04-mate-desktop-bpi-m4-aarch64-sd-emmc.img
==============================================================
img
729+1 records in[10.5MiB/s] [                                            <=>          ]
729+1 records out
7650410496 bytes (7.7 GB, 7.1 GiB) copied, 563.151 s, 13.6 MB/s
7.12GiB 0:09:23 [13.0MiB/s] [                                           <=>           ]
0+58925 records in
0+58925 records out
***  end  COPY (blue led off) .....
Sun May 31 21:44:28 CST 2020
==============================================================
RUNTIME 9:25
OK!! You can remove the BOOTDISK /dev/mmcblk1 now!!

jdk 1.8 설치

$ sudo apt install openjdk-8-jdk

도커삭제 (옵션)

$ sudo apt remove docker-ce

LibreOffice 제거 (옵션)

$ sudo apt remove --purge libreoffice-core libreoffice-common
$ sudo apt autoremove

Thunderbird 제거 (옵션)

$ sudo apt remove --auto-remove thunderbird

Python 3.6 제거 (옵션)

Python 3 설치된 패키지 확인

$ aptitude search '~i' | grep python

Python 3.6 제거

$ sudo apt remove python3 python3-minimal python3.6 python3.6-minimal libpython3.6 libpython3.6-minimal
$ sudo apt autoremove

Python 3.6 제거후 키보드, 마우스가 동작하지 않는 경우 설치

$ sudo apt install xserver-xorg-input-all
댓글
300x250
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/12   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
글 보관함