<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/barebox.git/include/console.h, branch master</title>
<subtitle>git.pengutronix.de: git/barebox.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/barebox.git/'/>
<entry>
<title>Rename struct device_d to device</title>
<updated>2023-01-10T14:43:47+00:00</updated>
<author>
<name>Sascha Hauer</name>
<email>s.hauer@pengutronix.de</email>
</author>
<published>2022-12-14T12:35:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/barebox.git/commit/?id=c0afc799fb9a19a11f651596fe23b4b755593887'/>
<id>c0afc799fb9a19a11f651596fe23b4b755593887</id>
<content type='text'>
The '_d' suffix was originally introduced in case we want to import
Linux struct device as a separate struct into barebox. Over time it
became clear that this won't happen, instead barebox struct device_d
is basically the same as Linux struct device. Rename the struct name
accordingly to make porting Linux code easier.

Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Reviewed-by: Marco Felsch &lt;m.felsch@pengutronix.de&gt;
Link: https://lore.barebox.org/20221214123512.189688-3-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The '_d' suffix was originally introduced in case we want to import
Linux struct device as a separate struct into barebox. Over time it
became clear that this won't happen, instead barebox struct device_d
is basically the same as Linux struct device. Rename the struct name
accordingly to make porting Linux code easier.

Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Reviewed-by: Marco Felsch &lt;m.felsch@pengutronix.de&gt;
Link: https://lore.barebox.org/20221214123512.189688-3-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename device_d::device_node to device_d::of_node</title>
<updated>2023-01-10T14:43:46+00:00</updated>
<author>
<name>Sascha Hauer</name>
<email>s.hauer@pengutronix.de</email>
</author>
<published>2022-12-14T12:35:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/barebox.git/commit/?id=e70b9d7a74698f1374244b2251216428db920aed'/>
<id>e70b9d7a74698f1374244b2251216428db920aed</id>
<content type='text'>
Linux struct device has the member of_node for the device_node pointer.
Rename this in barebox accordingly to minimize the necessary changes
when porting Linux code. This was done with the semantic patch:

@@ struct device_d E; @@
- E.device_node
+ E.of_node
@@ struct device_d *E; @@
- E-&gt;device_node
+ E-&gt;of_node

Plus some manual adjustments.

Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Reviewed-by: Marco Felsch &lt;m.felsch@pengutronix.de&gt;
Link: https://lore.barebox.org/20221214123512.189688-2-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Linux struct device has the member of_node for the device_node pointer.
Rename this in barebox accordingly to minimize the necessary changes
when porting Linux code. This was done with the semantic patch:

@@ struct device_d E; @@
- E.device_node
+ E.of_node
@@ struct device_d *E; @@
- E-&gt;device_node
+ E-&gt;of_node

Plus some manual adjustments.

Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Reviewed-by: Marco Felsch &lt;m.felsch@pengutronix.de&gt;
Link: https://lore.barebox.org/20221214123512.189688-2-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>console: add new $global.bootm.earlycon parameter</title>
<updated>2022-06-09T09:22:23+00:00</updated>
<author>
<name>Ahmad Fatoum</name>
<email>a.fatoum@pengutronix.de</email>
</author>
<published>2022-05-23T09:25:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/barebox.git/commit/?id=d17f29dba03058294ccc9fed73af3d34014e4d6a'/>
<id>d17f29dba03058294ccc9fed73af3d34014e4d6a</id>
<content type='text'>
barebox already fixes up a suitable console= parameter if it can
determine one into the kernel command line. This doesn't help with early
Linux issues, which can instead be debugged by the earlycon mechanism.

For earlycon to work, the kernel DT must have a stdout-path or the user
needs to explicitly specify what driver to use and how to access it
(base address, optionally access_type).

Make this easier by just having barebox fix up the needed information
when $global.bootm.earlycon is true and the barebox serial driver
provides the needed information. If the serial driver doesn't, a plain
"earlycon" parameter will be fixed up.

Signed-off-by: Ahmad Fatoum &lt;a.fatoum@pengutronix.de&gt;
Link: https://lore.barebox.org/20220523092526.791716-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
barebox already fixes up a suitable console= parameter if it can
determine one into the kernel command line. This doesn't help with early
Linux issues, which can instead be debugged by the earlycon mechanism.

For earlycon to work, the kernel DT must have a stdout-path or the user
needs to explicitly specify what driver to use and how to access it
(base address, optionally access_type).

Make this easier by just having barebox fix up the needed information
when $global.bootm.earlycon is true and the barebox serial driver
provides the needed information. If the serial driver doesn't, a plain
"earlycon" parameter will be fixed up.

Signed-off-by: Ahmad Fatoum &lt;a.fatoum@pengutronix.de&gt;
Link: https://lore.barebox.org/20220523092526.791716-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>console: add new CONFIG_CONSOLE_DISABLE_INPUT option</title>
<updated>2021-10-05T11:51:11+00:00</updated>
<author>
<name>Rouven Czerwinski</name>
<email>r.czerwinski@pengutronix.de</email>
</author>
<published>2021-09-15T12:36:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/barebox.git/commit/?id=87ed07a0022f0bc202be38abf4a748b5b12edf9a'/>
<id>87ed07a0022f0bc202be38abf4a748b5b12edf9a</id>
<content type='text'>
Add CONFIG_CONSOLE_DISABLE_INPUT to initialize the consoles without
input support, making default bootup effectively non-interactive.

Signed-off-by: Rouven Czerwinski &lt;r.czerwinski@pengutronix.de&gt;
Signed-off-by: Ahmad Fatoum &lt;a.fatoum@pengutronix.de&gt;
Tested-by: Christian Melki &lt;christian.melki@t2data.com&gt;
Link: https://lore.barebox.org/20210915123644.1292607-1-ahmad@a3f.at
Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add CONFIG_CONSOLE_DISABLE_INPUT to initialize the consoles without
input support, making default bootup effectively non-interactive.

Signed-off-by: Rouven Czerwinski &lt;r.czerwinski@pengutronix.de&gt;
Signed-off-by: Ahmad Fatoum &lt;a.fatoum@pengutronix.de&gt;
Tested-by: Christian Melki &lt;christian.melki@t2data.com&gt;
Link: https://lore.barebox.org/20210915123644.1292607-1-ahmad@a3f.at
Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common: console_common: add of_console_get_by_alias() helper</title>
<updated>2020-08-24T06:48:36+00:00</updated>
<author>
<name>Oleksij Rempel</name>
<email>o.rempel@pengutronix.de</email>
</author>
<published>2020-08-20T07:34:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/barebox.git/commit/?id=e8e24151f2254832d0462528ca722d7c4d261a81'/>
<id>e8e24151f2254832d0462528ca722d7c4d261a81</id>
<content type='text'>
Add helper function to get console device by devicetree alias

Signed-off-by: Oleksij Rempel &lt;o.rempel@pengutronix.de&gt;
Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add helper function to get console device by devicetree alias

Signed-off-by: Oleksij Rempel &lt;o.rempel@pengutronix.de&gt;
Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: remove references to CREDITS</title>
<updated>2020-04-27T19:16:06+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2020-04-23T20:44:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/barebox.git/commit/?id=cd24f633a063f0fd2c18f4c584cd43bd609bafbe'/>
<id>cd24f633a063f0fd2c18f4c584cd43bd609bafbe</id>
<content type='text'>
The CREDITS file was removed from barebox in 2015 by commit 6570288f2d97
("Remove the CREDITS file"). Remove references to it from several files.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The CREDITS file was removed from barebox in 2015 by commit 6570288f2d97
("Remove the CREDITS file"). Remove references to it from several files.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>include: add SPDX GPL-2.0-or-later license tags where applicable</title>
<updated>2020-02-17T09:08:47+00:00</updated>
<author>
<name>Roland Hieber</name>
<email>rohieb@rohieb.name</email>
</author>
<published>2020-02-13T12:12:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/barebox.git/commit/?id=9d90f943eedf9610181be4a0c42285926d8a5338'/>
<id>9d90f943eedf9610181be4a0c42285926d8a5338</id>
<content type='text'>
Signed-off-by: Roland Hieber &lt;rohieb@rohieb.name&gt;
Reviewed-by: Ahmad Fatoum &lt;a.fatoum@pengutronix.de&gt;
Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Roland Hieber &lt;rohieb@rohieb.name&gt;
Reviewed-by: Ahmad Fatoum &lt;a.fatoum@pengutronix.de&gt;
Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common: provide stubs for ctrlc_* functions</title>
<updated>2019-12-02T10:02:21+00:00</updated>
<author>
<name>Lucas Stach</name>
<email>l.stach@pengutronix.de</email>
</author>
<published>2019-11-29T15:14:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/barebox.git/commit/?id=0ae74f9519eba2c58e1912c14c2db9e1e40d711a'/>
<id>0ae74f9519eba2c58e1912c14c2db9e1e40d711a</id>
<content type='text'>
Currently the stubs are only provided for CONFIG_CONSOLE_SIMPLE, but
they are also needed for CONSOLE_NONE. Move them to the header.

Signed-off-by: Lucas Stach &lt;l.stach@pengutronix.de&gt;
Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently the stubs are only provided for CONFIG_CONSOLE_SIMPLE, but
they are also needed for CONSOLE_NONE. Move them to the header.

Signed-off-by: Lucas Stach &lt;l.stach@pengutronix.de&gt;
Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>console: fix out-of-bounds read in dputc(/dev/*, ...)</title>
<updated>2019-09-02T07:12:30+00:00</updated>
<author>
<name>Ahmad Fatoum</name>
<email>a.fatoum@pengutronix.de</email>
</author>
<published>2019-08-23T09:25:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/barebox.git/commit/?id=75a74b5c107b3bc30f9c3836208f4c17f9309eed'/>
<id>75a74b5c107b3bc30f9c3836208f4c17f9309eed</id>
<content type='text'>
Trying to output a single character via
	echo -a /dev/serial0-1
currently results in garbage output after the newline, because console.c's
fops_write discards the buffer length and passes the buffer to
(struct cdev)::puts which only handles NUL-terminated strings.

Fix this by amending (struct cdev)::puts with a new nbytes parameter,
which is correctly propagated. All this functions now return at most the
nbytes parameter they were passed in. This fixes __console_puts, which
used to count new lines twice in its return value.

Fixes: b4f55fcf35 ("console: expose consoles in devfs")
Cc: Bastian Krause &lt;bst@pengutronix.de&gt;
Signed-off-by: Ahmad Fatoum &lt;a.fatoum@pengutronix.de&gt;
Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Trying to output a single character via
	echo -a /dev/serial0-1
currently results in garbage output after the newline, because console.c's
fops_write discards the buffer length and passes the buffer to
(struct cdev)::puts which only handles NUL-terminated strings.

Fix this by amending (struct cdev)::puts with a new nbytes parameter,
which is correctly propagated. All this functions now return at most the
nbytes parameter they were passed in. This fixes __console_puts, which
used to count new lines twice in its return value.

Fixes: b4f55fcf35 ("console: expose consoles in devfs")
Cc: Bastian Krause &lt;bst@pengutronix.de&gt;
Signed-off-by: Ahmad Fatoum &lt;a.fatoum@pengutronix.de&gt;
Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>console: forbid ctrlc during startup</title>
<updated>2019-04-24T08:11:18+00:00</updated>
<author>
<name>Sascha Hauer</name>
<email>s.hauer@pengutronix.de</email>
</author>
<published>2019-02-25T11:37:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/barebox.git/commit/?id=ec5f3d3dbbc054cf704a658d2734b67df466926b'/>
<id>ec5f3d3dbbc054cf704a658d2734b67df466926b</id>
<content type='text'>
When global.autoboot_abort_key is set to ctrl-c then the user is
expected to press ctrl-c to get to the prompt. The user might press
ctrl-c before the init script runs the "timeout" command. In this
case the init script is aborted at arbitrary places which leads to
inconsistent results depending on the place it is aborted.

This patch introduces the global.console.ctrlc_allowed variable.
When this variable is set to false ctrl-c is ignored entirely.
The variable is set to false by default and changed to true in
the init script.

Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When global.autoboot_abort_key is set to ctrl-c then the user is
expected to press ctrl-c to get to the prompt. The user might press
ctrl-c before the init script runs the "timeout" command. In this
case the init script is aborted at arbitrary places which leads to
inconsistent results depending on the place it is aborted.

This patch introduces the global.console.ctrlc_allowed variable.
When this variable is set to false ctrl-c is ignored entirely.
The variable is set to false by default and changed to true in
the init script.

Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
