[PATCH] net: phy: fixed-link: read link parameters from devicetree

2018-02-05 Thread Sascha Hauer
From: Lucas Stach 

Implement the missing reading of the fixed link parameters from
the devicetree properties.

Signed-off-by: Lucas Stach 
---
 drivers/net/phy/phy.c | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 2b8fa63c06..42dcad9069 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -309,8 +309,13 @@ static struct phy_device 
*of_phy_register_fixed_link(struct device_node *np,
 
phydev->dev.parent = >dev;
phydev->registered = 1;
-   phydev->speed = 1000;
-   phydev->duplex = 1;
+   phydev->link = 1;
+
+   if (of_property_read_u32(np, "speed", >speed))
+   return NULL;
+   phydev->duplex = of_property_read_bool(np,"full-duplex");
+   phydev->pause = of_property_read_bool(np, "pause");
+   phydev->asym_pause = of_property_read_bool(np, "asym-pause");
 
return phydev;
 }
-- 
2.15.1


___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


[PATCH] startup: Load default environment earlier

2018-02-05 Thread Sascha Hauer
Some files compiled into the default environment may be needed earlier in
the boot process, so move loading of the default environment to fs_initcall.
Only the default environment is loaded earlier, but not the overwriting with
the persistent environment files, so when the files are used that early, only
the compiled in version is available; it's not overwritable at that
time.

Signed-off-by: Sascha Hauer 
---
 common/startup.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/common/startup.c b/common/startup.c
index 432be67cd6..8b075422dd 100644
--- a/common/startup.c
+++ b/common/startup.c
@@ -66,6 +66,9 @@ static int mount_root(void)
mount("none", "pstore", "/pstore", NULL);
}
 
+   if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT))
+   defaultenv_load("/env", 0);
+
return 0;
 }
 fs_initcall(mount_root);
@@ -78,9 +81,6 @@ static int load_environment(void)
 
default_environment_path = default_environment_path_get();
 
-   if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT))
-   defaultenv_load("/env", 0);
-
envfs_load(default_environment_path, "/env", 0);
nvvar_load();
 
-- 
2.15.1


___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


[PATCH 2/2] state: Add 'init_from_defaults' parameter

2018-02-05 Thread Sascha Hauer
The init_from_defaults parameter allows to detect if a state has been
initialized from default values, i.e. state_load failed.

Signed-off-by: Sascha Hauer 
---
 common/state/state.c | 7 +++
 common/state/state.h | 2 ++
 2 files changed, 9 insertions(+)

diff --git a/common/state/state.c b/common/state/state.c
index 5a1a1af856..cb979328c1 100644
--- a/common/state/state.c
+++ b/common/state/state.c
@@ -99,6 +99,7 @@ static int state_do_load(struct state *state, enum 
state_flags flags)
goto out;
}
 
+   state->init_from_defaults = 0;
state->dirty = 0;
 
 out:
@@ -179,10 +180,14 @@ static struct state *state_new(const char *name)
state->dirty = 1;
dev_add_param_bool(>dev, "dirty", state_set_deny, NULL, 
>dirty,
   NULL);
+
state->save_on_shutdown = 1;
dev_add_param_bool(>dev, "save_on_shutdown", NULL, NULL,
   >save_on_shutdown, NULL);
 
+   dev_add_param_bool(>dev, "init_from_defaults", state_set_deny, 
NULL,
+  >init_from_defaults, NULL);
+
list_add_tail(>list, _list);
 
return state;
@@ -643,6 +648,8 @@ struct state *state_new_from_node(struct device_node *node, 
char *path,
goto out_release_state;
}
 
+   state->init_from_defaults = 1;
+
ret = of_register_fixup(of_state_fixup, state);
if (ret) {
goto out_release_state;
diff --git a/common/state/state.h b/common/state/state.h
index fcc6b9f5cd..da1c6acaeb 100644
--- a/common/state/state.h
+++ b/common/state/state.h
@@ -107,7 +107,9 @@ struct state {
uint32_t magic;
 
struct list_head variables; /* Sorted list of variables */
+
unsigned int dirty;
+   unsigned int init_from_defaults;
unsigned int save_on_shutdown;
 
struct state_backend_format *format;
-- 
2.15.1


___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


[PATCH 1/2] state: refuse to set dirty parameter via setenv

2018-02-05 Thread Sascha Hauer
The dirty parameter is readonly, so refuse to set it.

Signed-off-by: Sascha Hauer 
---
 common/state/state.c | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/common/state/state.c b/common/state/state.c
index 6399bd3736..5a1a1af856 100644
--- a/common/state/state.c
+++ b/common/state/state.c
@@ -153,6 +153,11 @@ void state_backend_set_readonly(struct state *state)
state_storage_set_readonly(>storage);
 }
 
+static int state_set_deny(struct param_d *p, void *priv)
+{
+   return -EROFS;
+}
+
 static struct state *state_new(const char *name)
 {
struct state *state;
@@ -172,7 +177,7 @@ static struct state *state_new(const char *name)
}
 
state->dirty = 1;
-   dev_add_param_bool(>dev, "dirty", NULL, NULL, >dirty,
+   dev_add_param_bool(>dev, "dirty", state_set_deny, NULL, 
>dirty,
   NULL);
state->save_on_shutdown = 1;
dev_add_param_bool(>dev, "save_on_shutdown", NULL, NULL,
-- 
2.15.1


___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


[PATCH] arm: crypto: initialize digests earlier

2018-02-05 Thread Sascha Hauer
We moved the digest init functions to coredevice_initcall level. Do
the same with the ARM specific digests aswell so that they are available
at the same time.

Signed-off-by: Sascha Hauer 
---
 arch/arm/crypto/sha1_glue.c   | 2 +-
 arch/arm/crypto/sha256_glue.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/crypto/sha1_glue.c b/arch/arm/crypto/sha1_glue.c
index 57cd9d1014..cc032f6af2 100644
--- a/arch/arm/crypto/sha1_glue.c
+++ b/arch/arm/crypto/sha1_glue.c
@@ -135,4 +135,4 @@ static int sha1_mod_init(void)
 {
return digest_algo_register();
 }
-device_initcall(sha1_mod_init);
+coredevice_initcall(sha1_mod_init);
diff --git a/arch/arm/crypto/sha256_glue.c b/arch/arm/crypto/sha256_glue.c
index e649609a8e..d8a72a2cb9 100644
--- a/arch/arm/crypto/sha256_glue.c
+++ b/arch/arm/crypto/sha256_glue.c
@@ -189,7 +189,7 @@ static int sha224_digest_register(void)
 {
return digest_algo_register();
 }
-device_initcall(sha224_digest_register);
+coredevice_initcall(sha224_digest_register);
 
 static struct digest_algo sha256 = {
.base = {
@@ -212,4 +212,4 @@ static int sha256_digest_register(void)
 {
return digest_algo_register();
 }
-device_initcall(sha256_digest_register);
+coredevice_initcall(sha256_digest_register);
-- 
2.15.1


___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


[PATCH] pstore: lower message priority

2018-02-05 Thread Sascha Hauer
Having no valid data in pstore after a coldstart is pretty much
expected, so do not print a scary error message, but a debug message
instead.

Signed-off-by: Sascha Hauer 
---
 fs/pstore/ram_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/pstore/ram_core.c b/fs/pstore/ram_core.c
index d68d80900b..9de6dc614d 100644
--- a/fs/pstore/ram_core.c
+++ b/fs/pstore/ram_core.c
@@ -219,7 +219,7 @@ static int persistent_ram_init_ecc(struct 
persistent_ram_zone *prz,
pr_info("error in header, %d\n", numerr);
prz->corrected_bytes += numerr;
} else if (numerr < 0) {
-   pr_info("uncorrectable error in header\n");
+   pr_debug("No valid data in block, assuming it is empty\n");
prz->bad_blocks++;
}
 
-- 
2.15.1


___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


[PATCH 3/4] linux/font.h: Stub out font functions

2018-02-05 Thread Andrey Smirnov
Stub out font-related funtions functions so as to avoid having to
ifdef the code using them.

Signed-off-by: Andrey Smirnov 
---
 include/linux/font.h | 30 ++
 1 file changed, 30 insertions(+)

diff --git a/include/linux/font.h b/include/linux/font.h
index feeab9719..9b3699ba8 100644
--- a/include/linux/font.h
+++ b/include/linux/font.h
@@ -30,6 +30,8 @@ struct font_desc {
 /* Max. length for the name of a predefined font */
 #define MAX_FONT_NAME  32
 
+#ifdef CONFIG_FONTS
+
 extern int find_font_index(const struct font_desc *font, int ch);
 extern const struct font_desc *find_font_enum(int n);
 extern struct param_d *add_param_font(struct device_d *dev,
@@ -39,4 +41,32 @@ extern struct param_d *add_param_font(struct device_d *dev,
 
 int font_register(struct font_desc *font);
 
+#else
+
+static inline int find_font_index(const struct font_desc *font, int ch)
+{
+   return -ENOTSUPP;
+}
+
+static inline const struct font_desc *find_font_enum(int n)
+{
+   return NULL;
+}
+
+static inline struct param_d *
+add_param_font(struct device_d *dev,
+  int (*set)(struct param_d *p, void *priv),
+  int (*get)(struct param_d *p, void *priv),
+  int *value, void *priv)
+{
+   return NULL;
+}
+
+static inline int font_register(struct font_desc *font)
+{
+   return -ENOTSUPP;
+}
+
+#endif
+
 #endif /* _VIDEO_FONT_H */
-- 
2.14.3


___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


[PATCH 4/4] commands: version: Add framebuffer output support

2018-02-05 Thread Andrey Smirnov
Extend "version" command to be capable of rendeing version information
on framebuffer devices.

Signed-off-by: Andrey Smirnov 
---
 commands/Kconfig   |   8 +++
 commands/version.c | 198 -
 2 files changed, 204 insertions(+), 2 deletions(-)

diff --git a/commands/Kconfig b/commands/Kconfig
index 095536849..1cad5d608 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -238,6 +238,14 @@ config CMD_VERSION
 
  barebox 2014.05.0-00142-gb289373 #177 Mon May 12 20:35:55 CEST 2014
 
+config CMD_VERSION_OUTPUT_TO_FRAMEBUFFER
+   bool
+   depends on CMD_VERSION
+   prompt "support displaying version via framebuffer"
+   help
+ Selecting this option will enable version command to output
+ version information onto display backed by a frambuffer
+
 config CMD_MMC_EXTCSD
tristate
prompt "read/write eMMC ext. CSD register"
diff --git a/commands/version.c b/commands/version.c
index 090f2dd13..ba74a993c 100644
--- a/commands/version.c
+++ b/commands/version.c
@@ -20,16 +20,210 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
+#include 
+
+#define FRAME_SIZE 8
+
+struct placement {
+   int x, y;
+};
+
+typedef struct placement placement_function_t (struct screen *, int, int);
+
+struct placement
+placement_center(struct screen *sc, int text_width, int text_height)
+{
+   struct placement p;
+
+   p.x = (sc->info->xres - text_width) / 2;
+   p.y = (sc->info->yres - text_height) / 2;
+
+   return p;
+}
+
+struct placement
+placement_upper_left(struct screen *sc, int text_width, int text_height)
+{
+   struct placement p;
+
+   p.x = FRAME_SIZE;
+   p.y = FRAME_SIZE;
+
+   return p;
+}
+
+struct placement
+placement_upper_right(struct screen *sc, int text_width, int text_height)
+{
+   struct placement p;
+
+   p.x = sc->info->xres - 1 - text_width - FRAME_SIZE;
+   p.y = FRAME_SIZE;
+
+   return p;
+}
+
+struct placement
+placement_lower_left(struct screen *sc, int text_width, int text_height)
+{
+   struct placement p;
+
+   p.x = FRAME_SIZE;
+   p.y = sc->info->yres - 1 - text_height - FRAME_SIZE;
+
+   return p;
+}
+
+struct placement
+placement_lower_right(struct screen *sc, int text_width, int text_height)
+{
+   struct placement p;
+
+   p.x = sc->info->xres - 1 - text_width  - FRAME_SIZE;
+   p.y = sc->info->yres - 1 - text_height - FRAME_SIZE;
+
+   return p;
+}
 
 static int do_version(int argc, char *argv[])
 {
-   printf ("\n%s\n", version_string);
+   const struct font_desc *font;
+   const char *fbdev = NULL;
+   struct screen *sc;
+   u8 fg[3], bg[3];
+   int text_width;
+   int text_height;
+
+   placement_function_t *place;
+   struct placement placement;
+
+   if (IS_ENABLED(CONFIG_CMD_VERSION_OUTPUT_TO_FRAMEBUFFER)) {
+   const struct {
+   const char *name;
+   placement_function_t *func;
+   } placements[] = {
+   { "center",  placement_center  },
+   { "upper-left",  placement_upper_left  },
+   { "lower-left",  placement_lower_left  },
+   { "upper-right", placement_upper_right },
+   { "lower-right", placement_lower_right  },
+   };
+   u32 color;
+   size_t i;
+   int opt;
+   u8 *c;
+
+   place = placement_center;
+
+   memset(fg, 0xff, sizeof(fg)); /* default to white */
+   memset(bg, 0x00, sizeof(bg)); /* default to black */
+
+   while((opt = getopt(argc, argv, "d:f:b:p:")) > 0) {
+   switch(opt) {
+   case 'd':
+   fbdev = optarg;
+   break;
+   case 'f':
+   /* FALLTHROUGH */
+   case 'b':
+   c = (opt == 'f') ? fg : bg;
+   color = simple_strtoul(optarg, NULL, 16);
+
+   c[0] = color >> 16;
+   c[1] = color >>  8;
+   c[2] = color >>  0;
+   break;
+   case 'p':
+   place = NULL;
+   for (i = 0; i < ARRAY_SIZE(placements); i++)
+   if (!strcmp(optarg, placements[i].name))
+   place = placements[i].func;
+
+   if (!place) {
+   pr_err("Unknown placement: %s\n",
+  optarg);
+   return -EINVAL;
+  

[PATCH 2/4] gui: graphic_utils: Stub out fb_* functions

2018-02-05 Thread Andrey Smirnov
Stub out fb_* functions so as to avoid having to #ifdef the code using
them.

Signed-off-by: Andrey Smirnov 
---
 include/gui/graphic_utils.h | 47 +
 1 file changed, 47 insertions(+)

diff --git a/include/gui/graphic_utils.h b/include/gui/graphic_utils.h
index 279fdf91d..d4bac6394 100644
--- a/include/gui/graphic_utils.h
+++ b/include/gui/graphic_utils.h
@@ -11,6 +11,8 @@
 #include 
 #include 
 
+#ifdef CONFIG_IMAGE_RENDERER
+
 u32 gu_hex_to_pixel(struct fb_info *info, u32 color);
 u32 gu_rgb_to_pixel(struct fb_info *info, u8 r, u8 g, u8 b, u8 t);
 void gu_rgba_blend(struct fb_info *info, struct image *img, void* dest, int 
height,
@@ -31,4 +33,49 @@ void gu_screen_blit_area(struct screen *sc, int startx, int 
starty, int width,
 void gu_fill_rectangle(struct screen *sc,
   int x1, int y1, int x2, int y2,
   u8 r, u8 g, u8 b, u8 a);
+#else
+
+static inline u32 gu_hex_to_pixel(struct fb_info *info, u32 color)
+{
+   return 0;
+}
+static inline u32 gu_rgb_to_pixel(struct fb_info *info, u8 r,
+ u8 g, u8 b, u8 t)
+{
+   return 0;
+}
+static inline void gu_rgba_blend(struct fb_info *info, struct image *img,
+void* dest,int height,
+int width, int startx,
+int starty, bool is_rgba) {}
+static inline void gu_set_pixel(struct fb_info *info, void *adr, u32 px) {}
+static inline void gu_set_rgb_pixel(struct fb_info *info, void *adr,
+   u8 r, u8 g, u8 b) {}
+static inline void gu_set_rgba_pixel(struct fb_info *info, void *adr,
+u8 r, u8 g, u8 b, u8 a) {}
+static inline void gu_memset_pixel(struct fb_info *info, void* buf,
+  u32 color, size_t size) {}
+static inline struct screen *fb_create_screen(struct fb_info *info)
+{
+   return ERR_PTR(-ENOTSUPP);
+}
+
+static inline struct screen *fb_open(const char *fbdev)
+{
+   return ERR_PTR(-ENOTSUPP);
+}
+
+static inline void fb_close(struct screen *sc) {}
+static inline void gu_screen_blit(struct screen *sc) {}
+static inline void gu_invert_area(struct fb_info *info, void *buf, int startx,
+ int starty, int width, int height) {}
+static inline void gu_screen_blit_area(struct screen *sc, int startx,
+  int starty, int width,
+  int height) {}
+static inline void gu_fill_rectangle(struct screen *sc, int x1, int y1,
+int x2, int y2, u8 r, u8 g, u8 b, u8 a) {}
+
+#endif
+
+
 #endif /* __GRAPHIC_UTILS_H__ */
-- 
2.14.3


___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


[PATCH 1/4] 2d-primitives: Introduce gu_draw_text()

2018-02-05 Thread Andrey Smirnov
Add code to draw characters/string on a display.

Signed-off-by: Nikita Yushchenko 
Signed-off-by: Andrey Smirnov 
---
 include/gui/2d-primitives.h | 12 
 lib/gui/2d-primitives.c | 67 +
 2 files changed, 79 insertions(+)

diff --git a/include/gui/2d-primitives.h b/include/gui/2d-primitives.h
index 06216bb03..f97c5eb61 100644
--- a/include/gui/2d-primitives.h
+++ b/include/gui/2d-primitives.h
@@ -2,6 +2,7 @@
 #define __2D_PRIMITIVES__
 
 #include 
+#include 
 
 void gu_draw_line(struct screen *sc,
  int x1, int y1, int x2, int y2,
@@ -12,4 +13,15 @@ void gu_draw_circle(struct screen *sc,
int x0, int y0, int radius,
u8 r, u8 g, u8 b, u8 a);
 
+#ifdef CONFIG_FONTS
+void gu_draw_text(struct screen *sc, const struct font_desc *font,
+ int x, int y, const char *text,
+ u8 fr, u8 fg, u8 fb, u8 fa,
+ u8 br, u8 bg, u8 bb, u8 ba);
+#else
+static inline void gu_draw_text(struct screen *sc, const struct font_desc 
*font,
+   int x, int y, const char *text,
+   u8 fr, u8 fg, u8 fb, u8 fa,
+   u8 br, u8 bg, u8 bb, u8 ba) {}
+#endif
 #endif
diff --git a/lib/gui/2d-primitives.c b/lib/gui/2d-primitives.c
index 82e59d9a6..8cb316b4d 100644
--- a/lib/gui/2d-primitives.c
+++ b/lib/gui/2d-primitives.c
@@ -6,6 +6,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 static void __illuminate(struct fb_info *info,
 int x, int y,
@@ -200,3 +202,68 @@ void gu_draw_circle(struct screen *sc,
 }
}
 }
+
+#ifdef CONFIG_FONTS
+static void gu_draw_char(struct screen *sc, const struct font_desc *font,
+int ch, int x0, int y0,
+u8 fr, u8 fg, u8 fb, u8 fa,
+u8 br, u8 bg, u8 bb, u8 ba)
+{
+   const u8 *bitmap = font->data + find_font_index(font, ch);
+   int x, y;
+
+   for (y = 0; y < font->height; y++) {
+   for (x = 0; x < font->width; x++) {
+  const unsigned index  = y * font->width + x;
+  const unsigned byte   = index / 8;
+  const unsigned bit= 8 - (index % 8);
+  const bool foreground = bitmap[byte] & BIT(bit);
+
+  const u8 r = (foreground) ? fr : br;
+  const u8 g = (foreground) ? fg : bg;
+  const u8 b = (foreground) ? fb : bb;
+  const u8 a = (foreground) ? fa : ba;
+
+  __illuminate(sc->info, x0 + x, y0 + y, r, g, b, a);
+   }
+   }
+}
+
+/**
+ * gu_draw_text - display text at (x0, y0)
+ *
+ * @sc: screen to draw on
+ * @font: font used to render the text
+ * @x0, @y0: coordinates of top left corner of the text "box"
+ * @text: text to render
+ * @fr, @fg, @fb, @fa: foreground color information
+ * @fr, @fg, @fb, @fa: background color information
+ *
+ * gu_draw_text() implements basic algorithm capable of rendering
+ * textual information to a frambuffer. Resulting text is produced to
+ * be a single line and no attempt to do wrapping/text layout is made.
+ */
+void gu_draw_text(struct screen *sc, const struct font_desc *font,
+ int x0, int y0, const char *text,
+ u8 fr, u8 fg, u8 fb, u8 fa,
+ u8 br, u8 bg, u8 bb, u8 ba)
+{
+   char c;
+   int x = x0;
+   int y = y0;
+
+   BUG_ON(x0 < 0 || y0 < 0);
+
+   while ((c = *text++)) {
+   /*
+* Just skip all non-printable characters
+*/
+   if (isprint(c)) {
+   gu_draw_char(sc, font, c, x, y,
+fr, fg, fb, fa, br, bg, bb, ba);
+   x += font->width;
+   }
+   }
+}
+#endif
+
-- 
2.14.3


___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: [PATCH] doc: bcm283x: update documentation for Raspberry Pi

2018-02-05 Thread Roland Hieber

Yes/no/further discussion needed? :)

 - Roland

On 30.01.2018 12:25, Roland Hieber wrote:

The old way does not seem to work for RPi 3, as the UART pins are
mapped differently and the NOOBS bootcode does not seem to read a
config.txt.

Signed-off-by: Roland Hieber 
---
  Documentation/boards/bcm2835.rst | 34 ++
  1 file changed, 26 insertions(+), 8 deletions(-)

diff --git a/Documentation/boards/bcm2835.rst b/Documentation/boards/bcm2835.rst
index 13cebb01c4..1a78cfba3c 100644
--- a/Documentation/boards/bcm2835.rst
+++ b/Documentation/boards/bcm2835.rst
@@ -1,17 +1,35 @@
-Broadcom BCM2835
+Broadcom BCM283x
  
  
  Raspberry Pi

  
  
-  1. Prepare a card with a FAT filesystem. Download a tiny NOOBS LITE

- zip archive and unpack it into FAT partition.
- See http://www.raspberrypi.org/help/noobs-setup/ for details.
+  1. Prepare an SD or microSD card with a FAT filesystem of at least 30 MB in 
size.
+
+  2. Download the `Raspberry Pi firmware`_ (120 MB), unzip it, and copy the
+ contents of the ``boot/`` folder to your card.
  
-  2. Compile ``barebox.bin`` image (use ``rpi_defconfig``).

- Copy it to the SD/microSD card and name it ``recovery.img``.
+  3. Use ``make rpi_defconfig; make`` to build barebox. This will create the 
following images:
  
-  3. Connect to board's UART (115200 8N1);

+ - ``images/barebox-raspberry-pi-1.img`` for the BCM2835/ARM1176JZF-S 
(Raspberry Pi 1)
+ - ``images/barebox-raspberry-pi-2.img`` for the BCM2836/CORTEX-A7 
(Raspberry Pi 2)
+ - ``images/barebox-raspberry-pi-3.img`` for the BCM2837/CORTEX-A53 
(Raspberry Pi 3, Raspberry Pi Zero)
+
+ Copy the respective image for your model to your SD card and name it
+ ``barebox.img``.
+
+  4. Create a text file ``config.txt`` on the SD card with the following 
content::
+
+ kernel=barebox.img
+ enable_uart=1
+ dtoverlay=pi3-miniuart-bt
+
+ (For more information, refer to the `documentation for config.txt`_.)
+
+  5. Connect to board's UART (115200 8N1);
   Use PIN6 (GND), PIN8 (UART_TX), PIN10 (UART_RX) pins.
  
-  4. Turn board's power on.

+  6. Turn board's power on.
+
+.. _Raspberry Pi firmware: 
https://codeload.github.com/raspberrypi/firmware/zip/80e1fbeb78f9df06701d28c0ed3a3060a3f557ef
+.. _documentation for config.txt: 
https://www.raspberrypi.org/documentation/configuration/config-txt/



--
Pengutronix e.K.  | Roland Hieber   |
Industrial Linux Solutions| http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim | Phone: +49-5121-206917-5086 |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917- |

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


Re: barebox support for the TI IDK board

2018-02-05 Thread Jan Lübbe
Hi,

On Sun, 2018-02-04 at 13:16 +0100, Giorgio Dal Molin wrote:
> I've recently received the Industrial Development Kit TMDXIDK5728
> from Texas Instruments, with the AM5728 soc on it, and would like to
> boot a linux kernel with barebox.
> I had a look through the barebox git repo and found the dts and dtsi
> files for the IDK board, ported from the linux kernel repo.
> 
> My question is: is this board/soc really supported by barebox ?

No, barebox currently only supports the AM335x from the industrial IT
SoC series (found for example on the beaglebone). There is no code for
the AM4* and AM5* SoCs.

Regards,
Jan
-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox