Skip to content

Comments

Add tizen x64 rootfs and cross build support#11832

Merged
jkotas merged 2 commits intodotnet:mainfrom
gbalykov:add-tizen-x64-rootfs
Dec 9, 2022
Merged

Add tizen x64 rootfs and cross build support#11832
jkotas merged 2 commits intodotnet:mainfrom
gbalykov:add-tizen-x64-rootfs

Conversation

@gbalykov
Copy link
Member

@gbalykov gbalykov commented Dec 5, 2022

Change similar to #8609

cc @alpencolt

@am11
Copy link
Member

am11 commented Dec 5, 2022

These are the fifth copies of {arch}/tizen-fetch.sh and {arch}/tizen-build-rootfs.sh files. They are duplicates of each other with few lines of differences. Can we deduplicate this code by having just one of each and pass architecture as positional argument?

./tizen-fetch.sh $TIZEN_TMP_DIR $arch
if [ "$2" = "x64" ]; then do_something_differnet; fi

@gbalykov
Copy link
Member Author

gbalykov commented Dec 5, 2022

@am11 Thanks, I agree. It's time to unify these scripts.

@gbalykov gbalykov force-pushed the add-tizen-x64-rootfs branch from 4f9860f to 35d14be Compare December 5, 2022 19:40
@gbalykov
Copy link
Member Author

gbalykov commented Dec 5, 2022

I've unified scripts

am11
am11 previously approved these changes Dec 6, 2022
Copy link
Member

@am11 am11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup! 👍

Comment on lines 7 to 22
if [ "$ARCH" == "arm" ]; then
TIZEN_ARCH="armv7hl"
elif [ "$ARCH" == "armel" ]; then
TIZEN_ARCH="armv7l"
LINK_ARCH="arm"
elif [ "$ARCH" == "arm64" ]; then
TIZEN_ARCH="aarch64"
elif [ "$ARCH" == "x86" ]; then
TIZEN_ARCH="i686"
elif [ "$ARCH" == "x64" ]; then
TIZEN_ARCH="x86_64"
LINK_ARCH="x86"
else
echo "Unsupported architecture for tizen: $ARCH"
exit 1
fi
Copy link
Member

@am11 am11 Dec 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: align style with build-rootfs.sh (4 spaces indentation, case-esac for switching etc.)

Suggested change
if [ "$ARCH" == "arm" ]; then
TIZEN_ARCH="armv7hl"
elif [ "$ARCH" == "armel" ]; then
TIZEN_ARCH="armv7l"
LINK_ARCH="arm"
elif [ "$ARCH" == "arm64" ]; then
TIZEN_ARCH="aarch64"
elif [ "$ARCH" == "x86" ]; then
TIZEN_ARCH="i686"
elif [ "$ARCH" == "x64" ]; then
TIZEN_ARCH="x86_64"
LINK_ARCH="x86"
else
echo "Unsupported architecture for tizen: $ARCH"
exit 1
fi
case "$ARCH" in
arm)
TIZEN_ARCH="armv7hl"
;;
armel)
TIZEN_ARCH="armv7l"
LINK_ARCH="arm"
;;
arm64)
TIZEN_ARCH="aarch64"
;;
x86)
TIZEN_ARCH="i686"
;;
x64)
TIZEN_ARCH="x86_64"
LINK_ARCH="x86"
;;
*)
echo "Unsupported architecture for tizen: $ARCH"
exit 1
esac

@@ -51,6 +51,8 @@ if [ ! -d $TMPDIR ]; then
mkdir -p $TMPDIR
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: 4 space indentation in this file.

Copy link
Member

@am11 am11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you for the consolidation!
(we can wireup build-rootfs-android the same way some day 💡)

@am11
Copy link
Member

am11 commented Dec 9, 2022

cc @jkotas

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@jkotas jkotas merged commit 8b26e45 into dotnet:main Dec 9, 2022
@gbalykov
Copy link
Member Author

gbalykov commented Dec 9, 2022

Thank you

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

Successfully merging this pull request may close these issues.

3 participants