summaryrefslogtreecommitdiff
path: root/libre-testing
diff options
context:
space:
mode:
Diffstat (limited to 'libre-testing')
-rw-r--r--libre-testing/uboot-udoo/0001-parabola-arm-modifications.patch40
-rw-r--r--libre-testing/uboot-udoo/0001-parabola-arm-modifications.patch.testing140
-rw-r--r--libre-testing/uboot-udoo/0001-parabola-arm-modifications.patch.testing2628
-rw-r--r--libre-testing/uboot-udoo/0002-kernel-add-support-for-gcc-5.patch97
-rw-r--r--libre-testing/uboot-udoo/PKGBUILD68
-rw-r--r--libre-testing/uboot-udoo/extlinux.conf46
-rw-r--r--libre-testing/uboot-udoo/uboot-udoo.install28
7 files changed, 947 insertions, 0 deletions
diff --git a/libre-testing/uboot-udoo/0001-parabola-arm-modifications.patch b/libre-testing/uboot-udoo/0001-parabola-arm-modifications.patch
new file mode 100644
index 000000000..d2bf83216
--- /dev/null
+++ b/libre-testing/uboot-udoo/0001-parabola-arm-modifications.patch
@@ -0,0 +1,40 @@
+diff -Nur u-boot-2015.01.orig/include/configs/udoo.h u-boot-2015.01/include/configs/udoo.h
+--- u-boot-2015.01.orig/include/configs/udoo.h 2015-01-12 12:39:08.000000000 -0200
++++ u-boot-2015.01/include/configs/udoo.h 2016-02-24 00:50:18.771357005 -0300
+@@ -98,9 +98,14 @@
+ #define CONFIG_CMD_FAT
+ #define CONFIG_DOS_PARTITION
+
+-#define CONFIG_DEFAULT_FDT_FILE "imx6q-udoo.dtb"
++/* Enable extlinux boot support */
++#define CONFIG_CMD_PXE
++#define CONFIG_MENU
++#define BOOT_TARGET_DEVICES(func)
++#include <config_distro_bootcmd.h>
+
+ #define CONFIG_EXTRA_ENV_SETTINGS \
++ BOOTENV \
+ "script=boot.scr\0" \
+ "image=zImage\0" \
+ "console=ttymxc1\0" \
+@@ -111,9 +116,11 @@
+ "fdt_addr=0x18000000\0" \
+ "boot_fdt=try\0" \
+ "ip_dyn=yes\0" \
++ "devtype=mmc\0" \
++ "devnum=0\0" \
+ "mmcdev=0\0" \
+ "mmcpart=1\0" \
+- "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
++ "mmcroot=/dev/mmcblk0p1 rw rootwait\0" \
+ "update_sd_firmware_filename=u-boot.imx\0" \
+ "update_sd_firmware=" \
+ "if test ${ip_dyn} = yes; then " \
+@@ -178,6 +185,7 @@
+
+ #define CONFIG_BOOTCOMMAND \
+ "mmc dev ${mmcdev}; if mmc rescan; then " \
++ "run scan_dev_for_boot;" \
+ "if run loadbootscript; then " \
+ "run bootscript; " \
+ "else " \
diff --git a/libre-testing/uboot-udoo/0001-parabola-arm-modifications.patch.testing1 b/libre-testing/uboot-udoo/0001-parabola-arm-modifications.patch.testing1
new file mode 100644
index 000000000..d2bf83216
--- /dev/null
+++ b/libre-testing/uboot-udoo/0001-parabola-arm-modifications.patch.testing1
@@ -0,0 +1,40 @@
+diff -Nur u-boot-2015.01.orig/include/configs/udoo.h u-boot-2015.01/include/configs/udoo.h
+--- u-boot-2015.01.orig/include/configs/udoo.h 2015-01-12 12:39:08.000000000 -0200
++++ u-boot-2015.01/include/configs/udoo.h 2016-02-24 00:50:18.771357005 -0300
+@@ -98,9 +98,14 @@
+ #define CONFIG_CMD_FAT
+ #define CONFIG_DOS_PARTITION
+
+-#define CONFIG_DEFAULT_FDT_FILE "imx6q-udoo.dtb"
++/* Enable extlinux boot support */
++#define CONFIG_CMD_PXE
++#define CONFIG_MENU
++#define BOOT_TARGET_DEVICES(func)
++#include <config_distro_bootcmd.h>
+
+ #define CONFIG_EXTRA_ENV_SETTINGS \
++ BOOTENV \
+ "script=boot.scr\0" \
+ "image=zImage\0" \
+ "console=ttymxc1\0" \
+@@ -111,9 +116,11 @@
+ "fdt_addr=0x18000000\0" \
+ "boot_fdt=try\0" \
+ "ip_dyn=yes\0" \
++ "devtype=mmc\0" \
++ "devnum=0\0" \
+ "mmcdev=0\0" \
+ "mmcpart=1\0" \
+- "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
++ "mmcroot=/dev/mmcblk0p1 rw rootwait\0" \
+ "update_sd_firmware_filename=u-boot.imx\0" \
+ "update_sd_firmware=" \
+ "if test ${ip_dyn} = yes; then " \
+@@ -178,6 +185,7 @@
+
+ #define CONFIG_BOOTCOMMAND \
+ "mmc dev ${mmcdev}; if mmc rescan; then " \
++ "run scan_dev_for_boot;" \
+ "if run loadbootscript; then " \
+ "run bootscript; " \
+ "else " \
diff --git a/libre-testing/uboot-udoo/0001-parabola-arm-modifications.patch.testing2 b/libre-testing/uboot-udoo/0001-parabola-arm-modifications.patch.testing2
new file mode 100644
index 000000000..dbb449c7c
--- /dev/null
+++ b/libre-testing/uboot-udoo/0001-parabola-arm-modifications.patch.testing2
@@ -0,0 +1,628 @@
+diff -Nur u-boot-2015.01.orig/board/udoo/1066mhz_4x256mx16_dl.cfg u-boot-2015.01/board/udoo/1066mhz_4x256mx16_dl.cfg
+--- u-boot-2015.01.orig/board/udoo/1066mhz_4x256mx16_dl.cfg 1969-12-31 21:00:00.000000000 -0300
++++ u-boot-2015.01/board/udoo/1066mhz_4x256mx16_dl.cfg 2016-02-23 18:15:32.854611743 -0300
+@@ -0,0 +1,58 @@
++/*
++ * Copyright (C) 2013 Seco USA Inc
++ *
++ * SPDX-License-Identifier: GPL-2.0+
++ */
++
++
++DATA 4, MX6_MMDC_P0_MDPDC, 0x0002002D
++DATA 4, MX6_MMDC_P0_MDOTC, 0x00333040
++
++DATA 4, MX6_MMDC_P0_MDCFG0, 0x3F4352F3
++DATA 4, MX6_MMDC_P0_MDCFG1, 0xB66D8B63
++DATA 4, MX6_MMDC_P0_MDCFG2, 0x01FF00DB
++
++DATA 4, MX6_MMDC_P0_MDMISC, 0x00001740
++DATA 4, MX6_MMDC_P0_MDSCR, 0x00008000
++DATA 4, MX6_MMDC_P0_MDRWD, 0x000026D2
++
++
++DATA 4, MX6_MMDC_P0_MDOR, 0x00431023
++DATA 4, MX6_MMDC_P0_MDASP, 0x00000027
++DATA 4, MX6_MMDC_P0_MDCTL, 0x831A0000
++
++DATA 4, MX6_MMDC_P0_MDSCR, 0x02008032
++DATA 4, MX6_MMDC_P0_MDSCR, 0x00008033
++DATA 4, MX6_MMDC_P0_MDSCR, 0x00048031
++DATA 4, MX6_MMDC_P0_MDSCR, 0x05208030
++DATA 4, MX6_MMDC_P0_MDSCR, 0x04008040
++
++DATA 4, MX6_MMDC_P0_MPZQHWCTRL, 0xa1390003
++DATA 4, MX6_MMDC_P1_MPZQHWCTRL, 0xa1390003
++
++DATA 4, MX6_MMDC_P0_MDREF, 0x00007800
++
++DATA 4, MX6_MMDC_P0_MPODTCTRL, 0x00022227
++DATA 4, MX6_MMDC_P1_MPODTCTRL, 0x00022227
++
++DATA 4, MX6_MMDC_P0_MPDGCTRL0, 0x425C0251
++DATA 4, MX6_MMDC_P0_MPDGCTRL1, 0x021B021E
++DATA 4, MX6_MMDC_P1_MPDGCTRL0, 0x021B021E
++DATA 4, MX6_MMDC_P1_MPDGCTRL1, 0x01730200
++
++DATA 4, MX6_MMDC_P0_MPRDDLCTL, 0x45474C45
++DATA 4, MX6_MMDC_P1_MPRDDLCTL, 0x44464744
++DATA 4, MX6_MMDC_P0_MPWRDLCTL, 0x3F3F3336
++DATA 4, MX6_MMDC_P1_MPWRDLCTL, 0x32383630
++
++DATA 4, MX6_MMDC_P0_MPWLDECTRL0, 0x002F0038
++DATA 4, MX6_MMDC_P0_MPWLDECTRL1, 0x001F001F
++DATA 4, MX6_MMDC_P1_MPWLDECTRL0, 0x001F001F
++DATA 4, MX6_MMDC_P1_MPWLDECTRL1, 0x001F001F
++
++DATA 4, MX6_MMDC_P0_MPMUR0, 0x00000000
++DATA 4, MX6_MMDC_P1_MPMUR0, 0x00000000
++
++DATA 4, MX6_MMDC_P0_MDPDC, 0x0002556D
++DATA 4, MX6_MMDC_P0_MAPSR, 0x00011006
++DATA 4, MX6_MMDC_P0_MDSCR, 0x00000000
+diff -Nur u-boot-2015.01.orig/board/udoo/ddr-setup_dl.cfg u-boot-2015.01/board/udoo/ddr-setup_dl.cfg
+--- u-boot-2015.01.orig/board/udoo/ddr-setup_dl.cfg 1969-12-31 21:00:00.000000000 -0300
++++ u-boot-2015.01/board/udoo/ddr-setup_dl.cfg 2016-02-23 18:15:32.854611743 -0300
+@@ -0,0 +1,84 @@
++/*
++ * Copyright (C) 2013 Seco USA Inc
++ *
++ * SPDX-License-Identifier: GPL-2.0+
++ *
++ * Device Configuration Data (DCD)
++ *
++ * Each entry must have the format:
++ * Addr-type Address Value
++ *
++ * where:
++ * Addr-type register length (1,2 or 4 bytes)
++ * Address absolute address of the register
++ * value value to be stored in the register
++ */
++
++/*
++ * DDR3 settings
++ * MX6Q ddr is limited to 1066 Mhz currently 1056 MHz(528 MHz clock),
++ * memory bus width: 64 bits x16/x32/x64
++ * MX6DL ddr is limited to 800 MHz(400 MHz clock)
++ * memory bus width: 64 bits x16/x32/x64
++ * MX6SOLO ddr is limited to 800 MHz(400 MHz clock)
++ * memory bus width: 32 bits x16/x32
++ */
++DATA 4, MX6_IOM_DRAM_SDQS0, 0x00000028
++DATA 4, MX6_IOM_DRAM_SDQS1, 0x00000028
++DATA 4, MX6_IOM_DRAM_SDQS2, 0x00000028
++DATA 4, MX6_IOM_DRAM_SDQS3, 0x00000028
++DATA 4, MX6_IOM_DRAM_SDQS4, 0x00000028
++DATA 4, MX6_IOM_DRAM_SDQS5, 0x00000028
++DATA 4, MX6_IOM_DRAM_SDQS6, 0x00000028
++DATA 4, MX6_IOM_DRAM_SDQS7, 0x00000028
++
++DATA 4, MX6_IOM_GRP_B0DS, 0x00000028
++DATA 4, MX6_IOM_GRP_B1DS, 0x00000028
++DATA 4, MX6_IOM_GRP_B2DS, 0x00000028
++DATA 4, MX6_IOM_GRP_B3DS, 0x00000028
++DATA 4, MX6_IOM_GRP_B4DS, 0x00000028
++DATA 4, MX6_IOM_GRP_B5DS, 0x00000028
++DATA 4, MX6_IOM_GRP_B6DS, 0x00000028
++DATA 4, MX6_IOM_GRP_B7DS, 0x00000028
++DATA 4, MX6_IOM_GRP_ADDDS, 0x00000028
++
++DATA 4, MX6_IOM_GRP_CTLDS, 0x00000028
++
++DATA 4, MX6_IOM_DRAM_DQM0, 0x00000028
++DATA 4, MX6_IOM_DRAM_DQM1, 0x00000028
++DATA 4, MX6_IOM_DRAM_DQM2, 0x00000028
++DATA 4, MX6_IOM_DRAM_DQM3, 0x00000028
++DATA 4, MX6_IOM_DRAM_DQM4, 0x00000028
++DATA 4, MX6_IOM_DRAM_DQM5, 0x00000028
++DATA 4, MX6_IOM_DRAM_DQM6, 0x00000028
++DATA 4, MX6_IOM_DRAM_DQM7, 0x00000028
++
++DATA 4, MX6_IOM_DRAM_CAS, 0x00000028
++DATA 4, MX6_IOM_DRAM_RAS, 0x00000028
++DATA 4, MX6_IOM_DRAM_SDCLK_0, 0x00000028
++DATA 4, MX6_IOM_DRAM_SDCLK_1, 0x00000028
++
++DATA 4, MX6_IOM_DRAM_RESET, 0x00000028
++
++DATA 4, MX6_IOM_DRAM_SDODT0, 0x00000028
++DATA 4, MX6_IOM_DRAM_SDODT1, 0x00000028
++
++/* (differential input) */
++DATA 4, MX6_IOM_DDRMODE_CTL, 0x00020000
++/* (differential input) */
++DATA 4, MX6_IOM_GRP_DDRMODE, 0x00020000
++/* disable ddr pullups */
++DATA 4, MX6_IOM_GRP_DDRPKE, 0x00000000
++DATA 4, MX6_IOM_DRAM_SDBA2, 0x00000000
++/* 40 Ohm drive strength for cs0/1,sdba2,cke0/1,sdwe */
++DATA 4, MX6_IOM_GRP_DDR_TYPE, 0x000C0000
++
++/* Read data DQ Byte0-3 delay */
++DATA 4, MX6_MMDC_P0_MPRDDQBY0DL, 0x33333333
++DATA 4, MX6_MMDC_P0_MPRDDQBY1DL, 0x33333333
++DATA 4, MX6_MMDC_P0_MPRDDQBY2DL, 0x33333333
++DATA 4, MX6_MMDC_P0_MPRDDQBY3DL, 0x33333333
++DATA 4, MX6_MMDC_P1_MPRDDQBY0DL, 0x33333333
++DATA 4, MX6_MMDC_P1_MPRDDQBY1DL, 0x33333333
++DATA 4, MX6_MMDC_P1_MPRDDQBY2DL, 0x33333333
++DATA 4, MX6_MMDC_P1_MPRDDQBY3DL, 0x33333333
+diff -Nur u-boot-2015.01.orig/board/udoo/udoo-dl.cfg u-boot-2015.01/board/udoo/udoo-dl.cfg
+--- u-boot-2015.01.orig/board/udoo/udoo-dl.cfg 1969-12-31 21:00:00.000000000 -0300
++++ u-boot-2015.01/board/udoo/udoo-dl.cfg 2016-02-23 18:15:32.854611743 -0300
+@@ -0,0 +1,29 @@
++/*
++ * Copyright (C) 2013 Boundary Devices
++ *
++ * SPDX-License-Identifier: GPL-2.0+
++ *
++ * Refer doc/README.imximage for more details about how-to configure
++ * and create imximage boot image
++ *
++ * The syntax is taken as close as possible with the kwbimage
++ */
++
++/* image version */
++IMAGE_VERSION 2
++
++/*
++ * Boot Device : one of
++ * spi, sd (the board has no nand neither onenand)
++ */
++BOOT_FROM sd
++
++#define __ASSEMBLY__
++#include <config.h>
++#include "asm/arch/mx6-ddr.h"
++#include "asm/arch/iomux.h"
++#include "asm/arch/crm_regs.h"
++
++#include "ddr-setup_dl.cfg"
++#include "1066mhz_4x256mx16_dl.cfg"
++#include "clocks.cfg"
+diff -Nur u-boot-2015.01.orig/configs/udoo_dl_defconfig u-boot-2015.01/configs/udoo_dl_defconfig
+--- u-boot-2015.01.orig/configs/udoo_dl_defconfig 1969-12-31 21:00:00.000000000 -0300
++++ u-boot-2015.01/configs/udoo_dl_defconfig 2016-02-23 18:15:32.854611743 -0300
+@@ -0,0 +1,3 @@
++CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/udoo/udoo-dl.cfg,MX6DL,DDR_MB=1024"
++CONFIG_ARM=y
++CONFIG_TARGET_UDOO=y
+diff -Nur u-boot-2015.01.orig/include/configs/udoo.h u-boot-2015.01/include/configs/udoo.h
+--- u-boot-2015.01.orig/include/configs/udoo.h 2015-01-12 12:39:08.000000000 -0200
++++ u-boot-2015.01/include/configs/udoo.h 2016-02-23 18:24:17.779054304 -0300
+@@ -78,7 +78,7 @@
+ #define CONFIG_CMD_BMODE
+ #define CONFIG_CMD_SETEXPR
+
+-#define CONFIG_BOOTDELAY 3
++#define CONFIG_BOOTDELAY 1
+
+ #define CONFIG_SYS_MEMTEST_START 0x10000000
+ #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 500 * SZ_1M)
+@@ -96,60 +96,107 @@
+ #define CONFIG_BOUNCE_BUFFER
+ #define CONFIG_CMD_EXT2
+ #define CONFIG_CMD_FAT
++#define CONFIG_CMD_EXT4
++#define CONFIG_CMD_FS_GENERIC
+ #define CONFIG_DOS_PARTITION
+
++#define CONFIG_IDENT_STRING " Parabola GNU/Linux-libre ARM"
++
++#if defined(CONFIG_MX6DL) || defined(CONFIG_MX6S)
++#define CONFIG_DEFAULT_FDT_FILE "imx6dl-udoo.dtb"
++#elif defined(CONFIG_MX6Q)
+ #define CONFIG_DEFAULT_FDT_FILE "imx6q-udoo.dtb"
++#endif
++
++/* Enable extlinux boot support */
++#define CONFIG_CMD_PXE
++#define CONFIG_MENU
++#define BOOT_TARGET_DEVICES(func)
++#include <config_distro_bootcmd.h>
+
+ #define CONFIG_EXTRA_ENV_SETTINGS \
+- "script=boot.scr\0" \
+- "image=zImage\0" \
+- "console=ttymxc1\0" \
++ BOOTENV \
++ "bootfile=zImage\0" \
++ "bootdir=/boot\0" \
++ "console=ttymxc1,115200\0" \
+ "splashpos=m,m\0" \
+ "fdt_high=0xffffffff\0" \
++ "rdaddr=0x12A00000\0" \
++ "rdfile=initramfs-linux.img\0" \
+ "initrd_high=0xffffffff\0" \
+- "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
+- "fdt_addr=0x18000000\0" \
+- "boot_fdt=try\0" \
++ "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
++ "fdtdir=/boot/dtbs\0" \
++ "fdtaddr=0x18000000\0" \
+ "ip_dyn=yes\0" \
++ "optargs=\0" \
++ "video=\0" \
++ "devtype=mmc\0" \
++ "devnum=0\0" \
+ "mmcdev=0\0" \
+- "mmcpart=1\0" \
+- "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
+- "update_sd_firmware_filename=u-boot.imx\0" \
+- "update_sd_firmware=" \
+- "if test ${ip_dyn} = yes; then " \
+- "setenv get_cmd dhcp; " \
++ "mmcroot=/dev/mmcblk0p1 rw rootwait\0" \
++ "mmcargs=setenv bootargs console=${console} " \
++ "${optargs} " \
++ "root=${mmcroot} " \
++ "video=${video}\0" \
++ "videoargs=" \
++ "setenv nextcon 0; " \
++ "if hdmidet; then " \
++ "setenv bootargs ${bootargs} " \
++ "video=mxcfb${nextcon}:dev=hdmi,1280x720M@60," \
++ "if=RGB24; " \
++ "setenv fbmem fbmem=28M; " \
++ "setexpr nextcon ${nextcon} + 1; " \
+ "else " \
+- "setenv get_cmd tftp; " \
++ "echo - no HDMI monitor;" \
+ "fi; " \
+- "if mmc dev ${mmcdev}; then " \
+- "if ${get_cmd} ${update_sd_firmware_filename}; then " \
+- "setexpr fw_sz ${filesize} / 0x200; " \
+- "setexpr fw_sz ${fw_sz} + 1; " \
+- "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
+- "fi; " \
+- "fi\0" \
+- "mmcargs=setenv bootargs console=${console},${baudrate} " \
+- "root=${mmcroot}\0" \
+- "loadbootscript=" \
+- "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
+- "bootscript=echo Running bootscript from mmc ...; " \
+- "source\0" \
+- "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
+- "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
+- "mmcboot=echo Booting from mmc ...; " \
+- "run mmcargs; " \
+- "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
+- "if run loadfdt; then " \
+- "bootz ${loadaddr} - ${fdt_addr}; " \
++ "i2c dev 1; " \
++ "if i2c probe 0x10; then " \
++ "setenv bootargs ${bootargs} " \
++ "video=mxcfb${nextcon}:dev=lcd,800x480@60," \
++ "if=RGB666; " \
++ "if test 0 -eq ${nextcon}; then " \
++ "setenv fbmem fbmem=10M; " \
+ "else " \
+- "if test ${boot_fdt} = try; then " \
+- "bootz; " \
+- "else " \
+- "echo WARN: Cannot load the DT; " \
+- "fi; " \
++ "setenv fbmem ${fbmem},10M; " \
+ "fi; " \
++ "setexpr nextcon ${nextcon} + 1; " \
+ "else " \
+- "bootz; " \
++ "echo '- no FWBADAPT-7WVGA-LCD-F07A-0102 display';" \
++ "fi; " \
++ "setenv bootargs ${bootargs} ${fbmem}\0" \
++ "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
++ "loadrd=load mmc ${bootpart} ${rdaddr} ${bootdir}/${rdfile}\0" \
++ "loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load mmc ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}\0" \
++ "mmcboot=mmc dev ${mmcdev}; " \
++ "if mmc rescan; then " \
++ "echo SD/MMC found on device ${mmcdev};" \
++ "setenv bootpart ${mmcdev}:1; " \
++ "echo Checking for: ${bootdir}/uEnv.txt ...;" \
++ "if test -e mmc ${bootpart} ${bootdir}/uEnv.txt; then " \
++ "load mmc ${bootpart} ${loadaddr} ${bootdir}/uEnv.txt;" \
++ "env import -t ${loadaddr} ${filesize};" \
++ "echo Loaded environment from ${bootdir}/uEnv.txt;" \
++ "echo Checking if uenvcmd is set ...;" \
++ "if test -n ${uenvcmd}; then " \
++ "echo Running uenvcmd ...;" \
++ "run uenvcmd;" \
++ "fi;" \
++ "fi; " \
++ "run scan_dev_for_boot;" \
++ "if run loadimage; then " \
++ "if run loadfdt; then " \
++ "run mmcargs;" \
++ "if run loadrd; then " \
++ "bootz ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr};" \
++ "else " \
++ "bootz ${loadaddr} - ${fdtaddr};" \
++ "fi;" \
++ "else " \
++ "echo Kernel found, but no device tree found;" \
++ "fi;" \
++ "else " \
++ "echo No kernel found;" \
++ "fi;" \
+ "fi;\0" \
+ "netargs=setenv bootargs console=${console},${baudrate} " \
+ "root=/dev/nfs " \
+@@ -161,10 +208,10 @@
+ "else " \
+ "setenv get_cmd tftp; " \
+ "fi; " \
+- "${get_cmd} ${image}; " \
++ "${get_cmd} ${bootfile}; " \
+ "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
+- "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
+- "bootz ${loadaddr} - ${fdt_addr}; " \
++ "if ${get_cmd} ${fdtaddr} ${fdtfile}; then " \
++ "bootz ${loadaddr} - ${fdtaddr}; " \
+ "else " \
+ "if test ${boot_fdt} = try; then " \
+ "bootz; " \
+@@ -177,16 +224,7 @@
+ "fi;\0"
+
+ #define CONFIG_BOOTCOMMAND \
+- "mmc dev ${mmcdev}; if mmc rescan; then " \
+- "if run loadbootscript; then " \
+- "run bootscript; " \
+- "else " \
+- "if run loadimage; then " \
+- "run mmcboot; " \
+- "else run netboot; " \
+- "fi; " \
+- "fi; " \
+- "else run netboot; fi"
++ "run mmcboot;"
+
+ /* Miscellaneous configurable options */
+ #define CONFIG_SYS_LONGHELP
+@@ -227,6 +265,7 @@
+
+ #define CONFIG_OF_LIBFDT
+ #define CONFIG_CMD_BOOTZ
++#define CONFIG_SUPPORT_RAW_INITRD
+
+ #ifndef CONFIG_SYS_DCACHE_OFF
+ #define CONFIG_CMD_CACHE
+diff -Nur u-boot-2015.01.orig/include/configs/udoo.h.orig u-boot-2015.01/include/configs/udoo.h.orig
+--- u-boot-2015.01.orig/include/configs/udoo.h.orig 1969-12-31 21:00:00.000000000 -0300
++++ u-boot-2015.01/include/configs/udoo.h.orig 2015-01-12 12:39:08.000000000 -0200
+@@ -0,0 +1,235 @@
++/*
++ * Copyright (C) 2013 Freescale Semiconductor, Inc.
++ *
++ * Configuration settings for Udoo board.
++ *
++ * SPDX-License-Identifier: GPL-2.0+
++ */
++
++#ifndef __CONFIG_H
++#define __CONFIG_H
++
++#include "mx6_common.h"
++#include <asm/arch/imx-regs.h>
++#include <asm/imx-common/gpio.h>
++#include <linux/sizes.h>
++
++#define CONFIG_MX6
++#define CONFIG_DISPLAY_CPUINFO
++#define CONFIG_DISPLAY_BOARDINFO
++
++#define MACH_TYPE_UDOO 4800
++#define CONFIG_MACH_TYPE MACH_TYPE_UDOO
++
++#define CONFIG_CMDLINE_TAG
++#define CONFIG_SETUP_MEMORY_TAGS
++#define CONFIG_INITRD_TAG
++#define CONFIG_REVISION_TAG
++
++#define CONFIG_SYS_GENERIC_BOARD
++
++/* Size of malloc() pool */
++#define CONFIG_SYS_MALLOC_LEN (2 * SZ_1M)
++
++#define CONFIG_BOARD_EARLY_INIT_F
++#define CONFIG_MXC_GPIO
++
++#define CONFIG_MXC_UART
++#define CONFIG_MXC_UART_BASE UART2_BASE
++
++/* SATA Configs */
++
++#define CONFIG_CMD_SATA
++#ifdef CONFIG_CMD_SATA
++#define CONFIG_DWC_AHSATA
++#define CONFIG_SYS_SATA_MAX_DEVICE 1
++#define CONFIG_DWC_AHSATA_PORT_ID 0
++#define CONFIG_DWC_AHSATA_BASE_ADDR SATA_ARB_BASE_ADDR
++#define CONFIG_LBA48
++#define CONFIG_LIBATA
++#endif
++
++/* Network support */
++
++#define CONFIG_CMD_PING
++#define CONFIG_CMD_DHCP
++#define CONFIG_CMD_MII
++#define CONFIG_CMD_NET
++#define CONFIG_FEC_MXC
++#define CONFIG_MII
++#define IMX_FEC_BASE ENET_BASE_ADDR
++#define CONFIG_FEC_XCV_TYPE RGMII
++#define CONFIG_ETHPRIME "FEC"
++#define CONFIG_FEC_MXC_PHYADDR 6
++#define CONFIG_PHYLIB
++#define CONFIG_PHY_MICREL
++#define CONFIG_PHY_MICREL_KSZ9031
++
++/* allow to overwrite serial and ethaddr */
++#define CONFIG_ENV_OVERWRITE
++#define CONFIG_CONS_INDEX 1
++#define CONFIG_BAUDRATE 115200
++
++/* Command definition */
++#include <config_cmd_default.h>
++
++#undef CONFIG_CMD_IMLS
++
++#define CONFIG_CMD_BMODE
++#define CONFIG_CMD_SETEXPR
++
++#define CONFIG_BOOTDELAY 3
++
++#define CONFIG_SYS_MEMTEST_START 0x10000000
++#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 500 * SZ_1M)
++#define CONFIG_LOADADDR 0x12000000
++#define CONFIG_SYS_TEXT_BASE 0x17800000
++
++/* MMC Configuration */
++#define CONFIG_FSL_ESDHC
++#define CONFIG_FSL_USDHC
++#define CONFIG_SYS_FSL_ESDHC_ADDR 0
++
++#define CONFIG_MMC
++#define CONFIG_CMD_MMC
++#define CONFIG_GENERIC_MMC
++#define CONFIG_BOUNCE_BUFFER
++#define CONFIG_CMD_EXT2
++#define CONFIG_CMD_FAT
++#define CONFIG_DOS_PARTITION
++
++#define CONFIG_DEFAULT_FDT_FILE "imx6q-udoo.dtb"
++
++#define CONFIG_EXTRA_ENV_SETTINGS \
++ "script=boot.scr\0" \
++ "image=zImage\0" \
++ "console=ttymxc1\0" \
++ "splashpos=m,m\0" \
++ "fdt_high=0xffffffff\0" \
++ "initrd_high=0xffffffff\0" \
++ "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \
++ "fdt_addr=0x18000000\0" \
++ "boot_fdt=try\0" \
++ "ip_dyn=yes\0" \
++ "mmcdev=0\0" \
++ "mmcpart=1\0" \
++ "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
++ "update_sd_firmware_filename=u-boot.imx\0" \
++ "update_sd_firmware=" \
++ "if test ${ip_dyn} = yes; then " \
++ "setenv get_cmd dhcp; " \
++ "else " \
++ "setenv get_cmd tftp; " \
++ "fi; " \
++ "if mmc dev ${mmcdev}; then " \
++ "if ${get_cmd} ${update_sd_firmware_filename}; then " \
++ "setexpr fw_sz ${filesize} / 0x200; " \
++ "setexpr fw_sz ${fw_sz} + 1; " \
++ "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
++ "fi; " \
++ "fi\0" \
++ "mmcargs=setenv bootargs console=${console},${baudrate} " \
++ "root=${mmcroot}\0" \
++ "loadbootscript=" \
++ "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
++ "bootscript=echo Running bootscript from mmc ...; " \
++ "source\0" \
++ "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
++ "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
++ "mmcboot=echo Booting from mmc ...; " \
++ "run mmcargs; " \
++ "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
++ "if run loadfdt; then " \
++ "bootz ${loadaddr} - ${fdt_addr}; " \
++ "else " \
++ "if test ${boot_fdt} = try; then " \
++ "bootz; " \
++ "else " \
++ "echo WARN: Cannot load the DT; " \
++ "fi; " \
++ "fi; " \
++ "else " \
++ "bootz; " \
++ "fi;\0" \
++ "netargs=setenv bootargs console=${console},${baudrate} " \
++ "root=/dev/nfs " \
++ "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
++ "netboot=echo Booting from net ...; " \
++ "run netargs; " \
++ "if test ${ip_dyn} = yes; then " \
++ "setenv get_cmd dhcp; " \
++ "else " \
++ "setenv get_cmd tftp; " \
++ "fi; " \
++ "${get_cmd} ${image}; " \
++ "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
++ "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
++ "bootz ${loadaddr} - ${fdt_addr}; " \
++ "else " \
++ "if test ${boot_fdt} = try; then " \
++ "bootz; " \
++ "else " \
++ "echo WARN: Cannot load the DT; " \
++ "fi; " \
++ "fi; " \
++ "else " \
++ "bootz; " \
++ "fi;\0"
++
++#define CONFIG_BOOTCOMMAND \
++ "mmc dev ${mmcdev}; if mmc rescan; then " \
++ "if run loadbootscript; then " \
++ "run bootscript; " \
++ "else " \
++ "if run loadimage; then " \
++ "run mmcboot; " \
++ "else run netboot; " \
++ "fi; " \
++ "fi; " \
++ "else run netboot; fi"
++
++/* Miscellaneous configurable options */
++#define CONFIG_SYS_LONGHELP
++#define CONFIG_SYS_HUSH_PARSER
++#define CONFIG_AUTO_COMPLETE
++#define CONFIG_SYS_CBSIZE 256
++
++/* Print Buffer Size */
++#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
++#define CONFIG_SYS_MAXARGS 16
++#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
++
++#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
++
++#define CONFIG_CMDLINE_EDITING
++
++/* Physical Memory Map */
++#define CONFIG_NR_DRAM_BANKS 1
++#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
++
++#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM
++#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
++#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
++
++#define CONFIG_SYS_INIT_SP_OFFSET \
++ (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
++#define CONFIG_SYS_INIT_SP_ADDR \
++ (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
++
++/* FLASH and environment organization */
++#define CONFIG_SYS_NO_FLASH
++
++#define CONFIG_ENV_SIZE (8 * 1024)
++
++#define CONFIG_ENV_IS_IN_MMC
++#define CONFIG_ENV_OFFSET (6 * 64 * 1024)
++#define CONFIG_SYS_MMC_ENV_DEV 0
++
++#define CONFIG_OF_LIBFDT
++#define CONFIG_CMD_BOOTZ
++
++#ifndef CONFIG_SYS_DCACHE_OFF
++#define CONFIG_CMD_CACHE
++#endif
++
++#endif /* __CONFIG_H * */
diff --git a/libre-testing/uboot-udoo/0002-kernel-add-support-for-gcc-5.patch b/libre-testing/uboot-udoo/0002-kernel-add-support-for-gcc-5.patch
new file mode 100644
index 000000000..30718c561
--- /dev/null
+++ b/libre-testing/uboot-udoo/0002-kernel-add-support-for-gcc-5.patch
@@ -0,0 +1,97 @@
+From 5b07fc2c680ad4279a45d863108544020b4d74cd Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sasha.levin@oracle.com>
+Date: Mon, 13 Oct 2014 15:51:05 -0700
+Subject: [PATCH 2/6] kernel: add support for gcc 5
+
+We're missing include/linux/compiler-gcc5.h which is required now
+because gcc branched off to v5 in trunk.
+
+Just copy the relevant bits out of include/linux/compiler-gcc4.h,
+no new code is added as of now.
+
+This fixes a build error when using gcc 5.
+
+Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+---
+ include/linux/compiler-gcc5.h | 66 +++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 66 insertions(+)
+ create mode 100644 include/linux/compiler-gcc5.h
+
+diff --git a/include/linux/compiler-gcc5.h b/include/linux/compiler-gcc5.h
+new file mode 100644
+index 0000000..cdd1cc2
+--- /dev/null
++++ b/include/linux/compiler-gcc5.h
+@@ -0,0 +1,66 @@
++#ifndef __LINUX_COMPILER_H
++#error "Please don't include <linux/compiler-gcc5.h> directly, include <linux/compiler.h> instead."
++#endif
++
++#define __used __attribute__((__used__))
++#define __must_check __attribute__((warn_unused_result))
++#define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
++
++/* Mark functions as cold. gcc will assume any path leading to a call
++ to them will be unlikely. This means a lot of manual unlikely()s
++ are unnecessary now for any paths leading to the usual suspects
++ like BUG(), printk(), panic() etc. [but let's keep them for now for
++ older compilers]
++
++ Early snapshots of gcc 4.3 don't support this and we can't detect this
++ in the preprocessor, but we can live with this because they're unreleased.
++ Maketime probing would be overkill here.
++
++ gcc also has a __attribute__((__hot__)) to move hot functions into
++ a special section, but I don't see any sense in this right now in
++ the kernel context */
++#define __cold __attribute__((__cold__))
++
++#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
++
++#ifndef __CHECKER__
++# define __compiletime_warning(message) __attribute__((warning(message)))
++# define __compiletime_error(message) __attribute__((error(message)))
++#endif /* __CHECKER__ */
++
++/*
++ * Mark a position in code as unreachable. This can be used to
++ * suppress control flow warnings after asm blocks that transfer
++ * control elsewhere.
++ *
++ * Early snapshots of gcc 4.5 don't support this and we can't detect
++ * this in the preprocessor, but we can live with this because they're
++ * unreleased. Really, we need to have autoconf for the kernel.
++ */
++#define unreachable() __builtin_unreachable()
++
++/* Mark a function definition as prohibited from being cloned. */
++#define __noclone __attribute__((__noclone__))
++
++/*
++ * Tell the optimizer that something else uses this function or variable.
++ */
++#define __visible __attribute__((externally_visible))
++
++/*
++ * GCC 'asm goto' miscompiles certain code sequences:
++ *
++ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
++ *
++ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek.
++ * Fixed in GCC 4.8.2 and later versions.
++ *
++ * (asm goto is automatically volatile - the naming reflects this.)
++ */
++#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
++
++#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
++#define __HAVE_BUILTIN_BSWAP32__
++#define __HAVE_BUILTIN_BSWAP64__
++#define __HAVE_BUILTIN_BSWAP16__
++#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */
+--
+2.4.4
+
diff --git a/libre-testing/uboot-udoo/PKGBUILD b/libre-testing/uboot-udoo/PKGBUILD
new file mode 100644
index 000000000..ab13ee499
--- /dev/null
+++ b/libre-testing/uboot-udoo/PKGBUILD
@@ -0,0 +1,68 @@
+# U-Boot: UDOO
+# Maintainer: André Silva <emulatorman@parabola.nu>
+
+buildarch=4
+
+pkgbase=uboot-udoo
+pkgname=('uboot-udoo_dl' 'uboot-udoo_quad')
+pkgver=2015.01
+pkgrel=1
+arch=('armv7h')
+url="http://git.denx.de/u-boot.git/"
+license=('GPL')
+makedepends=('bc')
+backup=(boot/extlinux/extlinux.conf)
+source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver}.tar.bz2"
+ '0001-parabola-arm-modifications.patch'
+ '0002-kernel-add-support-for-gcc-5.patch'
+ 'extlinux.conf')
+md5sums=('7f08dc9e98a71652bd6968888ed6ec95'
+ 'dfceac5db9aa48ae2d5accf1d151c311'
+ '721a46867e189d8dedc6b6f86a536a34'
+ 'e05d2d41a1bdbbd5d6fec02534784dcd')
+
+prepare() {
+ cd u-boot-${pkgver}
+
+ patch -Np1 -i ../0001-parabola-arm-modifications.patch
+ patch -Np1 -i ../0002-kernel-add-support-for-gcc-5.patch
+}
+
+build() {
+ cd u-boot-${pkgver}
+
+ unset CFLAGS CXXFLAGS LDFLAGS
+
+ mkdir bins
+ for i in dl quad; do
+ make distclean
+ make udoo_${i}_config
+ make
+ mv u-boot.imx bins/u-boot-${i}.imx
+ done
+}
+
+package_uboot-udoo_dl() {
+ pkgdesc="U-Boot for UDOO Dual"
+ replaces=('uboot-udoo-dual-linux-libre' 'uboot-udoo-dual-linux-libre-grsec'
+ 'uboot-udoo-dual')
+ conflicts=('uboot-udoo-dual-linux-libre' 'uboot-udoo-dual-linux-libre-grsec'
+ 'uboot-udoo-dual' 'uboot-udoo_quad' 'uboot4grub-udoo_dl' 'uboot4grub-udoo_quad')
+ install=${pkgbase}.install
+
+ mkdir -p "${pkgdir}"/boot/extlinux
+ cp u-boot-${pkgver}/bins/u-boot-dl.imx "${pkgdir}"/boot/u-boot.imx
+ cp "${srcdir}"/extlinux.conf "${pkgdir}"/boot/extlinux
+}
+
+package_uboot-udoo_quad() {
+ pkgdesc="U-Boot for UDOO Quad"
+ replaces=('uboot-udoo-quad-linux-libre' 'uboot-udoo-quad-linux-libre-grsec')
+ conflicts=('uboot-udoo-quad-linux-libre' 'uboot-udoo-quad-linux-libre-grsec'
+ 'uboot-udoo_dual' 'uboot4grub-udoo_quad' 'uboot4grub-udoo_dl')
+ install=${pkgbase}.install
+
+ mkdir -p "${pkgdir}"/boot/extlinux
+ cp u-boot-${pkgver}/bins/u-boot-quad.imx "${pkgdir}"/boot/u-boot.imx
+ cp "${srcdir}"/extlinux.conf "${pkgdir}"/boot/extlinux
+}
diff --git a/libre-testing/uboot-udoo/extlinux.conf b/libre-testing/uboot-udoo/extlinux.conf
new file mode 100644
index 000000000..45d603094
--- /dev/null
+++ b/libre-testing/uboot-udoo/extlinux.conf
@@ -0,0 +1,46 @@
+menu title Welcome to U-Boot with Extlinux support!
+
+label Parabola GNU/Linux-libre, linux-libre kernel
+ kernel /boot/vmlinuz-linux-libre
+ append root=/dev/mmcblk0p1 rw console=ttymxc1,115200
+ fdtdir /boot/dtbs/linux-libre
+
+#label Parabola GNU/Linux-libre, linux-libre-lts kernel
+# kernel /boot/vmlinuz-linux-libre-lts
+# append root=/dev/mmcblk0p1 rw console=ttymxc1,115200
+# fdtdir /boot/dtbs/linux-libre-lts
+
+#label Parabola GNU/Linux-libre, linux-libre-knock kernel
+# kernel /boot/vmlinuz-linux-libre-knock
+# append root=/dev/mmcblk0p1 rw console=ttymxc1,115200
+# fdtdir /boot/dtbs/linux-libre-knock
+
+#label Parabola GNU/Linux-libre, linux-libre-lts-knock kernel
+# kernel /boot/vmlinuz-linux-libre-lts-knock
+# append root=/dev/mmcblk0p1 rw console=ttymxc1,115200
+# fdtdir /boot/dtbs/linux-libre-lts-knock
+
+#label Parabola GNU/Linux-libre, linux-libre-grsec kernel
+# kernel /boot/vmlinuz-linux-libre-grsec
+# append root=/dev/mmcblk0p1 rw console=ttymxc1,115200
+# fdtdir /boot/dtbs/linux-libre-grsec
+
+#label Parabola GNU/Linux-libre, linux-libre-grsec-knock kernel
+# kernel /boot/vmlinuz-linux-libre-grsec-knock
+# append root=/dev/mmcblk0p1 rw console=ttymxc1,115200
+# fdtdir /boot/dtbs/linux-libre-grsec-knock
+
+#label Parabola GNU/Linux-libre, linux-libre-audit kernel
+# kernel /boot/vmlinuz-linux-libre-audit
+# append root=/dev/mmcblk0p1 rw console=ttymxc1,115200
+# fdtdir /boot/dtbs/linux-libre-audit
+
+#label Parabola GNU/Linux-libre, linux-libre-pck kernel
+# kernel /boot/vmlinuz-linux-libre-pck
+# append root=/dev/mmcblk0p1 rw console=ttymxc1,115200
+# fdtdir /boot/dtbs/linux-libre-pck
+
+#label Parabola GNU/Linux-libre, linux-libre-rt kernel
+# kernel /boot/vmlinuz-linux-libre-rt
+# append root=/dev/mmcblk0p1 rw console=ttymxc1,115200
+# fdtdir /boot/dtbs/linux-libre-rt
diff --git a/libre-testing/uboot-udoo/uboot-udoo.install b/libre-testing/uboot-udoo/uboot-udoo.install
new file mode 100644
index 000000000..9f535bae7
--- /dev/null
+++ b/libre-testing/uboot-udoo/uboot-udoo.install
@@ -0,0 +1,28 @@
+extlinux_warning() {
+ echo ">>> WARNING: for new entries, edit /boot/extlinux/extlinux.conf"
+}
+
+flash_uboot() {
+ echo "A new U-Boot version needs to be flashed onto /dev/mmcblk0."
+ echo "Do you want to do this now? [y|N]"
+ read -r shouldwe
+ if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then
+ dd if=/boot/u-boot.imx of=/dev/mmcblk0 bs=512 seek=2
+ sync
+ else
+ echo "You can do this later by running:"
+ echo "# dd if=/boot/u-boot.imx of=/dev/mmcblk0 bs=512 seek=2"
+ fi
+ extlinux_warning
+}
+
+## arg 1: the new package version
+post_install() {
+ flash_uboot
+}
+
+## arg 1: the new package version
+## arg 2: the old package version
+post_upgrade() {
+ flash_uboot
+}