注意事项:
1.不要使用163源,163的源上不带 armhf架构。
2.Sdcard使用不了可以使用u盘,这都无所谓。
3.最后启动桌面时如果出现:
xf86OpenConsole: Cannot open /dev/tty0 (No such file or directory)
Device Drivers --->
Character devices --->
Virtual terminal
选上Virtual terminal。就会创建/dev/tty0。
烧写miniroot,然后设置启动变量editenv,保存saveenv以后就可以自动启动Ubuntu系统了。
boot=/dev/sda1:/ubuntu
init=/***in/init
autoboot=1
其它:
1.CONFIG_VT can fix that “xf86OpenConsole: Cannot open /dev/tty0 (No such file or directory)”
2.CONFIG_FRAMEBUFFER_CONSOLE=y (and if you want console on screen, need "console=tty0" in CMDLINE)
可以实现Ctrl+Alt+F1/F2...实现的虚拟终端功能。
更:
Miniroot from: http://androtab.info/radxa_rock/sdboot/
0.解打包boot.img
Unpack boot.img 两种方法
(1)tail -c +9 boot.img | gzip -dc | cpio -i
(2)rkunpack boot.img
会生成boo.img-raw这个就是ramdisk.img
Pack boot.img 两步
(1)find . | cpio -o -H newc | gzip > ../boot-new.img
(2)rkcrc -k boot-new.img boot.img
From: http://linux-rockchip.info/mw/index.php?title=Rkutils
试了RK编译Android中的制作方法,失败了,暂时不知道为什么:
mkbootfs boot | minigzip > ramdisk.img &&
./mkkrnlimg ramdisk.img ramdisk-rk.img
1.以太网不能使用
使用root用户可以上网了,但是不能ping也不能使用network manager。
sudo service network-manager start
ROOT用户可以通过Firefox上网了。
(以后可以尝试使用最新版本的内核)
不能ping似乎是因为内核版本的问题,Android内核会有点问题。
将其添加至:/etc/rc.local 问题得以解决。
2.关于运行速度慢的问题
烧写到sdcard中速度比U盘快多了。
这个要仔细考虑一下是怎么回事。USB传输速度没有mmc/sd控制器输出速度快的原因吗?
3.Waiting up to 60 more seconds for network configuration...
解决方法:
/etc/init/failsafe.conf 注释其中的sleep n。
From: https://petermolnar.eu/linux-tech-coding/ubuntu-11-10-disable-waiting-up-to-60-more-seconds-for-network-configuration/
可以实现27秒启动。
3.完全运行在SDCARD中
将所有固件烧写到sdcard中:
(1).将sdcard制作成可以启动的boot from SD card on Radxa Rock文章中的方法
(2).使用gparted分出一个区用来放Ubuntu系统,分区前要留40MiB容量。
(3).将Ubuntu镜像烧入到sdb1分区
sudo fsarchiver restfs fs-ubuntu-rk3188.fsa id=0,dest=/dev/sdb1
$ sudo fsarchiver restfs fs-ubuntu-rk3188.fsa id=0,dest=/dev/sdb1
Statistics for filesystem 0
* files successfully processed:....regfiles=65939, directories=6741, symlinks=29994, hardlinks=25, specials=85
* files with errors:...............regfiles=0, directories=0, symlinks=0, hardlinks=0, specials=0
$
(4).将环境变量设置为
root=/dev/mmcblk0p1:/ubuntu
(可通过设置miniroot默认的env)
<完>
4.如何备份系统
(1)制作一个脚本烧写 先分两个区,再烧写sdboot/loader/miniroot。第二个分区烧写Ubuntu系统。
(2)将所有系统制作成一个固件,通过dd命令统一烧写。
壓縮 的 備份與還原
備份 + 壓縮
dd bs=1M if=/dev/sdx | gzip > backup.gz
dd bs=4M if=/dev/sdx | gzip > backup.gz
還原 + 解壓縮
gzip -dc backup.gz | dd of=/dev/sdx # default bs=4k
gzip -dc backup.gz | dd bs=1M of=/dev/sdx
gzip -dc backup.gz | dd bs=4M of=/dev/sdx
From:http://blog.longwin.com.tw/2013/10/dd-sd-card-backup-os-2013/
5.解决非root用户不能连接网络
Disable ANDROID_PARANOID_NETWORK
config ANDROID_PARANOID_NETWORK
bool "Only allow certain groups to create sockets"
default y
help
none
make menuconfig --->
Networking support --->
Networking options --->
Only allow certain groups to create sockets
From: naobsd
6.Fix Audio out put problem
1. let ubuntu join "audio" group
sudo usermod -a -G audio ubuntu
2.install pavucontrol
sudo apt-get install pavucontrol
3.enable sound card output(just need do one time, I don't know why pavucontrol can't open it)
sudo amixer cset numid=1,iface=MIXER,name='Playback Path' SPK
4.play video by smplayer/ play audio(wav/mp3/etc) by vlc。
5.about sound cards
there are two cards on rk3188. there for HDMI and machine self.
(1) ROCKCHIP-SPDIF is for HDMI.
(2) RK_RK616 is for machine self.
you should check it to the correct out device.
then you can use pavucontrol, it works fine almostly.
已知Bugs:
1.关于休眠的两个问题
(1)休眠唤醒后不能正常的登录
Device Drivers --->
Graphics support --->
Console display driver support --->
Framebuffer Console support
暂时没有解决。
(2)深度休眠后不能唤醒
暂时没有好的方法解决。
2.音频相关不能使用
aplay ../usr/share/sounds/purple/receive.wav 可以插入声音。
播放:
aplay Windows.wav
调音量:
amixer controls
amixer cget numid=1
amixer cset numid=1 30
from: http://www.100ask.org/bbs/forum.php?mod=viewthread&tid=10566
3. about flash on ubuntu-arm
ref: Flash on the Raspberry Pi
4. WiFi/AP6330
prepare firmware, load driver, run supplicant or something
a. prepare firmware
shell@android:/ $
[ 151.508421] Current WiFi chip is AP6330.
[ 151.546786] =======================================================
[ 151.553398] ==== Launching Wi-Fi driver! (Powered by Rockchip) ====
[ 151.560073] =======================================================
[ 151.566684] RKWIFI WiFi driver (Powered by Rockchip,Ver 4.53.WFD) init.
[ 151.574037] =========== WLAN placed in POWER ON ========
[ 151.579728] ANDROID-ERROR) wifi_set_power = 1
[ 151.584305] rk29sdk_wifi_power: 1
[ 151.839625] wifi turn on power
[ 151.842710] ANDROID-ERROR) wifi_set_carddetect = 1
[ 151.847545] rk29sdk_wifi_set_carddetect:1
[ 151.851581] mmc1: slot status change detected(0-1)
[ 152.048853]
[ 152.048857] drivers/mmc/core/core.c...2010.. ===== mmc_rescan Begin....[mmc1]
[ 152.092894]
[ 152.092897] mmc_attach_sdio..808.. ===== Begin to identify card as SDIO-card. [mmc1]
[ 152.164637] rk29_sdmmc_change_clk_div..1961.. newDiv=0, newCLK=24000Khz [sdio]
[ 152.174937] mmc1: new high speed SDIO card at address 0001
[ 152.182317] sdmmc_rescan_try_freq..1886.. ===== Initialize SDIO successfully. [mmc1]
[ 152.190664] Linux Kernel SDIO/MMC Driver
[ 152.195295] dhdsdio_probe : no mutex held. set lock
[ 152.200296] FW_PATH = /system/etc/firmware/fw_RK903_ag.bin
[ 152.200318] NVRAM_PATH = /system/etc/firmware/nvram_AP6330.txt
[ 152.211956] F1 signature read @0x18000000=0x16044330
[ 152.220855] DHD: dongle ram size is set to 294912(orig 294912)
[ 152.227318] dhd_bus_select_firmware_name_by_chip: firmware_path=/system/etc/firmware/fw_RK903_ag.bin
[ 152.238244] wl_create_event_handler thr:71e created
[ 152.243488] wl_create_event_handler thr:71e started
[ 152.251069] p2p0: P2P Interface Registered
[ 152.255589] dhd_attach thr:71f created
[ 152.259738] dhd_attach thr:71f started
[ 152.263766] dhd_attach thr:721 created
[ 152.267721] dhd_attach thr:721 started
[ 152.271740] dhd_attach thr:722 created
[ 152.275731] dhd_attach thr:722 started
[ 152.280003] ANDROID-ERROR) wifi_get_mac_addr
[ 152.284375] bcmsdh_set_drvdata Enter
[ 152.290756] Broadcom Dongle Host Driver: register interface [wlan0] MAC: 00:90:4c:11:22:33
[ 152.302942] dhdsdio_probe : the lock is released.
[ 152.308524]
[ 152.308533] Dongle Host Driver, version 1.28.13.1.1 (r)
[ 152.308548] Compiled in drivers/net/wireless/bcmdhd on Jul 4 2013 at 10:32:45
[ 152.323169] ANDROID-ERROR) wifi_set_power = 0
[ 152.327767] rk29sdk_wifi_power: 0
[ 152.532149] wifi shut off power
[ 152.535357] =========== WLAN placed in RESET ========
[ 152.543754] Current WiFi chip is AP6330.
[ 152.569982] dhd_bus_select_firmware_name_by_chip: firmware_path=/system/etc/firmware/fw_RK903_ag.bin
[ 152.570098] Dongle Host Driver, version 1.28.13.1.1 (r)
[ 152.570114] Compiled in drivers/net/wireless/bcmdhd on Jul 4 2013 at 10:32:45
[ 152.570248] wl_android_wifi_on in
[ 152.570291] ANDROID-ERROR) wifi_set_power = 1
[ 152.570348] rk29sdk_wifi_power: 1
[ 152.821723] wifi turn on power
[ 152.821833] =========== WLAN going back to live ========
[ 152.821978] sdio_reset_comm():
[ 152.822079] rk29_sdmmc_change_clk_div..1961.. newDiv=40, newCLK=300Khz [sdio]
[ 152.828080] rk29_sdmmc_change_clk_div..1961.. newDiv=0, newCLK=24000Khz [sdio]
[ 152.828601] dhd_bus_devreset: == WLAN ON ==
[ 152.828654] dhd_bus_devreset called when dongle is not in reset
[ 152.828717] Will call dhd_bus_start instead
[ 152.829192] F1 signature read @0x18000000=0x16044330
[ 152.839570] DHD: dongle ram size is set to 294912(orig 294912)
[ 152.840620] dhd_bus_select_firmware_name_by_chip: firmware_path=/system/etc/firmware/fw_RK903_ag.bin
[ 153.070471] bcmsdh_set_drvdata Enter
[ 153.073200] ANDROID-ERROR) wifi_get_mac_addr
[ 153.085999] CFG80211-ERROR) wl_cfg80211_attach_post : p2p0: p2p_dev_addr=02:22:f4:d9:84:1f
shell@android:/ $
shell@android:/system # lsmod
wlan 458451 0 - Live 0x00000000
gps 161924 0 - Live 0x00000000
vpu_service 11717 0 - Live 0x00000000
rk29_ipp 9957 0 - Live 0x00000000 (C)
mali 112485 5 - Live 0x00000000
ump 27320 15 mali, Live 0x00000000
rk30xxnand_ko 314328 0 - Live 0x00000000
shell@android:/system #
b. load driver
off-topic:
Bootloader目前就使用RK官方的,反正是不支持传输DTS,不过也不影响学习使用DTS,内核可以自行获取屁股后边的DTS。
Mini2440上也可以使用DTS了,得选一个版本。基于3.10来实现DTS的研究。Ubuntu那个不再弄了。
1.Enable Device Tree Support
menuconfig -> Boot options -> Flattened Device Tree support
(CONFIG_USE_OF)
2.Enable
Use appended device tree blob to zImage (EXPERIMENTAL)
(CONFIG_ARM_APPENDED_DTB)
这个宏是为了兼容那些还不支持将dts传输给内核的bootloader引导。使用CONFIG_ARM_APPENDED_DTB后你仅仅需要将dts文件紧贴在zImage后边,内核就可以自行加载dts。
3.编译make zImage dtb
注意事项:
1.不要使用163源,163的源上不带 armhf架构。
2.Sdcard使用不了可以使用u盘,这都无所谓。
3.最后启动桌面时如果出现:
xf86OpenConsole: Cannot open /dev/tty0 (No such file or directory)
Device Drivers --->
Character devices --->
Virtual terminal
选上Virtual terminal。就会创建/dev/tty0。
烧写miniroot,然后设置启动变量editenv,保存saveenv以后就可以自动启动Ubuntu系统了。
boot=/dev/sda1:/ubuntu
init=/***in/init
autoboot=1
其它:
1.CONFIG_VT can fix that “xf86OpenConsole: Cannot open /dev/tty0 (No such file or directory)”
2.CONFIG_FRAMEBUFFER_CONSOLE=y (and if you want console on screen, need "console=tty0" in CMDLINE)
可以实现Ctrl+Alt+F1/F2...实现的虚拟终端功能。
更:
Miniroot from: http://androtab.info/radxa_rock/sdboot/
0.解打包boot.img
Unpack boot.img 两种方法
(1)tail -c +9 boot.img | gzip -dc | cpio -i
(2)rkunpack boot.img
会生成boo.img-raw这个就是ramdisk.img
Pack boot.img 两步
(1)find . | cpio -o -H newc | gzip > ../boot-new.img
(2)rkcrc -k boot-new.img boot.img
From: http://linux-rockchip.info/mw/index.php?title=Rkutils
试了RK编译Android中的制作方法,失败了,暂时不知道为什么:
mkbootfs boot | minigzip > ramdisk.img &&
./mkkrnlimg ramdisk.img ramdisk-rk.img
1.以太网不能使用
使用root用户可以上网了,但是不能ping也不能使用network manager。
sudo service network-manager start
ROOT用户可以通过Firefox上网了。
(以后可以尝试使用最新版本的内核)
不能ping似乎是因为内核版本的问题,Android内核会有点问题。
将其添加至:/etc/rc.local 问题得以解决。
2.关于运行速度慢的问题
烧写到sdcard中速度比U盘快多了。
这个要仔细考虑一下是怎么回事。USB传输速度没有mmc/sd控制器输出速度快的原因吗?
3.Waiting up to 60 more seconds for network configuration...
解决方法:
/etc/init/failsafe.conf 注释其中的sleep n。
From: https://petermolnar.eu/linux-tech-coding/ubuntu-11-10-disable-waiting-up-to-60-more-seconds-for-network-configuration/
可以实现27秒启动。
3.完全运行在SDCARD中
将所有固件烧写到sdcard中:
(1).将sdcard制作成可以启动的boot from SD card on Radxa Rock文章中的方法
(2).使用gparted分出一个区用来放Ubuntu系统,分区前要留40MiB容量。
(3).将Ubuntu镜像烧入到sdb1分区
sudo fsarchiver restfs fs-ubuntu-rk3188.fsa id=0,dest=/dev/sdb1
$ sudo fsarchiver restfs fs-ubuntu-rk3188.fsa id=0,dest=/dev/sdb1
Statistics for filesystem 0
* files successfully processed:....regfiles=65939, directories=6741, symlinks=29994, hardlinks=25, specials=85
* files with errors:...............regfiles=0, directories=0, symlinks=0, hardlinks=0, specials=0
$
(4).将环境变量设置为
root=/dev/mmcblk0p1:/ubuntu
(可通过设置miniroot默认的env)
<完>
4.如何备份系统
(1)制作一个脚本烧写 先分两个区,再烧写sdboot/loader/miniroot。第二个分区烧写Ubuntu系统。
(2)将所有系统制作成一个固件,通过dd命令统一烧写。
壓縮 的 備份與還原
備份 + 壓縮
dd bs=1M if=/dev/sdx | gzip > backup.gz
dd bs=4M if=/dev/sdx | gzip > backup.gz
還原 + 解壓縮
gzip -dc backup.gz | dd of=/dev/sdx # default bs=4k
gzip -dc backup.gz | dd bs=1M of=/dev/sdx
gzip -dc backup.gz | dd bs=4M of=/dev/sdx
From:http://blog.longwin.com.tw/2013/10/dd-sd-card-backup-os-2013/
5.解决非root用户不能连接网络
Disable ANDROID_PARANOID_NETWORK
config ANDROID_PARANOID_NETWORK
bool "Only allow certain groups to create sockets"
default y
help
none
make menuconfig --->
Networking support --->
Networking options --->
Only allow certain groups to create sockets
From: naobsd
6.Fix Audio out put problem
1. let ubuntu join "audio" group
sudo usermod -a -G audio ubuntu
2.install pavucontrol
sudo apt-get install pavucontrol
3.enable sound card output(just need do one time, I don't know why pavucontrol can't open it)
sudo amixer cset numid=1,iface=MIXER,name='Playback Path' SPK
4.play video by smplayer/ play audio(wav/mp3/etc) by vlc。
5.about sound cards
there are two cards on rk3188. there for HDMI and machine self.
(1) ROCKCHIP-SPDIF is for HDMI.
(2) RK_RK616 is for machine self.
you should check it to the correct out device.
then you can use pavucontrol, it works fine almostly.
已知Bugs:
1.关于休眠的两个问题
(1)休眠唤醒后不能正常的登录
Device Drivers --->
Graphics support --->
Console display driver support --->
Framebuffer Console support
暂时没有解决。
(2)深度休眠后不能唤醒
暂时没有好的方法解决。
2.音频相关不能使用
aplay ../usr/share/sounds/purple/receive.wav 可以插入声音。
播放:
aplay Windows.wav
调音量:
amixer controls
amixer cget numid=1
amixer cset numid=1 30
from: http://www.100ask.org/bbs/forum.php?mod=viewthread&tid=10566
3. about flash on ubuntu-arm
ref: Flash on the Raspberry Pi
4. WiFi/AP6330
prepare firmware, load driver, run supplicant or something
a. prepare firmware
shell@android:/ $
[ 151.508421] Current WiFi chip is AP6330.
[ 151.546786] =======================================================
[ 151.553398] ==== Launching Wi-Fi driver! (Powered by Rockchip) ====
[ 151.560073] =======================================================
[ 151.566684] RKWIFI WiFi driver (Powered by Rockchip,Ver 4.53.WFD) init.
[ 151.574037] =========== WLAN placed in POWER ON ========
[ 151.579728] ANDROID-ERROR) wifi_set_power = 1
[ 151.584305] rk29sdk_wifi_power: 1
[ 151.839625] wifi turn on power
[ 151.842710] ANDROID-ERROR) wifi_set_carddetect = 1
[ 151.847545] rk29sdk_wifi_set_carddetect:1
[ 151.851581] mmc1: slot status change detected(0-1)
[ 152.048853]
[ 152.048857] drivers/mmc/core/core.c...2010.. ===== mmc_rescan Begin....[mmc1]
[ 152.092894]
[ 152.092897] mmc_attach_sdio..808.. ===== Begin to identify card as SDIO-card. [mmc1]
[ 152.164637] rk29_sdmmc_change_clk_div..1961.. newDiv=0, newCLK=24000Khz [sdio]
[ 152.174937] mmc1: new high speed SDIO card at address 0001
[ 152.182317] sdmmc_rescan_try_freq..1886.. ===== Initialize SDIO successfully. [mmc1]
[ 152.190664] Linux Kernel SDIO/MMC Driver
[ 152.195295] dhdsdio_probe : no mutex held. set lock
[ 152.200296] FW_PATH = /system/etc/firmware/fw_RK903_ag.bin
[ 152.200318] NVRAM_PATH = /system/etc/firmware/nvram_AP6330.txt
[ 152.211956] F1 signature read @0x18000000=0x16044330
[ 152.220855] DHD: dongle ram size is set to 294912(orig 294912)
[ 152.227318] dhd_bus_select_firmware_name_by_chip: firmware_path=/system/etc/firmware/fw_RK903_ag.bin
[ 152.238244] wl_create_event_handler thr:71e created
[ 152.243488] wl_create_event_handler thr:71e started
[ 152.251069] p2p0: P2P Interface Registered
[ 152.255589] dhd_attach thr:71f created
[ 152.259738] dhd_attach thr:71f started
[ 152.263766] dhd_attach thr:721 created
[ 152.267721] dhd_attach thr:721 started
[ 152.271740] dhd_attach thr:722 created
[ 152.275731] dhd_attach thr:722 started
[ 152.280003] ANDROID-ERROR) wifi_get_mac_addr
[ 152.284375] bcmsdh_set_drvdata Enter
[ 152.290756] Broadcom Dongle Host Driver: register interface [wlan0] MAC: 00:90:4c:11:22:33
[ 152.302942] dhdsdio_probe : the lock is released.
[ 152.308524]
[ 152.308533] Dongle Host Driver, version 1.28.13.1.1 (r)
[ 152.308548] Compiled in drivers/net/wireless/bcmdhd on Jul 4 2013 at 10:32:45
[ 152.323169] ANDROID-ERROR) wifi_set_power = 0
[ 152.327767] rk29sdk_wifi_power: 0
[ 152.532149] wifi shut off power
[ 152.535357] =========== WLAN placed in RESET ========
[ 152.543754] Current WiFi chip is AP6330.
[ 152.569982] dhd_bus_select_firmware_name_by_chip: firmware_path=/system/etc/firmware/fw_RK903_ag.bin
[ 152.570098] Dongle Host Driver, version 1.28.13.1.1 (r)
[ 152.570114] Compiled in drivers/net/wireless/bcmdhd on Jul 4 2013 at 10:32:45
[ 152.570248] wl_android_wifi_on in
[ 152.570291] ANDROID-ERROR) wifi_set_power = 1
[ 152.570348] rk29sdk_wifi_power: 1
[ 152.821723] wifi turn on power
[ 152.821833] =========== WLAN going back to live ========
[ 152.821978] sdio_reset_comm():
[ 152.822079] rk29_sdmmc_change_clk_div..1961.. newDiv=40, newCLK=300Khz [sdio]
[ 152.828080] rk29_sdmmc_change_clk_div..1961.. newDiv=0, newCLK=24000Khz [sdio]
[ 152.828601] dhd_bus_devreset: == WLAN ON ==
[ 152.828654] dhd_bus_devreset called when dongle is not in reset
[ 152.828717] Will call dhd_bus_start instead
[ 152.829192] F1 signature read @0x18000000=0x16044330
[ 152.839570] DHD: dongle ram size is set to 294912(orig 294912)
[ 152.840620] dhd_bus_select_firmware_name_by_chip: firmware_path=/system/etc/firmware/fw_RK903_ag.bin
[ 153.070471] bcmsdh_set_drvdata Enter
[ 153.073200] ANDROID-ERROR) wifi_get_mac_addr
[ 153.085999] CFG80211-ERROR) wl_cfg80211_attach_post : p2p0: p2p_dev_addr=02:22:f4:d9:84:1f
shell@android:/ $
shell@android:/system # lsmod
wlan 458451 0 - Live 0x00000000
gps 161924 0 - Live 0x00000000
vpu_service 11717 0 - Live 0x00000000
rk29_ipp 9957 0 - Live 0x00000000 (C)
mali 112485 5 - Live 0x00000000
ump 27320 15 mali, Live 0x00000000
rk30xxnand_ko 314328 0 - Live 0x00000000
shell@android:/system #
b. load driver
off-topic:
Bootloader目前就使用RK官方的,反正是不支持传输DTS,不过也不影响学习使用DTS,内核可以自行获取屁股后边的DTS。
Mini2440上也可以使用DTS了,得选一个版本。基于3.10来实现DTS的研究。Ubuntu那个不再弄了。
1.Enable Device Tree Support
menuconfig -> Boot options -> Flattened Device Tree support
(CONFIG_USE_OF)
2.Enable
Use appended device tree blob to zImage (EXPERIMENTAL)
(CONFIG_ARM_APPENDED_DTB)
这个宏是为了兼容那些还不支持将dts传输给内核的bootloader引导。使用CONFIG_ARM_APPENDED_DTB后你仅仅需要将dts文件紧贴在zImage后边,内核就可以自行加载dts。
3.编译make zImage dtb
举报