wiringPi: Fix for parsing /proc/cpuinfo properly
Signed-off-by: Yang Deokgyu <secugyu@gmail.com>
This commit is contained in:
2
build
2
build
@@ -73,7 +73,7 @@ configure_gpiomem() {
|
|||||||
|
|
||||||
sudo=${WIRINGPI_SUDO-sudo}
|
sudo=${WIRINGPI_SUDO-sudo}
|
||||||
make="make -j $(( $(nproc) + 1 ))"
|
make="make -j $(( $(nproc) + 1 ))"
|
||||||
hardware=$(fgrep Hardware /proc/cpuinfo | head -1 | awk '{ printf("%s %s %s\n", $3, $4, $5) }' | xargs)
|
hardware=$(fgrep -a Hardware /proc/cpuinfo | head -1 | awk '{ printf("%s %s %s\n", $3, $4, $5) }' | xargs)
|
||||||
|
|
||||||
if [ x$1 = "xclean" ]; then
|
if [ x$1 = "xclean" ]; then
|
||||||
cd wiringPi
|
cd wiringPi
|
||||||
|
|||||||
2
debian/odroid-wiringpi.postinst
vendored
2
debian/odroid-wiringpi.postinst
vendored
@@ -9,7 +9,7 @@ msg() {
|
|||||||
case "$1" in
|
case "$1" in
|
||||||
configure)
|
configure)
|
||||||
if [ -c "/dev/gpiomem" ] && [ "$(stat -c "%a %G" "/dev/gpiomem")" != "660"*"odroid" ]; then
|
if [ -c "/dev/gpiomem" ] && [ "$(stat -c "%a %G" "/dev/gpiomem")" != "660"*"odroid" ]; then
|
||||||
hardware=$(fgrep Hardware /proc/cpuinfo | head -1 | awk '{ printf("%s %s %s\n", $3, $4, $5) }' | xargs)
|
hardware=$(fgrep -a Hardware /proc/cpuinfo | head -1 | awk '{ printf("%s %s %s\n", $3, $4, $5) }' | xargs)
|
||||||
case "$(echo $hardware | tr [:upper:] [:lower:])" in
|
case "$(echo $hardware | tr [:upper:] [:lower:])" in
|
||||||
*xu4)
|
*xu4)
|
||||||
cp -f /tmp/odroid-wiringpi/rules.d/99-odroid-wiringpi-exynos.rules /etc/udev/rules.d
|
cp -f /tmp/odroid-wiringpi/rules.d/99-odroid-wiringpi-exynos.rules /etc/udev/rules.d
|
||||||
|
|||||||
Reference in New Issue
Block a user