-
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
Fixes for building with sony_aosp_11 #335
base: master
Are you sure you want to change the base?
Fixes for building with sony_aosp_11 #335
Conversation
6bcf406
to
78d1ddc
Compare
# Find the kernel build directory. | ||
# AOSP seems to use .../obj/kernel/.config not obj/KERNEL_OBJ/.config like CM. | ||
# Sony AOSP 11 uses a separate storage area. | ||
if [[ -f %{android_root}/out/target/product/%{device}/obj/KERNEL_OBJ/.config ]]; 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.
Use [ instead.
# AOSP seems to use .../obj/kernel/.config not obj/KERNEL_OBJ/.config like CM. | ||
# Sony AOSP 11 uses a separate storage area. | ||
if [[ -f %{android_root}/out/target/product/%{device}/obj/KERNEL_OBJ/.config ]]; then | ||
KERNEL_PATH=%{android_root}/out/target/product/%{device}/obj/KERNEL_OBJ/ |
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.
Don't caps the variable unless it is a environment variable.
@@ -535,6 +546,20 @@ android_version_major=$(awk '/PLATFORM_VERSION([A-Z0-9.]*|_LAST_STABLE) := ([0-9 | |||
< %{android_root}/build/core/version_defaults.mk \ | |||
| awk -F'.' '{print $1}') | |||
|
|||
# Find the kernel build directory. | |||
# AOSP seems to use .../obj/kernel/.config not obj/KERNEL_OBJ/.config like CM. | |||
# Sony AOSP 11 uses a separate storage area. |
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 isn't really a standard for these as you are not supposed to be build the kernel inside the Android build system.
Also the comment about CM is out of date as there's no CM anymore
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.
I'm not sure if it is good to look for the path of the kernel config this way.
Something else would work better.
@moralrecordings Please try #336 instead. |
#336 is definitely the better approach, but is missing the check for The cheap option would be to move the search up to |
That's the default path you should use -O to the regular path or create a PR to change the default.You can do so like this: |
out/clang.sh/kernel-tmp-(device)
. These are required byrpm/dhd/helpers/build_packages.sh --droid-hal
. As the existing wildcard couldn't be modified easily to include such a different location, I replaced it with some conditionals and an exit statement on failure. The code now stores it in a shell variable KERNEL_PATH; I wasn't able to find a way to persist this between%build
and%install
, so I had to duplicate it. I'm not an RPM expert, so I'd welcome any advice.