Skip to content
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

Setup script fails creating correct makefiles #140

Open
fcipaq opened this issue Feb 1, 2019 · 8 comments
Open

Setup script fails creating correct makefiles #140

fcipaq opened this issue Feb 1, 2019 · 8 comments

Comments

@fcipaq
Copy link

fcipaq commented Feb 1, 2019

Hey,

I'm having issues running the setup script to create the file $DEVICE-vendor-blobs.mk
I am using a device which has a device specific repo and a common repo.
Running the setup script results in the creation of a proper $DEVICE-vendor-blobs.mk which is immediately overwritten by a broken version of that file. (I could observe this by using >> instead of >)

The problematic piece of code seems to be in lines 104-123:

While VENDOR and DEVICE are exported (104, 105), the directory is changed to $DEVICE_COMMON_TREE (113). This causes the setup-makefiles.sh script from the repo (Asus Z00A) to create a file with the appropriate content for $DEVICE_COMMON_TREE, but the files goes erroneously to vendor/$VENDOR/$DEVICE (instead of the common vendor directory).
This eventually leads to the build failing. I can fix it by commenting out line 121.

halium-devices/setup

Lines 104 to 123 in 57d7390

export VENDOR
export DEVICE
DEVICE_COMMON_HOLDER=$DEVICE_COMMON
export DEVICE_COMMON=${DEVICE_COMMON:=$k}
PLATFORM_COMMON_HOLDER=$PLATFORM_COMMON
export PLATFORM_COMMON=${PLATFORM_COMMON:=$DEVICE_COMMON}
if [ -f $DEVICE_COMMON_TREE/setup-makefiles.sh ]; then
(
cd $DEVICE_COMMON_TREE
for l in $(find . -name "*proprietary-*.txt"); do
echo "I: Processing proprietary blob file: device/$VENDOR/$k/$l"
grep -r -v -E '(^.*\.{1}(jar|apk)[|]?.*)' $l >$l".tmp" && mv $l".tmp" $l
done
# Set executable bit, needed for some device trees
chmod +x ./setup-makefiles.sh
# Actually run the script
./setup-makefiles.sh
)
fi

Is this a compatibility issue between the halium setup script and the repo's script, or did I miss something out?

@lnjX
Copy link
Member

lnjX commented Feb 1, 2019

@Herrie82 ?

@Herrie82
Copy link
Contributor

Herrie82 commented Feb 1, 2019

I'm happy to have a look if you can point me at the repos. I might be a bit slow in replying since we just moved to a new house and still busy with lots of things including setting up my new build PC ;)

I tested this previously with about 10 different devices from pretty much every manufacturer. In case there were issues previously this was usually due to some issues in the repos. But it could of course be that there's a mistake in the script!

@fcipaq
Copy link
Author

fcipaq commented Feb 1, 2019

Thanks for looking into this.

My device's repo is here:

<remote name="github" fetch="http://github.com" revision="master"/>
<project path="device/dell/bb" name="fcipaq/android_device_dell_bb" remote="github"/>
<project path="device/dell/mofd-common" name="fcipaq/android_device_dell_mofd-common" remote="github"/>

which I basically forked from the official CM repo (so the error should occur here as well):

<project path="device/asus/Z00A" name="android_device_asus_Z00A" remote="los"/>
<project path="device/asus/mofd-common" name="android_device_asus_mofd-common" remote="los"/>

@Herrie82
Copy link
Contributor

@fcipaq I'm having some issues getting Halium builds to work on my new (K)Ubuntu 18.04 builder. I'm looking into it, but it's not helping in debugging this quickly.

@fcipaq
Copy link
Author

fcipaq commented Feb 18, 2019

@Herrie82 Ok, no worries. I found an easy workaround to make the repo files work with the setup script. So this issue is more meant to avoid problems in future ports...

@Herrie82
Copy link
Contributor

Well I got (K)Ubuntu to behave with my 18.04 for Halium 5.1 and 7.1 now. So could start to debug, but good to see you have a workaround. Curious to see what you did.

@fcipaq
Copy link
Author

fcipaq commented Feb 19, 2019

Well... I just hardcoded VENDOR and DEVICE inside both "setup-makefiles.sh" scripts. It may be a little hacky but is perfectly working for me.

@areyoudeveloper
Copy link
Contributor

When merge my pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants