|
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!
|
|