Skip to content

Commit

Permalink
meta-lxatac-bsp: barebox: update to 2024.08.0
Browse files Browse the repository at this point in the history
Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
  • Loading branch information
hnez committed Aug 30, 2024
1 parent dcc1694 commit 6c7919e
Show file tree
Hide file tree
Showing 17 changed files with 97 additions and 169 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ DEPENDS = "libusb1 libusb1-native lzop-native bison-native flex-native pkgconfig
BBCLASSEXTEND = "native"

SRC_URI = "http://barebox.org/download/barebox-${PV}.tar.bz2"
SRC_URI[sha256sum] = "7dda8cc4e989d38162dc04d287a882edc828093f75baace9e40b2ab7902958ea"
SRC_URI[sha256sum] = "b08a762da8d63dd18b4f2d9f5d0a8da001b6e608d1b3eff6dcebc6a2e575d535"

S = "${WORKDIR}/barebox-${PV}"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SRC_URI += " \
"
require files/patches/series.inc

SRC_URI[sha256sum] = "7dda8cc4e989d38162dc04d287a882edc828093f75baace9e40b2ab7902958ea"
SRC_URI[sha256sum] = "b08a762da8d63dd18b4f2d9f5d0a8da001b6e608d1b3eff6dcebc6a2e575d535"

COMPATIBLE_MACHINE = "lxatac"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
2 files changed, 34 insertions(+), 18 deletions(-)

diff --git a/drivers/of/of_path.c b/drivers/of/of_path.c
index 12a2dfce553e..522109c17b55 100644
index 42efb1ad1dbf..a1a47cad0c20 100644
--- a/drivers/of/of_path.c
+++ b/drivers/of/of_path.c
@@ -254,7 +254,11 @@ struct device_node *of_find_node_by_devpath(struct device_node *root, const char
Expand Down Expand Up @@ -95,10 +95,10 @@ index 12a2dfce553e..522109c17b55 100644
}

diff --git a/include/of.h b/include/of.h
index 19b8e7c038a4..51ad5773007b 100644
index 55f2c0cbdedf..187a55439a8a 100644
--- a/include/of.h
+++ b/include/of.h
@@ -336,7 +336,8 @@ int of_add_memory(struct device_node *node, bool dump);
@@ -350,7 +350,8 @@ int of_add_memory(struct device_node *node, bool dump);
int of_add_memory_bank(struct device_node *node, bool dump, int r,
u64 base, u64 size);
struct device *of_find_device_by_node_path(const char *path);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
1 file changed, 1 insertion(+)

diff --git a/Makefile b/Makefile
index a539e57bc8a7..36145fc89eac 100644
index 771ee5da55bc..28eb2918b188 100644
--- a/Makefile
+++ b/Makefile
@@ -445,6 +445,7 @@ LINUXINCLUDE := -Iinclude \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
1 file changed, 20 insertions(+)

diff --git a/include/net.h b/include/net.h
index ffc1093ae6e7..a569fdcf470f 100644
index a04ed5b0ab92..8a943e1bb1b2 100644
--- a/include/net.h
+++ b/include/net.h
@@ -520,6 +520,26 @@ static inline void eth_addr_add(u8 *addr, long offset)
@@ -516,6 +516,26 @@ static inline void eth_addr_add(u8 *addr, long offset)
u64_to_ether_addr(u, addr);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
2 files changed, 24 insertions(+)

diff --git a/common/Kconfig b/common/Kconfig
index d16c8696dad4..e25131b74198 100644
index 31360892aeef..cc3675346d1d 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -1089,6 +1089,14 @@ config MACHINE_ID
@@ -1143,6 +1143,14 @@ config MACHINE_ID
Note: if no hashable information is available no machine id will be passed
to the kernel.

Expand All @@ -32,12 +32,12 @@ index d16c8696dad4..e25131b74198 100644
bool "inform devicetree-enabled kernel of used watchdog"
depends on WATCHDOG && OFTREE && FLEXIBLE_BOOTARGS
diff --git a/common/misc.c b/common/misc.c
index e266f0951ee9..36dfd6f34873 100644
index 7bc92c0f9518..5cfe157a13ea 100644
--- a/common/misc.c
+++ b/common/misc.c
@@ -146,6 +146,18 @@ static char *hostname;
static char *serial_number;
static char *of_machine_compatible;
@@ -209,6 +209,18 @@ bool barebox_hostname_is_valid(const char *s)
return true;
}

+static void linux_bootargs_set_hostname(void)
+{
Expand All @@ -54,16 +54,16 @@ index e266f0951ee9..36dfd6f34873 100644
/*
* The hostname is supposed to be the shortname of a board. It should
* contain only lowercase letters, numbers, '-', '_'. No whitespaces
@@ -157,6 +169,8 @@ void barebox_set_hostname(const char *__hostname)
@@ -224,6 +236,8 @@ void barebox_set_hostname(const char *__hostname)
pr_warn("Hostname is not valid, please fix it\n");

free(hostname);
hostname = xstrdup(__hostname);
+
+ linux_bootargs_set_hostname();
}

const char *barebox_get_hostname(void)
@@ -181,6 +195,8 @@ void barebox_set_serial_number(const char *__serial_number)
@@ -248,6 +262,8 @@ void barebox_set_serial_number(const char *__serial_number)

free(serial_number);
serial_number = xstrdup(__serial_number);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
2 files changed, 31 insertions(+), 10 deletions(-)

diff --git a/include/net.h b/include/net.h
index a569fdcf470f..d11b7b8f1e0d 100644
index 8a943e1bb1b2..5171c6485d26 100644
--- a/include/net.h
+++ b/include/net.h
@@ -130,6 +130,18 @@ static inline void of_eth_register_ethaddr(struct device_node *node,
@@ -128,6 +128,18 @@ static inline void of_eth_register_ethaddr(struct device_node *node,
void eth_register_ethaddr(int ethid, const char *ethaddr);
void of_eth_register_ethaddr(struct device_node *node, const char *ethaddr);
#endif
Expand All @@ -37,7 +37,7 @@ index a569fdcf470f..d11b7b8f1e0d 100644
* Ethernet header
*/
diff --git a/net/eth.c b/net/eth.c
index 28961e868b7a..8097fb949412 100644
index 7229530c055b..a1d6860be830 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -319,19 +319,11 @@ static int eth_param_set_ethaddr(struct param_d *param, void *priv)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/include/net.h b/include/net.h
index d11b7b8f1e0d..0ec2519e2eff 100644
index 5171c6485d26..cbb26169f288 100644
--- a/include/net.h
+++ b/include/net.h
@@ -627,6 +627,15 @@ void ifdown_all(void);
@@ -633,4 +633,13 @@ void ifdown_all(void);

extern struct list_head netdev_list;
extern struct class eth_class;

+struct eth_ethaddr {
+ struct list_head list;
Expand All @@ -40,16 +40,14 @@ index d11b7b8f1e0d..0ec2519e2eff 100644
+
+extern struct list_head ethaddr_list;
+
#define for_each_netdev(netdev) list_for_each_entry(netdev, &netdev_list, list)

#endif /* __NET_H__ */
diff --git a/net/eth.c b/net/eth.c
index 8097fb949412..ebeeb620d567 100644
index a1d6860be830..3714dde44026 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -23,14 +23,7 @@

LIST_HEAD(netdev_list);
DEFINE_DEV_CLASS(eth_class, "eth");

-struct eth_ethaddr {
- struct list_head list;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
2 files changed, 19 insertions(+)

diff --git a/include/net.h b/include/net.h
index 0ec2519e2eff..728684b56646 100644
index cbb26169f288..b210996d2ae8 100644
--- a/include/net.h
+++ b/include/net.h
@@ -370,6 +370,8 @@ IPaddr_t getenv_ip(const char *name);
@@ -366,6 +366,8 @@ IPaddr_t getenv_ip(const char *name);
int setenv_ip(const char *name, IPaddr_t ip);

int string_to_ethaddr(const char *str, u8 enetaddr[6]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
create mode 100644 include/tlv/tlv.h

diff --git a/common/Kconfig b/common/Kconfig
index e25131b74198..c3d8eeabf63d 100644
index cc3675346d1d..02d2f622de72 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -1014,6 +1014,30 @@ config BTHREAD
@@ -1068,6 +1068,30 @@ config BTHREAD
scheduled within delay loops and the console idle to asynchronously
execute actions, like checking for link up or feeding a watchdog.

Expand Down Expand Up @@ -66,10 +66,10 @@ index e25131b74198..c3d8eeabf63d 100644
bool "generic state infrastructure"
select CRC32
diff --git a/common/Makefile b/common/Makefile
index 74ef8b7d8af2..08c38eaff358 100644
index 96498790b300..f5d7ee9b4d8f 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -65,6 +65,7 @@ obj-$(CONFIG_RESET_SOURCE) += reset_source.o
@@ -66,6 +66,7 @@ obj-$(CONFIG_RESET_SOURCE) += reset_source.o
obj-$(CONFIG_SHELL_HUSH) += hush.o
obj-$(CONFIG_SHELL_SIMPLE) += parser.o
obj-$(CONFIG_STATE) += state/
Expand Down Expand Up @@ -753,12 +753,12 @@ index 000000000000..54ebce2b4dd3
+ return platform_driver_register(&decoder->_platform_driver);
+}
diff --git a/include/string.h b/include/string.h
index 43911b75762f..13eebc811aae 100644
index cbe6eddf7f88..e56f4c77cfcb 100644
--- a/include/string.h
+++ b/include/string.h
@@ -20,4 +20,9 @@ char *parse_assignment(char *str);

int strverscmp(const char *a, const char *b);
@@ -43,4 +43,9 @@ static inline const char *nonempty(const char *s)
return isempty(s) ? NULL : s;
}

+static inline bool is_nul_terminated(const char *val, size_t len)
+{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
create mode 100644 commands/tlv.c

diff --git a/commands/Kconfig b/commands/Kconfig
index d8bcb573fd43..33cbf3c2d545 100644
index 5b512f1bbac7..e1c0c2619f1c 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -2396,6 +2396,18 @@ config CMD_STATE
@@ -2441,6 +2441,18 @@ config CMD_STATE
depends on STATE
prompt "state"

Expand All @@ -37,10 +37,10 @@ index d8bcb573fd43..33cbf3c2d545 100644
bool
prompt "dhrystone"
diff --git a/commands/Makefile b/commands/Makefile
index b3114102765c..754f21576cab 100644
index 4ca7ba7eb609..2f25e9228404 100644
--- a/commands/Makefile
+++ b/commands/Makefile
@@ -132,6 +132,7 @@ obj-$(CONFIG_CMD_CMP) += cmp.o
@@ -136,6 +136,7 @@ obj-$(CONFIG_CMD_CMP) += cmp.o
obj-$(CONFIG_CMD_NV) += nv.o
obj-$(CONFIG_CMD_DEFAULTENV) += defaultenv.o
obj-$(CONFIG_CMD_STATE) += state.o
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ index 8c653d184f5f..e34ff994874b 100644
mxsimage
mxsboot
diff --git a/scripts/Makefile b/scripts/Makefile
index cb1d916439b7..2c6ed9254a36 100644
index 20da6fc5e7b2..504530386a5a 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -10,6 +10,7 @@ hostprogs-always-y += bareboxenv
Expand All @@ -55,7 +55,7 @@ index cb1d916439b7..2c6ed9254a36 100644
hostprogs-always-$(CONFIG_RSATOC) += rsatoc
HOSTCFLAGS_rsatoc.o = `$(PKG_CONFIG) --cflags openssl`
HOSTLDLIBS_rsatoc = `$(PKG_CONFIG) --libs openssl`
@@ -44,6 +45,7 @@ HOSTLDLIBS_rk-usb-loader = `$(PKG_CONFIG) --libs libusb-1.0`
@@ -43,6 +44,7 @@ HOSTLDLIBS_rk-usb-loader = `$(PKG_CONFIG) --libs libusb-1.0`
hostprogs-always-$(CONFIG_RK_USB_LOADER) += rk-usb-loader

userprogs-always-$(CONFIG_BAREBOXENV_TARGET) += bareboxenv-target
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,26 @@ Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
create mode 100644 common/boards/lxa/factory-data.c

diff --git a/common/boards/Kconfig b/common/boards/Kconfig
index fe3a60d50879..7054a18007b8 100644
index 586a54d7ca13..74947316954b 100644
--- a/common/boards/Kconfig
+++ b/common/boards/Kconfig
@@ -13,3 +13,8 @@ config BOARD_PHYTEC_SOM_IMX8M_DETECTION

config BOARD_TQ
@@ -19,3 +19,8 @@ config BOARD_WOLFVISION
bool
select AIODEV
select ROCKCHIP_SARADC
+
+config BOARD_LXA
+ bool "LXA common board support" if COMPILE_TEST
+ select TLV
+ select TLV_BAREBOX
diff --git a/common/boards/Makefile b/common/boards/Makefile
index 147c36643d2b..4f30be78dce9 100644
index 3f8ac57b2f82..058733522411 100644
--- a/common/boards/Makefile
+++ b/common/boards/Makefile
@@ -3,3 +3,4 @@
obj-$(CONFIG_BOARD_QEMU_VIRT) += qemu-virt/
@@ -4,3 +4,4 @@ obj-$(CONFIG_BOARD_QEMU_VIRT) += qemu-virt/
obj-$(CONFIG_BOARD_PHYTEC_SOM_DETECTION) += phytec/
obj-$(CONFIG_BOARD_TQ) += tq/
obj-$(CONFIG_BOARD_WOLFVISION) += wolfvision/
+obj-$(CONFIG_BOARD_LXA) += lxa/
diff --git a/common/boards/include/boards/lxa/tlv.h b/common/boards/include/boards/lxa/tlv.h
new file mode 100644
Expand Down Expand Up @@ -175,10 +175,10 @@ index 000000000000..70ddbc734613
+ return tlv_register_decoder(&lxa_tlv_powerboard_v1);
+}
diff --git a/include/string.h b/include/string.h
index 13eebc811aae..785437ee59a7 100644
index e56f4c77cfcb..b3d543262731 100644
--- a/include/string.h
+++ b/include/string.h
@@ -10,6 +10,8 @@ char *strsep_unescaped(char **, const char *);
@@ -11,6 +11,8 @@ char *strsep_unescaped(char **, const char *);
char *stpcpy(char *dest, const char *src);
bool strends(const char *str, const char *postfix);

Expand All @@ -201,7 +201,7 @@ index a32ec917a434..33f5c30a4beb 100644
#define TLV_IS_VENDOR_SPECIFIC(val) ((*(u8 *)&(val) & 0x80) == 0x80)
#define TLV_IS_GENERIC(val) ((*(u8 *)&(val) & 0x80) != 0x80)
diff --git a/lib/string.c b/lib/string.c
index bf0f0455ab3f..bcfba154082f 100644
index 374f326143a7..f2f81144dbdd 100644
--- a/lib/string.c
+++ b/lib/string.c
@@ -791,6 +791,27 @@ void *memchr(const void *s, int c, size_t n)
Expand Down
Loading

0 comments on commit 6c7919e

Please sign in to comment.