티스토리 뷰

OS/Orange PI

Orange Pi PC2

파란크리스마스 2017. 2. 17. 22:28
728x90

Orange pi 업그레이드

$ sudo apt-get update && apt-get upgrade
$ sudo shutdown -r now

SD 용량 확인(확장전)

$ df -l
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/mmcblk0p2   3536592 3448920         0 100% /
devtmpfs          492596       0    492596   0% /dev
tmpfs             501596       4    501592   1% /dev/shm
tmpfs             501596   13540    488056   3% /run
tmpfs               5120       4      5116   1% /run/lock
tmpfs             501596       0    501596   0% /sys/fs/cgroup
/dev/mmcblk0p1     51082   13062     38020  26% /boot
tmpfs             100320       4    100316   1% /run/user/0
tmpfs             100320       0    100320   0% /run/user/1002

파티션 늘리기

출처 : Orange PI resize SD-card root partition on Debian
Partitioning with fdisk

root@Orangepi:~# fdisk /dev/mmcblk0

Welcome to fdisk (util-linux 2.27.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: 14.9 GiB, 15931539456 bytes, 31116288 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: 0x000ebed2

Device         Boot  Start      End  Sectors  Size Id Type
/dev/mmcblk0p1       40960   143359   102400   50M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      143360 31116287 30972928 14.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-31116287, default 2048): 143360
Last sector, +sectors or +size{K,M,G,T,P} (143360-31116287, default 31116287): 

Created a new partition 2 of type 'Linux' and of size 14.8 GiB.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Device or resource busy

The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).

d - to delete partition
2 - second partition
n - create partition
p - primary partition type
2 - partition number
143360 - Same start as current 2th partition
enter - Default is last block
w - write partition table

리눅스 용량 확장

# resize2fs /dev/mmcblk0p2
resize2fs 1.42.13 (17-May-2015)
Filesystem at /dev/mmcblk0p2 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
The filesystem on /dev/mmcblk0p2 is now 3871616 (4k) blocks long.

리눅스 용량 확인

# df -l
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/mmcblk0p2  15213236 3434452  11137696  24% /
devtmpfs          492596       0    492596   0% /dev
tmpfs             501596       0    501596   0% /dev/shm
tmpfs             501596    7092    494504   2% /run
tmpfs               5120       4      5116   1% /run/lock
tmpfs             501596       0    501596   0% /sys/fs/cgroup
/dev/mmcblk0p1     51082   13062     38020  26% /boot
tmpfs             100320       0    100320   0% /run/user/1002.

Using SSH

출처 : Login to the Orange Pi

사용자추가

$ sudo groupadd pi        
$ sudo useradd -g pi pi -m -s /bin/bash
$ sudo passwd pi   
Enter new UNIX password: [raspberry]
Retype new UNIX password: [raspberry] 
passwd: password updated successfully

sudo 권한 부여

# vi /etc/sudoers

내용 추가

pi      ALL=(ALL:ALL) ALL

Orange pi 정보 조회

# uname -a        
Linux Orangepi 3.10.65 #55 SMP PREEMPT Fri Nov 18 16:17:28 CST 2016 aarch64 aarch64 aarch64 GNU/Linux
# nmcli device
DEVICE   TYPE      STATE      CONNECTION 
eth0     ethernet  unmanaged  --         
gretap0  gretap    unmanaged  --         
ifb0     ifb       unmanaged  --         
ifb1     ifb       unmanaged  --         
gre0     iptunnel  unmanaged  --         
sit0     iptunnel  unmanaged  --         
tunl0    iptunnel  unmanaged  --         
lo       loopback  unmanaged  --         




이하 작성중...





USB Wifi

출처 : OrangePi PC 2上使用USB WIFI

$ git clone https://github.com/orangepi-xunlong/OrangePi_H5SDK.git
$ cd OrangePi_H5SDK
$ cp kernel/arch/arm64/configs/OrangePiH5_PC2_linux_defconfig kernel/.config

내용추가

# CONFIG_MAC80211 is not set
CONFIG_MAC80211=y
CONFIG_RTLWIFI=m
CONFIG_RTL8192CU=m

빌드

$ sudo ./build.sh

Orange pi 업그레이드

pi@Orangepi:~$ cd /usr/src/
pi@Orangepi:/usr/src$ sudo git clone https://github.com/jwrdegoede/rtl8189ES_linux/
[sudo] password for pi: 
Cloning into 'rtl8189ES_linux'...
remote: Counting objects: 818, done.
remote: Total 818 (delta 0), reused 0 (delta 0), pack-reused 818
Receiving objects: 100% (818/818), 2.75 MiB | 780.00 KiB/s, done.
Resolving deltas: 100% (437/437), done.
Checking connectivity... done.
pi@Orangepi:/usr/src$ cd rtl8189ES_linux
pi@Orangepi:/usr/src/rtl8189ES_linux$ git checkout 080f2aaf6bc8e08eeb3b51f0b8c377eae1ea7ed7
fatal: Unable to create '/usr/src/rtl8189ES_linux/.git/index.lock': Permission denied
pi@Orangepi:/usr/src/rtl8189ES_linux$

Orange pi - Wifi 드라이버 설치

출처 : How to properly compile device drivers for OrangePi?
Armbian missibg headers
pvaret/rtl8192cu-fixes
Orange PI PC Wireless Module (8192cu)
apt-get --reinstall install linux-headers-`uname -r` fails


$ cd /usr/src
$ sudo git clone https://github.com/pvaret/rtl8192cu-fixes
$ sudo make ARCH=armv7l CROSS_COMPILE= -C /lib/modules/3.10.65/build M=/usr/src/rtl8192cu-fixes modules
make: *** /lib/modules/3.10.65/build: No such file or directory.  Stop.


$ sudo apt-get update
$ sudo apt-get dist-upgrade
$ sudo apt-get install gcc build-essential
$ sudo apt-get install subversion
$ cd /usr/src
$ sudo svn checkout https://github.com/loboris/OrangePI-Kernel.git/trunk/linux-3.4
$ zcat /proc/config.gz > .config
$ make oldconfig





$ sudo apt-get install git linux-headers-generic build-essential dkms


Orange pi - Wifi 드라이버 설치

출처 : Install rtl8188etv/rtl8188eu driver on Orange-Pi
rebuild rtl8189es from GIT for OPI+
loboris/OrangePI-Kernel

$ sudo mkdir /usr/src/linux-kernel-$(uname -r)
$ cd /usr/src/linux-kernel-$(uname -r)
$ sudo git clone https://github.com/silentcreek/bananapi-kernel --depth 1


-

-

Armbian

출처 : Orange Pi – armbian

# apt-get update
# apt-get upgrade
# source /etc/armbian-release
# dpkg -r linux-u-boot-bananapi-${BRANCH} linux-$(lsb_release -cs)-root-${BRANCH}-bananapi
# apt-get -y install linux-u-boot-orangepi-${BRANCH} linux-$(lsb_release -cs)-root-${BRANCH}-orangepi
# ln -fs bin/orangepi.bin /boot/script.bin
# echo orangepi > /etc/hostname
# reboot

Kernel – armbian

출처 : Kernel – armbian

# echo "deb http://apt.armbian.com $(lsb_release -cs) main utils $(lsb_release -cs)-desktop" > /etc/apt/sources.list.d/armbian.list
# apt-key adv --keyserver keys.gnupg.net --recv-keys 0x93D6889F9F0E78D5
# apt-get update

Armbian build tools (igorpecovnik/lib)

출처 : Armbian build tools (igorpecovnik/lib)
Docs » Developer Guide » Building Armbian
Orange Pi PC - Armbian build

# apt-get -y install git
# git clone https://github.com/igorpecovnik/lib --depth 1
# cp lib/compile.sh .
# ./compile.sh


Orange Pi One Board Quick Start Guide with Armbian Debian based Linux Distribution


Orange Pi Camera

출처 : How to Use Orange Pi Camera in Linux (with Motion)

$ lsmod
Module                  Size  Used by
sunxi_ir_rx             8607  0
sunxi_keyboard          6962  0
ss                     34925  0
vfe_v4l2              779470  0
gc2035                 19147  0
vfe_io                 39108  2 vfe_v4l2,gc2035
videobuf2_dma_contig     9982  1 vfe_v4l2
videobuf2_memops        2691  1 videobuf2_dma_contig
videobuf2_core         31877  1 vfe_v4l2

$ dmesg
[   11.016560] [VFE]cci probe end cci_sel = 0!
[   11.022389] systemd[1]: Mounted Debug File System.
[   11.027676] [VFE]cci_init end
[   11.057297] systemd[1]: Started Remount Root and Kernel File Systems.
[   11.116467] systemd[1]: Started Create list of required static device nodes for the current kernel.
[   11.153733] systemd[1]: Started Nameserver information manager.
[   11.211515] systemd[1]: Reached target Network (Pre).
[   11.242083] systemd[1]: Starting Create Static Device Nodes in /dev...
[   11.283933] [VFE]Welcome to Video Front End driver
[   11.289701] [VFE]csi0 probe end!
[   11.293761] [VFE]csi_init end
[   11.297958] [ISP] isp platform_id = 3!
[   11.301463] systemd[1]: Starting udev Coldplug all Devices...
[   11.308437] [VFE]isp0 probe end!
[   11.312839] [VFE]sunxi_isp_platform_register end
[   11.322221] [VFE]mipi_init end
[   11.327704] [VFE]flash_init end
[   11.333422] [VFE]pdev->id = 0
[   11.336709] [VFE]dev->cci_sel = 0
[   11.343181] systemd[1]: Starting Load/Save Random Seed...
[   11.349636] [VFE]dev->csi_sel = 0
[   11.355996] [VFE]dev->mipi_sel = 0
[   11.360828] [VFE]dev->isp_sel = 0
[   11.364549] [VFE_WARN]fetch csi0_dev0_twi_id from device_tree failed
[   11.371634] [VFE_WARN]fetch csi0_dev0_iovdd from device_tree failed
[   11.378606] [VFE_WARN]fetch csi0_dev0_avdd from device_tree failed
[   11.379874] systemd[1]: Started Set console keymap.
[   11.391171] [VFE_WARN]fetch csi0_dev0_dvdd from device_tree failed
[   11.399505] [VFE_WARN]fetch csi0_dev0_afvdd from device_tree failed
[   11.409014] [VFE_WARN]fetch csi0_dev0_flash_en from device_tree failed
[   11.417687] systemd[1]: Started Load/Save Random Seed.
[   11.423755] [VFE_WARN]fetch csi0_dev0_flash_mode from device_tree failed
[   11.432635] [VFE_WARN]fetch csi0_dev0_flvdd from device_tree failed
[   11.442193] [VFE_WARN]fetch csi0_dev0_flvdd_vol from device_tree failed
[   11.449587] [VFE_WARN]fetch csi0_dev0_af_pwdn from device_tree failed
[   11.457381] [VFE]vfe_init end
[   11.465440] [VFE]probe_work_handle start!
[   11.469683] systemd[1]: Started Load Kernel Modules.
[   11.478053] [VFE]vfe_runtime_resume
[   11.494262] [VFE]..........................vfe clk open!.......................
[   11.502562] [VFE]v4l2 subdev register input_num = 0
[   11.508032] [VFE]vfe sensor detect start! input_num = 0
[   11.509449] systemd[1]: Started Create Static Device Nodes in /dev.
[   11.520743] [VFE]Find sensor name is "gc2035", i2c address is 78, type is "YUV" !
[   11.528982] [VFE]Sub device register "gc2035" i2c_addr = 0x78 start!
[   11.536002] [VFE]v4l2_device_register_subdev return 0
[   11.541547] [VFE]registered sensor subdev is OK!
[   11.548166] [VFE]Check sensor!
[   11.566077] [VFE]mclk on
[   11.575928] systemd[1]: Started Journal Service.
[   11.623105] [VFE CCI_0 ERR] Status error at addr_8bit = 78, wr_flag = 1, val = 3efa1cf0
[   11.632196] [VFE CCI_0 ERR] Status error at addr_8bit = 78, wr_flag = 1, val = 3efa00f0
[   11.642227] [VFE CCI_0 ERR] Status error at addr_8bit = 78, wr_flag = 1, val = 3efa00f0
[   11.653632] gc2035 sensor read retry=2
[   11.659085] [CSI_ERR][GC2035]sensor_read err at sensor_detect!
[   11.665513] [CSI_ERR][GC2035]chip found is not an target chip.
[   11.713421] [VFE]mclk off
[   11.740054] [VFE]vfe sensor subdev unregister!
[   11.745042] [VFE]Sub device register "gc2035" failed!
[   11.750592] [VFE_ERR]vfe sensor register check error at input_num = 0
[   11.757685] [VFE]V4L2 device registered as (null)
[   11.762915] [VFE]vfe_runtime_suspend
[   11.766841] [VFE]..........................vfe clk close!.......................
[   11.772987] [VFE]probe_work_handle end!


댓글
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
글 보관함