This transmission bracket (cross member) can be used for installation of a 6-speed transmission in a BMW E30. It should work with the Getrag 420G, ZF GS6-37DZ and ZF GS6-37BZ.
A typical E30 325i automatic transmission swap to manual with the Getrag 260
A typical manual transmission swap uses the 5-speed Getrag 260 transmission from a manual E30.
Here is the list of the parts that are required for a swap:
Transmission input shaft seal
Engine rear main seal
Transmission
Transmission oil
Transmission crossmember 23711176574
Transmission mounts 23711175939 x2
Transmission mount nuts 07119905515 x4
Washer 33311108205 x2
Washer 07119904115 x2
Shifter assembly
Selector rod | Shift link w/washers and clips
Shift handle
Shift knob and emblem
Nylon cup and bushing
Shift lever insulating rubber boot
Shift lever leather boot
Lock pin for support arm
Bushing mounting nut
Transmission to block bolts (set, you can reuse the bolts that came off your auto)
Giubo bolts
Giubo
Manual driveshaft
Center bearing assembly
Reverse light switch
M/T reverse lamps wiring harness BMW 23141220263
Clutch cruise control switch and wiring
Flywheel
Flywheel spacer plate
Flywheel bolts x8 (need new)
Throwout bearing
Clutch/Pressure Plate assembly
Clutch fork
Clutch fork bearing
Clutch master cylinder
Clutch master fluid line connector
Clutch slave cylinder
Clutch hardline
Firewall grommet
Clutch soft line
Brake pedal 35211154729
Clutch pedal 35311156838
Clutch and brake pedal rubber pads 35211108634
Hex bolt for the pedals M10x175 07119912721
The most expensive parts are the Getrag 260, manual driveshaft, shifter and selector rod, flywheel, and clutch. It’s very difficult to find a Getrag 260 that doesn’t need a rebuild. BMW sells a refurbished one for $3,500.
If you have to change so many parts, isn’t it better to install a newer 6-speed transmission with its driveshaft, shifter, clutch, differential, and linking parts?
GS6-37DZ transmission
A newer one can be the European diesel transmission GS6-37DZ. This swap was pioneered by Wanganstyle.
This article describes only the Project Research stage. I’m trying to collect as much information as possible. I don’t know what will work and what won’t.
The GS6-37 is a 6-speed manual transmission manufactured by ZF Friedrichshafen AG and Getrag. It is designed for longitudinal engine applications and is rated to handle up to 370 newton metres (273 lbf⋅ft) of torque.
Gear ratios
Gear ratios for Getrag 260
1
2
3
4
5
R
3.83
2.20
1.40
1.00
0.81
3.71
Gear ratios for diesel GS6-37DZ
1
2
3
4
5
6
R
5.14
2.83
1.79
1.26
1.00
0.83
4.64
Gear ratios for gasoline GS6-37BZ
1
2
3
4
5
6
R
4.350
2.496
1.665
1.234
1.000
0.851
3.926
Differential
Which differential ratio is the best?
The acceleration in the 2, 3, 4 gears should be similar to the Getrag 260 + a 4.10 or 3.73 differential.
The 6th gear should be good for low-RPM freeway cruising.
The 1st gear should be usable.
The Getrag 260 with a 4.10 differential compared to the GS6-37DZ with a 3.15 differential:
The Getrag 260 with a 3.73 differential compared to the GS6-37DZ with a 3.07 differential:
It’s possible to find Z3 3.07 and 3.15 medium 188mm differentials. They have Torsen LSDs and require little maintenance for regular driving. They are more modern and have few miles as the regular Z3 was a weekend car. The Z3M had a 3.23 clutch-type LSD differential.
Getrag 260 and GS6-37DZ bellhousing comparison
Looking at the different variants of the GS6-37DZ transmission, only the earlier variants GS6-37DZ — THES (23007562730) and GS6-37DZ — TJEM (23007565194) can be used.
Compatible transmissions were installed with the M47 engine:
GS6-37DZ — TJEM
BMW E87 (118d, 120d)
BMW 320Cd E46
BMW E90/E91 (318d (M47N2), 320d (M47N2))
BMW E60/E61 (520d)
BMW E60 LCI/E61 LCI (520d (M47N2))
GS6-37DZ — THES
BMW 120d E87
BMW E46 (320Cd/td, 320d (M47N))
BMW E90/E91 (320d M47N2)
BMW E60/E61 (520d)
The newer versions of the GS6-37DZ (TJEF, TJEJ) that came with the engine N47 have the starter protrusion at the bottom, not at the top. They are not compatible.
The main advantage of the GS6-37DZ (D – diesel) over its sibling GS6-37BZ (B – benzin, petrol, gasoline) is the slant(tilt) degree of 20°. The slant degree of the M20 engine in the 325i is the same. The engine doesn’t stand vertically to save on the height. The GS6-37BZ has the slant degree of 30° – it’s compatible with the M30, M50, etc.
As you can see, the GS6-37DZ has more bellhousing holes than the Getrag 260: 2 at the bottom and 1 pin at the top.
The transmission will be mated with the BMW M20 engine. The top pin interferes with the starter. But the M20 starter won’t probably work with the GS6-37DZ flywheel, so it’ll be replaced anyway.
The bottom part of the M20 engine can be disconnected. It’s called the Bowl reinforcement (11141286342). An additional hole can be drilled and tapped in it, but there is no casting for it in the back of the reinforcement. Maybe, a nut can be used.
Transmission drive shaft differences
The driveshaft in the Getrag 260 has 10 splines, the driveshaft of the GS6-37DZ has 22 splines. So, a clutch disk should have 22 splines too.
The driveshaft in the Getrag 260 is longer and its pilot bearing is inserted into the crankshaft of the engine.
The driveshaft in the GS6-37DZ is shorter and its pilot bearing is in the flywheel.
Rear transmission mount brace (cross member)
The GS6-37DZ is mounted differently. The top (22316760303) E90 Transmission supporting bracket is available. Then, the mounting style and dimensions should be similar to the 6-speed Getrag 420G, for which some companies create braces.
The GS6-37DZ is 635 mm long. It is 120 mm longer than the Getrag 260. The automatic transmission ZF HP4-22 is 685 mm long.
The length of the drive shaft for the GS6-37DZ must be close to 1367 mm.
The E36 M3 automatic drive shaft (26112228212) should be compatible with its length of 1346 mm. It’s about 20 mm short.
Also, the European E36 automatic drive shaft (26111227441) should be compatible too with its length of 1345 mm.
It seems that many 4-bolt E36 drive shafts have the same rear half. It’s only the front half that has different lengths. Both u-joints are located in the rear half, and they wear out. The front half is just a pipe with connectors.
Some people indicate that the manual Z4 front part(26117514468) can be used with the rear E36 part to provide the perfect length.
The M3 giubo (26112226527) is 96mm in diameter, 35 mm wide, and it is connected using M12 bolts.
The drive shaft center support mount must be from the E30 (26121226723). Probably, it should be mounted backwards.
The front section of the E46 320d driveshaft + the rear section of the E30 rear driveshaft
The rear section of all E30 driveshafts is the same, so a good automatic E30 driveshaft can be used.
The front section must come from a European e46 320d produced from 03/2003 (26117523929). The 6-speed E46 330i and M3 driveshafts are not compatible.
Shifter
The shifter carrier and selector rod for this conversion must be custom.
The master clutch cylinder is from the E30. The slave clutch cylinder is from the E36 325i(21521159045). There should be other compatible clutch cylinders.
Starter
The starter from the E46(12412354693) is compatible with the E46 flywheel.
The Bosch SR0448N from the E46 has the threaded holes for the bolts, no E30-style nuts will be needed.
The E30 starter(12411726504) specifications:
Rated Power [kW]: 1,4
Voltage [V]: 12
Number of Teeth: 9
Rotation Direction: Clockwise rotation
Number of mounting bores: 2
Flange Ø [mm]: 76
Number of Thread Bores 0
Plug Type ID: M6
Clamp: M8
Length 3 [mm]: 25
Length [mm]: 184.21
The E46 starter(12412354693) specifications:
Rated Power [kW]: 1,4
Voltage [V]: 12
Number of Teeth: 9
Rotation Direction: Clockwise rotation
Number of mounting bores: 3
Flange Ø [mm]: 76
Number of Thread Bores: 2
Plug Type ID: M6
Clamp: M8
Length 3 [mm]: 23
Length [mm]: 173.21
Reverse Switch
The E30 reverse switch(23141354071) has a correct connector.
Lube and Oil
The transmission splines must be lubed.
Rebuilding the GS6-37DZ transmission
The transmission bellhousing can be opened using this crude technology.
It seems that the bellhousings of the GS6-37DZ and GS6-37BZ can be exchanged to get the gasoline engine gear ratios.
If you want to create a graphical user interface (GUI) for the Intel Edison, it’s better to use the popular Qt cross-platform framework.
Then you will be able to develop and debug a program on your powerful desktop computer and then deploy it to your Edison and test it there.
My hardware and Linux kernel configuration
I used my shield that has a SSD1322 based display connected to the SPI bus and 4 push buttons connected to GPIOs.
The display is controlled through the Linux framebuffer kernel module fbtft.
The buttons are controlled through the gpio-keys module.
QT5 Yocto Client package installation
My Edison source packages are located in the folder ~/edison.
I increased the size of my root Edison partition in the file ~/edison/poky/meta-intel-edison/meta-intel-edison-distro/recipes-core/images/edison-image.bb
IMAGE_ROOTFS_SIZE = "1048576"
I downloaded a new meta package meta-qt5.
At the time of writing, the Intel Edison packages used the openembedded branch called “dizzy”.
cd ~/edison/poky
git clone -b dizzy https://github.com/meta-qt5/meta-qt5.git
I modified the configuration file ~/edison/build_edison/conf/auto.conf
I added some Qt packages and enabled some configuration options. I may select something else in the future.
The Intel Edison has no GPU. So, the Qt OpenGL based modules don’t work. Among them are Qt Quick and Qt Declarative and the packages that depend on these two.
Then the usual Edison image compilation stage.
You must insert yourself into the group “dialout” on Linux Ubuntu to have permissions to run the script “flashall.sh”.
I modified the file ~/edison/poky/meta-qt5/recipes-qt/packagegroups/packagegroup-qt5-toolchain-target.bb
and deleted all packages from the list RDEPENDS_${PN} that depend on Qt Quick and Qt Declarative. My list may change in the future.
cd ~/edison/poky/
source oe-init-build-env ../build_edison/
bitbake meta-toolchain-qt5
I ran the new SDK installer in ~/edison/build_edison/tmp/deploy/sdk
sh poky-edison-glibc-x86_64-meta-toolchain-qt5-core2-32-toolchain-1.7.3.sh
It installed the SDK into the default folder /opt/poky-edison/1.7.3
I opened the directory /opt/poky-edison/1.7.3/sysroots/x86_64-pokysdk-linux/usr/bin/i586-poky-linux
and created symlinks. Without them, my system compiler and linker in /usr/bin are called instead.
I installed Qt Creator from https://download.qt.io/archive/qt/5.3/5.3.2/, as the version of Qt in the Yocto package is 5.3.2.
But, probably, the one from the Linux distribution should work as well.
I installed it in the directory ~/Qt.
I modified the script ~/Qt/Tools/QtCreator/bin/qtcreator.sh, so it will load the environment variables for the SDK. I put the new line at the very top of the script.
On my Edison I created the user “farit” and added him to the group “video” that has permissions to write to the framebuffer and read input buttons. His home directory on the Edison is “/home/farit”.
usermod -a -G video farit
I modified the menu link on my desktop to run the script ~/Qt/Tools/QtCreator/bin/qtcreator.sh to open Qt Creator.
In Qt Creator, I opened the menu Tools -> Options -> Devices and added my Edison device as “Generic Linux Device”.
I named it “edison” and provided the name and password combination for the user “farit”. Then tested the connection.
I opened the menu Tools > Options > Build & Run.
I opened the tab “Qt Versions”, clicked on the button “Add” and browsed to select qmake
I opened the tab “Kits”, clicked on the button “Add” and filled in the form.
I selected the values for Qt, Compiler, Debugger that I just defined in the previous steps.
In mainwindow.ui, I created a label “myLabel”.
In the MainWindow properties, I clicked on the “palette” button and made the background transparent by setting the opacity to 0 for “Window”. I changed “WindowText” to white by selecting the color #FFFFFF.
In the “Projects” tab in the “Run” section, I added the arguments for the executable, so it can write to the default framebuffer /dev/fb0 and read input from /dev/input/event0.
The Intel Edison has multiple GPIO pins, which can be connected to push buttons.
I use the gpio-keys Linux driver. Each button emits an event, which can be read in the same way as a keyboard event.
Schematic
Here is the schematic of my shield with the push buttons. The buttons are SW2, SW3, SW4, SW5. Shield with Push Buttons for Intel Edison
GPIO pullup code
As you can see, one side of a button is connected to the ground and another to a GPIO pin. I could use external pullup resistors, but the Intel Edison has built-in pullup resistors, which I activated instead. The current kernel code doesn’t have a function for setting a pullup resitor, so I had to write my own.
I added the function lnw_gpio_set_pull_alt into the Linux kernel file drivers/gpio/gpio-langwell.c
void lnw_gpio_set_pull_alt(unsigned gpio, int value, int pullup_value)
{
struct lnw_gpio *lnw;
u32 flis_offset;
u32 flis_value;
unsigned long flags;
/* use this trick to get memio */
lnw = irq_get_chip_data(gpio_to_irq(gpio));
if (!lnw) {
pr_err("langwell_gpio: can not find pin %d\n", gpio);
return;
}
if (gpio < lnw->chip.base || gpio >= lnw->chip.base + lnw->chip.ngpio) {
dev_err(lnw->chip.dev, "langwell_gpio: wrong pin %d to config alt\n", gpio);
return;
}
gpio -= lnw->chip.base;
if (lnw->type != TANGIER_GPIO) {
return;
}
flis_offset = lnw->get_flis_offset(gpio);
if (WARN(flis_offset == -EINVAL, "invalid pin %d\n", gpio))
return -EINVAL;
if (is_merr_i2c_flis(flis_offset))
return;
spin_lock_irqsave(&lnw->lock, flags);
flis_value = get_flis_value(flis_offset);
if (value) {
flis_value |= PULLUP_ENABLE;
flis_value &= ~PULLDOWN_ENABLE;
} else {
flis_value |= PULLDOWN_ENABLE;
flis_value &= ~PULLUP_ENABLE;
}
//flis_value |= PUPD_VAL_50K;
flis_value |= pullup_value;
set_flis_value(flis_value, flis_offset);
spin_unlock_irqrestore(&lnw->lock, flags);
}
EXPORT_SYMBOL_GPL(lnw_gpio_set_pull_alt);
Also added its declaration and the constants for the pullup values into the Linux kernel file include/linux/lnw_gpio.h
I added the definitions for my 4 push buttons into the Linux kernel file arch/x86/platform/intel-mid/device_libs/platform_gpio_keys.c
The buttons are for GPIO12, GPIO13, GPIO182, GPIO183.
Each button configured as a general purpose pin by using the multiplexor code: lnw_gpio_set_alt(gb[i].gpio, LNW_GPIO);
The pullup value is set to 50K using the previously written function: lnw_gpio_set_pull_alt(gb[i].gpio, 1, PUPD_VAL_50K);
/*
* platform_gpio_keys.c: gpio_keys platform data initilization file
*
* (C) Copyright 2008 Intel Corporation
* Author:
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; version 2
* of the License.
*/
#include <linux/input.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/gpio.h>
#include <linux/gpio_keys.h>
#include <linux/platform_device.h>
#include <asm/intel-mid.h>
#include "platform_gpio_keys.h"
#include <linux/lnw_gpio.h>
/*
* we will search these buttons in SFI GPIO table (by name)
* and register them dynamically. Please add all possible
* buttons here, we will shrink them if no GPIO found.
*/
static struct gpio_keys_button gpio_button[] = {
{
.code = KEY_POWER,
.gpio = -1, /* GPIO number */
.active_low = 1,
.desc = "power_btn",/*Button description*/
.type = EV_KEY,
.wakeup = 0,
.debounce_interval = 3000,
},
{
.code = KEY_UP,
.gpio = 182,
.active_low = 1,
.desc = "up_btn",
.type = EV_KEY,
.wakeup = 0,
.debounce_interval = 100,
},
{
.code = KEY_DOWN,
.gpio = 12,
.active_low = 1,
.desc = "down_btn",
.type = EV_KEY,
.wakeup = 0,
.debounce_interval = 100,
},
{
.code = KEY_ESC,
.gpio = 13,
.active_low = 1,
.desc = "back_btn",
.type = EV_KEY,
.wakeup = 0,
.debounce_interval = 100,
},
{
.code = KEY_ENTER,
.gpio = 183,
.active_low = 1,
.desc = "down_btn",
.type = EV_KEY,
.wakeup = 0,
.debounce_interval = 100,
},
};
static struct gpio_keys_platform_data gpio_keys = {
.buttons = gpio_button,
.rep = 1,
.nbuttons = -1, /* will fill it after search */
};
static struct platform_device pb_device = {
.name = DEVICE_NAME,
.id = -1,
.dev = {
.platform_data = &gpio_keys,
},
};
/*
* Shrink the non-existent buttons, register the gpio button
* device if there is some
*/
static int __init pb_keys_init(void)
{
struct gpio_keys_button *gb = gpio_button;
int i, num, good = 0;
num = sizeof(gpio_button) / sizeof(struct gpio_keys_button);
for (i = 0; i < num; i++) {
pr_info("info[%2d]: name = %s, gpio = %d\n",
i, gb[i].desc, gb[i].gpio);
if (gb[i].gpio == -1)
continue;
if (gb[i].gpio > 0) {
lnw_gpio_set_alt(gb[i].gpio, LNW_GPIO);
lnw_gpio_set_pull_alt(gb[i].gpio, 1, PUPD_VAL_50K);
}
if (i != good)
gb[good] = gb[i];
good++;
}
if (good) {
gpio_keys.nbuttons = good;
return platform_device_register(&pb_device);
}
return 0;
}
late_initcall(pb_keys_init);
Testing Buttons
When the new Linux kernel was recompiled and flashed to the Intel Edison, I could verify the buttons.
I checked the files in the directory for the GPIO12: /sys/kernel/debug/gpio_debug/gpio12
current_pinmux was mode0
current_pullmode was pullup
current_pullstrength was 50k
I ran the command and tried to push on the buttons. I received some symbols. It meant that the buttons worked.
By default, the device /dev/input/event0 is accessible only by root.
I created the file /etc/udev/rules.d/input.rules
I chose the group “video” as I will use a user who should be able to access both the video device and the input device.
I also created the file with the same contents poky/meta/recipes-core/systemd/systemd/input.rules
and added it into the recipe poky/meta/recipes-core/systemd/systemd_216.bb
When you want to connect a display to the Intel Edison module, you should utilise the existing Linux infrastructure and use a kernel framebuffer driver instead of writing your own screen functions based on Arduino libraries.
At the time of writing the article, the Linux kernel SPI support was broken in the original Intel kernel. So, I used Primiano’s kernel that fixed the SPI support. It works perfectly for me, it may not contain the latest Intel’s modifications. Use it on your own risk.
First, I downloaded the Intel sources from http://iotdk.intel.com/src/3.0/edison/. I extracted them into ~/edison in my home directory and followed the instructions for compiling it.
Then I replaced the kernel in ~/edison/poky/linux-kernel by my own, but I kept the directories .git and .meta intact.
I increased the revision number in the variable PR = “r3″ in the file ~/edison/poky/meta-intel-edison/meta-intel-edison-bsp/recipes-kernel/linux/linux-externalsrc.bb
I added my new configuration parameters for fbtft into the file ~/edison/poky/linux-kernel/arch/x86/configs/i386_edison_defconfig
I downloaded the fbtft sources. I created the folder ~/edison/poky/linux-kernel/drivers/video/fbtft and extracted the fbtft sources into the folder.
I added the line in ~/edison/poky/linux-kernel/drivers/video/Kconfig before the line “endmenu”.
source "drivers/video/fbtft/Kconfig"
I added the line in ~/edison/poky/linux-kernel/drivers/video/Makefile
obj-$(CONFIG_FB_TFT) += fbtft/
Then I edited the file ~/edison/poky/linux-kernel/drivers/video/fbtft/fbtft_device.c
I added the header
#include <linux/spi/intel_mid_ssp_spi.h>
Then I added the description of my display into the list of displays.
Where “reset” uses the number 49 of the GP49 pin, “dc” is GP15.
The pin “led” is GP14 and I use it in my custom initialization code in the file fb_ssd1322.c
It seems that the chip SSD1322 supports speeds only up to 12.5MHz, but the Edison must be able to support speeds up to 25MHz.
I added the lines to the file ~/edison/poky/meta-intel-edison/meta-intel-edison-bsp/conf/machine/edison.conf to autoload the fbtft module.
Where busnum=5 is the SPI bus number on the Edison.,
name=er_oled028 defines my oled display from fbtft_device.c,
debug=7 shows more debugging information. It’s optional.
Then I recompiled the kernel and flashed my Edison.
I compiled mplayer on the Edison and played a sample video. I couldn’t find a video with the same dimensions as my display, but it should work in the full-screen mode too.
The Intel Edison doesn’t have a video interface; so, you connect an OLED or TFT LCD display via the SPI interface using the Linux kernel video module framebuffer.
After reading the documentation for the display, I connected it to the Edison via the 4-wire SPI interface, which requires an additional GPIO pin for the D/C signal (Write Data/Write Command). The 3-wire SPI interface uses the 9 bit SPI interface and should be avoided.
I compared the timing diagrams for the SSD1322 chip with the SPI Transfer Modes and found that it uses the SPI Mode 3.
Schematic
Here is the schematic of my SSD1322 shield for the Intel Edison.
The SSD1322 Display Shield for the Intel Edison
Connections between the Edison and the Display:
GP49 -> RES(Reset Signal Input)
GP15 -> D/C(Data/Command Control)
GP110_SPI_2_FS0(CS0) -> CS(Chip Select Input)
GP109_SPI_2_CLK -> D0/SCLK(Serial Clock)
GP115_SPI_2_TXD -> D1/SDIN(Serial Data Input)
I also connected GP14 to the SHDN pin of the +12V voltage regulator.
fbtft download and configuration
The latest code from the notro/fbtft repository didn’t work for me.
I used the older code presslab-us/fbtft, which also included support for my chip SSD1322.
After I compiled the Edison image for the first time, I copied these two hidden directories into another folder (I placed the Edison sources into the “edison” directory in my home directory); so, I can return the sources to the original state by copying these hidden directories back at any moment.
I added the line in ~/edison/edison-src/build/tmp/work/edison-poky-linux/linux-yocto/3.10.17-r0/linux/drivers/video/Kconfig before the line “endmenu”.
source "drivers/video/fbtft/Kconfig"
I added the line in ~/edison/edison-src/build/tmp/work/edison-poky-linux/linux-yocto/3.10.17-r0/linux/drivers/video/Makefile
obj-$(CONFIG_FB_TFT) += fbtft/
Then I edited the file ~/edison/edison-src/build/tmp/work/edison-poky-linux/linux-yocto/3.10.17-r0/linux/drivers/video/fbtft/fbtft_device.c
I added the header
#include <linux/spi/intel_mid_ssp_spi.h>
Then I added the description of my display into the list of displays.
Where “reset” uses the number 49 of the GP49 pin, “dc” is GP15.
The pin “led” is GP14 and I use it in my custom initialization code in the file fb_ssd1322.c
DMA has to be disabled because the DMA code in intel_mid_ssp_spi.h is broken.
If you enable it, you can see errors like this: “intel_mid_ssp_spi_unified 0000:00:07.1: ERROR : DMA buffers already mapped”
I created the kernel configuration file fbtft.cfg in the same directory “recipes-kernel/linux/files/”:
CONFIG_FRAMEBUFFER_CONSOLE=m
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=m
CONFIG_FB_SYS_FILLRECT=y
CONFIG_FB_SYS_COPYAREA=y
CONFIG_FB_SYS_IMAGEBLIT=y
CONFIG_FB_SYS_FOPS=y
CONFIG_FB_DEFERRED_IO=y
CONFIG_FB_BACKLIGHT=y
CONFIG_FB_TFT=m
# CONFIG_FB_TFT_GU39XX is not set
# CONFIG_FB_TFT_HX8340BN is not set
# CONFIG_FB_TFT_HX8347D is not set
# CONFIG_FB_TFT_ILI9320 is not set
# CONFIG_FB_TFT_ILI9325 is not set
# CONFIG_FB_TFT_ILI9341 is not set
# CONFIG_FB_TFT_PCD8544 is not set
# CONFIG_FB_TFT_SSD1289 is not set
# CONFIG_FB_TFT_SSD1351 is not set
CONFIG_FB_TFT_SSD1322=m
# CONFIG_FB_TFT_ST7735R is not set
# CONFIG_FB_FLEX is not set
CONFIG_FB_TFT_FBTFT_DEVICE=m
# CONFIG_TOUCHSCREEN_ADS7846_DEVICE is not set
I commented the line in the file board.c for the device ads7955 that occupies the same SPI busnum=5, cs=0 that we use for the display.
Then I ran the same git sequence to generate the patch file “platform_ssd1322.patch” and copied it into the same “recipes-kernel/linux/files” directory.
When all patch and configuration files were ready, I added links to them into the file “~/edison/edison-src/meta-intel-edison/meta-intel-edison-bsp/recipes-kernel/linux/linux-yocto_3.10.bbappend”.
The Intel Edison board is shipped with the Yocto Linux distribution installed. Yocto allows an experienced developer to compile a small-size Linux image with only the selected packages. Then the image is flashed into the board. It’s not as convenient as Ubuntu as there are no pre-compiled packages that are easy to install.
I wanted to add the program mc (Midnight Commander); so, I had to recompile the Yocto image. My computer OS is Linux Ubuntu 14.04. I experienced a few problems while compiling; so, I’ll describe them here.
Downloaded the package Linux source files from the Intel Edison Software Downloads page. At the time of writing, it was in the section Intel Edison® Board Firmware Software Release 2.1.
I install everything related to the Intel Edison into the directory /home/farit/edison. The Linux sources consume 11G in that directory.
Decompressed the source package:
tar xzf edison-src-ww25.5-15.tgz -C /home/farit/edison/
cd /home/farit/edison/edison-src/
Moved my download and build cache (also called sstate) directories from the default location under the build directory, using the –dl_dir and –sstate_dir options. To create download and sstate directory, used the mkdir command:
After the setup, I ran these commands recommended by the setup script:
cd /home/farit/edison/edison-src
source poky/oe-init-build-env
bitbake edison-image
The compilation took 5 or so hours. I should’ve used the SSD disk. But most files have been downloaded and cached now; so, it doesn’t take much time the second time.
Then I decided to compile in Midnight Commander. I checked the name of the package on the Yocto recipes directory. It was “mc”.
I opened the file /home/farit/edison/edison-src/meta-intel-edison/meta-intel-edison-distro/recipes-core/images/edison-image.bb and added the lines at the bottom:
#Midnight Commander
IMAGE_INSTALL += "mc"
Then ran again:
cd /home/farit/edison/edison-src
source poky/oe-init-build-env
bitbake edison-image
At first, the command complained about the non-existing mkimage program, which is in the package u-boot-tools:
Error : ota_update.scr creation failed, mkimage tool not found
I added a symlink to mkimage and ran the postBuild.sh script again:
cd /home/farit/edison/edison-src
mkdir -p u-boot/tools
cd u-boot/tools
ln -s /usr/bin/mkimage mkimage
When there were no errors, I looked in the directory /home/farit/edison/edison-src/build/toFlash. It contained the same files as in the Intel’s firmware image.
I ran the command flashall.sh in it as root. I added myself into the group “dialout”; so, I should be able to connect to a USB port as a regular user. I’ll check it again the next time.
Midnight Commander on Intel Edison
By default, the subshell (Ctrl-O) doesn’t work in Midnight Commander as it requires bash. Change your user shell from the default “/bin/sh” to “/bin/bash” in /etc/passwd.
When I want to quickly recompile just the kernel after changes, I run these commands:
cd /home/farit/edison/edison-src
source poky/oe-init-build-env
bitbake -f linux-yocto
I connected my programmer AVRISP mkII to the ISP header of the board to upload the Arduino bootloader. I also connected the FTDI device to provide the 5V power to the board; otherwise, programming doesn’t work.
I use the variant of the microcontroller pin definitions “avr_developers”, also known as “sanguino” for my project.
You can find the definitions in the file ~/arduino/hardware/arduino/avr/variants/avr_developers/pins_arduino.h
I use my AVRISP mkII programmer to load the bootloader into the microcontroller. I use Atmel AVR Studio (version is 4.19).
I go to Tools -> Program AVR -> Connect. Then I select my programmer.
Selecting a programmer, AVRISP mkII in my caseReading the signature from Atmega1284pSelecting the bootloader hex file, optiboot_atmega1284p.hex in my case. Click on Program to upload the bootloader into the chip.Program the fuses into the chip.
Then I copy the files from the downloaded archive into the hardware/arduino/avr/ subdirectory of the installed Arduino directory and add the settings for the avr_developers board into boards.txt.