marsboard-a20-ubuntu的配置
大文实验室/大文哥
壹捌陆捌零陆捌捌陆捌贰
wb4916 AT qq.com
完成时间:2017/6/2 16:08
版本:V1.0
开发板:MarsBoard全志A20
SDK:MarsBoard-A20-Linux-SDK-V1.2.tar.gz
1、解压缩全志A20的ubuntu的SDK:
rootroot@rootroot-E400:~$ cd wyb/
rootroot@rootroot-E400:~/wyb$ tar zxvf MarsBoard-A20-Linux-SDK-V1.2.tar.gz
(默认配置为HDMI输出了,要通过LCD输出需要修改sys_config.fex文件)
rootroot@rootroot-E400:~/wyb/MarsBoard-A20-Linux-SDK-V1.2$ find . -name sys_config.fex
./products/marsboard-a20-ubuntu/configs/HDMI/sys_config.fex
./products/marsboard-a20-ubuntu/configs/HY050CTP-HD & HY070CTP/sys_config.fex
./products/marsboard-a20-ubuntu/configs/HY070CTP-HD-RGB/sys_config.fex
./products/marsboard-a20-ubuntu/configs/sys_config.fex
./products/marsboard-a20-ubuntu/configs/HY070CTP-HD/sys_config.fex
./products/marsboard-a20-ubuntu/configs/VGA/sys_config.fex
./products/marsboard-a20-ubuntu/configs/HY101CTP/sys_config.fex
./products/marsboard-a20-debian/configs/HDMI/sys_config.fex
./products/marsboard-a20-debian/configs/HY050CTP-HD & HY070CTP/sys_config.fex
./products/marsboard-a20-debian/configs/HY070CTP-HD-RGB/sys_config.fex
./products/marsboard-a20-debian/configs/sys_config.fex
./products/marsboard-a20-debian/configs/HY070CTP-HD/sys_config.fex
./products/marsboard-a20-debian/configs/VGA/sys_config.fex
./products/marsboard-a20-debian/configs/HY101CTP/sys_config.fex
./products/marsboard-a20-ubuntu-server/configs/HDMI/sys_config.fex
./products/marsboard-a20-ubuntu-server/configs/HY050CTP-HD & HY070CTP/sys_config.fex
./products/marsboard-a20-ubuntu-server/configs/HY070CTP-HD-RGB/sys_config.fex
./products/marsboard-a20-ubuntu-server/configs/sys_config.fex
./products/marsboard-a20-ubuntu-server/configs/HY070CTP-HD/sys_config.fex
./products/marsboard-a20-ubuntu-server/configs/VGA/sys_config.fex
./products/marsboard-a20-ubuntu-server/configs/HY101CTP/sys_config.fex
./tools/sunxi-tools/sys_config.fex
rootroot@rootroot-E400:~/wyb/MarsBoard-A20-Linux-SDK-V1.2$
R:\wyb\MarsBoard-A20-Linux-SDK-V1.2\products\marsboard-a20-ubuntu\configs\sys_config.fex
;-------------------------------------------------------------------------------
;disp init configuration
;
;disp_mode (0:screen0<screen0,fb0> 1:screen1<screen1,fb0> 2:two_diff_screen_diff_contents<screen0,screen1,fb0,fb1>
; 3:two_same_screen_diff_contets<screen0,fb0> 4:two_diff_screen_same_contents<screen0,fb0>)
;screenx_output_type (0:none; 1:lcd; 2:tv; 3:hdmi; 4:vga)
;screenx_output_mode (used for tv/hdmi output,0:480i 1:576i 2:480p 3:576p 4:720p50 5:720p60 6:1080i50 7:1080i60 8:1080p24 9:1080p50 10:1080p60 11:pal 14:ntsc)
;screenx_output_mode (used for vga output,0:1680*1050 1:1440*900 2:1360*768 3:1280*1024 4:1024*768 5:800*600 6:640*480 10:1920*1080 11:1280*720)
;fbx format (4:RGB655 5:RGB565 6:RGB556 7:ARGB1555 8:RGBA5551 9:RGB888 10:ARGB8888 12:ARGB4444)
;fbx pixel sequence (0:ARGB 1:BGRA 2:ABGR 3:RGBA) --- 0 for linux,2 for android
;lcd0_bright (lcd0 init bright,the range:[0,256],default:197
;lcd1_bright (lcd1 init bright,default:197
;-------------------------------------------------------------------------------
[disp_init]
disp_init_enable = 1
disp_mode = 0
screen0_output_type = 3
screen0_output_mode = 5
修改为:
screen0_output_type = 1
screen0_output_mode = 4
2、遵照readme.txt的步骤编译系统
(本文为直接成刷NAND的IMG系统,不喜欢用TF卡,个人总感觉不可靠)
rootroot@rootroot-E400:~/wyb$ cd MarsBoard-A20-Linux-SDK-V1.2/
rootroot@rootroot-E400:~/wyb/MarsBoard-A20-Linux-SDK-V1.2$ cat readme.txt
cross compiler building
$sudo apt-get update
$sudo apt-get upgrade
$sudo apt-get install ia32-libs
$sudo apt-get install ncurses-dev
$sudo apt-get install build-essential git u-boot-tools
$sudo apt-get install texinfo texlive ccache zlib1g-dev gawk bison flex gettext uuid-dev
$sudo apt-get install build-essential u-boot-tools uboot-mkimage
$sudo apt-get install binutils-arm-linux-gnueabihf gcc-arm-linux-gnueabi
$sudo apt-get install gcc-arm-linux-gnueabihf cpp-arm-linux-gnueabihf
$sudo apt-get install libusb-1.0-0 libusb-1.0-0-dev
$sudo apt-get install git wget fakeroot kernel-package zlib1g-dev libncurses5-dev
source tools/scripts/envsetup.sh
build nand image
MarsBoard_build_nand_image
build sdcard image
MarsBoard_make_card_image
2016-01-15 - v1.2:
nand image in build/xxxx/pack/livesuit_marsboard_a20_debian.img
sd card image in output/xxxx/sdcard-4g.img
if Failed,delete the build file,recompile again
change DDR3 clock frequency 480MHz to 432MHz,ensure machine stability
add sys_config.fex for HY050CTP-HD
add sys_config.fex for HY070CTP
add sys_config.fex for HY070CTP-HD-RGB
add sys_config.fex for HY101CTP
rootroot@rootroot-E400:~/wyb/MarsBoard-A20-Linux-SDK-V1.2$
rootroot@rootroot-E400:~/wyb/MarsBoard-A20-Linux-SDK-V1.2$ source tools/scripts/envsetup.sh
Products
0 - marsboard-a20-debian
1 - marsboard-a20-ubuntu
2 - marsboard-a20-ubuntu-server
please select a product:1
Creating working dirs
rootroot@rootroot-E400:~/wyb/MarsBoard-A20-Linux-SDK-V1.2$ MarsBoard_build_nand_image
IHEX firmware/kaweth/new_code_fix.bin
IHEX firmware/kaweth/trigger_code_fix.bin
IHEX firmware/edgeport/down3.bin
IHEX firmware/cpia2/stv0672_vp4.bin
IHEX2FW firmware/emi26/loader.fw
IHEX2FW firmware/emi26/firmware.fw
IHEX2FW firmware/emi26/bitstream.fw
IHEX2FW firmware/emi62/loader.fw
IHEX2FW firmware/emi62/bitstream.fw
IHEX2FW firmware/emi62/spdif.fw
IHEX2FW firmware/emi62/midi.fw
H16TOFW firmware/edgeport/boot.fw
H16TOFW firmware/edgeport/boot2.fw
H16TOFW firmware/edgeport/down.fw
H16TOFW firmware/edgeport/down2.fw
IHEX2FW firmware/whiteheat_loader.fw
IHEX2FW firmware/whiteheat.fw
IHEX2FW firmware/keyspan_pda/keyspan_pda.fw
IHEX2FW firmware/keyspan_pda/xircom_pgs.fw
make:离开目录“/home/rootroot/wyb/MarsBoard-A20-Linux-SDK-V1.2/linux-sunxi”
Build linux successfully
(需要输入密码:)
[sudo] password for rootroot:
编译完成:
"/home/rootroot/wyb/MarsBoard-A20-Linux-SDK-V1.2/products/marsboard-a20-ubuntu/configs/VGA/sys_config.fex" -> "/home/rootroot/wyb/MarsBoard-A20-Linux-SDK-V1.2/build/marsboard-a20-ubuntu/pack/VGA/sys_config.fex"
argc = 2
input name sys_config.fex
Script 1 source file Path=/home/rootroot/wyb/MarsBoard-A20-Linux-SDK-V1.2/build/marsboard-a20-ubuntu/pack/sys_config.fex
Script 1 bin file Path=/home/rootroot/wyb/MarsBoard-A20-Linux-SDK-V1.2/build/marsboard-a20-ubuntu/pack/sys_config.bin
parser 1 file ok
argc = 2
input name sys_partition.fex
Script 1 source file Path=/home/rootroot/wyb/MarsBoard-A20-Linux-SDK-V1.2/build/marsboard-a20-ubuntu/pack/sys_partition.fex
Script 1 bin file Path=/home/rootroot/wyb/MarsBoard-A20-Linux-SDK-V1.2/build/marsboard-a20-ubuntu/pack/sys_partition.bin
parser 1 file ok
mbr count = 4
partitation file Path=/home/rootroot/wyb/MarsBoard-A20-Linux-SDK-V1.2/build/marsboard-a20-ubuntu/pack/sys_partition.bin
mbr_name file Path=/home/rootroot/wyb/MarsBoard-A20-Linux-SDK-V1.2/build/marsboard-a20-ubuntu/pack/sunxi_mbr.fex
download_name file Path=/home/rootroot/wyb/MarsBoard-A20-Linux-SDK-V1.2/build/marsboard-a20-ubuntu/pack/dlinfo.fex
mbr size = 16384
mbr magic softw411
disk name=bootloader
disk name=rootfs
this is not a partition key
crc 0 = 9dc550ce
crc 1 = 8780193
crc 2 = 6dcef435
crc 3 = f873a568
update mbr file ok
"/home/rootroot/wyb/MarsBoard-A20-Linux-SDK-V1.2/products/marsboard-a20-ubuntu/uEnv.txt" -> "bootfs/uEnv.txt"
storage_type=0
boot0 file Path=/home/rootroot/wyb/MarsBoard-A20-Linux-SDK-V1.2/build/marsboard-a20-ubuntu/pack/boot0_nand.bin
script file Path=/home/rootroot/wyb/MarsBoard-A20-Linux-SDK-V1.2/build/marsboard-a20-ubuntu/pack/sys_config.bin
script update boot0 ok
storage_type=1
boot0 file Path=/home/rootroot/wyb/MarsBoard-A20-Linux-SDK-V1.2/build/marsboard-a20-ubuntu/pack/boot0_sdcard.fex
script file Path=/home/rootroot/wyb/MarsBoard-A20-Linux-SDK-V1.2/build/marsboard-a20-ubuntu/pack/sys_config.bin
script update boot0 ok
uboot file Path=/home/rootroot/wyb/MarsBoard-A20-Linux-SDK-V1.2/build/marsboard-a20-ubuntu/pack/boot1_nand.fex
script file Path=/home/rootroot/wyb/MarsBoard-A20-Linux-SDK-V1.2/build/marsboard-a20-ubuntu/pack/sys_config.bin
boot1 length = 5c000
total length = 68000
checksum=937394f
uboot file Path=/home/rootroot/wyb/MarsBoard-A20-Linux-SDK-V1.2/build/marsboard-a20-ubuntu/pack/boot1_sdcard.fex
script file Path=/home/rootroot/wyb/MarsBoard-A20-Linux-SDK-V1.2/build/marsboard-a20-ubuntu/pack/sys_config.bin
boot1 length = 3c000
total length = 48000
checksum=a44f1da3
disk : c
CopyRootToFS(/home/rootroot/wyb/MarsBoard-A20-Linux-SDK-V1.2/build/marsboard-a20-ubuntu/pack/bootfs)
c:\linux
c:\os_show
c:\magic.bin
find magic !!
RealLen=0xABF400
CPlugin Free lib
CPlugin Free lib
/home/rootroot/wyb/MarsBoard-A20-Linux-SDK-V1.2/tools/pack/pctools/a20/linux/eDragonEx/
/home/rootroot/wyb/MarsBoard-A20-Linux-SDK-V1.2/build/marsboard-a20-ubuntu/pack
Begin Parse sys_partion.fex
Add partion bootloader.fex BOOTLOADER_FEX00
Add partion very bootloader.fex BOOTLOADER_FEX00
FilePath: bootloader.fex
FileLength=abf400 FileSizeHigh=0
Add partion rootfs.fex ROOTFS_FEX000000
Add partion very rootfs.fex ROOTFS_FEX000000
FilePath: rootfs.fex
FileLength=7ff00000 FileSizeHigh=0
BuildImg 0
Dragon execute image.cfg SUCCESS !
/home/rootroot/wyb/MarsBoard-A20-Linux-SDK-V1.2
rootroot@rootroot-E400:~/wyb/MarsBoard-A20-Linux-SDK-V1.2$
(查找编译生成的IMG。SDK做的并不是特别完美,有些系统直接用红色字表示绝对路径!)
rootroot@rootroot-E400:~/wyb/MarsBoard-A20-Linux-SDK-V1.2$ find . -name *.img
./build/marsboard-a20-ubuntu/pack/livesuit_marsboard_a20_debian.img
./binaries/sdcard-4g.img
./binaries/linaro-ubuntu-server.img
./linux-sunxi/drivers/staging/ft1000/ft1000-pcmcia/ft1000.img
./linux-sunxi/drivers/staging/ft1000/ft1000-usb/ft3000.img
rootroot@rootroot-E400:~/wyb/MarsBoard-A20-Linux-SDK-V1.2$
3、生成的IMG大概有2GB,刷机大概需要10分钟+时间。
(总之,好慢好慢地呀!)
以太网上网:
通过网线将MarsBoard的A20开发板接入路由器/交换机。
开发板启动:
<4>Warning: this sunxi disp driver will see significant redesign.
<4>Applications using /dev/disp directly will break.
<4>For more information visit: http://linux-sunxi.org/Sunxi_disp_driver
<4>[DISP] layer allocated: 0,101
<6>[drm] Initialized drm 1.1.0 20060810
<6>Mali DRM initialize,driver name: mali_drm,version 2.1
<6>[drm] Initialized mali_drm 2.1.1 20101111 on minor 0
<6>Mali DRM initialize,version 2.1
<6>[drm] Initialized mali_drm 2.1.1 20101111 on minor 1
UMP<2>: New session opened
<4>init: plymouth-stop pre-start process (838) terminated with status 1
Ubuntu 14.04 LTS marsboard ttyS0
(这里需要输入用户名和密码登录:marsboard/marsboard)
marsboard login: <7>eth0: no IPv6 routers present
marsboard
Password: <7>eth0: no IPv6 routers present
Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.4.90 armv7l)
* Documentation: https://help.ubuntu.com/
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY,to the extent permitted by
applicable law.
marsboard@marsboard:~$
marsboard@marsboard:~$
marsboard@marsboard:~$
(不接网线,比较奇怪:rlt8188eu被识别为)
marsboard@marsboard:~$ ifconfig
eth0Link encap:Ethernet HWaddr 02:58:0a:82:94:59
inet6 addr: fe80::58:aff:fe82:9459/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:55 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:10403 (10.4 KB)
Interrupt:87 Base address:0x8000
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:16436 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:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wlan1Link encap:Ethernet HWaddr 64:51:7e:2f:51:ee
UP BROADCAST MULTICAST MTU:1500 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)
marsboard@marsboard:~$
marsboard@marsboard:~$
(不接网线,有分配局域网ID地址:192.168.0.129。但是PING不通外网。)
marsboard@marsboard:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 02:58:0a:82:94:59
inet addr:192.168.0.129Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::58:aff:fe82:9459/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:145 errors:0 dropped:0 overruns:0 frame:0
TX packets:109 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:20967 (20.9 KB) TX bytes:20844 (20.8 KB)
Interrupt:87 Base address:0x8000
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:16436 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:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wlan1 Link encap:Ethernet HWaddr 64:51:7e:2f:51:ee
UP BROADCAST MULTICAST MTU:1500 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)
marsboard@marsboard:~$ <7>eth0: no IPv6 routers present
[ OK ]ard@marsboard:~$ * Setting sensors limits
[ OK ]ting up X socket directories...
insmod: ERROR: could not insert module /lib/modules/3.4.90/kernel/drivers/gpu/mali/ump/ump.ko: File exists
insmod: ERROR: could not insert module /lib/modules/3.4.90/kernel/drivers/gpu/mali/mali/mali.ko: File exists
insmod: ERROR: could not insert module /lib/modules/3.4.90/kernel/drivers/cpufreq/cpufreq_conservative.ko: File exists
insmod: ERROR: could not insert module /lib/modules/3.4.90/kernel/drivers/cpufreq/cpufreq_powersave.ko: File exists
insmod: ERROR: could not insert module /lib/modules/3.4.90/kernel/drivers/cpufreq/cpufreq_stats.ko: File exists
insmod: ERROR: could not insert module /lib/modules/3.4.90/kernel/drivers/cpufreq/cpufreq_userspace.ko: File exists
insmod: ERROR: could not insert module /lib/modules/3.4.90/kernel/drivers/gpio/gpio-sunxi.ko: File exists
insmod: ERROR: could not insert module /lib/modules/3.4.90/kernel/drivers/spi/spidev.ko: File exists
insmod: ERROR: could not load module /lib/modules/3.4.90/kernel/drivers/spi/spi-sun7i.ko: No such file or directory
insmod: ERROR: could not insert module /lib/modules/3.4.90/kernel/drivers/leds/leds-sunxi.ko: File exists
[ OK ]rting NTP server ntpd
/etc/rc.local: 39: /etc/rc.local: cannot create /sys/devices/system/cpu/cpufreq/ondemand/up_threshold: Directory nonexistent
<4>init: plymouth-stop pre-start process (1295) terminated with status 1
marsboard@marsboard:~$
marsboard@marsboard:~$
marsboard@marsboard:~$
marsboard@marsboard:~$
marsboard@marsboard:~$
marsboard@marsboard:~$
(接USB鼠标+键盘)
marsboard@marsboard:~$ <6>usb 2-1.1: new low-speed USB device number 3 using sw-ehci
<6>input: Logitech USB Optical Mouse as /devices/platform/sw-ehci.1/usb2/2-1/2-1.1/2-1.1:1.0/input/input2
<6>generic-usb 0003:046D:C077.0001: input: USB HID v1.11 Mouse [Logitech USB Optical Mouse] on usb-sw-ehci-1.1/input0
<6>usb 2-1.4: new low-speed USB device number 4 using sw-ehci
<6>input: Logitech USB Keyboard as /devices/platform/sw-ehci.1/usb2/2-1/2-1.4/2-1.4:1.0/input/input3
<6>generic-usb 0003:046D:C31C.0002: input: USB HID v1.10 Keyboard [Logitech USB Keyboard] on usb-sw-ehci-1.4/input0
<6>input: Logitech USB Keyboard as /devices/platform/sw-ehci.1/usb2/2-1/2-1.4/2-1.4:1.1/input/input4
<6>generic-usb 0003:046D:C31C.0003: input: USB HID v1.10 Device [Logitech USB Keyboard] on usb-sw-ehci-1.4/input1
marsboard@marsboard:~$
marsboard@marsboard:~$ ping www.baidu.com
^C
marsboard@marsboard:~$
marsboard@marsboard:~$ ping 192.168.0.8
PING 192.168.0.8 (192.168.0.8) 56(84) bytes of data.
64 bytes from 192.168.0.8: icmp_seq=1 ttl=64 time=1.50 ms
64 bytes from 192.168.0.8: icmp_seq=2 ttl=64 time=0.469 ms
64 bytes from 192.168.0.8: icmp_seq=3 ttl=64 time=0.471 ms
^C
--- 192.168.0.8 ping statistics ---
3 packets transmitted,3 received,0% packet loss,time 2000ms
rtt min/avg/max/mdev = 0.469/0.813/1.501/0.487 ms
marsboard@marsboard:~$ ping www.baidu.com
^C
marsboard@marsboard:~$
marsboard@marsboard:~$
marsboard@marsboard:~$ sudo passwd
sudo: unable to resolve host marsboard
[sudo] password for marsboard:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
marsboard@marsboard:~$ su
Password:
root@marsboard:/home/marsboard# ifconfig
eth0 Link encap:Ethernet HWaddr 02:58:0a:82:94:59
inet addr:192.168.0.129 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::58:aff:fe82:9459/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6498 errors:0 dropped:0 overruns:0 frame:0
TX packets:927 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:664846 (664.8 KB) TX bytes:85590 (85.5 KB)
Interrupt:87 Base address:0x8000
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:16436 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:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wlan1 Link encap:Ethernet HWaddr 64:51:7e:2f:51:ee
UP BROADCAST MULTICAST MTU:1500 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)
root@marsboard:/home/marsboard# ping www.baidu.com
^C
root@marsboard:/home/marsboard# dhclient eth0
root@marsboard:/home/marsboard# ping www.baidu.com
PING www.a.shifen.com (14.215.177.38) 56(84) bytes of data.
^C64 bytes from 14.215.177.38: icmp_seq=1 ttl=55 time=7.42 ms
--- www.a.shifen.com ping statistics ---
1 packets transmitted,1 received,time 0ms
rtt min/avg/max/mdev = 7.427/7.427/7.427/0.000 ms
root@marsboard:/home/marsboard# ping www.sohu.com
PING fgz.a.sohu.com (14.18.240.6) 56(84) bytes of data.
^C64 bytes from 14.18.240.6: icmp_seq=1 ttl=56 time=5.33 ms
--- fgz.a.sohu.com ping statistics ---
1 packets transmitted,time 0ms
rtt min/avg/max/mdev = 5.331/5.331/5.331/0.000 ms
root@marsboard:/home/marsboard#
root@marsboard:/home/marsboard#
root@marsboard:/home/marsboard#
可以上外网了:www.sohu.com
www.baidu.com有些认证的问题。
4、WLAN1有些问题(以下方法可以尝试):
http://blog.csdn.net/gujing001/article/details/8309992
ubuntu下命令行连接wifi
2012-12-17 23:56 36094人阅读 评论(11) 收藏 举报
分类: Ubuntu(18) linux(42)
使用iwconfig命令:
搜索无线网 iwlist wlan0 scan
记下essid
连接无密码的无线网 iwconfig wlan0 essid ChinaNet 其中ChinaNet是搜索到的无线网essid
连接有密码的无线网 iwconfig wlan0 essid ChinaNet key xxxx 其中xxxx是密码
启用无线网卡 ifconfig wlan0 up
通过dhcp获取IP dhclient wlan0 或 dhcpcd wlan0
http://bbs.csdn.net/topics/390212444
iwconfig 无线设置问题
我按照网上的做法想无线上网,但执行:
[root@www ~]# iwconfig wlan0 essid "zmd" key 12345678
Error for wireless request "Set Encode" (8B2A) :
SET Failed on device wlan0 ; Invalid argument.
用户和密码都没错,这是什么原因呢?
当我改掉密码时反而行了,但明明这个密码是错的啊!
root@www ~]# iwconfig wlan0 essid "zmd" key 012345678
[root@www ~]# iwconfig wlan0
wlan0 IEEE 802.11bgn ESSID:"zmd"
Mode:Managed Access Point: Not-Associated Tx-Power=13 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:0012-3456-78 #这里也不明白为啥变成这样?
Power Management:on
望解答,谢谢!
系统是10.04,问题出在ubuntu对wpa加密方式不支持。
将AP配置成无密码连接,那么用iwconfig wlan0 essid xxx连接成功
AP密码全部为数字的话,不会报错,但仍连不上
AP密码是字母加数字的话,就会报楼主的错误
解决方法是用wpasupplicant软件:
#wpa_passphrase ESSID PWD > xxx.conf
#wpa_supplicant -B -i wlan0 -Dwext -c ./xxx.conf
#iwconfig wlan0
#dhclient wlan0
之后就成功啦
参考http://www.2cto.com/net/201210/160113.htm
(WIFI:rtl8188eu连网失败,原因不明。可以发现AP,但是连接不上,也许驱动有问题)
root@marsboard:/home/marsboard#
root@marsboard:/home/marsboard# iwlist wlan0 scan
wlan0 Interface doesn't support scanning.
root@marsboard:/home/marsboard# iwlist wlan1 scan
wlan1 Scan completed :
Cell 01 - Address: AA:6B:AD:39:BB:58
ESSID:"DIRECT-58-HP M130 LaserJet"
Protocol:IEEE 802.11gn
Mode:Master
Frequency:2.437 GHz (Channel 6)
Encryption key:on
Bit Rates:144 Mb/s
Extra:rsn_ie=30140100000fac040100000fac040100000fac020c00
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
IE: Unknown: DDC40050F204104A000110104400010210570001011041000100103B00010310470010564E434E50303130393530E171B7A4D91021000248501023001A4850204C617365724A6574204D4650204D3132392D4D313339
Quality=0/100 Signal level=-67 dBm
Cell 02 - Address: 30:FC:68:C5:DA:73
ESSID:"XHC-B"
Protocol:IEEE 802.11bgn
Mode:Master
Frequency:2.462 GHz (Channel 11)
Encryption key:on
Bit Rates:300 Mb/s
Extra:wpa_ie=dd160050f20101000050f20401000050f20401000050f202
IE: WPA Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
Extra:rsn_ie=30140100000fac040100000fac040100000fac020000
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
Quality=101/100 Signal level=-74 dBm
Cell 03 - Address: 38:91:D5:91:5B:70
ESSID:"citybrand-2"
Protocol:IEEE 802.11bgn
Mode:Master
Frequency:2.462 GHz (Channel 11)
Encryption key:on
Bit Rates:144 Mb/s
Extra:rsn_ie=30140100000fac040100000fac040100000fac020000
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
Quality=40/100 Signal level=-67 dBm
Cell 04 - Address: 40:B8:9A:35:F0:3C
ESSID:"HP-Print-3C-LaserJet Pro MFP"
Protocol:IEEE 802.11bgn
Mode:Master
Frequency:2.462 GHz (Channel 11)
Encryption key:on
Bit Rates:65 Mb/s
Extra:wpa_ie=dd1a0050f20101000050f20202000050f2020050f20401000050f202
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : TKIP CCMP
Authentication Suites (1) : PSK
Extra:rsn_ie=30180100000fac020200000fac02000fac040100000fac020000
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : TKIP CCMP
Authentication Suites (1) : PSK
Quality=32/100 Signal level=-71 dBm
Cell 05 - Address: 38:91:D5:91:5E:70
ESSID:"citybrand-1"
Protocol:IEEE 802.11bgn
Mode:Master
Frequency:2.462 GHz (Channel 11)
Encryption key:on
Bit Rates:144 Mb/s
Extra:rsn_ie=30140100000fac040100000fac040100000fac020000
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
Quality=0/100 Signal level=-83 dBm
root@marsboard:/home/marsboard#
root@marsboard:/home/marsboard#
root@marsboard:/home/marsboard# iwconfig wlan1 essid "citybrand-2" key citybrand200903
Error for wireless request "Set Encode" (8B2A) :
invalid argument "citybrand200903".
root@marsboard:/home/marsboard#
root@marsboard:/home/marsboard#
root@marsboard:/home/marsboard# wpa_supplicant -B -i wlan1 -Dwext -c ./xxx.conf
Successfully initialized wpa_supplicantplicant -B -i wlan1 -Dwext -c ./xxx.conf
ioctl[SIOCSIWAP]: Operation not permitted
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
root@marsboard:/home/marsboard#
原文链接:https://www.f2er.com/ubuntu/352764.html