Commit graph

4 commits

Author SHA1 Message Date
Hauke Mehrtens
168c2928f9 io: Add TARGET_LDFLAGS to fix PIE
Add the OpenWrt TARGET_LDFLAGS to the compile command to activate PIE support
for the io tool when it is activated globally in OpenWrt.

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
(cherry-picked from b46d21a54e)
2019-11-13 23:43:46 +01:00
Hauke Mehrtens
0441927b24 io: Fix printing 4 bytes memory on 64 bit systems
On 64 bit Linux systems long is 8 bytes long, on 32 bit Linux systems it
is 4 bytes long. Here we want to print 4 bytes and not 8 bytes, use int
instead of long.

This fixes printing 4 bytes on 64 bit systems.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry-picked from 9936e16b72)
2019-11-13 23:43:40 +01:00
Hauke Mehrtens
1f082d84dd io: Open /dev/mem with O_SYNC for uncached access
Only when /dev/mem is opened with O_SYNC the write and *read* is done
uncached. We saw wrong values read out from the hardware without setting
O_SYNC, the busybox devmem tool showed different values, when O_SYNC is
also set for the io tool, it reads out the same values as devmem.
When looking at the drivers/char/mem.c file in the kernel it is behaving
differently based on the O_DSYNC flag.

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
(cherry-picked from 90df0f3e24)
2019-11-13 23:43:36 +01:00
Hauke Mehrtens
5f54e6c61e io: add io-tool
This add the io tool from the old package feed.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2016-12-17 15:20:05 +01:00