-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dhd: Fix Android 6 <= based builds #260
Conversation
@@ -538,6 +538,7 @@ echo "" > tmp/droid-hal.files | |||
fi | |||
|
|||
if [ -f %{android_root}/out/target/product/%{device}/system/etc/init/hybris_extras.rc ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If .../etc/init
should never exist in Android 6 (or earlier) adaptations, why not move this part into the if block just above and re-use the mkdir? ^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I worked through HADK and built hybris-hal for hammerhead (CyanogenMod 11.0 / Android 4.4). ./out/target/product/hammerhead/system/etc/init/hybris_extras.rc was created.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing reads from that folder in Android 6 or older bases. Hybris version of Android 7 base i.e. hybris-14.1 is the first one to use that folder, correct place for fixing the issue is in hybris-boot repo which seems to create the file on all Android base versions. The file is being created after this commit in hybris-boot mer-hybris/hybris-boot@46095a4 .
Even if the actual fix would be added to hybris-boot the copying of hybris-extras.rc in this code should be limited to android 7 and above and could be moved inside the earlier if block just as @sledges mentioned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sledges, @mlehtima I've updated this PR as you recommended and made PR to fix original source of the problem in hybris-boot (mer-hybris/hybris-boot#184)
this problem happens if Android version is <= 6 and there is file hybris_extras.rc in system/etc/init. It is introduced by commit 1fb8758 ("dhd: add support for one extra init rc, which can be used to provide info from the adaptation to sfos") In this case build_packages.sh fails with following error: $ rpm/dhd/helpers/build_packages.sh + '[' 4 -ge 7 ']' + echo '' + '[' -f ./out/target/product/hammerhead/system/etc/init/hybris_extras.rc ']' + cp -a ./out/target/product/hammerhead/system/etc/init/hybris_extras.rc /media/data/port/android/installroot/usr/libexec/droid-hybris/system/etc/init/ cp: cannot create regular file `/media/data/port/android/installroot/usr/libexec/droid-hybris/system/etc/init/': No such file or directory error: Bad exit status from /var/tmp/rpm-tmp.SrHvD1 (%install)
92b08d0
to
3011fae
Compare
this problem happens if Android version is <= 6 and there is file
hybris_extras.rc in system/etc/init. It is introduced by commit
1fb8758 ("dhd: add support for one extra init rc, which can be
used to provide info from the adaptation to sfos")
In this case build_packages.sh fails with following error:
$ rpm/dhd/helpers/build_packages.sh
cp: cannot create regular file `/media/data/port/android/installroot/usr/libexec/droid-hybris/system/etc/init/': No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.SrHvD1 (%install)