From d60a19b184e7f337d8a695c9c915afff935c04ba Mon Sep 17 00:00:00 2001 From: Haibo Huang Date: Sun, 4 Nov 2018 09:50:05 -0800 Subject: [PATCH] Writes cpu variant information to dev/ This change adds a command to init.rc to write cpu variant information to a file under dev/ Test: sync to device and make sure corresponding files are created. Change-Id: Ibf90967f13f72af925c82ff79bd973ef4cdc4068 --- rootdir/init.rc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rootdir/init.rc b/rootdir/init.rc index 636daea62..349168e2e 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -269,6 +269,12 @@ on init # that they can be chown'd to system:system later on boot write /sys/class/leds/vibrator/trigger "transient" + # This is used by Bionic to select optimized routines. + write /dev/cpu_variant:${ro.bionic.arch} ${ro.bionic.cpu_variant} + chmod 0444 /dev/cpu_variant:${ro.bionic.arch} + write /dev/cpu_variant:${ro.bionic.2nd_arch} ${ro.bionic.2nd_cpu_variant} + chmod 0444 /dev/cpu_variant:${ro.bionic.2nd_arch} + # Setup APEX mount point and its security context mount tmpfs tmpfs /apex nodev noexec nosuid chmod 0755 /apex