Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

How to upload Android/Linux dual OS to RK3288?

107

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
107

How to upload Android/Linux dual OS to RK3288?

Posted at 12/15/2014 12:44:49      View:6929 | Replies:9        Print      Only Author   [Copy Link] 1#

I downloaded firefly-rk3288_sdk_git_20141211 and compiled Android and linux. As I run with mkimage.sh command, I can get images that are "boot.img. kernel.img, misc.img, pcba_small_misc.img, pcba_whole_misc.img, recovery.img, resource.img, system.img". I upload the images with AndroidTool 2.3 and I only see the Android system. Android system works fine but there is no linux boot option that is "switch system at power menu" in Android.


After upload the images, I upload the linux-rfs.img to the recovery partition. Then I couldn't boot Android. Could you help me to upload Android/linux dual OS images with linux-rfs?


Thanks.

Reply

Use props Report

403

Credits

10

Prestige

12

Contribution

intermediate

Rank: 3Rank: 3

Credits
403
Posted at 12/15/2014 15:30:30        Only Author  2#

Please use the attached parameter file (extract it first).

This is the dual boot paramater file. You can compare it with the old one.

It  adds "root=" kernel parameter , and replaces the unused radical_update partition with linuxroot partition.


You need to flash linux-boot.img (which contains kernel and initramfs) to recovery, and linux-rfs.img to linuxroot.

parameter.zip

650 Bytes, Down times: 4

Reply

Use props Report

107

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
107
Posted at 12/15/2014 22:39:57        Only Author  3#

I buit boot.img from initrd and boot.img. I followed the rules that is described in wiki. But I couldn't boot linux system. Please let me know how to deal with this problem.


git clone https://github.com/TeeFirefly/initrd.git
make -C initrd
mkbootimg --kernel arch/arm/boot/zImage --ramdisk initrd.img -o boot.img


I upload boot.img to the recovery partition and linux-rfs.img into the linuxroot and I used following parameter as you mentioned.


CMDLINE:console=ttyFIQ0 androidboot.hardware=rk30board androidboot.console=ttyFIQ0 board.ap_has_alsa=0 root=/dev/block/mtd/by-name/linuxroot rw rootfstype=ext4 init=/sbin/init initrd=0x62000000,0x00800000

mtdparts=rk29xxnand:0x00002000@0x00002000(uboot),0x00002000@0x00004000(misc),0x00008000@0x00006000(resource),

0x00008000@0x0000e000(kernel),0x00010000@0x00016000(boot),0x00010000@0x00026000(recovery),0x0001a000@0x00036000(backup),

0x00040000@0x00050000(cache),0x00002000@0x00090000(kpanic),0x00180000@0x00092000(system),0x00002000@0x00212000(metadata),

0x00200000@0x00214000(userdata),0x00620000@0x00414000(linuxroot),-@0x00a34000(user)


But, I only see the logo while booting. So I connected serial port from Firefly and I noticed that linux-rfs.img which is "/dev/mmcblk0p15 " is not mounted  .  When I manually mount /dev/mmcblk0p15 then root file is ok. When I upload linux-boot.img into the recovery partition in official Firefly-RK3288_DualBoot_201411111636.7z image, it is working. So I think initrd.img is something wrong.

root@firefly:~# df
Filesystem      1K-blocks   Used Available Use% Mounted on
/dev/mmcblk0p14   3148232 883840   2248008  29% /
udev              1021828    168   1021660   1% /dev
none                    4      0         4   0% /sys/fs/cgroup
none               206708    332    206376   1% /run
none                 5120      0      5120   0% /run/lock
none              1033520      0   1033520   0% /run/shm
none               102400      0    102400   0% /run/user
root@firefly:~#

root@firefly:/etc# cat mtab
/dev/mmcblk0p14 / ext4 rw 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0
udev /dev devtmpfs rw,mode=0755 0 0
devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=0620 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
none /sys/fs/cgroup tmpfs rw 0 0
none /sys/fs/fuse/connections fusectl rw 0 0
none /sys/kernel/debug debugfs rw 0 0
none /run tmpfs rw,noexec,nosuid,size=10%,mode=0755 0 0
none /run/lock tmpfs rw,noexec,nosuid,nodev,size=5242880 0 0
none /run/shm tmpfs rw,nosuid,nodev 0 0
none /run/user tmpfs rw,noexec,nosuid,nodev,size=104857600,mode=0755 0 0
systemd /sys/fs/cgroup/systemd cgroup rw,noexec,nosuid,nodev,none,name=systemd 0 0


As you see the mtab file, there is no "mmcblk0p15" device information.

Reply

Use props Report

403

Credits

10

Prestige

12

Contribution

intermediate

Rank: 3Rank: 3

Credits
403
Posted at 12/16/2014 10:34:13        Only Author  4#
Hi, cgsong. I've updated https://github.com/TeeFirefly/initrd.git . Please have another try.
Reply

Use props Report

107

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
107
Posted at 12/16/2014 12:22:29        Only Author  5#

I used new initrd.img that you uploaded but linux still can't mount user disk which is /dev/mmcblk0p15. I think root file system is mounted but it does not start lightdm UI. I'll email linux-boot.img to you. Linux-rfs.img is the same image in official Firefly-RK3288_DualBoot_201411111636.7z and I mentioned parameter that I used before this post. Please let me know how to fix it.



* Starting Mount filesystems on boot                                    [ OK ]
* Starting Signal sysvinit that the rootfs is mounted                   [ OK ]
* Starting Populate /dev filesystem                                     [ OK ]
* Starting Populate and link to /run filesystem                         [ OK ]
* Stopping Populate /dev filesystem                                     [ OK ]
* Stopping Populate and link to /run filesystem                         [ OK ]
* Starting Clean /tmp directory                                         [ OK ]
* Stopping Track if upstart is running in a container                   [ OK ]
* Stopping Clean /tmp directory                                         [ OK ]
* Starting Initialize or finalize resolvconf                            [ OK ]
* Starting Signal sysvinit that virtual filesystems are mounted         [ OK ]
* Starting Signal sysvinit that virtual filesystems are mounted         [ OK ]
* Starting Bridge udev events into upstart                              [ OK ]
* Starting Signal sysvinit that local filesystems are mounted           [ OK ]
* Starting restore software rfkill state                                [ OK ]
* Starting Signal sysvinit that remote filesystems are mounted          [ OK ]
* Starting device node and kernel event manager                         [ OK ]
* Stopping restore software rfkill state                                [ OK ]
* Starting flush early job output to logs                               [ OK ]
* Starting load modules from /etc/modules                               [ OK ]
* Starting log initial device creation                                  [ OK ]
* Starting D-Bus system message bus                                     [ OK ]
* Stopping Mount filesystems on boot                                    [ OK ]
* Stopping flush early job output to logs                               [ OK ]
* Stopping load modules from /etc/modules                               [ OK ]
* Starting SystemD login management service                             [ OK ]
* Starting userspace bootsplash                                         [ OK ]
* Starting Send an event to indicate plymouth is up                     [ OK ]
* Starting system logging daemon                                        [ OK ]
* Stopping Send an event to indicate plymouth is up                     [ OK ]
* Stopping userspace bootsplash                                         [ OK ]
* Starting configure network device security                            [ OK ]
* Starting configure network device                                     [ OK ]
* Starting configure network device security                            [ OK ]
* Starting configure network device security                            [ OK ]
* Starting configure network device                                     [ OK ]
* Starting Mount network filesystems                                    [ OK ]
* Starting Failsafe Boot Delay                                          [ OK ]
* Stopping Mount network filesystems                                    [ OK ]
* Starting configure network device                                     [ OK ]
* Stopping Failsafe Boot Delay                                          [ OK ]
* Starting System V initialisation compatibility                        [ OK ]
* Starting configure network device security                            [ OK ]
* Starting Bridge file events into upstart                              [ OK ]
* Setting up X socket directories...                                    [ OK ]
* Stopping System V initialisation compatibility                        [ OK ]
* Starting Bridge socket events into upstart                            [ OK ]
* Starting System V runlevel compatibility                              [ OK ]
* Starting anac(h)ronistic cron                                         [ OK ]
* Starting save kernel messages                                         [ OK ]
* Starting configure network device security                            [ OK ]
* Starting regular background program processing daemon                 [ OK ]
* Stopping anac(h)ronistic cron                                         [ OK ]
* Stopping save kernel messages                                         [ OK ]
* Starting OpenSSH server                                               [ OK ]
* Stopping cold plug devices                                            [ OK ]
* Starting configure virtual network devices                            [ OK ]
* Stopping log initial device creation                                  [ OK ]
[    6.706157] turn on mali power
* Stopping System V runlevel compatibility                              [ OK ]
* Stopping Restore Sound Card State                                     [ OK ]

Ubuntu 14.04.1 LTS firefly ttyFIQ0

firefly login: root (automatic login)
Last login: Sat Jan  1 13:50:07 UTC 2011 on ttyFIQ0
Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.10.0 armv7l)

* Documentation:  https://help.ubuntu.com/
root@firefly:~# df
Filesystem      1K-blocks   Used Available Use% Mounted on
/dev/mmcblk0p14   3148232 895268   2236580  29% /
udev              1022892      8   1022884   1% /dev
tmpfs              413412    324    413088   1% /run
none                    4      0         4   0% /sys/fs/cgroup
none                 5120      0      5120   0% /run/lock
none              1033520      0   1033520   0% /run/shm
none               102400      0    102400   0% /run/user
root@firefly:~#

Reply

Use props Report

403

Credits

10

Prestige

12

Contribution

intermediate

Rank: 3Rank: 3

Credits
403
Posted at 12/16/2014 15:21:35        Only Author  6#

I've tested your linux-boot.img, and it cannot start lightdm too.


Please check your kernel config. You can find kernel/arch/arm/configs/firefly-rk3288-linux_defconfig for a reference.

Maybe you have not checked CONFIG_VT ?


Please attach your kernel config.

Reply

Use props Report

403

Credits

10

Prestige

12

Contribution

intermediate

Rank: 3Rank: 3

Credits
403
Posted at 12/16/2014 15:36:11        Only Author  7#

If you check /var/log/Xorg.0.log, you'll find the following error:

[   628.793] (II) FBDEV: driver for framebuffer: fbdev
[   628.793] (++) using VT number 7

[   628.793] (WW) xf86OpenConsole: VT_GETSTATE failed: Inappropriate ioctl for device
[   628.793] (EE)
Fatal server error:
[   628.793] (EE) xf86OpenConsole: VT_ACTIVATE failed: Inappropriate ioctl for device
[   628.793] (EE)
[   628.793] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[   628.793] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[   628.793] (EE)
[   628.794] (WW) xf86CloseConsole: KDSETMODE failed: Inappropriate ioctl for device
[   628.794] (WW) xf86CloseConsole: VT_GETMODE failed: Inappropriate ioctl for device
[   628.794] (EE) Server terminated with error (1). Closing log file.



Yes, CONFIG_VT is required and you did not specify it.
Reply

Use props Report

107

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
107
Posted at 12/16/2014 17:17:08        Only Author  8#

Thanks for your help.


I can boot linux with CONFIG_VT kernel option.


Firefly can boot linux and android well. I figure out that linux needs "make firefly-rk3288-linux_defconfig" and android need "make firefly-rk3288_defconfig". But, there is no CONFIG_VT option at "arch/arm/configs/firefly-rk3288-linux_defconfig".


Thanks.

Reply

Use props Report

403

Credits

10

Prestige

12

Contribution

intermediate

Rank: 3Rank: 3

Credits
403
Posted at 12/17/2014 09:23:45        Only Author  9#

"# CONFIG_VT is not set" is specified in kernel/arch/arm/configs/firefly-rk3288_defconfig

which turns CONFIG_VT off explictly.


By default, CONFIG_VT will be on.

Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list