mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-25 01:07:22 +00:00
In almost every case we want the dynamically linked version of futility, because it's smaller and the openssl functions require it (they use dl_open() to invoke the correct RSA libraries). However, the AU shellball requires three futility functions (crossystem, gbb_utility, and dump_fmap). Those pretty much have to be built statically, because they run from the new rootfs and packing all the dynamic libraries into the shellball is way too large and complicated. This change prepares to build both futility (full featured) and futility_s (just those functions). The scripts that create the AU shellball will already choose futility_s from /build/$BOARD/. BUG=chromium:224734 BRANCH=none TEST=none CQ-DEPEND=CL:47589 Nothing to test just yet. The AU shellball is currently broken (it uses the dynamic version of futility and doesn't copy the symlinks anyway), so this should have no effect. We just need to ensure that the _s version doesn't go into any of the other images. Change-Id: I60b8dcd17e135f12a0d29ddacfb9fe8275567c70 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/47466
22 lines
518 B
C
22 lines
518 B
C
/*
|
|
* Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "futility.h"
|
|
|
|
static int do_something(int argc, char *argv[])
|
|
{
|
|
int i;
|
|
printf("this is %s\n", __func__);
|
|
for (i = 0; i < argc; i++)
|
|
printf("argv[%d] = %s\n", i, argv[i]);
|
|
return 0;
|
|
}
|
|
|
|
DECLARE_FUTIL_COMMAND(foo, do_something, "invoke a foo");
|
|
DECLARE_FUTIL_COMMAND(bar, do_something, "go to bar");
|