Skip to content

Commit

Permalink
generate_ptable.sh: generate only the primary partition table by default
Browse files Browse the repository at this point in the history
Update the partition table and generate only the primary partition table.
The capacity of HiKey eMMC is now 3.56G instead of 3.6G. The secondary
partition table can't be generated anymore due to the eMMC size changes.

Signed-off-by: Haojian Zhuang <[email protected]>
  • Loading branch information
hzhuang1 authored and fboudra committed Jun 28, 2015
1 parent 09a7f00 commit 64797c7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ l-loader.bin: start.S debug.S
$(OBJCOPY) -O binary loader temp
python gen_loader.py -o l-loader.bin --img_loader=temp --img_bl1=bl1.bin
sudo PTABLE=aosp bash -x generate_ptable.sh
python gen_loader.py -o ptable-aosp.img --img_prm_ptable=prm_ptable.img --img_sec_ptable=sec_ptable.img
python gen_loader.py -o ptable-aosp.img --img_prm_ptable=prm_ptable.img
sudo PTABLE=linux bash -x generate_ptable.sh
python gen_loader.py -o ptable-linux.img --img_prm_ptable=prm_ptable.img --img_sec_ptable=sec_ptable.img
python gen_loader.py -o ptable-linux.img --img_prm_ptable=prm_ptable.img

clean:
rm -f *.o loader l-loader.bin temp
6 changes: 3 additions & 3 deletions generate_ptable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ case ${PTABLE} in
SECTOR_NUMBER=81920
;;
aosp|linux)
SECTOR_NUMBER=7553024
SECTOR_NUMBER=7471104
;;
esac

Expand Down Expand Up @@ -50,8 +50,8 @@ case ${PTABLE} in
sgdisk -n 8:0:+256M -t 8:8301 -u 8:A092C620-D178-4CA7-B540-C4E26BD6D2E2 -c 8:"cache" ${TEMP_FILE}
#[9: system: 590M-2126M]
sgdisk -n 9:0:+1536M -t 9:8300 -u 9:FC56E345-2E8E-49AE-B2F8-5B9D263FE377 -c 9:"system" ${TEMP_FILE}
#[10: userdata: 2126M-3662M]
sgdisk -n 10:0:+1536M -t 10:8300 -u 10:064111F6-463B-4CE1-876B-13F3684CE164 -c 10:"userdata" -p ${TEMP_FILE}
#[10: userdata: 2126M-End]
sgdisk -n -E -t 10:8300 -u 10:064111F6-463B-4CE1-876B-13F3684CE164 -c 10:"userdata" -p ${TEMP_FILE}
;;
linux)
dd if=/dev/zero of=${TEMP_FILE} bs=${SECTOR_SIZE} count=${SECTOR_NUMBER}
Expand Down

0 comments on commit 64797c7

Please sign in to comment.