Skip to content

Commit

Permalink
update main README and upgrade makefiles
Browse files Browse the repository at this point in the history
  • Loading branch information
pfps committed Jul 2, 2014
1 parent b6c2fc3 commit f7e3a48
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 18 deletions.
30 changes: 17 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
## -*- Makefile -*-
##
## User: buri
## Time: 2.5.2014 20:11:46
## Makefile created by Oracle Solaris Studio.
##
## This file is generated automatically.
##
# Top-level makefile for yoga-laptop project
# Just defers to the lower-level makefiles

all: ideapad-laptop sensors-drivers programs

all: sensors sensors-drivers

## Target: all
driver:
cd yoga_laptop && $(MAKE) install
sensors:
programs:
cd sensors && $(MAKE) all

programs-install:
cd sensors && $(MAKE) install

sensors-drivers:
cd sensors/drivers && $(MAKE) default

sensors-drivers-install:
cd sensors/drivers && $(MAKE) install

ideapad-laptop:
cd yoga_laptop && $(MAKE) default

ideapad-laptop-install:
cd yoga_laptop && $(MAKE) install

#install:
# cd yoga_laptop && $(MAKE) install
# cd sensors/drivers && $(MAKE) install
Expand Down
57 changes: 56 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,59 @@
yoga-laptop
===========

Systems and information to make Lenovo Yoga laptops work better
Systems and information to make Lenovo Ideapad Yoga laptops work better.
Best tested for Yoga 2 Pro, but most of this works on other Ideapad Yogas.
Thinkpad Yogas may need modifications, and can't use ideapad-laptop.

These systems include kernel modules, so you have to have added
kernel-headers and kernel-devel to your system. For the orientation program
and sensor drivers you also need to have the IIO subsystem included in your
system. If you are running a kernel older than 3.13 you may have problems.

1/ yoga_laptop/ideapad-laptop.c

A patch to the ideapad-laptop kernel module to make Wifi work on yogas.
The ideapad-laptop moodule also handles several ACPI-related keys on the
Yoga keyboard. A similar patch has been backported to Fedora, and is in
3.15 (I think, 3.16 for sure) kernels.

To compile and install (warning - this installs a kernel module and may
break your system, and has to be done each time you install a new kernel,
after booting into the new kernel):
make ideapad-laptop
sudo make ideapad-laptop-install
The installation also sets up udev rules and an xmodmap file to handle
the touchpad_toggle and break keys that are not usually handled correctly.

Reboot your system to get load the module

2/ sensor drivers

Patched 3.14 drivers for five of the sensors in the Yoga laptops. The
patch adds a quirk so that the hub initializes correctly. The quirk has
been added to 3.15 and 3.15 should have better drivers than the ones
here.

To compile and install (warning - this installs several kernel modules and
may break your system, and has to be done each time you install a new kernel,
after booting into the new kernel):
make sensors-drivers
sudo make sensors-drivers-install

Reboot your system to load the drivers

3/ orientation and light programs

The orientation program re-orients the screen so that the top of the
screen is physically up. The program needs the hid-sensor-accel-3d
sensor driver. See "docs/Orientation and rotation" for more information.

The light program adjusts the brightness of the screen in response to
changes in ambient brightness. The program needs the hid-sensor-als
sensor driver.

To compile and install (after first compiling and installing the sensor
drivers):
make programs
sudo make programs-install

5 changes: 4 additions & 1 deletion sensors/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ generic_buffer: generic_buffer.c iio_utils.h
cc generic_buffer.c -o generic_buffer

orientation: orientation.c iio_utils.h
@echo NOTE: In most cases you need to install drivers in the drivers directory for orientation to work
cc orientation.c -o orientation

hinge: hinge.c iio_utils.h
Expand All @@ -31,5 +30,9 @@ permissions:

install: orientation permissions
install --owner=root --group=root --mode=755 orientation /usr/bin
install --owner=root --group=root --mode=755 light /usr/bin
@echo NOTE: In most cases you also need to install drivers from the drivers directory

clean:
rm -f *.o orientation light generic_buffer

2 changes: 0 additions & 2 deletions sensors/drivers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ install:
install --owner=root --group=root --mode=644 hid-sensor-magn-3d.ko $(DDIR)/iio/magnetometer
install --owner=root --group=root --mode=644 hid-sensor-incl-3d.ko $(DDIR)/iio/orientation



clean:
rm -rf *~ *.o *.mod.c .hid-sensor* .tmp_versions modules.order Module.symvers

Expand Down
2 changes: 1 addition & 1 deletion yoga_laptop/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ default:
@echo NOTE: You need to have the kernel-devel package installed
echo $(KDIR)
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules

install: install-driver install-keys

install-driver:
Expand All @@ -31,4 +32,3 @@ clean:

veryclean: clean
rm -f *.ko

0 comments on commit f7e3a48

Please sign in to comment.