我编译twrp时boot.img太大了

时间:2015-09-16 05:51:38

标签: android

我正在尝试为我的设备编译twrp,但我遇到了一些错误,我不能 解决这个问题。有人可以帮忙吗?

这是错误:

  

/home/hsl/cm12/out/target/product/nx511j/boot.img maxsize = 3514368   blocksize = 135168总= 17790976储备= 270336错误:   /home/hsl/cm12/out/target/product/nx511j/boot.img太大(17790976

     
    

[3784704 - 270336])make: * [/home/hsl/cm12/out/target/product/nx511j/boot.img]错误1 make:*     正在删除文件“/home/hsl/cm12/out/target/product/nx511j/boot.img”make:***     正在等待未完成的任务....

  

BoardConfig.mk

fix this up by examining /proc/mtd on a running device
BOARD_BOOTIMAGE_PARTITION_SIZE := 0x00380000
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x00480000
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 0x08c60000
BOARD_USERDATAIMAGE_PARTITION_SIZE := 0x105c0000
BOARD_FLASH_BLOCK_SIZE := 131072

我发现的关于Boot& amp;恢复分区

主要次要#blocks名称

179        0   15392768 mmcblk0

179        1      65536 mmcblk0p1

179        2         32 mmcblk0p2

179        3       1536 mmcblk0p3

179        4         16 mmcblk0p4

179        5          1 mmcblk0p5

179        6          8 mmcblk0p6

179        7        512 mmcblk0p7

179        8        512 mmcblk0p8

179        9       1024 mmcblk0p9

179       10       1024 mmcblk0p10

179       11        512 mmcblk0p11

179       12        512 mmcblk0p12

179       13        512 mmcblk0p13

179       14        512 mmcblk0p14

179       15        512 mmcblk0p15

179       16        512 mmcblk0p16

179       17       1536 mmcblk0p17

179       18       1536 mmcblk0p18

179       19      32768 mmcblk0p19

179       20      32768 mmcblk0p20

179       21      32768 mmcblk0p21

179       22    1572864 mmcblk0p22

179       23       8192 mmcblk0p23

179       24     262144 mmcblk0p24

179       25       1024 mmcblk0p25

179       26        512 mmcblk0p26

179       27         32 mmcblk0p27

179       28      65536 mmcblk0p28

179       29      10240 mmcblk0p29

179       30   12947919 mmcblk0p30

179       32       4096 mmcblk0rpmb

179       64   15558144 mmcblk1

179       65   15556608 mmcblk1p1
1970-01-01 15:14 DDR -> /dev/block/mmcblk0p2

1970-01-01 15:14 aboot -> /dev/block/mmcblk0p9

1970-01-01 15:14 abootbak -> /dev/block/mmcblk0p10

1970-01-01 15:14 boot -> /dev/block/mmcblk0p19

1970-01-01 15:14 cache -> /dev/block/mmcblk0p24

1970-01-01 15:14 config -> /dev/block/mmcblk0p27

1970-01-01 15:14 fsc -> /dev/block/mmcblk0p5

1970-01-01 15:14 fsg -> /dev/block/mmcblk0p3

1970-01-01 15:14 hyp -> /dev/block/mmcblk0p15

1970-01-01 15:14 hypbak -> /dev/block/mmcblk0p16

1970-01-01 15:14 keystore -> /dev/block/mmcblk0p26

1970-01-01 15:14 misc -> /dev/block/mmcblk0p25

1970-01-01 15:14 modem -> /dev/block/mmcblk0p1

1970-01-01 15:14 modemst1 -> /dev/block/mmcblk0p17

1970-01-01 15:14 modemst2 -> /dev/block/mmcblk0p18

1970-01-01 15:14 oem -> /dev/block/mmcblk0p28

1970-01-01 15:14 persist -> /dev/block/mmcblk0p23

1970-01-01 15:14 recovery -> /dev/block/mmcblk0p20

1970-01-01 15:14 recovery2 -> /dev/block/mmcblk0p21

1970-01-01 15:14 rpm -> /dev/block/mmcblk0p11

1970-01-01 15:14 rpmbak -> /dev/block/mmcblk0p12

1970-01-01 15:14 sbl1 -> /dev/block/mmcblk0p7

1970-01-01 15:14 sbl1bak -> /dev/block/mmcblk0p8

1970-01-01 15:14 sec -> /dev/block/mmcblk0p4

1970-01-01 15:14 splash -> /dev/block/mmcblk0p29

1970-01-01 15:14 ssd -> /dev/block/mmcblk0p6

1970-01-01 15:14 system -> /dev/block/mmcblk0p22

1970-01-01 15:14 tz -> /dev/block/mmcblk0p13

1970-01-01 15:14 tzbak -> /dev/block/mmcblk0p14

1970-01-01 15:14 userdata -> /dev/block/mmcblk0p30

1 个答案:

答案 0 :(得分:1)

Necro-Answering,因为我正在为Nubia Z11 mini寻找相同的信息:)

您可以在帖子中获得所需的信息来计算它。

但是,要完成答案以便其他人从您发布的adb获取信息,可以执行此操作(假设您已植根)。

adb shell
su
cd /dev
ls -lR|grep by-name|grep block

对我来说,这会输出./block/platform/7824900.sdhci/by-name:。除非您安装了busybox / toybox,否则无法使用命令切断结束冒号,因此您必须像笨蛋一样手动复制和粘贴它,然后执行:

ls -l ./block/platform/7824900.sdhci/by-name|grep recovery

对我来说这是输出

lrwxrwxrwx root     root              1970-06-22 19:11 recovery -> /dev/block/mmcblk0p22

对你而言,它会输出1970-01-01 15:14 recovery -> /dev/block/mmcblk0p20

关键部分是最后的一个词。然后,您可以获得该块的数量。

cat /proc/partitions|grep mmcblk0p20  

对你而言,这将有输出

179       20      32768 mmcblk0p20

这表示有32768个区块。

每个块的大小为1024.

32768 x 1024 = 33554432

因此,在你的BoardConfig.mk中你放

# Partitions
BOARD_BOOTIMAGE_PARTITION_SIZE := 33554432
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 33554432

在GitHub上搜索此手机和BoardConfig.mk表明计算与其他人正在使用的相符。

https://github.com/nx511j-multirom/android_device_nubia_nx511j/blob/mkm/BoardConfig.mk#L70-L71