[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdUcxX1Zvb7X+uxLa1u0WkOtS8hAZ000+Ta+7SCdkeJO8g@mail.gmail.com>
Date: Tue, 27 Oct 2020 11:11:53 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Saravana Kannan <saravanak@...gle.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Rob Herring <robh@...nel.org>,
Nicolas Saenz Julienne <nsaenzjulienne@...e.de>,
Android Kernel Team <kernel-team@...roid.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1] scripts/dev-needs: Add script to list device dependencies
Hi Saravana,
On Wed, Sep 2, 2020 at 12:51 AM Saravana Kannan <saravanak@...gle.com> wrote:
> This script can be useful for:
> - Figuring out the list of modules you need to pack in initrd
> - Figuring out the list of drivers you need to modularize for a device
> to be fully functional without building in any dependencies.
> - Figuring out which drivers to enable first, when porting drivers
> between kernels (say, to upstream).
> - Plotting graphs of system dependencies, etc.
>
> Usage: dev-needs.sh [-c|-d|-m|-f] [filter options] <list of devices>
>
> This script needs to be run on the target device once it has booted to a
> shell.
>
> The script takes as input a list of one or more device directories under
> /sys/devices and then lists the probe dependency chain (suppliers and
> parents) of these devices. It does a breadth first search of the dependency
> chain, so the last entry in the output is close to the root of the
> dependency chain.
Thanks for your patch!
> --- /dev/null
> +++ b/scripts/dev-needs.sh
> @@ -0,0 +1,315 @@
> +#! /bin/sh
On Debian, where /bin/sh -> dash:
dev-needs.sh: 6: dev-needs.sh: Syntax error: "(" unexpected
When using bash, I get:
# ./dev-needs.sh /sys/devices/platform/soc/feb00000.display
./dev-needs.sh: line 255: detail: command not found
./dev-needs.sh: line 255: detail: command not found
./dev-needs.sh: line 255: detail: command not found
./dev-needs.sh: line 255: detail: command not found
./dev-needs.sh: line 255: detail: command not found
./dev-needs.sh: line 255: detail: command not found
./dev-needs.sh: line 255: detail: command not found
./dev-needs.sh: line 255: detail: command not found
# ./dev-needs.sh -c /sys/devices/platform/soc/feb00000.display
./dev-needs.sh: line 255: detail: command not found
./dev-needs.sh: line 255: detail: command not found
./dev-needs.sh: line 255: detail: command not found
./dev-needs.sh: line 255: detail: command not found
./dev-needs.sh: line 255: detail: command not found
./dev-needs.sh: line 255: detail: command not found
./dev-needs.sh: line 255: detail: command not found
./dev-needs.sh: line 255: detail: command not found
Which shell should I use?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists