[PATCH] Deactivate _FORTIFY_SOURCE in jitterentropy-base.c

2023-10-30 Thread Hauke Mehrtens
This fixes compilation with glibc.

_FORTIFY_SOURCE only works with compiler optimizations activated.
We have to deactivate it when we set -O0.

This fixes the following error message with glibc:
 error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) 
[-Werror=cpp]

musl libc does not show an error message in this case, but has the same
internal problems.

Signed-off-by: Hauke Mehrtens 
---
 CMakeLists.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a1ee0c1..78954c0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,8 +22,9 @@ ADD_EXECUTABLE(urngd
 )
 TARGET_LINK_LIBRARIES(urngd ${ubox})
 
-# jitter RNG must not be compiled with optimizations
+# jitter RNG must not be compiled with optimizations, _FORTIFY_SOURCE needs 
optimizations
 SET_SOURCE_FILES_PROPERTIES(${JTEN_DIR}/jitterentropy-base.c PROPERTIES 
COMPILE_FLAGS -O0)
+SET_SOURCE_FILES_PROPERTIES(${JTEN_DIR}/jitterentropy-base.c PROPERTIES 
COMPILE_FLAGS -U_FORTIFY_SOURCE)
 
 INSTALL(TARGETS urngd RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR})
 
-- 
2.39.2


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: Adding a new platform: renesas rz

2023-10-30 Thread Robert Marko
On Mon, 30 Oct 2023 at 10:40, Michele Bisogno  wrote:
>
> Hi,
>
> I've been a happy OpenWRT user for many years now, always buying
> routers that could allow me to run it easily.

Hi, nice to hear this.

>
> I've been working (actually only in my free time as a hobby) on
> porting OpenWRT onto this Renesas board:
> https://www.renesas.com/eu/en/products/microcontrollers-microprocessors/rz-mpus/rzg2l-evkit-rzg2l-evaluation-board-kit
> which features this Arm Cortex-A55 based device:
> https://www.renesas.com/eu/en/products/microcontrollers-microprocessors/rz-mpus/rzg2l-general-purpose-microprocessors-dual-core-arm-cortex-a55-12-ghz-cpus-and-single-core-arm-cortex-m33
>
> I guess this is a new platform, since it does not really fit in any of
> the already supported ones.
>
> I got it working and I am polishing the patch before submitting it.
> The support of this device is already mainlined in the Linux kernel,
> so I am using 6.1 as is with the appropriate config.
> Arm Trusted Firmware and u-boot are instead taken from the respective
> Renesas forks, available on github.

Great, these Reneas SoC-s are rather well supported in respective
upstream projects.

>
> However this is the first time I do that, and I am still reading and
> learning, so I would like to get opinions, hints, why not constructive
> criticism and hopefully encouragement.

I definitively encourage people to contribute towards more HW support,
especially HW which is mostly upstream.

>
> For example, naming (renesas? renesas-rz? rz?) and structure of the
> subfolders. There are other variants I would like to add: RZ/G2LC,
> RZ/G2UL and maybe others.

To me, just "renesas" sounds good and then you can introduce the individual
SoC families as subtargets.

Regards,
Robert
>
> System
>
> HostnameOpenWrt
> ModelRenesas SMARC EVK based on r9a07g044l2
> ArchitectureARMv8 Processor rev 0
> Target Platformrz/g2l
> Firmware VersionOpenWrt SNAPSHOT r24187-bb8fd41f9a / LuCI Master
> git-23.294.26440-30a8a0d
> Kernel Version6.1.59
> Local Time2023-10-29 07:44:17
> Uptime0h 9m 11s
> Load Average0.13, 0.08, 0.05
>
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH] x86 64: Add new device Cordoba Edge Platform

2023-10-30 Thread Paul Spooren
Hi,

We kind of don’t add image just to contain extra drivers. Extra UCI defaults 
for eth ordering are fine but please don’t add an extra image if it just 
contains 1-2 extra packages, installable via the ImageBuilder or OPKG.

> 
>> On Oct 23, 2023, at 8:52 PM, Xiaojun Liu  wrote:
>> 
>> Add new device Cordoba Edge Platform
>> Device name:Cordoba Edge Platform
>> hardware specifications: CPU - Intel Atom C3000
>> WiFi - mt7915e
>> 
>> Signed-off-by: Xiaojun Liu mailto:xiaojun@silicom.co.il
>> ---
>> 
>> target/linux/x86/base-files/etc/board.d/02_network | 11 +++
>> target/linux/x86/image/64.mk   | 10 ++
>> 2 files changed, 21 insertions(+)
>> 
>> 
>> diff --git a/target/linux/x86/base-files/etc/board.d/02_network 
>> b/target/linux/x86/base-files/etc/board.d/02_network
>> index e00e8c04dd..be56153695 100644
>> --- a/target/linux/x86/base-files/etc/board.d/02_network
>> +++ b/target/linux/x86/base-files/etc/board.d/02_network
>> @@ -75,6 +75,17 @@ traverse-technologies-geos)
>>macaddr="$(cat /sys/class/net/eth0/address)" 2>/dev/null
>>[ -n "$macaddr" ] && ucidef_set_interface_macaddr "wan" "$macaddr"
>>;;
>> +silicom-80500-0214-e53)
>> +ucidef_set_network_device_path "wan0" 
>> "pci:00/:00:16.0/:03:00.0"
>> +ucidef_set_network_device_path "wan1" 
>> "pci:00/:00:16.0/:03:00.1"
>> +ucidef_set_network_device_path "media0" 
>> "pci:00/:00:17.0/:02:00.0"
>> +ucidef_set_network_device_path "media1" 
>> "pci:00/:00:17.0/:02:00.1"
>> +ucidef_set_network_device_path "eth0" 
>> "pci:00/:00:0c.0/:04:00.0"
>> +ucidef_set_network_device_path "eth1" 
>> "pci:00/:00:0e.0/:05:00.0"
>> +ucidef_set_network_device_path "eth2" 
>> "pci:00/:00:0f.0/:06:00.0"
>> +ucidef_set_network_device_path "eth3" 
>> "pci:00/:00:10.0/:07:00.0"
>> +ucidef_set_interfaces_lan_wan "eth0 eth1 eth2 eth3" "wan0"
>> +;;
>> esac
>> board_config_flush
>> 
>> diff --git a/target/linux/x86/image/64.mk 
>> b/target/linux/x86/image/64.mk index 5ec9978b66..4aeb98 100644
>> --- a/target/linux/x86/image/64.mk
>> +++ b/target/linux/x86/image/64.mk
>> @@ -8,3 +8,13 @@ define Device/generic
>>   GRUB2_VARIANT := generic
>> endef
>> TARGET_DEVICES += generic
>> +
>> +define Device/cordoba
>> +  DEVICE_VENDOR := Cordoba
>> +  DEVICE_MODEL := x86/64
>> +  DEVICE_PACKAGES += \
>> +kmod-igc kmod-ixgbe \
>> +kmod-mt7915-firmware
>> +  GRUB2_VARIANT := generic
>> +endef
>> +TARGET_DEVICES += cordoba

Please remove those lines in 64.mk.

Thanks for you work and interest in OpenWrt support for your device.

Best,
Paul
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Adding a new platform: renesas rz

2023-10-30 Thread Michele Bisogno
Hi,

I've been a happy OpenWRT user for many years now, always buying
routers that could allow me to run it easily.

I've been working (actually only in my free time as a hobby) on
porting OpenWRT onto this Renesas board:
https://www.renesas.com/eu/en/products/microcontrollers-microprocessors/rz-mpus/rzg2l-evkit-rzg2l-evaluation-board-kit
which features this Arm Cortex-A55 based device:
https://www.renesas.com/eu/en/products/microcontrollers-microprocessors/rz-mpus/rzg2l-general-purpose-microprocessors-dual-core-arm-cortex-a55-12-ghz-cpus-and-single-core-arm-cortex-m33

I guess this is a new platform, since it does not really fit in any of
the already supported ones.

I got it working and I am polishing the patch before submitting it.
The support of this device is already mainlined in the Linux kernel,
so I am using 6.1 as is with the appropriate config.
Arm Trusted Firmware and u-boot are instead taken from the respective
Renesas forks, available on github.

However this is the first time I do that, and I am still reading and
learning, so I would like to get opinions, hints, why not constructive
criticism and hopefully encouragement.

For example, naming (renesas? renesas-rz? rz?) and structure of the
subfolders. There are other variants I would like to add: RZ/G2LC,
RZ/G2UL and maybe others.

System

HostnameOpenWrt
ModelRenesas SMARC EVK based on r9a07g044l2
ArchitectureARMv8 Processor rev 0
Target Platformrz/g2l
Firmware VersionOpenWrt SNAPSHOT r24187-bb8fd41f9a / LuCI Master
git-23.294.26440-30a8a0d
Kernel Version6.1.59
Local Time2023-10-29 07:44:17
Uptime0h 9m 11s
Load Average0.13, 0.08, 0.05

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel