summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2012-06-03 10:07:58 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2012-06-03 10:07:58 +0200
commitdff3446ed548fcfcf8909ac83045dec7cf0e0e2e (patch)
treedd9876ccd106b6893a391a7c45710b9aafeedfb3
Initial commit
-rw-r--r--conf/machine/colibri-t20.conf~61
-rw-r--r--conf/machine/colibri-t30.conf~61
-rw-r--r--recipes-bsp/u-boot/u-boot-git/bootaddr.patch12
-rw-r--r--recipes-bsp/u-boot/u-boot-git/colibri_t30.patch220
-rw-r--r--recipes-bsp/u-boot/u-boot-git/remove-overlay.patch11
-rw-r--r--recipes-bsp/u-boot/u-boot-git/remove-unused.patch104
-rw-r--r--recipes-bsp/u-boot/u-boot-git/tegra2-nand-warning.patch12
-rw-r--r--recipes-bsp/u-boot/u-boot-git/u-boot-board-unused.patch62
-rw-r--r--recipes-bsp/u-boot/u-boot-git/u-boot-userspacetools.patch12
-rw-r--r--recipes-bsp/u-boot/u-boot-git/u-boot-warning.patch272
-rw-r--r--recipes-bsp/u-boot/u-boot-git/u-boot_ap20warning.patch11
-rw-r--r--recipes-bsp/u-boot/u-boot.inc68
-rw-r--r--recipes-bsp/u-boot/u-boot_git.bb61
-rw-r--r--recipes-bsp/u-boot/u-boot_git.bbappend70
-rw-r--r--recipes-bsp/u-boot/u-boot_git.bbappend.orig23
-rw-r--r--recipes-bsp/u-boot/u-boot_git.bbappend~68
-rw-r--r--recipes-kernel/linux/linux-colibri-t20_git.bb39
-rw-r--r--recipes-kernel/linux/linux-colibri-t20_git.bb.bak37
-rw-r--r--recipes-kernel/linux/linux-colibri-t20_git.bb.orig35
-rw-r--r--recipes-kernel/linux/linux-colibri-t20_git.bb~36
-rw-r--r--recipes-kernel/linux/linux-colibri-t30_git.bb.bak38
-rw-r--r--recipes-kernel/linux/linux.inc282
-rw-r--r--recipes-lxde/lxappearance-obconf/lxappearance-obconf_0.0.1.bb21
-rw-r--r--recipes-lxde/lxlauncher/lxlauncher_0.2.2.bb17
-rw-r--r--recipes-lxde/lxlauncher/lxlauncher_0.2.2.bb~17
-rw-r--r--recipes-lxde/lxrandr/lxrandr_0.1.2.bb14
-rw-r--r--recipes-lxde/lxrandr/lxrandr_0.1.2.bb~14
-rw-r--r--recipes/joe/joe_3.1.bb15
-rw-r--r--recipes/joe/joe_3.1.bb~15
-rw-r--r--recipes/tegrastats-gtk/files/Makefile17
-rw-r--r--recipes/tegrastats-gtk/files/main.c975
-rw-r--r--recipes/tegrastats-gtk/files/stats.c42
-rw-r--r--recipes/tegrastats-gtk/tegrastats-gtk.bb17
-rw-r--r--recipes/tegrastats-gtk/tegrastats-gtk.bb~16
34 files changed, 2775 insertions, 0 deletions
diff --git a/conf/machine/colibri-t20.conf~ b/conf/machine/colibri-t20.conf~
new file mode 100644
index 0000000..90aaa06
--- /dev/null
+++ b/conf/machine/colibri-t20.conf~
@@ -0,0 +1,61 @@
+#@TYPE: Machine
+#@NAME: colibri_t20
+#@DESCRIPTION: Toradex Colibri T20
+
+TARGET_ARCH = "arm"
+
+PREFERRED_PROVIDER_virtual/kernel = "linux-colibri-t20"
+#PREFERRED_VERSION_linux = ""
+
+KERNEL_IMAGETYPE = "uImage"
+#UBOOT_MACHINE = "harmony_config"
+#UBOOT_MACHINE = "waluigi_config"
+UBOOT_MACHINE = "colibri_t20_config"
+UBOOT_ENTRYPOINT = "0x00008000"
+#PREFERRED_VERSION_u-boot = "2010.06"
+
+PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
+XSERVER = "xserver-xorg \
+ xf86-input-evdev \
+ xf86-input-mouse \
+ xf86-video-fbdev \
+ xf86-input-keyboard"
+# Only has DVI connector for external screen, name is changing to MACHINE_GUI_CLASS
+GUI_MACHINE_CLASS = "bigscreen"
+MACHINE_GUI_CLASS = "bigscreen"
+
+PREFERRED_PROVIDER_lxde-icon-theme_colibri-t20 = "lxde-icon-theme"
+PREFERRED_PROVIDER_lxsession-lite_colibri-t20 = "lxsession"
+PREFERRED_PROVIDER_gdbserver_colibri-t20 = "gdbserver"
+#PREFERRED_PROVIDER_libgobject-2.0_colibri-t20 = "glib-2.0"
+#PREFERRED_PROVIDER_libgmodule-2.0_colibri-t20 = "glib-2.0"
+#PREFERRED_PROVIDER_libgthread-2.0_colibri-t20 = "glib-2.0"
+#PREFERRED_PROVIDER_libgio-2.0_colibri-t20 = "glib-2.0"
+#PREFERRED_VERSION_libgobject-2.0_colibri-t20 = "2.30.1"
+#PREFERRED_VERSION_libgmodule-2.0_colibri-t20 = "2.30.1"
+#PREFERRED_VERSION_libgthread-2.0_colibri-t20 = "2.30.1"
+#PREFERRED_VERSION_libgio-2.0_colibri-t20 = "2.30.1"
+
+#PREFERRED_VERSION_samba_colibri-t20 = "3.6.1"
+#PREFERRED_VERSION_glib-2.0_colibri-t20 = "2.30.1"
+#PREFERRED_VERSION_glib-2.0-native_colibri-t20 = "2.30.1"
+#PREFERRED_VERSION_gtk+_colibri-t20 = "2.24.8"
+#PREFERRED_VERSION_gtk+-native_colibri-t20 = "2.24.8"
+#PREFERRED_VERSION_pango_colibri-t20 = "1.29.4"
+#PREFERRED_VERSION_pango-native_colibri-t20 = "1.29.4"
+
+#ANGSTROM_GCC_VERSION_colibri-t20 = "4.4.4"
+#fix for csl 4.4.1 toolchain not beeing recent enough
+#PREFERRED_VERSION_eglibc ?= "2.10"
+#PREFERRED_VERSION_eglibc-initial ?= "2.10"
+
+MACHINE_FEATURES = "kernel26 screen apm usbgadget usbhost vfat ext2 alsa"
+EXTRA_IMAGEDEPENDS += "u-boot"
+
+# used by sysvinit_2
+SERIAL_CONSOLE = "115200 ttyS0"
+#IMAGE_FSTYPES ?= "yaffs2"
+
+# T20 does not have neon
+DEFAULTTUNE = "cortexa9"
+require conf/machine/include/tune-cortexa9.inc
diff --git a/conf/machine/colibri-t30.conf~ b/conf/machine/colibri-t30.conf~
new file mode 100644
index 0000000..7a1f7ad
--- /dev/null
+++ b/conf/machine/colibri-t30.conf~
@@ -0,0 +1,61 @@
+#@TYPE: Machine
+#@NAME: colibri_t30
+#@DESCRIPTION: Toradex Colibri T30
+
+TARGET_ARCH = "arm"
+
+PREFERRED_PROVIDER_virtual/kernel = "linux-colibri-t30"
+#PREFERRED_VERSION_linux = ""
+
+KERNEL_IMAGETYPE = "uImage"
+#UBOOT_MACHINE = "harmony_config"
+#UBOOT_MACHINE = "waluigi_config"
+#UBOOT_MACHINE = "cardhu_config"
+UBOOT_MACHINE = "colibri_t30_config"
+UBOOT_ENTRYPOINT = 0x00008000
+#PREFERRED_VERSION_u-boot = "2010.06"
+
+PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
+XSERVER = "xserver-xorg \
+ xf86-input-evdev \
+ xf86-input-mouse \
+ xf86-video-fbdev \
+ xf86-input-keyboard"
+# Only has DVI connector for external screen, name is changing to MACHINE_GUI_CLASS
+GUI_MACHINE_CLASS = "bigscreen"
+MACHINE_GUI_CLASS = "bigscreen"
+
+PREFERRED_PROVIDER_lxde-icon-theme_colibri-t30 = "lxde-icon-theme"
+PREFERRED_PROVIDER_lxsession-lite_colibri-t30 = "lxsession"
+PREFERRED_PROVIDER_gdbserver_colibri-t30 = "gdbserver"
+PREFERRED_PROVIDER_libgobject-2.0_colibri-t30 = "glib-2.0"
+PREFERRED_PROVIDER_libgmodule-2.0_colibri-t30 = "glib-2.0"
+PREFERRED_PROVIDER_libgthread-2.0_colibri-t30 = "glib-2.0"
+PREFERRED_PROVIDER_libgio-2.0_colibri-t30 = "glib-2.0"
+PREFERRED_VERSION_libgobject-2.0_colibri-t30 = "2.30.1"
+PREFERRED_VERSION_libgmodule-2.0_colibri-t30 = "2.30.1"
+PREFERRED_VERSION_libgthread-2.0_colibri-t30 = "2.30.1"
+PREFERRED_VERSION_libgio-2.0_colibri-t30 = "2.30.1"
+
+PREFERRED_VERSION_samba_colibri-t30 = "3.6.1"
+PREFERRED_VERSION_glib-2.0_colibri-t30 = "2.30.1"
+PREFERRED_VERSION_glib-2.0-native_colibri-t30 = "2.30.1"
+PREFERRED_VERSION_gtk+_colibri-t30 = "2.24.8"
+PREFERRED_VERSION_gtk+-native_colibri-t30 = "2.24.8"
+PREFERRED_VERSION_pango_colibri-t30 = "1.29.4"
+PREFERRED_VERSION_pango-native_colibri-t30 = "1.29.4"
+
+#ANGSTROM_GCC_VERSION_colibri-t30 = "4.4.4"
+
+#fix for csl 4.4.1 toolchain not beeing recent enough
+#PREFERRED_VERSION_eglibc ?= "2.10"
+#PREFERRED_VERSION_eglibc-initial ?= "2.10"
+
+MACHINE_FEATURES = "kernel26 screen apm usbgadget usbhost vfat ext2 alsa"
+EXTRA_IMAGEDEPENDS += "u-boot"
+
+# used by sysvinit_2
+SERIAL_CONSOLE = "115200 ttyS0"
+#IMAGE_FSTYPES ?= "yaffs2"
+
+require conf/machine/include/tune-cortexa9tegra.inc
diff --git a/recipes-bsp/u-boot/u-boot-git/bootaddr.patch b/recipes-bsp/u-boot/u-boot-git/bootaddr.patch
new file mode 100644
index 0000000..d452b61
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-git/bootaddr.patch
@@ -0,0 +1,12 @@
+diff -Naur git.old/include/configs/tegra3-common.h git/include/configs/tegra3-common.h
+--- git.old/include/configs/tegra3-common.h 2012-01-29 22:40:43.240684735 +0100
++++ git/include/configs/tegra3-common.h 2012-01-29 22:49:00.330204308 +0100
+@@ -323,7 +323,7 @@
+ */
+
+ /* Below should be (NV_PA_SDRAM_BASE + 0x00E08000), but ld errors out */
+-#define CONFIG_SYS_TEXT_BASE 0x80E08000
++#define CONFIG_SYS_TEXT_BASE 0x80108000
+ #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
+
+ #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_STACKBASE
diff --git a/recipes-bsp/u-boot/u-boot-git/colibri_t30.patch b/recipes-bsp/u-boot/u-boot-git/colibri_t30.patch
new file mode 100644
index 0000000..485a28f
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-git/colibri_t30.patch
@@ -0,0 +1,220 @@
+diff -Naur git/board/nvidia/cardhu/pinmux-config-common.h git.old/board/nvidia/cardhu/pinmux-config-common.h
+--- git/board/nvidia/cardhu/pinmux-config-common.h 2012-01-28 12:16:26.000000000 +0100
++++ git.old/board/nvidia/cardhu/pinmux-config-common.h 2012-01-28 18:56:06.939970059 +0100
+@@ -174,20 +174,21 @@
+ DEFAULT_PINMUX(LCD_DC1, DISPLAYA, NORMAL, NORMAL, INPUT),
+ DEFAULT_PINMUX(CRT_HSYNC, CRT, NORMAL, NORMAL, OUTPUT),
+ DEFAULT_PINMUX(CRT_VSYNC, CRT, NORMAL, NORMAL, OUTPUT),
+- LV_PINMUX(VI_D0, RSVD1, NORMAL, NORMAL, INPUT, DISABLE, DISABLE),
+- LV_PINMUX(VI_D1, SDMMC2, NORMAL, NORMAL, INPUT, DISABLE, DISABLE),
+- LV_PINMUX(VI_D2, SDMMC2, NORMAL, NORMAL, INPUT, DISABLE, DISABLE),
+- LV_PINMUX(VI_D3, SDMMC2, NORMAL, NORMAL, INPUT, DISABLE, DISABLE),
++ LV_PINMUX(VI_D0, VI, NORMAL, NORMAL, INPUT, DISABLE, DISABLE),
++ LV_PINMUX(VI_D1, VI, NORMAL, NORMAL, INPUT, DISABLE, DISABLE),
++ LV_PINMUX(VI_D2, VI, NORMAL, NORMAL, INPUT, DISABLE, DISABLE),
++ LV_PINMUX(VI_D3, VI, NORMAL, NORMAL, INPUT, DISABLE, DISABLE),
+ LV_PINMUX(VI_D4, VI, NORMAL, NORMAL, OUTPUT, DISABLE, DISABLE),
+- LV_PINMUX(VI_D5, SDMMC2, NORMAL, NORMAL, INPUT, DISABLE, DISABLE),
+- LV_PINMUX(VI_D7, SDMMC2, NORMAL, NORMAL, INPUT, DISABLE, DISABLE),
+- LV_PINMUX(VI_D10, RSVD1, NORMAL, NORMAL, INPUT, DISABLE, DISABLE),
+- LV_PINMUX(VI_MCLK, VI, UP, NORMAL, INPUT, DISABLE, DISABLE),
++ LV_PINMUX(VI_D5, VI, NORMAL, NORMAL, INPUT, DISABLE, DISABLE),
++ LV_PINMUX(VI_D7, VI, NORMAL, NORMAL, INPUT, DISABLE, DISABLE),
++ LV_PINMUX(VI_D10, VI, NORMAL, NORMAL, INPUT, DISABLE, DISABLE),
++ /* Enable MIC_GND, Pulldown, so this is switched off by default*/
++ LV_PINMUX(VI_MCLK, RSVD1, DOWN, NORMAL, INPUT, DISABLE, DISABLE),
+ DEFAULT_PINMUX(UART2_RXD, IRDA, NORMAL, NORMAL, INPUT),
+ DEFAULT_PINMUX(UART2_TXD, IRDA, NORMAL, NORMAL, OUTPUT),
+ DEFAULT_PINMUX(UART2_RTS_N, UARTB, NORMAL, NORMAL, OUTPUT),
+ DEFAULT_PINMUX(UART2_CTS_N, UARTB, NORMAL, NORMAL, INPUT),
+- DEFAULT_PINMUX(UART3_TXD, UARTC, NORMAL, NORMAL, OUTPUT),
++ DEFAULT_PINMUX(UART3_TXD, UARTC, NORMAL, NORMAL, OUTPUT),
+ DEFAULT_PINMUX(UART3_RXD, UARTC, NORMAL, NORMAL, INPUT),
+ DEFAULT_PINMUX(UART3_CTS_N, UARTC, NORMAL, NORMAL, INPUT),
+ DEFAULT_PINMUX(UART3_RTS_N, UARTC, NORMAL, NORMAL, OUTPUT),
+@@ -205,13 +206,13 @@
+ DEFAULT_PINMUX(CLK3_OUT, EXTPERIPH3, NORMAL, NORMAL, OUTPUT),
+ DEFAULT_PINMUX(CLK3_REQ, DEV3, NORMAL, NORMAL, INPUT),
+ DEFAULT_PINMUX(GMI_WP_N, GMI, NORMAL, NORMAL, INPUT),
+- DEFAULT_PINMUX(GMI_CS2_N, RSVD1, UP, NORMAL, INPUT), /* EN_VDD_BL1 */
++ DEFAULT_PINMUX(GMI_CS2_N, NAND, UP, NORMAL, INPUT), /* EN_VDD_BL1 */
+ DEFAULT_PINMUX(GMI_AD8, PWM0, NORMAL, NORMAL, OUTPUT), /* LCD1_BL_PWM */
+- DEFAULT_PINMUX(GMI_AD10, NAND, NORMAL, NORMAL, OUTPUT), /* LCD1_BL_EN */
+- DEFAULT_PINMUX(GMI_A16, SPI4, NORMAL, NORMAL, INPUT),
+- DEFAULT_PINMUX(GMI_A17, SPI4, NORMAL, NORMAL, INPUT),
+- DEFAULT_PINMUX(GMI_A18, SPI4, NORMAL, NORMAL, INPUT),
+- DEFAULT_PINMUX(GMI_A19, SPI4, NORMAL, NORMAL, INPUT),
++ DEFAULT_PINMUX(GMI_AD10, PWM2, NORMAL, NORMAL, OUTPUT), /* LCD1_BL_EN */
++ DEFAULT_PINMUX(GMI_A16, UARTD, NORMAL, NORMAL, OUTPUT),
++ DEFAULT_PINMUX(GMI_A17, UARTD, NORMAL, NORMAL, INPUT),
++ DEFAULT_PINMUX(GMI_A18, UARTD, NORMAL, NORMAL, INPUT),
++ DEFAULT_PINMUX(GMI_A19, UARTD, NORMAL, NORMAL, INPUT),
+ DEFAULT_PINMUX(CAM_MCLK, VI_ALT2, UP, NORMAL, INPUT),
+ DEFAULT_PINMUX(GPIO_PCC1, RSVD1, NORMAL, NORMAL, INPUT),
+ DEFAULT_PINMUX(GPIO_PBB0, RSVD1, NORMAL, NORMAL, INPUT),
+@@ -256,13 +257,9 @@
+ DEFAULT_PINMUX(DAP1_DIN, I2S0, NORMAL, NORMAL, INPUT),
+ DEFAULT_PINMUX(DAP1_DOUT, I2S0, NORMAL, NORMAL, INPUT),
+ DEFAULT_PINMUX(DAP1_SCLK, I2S0, NORMAL, NORMAL, INPUT),
+- DEFAULT_PINMUX(CLK1_REQ, DAP, NORMAL, NORMAL, INPUT),
+- DEFAULT_PINMUX(CLK1_OUT, EXTPERIPH1, NORMAL, NORMAL, INPUT),
+-#ifdef CONFIG_SND_HDA_CODEC_REALTEK
+- DEFAULT_PINMUX(SPDIF_IN, DAP2, DOWN, NORMAL, INPUT),
+-#else
++ DEFAULT_PINMUX(CLK1_REQ, DAP, UP, NORMAL, INPUT),
++ DEFAULT_PINMUX(CLK1_OUT, EXTPERIPH1, NORMAL, NORMAL, OUTPUT),
+ DEFAULT_PINMUX(SPDIF_IN, SPDIF, NORMAL, NORMAL, INPUT),
+-#endif
+ DEFAULT_PINMUX(SPDIF_OUT, SPDIF, NORMAL, NORMAL, OUTPUT),
+ #ifdef CONFIG_SND_HDA_CODEC_REALTEK
+ DEFAULT_PINMUX(DAP2_FS, HDA, DOWN, NORMAL, INPUT),
+@@ -280,9 +277,13 @@
+ DEFAULT_PINMUX(SPI1_SCK, SPI1, NORMAL, NORMAL, INPUT),
+ DEFAULT_PINMUX(SPI1_CS0_N, SPI1, NORMAL, NORMAL, INPUT),
+ DEFAULT_PINMUX(SPI1_MISO, SPI1, NORMAL, NORMAL, INPUT),
+- DEFAULT_PINMUX(PEX_L0_PRSNT_N, PCIE, NORMAL, NORMAL, INPUT),
++ /* ASIX RESET in */
++ DEFAULT_PINMUX(PEX_L0_PRSNT_N, PCIE, UP, NORMAL, INPUT),
++ /* ASIX wakeup */
+ DEFAULT_PINMUX(PEX_L0_RST_N, PCIE, NORMAL, NORMAL, OUTPUT),
+- DEFAULT_PINMUX(PEX_L0_CLKREQ_N, PCIE, NORMAL, NORMAL, INPUT),
++ /* ASIX VBUS in */
++ DEFAULT_PINMUX(PEX_L0_CLKREQ_N, PCIE, UP, NORMAL, INPUT),
++ /* ASIX PME in */
+ DEFAULT_PINMUX(PEX_WAKE_N, PCIE, NORMAL, NORMAL, INPUT),
+ DEFAULT_PINMUX(PEX_L1_PRSNT_N, PCIE, NORMAL, NORMAL, INPUT),
+ DEFAULT_PINMUX(PEX_L1_RST_N, PCIE, NORMAL, NORMAL, OUTPUT),
+@@ -294,10 +295,9 @@
+ DEFAULT_PINMUX(HDMI_INT, RSVD0, NORMAL, TRISTATE, INPUT),
+
+ /* Gpios */
+- /* SDMMC1 CD gpio */
+- DEFAULT_PINMUX(GMI_IORDY, RSVD1, UP, NORMAL, INPUT),
++ DEFAULT_PINMUX(GMI_IORDY, NAND, UP, NORMAL, INPUT),
+ /* SDMMC1 WP gpio */
+- LV_PINMUX(VI_D11, RSVD1, UP, NORMAL, INPUT, DISABLE, DISABLE),
++ LV_PINMUX(VI_D11, VI, NORMAL, NORMAL, INPUT, DISABLE, DISABLE),
+
+ /* Touch RESET */
+ DEFAULT_PINMUX(GMI_AD14, NAND, NORMAL, NORMAL, OUTPUT),
+@@ -310,11 +310,11 @@
+ DEFAULT_PINMUX(SDMMC3_DAT4, SDMMC3, UP, NORMAL, INPUT),
+
+ LV_PINMUX(VI_D6, VI, NORMAL, NORMAL, OUTPUT, DISABLE, DISABLE),
+- LV_PINMUX(VI_D8, SDMMC2, NORMAL, NORMAL, INPUT, DISABLE, DISABLE),
+- LV_PINMUX(VI_D9, SDMMC2, NORMAL, NORMAL, INPUT, DISABLE, DISABLE),
+- LV_PINMUX(VI_PCLK, RSVD1, UP, TRISTATE, INPUT, DISABLE, DISABLE),
+- LV_PINMUX(VI_HSYNC, RSVD1, NORMAL, NORMAL, INPUT, DISABLE, DISABLE),
+- LV_PINMUX(VI_VSYNC, RSVD1, NORMAL, NORMAL, INPUT, DISABLE, DISABLE),
++ LV_PINMUX(VI_D8, VI, NORMAL, NORMAL, INPUT, DISABLE, DISABLE),
++ LV_PINMUX(VI_D9, VI, NORMAL, NORMAL, INPUT, DISABLE, DISABLE),
++ LV_PINMUX(VI_PCLK, VI, UP, TRISTATE, INPUT, DISABLE, DISABLE),
++ LV_PINMUX(VI_HSYNC, VI, NORMAL, NORMAL, INPUT, DISABLE, DISABLE),
++ LV_PINMUX(VI_VSYNC, VI, NORMAL, NORMAL, INPUT, DISABLE, DISABLE),
+ };
+
+ #if 0 // jz
+@@ -358,21 +358,21 @@
+
+ static struct pingroup_config unused_pins_lowpower[] = {
+ DEFAULT_PINMUX(GMI_CS0_N, NAND, UP, TRISTATE, OUTPUT),
+- DEFAULT_PINMUX(GMI_CS3_N, NAND, UP, TRISTATE, OUTPUT),
+- DEFAULT_PINMUX(GMI_CS4_N, NAND, UP, TRISTATE, OUTPUT),
++ DEFAULT_PINMUX(GMI_CS3_N, NAND, NORMAL, NORMAL, OUTPUT),
++ DEFAULT_PINMUX(GMI_CS4_N, NAND, NORMAL, NORMAL, OUTPUT),
+ DEFAULT_PINMUX(GMI_CS7_N, NAND, UP, NORMAL, INPUT),
+- DEFAULT_PINMUX(GMI_AD0, NAND, NORMAL, TRISTATE, INPUT),
+- DEFAULT_PINMUX(GMI_AD1, NAND, NORMAL, TRISTATE, INPUT),
+- DEFAULT_PINMUX(GMI_AD2, NAND, NORMAL, TRISTATE, INPUT),
+- DEFAULT_PINMUX(GMI_AD3, NAND, NORMAL, TRISTATE, INPUT),
+- DEFAULT_PINMUX(GMI_AD4, NAND, NORMAL, TRISTATE, INPUT),
+- DEFAULT_PINMUX(GMI_AD5, NAND, NORMAL, TRISTATE, INPUT),
+- DEFAULT_PINMUX(GMI_AD6, NAND, NORMAL, TRISTATE, INPUT),
+- DEFAULT_PINMUX(GMI_AD7, NAND, NORMAL, TRISTATE, INPUT),
++ DEFAULT_PINMUX(GMI_AD0, NAND, NORMAL, NORMAL, INPUT),
++ DEFAULT_PINMUX(GMI_AD1, NAND, NORMAL, NORMAL, INPUT),
++ DEFAULT_PINMUX(GMI_AD2, NAND, NORMAL, NORMAL, INPUT),
++ DEFAULT_PINMUX(GMI_AD3, NAND, NORMAL, NORMAL, INPUT),
++ DEFAULT_PINMUX(GMI_AD4, NAND, NORMAL, NORMAL, INPUT),
++ DEFAULT_PINMUX(GMI_AD5, NAND, NORMAL, NORMAL, INPUT),
++ DEFAULT_PINMUX(GMI_AD6, NAND, NORMAL, NORMAL, INPUT),
++ DEFAULT_PINMUX(GMI_AD7, NAND, NORMAL, NORMAL, INPUT),
+ DEFAULT_PINMUX(GMI_AD9, PWM1, NORMAL, TRISTATE, OUTPUT),
+ DEFAULT_PINMUX(GMI_AD11, NAND, NORMAL, TRISTATE, OUTPUT),
+ DEFAULT_PINMUX(GMI_AD13, NAND, UP, NORMAL, INPUT),
+- DEFAULT_PINMUX(GMI_WR_N, NAND, NORMAL, TRISTATE, OUTPUT),
++ DEFAULT_PINMUX(GMI_WR_N, NAND, NORMAL, NORMAL, OUTPUT),
+ };
+
+ #endif /* PINMUX_CONFIG_COMMON_H */
+diff -Naur git/board/nvidia/cardhu/tegra3-cardhu.dts git.old/board/nvidia/cardhu/tegra3-cardhu.dts
+--- git/board/nvidia/cardhu/tegra3-cardhu.dts 2012-01-28 12:16:26.000000000 +0100
++++ git.old/board/nvidia/cardhu/tegra3-cardhu.dts 2012-01-28 16:52:31.660622281 +0100
+@@ -14,12 +14,17 @@
+ };
+
+ aliases {
++ /* UART A = UART1 */
+ console = "/serial@70006000";
+ usb0 = "/usb@0x7d008000";
+ usb1 = "/usb@0x7d000000";
+
++ /* SDMMC-4 */
+ sdmmc0 = "/sdhci@78000600";
+- sdmmc1 = "/sdhci@78000000";
++ /* SDMMC-1 */
++ /* sdmmc1 = "/sdhci@78000000";*/
++ /* SDMMC-2 */
++ sdmmc1 = "/sdhci@78000200";
+ };
+
+ chosen {
+@@ -40,19 +45,19 @@
+ clock-frequency = <408000000>;
+ };
+
+- sdhci@78000000 {
++ sdhci@78000200 {
+ status = "ok";
+ width = <4>; /* width of SDIO port */
+ removable = <1>;
+ /* Parameter 3 bit 0:1=output, 0=input; bit 1:1=high, 0=low */
+- cd-gpio = <&gpio 69 0>; /* card detect, gpio PI5 */
+- wp-gpio = <&gpio 155 0>; /* write protect, gpio PT3 */
+- power-gpio = <&gpio 31 3>; /* power enable, gpio PD7 */
++ /* cd-gpio = <&gpio 69 0>; *//* card detect, gpio PI5 */
++ /*wp-gpio = <&gpio 155 0>; *//* write protect, gpio PT3 */
++ /*power-gpio = <&gpio 31 3>;*/ /* power enable, gpio PD7 */
+ };
+
+ sdhci@78000600 {
+ status = "ok";
+- width = <4>; /* width of SDIO port */
++ width = <8>; /* width of SDIO port */
+ removable = <0>;
+ };
+
+@@ -61,7 +66,7 @@
+ width = <1366>;
+ height = <768>;
+ bits_per_pixel = <16>;
+- pwfm = <&pwfm0>;
++ /*pwfm = <&pwfm0>;*/
+ display = <&display1>;
+ frame-buffer = <0x1C022000>;
+
+@@ -72,10 +77,10 @@
+ vert_timing = <12 5 20 25>;
+
+ /* Parameter 3 bit 0:1=output, 0=input; bit 1:1=high, 0=low */
+- gpios = <&gpio 56 3>, /* PH0, LCD1_BL_PWM */
+- <&gpio 58 3>, /* PH2, LCD1_BL_EN */
+- <&gpio 90 3>, /* PL2, LVDS1_SHTDN */
+- <&gpio 92 3>; /* PL4, EN_VDD_PNL1 */
++ /*gpios = <&gpio 56 3>,*/ /* PH0, LCD1_BL_PWM */
++ /*<&gpio 58 3>,*/ /* PH2, LCD1_BL_EN */
++ /*<&gpio 90 3>,*/ /* PL2, LVDS1_SHTDN */
++ /*<&gpio 92 3>;*/ /* PL4, EN_VDD_PNL1 */
+ };
+
+ usb@0x7d000000 {
diff --git a/recipes-bsp/u-boot/u-boot-git/remove-overlay.patch b/recipes-bsp/u-boot/u-boot-git/remove-overlay.patch
new file mode 100644
index 0000000..dfd9ba3
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-git/remove-overlay.patch
@@ -0,0 +1,11 @@
+--- git/arch/arm/cpu/armv7/u-boot.lds 2012-06-02 21:16:34.000000000 +0200
++++ x
+@@ -68,7 +68,7 @@
+
+ _end = .;
+
+- .bss __rel_dyn_start (OVERLAY) : {
++ .bss __rel_dyn_start : {
+ __bss_start = .;
+ *(.bss)
+ . = ALIGN(4);
diff --git a/recipes-bsp/u-boot/u-boot-git/remove-unused.patch b/recipes-bsp/u-boot/u-boot-git/remove-unused.patch
new file mode 100644
index 0000000..92e933f
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-git/remove-unused.patch
@@ -0,0 +1,104 @@
+diff -urNdb u-boot/arch/arm/cpu/armv7/tegra-common/board.c u-boot.new/arch/arm/cpu/armv7/tegra-common/board.c
+--- u-boot/arch/arm/cpu/armv7/tegra-common/board.c 2011-12-15 17:28:52.000000000 +0100
++++ u-boot.new/arch/arm/cpu/armv7/tegra-common/board.c 2011-12-20 15:05:10.603876354 +0100
+@@ -41,6 +41,7 @@
+ u32 reg;
+
+ reg = readl(&pmc->pmc_scratch20);
++ (void) reg;
+ debug("pmc->pmc_scratch20 (ODMData) = 0x%08X\n", reg);
+
+ //Colibri T20 does not use OdmData
+diff -urNdb u-boot/common/cmd_mtdparts.c u-boot.new/common/cmd_mtdparts.c
+--- u-boot/common/cmd_mtdparts.c 2011-12-06 17:10:16.000000000 +0100
++++ u-boot.new/common/cmd_mtdparts.c 2011-12-20 15:12:07.454221888 +0100
+@@ -871,9 +871,12 @@
+ debug("dev type = %d (%s), dev num = %d, mtd-id = %s\n",
+ id->type, MTD_DEV_TYPE(id->type),
+ id->num, id->mtd_id);
++#ifdef DEBUG
+ pend = strchr(p, ';');
+ debug("parsing partitions %.*s\n", (pend ? pend - p : strlen(p)), p);
+-
++#else
++ (void)pend;
++#endif
+
+ /* parse partitions */
+ num_parts = 0;
+diff -urNdb u-boot/common/cmd_ubi.c u-boot.new/common/cmd_ubi.c
+--- u-boot/common/cmd_ubi.c 2011-12-06 17:10:16.000000000 +0100
++++ u-boot.new/common/cmd_ubi.c 2011-12-20 15:14:57.464387590 +0100
+@@ -316,7 +316,6 @@
+ static int ubi_volume_read(char *volume, char *buf, size_t size)
+ {
+ int err, lnum, off, len, tbuf_size;
+- size_t count_save = size;
+ void *tbuf;
+ unsigned long long tmp;
+ struct ubi_volume *vol;
+@@ -347,7 +346,7 @@
+ if (vol->corrupted)
+ printf("read from corrupted volume %d", vol->vol_id);
+ if (offp + size > vol->used_bytes)
+- count_save = size = vol->used_bytes - offp;
++ size = vol->used_bytes - offp;
+
+ tbuf_size = vol->usable_leb_size;
+ if (size < tbuf_size)
+diff -urNdb u-boot/drivers/mtd/ubi/vmt.c u-boot.new/drivers/mtd/ubi/vmt.c
+--- u-boot/drivers/mtd/ubi/vmt.c 2011-12-06 17:10:16.000000000 +0100
++++ u-boot.new/drivers/mtd/ubi/vmt.c 2011-12-20 15:16:48.334522354 +0100
+@@ -684,6 +684,7 @@
+
+ ubi->volumes[vol->vol_id] = NULL;
+ err = ubi_destroy_gluebi(vol);
++ (void) err;
+ cdev_del(&vol->cdev);
+ volume_sysfs_close(vol);
+ }
+diff -urNdb u-boot/drivers/usb/eth/asix.c u-boot.new/drivers/usb/eth/asix.c
+--- u-boot/drivers/usb/eth/asix.c 2011-12-15 17:28:52.000000000 +0100
++++ u-boot.new/drivers/usb/eth/asix.c 2011-12-20 15:22:59.254665754 +0100
+@@ -364,6 +364,8 @@
+
+ rx_ctl = asix_read_rx_ctl(dev);
+ debug("RX_CTL is 0x%04x after software reset\n", rx_ctl);
++ (void)rx_ctl;
++
+ if (asix_write_rx_ctl(dev, 0x0000) < 0)
+ goto out_err;
+
+diff -urNdb u-boot/fs/jffs2/jffs2_1pass.c u-boot.new/fs/jffs2/jffs2_1pass.c
+--- u-boot/fs/jffs2/jffs2_1pass.c 2011-12-06 17:10:01.000000000 +0100
++++ u-boot.new/fs/jffs2/jffs2_1pass.c 2011-12-20 15:40:45.114614263 +0100
+@@ -813,6 +813,7 @@
+ #if 0
+ putLabeledWord("read_inode: returning = ", totalSize);
+ #endif
++ (void) ret;
+ return totalSize;
+ }
+
+@@ -1575,9 +1576,8 @@
+
+ if (*(uint32_t *)(&buf[ofs-buf_ofs]) == 0xffffffff) {
+ uint32_t inbuf_ofs;
+- uint32_t empty_start, scan_end;
++ uint32_t scan_end;
+
+- empty_start = ofs;
+ ofs += 4;
+ scan_end = min_t(uint32_t, EMPTY_SCAN_SIZE(
+ part->sector_size)/8,
+diff -urNdb u-boot/lib/lzo/lzo1x_decompress.c u-boot.new/lib/lzo/lzo1x_decompress.c
+--- u-boot/lib/lzo/lzo1x_decompress.c 2011-12-06 17:10:00.000000000 +0100
++++ u-boot.new/lib/lzo/lzo1x_decompress.c 2011-12-20 15:42:36.064554125 +0100
+@@ -48,6 +48,7 @@
+ src += 7;
+ if (version >= 0x0940)
+ level = *src++;
++ (void) level;
+ if (get_unaligned_be32(src) & HEADER_HAS_FILTER)
+ src += 4; /* filter info */
+
diff --git a/recipes-bsp/u-boot/u-boot-git/tegra2-nand-warning.patch b/recipes-bsp/u-boot/u-boot-git/tegra2-nand-warning.patch
new file mode 100644
index 0000000..ad039ca
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-git/tegra2-nand-warning.patch
@@ -0,0 +1,12 @@
+--- /home/tegradev/oe/output/work/colibri-t20-angstrom-linux-gnueabi/u-boot-git-r80/git/board/toradex/common/tegra2_nand.c~ 2012-01-17 11:09:37.000000000 +0100
++++ /home/tegradev/oe/output/work/colibri-t20-angstrom-linux-gnueabi/u-boot-git-r80/git/board/toradex/common/tegra2_nand.c 2012-01-18 20:06:36.439745214 +0100
+@@ -954,7 +954,8 @@
+ tmp_id = nand_read_byte(&tmp_mtd);
+ tmp_3rd = nand_read_byte(&tmp_mtd);
+ tmp_4th = nand_read_byte(&tmp_mtd);
+-
++ (void)tmp_3rd;
++
+ sprintf(compat, "%02X,%02X,%02X", tmp_manf, tmp_id, tmp_4th);
+ node = fdt_node_offset_by_compatible(gd->blob, 0, compat);
+ if (node < 0) {
diff --git a/recipes-bsp/u-boot/u-boot-git/u-boot-board-unused.patch b/recipes-bsp/u-boot/u-boot-git/u-boot-board-unused.patch
new file mode 100644
index 0000000..98a33a9
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-git/u-boot-board-unused.patch
@@ -0,0 +1,62 @@
+--- git/board/toradex/common/board.c 2012-06-02 21:16:34.000000000 +0200
++++ git/board/toradex/common/board.c 2012-06-02 22:27:51.000000000 +0200
+@@ -146,14 +146,21 @@
+ #error "tegra: We need CONFIG_TEGRA_PMU to support CONFIG_TEGRA_CLOCK_SCALING"
+ #endif
+
++#define GENERATE_FUSE_DEV_INFO 0
+ static TrdxBootDevice board_get_current_bootdev(void)
+ {
+- unsigned reg, reg1, reg2;
++ unsigned reg;
++#if GENERATE_FUSE_DEV_INFO
++ unsigned reg1 = 0;
++ unsigned reg2;
++#endif
+ unsigned strap_select;
+ unsigned skip_strap;
+ unsigned fuse_select;
++#if GENERATE_FUSE_DEV_INFO
+ unsigned fuse_device_info;
+ unsigned sdmmc_instance;
++#endif
+ TrdxBootDevice boot_device;
+
+ //get the latched strap pins, bit [26:29]
+@@ -187,15 +194,12 @@
+
+ clock_disable(PERIPH_ID_FUSE);
+ #else
+- (void)reg2;
+ #ifdef CONFIG_TEGRA3
+ //simulate a T30 fuse setting
+ reg = NvBootFuseBootDevice_Sdmmc;
+- reg1 = 0;
+ #else
+ //simulate a T20 fuse setting
+ reg = NvBootFuseBootDevice_NandFlash;
+- reg1 = 0;
+ #endif
+ #endif
+ //get the fuse 'SKIP_DEV_SEL_STRAPS', bit 3
+@@ -207,8 +211,10 @@
+ {
+ printf("Using fuses, %u\n", fuse_select);
+ //getting fuse device info and sdmmc instance, bit 7 of fuse_device info
++#if GENERATE_FUSE_DEV_INFO
+ fuse_device_info = reg1 & 0x3fff;
+ sdmmc_instance = ((reg1 & 0x80)==0x80) ? 2 : 3;
++#endif
+ switch(fuse_select)
+ {
+ case NvBootFuseBootDevice_Sdmmc:
+@@ -225,7 +231,9 @@
+ else
+ {
+ /* printf("Using straps, %u\n", strap_select);*/
++#if GENERATE_FUSE_DEV_INFO
+ sdmmc_instance = 3;
++#endif
+ switch(strap_select)
+ {
+ case NvStrapDevSel_Emmc_Primary_x4:
diff --git a/recipes-bsp/u-boot/u-boot-git/u-boot-userspacetools.patch b/recipes-bsp/u-boot/u-boot-git/u-boot-userspacetools.patch
new file mode 100644
index 0000000..6e7a3e9
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-git/u-boot-userspacetools.patch
@@ -0,0 +1,12 @@
+diff -urNdb u-boot-git.old//tools/env/Makefile u-boot-git//tools/env/Makefile
+--- u-boot-git.old//tools/env/Makefile 2011-11-19 18:17:17.000000000 +0100
++++ u-boot-git//tools/env/Makefile 2011-11-19 18:15:22.000000000 +0100
+@@ -28,6 +28,8 @@
+
+ CPPFLAGS := -Wall -DUSE_HOSTCC -I$(SRCTREE)/include
+
++CPPFLAGS += -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16 -mfloat-abi=soft -mthumb-interwork -mno-thumb
++
+ ifeq ($(MTD_VERSION),old)
+ CPPFLAGS += -DMTD_OLD
+ endif
diff --git a/recipes-bsp/u-boot/u-boot-git/u-boot-warning.patch b/recipes-bsp/u-boot/u-boot-git/u-boot-warning.patch
new file mode 100644
index 0000000..2552464
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-git/u-boot-warning.patch
@@ -0,0 +1,272 @@
+#--- git/include/common.h~ 2012-05-31 21:57:20.000000000 +0200
+#+++ git/include/common.h 2012-05-31 21:57:43.000000000 +0200
+@@ -1,3 +1,6 @@
++#pragma GCC diagnostic warning "-Wunused-but-set-variable"
++#pragma GCC diagnostic warning "-Wmaybe-uninitialized"
++#pragma GCC diagnostic warning "-Wstrict-aliasing"
+ /*
+ * (C) Copyright 2000-2009
+ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+diff -Naur u-boot-r0+gitra86e39a5abbe0a14106bc7ae828fb48a10396a91-r0.orig/git/board/toradex/common/tegra2_nand.c u-boot-r0+gitra86e39a5abbe0a14106bc7ae828fb48a10396a91-r0/git/board/toradex/common/tegra2_nand.c
+--- git/board/toradex/common/tegra2_nand.c 2012-06-01 00:56:03.000000000 +0200
++++ git/board/toradex/common/tegra2_nand.c 2012-06-01 01:03:43.000000000 +0200
+@@ -919,7 +919,7 @@
+ struct nand_info *info = &nand_ctrl;
+ struct fdt_nand *config = &info->config;
+ struct mtd_info tmp_mtd;
+- int tmp_manf, tmp_id, tmp_3rd, tmp_4th;
++ int tmp_manf, tmp_id, /*tmp_3rd,*/ tmp_4th;
+ char compat[8];
+ int node;
+
+@@ -952,7 +952,8 @@
+ /* Read manufacturer and device IDs */
+ tmp_manf = nand_read_byte(&tmp_mtd);
+ tmp_id = nand_read_byte(&tmp_mtd);
+- tmp_3rd = nand_read_byte(&tmp_mtd);
++ /*tmp_3rd = nand_read_byte(&tmp_mtd);
++ (void) tmp_3rd;*/
+ tmp_4th = nand_read_byte(&tmp_mtd);
+
+ sprintf(compat, "%02X,%02X,%02X", tmp_manf, tmp_id, tmp_4th);
+diff -Naur u-boot-r0+gitra86e39a5abbe0a14106bc7ae828fb48a10396a91-r0.orig/git/common/cmd_mtdparts.c u-boot-r0+gitra86e39a5abbe0a14106bc7ae828fb48a10396a91-r0/git/common/cmd_mtdparts.c
+--- git/common/cmd_mtdparts.c 2012-06-01 00:56:04.000000000 +0200
++++ git/common/cmd_mtdparts.c 2012-06-01 01:06:16.000000000 +0200
+@@ -838,7 +838,7 @@
+ struct mtdids *id;
+ const char *mtd_id;
+ unsigned int mtd_id_len;
+- const char *p, *pend;
++ const char *p;
+ LIST_HEAD(tmp_list);
+ struct list_head *entry, *n;
+ u16 num_parts;
+@@ -871,8 +871,7 @@
+ debug("dev type = %d (%s), dev num = %d, mtd-id = %s\n",
+ id->type, MTD_DEV_TYPE(id->type),
+ id->num, id->mtd_id);
+- pend = strchr(p, ';');
+- debug("parsing partitions %.*s\n", (pend ? pend - p : strlen(p)), p);
++ debug("parsing partitions %.*s\n", (strchr(p, ';') ? strchr(p, ';') - p : strlen(p)), p);
+
+
+ /* parse partitions */
+diff -Naur u-boot-r0+gitra86e39a5abbe0a14106bc7ae828fb48a10396a91-r0.orig/git/common/cmd_nand.c u-boot-r0+gitra86e39a5abbe0a14106bc7ae828fb48a10396a91-r0/git/common/cmd_nand.c
+--- git/common/cmd_nand.c 2012-06-01 00:56:04.000000000 +0200
++++ git/common/cmd_nand.c 2012-06-01 01:08:03.000000000 +0200
+@@ -190,7 +190,7 @@
+ loff_t *off, loff_t *size)
+ {
+ int ret;
+- loff_t maxsize;
++ loff_t maxsize=0;
+
+ if (argc == 0) {
+ *off = 0;
+diff -Naur u-boot-r0+gitra86e39a5abbe0a14106bc7ae828fb48a10396a91-r0.orig/git/common/cmd_ubi.c u-boot-r0+gitra86e39a5abbe0a14106bc7ae828fb48a10396a91-r0/git/common/cmd_ubi.c
+--- git/common/cmd_ubi.c 2012-06-01 00:56:04.000000000 +0200
++++ git/common/cmd_ubi.c 2012-06-01 01:09:33.000000000 +0200
+@@ -316,7 +316,6 @@
+ static int ubi_volume_read(char *volume, char *buf, size_t size)
+ {
+ int err, lnum, off, len, tbuf_size;
+- size_t count_save = size;
+ void *tbuf;
+ unsigned long long tmp;
+ struct ubi_volume *vol;
+@@ -347,7 +346,7 @@
+ if (vol->corrupted)
+ printf("read from corrupted volume %d", vol->vol_id);
+ if (offp + size > vol->used_bytes)
+- count_save = size = vol->used_bytes - offp;
++ size = vol->used_bytes - offp;
+
+ tbuf_size = vol->usable_leb_size;
+ if (size < tbuf_size)
+diff -Naur u-boot-r0+gitra86e39a5abbe0a14106bc7ae828fb48a10396a91-r0.orig/git/common/cmd_ximg.c u-boot-r0+gitra86e39a5abbe0a14106bc7ae828fb48a10396a91-r0/git/common/cmd_ximg.c
+--- git/common/cmd_ximg.c 2012-06-01 00:56:04.000000000 +0200
++++ git/common/cmd_ximg.c 2012-06-01 01:15:20.000000000 +0200
+@@ -55,7 +55,7 @@
+ int verify;
+ int part = 0;
+ char pbuf[10];
+- image_header_t *hdr;
++ image_header_t *hdr = NULL;
+ #if defined(CONFIG_FIT)
+ const char *uname = NULL;
+ const void* fit_hdr;
+@@ -238,16 +238,22 @@
+ * space, use slower decompression algorithm
+ * which requires at most 2300 KB of memory.
+ */
+- i = BZ2_bzBuffToBuffDecompress(
+- (char*)ntohl(hdr->ih_load),
+- &unc_len, (char *)data, len,
+- CONFIG_SYS_MALLOC_LEN < (4096 * 1024),
+- 0);
+- if (i != BZ_OK) {
+- printf ("BUNZIP2 ERROR %d - "
+- "image not loaded\n", i);
++ if(hdr == NULL) {
++ printf ("hdr not set\n");
+ return 1;
+ }
++ else {
++ i = BZ2_bzBuffToBuffDecompress(
++ (char*)ntohl(hdr->ih_load),
++ &unc_len, (char *)data, len,
++ CONFIG_SYS_MALLOC_LEN < (4096 * 1024),
++ 0);
++ if (i != BZ_OK) {
++ printf ("BUNZIP2 ERROR %d - "
++ "image not loaded\n", i);
++ return 1;
++ }
++ }
+ }
+ break;
+ #endif /* CONFIG_BZIP2 */
+diff -Naur u-boot-r0+gitra86e39a5abbe0a14106bc7ae828fb48a10396a91-r0.orig/git/drivers/mtd/ubi/vmt.c u-boot-r0+gitra86e39a5abbe0a14106bc7ae828fb48a10396a91-r0/git/drivers/mtd/ubi/vmt.c
+--- git/drivers/mtd/ubi/vmt.c 2012-06-01 00:56:04.000000000 +0200
++++ git/drivers/mtd/ubi/vmt.c 2012-06-01 01:17:21.000000000 +0200
+@@ -678,12 +678,10 @@
+ */
+ void ubi_free_volume(struct ubi_device *ubi, struct ubi_volume *vol)
+ {
+- int err;
+-
+ dbg_msg("free volume %d", vol->vol_id);
+
+ ubi->volumes[vol->vol_id] = NULL;
+- err = ubi_destroy_gluebi(vol);
++ (void)ubi_destroy_gluebi(vol);
+ cdev_del(&vol->cdev);
+ volume_sysfs_close(vol);
+ }
+diff -Naur u-boot-r0+gitra86e39a5abbe0a14106bc7ae828fb48a10396a91-r0.orig/git/drivers/usb/eth/asix.c u-boot-r0+gitra86e39a5abbe0a14106bc7ae828fb48a10396a91-r0/git/drivers/usb/eth/asix.c
+--- git/drivers/usb/eth/asix.c 2012-06-01 00:56:04.000000000 +0200
++++ git/drivers/usb/eth/asix.c 2012-06-01 01:22:07.000000000 +0200
+@@ -326,7 +326,6 @@
+ {
+ int embd_phy;
+ unsigned char buf[ETH_ALEN];
+- u16 rx_ctl;
+ struct ueth_data *dev = (struct ueth_data *)eth->priv;
+ int timeout = 0;
+ char *addr_str, *end;
+@@ -363,13 +362,11 @@
+ goto out_err;
+ }
+
+- rx_ctl = asix_read_rx_ctl(dev);
+- debug("RX_CTL is 0x%04x after software reset\n", rx_ctl);
++ (void) asix_read_rx_ctl(dev);
+ if (asix_write_rx_ctl(dev, 0x0000) < 0)
+ goto out_err;
+
+- rx_ctl = asix_read_rx_ctl(dev);
+- debug("RX_CTL is 0x%04x setting to 0x0000\n", rx_ctl);
++ (void) asix_read_rx_ctl(dev);
+
+ if ((dev->pusb_dev->descriptor.idVendor == 0x0b95) && (dev->pusb_dev->descriptor.idProduct == 0x772b)) {
+ #define AX_CMD_READ_EEPROM 0x0B
+diff -Naur u-boot-r0+gitra86e39a5abbe0a14106bc7ae828fb48a10396a91-r0.orig/git/fs/jffs2/jffs2_1pass.c u-boot-r0+gitra86e39a5abbe0a14106bc7ae828fb48a10396a91-r0/git/fs/jffs2/jffs2_1pass.c
+--- git/fs/jffs2/jffs2_1pass.c 2012-06-01 00:56:04.000000000 +0200
++++ git/fs/jffs2/jffs2_1pass.c 2012-06-01 01:26:48.000000000 +0200
+@@ -696,7 +696,6 @@
+ u32 latestVersion = 0;
+ uchar *lDest;
+ uchar *src;
+- long ret;
+ int i;
+ u32 counter = 0;
+ #ifdef CONFIG_SYS_JFFS2_SORT_FRAGMENTS
+@@ -768,28 +767,23 @@
+ #endif
+ switch (jNode->compr) {
+ case JFFS2_COMPR_NONE:
+- ret = (unsigned long) ldr_memcpy(lDest, src, jNode->dsize);
++ (void) ldr_memcpy(lDest, src, jNode->dsize);
+ break;
+ case JFFS2_COMPR_ZERO:
+- ret = 0;
+ for (i = 0; i < jNode->dsize; i++)
+ *(lDest++) = 0;
+ break;
+ case JFFS2_COMPR_RTIME:
+- ret = 0;
+ rtime_decompress(src, lDest, jNode->csize, jNode->dsize);
+ break;
+ case JFFS2_COMPR_DYNRUBIN:
+ /* this is slow but it works */
+- ret = 0;
+ dynrubin_decompress(src, lDest, jNode->csize, jNode->dsize);
+ break;
+ case JFFS2_COMPR_ZLIB:
+- ret = zlib_decompress(src, lDest, jNode->csize, jNode->dsize);
+ break;
+ #if defined(CONFIG_JFFS2_LZO)
+ case JFFS2_COMPR_LZO:
+- ret = lzo_decompress(src, lDest, jNode->csize, jNode->dsize);
+ break;
+ #endif
+ default:
+@@ -1575,9 +1569,8 @@
+
+ if (*(uint32_t *)(&buf[ofs-buf_ofs]) == 0xffffffff) {
+ uint32_t inbuf_ofs;
+- uint32_t empty_start, scan_end;
++ uint32_t scan_end;
+
+- empty_start = ofs;
+ ofs += 4;
+ scan_end = min_t(uint32_t, EMPTY_SCAN_SIZE(
+ part->sector_size)/8,
+diff -Naur u-boot-r0+gitra86e39a5abbe0a14106bc7ae828fb48a10396a91-r0.orig/git/include/u-boot/md5.h u-boot-r0+gitra86e39a5abbe0a14106bc7ae828fb48a10396a91-r0/git/include/u-boot/md5.h
+--- git/include/u-boot/md5.h 2012-06-01 00:56:04.000000000 +0200
++++ git/include/u-boot/md5.h 2012-06-01 01:44:25.000000000 +0200
+@@ -11,7 +11,10 @@
+ struct MD5Context {
+ __u32 buf[4];
+ __u32 bits[2];
+- unsigned char in[64];
++ union {
++ unsigned char in[64];
++ __u32 in32[16];
++ };
+ };
+
+ /*
+diff -Naur u-boot-r0+gitra86e39a5abbe0a14106bc7ae828fb48a10396a91-r0.orig/git/lib/lzo/lzo1x_decompress.c u-boot-r0+gitra86e39a5abbe0a14106bc7ae828fb48a10396a91-r0/git/lib/lzo/lzo1x_decompress.c
+--- git/lib/lzo/lzo1x_decompress.c 2012-06-01 00:56:04.000000000 +0200
++++ git/lib/lzo/lzo1x_decompress.c 2012-06-01 01:31:29.000000000 +0200
+@@ -32,7 +32,6 @@
+
+ static inline const unsigned char *parse_header(const unsigned char *src)
+ {
+- u8 level = 0;
+ u16 version;
+ int i;
+
+@@ -47,7 +46,6 @@
+ version = get_unaligned_be16(src);
+ src += 7;
+ if (version >= 0x0940)
+- level = *src++;
+ if (get_unaligned_be32(src) & HEADER_HAS_FILTER)
+ src += 4; /* filter info */
+
+diff -Naur u-boot-r0+gitra86e39a5abbe0a14106bc7ae828fb48a10396a91-r0.orig/git/lib/md5.c u-boot-r0+gitra86e39a5abbe0a14106bc7ae828fb48a10396a91-r0/git/lib/md5.c
+--- git/lib/md5.c 2012-06-01 00:56:04.000000000 +0200
++++ git/lib/md5.c 2012-06-01 01:42:05.000000000 +0200
+@@ -153,8 +153,8 @@
+ byteReverse(ctx->in, 14);
+
+ /* Append length in bits and transform */
+- ((__u32 *) ctx->in)[14] = ctx->bits[0];
+- ((__u32 *) ctx->in)[15] = ctx->bits[1];
++ ctx->in32[14] = ctx->bits[0];
++ ctx->in32[15] = ctx->bits[1];
+
+ MD5Transform(ctx->buf, (__u32 *) ctx->in);
+ byteReverse((unsigned char *) ctx->buf, 4);
diff --git a/recipes-bsp/u-boot/u-boot-git/u-boot_ap20warning.patch b/recipes-bsp/u-boot/u-boot-git/u-boot_ap20warning.patch
new file mode 100644
index 0000000..d99fc12
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-git/u-boot_ap20warning.patch
@@ -0,0 +1,11 @@
+--- git/arch/arm/cpu/armv7/tegra3/ap20.c 2012-01-28 12:16:25.000000000 +0100
++++ git/arch/arm/cpu/armv7/tegra3/ap20.c~ 2012-01-28 12:42:44.640356495 +0100
+@@ -72,6 +72,8 @@
+ return id == (PG_UP_TAG_0_PID_CPU & 0xff);
+ }
+
++//u-boot treats all errors as warnings, &clkrst->crc_pll[CLOCK_ID_XCPU] uses a subscript out of range
++#pragma GCC diagnostic warning "-Warray-bounds"
+ static int pllx_set_rate(u32 divn, u32 divm, u32 divp, u32 cpcon)
+ {
+ struct clk_rst_ctlr *clkrst = (struct clk_rst_ctlr *)NV_PA_CLK_RST_BASE;
diff --git a/recipes-bsp/u-boot/u-boot.inc b/recipes-bsp/u-boot/u-boot.inc
new file mode 100644
index 0000000..720f995
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot.inc
@@ -0,0 +1,68 @@
+DESCRIPTION = "U-Boot - the Universal Boot Loader"
+HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome"
+SECTION = "bootloaders"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4c6cde5df68eff615d36789dc18edd3b"
+
+PROVIDES = "virtual/bootloader"
+
+DEPENDS = "mtd-utils"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+PARALLEL_MAKE=""
+
+EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}"
+
+UBOOT_MACHINE ?= "${MACHINE}_config"
+UBOOT_BINARY ?= "u-boot.bin"
+UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.bin"
+UBOOT_SYMLINK ?= "u-boot-${MACHINE}.bin"
+UBOOT_MAKE_TARGET ?= "all"
+
+do_configure () {
+ oe_runmake ${UBOOT_MACHINE}
+}
+
+do_compile () {
+ unset LDFLAGS
+ unset CFLAGS
+ unset CPPFLAGS
+ oe_runmake ${UBOOT_MAKE_TARGET}
+}
+
+do_install () {
+ install -d ${D}/boot
+ install ${S}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
+ ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
+
+ if [ -e ${WORKDIR}/fw_env.config ] ; then
+ install -d ${D}${sysconfdir}
+ install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config
+ fi
+
+}
+
+FILES_${PN} = "/boot ${sysconfdir}"
+# no gnu_hash in uboot.bin, by design, so skip QA
+INSANE_SKIP_${PN} = "1"
+
+inherit deploy
+
+addtask deploy before do_package after do_compile
+
+do_deploy () {
+ install -d ${DEPLOY_DIR_IMAGE}
+ install ${S}/${UBOOT_BINARY} ${DEPLOY_DIR_IMAGE}/${UBOOT_IMAGE}
+
+ cd ${DEPLOY_DIR_IMAGE}
+ rm -f ${UBOOT_BINARY} ${UBOOT_SYMLINK}
+ ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK}
+ ln -sf ${UBOOT_IMAGE} ${UBOOT_BINARY}
+
+ if [ -e ${S}/MLO ] ; then
+ install ${S}/MLO ${DEPLOY_DIR_IMAGE}/MLO-${MACHINE}-${PV}
+ rm -f ${DEPLOY_DIR_IMAGE}/MLO-${MACHINE} ${DEPLOY_DIR_IMAGE}/MLO
+ ln -sf MLO-${MACHINE}-${PV} ${DEPLOY_DIR_IMAGE}/MLO-${MACHINE}
+ ln -sf MLO-${MACHINE}-${PV} ${DEPLOY_DIR_IMAGE}/MLO
+ fi
+}
diff --git a/recipes-bsp/u-boot/u-boot_git.bb b/recipes-bsp/u-boot/u-boot_git.bb
new file mode 100644
index 0000000..2b32ab8
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot_git.bb
@@ -0,0 +1,61 @@
+require u-boot.inc
+PR ="r68"
+
+DEFAULT_PREFERENCE = "-1"
+DEFAULT_PREFERENCE_ti814x = "-1"
+DEFAULT_PREFERENCE_ti816x = "-1"
+
+FILESPATHPKG =. "u-boot-git:"
+
+# ~ TI PSP v2009.11_OMAPPSP_03.00.01.06 (+ couple of commits)
+SRC_URI_omap3evm = "git://arago-project.org/git/projects/u-boot-omap3.git;protocol=git \
+ file://0001-omap3evm-Change-default-console-serial-port-from.patch \
+"
+SRCREV_${PN}_omap3evm = "c0a8fb217fdca7888d89f9a3dee74a4cec865620"
+PV_omap3evm = "2009.11+${PR}+gitr${SRCREV}"
+
+# ~ TI PSP v2009.11_OMAPPSP_03.00.01.06 (+ couple of commits)
+SRC_URI_pn-${PN}_am3517-evm = "git://arago-project.org/git/projects/u-boot-omap3.git;protocol=git"
+SRCREV_pn-${PN}_am3517-evm = "c0a8fb217fdca7888d89f9a3dee74a4cec865620"
+PV_pn-${PN}_am3517-evm = "2009.11+${PR}+gitr${SRCREV}"
+
+# ~ TI PSP v2009.11_OMAPPSP_03.00.01.06 (+ couple of commits)
+SRC_URI_am37x-evm = "git://arago-project.org/git/projects/u-boot-omap3.git;protocol=git \
+ file://0001-omap3evm-Change-default-console-serial-port-from.patch \
+"
+SRCREV_pn-${PN}_am37x-evm = "c0a8fb217fdca7888d89f9a3dee74a4cec865620"
+PV_am37x-evm = "2009.11+${PR}+gitr${SRCREV}"
+
+SRC_URI_omap3-touchbook = "git://gitorious.org/u-boot-omap3/mainline.git;branch=omap3-dev;protocol=git \
+ file://fw_env.config \
+ file://dss2.patch \
+ file://600mhz.patch \
+ file://new-pinmux.patch \
+ file://spi3.patch \
+ file://spi4.patch \
+ file://headphone.patch \
+ file://power.patch \
+ file://ai-logo.patch \
+ file://mmcinit.patch \
+ file://touchbook-config.patch \
+ file://dont-inline-weak-symbols.patch \
+"
+SRCREV_pn-${PN}_omap3-touchbook = "d363f9cb0918a1b6b92e2e20d01543d0c4f53274"
+PV_omap3-touchbook = "2009.05+${PR}+gitr${SRCREV}"
+
+# OMAPL1 omapl137/omapl138 - PSP 3.20.0.11
+
+SRC_URI_omapl138 = "git://arago-project.org/git/projects/u-boot-omapl1.git;protocol=http"
+SRCREV_pn-${PN}_omapl138 = "5f16b8551b125f16cd8d58f278cb25b94272fd9f"
+PV_omapl138 = "2009.11+${PR}+gitr${SRCREV}"
+
+# hawkboard - master branch (hawk still .07beta)
+SRC_URI_hawkboard = "git://arago-project.org/git/people/sekhar/u-boot-omapl1.git;protocol=git;branch=master"
+SRC_URI_hawkboard += "file://dont-inline-weak-symbols2.patch"
+SRCREV_pn-${PN}_hawkboard = "0d291f2f255e6d66a78b3dc2445362a96ae39a57"
+PV_hawkboard = "2009.08+gitr${SRCREV}"
+
+
+S = "${WORKDIR}/git"
+
+RRECOMMENDS_${PN}_omap3-touchbook = "u-boot-fw-utils"
diff --git a/recipes-bsp/u-boot/u-boot_git.bbappend b/recipes-bsp/u-boot/u-boot_git.bbappend
new file mode 100644
index 0000000..27ce04a
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot_git.bbappend
@@ -0,0 +1,70 @@
+# Extends the core U-Boot GIT recipe
+# to take the u-boot sources including the colibri stuff from our git repository
+PR ="r1"
+DEPENDS += "dtc-native"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/u-boot-git:"
+
+# Also overwries the license checksum to suit the updated text file in our U-Boot snapshot.
+LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"
+
+COMPATIBLE_MACHINE_colibri-t20 = "colibri-t20"
+COMPATIBLE_MACHINE_colibri-t30 = "colibri-t30"
+
+DEFAULT_PREFERENCE_colibri-t20 = "1"
+DEFAULT_PREFERENCE_colibri-t30 = "1"
+
+UBOOT_MACHINE_colibri-t20 = "colibri_t20_config"
+UBOOT_MACHINE_colibri-t30 = "colibri_t30_config"
+
+#gitorious git
+FILESPATHPKG =. "git:"
+S="${WORKDIR}/git"
+SRC_URI_COLIBRI = "git://gitorious.org/colibri-t20-embedded-linux-bsp/colibri_t20-u-boot.git;protocol=git;branch=master \
+ file://u-boot-warning.patch \
+ file://u-boot-board-unused.patch \
+"
+
+# file://remove-unused.patch \
+# file://u-boot_ap20warning.patch \
+# file://colibri_t30.patch \
+# file://bootaddr.patch \
+#"
+SRCREV_colibri-t20 = "63c37d9e1d3ea97391576384d237728c44b5e33b"
+SRCREV_colibri-t30 = "63c37d9e1d3ea97391576384d237728c44b5e33b"
+
+PV_colibri-t20 = "${PR}+gitr${SRCREV}"
+PV_colibri-t30 = "${PR}+gitr${SRCREV}"
+
+#internal SVN
+#S = "${WORKDIR}/bootloader/u-boot"
+#SVN_REV = 218
+#SRC_URI_COLIBRI = "svn://tegradev:tegra123!@mammut.toradex.int:8090/colibri_tegra_linux/trunk;module=bootloader/u-boot;rev=${SVN_REV};proto=http \
+# file://remove-unused.patch "
+
+SRC_URI_colibri-t20 = "${SRC_URI_COLIBRI} "
+SRC_URI_colibri-t30 = "${SRC_URI_COLIBRI} "
+
+#compile with -O2 not -Os as with gcc 4.5 the code does not work
+do_configure_append() {
+ # sed -i -e 's/-Os/-O2 -fno-ipa-sra -fno-caller-saves -fno-schedule-insns/' ${S}/config.mk
+ sed -i -e 's/-Os/-O2 -fno-ipa-sra -fno-caller-saves -fno-schedule-insns -mno-unaligned-access/' ${S}/config.mk
+}
+
+
+#build additionally a u-boot binary which uses/stores its environment on an T20 external sd or mmc card
+do_compile_append_colibri-t20() {
+ mv u-boot.bin u-boot-nand.bin
+ oe_runmake colibri_t20_sdboot_config
+ oe_runmake all
+ mv u-boot.bin u-boot-hsmmc.bin
+ mv u-boot-nand.bin u-boot.bin
+}
+
+UBOOT_IMAGE ?= "u-boot-hsmmc-${MACHINE}-${PV}-${PR}.bin"
+do_deploy_append_colibri-t20 () {
+ install ${S}/u-boot-hsmmc.bin ${DEPLOY_DIR_IMAGE}/u-boot-hsmmc-${MACHINE}-${PV}-${PR}.bin
+ package_stagefile_shell ${DEPLOY_DIR_IMAGE}/u-boot-hsmmc-${MACHINE}-${PV}-${PR}.bin
+ ln -sf u-boot-hsmmc-${MACHINE}-${PV}-${PR}.bin ${DEPLOY_DIR_IMAGE}/u-boot-hsmmc.bin
+ package_stagefile_shell ${DEPLOY_DIR_IMAGE}/u-boot-hsmmc.bin
+}
diff --git a/recipes-bsp/u-boot/u-boot_git.bbappend.orig b/recipes-bsp/u-boot/u-boot_git.bbappend.orig
new file mode 100644
index 0000000..9a1acc8
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot_git.bbappend.orig
@@ -0,0 +1,23 @@
+# Extends the core U-Boot GIT recipe
+# to take the u-boot sources including the colibri stuff from our git repository
+
+# Also overwries the license checksum to suit the updated text file in our U-Boot snapshot.
+#LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"
+
+COMPATIBLE_MACHINE = "omap3-pandora"
+DEFAULT_PREFERENCE_omap3-pandora = "1"
+
+# Latest SRCREV.
+SRCREV_pn-${PN}_omap3-pandora = "55d0d2dd5d07fbfd57309997c38da5281b9824b5"
+
+PR ="r3"
+PV_omap3-pandora = "omap3-pandora+${PR}+gitr${SRCREV}"
+
+SRC_URI_omap3-pandora = "git://git.openpandora.org/pandora-u-boot.git;branch=pandora-2011.12;protocol=git \
+"
+
+UBOOT_MACHINE_omap3-pandora = "omap3_pandora_config"
+
+S = "${WORKDIR}/git"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/recipes-bsp/u-boot/u-boot_git.bbappend~ b/recipes-bsp/u-boot/u-boot_git.bbappend~
new file mode 100644
index 0000000..ad1be2f
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot_git.bbappend~
@@ -0,0 +1,68 @@
+# Extends the core U-Boot GIT recipe
+# to take the u-boot sources including the colibri stuff from our git repository
+PR ="r1"
+DEPENDS += "dtc-native"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/u-boot-git:"
+
+# Also overwries the license checksum to suit the updated text file in our U-Boot snapshot.
+LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb"
+
+COMPATIBLE_MACHINE_colibri-t20 = "colibri-t20"
+COMPATIBLE_MACHINE_colibri-t30 = "colibri-t30"
+
+DEFAULT_PREFERENCE_colibri-t20 = "1"
+DEFAULT_PREFERENCE_colibri-t30 = "1"
+
+UBOOT_MACHINE_colibri-t20 = "colibri_t20_config"
+UBOOT_MACHINE_colibri-t30 = "colibri_t30_config"
+
+#gitorious git
+FILESPATHPKG =. "git:"
+S="${WORKDIR}/git"
+SRC_URI_COLIBRI = "git://gitorious.org/colibri-t20-embedded-linux-bsp/colibri_t20-u-boot.git;protocol=git;branch=master \
+ file://u-boot-warning.patch \
+"
+# file://remove-unused.patch \
+# file://u-boot_ap20warning.patch \
+# file://colibri_t30.patch \
+# file://bootaddr.patch \
+#"
+SRCREV_colibri-t20 = "63c37d9e1d3ea97391576384d237728c44b5e33b"
+SRCREV_colibri-t30 = "63c37d9e1d3ea97391576384d237728c44b5e33b"
+
+PV_colibri-t20 = "${PR}+gitr${SRCREV}"
+PV_colibri-t30 = "${PR}+gitr${SRCREV}"
+
+#internal SVN
+#S = "${WORKDIR}/bootloader/u-boot"
+#SVN_REV = 218
+#SRC_URI_COLIBRI = "svn://tegradev:tegra123!@mammut.toradex.int:8090/colibri_tegra_linux/trunk;module=bootloader/u-boot;rev=${SVN_REV};proto=http \
+# file://remove-unused.patch "
+
+SRC_URI_colibri-t20 = "${SRC_URI_COLIBRI} "
+SRC_URI_colibri-t30 = "${SRC_URI_COLIBRI} "
+
+#compile with -O2 not -Os as with gcc 4.5 the code does not work
+do_configure_append() {
+ # sed -i -e 's/-Os/-O2 -fno-ipa-sra -fno-caller-saves -fno-schedule-insns/' ${S}/config.mk
+ sed -i -e 's/-Os/-O2 -fno-ipa-sra -fno-caller-saves -fno-schedule-insns -mno-unaligned-access/' ${S}/config.mk
+}
+
+
+#build additionally a u-boot binary which uses/stores its environment on an T20 external sd or mmc card
+do_compile_append_colibri-t20() {
+ mv u-boot.bin u-boot-nand.bin
+ oe_runmake colibri_t20_sdboot_config
+ oe_runmake all
+ mv u-boot.bin u-boot-hsmmc.bin
+ mv u-boot-nand.bin u-boot.bin
+}
+
+UBOOT_IMAGE ?= "u-boot-hsmmc-${MACHINE}-${PV}-${PR}.bin"
+do_deploy_append_colibri-t20 () {
+ install ${S}/u-boot-hsmmc.bin ${DEPLOY_DIR_IMAGE}/u-boot-hsmmc-${MACHINE}-${PV}-${PR}.bin
+ package_stagefile_shell ${DEPLOY_DIR_IMAGE}/u-boot-hsmmc-${MACHINE}-${PV}-${PR}.bin
+ ln -sf u-boot-hsmmc-${MACHINE}-${PV}-${PR}.bin ${DEPLOY_DIR_IMAGE}/u-boot-hsmmc.bin
+ package_stagefile_shell ${DEPLOY_DIR_IMAGE}/u-boot-hsmmc.bin
+}
diff --git a/recipes-kernel/linux/linux-colibri-t20_git.bb b/recipes-kernel/linux/linux-colibri-t20_git.bb
new file mode 100644
index 0000000..be91e90
--- /dev/null
+++ b/recipes-kernel/linux/linux-colibri-t20_git.bb
@@ -0,0 +1,39 @@
+inherit kernel
+require recipes-kernel/linux/linux.inc
+
+LINUX_VERSION ?= "2.6.36.2"
+
+SRCREV = "99003b6bd73fd8ce4f2bd63a1c7b63f8c3d0cf68"
+
+PV = "2.6.36.2+gitr${SRCREV}"
+PR = "V1.1b1"
+S = "${WORKDIR}/git"
+SRC_URI = "\
+ git://gitorious.org/colibri-t20-embedded-linux-bsp/colibri_t20-linux-kernel.git;protocol=git;branch=master \
+ file://bcm4329_warning.patch "
+
+#SVN_REV = 190
+#PV = "2.6.36.2"
+#PR = "${SVN_REV}"
+#S = "${WORKDIR}/kernel"
+#SRC_URI = "svn://tegradev:tegra123!@mammut.toradex.int:8090/colibri_tegra_linux/trunk;module=kernel;rev=${SVN_REV};proto=http \
+# file://bcm4329_warning.patch "
+
+COMPATIBLE_MACHINE = "colibri-t20"
+
+CMDLINE="mem=148M@0M fbmem=12M@148M nvmem=96M@160M vmalloc=248M video=tegrafb root=/dev/nfs ip=:::::eth0:on rw netdevwait mtdparts=tegra_nand:1018368K@28160K(userspace) console=ttyS0,115200n8 usb_high_speed=0"
+
+do_configure_prepend_colibri-t20() {
+ #use the defconfig provided in the kernel source tree
+ install -m 0644 ${S}/arch/arm/configs/colibri_t20_defconfig ${WORKDIR}/defconfig
+
+ #compile with -O2, 4.5. compiler seems to fail with -Os
+# sed -i -e /CONFIG_CC_OPTIMIZE_FOR_SIZE/d ${WORKDIR}/defconfig
+# echo "CONFIG_CC_OPTIMIZE_FOR_SIZE=n" >> ${WORKDIR}/defconfig
+
+ #compile with -mno-unaligned-access, with 4.7 compiler the kernel fails
+ echo "KBUILD_CFLAGS += -mno-unaligned-access" >> ${S}/Makefile
+}
+
+#require recipes-kernel/linux/linux-tools.inc
+
diff --git a/recipes-kernel/linux/linux-colibri-t20_git.bb.bak b/recipes-kernel/linux/linux-colibri-t20_git.bb.bak
new file mode 100644
index 0000000..ea6fb17
--- /dev/null
+++ b/recipes-kernel/linux/linux-colibri-t20_git.bb.bak
@@ -0,0 +1,37 @@
+inherit kernel
+require recipes-kernel/linux/linux.inc
+
+LINUX_VERSION ?= "2.6.36.2"
+
+SRCREV = "99003b6bd73fd8ce4f2bd63a1c7b63f8c3d0cf68"
+
+PV = "2.6.36.2+gitr${SRCREV}"
+PR = "V1.0b6"
+S = "${WORKDIR}/git"
+SRC_URI = "\
+ git://gitorious.org/colibri-t20-embedded-linux-bsp/colibri_t20-linux-kernel.git;protocol=git;branch=master \
+ systemd-koen.patch \
+"
+
+#SVN_REV = 190
+#PV = "2.6.36.2"
+#PR = "${SVN_REV}"
+#S = "${WORKDIR}/kernel"
+#SRC_URI = "svn://tegradev:tegra123!@mammut.toradex.int:8090/colibri_tegra_linux/trunk;module=kernel;rev=${SVN_REV};proto=http \
+# file://bcm4329_warning.patch "
+
+COMPATIBLE_MACHINE = "colibri-t20"
+
+CMDLINE="mem=148M@0M fbmem=12M@148M nvmem=96M@160M vmalloc=248M video=tegrafb root=/dev/nfs ip=:::::eth0:on rw netdevwait mtdparts=tegra_nand:1018368K@28160K(userspace) console=ttyS0,115200n8 usb_high_speed=0"
+
+do_configure_prepend_colibri-t20() {
+ #use the defconfig provided in the kernel source tree
+ install -m 0644 ${S}/arch/arm/configs/colibri_t20_defconfig ${WORKDIR}/defconfig
+
+ #compile with -O2, 4.5. compiler seems to fail with -Os
+# sed -i -e /CONFIG_CC_OPTIMIZE_FOR_SIZE/d ${WORKDIR}/defconfig
+# echo "CONFIG_CC_OPTIMIZE_FOR_SIZE=n" >> ${WORKDIR}/defconfig
+}
+
+#require recipes-kernel/linux/linux-tools.inc
+
diff --git a/recipes-kernel/linux/linux-colibri-t20_git.bb.orig b/recipes-kernel/linux/linux-colibri-t20_git.bb.orig
new file mode 100644
index 0000000..4e9f3d2
--- /dev/null
+++ b/recipes-kernel/linux/linux-colibri-t20_git.bb.orig
@@ -0,0 +1,35 @@
+inherit kernel
+require linux.inc
+
+LINUX_VERSION ?= "2.6.36.2"
+
+SRCREV = "70b151768728d3f372b2895a1497f3297c8e2bbb"
+PV = "2.6.36.2+gitr${SRCREV}"
+PR = "V1.0b5"
+S = "${WORKDIR}/git"
+SRC_URI = "\
+ git://gitorious.org/colibri-t20-embedded-linux-bsp/colibri_t20-linux-kernel.git;protocol=git;branch=master \
+"
+
+#SVN_REV = 190
+#PV = "2.6.36.2"
+#PR = "${SVN_REV}"
+#S = "${WORKDIR}/kernel"
+#SRC_URI = "svn://tegradev:tegra123!@mammut.toradex.int:8090/colibri_tegra_linux/trunk;module=kernel;rev=${SVN_REV};proto=http \
+# file://bcm4329_warning.patch "
+
+COMPATIBLE_MACHINE = "colibri-t20"
+
+CMDLINE="mem=148M@0M fbmem=12M@148M nvmem=96M@160M vmalloc=248M video=tegrafb root=/dev/nfs ip=:::::eth0:on rw netdevwait mtdparts=tegra_nand:1018368K@28160K(userspace) console=ttyS0,115200n8 usb_high_speed=0"
+
+do_configure_prepend_colibri-t20() {
+ #use the defconfig provided in the kernel source tree
+ install -m 0644 ${S}/arch/arm/configs/colibri_t20_defconfig ${WORKDIR}/defconfig
+
+ #compile with -O2, 4.5. compiler seems to fail with -Os
+# sed -i -e /CONFIG_CC_OPTIMIZE_FOR_SIZE/d ${WORKDIR}/defconfig
+# echo "CONFIG_CC_OPTIMIZE_FOR_SIZE=n" >> ${WORKDIR}/defconfig
+}
+
+require linux-tools.inc
+
diff --git a/recipes-kernel/linux/linux-colibri-t20_git.bb~ b/recipes-kernel/linux/linux-colibri-t20_git.bb~
new file mode 100644
index 0000000..233f087
--- /dev/null
+++ b/recipes-kernel/linux/linux-colibri-t20_git.bb~
@@ -0,0 +1,36 @@
+inherit kernel
+require recipes-kernel/linux/linux.inc
+
+LINUX_VERSION ?= "2.6.36.2"
+
+SRCREV = "99003b6bd73fd8ce4f2bd63a1c7b63f8c3d0cf68"
+
+PV = "2.6.36.2+gitr${SRCREV}"
+PR = "V1.0b6"
+S = "${WORKDIR}/git"
+SRC_URI = "\
+ git://gitorious.org/colibri-t20-embedded-linux-bsp/colibri_t20-linux-kernel.git;protocol=git;branch=master \
+ file://bcm4329_warning.patch "
+
+#SVN_REV = 190
+#PV = "2.6.36.2"
+#PR = "${SVN_REV}"
+#S = "${WORKDIR}/kernel"
+#SRC_URI = "svn://tegradev:tegra123!@mammut.toradex.int:8090/colibri_tegra_linux/trunk;module=kernel;rev=${SVN_REV};proto=http \
+# file://bcm4329_warning.patch "
+
+COMPATIBLE_MACHINE = "colibri-t20"
+
+CMDLINE="mem=148M@0M fbmem=12M@148M nvmem=96M@160M vmalloc=248M video=tegrafb root=/dev/nfs ip=:::::eth0:on rw netdevwait mtdparts=tegra_nand:1018368K@28160K(userspace) console=ttyS0,115200n8 usb_high_speed=0"
+
+do_configure_prepend_colibri-t20() {
+ #use the defconfig provided in the kernel source tree
+ install -m 0644 ${S}/arch/arm/configs/colibri_t20_defconfig ${WORKDIR}/defconfig
+
+ #compile with -O2, 4.5. compiler seems to fail with -Os
+ sed -i -e /CONFIG_CC_OPTIMIZE_FOR_SIZE/d ${WORKDIR}/defconfig
+ echo "CONFIG_CC_OPTIMIZE_FOR_SIZE=n" >> ${WORKDIR}/defconfig
+}
+
+#require recipes-kernel/linux/linux-tools.inc
+
diff --git a/recipes-kernel/linux/linux-colibri-t30_git.bb.bak b/recipes-kernel/linux/linux-colibri-t30_git.bb.bak
new file mode 100644
index 0000000..9fb8c90
--- /dev/null
+++ b/recipes-kernel/linux/linux-colibri-t30_git.bb.bak
@@ -0,0 +1,38 @@
+inherit kernel
+require recipes-kernel/linux/linux.inc
+
+LINUX_VERSION ?= "2.6.36.2"
+
+SRCREV = "99003b6bd73fd8ce4f2bd63a1c7b63f8c3d0cf68"
+
+PV = "2.6.36.2+gitr${SRCREV}"
+PR = "V1.0b6"
+S = "${WORKDIR}/git"
+SRC_URI = "\
+ git://gitorious.org/colibri-t20-embedded-linux-bsp/colibri_t20-linux-kernel.git;protocol=git;branch=master \
+ file://bcm4329_warning.patch \
+"
+
+#SVN_REV = 217
+#PV = "2.6.36.3"
+#PR = "${SVN_REV}"
+#S = "${WORKDIR}/linux-nv-tegra"
+#SRC_URI = "svn://tegradev:tegra123!@mammut.toradex.int:8090/colibri_tegra_linux/trunk;module=kernel;rev=${SVN_REV};proto=http \
+#SRC_URI = "svn://tegradev:tegra123!@mammut.toradex.int:8090/colibri_tegra_linux/branches;module=linux-nv-tegra;rev=${SVN_REV};proto=http \
+ "
+
+COMPATIBLE_MACHINE = "colibri-t30"
+
+CMDLINE="mem=148M@0M nvmem=96M@160M vmalloc=248M video=tegrafb root=/dev/nfs ip=:::::eth0:on rw netdevwait mtdparts=tegra_nand:1018368K@28160K(userspace) console=ttyS0,115200n8 usb_high_speed=0"
+
+do_configure_prepend_colibri-t30() {
+ #use the defconfig provided in the kernel source tree
+ #install -m 0644 ${S}/arch/arm/configs/colibri_t30_defconfig ${WORKDIR}/defconfig
+ install -m 0644 ${S}/arch/arm/configs/colibri_t20_defconfig ${WORKDIR}/defconfig
+ #compile with -O2, 4.5. compiler seems to fail with -Os
+# sed -i -e /CONFIG_CC_OPTIMIZE_FOR_SIZE/d ${WORKDIR}/defconfig
+# echo "CONFIG_CC_OPTIMIZE_FOR_SIZE=n" >> ${WORKDIR}/defconfig
+}
+
+#require recipes-kernel/linux/linux-tools.inc
+
diff --git a/recipes-kernel/linux/linux.inc b/recipes-kernel/linux/linux.inc
new file mode 100644
index 0000000..6996283
--- /dev/null
+++ b/recipes-kernel/linux/linux.inc
@@ -0,0 +1,282 @@
+DESCRIPTION = "Linux Kernel"
+SECTION = "kernel"
+LICENSE = "GPLv2"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
+
+inherit kernel siteinfo
+
+# Try to build & install perf
+require recipes-kernel/linux/linux-tools.inc
+
+RPSRC = "http://www.rpsys.net/openzaurus/patches/archive"
+
+# Enable OABI compat for people stuck with obsolete userspace
+ARM_KEEP_OABI ?= "1"
+
+# Quirk for udev greater or equal 141
+UDEV_GE_141 ?= "0"
+
+# Specify the commandline for your device
+
+# Boot from mmc
+CMDLINE_at91sam9263ek = "mem=64M console=ttyS0,115200 root=/dev/mmcblk0p1 rootfstype=ext2 rootdelay=5"
+# Boot from nfs
+#CMDLINE_at91sam9263ek = "mem=64M console=ttyS0,115200 root=301 root=/dev/nfs nfsroot=172.20.3.1:/data/at91 ip=172.20.0.5:::255.255.0.0"
+
+# Set the verbosity of kernel messages during runtime
+# You can define CMDLINE_DEBUG in your local.conf or distro.conf to override this behaviour
+CMDLINE_DEBUG ?= '${@base_conditional("DISTRO_TYPE", "release", "quiet", "debug", d)}'
+CMDLINE_append = " ${CMDLINE_DEBUG} "
+
+# Kernel bootlogo is distro-specific (default is OE logo).
+# Logo resolution (qvga, vga, ...) is machine-specific.
+LOGO_SIZE ?= "."
+
+# Support for binary device tree generation
+
+FILES_kernel-devicetree = "/boot/devicetree*"
+
+KERNEL_DEVICETREE_boc01 = "${WORKDIR}/boc01.dts"
+KERNEL_DEVICETREE_calamari = "arch/${ARCH}/boot/dts/mpc8536ds.dts"
+KERNEL_DEVICETREE_canyonlands = "arch/${ARCH}/boot/dts/canyonlands.dts"
+KERNEL_DEVICETREE_kilauea = "arch/${ARCH}/boot/dts/kilauea.dts"
+KERNEL_DEVICETREE_lite5200 = "arch/${ARCH}/boot/dts/lite5200.dts"
+KERNEL_DEVICETREE_lsppchd = "arch/${ARCH}/boot/dts/kuroboxHD.dts"
+KERNEL_DEVICETREE_lsppchg = "arch/${ARCH}/boot/dts/kuroboxHG.dts"
+KERNEL_DEVICETREE_mpc8313e-rdb = "arch/${ARCH}/boot/dts/mpc8313erdb.dts"
+KERNEL_DEVICETREE_mpc8315e-rdb = "arch/${ARCH}/boot/dts/mpc8315erdb.dts"
+KERNEL_DEVICETREE_mpc8323e-rdb = "arch/${ARCH}/boot/dts/mpc832x_rdb.dts"
+KERNEL_DEVICETREE_mpc8544ds = "arch/${ARCH}/boot/dts/mpc8544ds.dts"
+KERNEL_DEVICETREE_mpc8641-hpcn = "arch/${ARCH}/boot/dts/mpc8641_hpcn.dts"
+KERNEL_DEVICETREE_p1020rdb = "arch/${ARCH}/boot/dts/p1020rdb.dts"
+KERNEL_DEVICETREE_p2020ds = "arch/${ARCH}/boot/dts/p2020ds.dts"
+KERNEL_DEVICETREE_sequoia = "arch/${ARCH}/boot/dts/sequoia.dts"
+KERNEL_DEVICETREE_tqm8540 = "arch/${ARCH}/boot/dts/tqm8540.dts"
+KERNEL_DEVICETREE_xilinx-ml507 = "arch/${ARCH}/boot/dts/virtex440-ml507.dts"
+
+KERNEL_DEVICETREE_FLAGS = "-R 8 -S 0x3000"
+
+CORTEXA8FIXUP ?= "yes"
+
+python __anonymous () {
+
+ import bb
+
+ devicetree = bb.data.getVar('KERNEL_DEVICETREE', d, 1) or ''
+ if devicetree:
+ depends = bb.data.getVar("DEPENDS", d, 1)
+ bb.data.setVar("DEPENDS", "%s dtc-native" % depends, d)
+ packages = bb.data.getVar("PACKAGES", d, 1)
+ bb.data.setVar("PACKAGES", "%s kernel-devicetree" % packages, d)
+}
+
+do_configure_prepend() {
+
+ # Rename getline in ./scripts/unifdef.c
+ # Kernels up to 2.6.29 are currently failing to build unifdef.c,
+ # clashing with exposed getline() from <stdio.h>
+ # see https://patchwork.kernel.org/patch/11166/
+ # committed in 2.6.29 (commit d15bd1067b1fcb2b7250d22bc0c7c7fea0b759f7)
+
+ sed -i -e 's/getline/parseline/g' ${S}/scripts/unifdef.c
+
+
+ echo "" > ${S}/.config
+
+ #
+ # logo support, if you supply logo_linux_clut224.ppm in SRC_URI, then it's going to be used
+ #
+ if [ -e ${WORKDIR}/${LOGO_SIZE}/logo_linux_clut224.ppm ]; then
+ install -m 0644 ${WORKDIR}/${LOGO_SIZE}/logo_linux_clut224.ppm drivers/video/logo/logo_linux_clut224.ppm
+ echo "CONFIG_LOGO=y" >> ${S}/.config
+ echo "CONFIG_LOGO_LINUX_CLUT224=y" >> ${S}/.config
+ fi
+
+ #
+ # oabi / eabi support
+ #
+ if [ "${TARGET_OS}" = "linux-gnueabi" -o "${TARGET_OS}" = "linux-uclibceabi" ]; then
+ echo "CONFIG_AEABI=y" >> ${S}/.config
+ if [ "${ARM_KEEP_OABI}" = "1" ] ; then
+ echo "CONFIG_OABI_COMPAT=y" >> ${S}/.config
+ else
+ echo "# CONFIG_OABI_COMPAT is not set" >> ${S}/.config
+ fi
+ else
+ echo "# CONFIG_AEABI is not set" >> ${S}/.config
+ echo "# CONFIG_OABI_COMPAT is not set" >> ${S}/.config
+ fi
+
+ # When enabling thumb for userspace we also need thumb support in the kernel
+ if [ "${ARM_INSTRUCTION_SET}" = "thumb" ] ; then
+ sed -i -e /CONFIG_ARM_THUMB/d ${WORKDIR}/defconfig
+ echo "CONFIG_ARM_THUMB=y" >> ${S}/.config
+ fi
+
+ # Enable thumb2 fixup for specific issue in angstrom toolchains when used on A8 r1p[012] silicon
+ if [ "${CORTEXA8FIXUP}" = "yes" ] ; then
+ sed -i -e /CONFIG_ARM_ERRATA_430973/d ${WORKDIR}/defconfig
+ echo "CONFIG_ARM_ERRATA_430973=y" >> ${S}/.config
+ fi
+
+ #
+ # endian support
+ #
+ if [ "${SITEINFO_ENDIANNESS}" = "be" ]; then
+ echo "CONFIG_CPU_BIG_ENDIAN=y" >> ${S}/.config
+ fi
+
+ echo "CONFIG_CMDLINE=\"${CMDLINE}\"" >> ${S}/.config
+
+ sed -e '/CONFIG_AEABI/d' \
+ -e '/CONFIG_OABI_COMPAT=/d' \
+ -e '/CONFIG_CMDLINE=/d' \
+ -e '/CONFIG_CPU_BIG_ENDIAN/d' \
+ -e '/CONFIG_LOGO=/d' \
+ -e '/CONFIG_LOGO_LINUX_CLUT224=/d' \
+ -e '/CONFIG_LOCALVERSION/d' \
+ -e '/CONFIG_LOCALVERSION_AUTO/d' \
+ < '${WORKDIR}/defconfig' >>'${S}/.config'
+
+ echo 'CONFIG_LOCALVERSION=""' >>${S}/.config
+ echo '# CONFIG_LOCALVERSION_AUTO is not set' >>${S}/.config
+
+ #
+ # Udev quirks
+ #
+
+ # Newer versions of udev mandate that sysfs doesn't have deprecated entries
+ if [ "${UDEV_GE_141}" = "1" ] ; then
+ sed -e /CONFIG_SYSFS_DEPRECATED/d \
+ -e /CONFIG_SYSFS_DEPRECATED_V2/d \
+ -e /CONFIG_HOTPLUG/d \
+ -e /CONFIG_UEVENT_HELPER_PATH/d \
+ -e /CONFIG_UNIX/d \
+ -e /CONFIG_SYSFS/d \
+ -e /CONFIG_PROC_FS/d \
+ -e /CONFIG_TMPFS/d \
+ -e /CONFIG_INOTIFY_USER/d \
+ -e /CONFIG_SIGNALFD/d \
+ -e /CONFIG_TMPFS_POSIX_ACL/d \
+ -e /CONFIG_BLK_DEV_BSG/d \
+ -i '${S}/.config'
+
+ echo '# CONFIG_SYSFS_DEPRECATED is not set' >> ${S}/.config
+ echo '# CONFIG_SYSFS_DEPRECATED_V2 is not set' >> ${S}/.config
+ echo 'CONFIG_HOTPLUG=y' >> ${S}/.config
+ echo 'CONFIG_UEVENT_HELPER_PATH=""' >> ${S}/.config
+ echo 'CONFIG_UNIX=y' >> ${S}/.config
+ echo 'CONFIG_SYSFS=y' >> ${S}/.config
+ echo 'CONFIG_PROC_FS=y' >> ${S}/.config
+ echo 'CONFIG_TMPFS=y' >> ${S}/.config
+ echo 'CONFIG_INOTIFY_USER=y' >> ${S}/.config
+ echo 'CONFIG_SIGNALFD=y' >> ${S}/.config
+ echo 'CONFIG_TMPFS_POSIX_ACL=y' >> ${S}/.config
+ echo 'CONFIG_BLK_DEV_BSG=y' >> ${S}/.config
+ echo 'CONFIG_DEVTMPFS=y' >> ${S}/.config
+ echo 'CONFIG_DEVTMPFS_MOUNT=y' >> ${S}/.config
+ fi
+
+ # Newer inits like systemd need cgroup support
+ if [ "${KERNEL_ENABLE_CGROUPS}" = "1" ] ; then
+ sed -e /CONFIG_CGROUP_SCHED/d \
+ -e /CONFIG_CGROUPS/d \
+ -i '${S}/.config'
+
+ echo 'CONFIG_CGROUP_SCHED=y' >> ${S}/.config
+ echo 'CONFIG_CGROUPS=y' >> ${S}/.config
+ echo 'CONFIG_CGROUP_NS=y' >> ${S}/.config
+ echo 'CONFIG_CGROUP_FREEZER=y' >> ${S}/.config
+ echo 'CONFIG_CGROUP_DEVICE=y' >> ${S}/.config
+ echo 'CONFIG_CPUSETS=y' >> ${S}/.config
+ echo 'CONFIG_PROC_PID_CPUSET=y' >> ${S}/.config
+ echo 'CONFIG_CGROUP_CPUACCT=y' >> ${S}/.config
+ echo 'CONFIG_RESOURCE_COUNTERS=y' >> ${S}/.config
+ fi
+
+ #
+ # root-over-nfs-over-usb-eth support. Limited, but should cover some cases.
+ # Enable this by setting a proper CMDLINE_NFSROOT_USB.
+ #
+ if [ ! -z "${CMDLINE_NFSROOT_USB}" ]; then
+ oenote "Configuring the kernel for root-over-nfs-over-usb-eth with CMDLINE ${CMDLINE_NFSROOT_USB}"
+ sed -e '/CONFIG_INET/d' \
+ -e '/CONFIG_IP_PNP=/d' \
+ -e '/CONFIG_USB_GADGET=/d' \
+ -e '/CONFIG_USB_GADGET_SELECTED=/d' \
+ -e '/CONFIG_USB_ETH=/d' \
+ -e '/CONFIG_NFS_FS=/d' \
+ -e '/CONFIG_ROOT_NFS=/d' \
+ -e '/CONFIG_CMDLINE=/d' \
+ -i ${S}/.config
+ echo "CONFIG_INET=y" >> ${S}/.config
+ echo "CONFIG_IP_PNP=y" >> ${S}/.config
+ echo "CONFIG_USB_GADGET=y" >> ${S}/.config
+ echo "CONFIG_USB_GADGET_SELECTED=y" >> ${S}/.config
+ echo "CONFIG_USB_ETH=y" >> ${S}/.config
+ echo "CONFIG_NFS_FS=y" >> ${S}/.config
+ echo "CONFIG_ROOT_NFS=y" >> ${S}/.config
+ echo "CONFIG_CMDLINE=\"${CMDLINE_NFSROOT_USB}\"" >> ${S}/.config
+ fi
+ yes '' | oe_runmake oldconfig
+}
+
+do_configure_append() {
+ if test -e scripts/Makefile.fwinst ; then
+ sed -i -e "s:-m0644:-m 0644:g" scripts/Makefile.fwinst
+ fi
+}
+
+# bitbake.conf only prepends PARALLEL make in tasks called do_compile, which isn't the case for compile_modules
+# So explicitly enable it for that in here
+EXTRA_OEMAKE = "${PARALLEL_MAKE} "
+
+do_install_append() {
+ oe_runmake headers_install INSTALL_HDR_PATH=${D}${exec_prefix}/src/linux-${KERNEL_VERSION} ARCH=$ARCH
+}
+
+PACKAGES =+ "kernel-headers"
+FILES_kernel-headers = "${exec_prefix}/src/linux*"
+
+do_devicetree_image() {
+ if test -n "${KERNEL_DEVICETREE}" ; then
+ dtc -I dts -O dtb ${KERNEL_DEVICETREE_FLAGS} -o devicetree ${KERNEL_DEVICETREE}
+ install -d ${D}/boot
+ install -m 0644 devicetree ${D}/boot/devicetree-${KERNEL_VERSION}
+ install -d ${DEPLOY_DIR_IMAGE}
+ install -m 0644 devicetree ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.dtb
+ package_stagefile_shell ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.dtb
+ cd ${DEPLOY_DIR_IMAGE}
+ rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.dtb
+ ln -sf ${KERNEL_IMAGE_BASE_NAME}.dtb ${KERNEL_IMAGE_SYMLINK_NAME}.dtb
+ package_stagefile_shell ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_SYMLINK_NAME}.dtb
+ fi
+}
+
+addtask devicetree_image after do_install before do_package do_deploy
+
+pkg_postinst_kernel-devicetree () {
+ cd /${KERNEL_IMAGEDEST}; update-alternatives --install /${KERNEL_IMAGEDEST}/devicetree devicetree devicetree-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
+}
+
+pkg_postrm_kernel-devicetree () {
+ cd /${KERNEL_IMAGEDEST}; update-alternatives --remove devicetree devicetree-${KERNEL_VERSION} || true
+}
+
+# Automatically depend on lzop-native if CONFIG_KERNEL_LZO is enabled
+python () {
+ try:
+ defconfig = bb.fetch2.localpath('file://defconfig', d)
+ except bb.fetch2.FetchError:
+ return
+
+ try:
+ configfile = open(defconfig)
+ except IOError:
+ return
+
+ if 'CONFIG_KERNEL_LZO=y\n' in configfile.readlines():
+ depends = d.getVar('DEPENDS', False)
+ d.setVar('DEPENDS', depends + ' lzop-native')
+}
diff --git a/recipes-lxde/lxappearance-obconf/lxappearance-obconf_0.0.1.bb b/recipes-lxde/lxappearance-obconf/lxappearance-obconf_0.0.1.bb
new file mode 100644
index 0000000..7fe349c
--- /dev/null
+++ b/recipes-lxde/lxappearance-obconf/lxappearance-obconf_0.0.1.bb
@@ -0,0 +1,21 @@
+DESCRIPTION = "LXDE Appearance Obconfig"
+HOMEPAGE = "http://lxde.org/"
+SECTION = "x11"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=9d19a9495cc76dc96b703fb4aa157183"
+
+DEPENDS = "menu-cache lxappearance"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/lxde/${PN}-${PV}.tar.gz"
+SRC_URI[md5sum] = "7c6381bc1ff60e23ef7f31d5e70a1803"
+SRC_URI[sha256sum] = "0a7390ba9e59c132b1a82dbf766a4b472007cc891e5c7574f7f03088faa332b9"
+
+inherit autotools gettext pkgconfig
+
+FILES_${PN} += "${datadir}/lxappearance/obconf/obconf.glade \
+ ${libdir}/lxappearance/plugins/obconf.so"
+FILES_${PN}-dbg += "${libdir}/lxappearance/plugins/.debug/obconf.so"
+
+FILES_${PN}-dev += "${libdir}/lxappearance/plugins/obconf.la \
+ ${libdir}/lxappearance/plugins/obconf.a "
diff --git a/recipes-lxde/lxlauncher/lxlauncher_0.2.2.bb b/recipes-lxde/lxlauncher/lxlauncher_0.2.2.bb
new file mode 100644
index 0000000..cb88752
--- /dev/null
+++ b/recipes-lxde/lxlauncher/lxlauncher_0.2.2.bb
@@ -0,0 +1,17 @@
+DESCRIPTION = "LXDE Launcher"
+HOMEPAGE = "http://lxde.org/"
+SECTION = "x11"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+DEPENDS = "menu-cache gtk+"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/lxde/${PN}-${PV}.tar.gz"
+SRC_URI[md5sum] = "16df627447838b170a72cc3a9ee21497"
+SRC_URI[sha256sum] = "ad586e3a2668f98bbf0217ec1be1f8f1be4ff876b180a407c7db2fe354303cbc"
+
+FILE_${pn} += "${datadir}/desktop-directories/*"
+
+inherit autotools gettext pkgconfig
+
diff --git a/recipes-lxde/lxlauncher/lxlauncher_0.2.2.bb~ b/recipes-lxde/lxlauncher/lxlauncher_0.2.2.bb~
new file mode 100644
index 0000000..2bc07ab
--- /dev/null
+++ b/recipes-lxde/lxlauncher/lxlauncher_0.2.2.bb~
@@ -0,0 +1,17 @@
+DESCRIPTION = "LXDE Launcher"
+HOMEPAGE = "http://lxde.org/"
+SECTION = "x11"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=9d19a9495cc76dc96b703fb4aa157183"
+
+DEPENDS = "menu-cache gtk+"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/lxde/${PN}-${PV}.tar.gz"
+SRC_URI[md5sum] = "16df627447838b170a72cc3a9ee21497"
+SRC_URI[sha256sum] = "ad586e3a2668f98bbf0217ec1be1f8f1be4ff876b180a407c7db2fe354303cbc"
+
+FILE_${pn} += "${datadir}/desktop-directories/*"
+
+inherit autotools gettext pkgconfig
+
diff --git a/recipes-lxde/lxrandr/lxrandr_0.1.2.bb b/recipes-lxde/lxrandr/lxrandr_0.1.2.bb
new file mode 100644
index 0000000..9673d87
--- /dev/null
+++ b/recipes-lxde/lxrandr/lxrandr_0.1.2.bb
@@ -0,0 +1,14 @@
+DESCRIPTION = "LXDE Randr graphical frontend"
+HOMEPAGE = "http://lxde.org/"
+SECTION = "x11"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+DEPENDS = "xrandr gtk+"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/lxde/${PN}-${PV}.tar.gz"
+SRC_URI[md5sum] = "8a7391581541bba58839ac11dbf5b575"
+SRC_URI[sha256sum] = "fb8139478f6cfeac6a2d8adb4e55e8cad099bfe2da7c82253c935ba719f9cf19"
+
+inherit autotools gettext pkgconfig
diff --git a/recipes-lxde/lxrandr/lxrandr_0.1.2.bb~ b/recipes-lxde/lxrandr/lxrandr_0.1.2.bb~
new file mode 100644
index 0000000..9ac3d35
--- /dev/null
+++ b/recipes-lxde/lxrandr/lxrandr_0.1.2.bb~
@@ -0,0 +1,14 @@
+DESCRIPTION = "LXDE Randr graphical frontend"
+HOMEPAGE = "http://lxde.org/"
+SECTION = "x11"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+DEPENDS = "xrandr gtk+"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/lxde/${PN}-${PV}.tar.gz"
+SRC_URI[md5sum] = "8a7391581541bba58839ac11dbf5b575"
+SRC_URI[sha256sum] = "fb8139478f6cfeac6a2d8adb4e55e8cad099bfe2da7c82253c935ba719f9cf19"
+
+inherit autotools gettext pkgconfig
diff --git a/recipes/joe/joe_3.1.bb b/recipes/joe/joe_3.1.bb
new file mode 100644
index 0000000..9c2a2b2
--- /dev/null
+++ b/recipes/joe/joe_3.1.bb
@@ -0,0 +1,15 @@
+SECTION = "console/utils"
+DESCRIPTION = "Console text editor with good functionality, good choice for vi-haters."
+HOMEPAGE = "http://joe-editor.sourceforge.net/"
+LICENSE ="GPL"
+RDEPENDS_${PN} = "ncurses-terminfo"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/joe-editor/joe-${PV}.tar.gz"
+LIC_FILES_CHKSUM = "file://COPYING;md5=da10ed7cf8038981c580e11c1d3e8fb6"
+
+PR = "r3"
+
+inherit autotools
+
+SRC_URI[md5sum] = "2a6ef018870fca9b7df85401994fb0e0"
+SRC_URI[sha256sum] = "252390e4bc687957f09f334095904c8cc53b39c7b663ed47861ae1d11aef5946"
diff --git a/recipes/joe/joe_3.1.bb~ b/recipes/joe/joe_3.1.bb~
new file mode 100644
index 0000000..75eb049
--- /dev/null
+++ b/recipes/joe/joe_3.1.bb~
@@ -0,0 +1,15 @@
+SECTION = "console/utils"
+DESCRIPTION = "Console text editor with good functionality, good choice for vi-haters."
+HOMEPAGE = "http://joe-editor.sourceforge.net/"
+LICENSE ="GPLv1"
+RDEPENDS_${PN} = "ncurses-terminfo"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/joe-editor/joe-${PV}.tar.gz"
+LIC_FILES_CHKSUM = "file://COPYING;md5=da10ed7cf8038981c580e11c1d3e8fb6"
+
+PR = "r3"
+
+inherit autotools
+
+SRC_URI[md5sum] = "2a6ef018870fca9b7df85401994fb0e0"
+SRC_URI[sha256sum] = "252390e4bc687957f09f334095904c8cc53b39c7b663ed47861ae1d11aef5946"
diff --git a/recipes/tegrastats-gtk/files/Makefile b/recipes/tegrastats-gtk/files/Makefile
new file mode 100644
index 0000000..bed9164
--- /dev/null
+++ b/recipes/tegrastats-gtk/files/Makefile
@@ -0,0 +1,17 @@
+CFLAGS_LOC = -Wall `pkg-config --cflags gtk+-2.0`
+LDFLAGS_LOC = `pkg-config --libs gtk+-2.0`
+
+CC = gcc
+
+OBJS = main.o stats.o
+
+all: tegrastats-gtk
+
+.c.o :
+ $(CC) $(CFLAGS) $(CFLAGS_LOC) -c $<
+
+tegrastats-gtk: $(OBJS)
+ $(CC) $(GTK_LIB) $(X11_LIB) $(OBJS) -o $@ $(LDFLAGS) $(LDFLAGS_LOC)
+
+clean:
+ rm -f *.o *~ helloworld
diff --git a/recipes/tegrastats-gtk/files/main.c b/recipes/tegrastats-gtk/files/main.c
new file mode 100644
index 0000000..973bd47
--- /dev/null
+++ b/recipes/tegrastats-gtk/files/main.c
@@ -0,0 +1,975 @@
+/*
+ * Copyright (c) 2009-2011 NVIDIA Corporation. All Rights Reserved.
+ *
+ * NVIDIA Corporation and its licensors retain all intellectual property and
+ * proprietary rights in and to this software and related documentation. Any
+ * use, reproduction, disclosure or distribution of this software and related
+ * documentation without an express license agreement from NVIDIA Corporation
+ * is strictly prohibited.
+ */
+
+#define GTK_OUTPUT
+
+#ifndef _GNU_SOURCE
+ #define _GNU_SOURCE
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include <string.h>
+#include <dirent.h>
+#include <fnmatch.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <signal.h>
+#include <fcntl.h>
+
+#ifndef GTK_OUTPUT
+#if !NV_IS_LDK
+ #include <utils/Log.h>
+ #undef LOG_TAG
+ #define LOG_TAG "TegraStats"
+#else
+ #include <string.h>
+ #define LOGE(...) \
+ do { \
+ printf(__VA_ARGS__); \
+ printf("\n"); \
+ } while (0)
+
+ #define LOGI(...) \
+ do { \
+ printf(__VA_ARGS__); \
+ printf("\n"); \
+ } while (0)
+#endif
+
+#define PRINTE(toLog, logFile, ...) \
+do{ \
+ if (toLog && (logFile != NULL)) \
+ { \
+ fprintf(logFile, __VA_ARGS__); \
+ fprintf(logFile, "\n"); \
+ } \
+ else \
+ { \
+ LOGE(__VA_ARGS__); \
+ } \
+}while(0)
+#endif
+#define NVMAP_BASE_PATH "/sys/devices/platform/tegra-nvmap/misc/nvmap/"
+#define CARVEOUT(x) NVMAP_BASE_PATH "heap-generic-0/" # x
+#define IRAM(x) NVMAP_BASE_PATH "heap-iram/" # x
+
+#define EDP_LIMIT_DEBUGFS_PATH "/sys/kernel/debug/edp_limit"
+#define DVFS_CLOCKS_BASE_PATH "/sys/kernel/debug/clock/"
+#define EMCCLK DVFS_CLOCKS_BASE_PATH "emc/rate"
+#define AVPCLK DVFS_CLOCKS_BASE_PATH "avp.sclk/rate"
+#define VDECLK DVFS_CLOCKS_BASE_PATH "vde/rate"
+
+#define READ_VALUE(bToLog, logFile, path, pvalue) { \
+ f = fopen(path, "r"); \
+ if (f) { \
+ (void) fscanf(f, "%d", pvalue); \
+ fclose(f); \
+ } else { \
+ PRINTE(bToLog, logFile, "Failed to open %s", path); \
+ } \
+}
+
+#define NUM_SLOTS 11
+#define PAGE_SIZE 4096
+#define FREQUENCY_CONVERT 1000
+#define AP20_CHIPID 20
+#define T30_CHIPID 30
+#define ALLOC_BUFFER_SIZE 1024
+
+/* Prototypes. */
+
+#ifndef GTK_OUTPUT
+int main(int argc, char *argv[]);
+#endif
+
+static void logFlush(void);
+static int B2MB(int bytes);
+static int kB2MB(int kiloBytes);
+static int B2kB(int bytes);
+static int SmartB2Str(char* str, size_t size, int bytes);
+#ifndef GTK_OUTPUT
+static void setFreq(int setMax);
+static long processdir(const struct dirent *dir);
+static void signal_handler(int signal);
+static int filter(const struct dirent *dir);
+#endif
+static int getChipId(void);
+
+/* Store clk values to restore later */
+// Assuming clk frequencies are same for both CPUs
+unsigned int cpuclk[2];
+
+FILE *f = NULL;
+FILE *logFile = NULL;
+
+/* Functions. */
+
+static void logFlush(void)
+{
+#if NV_IS_LDK
+ // need to fflush on LDK to make output redirectable
+ fflush(stdout);
+#endif
+ if ((logFile != NULL) && (fileno(logFile) != -1))
+ {
+ fflush(logFile);
+ }
+}
+
+static int B2MB(int bytes)
+{
+ bytes += (1<<19)-1; // rounding
+ return bytes >> 20;
+}
+
+static int kB2MB(int kiloBytes)
+{
+ kiloBytes += (1<<9)-1; // rounding
+ return kiloBytes >> 10;
+}
+
+static int B2kB(int bytes)
+{
+ bytes += (1<<9)-1; // rounding
+ return bytes >> 10;
+}
+
+static int SmartB2Str(char* str, size_t size, int bytes)
+{
+ if (bytes < 1024)
+ {
+ return snprintf(str, size, "%dB", bytes);
+ }
+ else if (bytes < 1024*1024)
+ {
+ return snprintf(str, size, "%dkB", B2kB(bytes));
+ }
+ else
+ {
+ return snprintf(str, size, "%dMB", B2MB(bytes));
+ }
+}
+#ifndef GTK_OUTPUT
+
+static void setFreq(int setMax)
+{
+ FILE* f;
+ LOGI("setFreq %d", setMax);
+
+ if (!cpuclk[0]) {
+ f = fopen("/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies", "r");
+ if (f)
+ {
+ fscanf(f, "%u", &cpuclk[0]);
+ while(fscanf(f, "%u", &cpuclk[1]) != EOF);
+
+ LOGI("cpuclk: minfreq = %u maxfreq = %u\n", cpuclk[0], cpuclk[1]);
+ fclose(f);
+ }
+ else
+ {
+ LOGE("Error opening file scaling_available_frequencies");
+ }
+ }
+ if (setMax)
+ {
+ // set CPU frequency to highest value
+ f = fopen("/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq", "w");
+ if (f)
+ {
+ fprintf(f, "%u", cpuclk[1]);
+ fclose(f);
+ }
+ else
+ {
+ LOGE("Error opening file scaling_min_freq\n");
+ }
+ }
+ else
+ {
+ // set default
+ f = fopen("/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq", "w");
+ if (f)
+ {
+ fprintf(f, "%u", cpuclk[0]);
+ fclose(f);
+ }
+ else
+ {
+ LOGE("Error opening file scaling_min_freq\n");
+ }
+ }
+}
+
+static long processdir(const struct dirent *dir)
+{
+ char path[256];
+ char linkinfo[256];
+
+ memset(path, 0, sizeof path);
+ memset(linkinfo, 0, sizeof linkinfo);
+
+ strcpy(path, "/proc/");
+ strcat(path, dir->d_name);
+ strcat(path, "/exe");
+ readlink(path, linkinfo, sizeof linkinfo);
+ if (strstr(linkinfo, "tegrastats") != NULL)
+ {
+ return strtol(dir->d_name, (char **) NULL, 10);
+ }
+ return 0;
+}
+
+static void signal_handler(int signal)
+{
+ if ((f != NULL) && (fileno(f) != -1))
+ {
+ fclose(f);
+ }
+ logFlush();
+ if ((logFile != NULL) && (fileno(logFile) != -1))
+ {
+ fclose(logFile);
+ }
+ exit(0);
+}
+
+static int filter(const struct dirent *dir)
+{
+ return !fnmatch("[1-9]*", dir->d_name, 0);
+}
+#endif
+
+static int getChipId(void)
+{
+ char *contents = NULL;
+ char *tegraid = NULL;
+ int count = 0;
+ int chipid = 0;
+
+ /* open file */
+ int fd = open("/proc/cmdline", O_RDONLY);
+ if (fd < 0)
+ {
+ printf("Couldn't open %s\n", "/proc/cmdline");
+ goto failout;
+ }
+
+ /* allocate enough memory */
+ contents = malloc(ALLOC_BUFFER_SIZE);
+ if (!contents)
+ {
+ printf("Couldn't allocate mem %d bytes\n", ALLOC_BUFFER_SIZE);
+ goto failout;
+ }
+
+ /* read the contents of the file */
+ count = read(fd, contents, ALLOC_BUFFER_SIZE-1);
+ if (count < 0)
+ {
+ printf("Couldn't read the file %s\n", "/proc/cmdline");
+ goto failout;
+ }
+
+ /* add zero to make it a string */
+ contents[count] = '\0';
+
+ tegraid = strstr(contents, "tegraid=");
+ if (tegraid)
+ {
+ tegraid += strlen("tegraid=");
+ chipid = atoi(tegraid);
+ }
+
+failout:
+ if (fd >= 0)
+ {
+ close(fd);
+ }
+ free(contents);
+ return chipid;
+}
+#ifndef GTK_OUTPUT
+
+int main (int argc, char *argv[])
+{
+ int i;
+ unsigned int sleepMS = 1000;
+ int isCpu0Active;
+ int isCpu1Active;
+ int cpuLoadPrev[4*10];
+ int cpu0Load = 0;
+ int cpu1Load = 0;
+ int cpu2Load = 0;
+ int cpu3Load = 0;
+ int isCpu2Active;
+ int isCpu3Active;
+ int debug = 0;
+ int bStart = 0;
+ int bStop = 0;
+ int bToLog = 0;
+ int chipId = 0;
+ int pid = 0;
+ char logName[256] = {0};
+
+ memset(cpuLoadPrev, 0, 4*10*sizeof(int));
+
+ for (i = 1; i < argc; i++)
+ {
+ if (argv && argv[i])
+ {
+ LOGE("argv[%d] = %s\n", i, argv[i]);
+
+ if (argv[i][0] == '-')
+ {
+ if (!strcmp(argv[i], "-max"))
+ {
+ setFreq(1);
+ LOGI("Set all components to max frequency");
+ return 0;
+ }
+ else if (!strcmp(argv[i], "-default"))
+ {
+ setFreq( 0);
+ return 0;
+ }
+ else if (!strcmp(argv[i], "-debug"))
+ {
+ debug = 1;
+ }
+ else if (!strcmp(argv[i], "--start"))
+ {
+ bStart = 1;
+ }
+ else if (!strcmp(argv[i], "--stop"))
+ {
+ bStop = 1;
+ }
+ else if (!strcmp(argv[i], "--logfile"))
+ {
+ if ((i+1) <argc)
+ {
+ strcpy(logName, argv[i+1]);
+ i++;
+ bToLog = 1;
+ }
+ }
+ }
+ else
+ {
+ sscanf(argv[1], "%d", &sleepMS);
+ if (sleepMS < 100)
+ sleepMS = 100;
+ }
+ }
+ }
+
+ if (bStop)
+ {
+ struct dirent **namelist;
+ int n;
+
+ n = scandir("/proc", &namelist, filter, 0);
+ if (n < 0)
+ perror("Not enough memory.");
+ else
+ {
+ while (n--)
+ {
+ pid = processdir(namelist[n]);
+ if ((pid != 0) && (getpid() != (pid_t) pid))
+ {
+ kill((pid_t) pid, SIGTERM);
+ }
+ free(namelist[n]);
+ }
+ free(namelist);
+ }
+
+ return 0;
+ }
+ else if (bStart)
+ {
+ // run in background
+ pid = fork();
+ if (pid > 0)
+ {
+ // parent exit now..
+ exit(0);
+ }
+ else if (pid == 0)
+ {
+ setpgrp();
+ signal(SIGINT, signal_handler);
+ signal(SIGTERM, signal_handler);
+ }
+ else
+ {
+ // print warning, but do not exit..
+ LOGE("failed to fork a child process \n");
+ }
+ }
+
+ if (strlen(logName))
+ {
+ if ((logFile = fopen(logName, "a")) == NULL)
+ {
+ LOGE("failed to open %s \n", logName);
+ bToLog = 0;
+ }
+ }
+#else
+
+#define PRINTE(toLog, logFile, ...) \
+do{ \
+ (void) toLog; \
+ (void)logFile; \
+ sprintf(str, __VA_ARGS__); \
+ \
+}while(0)
+
+int GetStats(char * str)
+{
+ int isCpu0Active;
+ int isCpu1Active;
+ static int cpuLoadPrev[4*10];
+ int cpu0Load = 0;
+ int cpu1Load = 0;
+ int cpu2Load = 0;
+ int cpu3Load = 0;
+ int isCpu2Active;
+ int isCpu3Active;
+ int bToLog = 0;
+ int chipId = 0;
+
+#endif
+ chipId = getChipId();
+
+#ifndef GTK_OUTPUT
+ for (;;)
+#endif
+ {
+ int totalRAMkB = -1;
+ int freeRAMkB = -1;
+ int largestFreeRAMBlockB = -1;
+ int numLargestRAMBlock = -1;
+ int buffersRAMkB = -1;
+ int cachedRAMkB = -1;
+ int totalCarveoutB = -1;
+ int freeCarveoutB = -1;
+ int largestFreeCarveoutBlockB = -1;
+ int totalGARTkB = -1;
+ int freeGARTkB = -1;
+ int largestFreeGARTBlockkB = -1;
+ int totalIRAMB = -1;
+ int freeIRAMB = -1;
+ int largestFreeIRAMBlockB = -1;
+ int currCpuFreq = -1;
+ int emcClk = -1;
+ int avpClk = -1;
+ int vdeClk = -1;
+ int no_cpus = 4;
+ int edp_limit = -1;
+
+ // RAM
+ f = fopen("/proc/meminfo", "r");
+ if (f)
+ {
+ (void) fscanf(f, "MemTotal: %d kB\n", &totalRAMkB);
+ (void) fscanf(f, "MemFree: %d kB\n", &freeRAMkB);
+ (void) fscanf(f, "Buffers: %d kB\n", &buffersRAMkB);
+ (void) fscanf(f, "Cached: %d kB\n", &cachedRAMkB);
+
+ fclose(f);
+ }
+ else
+ {
+ PRINTE(bToLog, logFile, "Failed to open /proc/meminfo");
+ }
+
+ f = fopen("/proc/buddyinfo", "r");
+ if (f)
+ {
+ char line[256];
+ int lineNum = 0;
+ int slots[NUM_SLOTS];
+ int i;
+
+ //
+ // Get the number of free blocks for each size.
+ // Separation into nodes and zones is not kept.
+ //
+ while (fgets(line, sizeof(line), f))
+ {
+ int j = 0;
+ int n;
+ int tmpSlots[NUM_SLOTS];
+ char* buf = line;
+
+ (void) sscanf(buf, "Node %*d, zone %*s%n", &n);
+ buf += n;
+
+ while (sscanf(buf, "%d%n", &tmpSlots[j], &n) == 1)
+ {
+ buf += n;
+ slots[j] = lineNum ? slots[j] + tmpSlots[j] : tmpSlots[j];
+ j++;
+ }
+
+ lineNum++;
+ }
+
+ fclose(f);
+
+ // Extract info about the largest available blocks
+ i = NUM_SLOTS - 1;
+ while (slots[i] == 0 && i > 0)
+ i--;
+ numLargestRAMBlock = slots[i];
+ largestFreeRAMBlockB = (1 << i) * PAGE_SIZE;
+ }
+ else
+ {
+ PRINTE(bToLog, logFile, "Failed to open /proc/buddyinfo");
+ }
+
+ // CPU 0/1 On/Off
+ f = fopen("/sys/devices/system/cpu/cpu0/online", "r");
+ if (f)
+ {
+ (void) fscanf(f, "%d", &isCpu0Active);
+ fclose(f);
+ }
+ else
+ {
+ PRINTE(bToLog, logFile, "/sys/devices/system/cpu/cpu0/online");
+ }
+
+ f = fopen("/sys/devices/system/cpu/cpu1/online", "r");
+ if (f)
+ {
+ (void) fscanf(f, "%d", &isCpu1Active);
+ fclose(f);
+ }
+ else
+ {
+ PRINTE(bToLog, logFile, "/sys/devices/system/cpu/cpu1/online");
+ }
+
+ // CPU 2/3 On/Off
+ f = fopen("/sys/devices/system/cpu/cpu2/online", "r");
+ if (f)
+ {
+ (void) fscanf(f, "%d", &isCpu2Active);
+ fclose(f);
+ }
+ else
+ {
+ no_cpus = 2;
+ }
+
+ if (no_cpus == 4)
+ {
+ f = fopen("/sys/devices/system/cpu/cpu3/online", "r");
+ if (f)
+ {
+ (void) fscanf(f, "%d", &isCpu3Active);
+ fclose(f);
+ }
+ }
+
+ // EDP limit
+ f = fopen(EDP_LIMIT_DEBUGFS_PATH, "r");
+ if (f)
+ {
+ (void) fscanf(f, "%d", &edp_limit);
+ fclose(f);
+ }
+
+ // CPU load
+ f = fopen("/proc/stat", "r");
+ if (f)
+ {
+ int c[40];
+ int l[40];
+ int i;
+
+ //
+ // from http://www.mjmwired.net/kernel/Documentation/filesystems/proc.txt
+ // Various pieces of information about kernel activity are available
+ // in the /proc/stat file. All of the numbers reported in this file
+ // are aggregates since the system first booted. The very first
+ // "cpu" line aggregates the numbers in all of the other "cpuN"
+ // lines. These numbers identify the amount of time the CPU has spent
+ // performing different kinds of work. Time units are in USER_HZ
+ // (typically hundredths of a second). The meanings of the columns
+ // are as follows, from left to right:
+ // - user: normal processes executing in user mode
+ // - nice: niced processes executing in user mode
+ // - system: processes executing in kernel mode
+ // - idle: twiddling thumbs
+ // - iowait: waiting for I/O to complete
+ // - irq: servicing interrupts
+ // - softirq: servicing softirqs
+ // - steal: involuntary wait
+ // - guest: running a normal guest
+ // - guest_nice: running a niced guest
+ //
+
+ memset(c, 0, sizeof(c));
+
+ for (;;)
+ {
+ int *p;
+ int r;
+ char cpunum;
+
+ r = fscanf(f, "cpu%c", &cpunum);
+
+ if (r != 1)
+ break;
+ if (cpunum < '0' || cpunum > '3')
+ {
+ (void) fscanf(f, "%*[^\n]\n");
+ continue;
+ }
+
+ p = c + (cpunum - '0') * 10;
+
+ r = fscanf(f, "%d %d %d %d %d %d %d %d %d %d\n",
+ p, p+1, p+2, p+3, p+4, p+5, p+6, p+7, p+8, p+9);
+
+ if (r != 10)
+ memset(p, 0, 10 * sizeof(int));
+
+ }
+
+ fclose(f);
+
+ //
+ // cpu load = (time spent on something else but idle since the last
+ // update) / (total time spent since the last update)
+ //
+ cpu0Load = 0;
+ cpu1Load = 0;
+ cpu2Load = 0;
+ cpu3Load = 0;
+ for (i = 0;i < (no_cpus*10); i++)
+ {
+ l[i] = c[i] - cpuLoadPrev[i];
+ if (i < 10)
+ cpu0Load += l[i];
+ else if (i < 20)
+ cpu1Load += l[i];
+ else if (i < 30)
+ cpu2Load += l[i];
+ else
+ cpu3Load += l[i];
+ cpuLoadPrev[i] = c[i];
+ }
+ /* if (debug)
+ LOGE("total0 %d idle0 %d | total1 %d idle1 %d", cpu0Load,
+ l[3+9], cpu1Load, l[3+18]); */
+ if (cpu0Load)
+ cpu0Load = 100*(cpu0Load-l[3])/cpu0Load;
+ if (cpu1Load)
+ cpu1Load = 100*(cpu1Load-l[3+10])/cpu1Load;
+ if (no_cpus == 4)
+ {
+ if (cpu2Load)
+ cpu2Load = 100*(cpu2Load-l[3+20])/cpu2Load;
+ if (cpu3Load)
+ cpu3Load = 100*(cpu3Load-l[3+30])/cpu3Load;
+ }
+ }
+ else
+ {
+ PRINTE(bToLog, logFile, "Failed to open /proc/stat");
+ }
+
+ // Carveout
+ switch (chipId)
+ {
+ case T30_CHIPID:
+ break;
+ case AP20_CHIPID:
+ default:
+ READ_VALUE(bToLog, logFile, CARVEOUT(total_size),
+ &totalCarveoutB);
+ READ_VALUE(bToLog, logFile, CARVEOUT(free_size),
+ &freeCarveoutB);
+ READ_VALUE(bToLog, logFile, CARVEOUT(free_max),
+ &largestFreeCarveoutBlockB);
+ break;
+ }
+
+ // GART
+ f = fopen("/proc/iovmminfo", "r");
+ if (f)
+ {
+ char tmp[4];
+ // add if (blah) {} to get around compiler warning
+ if(fscanf(f, "\ngroups\n\t<unnamed> (device: iovmm-%4c)\n\t\tsize: "
+ "%dKiB free: %dKiB largest: %dKiB",
+ &tmp[0], &totalGARTkB, &freeGARTkB,
+ &largestFreeGARTBlockkB)) {}
+ fclose(f);
+ }
+ else
+ {
+ PRINTE(bToLog, logFile, "Failed to open /proc/iovmminfo");
+ }
+
+ // If the largest free GART block is -1, change it to 0.
+ if (largestFreeGARTBlockkB == -1)
+ largestFreeGARTBlockkB = 0;
+
+ // IRAM
+ READ_VALUE(bToLog, logFile, IRAM(total_size), &totalIRAMB);
+ READ_VALUE(bToLog, logFile, IRAM(free_size), &freeIRAMB);
+ READ_VALUE(bToLog, logFile, IRAM(free_max), &largestFreeIRAMBlockB);
+
+ // CPU
+ f = fopen("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq", "r");
+ if (f)
+ {
+ (void) fscanf(f, "%d", &currCpuFreq);
+ fclose(f);
+ }
+ // DFS
+ READ_VALUE(bToLog, logFile, EMCCLK, &emcClk);
+ READ_VALUE(bToLog, logFile, AVPCLK, &avpClk);
+ READ_VALUE(bToLog, logFile, VDECLK, &vdeClk);
+
+ {
+ char cpu0String[5], cpu1String[5];
+ char cpu2String[5], cpu3String[5];
+ char lfbRAM[10], lfbCarveout[10], lfbGART[10], lfbIRAM[10];
+ if (isCpu0Active)
+ {
+ snprintf(cpu0String, 5, "%d%%", cpu0Load);
+ }
+ else
+ {
+ snprintf(cpu0String, 5, "off");
+ }
+
+ if (isCpu1Active)
+ {
+ snprintf(cpu1String, 5, "%d%%", cpu1Load);
+ }
+ else
+ {
+ snprintf(cpu1String, 5, "off");
+ }
+
+ if (no_cpus == 4)
+ {
+ if (isCpu2Active)
+ {
+ snprintf(cpu2String, 5, "%d%%", cpu2Load);
+ }
+ else
+ {
+ snprintf(cpu2String, 5, "off");
+ }
+
+ if (isCpu3Active)
+ {
+ snprintf(cpu3String, 5, "%d%%", cpu3Load);
+ }
+ else
+ {
+ snprintf(cpu3String, 5, "off");
+ }
+ }
+ SmartB2Str(lfbRAM, 10, largestFreeRAMBlockB);
+ SmartB2Str(lfbCarveout, 10, largestFreeCarveoutBlockB);
+ SmartB2Str(lfbGART, 10, largestFreeGARTBlockkB * 1024);
+ SmartB2Str(lfbIRAM, 10, largestFreeIRAMBlockB);
+ if (no_cpus == 2)
+ {
+ switch (chipId)
+ {
+ case T30_CHIPID:
+ PRINTE(bToLog, logFile, "RAM %d/%dMB (lfb %dx%s) IRAM "
+ "%d/%dkB(lfb %s) cpu [%s,%s]@%d EMC %d AVP %d "
+ "VDE %d EDP limit %d",
+ kB2MB(totalRAMkB-freeRAMkB-buffersRAMkB-cachedRAMkB),
+ kB2MB(totalRAMkB), numLargestRAMBlock, lfbRAM,
+ B2kB(totalIRAMB-freeIRAMB),
+ B2kB(totalIRAMB), lfbIRAM, cpu0String, cpu1String,
+ currCpuFreq/FREQUENCY_CONVERT,
+ emcClk/(FREQUENCY_CONVERT*FREQUENCY_CONVERT),
+ avpClk/(FREQUENCY_CONVERT*FREQUENCY_CONVERT),
+ vdeClk/(FREQUENCY_CONVERT*FREQUENCY_CONVERT),
+ edp_limit);
+ break;
+
+ case AP20_CHIPID:
+ // intentionally fall through
+ default:
+ PRINTE(bToLog, logFile, "RAM %d/%dMB (lfb %dx%s) "
+ "Carveout %d/%dMB (lfb %s) GART %d/%dMB (lfb %s)"
+ " IRAM %d/%dkB(lfb %s) cpu [%s,%s]@%d EMC %d AVP"
+ " %d VDE %d EDP limit %d",
+ kB2MB(totalRAMkB-freeRAMkB-buffersRAMkB-cachedRAMkB),
+ kB2MB(totalRAMkB), numLargestRAMBlock, lfbRAM,
+ B2MB(totalCarveoutB-freeCarveoutB),
+ B2MB(totalCarveoutB), lfbCarveout,
+ kB2MB(totalGARTkB-freeGARTkB), kB2MB(totalGARTkB),
+ lfbGART, B2kB(totalIRAMB-freeIRAMB), B2kB(totalIRAMB),
+ lfbIRAM, cpu0String, cpu1String,
+ currCpuFreq/FREQUENCY_CONVERT,
+ emcClk/(FREQUENCY_CONVERT*FREQUENCY_CONVERT),
+ avpClk/(FREQUENCY_CONVERT*FREQUENCY_CONVERT),
+ vdeClk/(FREQUENCY_CONVERT*FREQUENCY_CONVERT),
+ edp_limit);
+ break;
+ }
+
+ }
+ else
+ {
+ switch (chipId)
+ {
+ case T30_CHIPID:
+ PRINTE(bToLog, logFile, "RAM %d/%dMB (lfb %dx%s) IRAM "
+ "%d/%dkB(lfb %s) cpu [%s,%s,%s,%s]@%d EMC %d AVP"
+ " %d VDE %d EDP limit %d",
+ kB2MB(totalRAMkB-freeRAMkB-buffersRAMkB-cachedRAMkB),
+ kB2MB(totalRAMkB), numLargestRAMBlock, lfbRAM,
+ B2kB(totalIRAMB-freeIRAMB), B2kB(totalIRAMB),
+ lfbIRAM, cpu0String, cpu1String, cpu2String,
+ cpu3String, currCpuFreq/FREQUENCY_CONVERT,
+ emcClk/(FREQUENCY_CONVERT*FREQUENCY_CONVERT),
+ avpClk/(FREQUENCY_CONVERT*FREQUENCY_CONVERT),
+ vdeClk/(FREQUENCY_CONVERT*FREQUENCY_CONVERT),
+ edp_limit);
+ break;
+
+ case AP20_CHIPID:
+ // intentionally fall through
+ default:
+ PRINTE(bToLog, logFile, "RAM %d/%dMB (lfb %dx%s) "
+ "Carveout %d/%dMB (lfb %s) GART %d/%dMB (lfb %s)"
+ " IRAM %d/%dkB(lfb %s) cpu [%s,%s,%s,%s]@%d "
+ "EMC %d AVP %d VDE %d EDP limit %d",
+ kB2MB(totalRAMkB-freeRAMkB-buffersRAMkB-cachedRAMkB),
+ kB2MB(totalRAMkB), numLargestRAMBlock, lfbRAM,
+ B2MB(totalCarveoutB-freeCarveoutB),
+ B2MB(totalCarveoutB), lfbCarveout,
+ kB2MB(totalGARTkB-freeGARTkB), kB2MB(totalGARTkB),
+ lfbGART, B2kB(totalIRAMB-freeIRAMB),
+ B2kB(totalIRAMB), lfbIRAM, cpu0String, cpu1String,
+ cpu2String, cpu3String, currCpuFreq/FREQUENCY_CONVERT,
+ emcClk/(FREQUENCY_CONVERT*FREQUENCY_CONVERT),
+ avpClk/(FREQUENCY_CONVERT*FREQUENCY_CONVERT),
+ vdeClk/(FREQUENCY_CONVERT*FREQUENCY_CONVERT),
+ edp_limit);
+ break;
+ }
+ }
+ }
+
+ // fflush stdout (on LDK) to make the output redirectable.
+ logFlush();
+#ifndef GTK_OUTPUT
+ usleep(sleepMS*1000);
+#endif
+ }
+
+ return 0;
+}
+
+/* example contents of /proc/meminfo
+MemTotal: 450164 kB
+MemFree: 269628 kB
+Buffers: 2320 kB
+Cached: 69008 kB
+SwapCached: 0 kB
+Active: 89476 kB
+Inactive: 63612 kB
+Active(anon): 82272 kB
+Inactive(anon): 0 kB
+Active(file): 7204 kB
+Inactive(file): 63612 kB
+Unevictable: 0 kB
+Mlocked: 0 kB
+SwapTotal: 0 kB
+SwapFree: 0 kB
+Dirty: 0 kB
+Writeback: 0 kB
+AnonPages: 81764 kB
+Mapped: 35148 kB
+Slab: 5204 kB
+SReclaimable: 1760 kB
+SUnreclaim: 3444 kB
+PageTables: 4316 kB
+NFS_Unstable: 0 kB
+Bounce: 0 kB
+WritebackTmp: 0 kB
+CommitLimit: 225080 kB
+Committed_AS: 1054316 kB
+VmallocTotal: 450560 kB
+VmallocUsed: 45964 kB
+VmallocChunk: 340056 kB
+
+http://www.linuxweblog.com/meminfo
+ * MemTotal: Total usable ram (i.e. physical ram minus a few reserved bits
+ and the kernel binary code)
+ * MemFree: Is sum of LowFree+HighFree (overall stat)
+ * MemShared: 0 is here for compat reasons but always zero.
+ * Buffers: Memory in buffer cache. mostly useless as metric nowadays
+ * Cached: Memory in the pagecache (diskcache) minus SwapCache
+ * SwapCache: Memory that once was swapped out, is swapped back in but still
+ also is in the swapfile (if memory is needed it doesn't need to be swapped
+ out AGAIN because it is already in the swapfile. This saves I/O)
+
+VM splits the cache pages into "active" and "inactive" memory. The idea is that
+if you need memory and some cache needs to be sacrificed for that, you take it
+from inactive since that's expected to be not used. The vm checks what is used
+on a regular basis and moves stuff around. When you use memory, the CPU sets a
+bit in the pagetable and the VM checks that bit occasionally, and based on that,
+it can move pages back to active. And within active there's an order of "longest
+ago not used" (roughly, it's a little more complex in reality).
+ * Active: Memory that has been used more recently and usually not reclaimed
+ unless absolutely necessary.
+ * Inact_dirty: Dirty means "might need writing to disk or swap." Takes more
+ work to free. Examples might be files that have not been written to yet.
+ They aren't written to memory too soon in order to keep the I/O down. For
+ instance, if you're writing logs, it might be better to wait until you have
+ a complete log ready before sending it to disk.
+ * Inact_clean: Assumed to be easily freeable. The kernel will try to keep
+ some clean stuff around always to have a bit of breathing room.
+ * Inact_target: Just a goal metric the kernel uses for making sure there are
+ enough inactive pages around. When exceeded, the kernel will not do work to
+ move pages from active to inactive. A page can also get inactive in a few
+ other ways, e.g. if you do a long sequential I/O, the kernel assumes you're
+ not going to use that memory and makes it inactive preventively. So you can
+ get more inactive pages than the target because the kernel marks some cache
+ as "more likely to be never used" and lets it cheat in the "last used"
+ order.
+ * HighTotal: is the total amount of memory in the high region. Highmem is all
+ memory above (approx) 860MB of physical RAM. Kernel uses indirect tricks to
+ access the high memory region. Data cache can go in this memory region.
+ * LowTotal: The total amount of non-highmem memory.
+ * LowFree: The amount of free memory of the low memory region. This is the
+ memory the kernel can address directly. All kernel datastructures need to go
+ into low memory.
+ * SwapTotal: Total amount of physical swap memory.
+ * SwapFree: Total amount of swap memory free.
+ * Committed_AS: An estimate of how much RAM you would need to make a 99.99%
+ guarantee that there never is OOM (out of memory) for this workload. Normally
+ the kernel will overcommit memory. The Committed_AS is a guesstimate of how
+ much RAM/swap you would need worst-case.
+*/
diff --git a/recipes/tegrastats-gtk/files/stats.c b/recipes/tegrastats-gtk/files/stats.c
new file mode 100644
index 0000000..a02bf68
--- /dev/null
+++ b/recipes/tegrastats-gtk/files/stats.c
@@ -0,0 +1,42 @@
+#include <gtk/gtk.h>
+void GetStats(char * str);
+gboolean
+UpdateTitle (gpointer user_data)
+{
+ gchar title[255];
+
+ (void)GetStats(title);
+ gtk_window_set_title ((GtkWindow*)user_data, title);
+ //we want to start a new intervall
+ return 1;
+}
+
+void
+destroy (void)
+{
+ gtk_main_quit ();
+}
+
+int
+main (int argc, char *argv[])
+{
+ GtkWidget *window;
+
+ gtk_init (&argc, &argv);
+
+ window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_signal_connect (GTK_OBJECT (window), "destroy",
+ GTK_SIGNAL_FUNC (destroy), NULL);
+ gtk_container_border_width (GTK_CONTAINER (window), 10);
+ gtk_window_set_default_size ((GtkWindow*)window, 1200, 0);
+
+ (void)UpdateTitle(GTK_CONTAINER (window));
+
+ //update title every 2 seconds
+ g_timeout_add_seconds (1, UpdateTitle, window);
+ gtk_widget_show (window);
+
+ gtk_main ();
+
+ return 0;
+}
diff --git a/recipes/tegrastats-gtk/tegrastats-gtk.bb b/recipes/tegrastats-gtk/tegrastats-gtk.bb
new file mode 100644
index 0000000..9f6f8d5
--- /dev/null
+++ b/recipes/tegrastats-gtk/tegrastats-gtk.bb
@@ -0,0 +1,17 @@
+DESCRIPTION = "NVIDIAS tegrastats output in a gtk title bar"
+LICENSE = "NVIDIA Propriatry"
+
+DEPENDS = "gtk+"
+PR = "r1"
+
+S = "${WORKDIR}"
+
+SRC_URI="file://stats.c file://main.c file://Makefile"
+LIC_FILES_CHKSUM = "file://main.c;endline=9;md5=2fa47532d931bff0348b6d6835bf86ed"
+
+do_install () {
+ install -d ${D}${bindir}/
+ install -m 0755 ${S}/tegrastats-gtk ${D}${bindir}/
+}
+
+FILES_${PN} = "${bindir}/tegrastats-gtk" \ No newline at end of file
diff --git a/recipes/tegrastats-gtk/tegrastats-gtk.bb~ b/recipes/tegrastats-gtk/tegrastats-gtk.bb~
new file mode 100644
index 0000000..00746d2
--- /dev/null
+++ b/recipes/tegrastats-gtk/tegrastats-gtk.bb~
@@ -0,0 +1,16 @@
+DESCRIPTION = "NVIDIAS tegrastats output in a gtk title bar"
+LICENSE = "NVIDIA Propriatry"
+
+PR = "r1"
+
+S = "${WORKDIR}"
+
+SRC_URI="file://stats.c file://main.c file://Makefile"
+LIC_FILES_CHKSUM = "file://main.c;endline=9;md5=yyyy "
+
+do_install () {
+ install -d ${D}${bindir}/
+ install -m 0755 ${S}/tegrastats-gtk ${D}${bindir}/
+}
+
+FILES_${PN} = "${bindir}/tegrastats-gtk" \ No newline at end of file