* [Buildroot] [RESEND,1/1] package/davinci-bootcount: new package
@ 2021-11-14 17:53 Dario Binacchi via buildroot
2021-12-11 9:02 ` [Buildroot] [RESEND, 1/1] " Arnout Vandecappelle
0 siblings, 1 reply; 3+ messages in thread
From: Dario Binacchi via buildroot @ 2021-11-14 17:53 UTC (permalink / raw)
To: buildroot; +Cc: Dario Binacchi, Thomas Petazzoni
U-Boot implements a boot count scheme that can be used to detect
multiple failed attempts to boot Linux. On Davinci platform (TI AM 335x)
the `bootcount' value is stored in the RTC SCRATCH2 register. This tool
allows to read and write this register from userspace.
Signed-off-by: Dario Binacchi <dariobin@libero.it>
---
package/Config.in | 1 +
package/davinci-bootcount/Config.in | 11 +++++++++++
package/davinci-bootcount/davinci-bootcount.hash | 2 ++
package/davinci-bootcount/davinci-bootcount.mk | 15 +++++++++++++++
4 files changed, 29 insertions(+)
create mode 100644 package/davinci-bootcount/Config.in
create mode 100644 package/davinci-bootcount/davinci-bootcount.hash
create mode 100644 package/davinci-bootcount/davinci-bootcount.mk
diff --git a/package/Config.in b/package/Config.in
index cb94e30be3..49a53d44da 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -452,6 +452,7 @@ endmenu
source "package/cwiid/Config.in"
source "package/dahdi-linux/Config.in"
source "package/dahdi-tools/Config.in"
+ source "package/davinci-bootcount/Config.in"
source "package/dbus/Config.in"
source "package/dbus-cpp/Config.in"
source "package/dbus-glib/Config.in"
diff --git a/package/davinci-bootcount/Config.in b/package/davinci-bootcount/Config.in
new file mode 100644
index 0000000000..da3b3605a0
--- /dev/null
+++ b/package/davinci-bootcount/Config.in
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_DAVINCI_BOOTCOUNT
+ bool "davinci bootcount"
+ default n
+ help
+ U-Boot implements a boot count scheme that can be used to
+ detect multiple failed attempts to boot Linux. On Davinci
+ platform (TI AM 335x) the `bootcount' is stored in the RTC
+ SCRATCH2 register. This tool allows to read and write this
+ register from userspace.
+
+ https://github.com/VoltServer/uboot-davinci-bootcount
diff --git a/package/davinci-bootcount/davinci-bootcount.hash b/package/davinci-bootcount/davinci-bootcount.hash
new file mode 100644
index 0000000000..32140c6e62
--- /dev/null
+++ b/package/davinci-bootcount/davinci-bootcount.hash
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 4e4243bfc773cf983db4b901520b0eb2728934d52d26fcf99f5e22f673373f6a davinci-bootcount-0973689c7556a953d2b468e4d8d46758c6d467b4-br1.tar.gz
diff --git a/package/davinci-bootcount/davinci-bootcount.mk b/package/davinci-bootcount/davinci-bootcount.mk
new file mode 100644
index 0000000000..434da494d7
--- /dev/null
+++ b/package/davinci-bootcount/davinci-bootcount.mk
@@ -0,0 +1,15 @@
+################################################################################
+#
+# davinci-bootcount
+#
+################################################################################
+
+DAVINCI_BOOTCOUNT_VERSION = 0973689c7556a953d2b468e4d8d46758c6d467b4
+DAVINCI_BOOTCOUNT_SITE = "https://github.com/VoltServer/uboot-davinci-bootcount"
+DAVINCI_BOOTCOUNT_SITE_METHOD = git
+DAVINCI_BOOTCOUNT_INSTALL_TARGET = YES
+DAVINCI_BOOTCOUNT_LICENSE = GPL-3.0
+DAVINCI_BOOTCOUNT_LICENSE_FILES = COPYING
+DAVINCI_BOOTCOUNT_AUTORECONF = YES
+
+$(eval $(autotools-package))
--
2.17.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [RESEND, 1/1] package/davinci-bootcount: new package
2021-11-14 17:53 [Buildroot] [RESEND,1/1] package/davinci-bootcount: new package Dario Binacchi via buildroot
@ 2021-12-11 9:02 ` Arnout Vandecappelle
2021-12-11 10:02 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Arnout Vandecappelle @ 2021-12-11 9:02 UTC (permalink / raw)
To: Dario Binacchi, buildroot; +Cc: Thomas Petazzoni
I always think, a simple package like this, should be easy to apply...
On 14/11/2021 18:53, Dario Binacchi via buildroot wrote:
> U-Boot implements a boot count scheme that can be used to detect
> multiple failed attempts to boot Linux. On Davinci platform (TI AM 335x)
> the `bootcount' value is stored in the RTC SCRATCH2 register. This tool
> allows to read and write this register from userspace.
>
> Signed-off-by: Dario Binacchi <dariobin@libero.it>
Applied to master, thanks, but with quite some changes.
> ---
> package/Config.in | 1 +
> package/davinci-bootcount/Config.in | 11 +++++++++++
> package/davinci-bootcount/davinci-bootcount.hash | 2 ++
> package/davinci-bootcount/davinci-bootcount.mk | 15 +++++++++++++++
It would be nice to add yourself to the DEVELOPERS file [1] for this package.
This way, you'll get an e-mail if the package fails in the autobuilders, or when
a new version is released if the package is registered on release-monitoring.org.
> 4 files changed, 29 insertions(+)
> create mode 100644 package/davinci-bootcount/Config.in
> create mode 100644 package/davinci-bootcount/davinci-bootcount.hash
> create mode 100644 package/davinci-bootcount/davinci-bootcount.mk
>
> diff --git a/package/Config.in b/package/Config.in
> index cb94e30be3..49a53d44da 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -452,6 +452,7 @@ endmenu
> source "package/cwiid/Config.in"
> source "package/dahdi-linux/Config.in"
> source "package/dahdi-tools/Config.in"
> + source "package/davinci-bootcount/Config.in"
> source "package/dbus/Config.in"
> source "package/dbus-cpp/Config.in"
> source "package/dbus-glib/Config.in"
> diff --git a/package/davinci-bootcount/Config.in b/package/davinci-bootcount/Config.in
> new file mode 100644
> index 0000000000..da3b3605a0
> --- /dev/null
> +++ b/package/davinci-bootcount/Config.in
> @@ -0,0 +1,11 @@
> +config BR2_PACKAGE_DAVINCI_BOOTCOUNT
> + bool "davinci bootcount"
Unless there's a really good reason not to, the prompt should be identical to
the package name.
> + default n
This is the default so it shouldn't be there.
> + help
> + U-Boot implements a boot count scheme that can be used to
> + detect multiple failed attempts to boot Linux. On Davinci
> + platform (TI AM 335x) the `bootcount' is stored in the RTC
> + SCRATCH2 register. This tool allows to read and write this
> + register from userspace.
Great description!
Since this package is poking directly into /dev/mem, perhaps it would be good
to add an arch dependency to Config.in so it can only be built if it's the
davinci CPU. I have no idea what the appropriate dependency would be, so I left
it unchanged.
> +
> + https://github.com/VoltServer/uboot-davinci-bootcount
> diff --git a/package/davinci-bootcount/davinci-bootcount.hash b/package/davinci-bootcount/davinci-bootcount.hash
> new file mode 100644
> index 0000000000..32140c6e62
> --- /dev/null
> +++ b/package/davinci-bootcount/davinci-bootcount.hash
> @@ -0,0 +1,2 @@
> +# Locally calculated
> +sha256 4e4243bfc773cf983db4b901520b0eb2728934d52d26fcf99f5e22f673373f6a davinci-bootcount-0973689c7556a953d2b468e4d8d46758c6d467b4-br1.tar.gz
Please use two spaces between the columns in the hash file (this is something
we haven't documented yet, unfortunately).
Also, you must include a hash for the license files.
> diff --git a/package/davinci-bootcount/davinci-bootcount.mk b/package/davinci-bootcount/davinci-bootcount.mk
> new file mode 100644
> index 0000000000..434da494d7
> --- /dev/null
> +++ b/package/davinci-bootcount/davinci-bootcount.mk
> @@ -0,0 +1,15 @@
> +################################################################################
> +#
> +# davinci-bootcount
> +#
> +################################################################################
> +
> +DAVINCI_BOOTCOUNT_VERSION = 0973689c7556a953d2b468e4d8d46758c6d467b4
> +DAVINCI_BOOTCOUNT_SITE = "https://github.com/VoltServer/uboot-davinci-bootcount"
No quotes are needed.
Also, please use the github helper (which BTW also makes the SITE_METHOD
redundant, and of course changes the has).
> +DAVINCI_BOOTCOUNT_SITE_METHOD = git
> +DAVINCI_BOOTCOUNT_INSTALL_TARGET = YES
This is redundant because it is default. check-package reports that. Please
use check-package.
> +DAVINCI_BOOTCOUNT_LICENSE = GPL-3.0
> +DAVINCI_BOOTCOUNT_LICENSE_FILES = COPYING
> +DAVINCI_BOOTCOUNT_AUTORECONF = YES
We (almost) always put a comment before the AUTORECONF to explain why it is
needed.
# sources fetched from github, no configure script
I made all of those changes, so please double-check that what is in master is
still OK. I did not, however, add you to DEVELOPERS or add an arch dependency.
> +
> +$(eval $(autotools-package))
>
[1] https://buildroot.org/downloads/manual/manual.html#DEVELOPERS
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [RESEND, 1/1] package/davinci-bootcount: new package
2021-12-11 9:02 ` [Buildroot] [RESEND, 1/1] " Arnout Vandecappelle
@ 2021-12-11 10:02 ` Thomas Petazzoni
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2021-12-11 10:02 UTC (permalink / raw)
To: Arnout Vandecappelle; +Cc: Dario Binacchi, buildroot
Hello Arnout,
On Sat, 11 Dec 2021 10:02:31 +0100
Arnout Vandecappelle <arnout@mind.be> wrote:
> > package/Config.in | 1 +
> > package/davinci-bootcount/Config.in | 11 +++++++++++
> > package/davinci-bootcount/davinci-bootcount.hash | 2 ++
> > package/davinci-bootcount/davinci-bootcount.mk | 15 +++++++++++++++
>
> It would be nice to add yourself to the DEVELOPERS file [1] for this package.
I don't think it's "nice". To me, it is mandatory now to be added in
the DEVELOPERS file when contributing a new package. When I merge a
patch adding a new package, if the contributor has forgotten the entry
in the DEVELOPERS file, I always add it when applying.
> Please use two spaces between the columns in the hash file (this is something
> we haven't documented yet, unfortunately).
It is documented. See
https://buildroot.org/downloads/manual/manual.html#adding-packages-hash
in the Buildroot manual, which states:
The format of this file is one line for each file for which to check
the hash, each line with the following three fields separated by two
spaces:
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-12-11 10:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-14 17:53 [Buildroot] [RESEND,1/1] package/davinci-bootcount: new package Dario Binacchi via buildroot
2021-12-11 9:02 ` [Buildroot] [RESEND, 1/1] " Arnout Vandecappelle
2021-12-11 10:02 ` Thomas Petazzoni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.