Skip to content

Commit

Permalink
- Added armv6l from Gatux@877df97
Browse files Browse the repository at this point in the history
  and additionally armv7l and arm64.
  • Loading branch information
xet7 committed Dec 18, 2018
1 parent 0fcc7dd commit 014fe04
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 17 deletions.
23 changes: 23 additions & 0 deletions README.md
Expand Up @@ -43,6 +43,29 @@ cd try-meteor
meteor
```

## ARMv6l

Tested with a Raspberry pi Zero

Build the bundle (~1h):
```bash
./scripts/generate-dev-bundle.sh
```

Install and update meteor (~few hours):
```bash
meteor create testproject
```

Start your project (you may need to start mongodb from dev_bundle manually first):
```bash
MONGO_URL="mongodb://localhost:27017/meteor" meteor
```

## ARMv7l and ARM64

Building similar like on ARMv6l.

## Developer Resources

Building an application with Meteor?
Expand Down
4 changes: 2 additions & 2 deletions meteor
Expand Up @@ -22,9 +22,9 @@ if [ "$UNAME" = "Darwin" ] ; then
ARCH="x86_64"
elif [ "$UNAME" = "Linux" ] ; then
ARCH="$(uname -m)"
if [ "$ARCH" != "i686" -a "$ARCH" != "x86_64" ] ; then
if [ "$ARCH" != "i686" -a "$ARCH" != "x86_64" -a "$ARCH" != "armv6l" -a "$ARCH" != "armv7l" -a "$ARCH" != "aarch64" ] ; then
echo "Unsupported architecture: $ARCH"
echo "Meteor only supports i686 and x86_64 for now."
echo "Meteor only supports i686, x86_64, armv6l, armv7l and arm64 for now."
exit 1
fi
fi
Expand Down
13 changes: 11 additions & 2 deletions scripts/build-dev-bundle-common.sh
Expand Up @@ -14,9 +14,9 @@ NPM_VERSION=6.4.1
NODE_BUILD_NUMBER=

if [ "$UNAME" == "Linux" ] ; then
if [ "$ARCH" != "i686" -a "$ARCH" != "x86_64" ] ; then
if [ "$ARCH" != "i686" -a "$ARCH" != "x86_64" -a "$ARCH" != "armv6l" -a "$ARCH" != "armv7l" -a "$ARCH" != "aarch64" ] ; then
echo "Unsupported architecture: $ARCH"
echo "Meteor only supports i686 and x86_64 for now."
echo "Meteor only supports i686, x86_64, armv6l, arm7l and arm64 for now."
exit 1
fi

Expand Down Expand Up @@ -63,6 +63,15 @@ then
elif [ "$ARCH" == "x86_64" ]
then
NODE_TGZ="node-v${NODE_VERSION}-linux-x64.tar.gz"
elif [ "$ARCH" == "armv6l" ]
then
NODE_TGZ="node-v${NODE_VERSION}-linux-armv6l.tar.gz"
elif [ "$ARCH" == "armv7l" ]
then
NODE_TGZ="node-v${NODE_VERSION}-linux-armv7l.tar.gz"
elif [ "$ARCH" == "aarch64" ]
then
NODE_TGZ="node-v${NODE_VERSION}-linux-arm64.tar.gz"
else
echo "Unknown architecture: $UNAME $ARCH"
exit 1
Expand Down
41 changes: 28 additions & 13 deletions scripts/generate-dev-bundle.sh
Expand Up @@ -67,20 +67,35 @@ fi

if [ $ARCH = "i686" ]; then
MONGO_VERSION=$MONGO_VERSION_32BIT
fi

MONGO_NAME="mongodb-${OS}-${ARCH}-${MONGO_VERSION}"
MONGO_NAME_SSL="mongodb-${OS}${MONGO_SSL}-${ARCH}-${MONGO_VERSION}"
MONGO_TGZ="${MONGO_NAME_SSL}.tgz"
MONGO_URL="http://fastdl.mongodb.org/${OS}/${MONGO_TGZ}"
echo "Downloading Mongo from ${MONGO_URL}"
curl "${MONGO_URL}" | tar zx

# Put Mongo binaries in the right spot (mongodb/bin)
mkdir -p "mongodb/bin"
mv "${MONGO_NAME}/bin/mongod" "mongodb/bin"
mv "${MONGO_NAME}/bin/mongo" "mongodb/bin"
rm -rf "${MONGO_NAME}"

extractNodeFromTarGz || downloadOfficialNode || downloadNodeFromS3

if [ "$ARCH" == "armv6l" ] ; then
# Download Mongo from 4commerce-technologies-ag
MONGO_URL="https://bintray.com/4commerce-technologies-ag/meteor-universal/download_file?file_path=arm_dev_bundles%2Fmongo_Linux_armv6l_v2.6.7.tar.gz"
echo "Downloading Mongo from ${MONGO_URL}"
curl -L "${MONGO_URL}" | tar zx
else
# Download Mongo from mongodb.com. Will download a 64-bit version of Mongo
# by default. Will download a 32-bit version of Mongo if using a 32-bit based
# OS.
MONGO_VERSION=$MONGO_VERSION_64BIT
if [ $ARCH = "i686" ]; then
MONGO_VERSION=$MONGO_VERSION_32BIT
fi
MONGO_NAME="mongodb-${OS}-${ARCH}-${MONGO_VERSION}"
MONGO_TGZ="${MONGO_NAME}.tgz"
MONGO_URL="http://fastdl.mongodb.org/${OS}/${MONGO_TGZ}"
echo "Downloading Mongo from ${MONGO_URL}"
curl "${MONGO_URL}" | tar zx

# Put Mongo binaries in the right spot (mongodb/bin)
mkdir -p "mongodb/bin"
mv "${MONGO_NAME}/bin/mongod" "mongodb/bin"
mv "${MONGO_NAME}/bin/mongo" "mongodb/bin"
rm -rf "${MONGO_NAME}"
fi

# export path so we use the downloaded node and npm
export PATH="$DIR/bin:$PATH"
Expand Down
9 changes: 9 additions & 0 deletions tools/utils/archinfo.js
Expand Up @@ -133,6 +133,9 @@ export const VALID_ARCHITECTURES = {
"os.osx.x86_64": true,
"os.linux.x86_64": true,
"os.linux.x86_32": true,
"os.linux.armv6l": true,
"os.linux.armv7l": true,
"os.linux.aarch64": true,
"os.windows.x86_64": true,
"os.windows.x86_32": true,
};
Expand Down Expand Up @@ -171,6 +174,12 @@ export function host() {
_host = "os.linux.x86_32";
} else if (_.contains(["x86_64", "amd64", "ia64"], machine)) {
_host = "os.linux.x86_64";
} else if (_.contains(["armv6l"], machine)) {
_host = "os.linux.armv6l";
} else if (_.contains(["armv7l"], machine)) {
_host = "os.linux.armv7l";
} else if (_.contains(["aarch64"], machine)) {
_host = "os.linux.aarch64";
} else {
throw new Error("Unsupported architecture: " + machine);
}
Expand Down

0 comments on commit 014fe04

Please sign in to comment.