Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

Tip: DualBOOT Android 4.4.2 (8GB) + Linux (12GB) - parameter file

138

Credits

20

Prestige

18

Contribution

registered members

Rank: 2

Credits
138

Tip: DualBOOT Android 4.4.2 (8GB) + Linux (12GB) - parameter file

Posted at 7/21/2015 09:06:12      View:7030 | Replies:7        Print     [Copy Link] 1#
Last edited by deep In 7/25/2015 20:57 Editor

Basically I start the thread as a help, but after tries and calculations I'm proud to make simple HowTo with parameter file settings and values calculations!

Device: UGOOS-UT3 4 GB RAM 32 GB NAND/ROM RK3288
Goal: To make user adjustable parameter for providing DualBOOT device in my case Android OS sitting on 8 GB partition size and Linux (xUbuntu in my case) with 12 GB space and providing the rest of the space for user (Android) partition (rest of NAND)

-= Basic image explanation and how to calculate SIZE and OFFSET =-

uboot = Boot Loader for my device which has the same hash as FireFly RK3288
misc = Android OS misc partition
resource = ???
kernel = Obsolete Linux kernel partition, not used, keep it for compatibility*
boot = Android OS boot.img(kernel+ramdisk)
recovery = Android recovery/ Linux kernel + ramdisk
factory = ???
backup = Backup partition, we keep it for compatibility
cache = Android OS /cache partition
userdata = Android /data partition
kpanic = For kernel panic dump
system = Android OS /system partition
metadata = ???
linuxroot = For the Linux OS rootfs
user = Android OS internal flash as sdcard for storage (in my case is the rest of the space of the internal NAND)

In my case I put all coresponding files in img directory where Android Tool is located:

..\img\uboot_ugoos_V2.17.02.bin
..\dualboot.data8G.linux12G.parameter
..\img\misc.img
..\img\resource.img
..\img\kernel.img
..\img\boot.img
..\img\boot_linux.img
..\img\recovery.img
..\img\system.img
..\img\linuxroot.img

For that case we need some basic explanations and calculations to provide corresponding size which feet our needs.

SIZE@OFFSET(PARTITION_NAME)    OFFSET=STARTS FROM PREVIOUS TOTAL (?)

SIZE and OFFSET are hex numbers, in unit of 512 bytes (traditional disk sector size)

The formula used in Linux OS console was:
(10x to busybee for the helpfull tip and explanation)

EXAMPLE:

$ echo $(( 0x00180000 * 512 / 1024 / 1024))M [ENTER]
768M

(just copy paste and replace 0x00180000 with your desired value, don't copy $ it means shell)

, so for calculating the value of OFFSET - 0x00092000 the corresponding formula was:

$ echo $((0x00092000 * 512 / 1024 / 1024))M [ENTER]

which will output the result of 292M

Helpful ready to use calculated values

0x0002000  = 4MB
0x0004000  = 8MB
0x0008000  = 16MB
0x00010000 = 32MB
0x00020000 = 64MB
0x00040000 = 128MB
0x00080000 = 256MB
0x00100000 = 512MB
0x00200000 = 1GB
0x00400000 = 2GB
0x00800000 = 4GB
0x01000000 = 8GB
0x01800000 = 12GB
0x02000000 = 16GB
0x04000000 = 32GB

The final result in my case was file named: dualboot.data8G.linux12G.parameter
with the following content:

----------------------BEGIN FILE-----------------
FIRMWARE_VER:4.4.2
MACHINE_MODEL:rk30sdk
MACHINE_ID:007
MANUFACTURER:RK30SDK
MAGIC: 0x5041524B
ATAG: 0x60000800
MACHINE: 3066
CHECK_MASK: 0x80
PWR_HLD: 0,0,A,0,1
#KERNEL_IMG: 0x62008000
#FDT_NAME: rk-kernel.dtb
#RECOVER_KEY: 1,1,0,20,0
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(factory),0x00040000@0x00050000(cache),0x00002000@0x00090000(kpanic),0x00180000@0x00092000(system),0x00002000@0x00212000(metadata),0x01000000@0x00214000(userdata),0x01800000@0x01214000(linuxroot),-@0x2A14000(user)
----------------------END FILE-----------------

Pay atention of the logic used and how to next partition size increases and starts form the sum of the prescending!



Reply

Use props Report

138

Credits

20

Prestige

18

Contribution

registered members

Rank: 2

Credits
138
Posted at 7/22/2015 06:17:17      2#

Calculation in my particular case

Last edited by deep In 7/25/2015 20:55 Editor

Based on the explanation above and what I read I make my parameter file public so anyone which want Android OS to be on 8192 MB (8GB) partition + Linux OS partition of 12288 MB (12GB) and the rest of the space to be used by the userdata, so if you found some error feel free to correct me.

========DroidOS-8GB/Linux-12GB for RK3288 parameter tunning==========
Below are provided values and their calculated value in MBytes

0x00002000@0x00002000(uboot)
4M@4M

0x00002000@0x00004000(misc)
4M@8M

0x00008000@0x00006000(resource)
16M@8M

0x00008000@0x0000E000(kernel)
16M@28M

0x00010000@0x00016000(boot)
32M@44M

0x00010000@0x00026000(recovery)
32M@76M

0x0001A000@0x00036000(backup)
52M@108M

0x00040000@0x00050000(cache)
128M@160M

0x00002000@0x00090000(kpanic)
4M@288M

0x00180000@0x00092000(system)
768M@292M

0x00002000@0x00212000(metadata)
4M@1060M

0x01000000@0x00214000(userdata)
8192M@1064M

----------------Below start the changed part from original parameter file--------
0x01260000@0x00414000(linuxroot) -- Extend to 12GB
9408M@2088M
OLD Linux 9G

NEW resize to 12GB
0x01800000@0x01214000
12288M@9256M
------------------------
-@0x01234000(user) -- To the end of space and using internal NAND as SD card  for user space
9320M
OLD >> NEW
-@0x2A14000(user)
21544M
已有 1评分Prestige +10 Money +11 Contribution +6 Pack up reason
busybee + 10 + 11 + 6 detailed and useful

View all ratings

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