aboutsummaryrefslogtreecommitdiff
path: root/hooks/build-hikey960-super-ptable.sh
blob: 35f86b89b2f2945204fac4479d72cb6c81835b7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash -ex

#######################################################
# better to be speified in the build config file
function main(){
    local dir_out_target="out/target/product/hikey960"
    local f_ptable_vendor=$(ls vendor/linaro/hikey960/*/bootloader/prm_ptable.img|tail -n1)
    local f_ptable_device="device/linaro/hikey/installer/hikey960/prm_ptable.img"
    if [ -f "${f_ptable_vendor}" ]; then
        # for master build
        cp -vf "${f_ptable_vendor}" "${dir_out_target}"
    elif [ -f "${f_ptable_device}" ]; then
        # for android11, android12 with the super partition support
        # android10 would come here as well,
        # but this script should not be run for android10
        cp -vf "${f_ptable_device}" "${dir_out_target}"
    else
        echo "The prm_ptable.img file was not found!"
        return 1
    fi
}

main "$@"