mirror of https://github.com/OpenIPC/firmware.git
auto set allocator (#285)
* hi3516ev300: auto set allocator * revert changes in the building scriptpull/301/head
parent
242e2583f9
commit
ada7762f69
|
@ -70,8 +70,21 @@ report_error()
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
check_allocator() {
|
||||||
|
allocator=$(grep mmz_allocator /proc/cmdline)
|
||||||
|
if [ -z "${allocator}" ]; then
|
||||||
|
if [ ${mem_total} -ge 128 ]; then
|
||||||
|
set_allocator cma
|
||||||
|
else
|
||||||
|
set_allocator hisi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
insert_osal()
|
insert_osal()
|
||||||
{
|
{
|
||||||
|
check_allocator
|
||||||
|
|
||||||
MMZ=$(awk -F '=' '$1=="mmz"{print $2}' RS=" " /proc/cmdline)
|
MMZ=$(awk -F '=' '$1=="mmz"{print $2}' RS=" " /proc/cmdline)
|
||||||
if [ -z "$MMZ" ]; then
|
if [ -z "$MMZ" ]; then
|
||||||
insmod hi_osal.ko anony=1 mmz_allocator=hisi mmz=anonymous,0,$mmz_start,$mmz_size || report_error
|
insmod hi_osal.ko anony=1 mmz_allocator=hisi mmz=anonymous,0,$mmz_start,$mmz_size || report_error
|
||||||
|
|
Loading…
Reference in New Issue