summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/mtd/partition.txt18
-rw-r--r--Kconfig8
-rw-r--r--Makefile4
-rw-r--r--arch/arm/Kconfig9
-rw-r--r--arch/arm/boards/a9m2440/a9m2410dev.c2
-rw-r--r--arch/arm/boards/cm-fx6/flash-header-mx6-cm-fx6.imxcfg1
-rw-r--r--arch/arm/boards/guf-vincell/flash-header.imxcfg129
-rw-r--r--arch/arm/boards/guf-vincell/lowlevel.c149
-rw-r--r--arch/arm/boards/nxp-imx8mq-evk/ddr.h1
-rw-r--r--arch/arm/boards/nxp-imx8mq-evk/flash-header-imx8mq-evk.imxcfg1
-rw-r--r--arch/arm/boards/phytec-som-am335x/board.c4
-rw-r--r--arch/arm/boards/phytec-som-imx6/board.c11
-rw-r--r--arch/arm/boards/phytec-som-imx6/lowlevel.c3
-rw-r--r--arch/arm/boards/raspberry-pi/rpi-common.c5
-rw-r--r--arch/arm/boards/reflex-achilles/lowlevel.c15
-rw-r--r--arch/arm/boards/technexion-wandboard/flash-header-technexion-wandboard.imxcfg1
-rw-r--r--arch/arm/boards/zii-imx6q-rdu2/flash-header-rdu2.imxcfg1
-rw-r--r--arch/arm/configs/imx_v7_defconfig1
-rw-r--r--arch/arm/cpu/interrupts.c8
-rw-r--r--arch/arm/cpu/interrupts_64.c10
-rw-r--r--arch/arm/cpu/mmu_64.c1
-rw-r--r--arch/arm/cpu/psci.c7
-rw-r--r--arch/arm/cpu/sections.c1
-rw-r--r--arch/arm/cpu/sm.c2
-rw-r--r--arch/arm/cpu/start.c6
-rw-r--r--arch/arm/cpu/uncompress.c20
-rw-r--r--arch/arm/dts/Makefile1
-rw-r--r--arch/arm/dts/imx6ul-phytec-phycore-som.dts8
-rw-r--r--arch/arm/dts/imx6ul-phytec-phycore-som.dtsi20
-rw-r--r--arch/arm/dts/imx6ull-phytec-phycore-som-lc.dts39
-rw-r--r--arch/arm/dts/imx6ull-phytec-phycore-som.dts8
-rw-r--r--arch/arm/include/asm/barebox-arm.h2
-rw-r--r--arch/arm/include/asm/mmu.h1
-rw-r--r--arch/arm/include/asm/ptrace.h2
-rw-r--r--arch/arm/include/asm/sections.h1
-rw-r--r--arch/arm/lib/pbl.lds.S6
-rw-r--r--arch/arm/lib32/unwind.c4
-rw-r--r--arch/arm/lib64/stacktrace.c3
-rw-r--r--arch/arm/mach-at91/Kconfig1
-rw-r--r--arch/arm/mach-bcm283x/core.c4
-rw-r--r--arch/arm/mach-bcm283x/include/mach/mbox.h2
-rw-r--r--arch/arm/mach-imx/Kconfig10
-rw-r--r--arch/arm/mach-imx/imx.c6
-rw-r--r--arch/arm/mach-imx/imx50.c2
-rw-r--r--arch/arm/mach-imx/include/mach/generic.h1
-rw-r--r--arch/arm/mach-imx/include/mach/imx-header.h1
-rw-r--r--arch/arm/mach-imx/nand.c1
-rw-r--r--arch/arm/mach-imx/usb-imx6.c2
-rw-r--r--arch/arm/mach-imx/xload-common.c21
-rw-r--r--arch/arm/mach-omap/am33xx_bbu_emmc.c1
-rw-r--r--arch/arm/mach-omap/am33xx_bbu_nand.c1
-rw-r--r--arch/arm/mach-omap/am33xx_bbu_spi_mlo.c1
-rw-r--r--arch/arm/mach-omap/am33xx_clock.c1
-rw-r--r--arch/arm/mach-omap/xload.c2
-rw-r--r--arch/arm/mach-samsung/clocks-s3c24xx.c11
-rw-r--r--arch/arm/mach-samsung/include/mach/s3c24xx-nand.h2
-rw-r--r--arch/blackfin/Kconfig8
-rw-r--r--arch/mips/Kconfig8
-rw-r--r--arch/mips/Makefile2
-rw-r--r--arch/nios2/Kconfig8
-rw-r--r--arch/openrisc/Kconfig8
-rw-r--r--arch/ppc/Kconfig7
-rw-r--r--arch/sandbox/Kconfig8
-rw-r--r--arch/x86/Kconfig8
-rw-r--r--commands/mem.c4
-rw-r--r--commands/mount.c4
-rw-r--r--common/ddr_spd.c2
-rw-r--r--common/hush.c58
-rw-r--r--common/image-fit.c8
-rw-r--r--common/imx-bbu-nand-fcb.c4
-rw-r--r--common/memory_display.c70
-rw-r--r--common/misc.c2
-rw-r--r--common/parser.c4
-rw-r--r--common/state/state_variables.c13
-rw-r--r--common/ubiformat.c12
-rw-r--r--defaultenv/defaultenv-2-base/boot/bnet7
-rw-r--r--drivers/aiodev/mc13xxx_adc.c5
-rw-r--r--drivers/base/driver.c2
-rw-r--r--drivers/bus/omap-gpmc.c2
-rw-r--r--drivers/clk/clk.c2
-rw-r--r--drivers/clk/imx/clk-cpu.c4
-rw-r--r--drivers/clk/imx/clk-gate2.c9
-rw-r--r--drivers/clk/imx/clk-imx5.c9
-rw-r--r--drivers/clocksource/Kconfig9
-rw-r--r--drivers/clocksource/Makefile1
-rw-r--r--drivers/clocksource/dw_apb_timer.c148
-rw-r--r--drivers/crypto/caam/Kconfig24
-rw-r--r--drivers/crypto/caam/Makefile1
-rw-r--r--drivers/crypto/caam/ctrl.c20
-rw-r--r--drivers/crypto/caam/regs.h4
-rw-r--r--drivers/crypto/caam/rng_self_test.c206
-rw-r--r--drivers/crypto/caam/rng_self_test.h24
-rw-r--r--drivers/dma/apbh_dma.c2
-rw-r--r--drivers/hab/habv3.c4
-rw-r--r--drivers/hab/habv4.c93
-rw-r--r--drivers/mfd/da9063.c2
-rw-r--r--drivers/mtd/nand/atmel_nand.c1
-rw-r--r--drivers/mtd/nand/nand_denali.c2
-rw-r--r--drivers/mtd/nand/nand_omap_bch_decoder.c2
-rw-r--r--drivers/mtd/nand/nand_omap_bch_decoder.h6
-rw-r--r--drivers/mtd/nand/nand_omap_gpmc.c4
-rw-r--r--drivers/net/cpsw.c6
-rw-r--r--drivers/net/e1000/eeprom.c6
-rw-r--r--drivers/net/e1000/main.c2
-rw-r--r--drivers/nvmem/ocotp.c17
-rw-r--r--drivers/of/partition.c4
-rw-r--r--drivers/pinctrl/pinctrl-at91.c9
-rw-r--r--drivers/pinctrl/pinctrl-tegra30.c4
-rw-r--r--drivers/rtc/rtc-ds1307.c4
-rw-r--r--drivers/serial/Kconfig1
-rw-r--r--drivers/spi/omap3_spi.c8
-rw-r--r--drivers/usb/gadget/at91_udc.c3
-rw-r--r--drivers/usb/musb/musb_gadget_ep0.c7
-rw-r--r--drivers/usb/musb/phy-am335x-control.c5
-rw-r--r--drivers/usb/musb/phy-am335x.c1
-rw-r--r--drivers/video/imx-ipu-v3/imx-pd.c2
-rw-r--r--drivers/video/imx-ipu-v3/ipu-di.c1
-rw-r--r--drivers/video/ssd1307fb.c7
-rw-r--r--drivers/video/vpl.c2
-rw-r--r--drivers/watchdog/imxwd.c10
-rw-r--r--dts/Bindings/arm/shmobile.txt2
-rw-r--r--dts/Bindings/cpufreq/arm_big_little_dt.txt65
-rw-r--r--dts/Bindings/i2c/i2c-omap.txt8
-rw-r--r--dts/Bindings/net/can/holt_hi311x.txt2
-rw-r--r--dts/Bindings/net/can/rcar_can.txt28
-rw-r--r--dts/Bindings/net/dsa/dsa.txt2
-rw-r--r--dts/Bindings/phy/qcom-qmp-phy.txt31
-rw-r--r--dts/Bindings/spi/spi-uniphier.txt14
-rw-r--r--dts/include/dt-bindings/input/linux-event-codes.h10
-rw-r--r--dts/src/arm/am3517-evm.dts2
-rw-r--r--dts/src/arm/am3517-som.dtsi2
-rw-r--r--dts/src/arm/imx51-zii-rdu1.dts6
-rw-r--r--dts/src/arm/imx53-ppd.dts2
-rw-r--r--dts/src/arm/imx6sll.dtsi2
-rw-r--r--dts/src/arm/imx6sx-sdb.dtsi7
-rw-r--r--dts/src/arm/logicpd-som-lv.dtsi2
-rw-r--r--dts/src/arm/logicpd-torpedo-37xx-devkit.dts2
-rw-r--r--dts/src/arm/rk3288-veyron.dtsi6
-rw-r--r--dts/src/arm/sama5d2.dtsi2
-rw-r--r--dts/src/arm/vf610m4-colibri.dts4
-rw-r--r--dts/src/arm64/altera/socfpga_stratix10.dtsi3
-rw-r--r--dts/src/arm64/qcom/msm8998-mtp.dtsi4
-rw-r--r--dts/src/arm64/qcom/sdm845-mtp.dts4
-rw-r--r--dts/src/arm64/renesas/r8a7795.dtsi2
-rw-r--r--dts/src/arm64/renesas/r8a77980-condor.dts47
-rw-r--r--dts/src/arm64/rockchip/rk3399-puma-haikou.dts2
-rw-r--r--dts/src/arm64/rockchip/rk3399-rock960.dtsi12
-rw-r--r--dts/src/arm64/ti/k3-am65-wakeup.dtsi2
-rw-r--r--fs/devfs.c2
-rw-r--r--fs/fs.c7
-rw-r--r--fs/ubifs/super.c10
-rw-r--r--fs/ubifs/ubifs.c2
-rw-r--r--images/.gitignore2
-rw-r--r--images/Makefile44
-rw-r--r--images/Makefile.am33xx120
-rw-r--r--images/Makefile.at9112
-rw-r--r--images/Makefile.bcm283x12
-rw-r--r--images/Makefile.imx630
-rw-r--r--images/Makefile.mvebu88
-rw-r--r--images/Makefile.mxs20
-rw-r--r--images/Makefile.omap36
-rw-r--r--images/Makefile.rockchip8
-rw-r--r--images/Makefile.socfpga55
-rw-r--r--images/Makefile.tegra68
-rw-r--r--images/Makefile.vexpress8
-rw-r--r--images/piggy.S6
-rw-r--r--include/common.h10
-rw-r--r--include/hab.h1
-rw-r--r--include/linux/clk.h30
-rw-r--r--include/linux/nvmem-consumer.h4
-rw-r--r--include/of_device.h2
-rw-r--r--include/printk.h21
-rw-r--r--lib/bootstrap/disk.c2
-rw-r--r--lib/getopt.c1
-rw-r--r--lib/gui/lodepng.c50
-rw-r--r--lib/gui/lodepng.h28
-rwxr-xr-xscripts/checkpatch.pl508
-rw-r--r--scripts/imx/imx-image.c22
-rw-r--r--scripts/imx/imx.c13
179 files changed, 2210 insertions, 1370 deletions
diff --git a/Documentation/devicetree/bindings/mtd/partition.txt b/Documentation/devicetree/bindings/mtd/partition.txt
index ab21ff25bb..4288a82437 100644
--- a/Documentation/devicetree/bindings/mtd/partition.txt
+++ b/Documentation/devicetree/bindings/mtd/partition.txt
@@ -5,6 +5,11 @@ In addition to the upstream binding, another property is added:
Optional properties:
- partuuid : The partition UUID for this partition.
+Additionally, barebox also supports partitioning the eMMC boot partitions if
+the partition table node is named appropriately:
+- partitions : user partition
+- boot0-partitions : boot0 partition
+- boot1-partitions : boot1 partition
Examples:
@@ -19,3 +24,16 @@ flash@0 {
};
};
};
+
+emmc@1 {
+ boot0-partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ barebox@0 {
+ label = "barebox";
+ reg = <0x0 0x300000>;
+ };
+ };
+};
diff --git a/Kconfig b/Kconfig
index 197dd1c4b3..5c99e666c0 100644
--- a/Kconfig
+++ b/Kconfig
@@ -10,4 +10,12 @@ config SRCARCH
source "arch/$SRCARCH/Kconfig"
+source common/Kconfig
+source commands/Kconfig
+source net/Kconfig
+source drivers/Kconfig
+source fs/Kconfig
+source lib/Kconfig
+source crypto/Kconfig
+source firmware/Kconfig
source "scripts/Kconfig"
diff --git a/Makefile b/Makefile
index 10e1b74a6d..a504dae471 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
VERSION = 2018
-PATCHLEVEL = 11
+PATCHLEVEL = 12
SUBLEVEL = 0
EXTRAVERSION =
NAME = None
@@ -307,7 +307,7 @@ CPPFLAGS := -D__KERNEL__ -D__BAREBOX__ $(LINUXINCLUDE) -fno-builtin -ffre
CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-Werror-implicit-function-declaration \
- -fno-strict-aliasing -fno-common -Os -pipe
+ -fno-strict-aliasing -fno-common -Os -pipe -Wmissing-prototypes
AFLAGS := -D__ASSEMBLY__
LDFLAGS_barebox := -Map barebox.map
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 3b486f7b8b..cdc22efdeb 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -412,12 +412,3 @@ config ARM_PSCI_DEBUG
Only use for debugging.
endmenu
-
-source common/Kconfig
-source commands/Kconfig
-source net/Kconfig
-source drivers/Kconfig
-source fs/Kconfig
-source lib/Kconfig
-source crypto/Kconfig
-source firmware/Kconfig
diff --git a/arch/arm/boards/a9m2440/a9m2410dev.c b/arch/arm/boards/a9m2440/a9m2410dev.c
index f12a0b9652..b115c4a954 100644
--- a/arch/arm/boards/a9m2440/a9m2410dev.c
+++ b/arch/arm/boards/a9m2440/a9m2410dev.c
@@ -28,6 +28,8 @@
#include <mach/s3c-busctl.h>
#include <mach/s3c24xx-gpio.h>
+#include "baseboards.h"
+
/**
* Initialize the CPU to be able to work with the a9m2410dev evaluation board
*/
diff --git a/arch/arm/boards/cm-fx6/flash-header-mx6-cm-fx6.imxcfg b/arch/arm/boards/cm-fx6/flash-header-mx6-cm-fx6.imxcfg
index 400a870154..9e8dce5877 100644
--- a/arch/arm/boards/cm-fx6/flash-header-mx6-cm-fx6.imxcfg
+++ b/arch/arm/boards/cm-fx6/flash-header-mx6-cm-fx6.imxcfg
@@ -1,3 +1,4 @@
soc imx6
loadaddr 0x00907000
+max_load_size 0x11000
dcdofs 0x400
diff --git a/arch/arm/boards/guf-vincell/flash-header.imxcfg b/arch/arm/boards/guf-vincell/flash-header.imxcfg
index bb0c318b7b..8bfb5d0508 100644
--- a/arch/arm/boards/guf-vincell/flash-header.imxcfg
+++ b/arch/arm/boards/guf-vincell/flash-header.imxcfg
@@ -1,3 +1,130 @@
+loadaddr 0x71000000
soc imx53
-loadaddr 0xf8020000
dcdofs 0x400
+
+//=============================================================================
+//init script for i.MX53 DDR3
+//=============================================================================
+
+//=============================================================================
+// Enable all clocks (they are disabled by ROM code)
+//=============================================================================
+
+//=============================================================================
+// IOMUX
+//=============================================================================
+//DDR IO TYPE:
+wm 32 0x53fa8724 0x00000000 // IOMUXC_SW_PAD_CTL_GRP_DDR_TYPE
+wm 32 0x53fa86fc 0x00000000 // IOMUXC_SW_PAD_CTL_GRP_DDRPKE
+
+//CLOCK:
+wm 32 0x53fa8578 0x00300000 // IOMUXC_SW_PAD_CTL_PAD_DRAM_SDCLK_0
+wm 32 0x53fa8570 0x00300000 // IOMUXC_SW_PAD_CTL_PAD_DRAM_SDCLK_1
+
+//ADDRESS:
+wm 32 0x53fa8574 0x00300000 // IOMUXC_SW_PAD_CTL_PAD_DRAM_CAS
+wm 32 0x53fa8588 0x00300000 // IOMUXC_SW_PAD_CTL_PAD_DRAM_RAS
+wm 32 0x53fa86f0 0x00300000 // IOMUXC_SW_PAD_CTL_GRP_ADDDS
+
+//Control:
+wm 32 0x53fa856c 0x00300040 // IOMUXC_SW_PAD_CTL_PAD_DRAM_RESET
+wm 32 0x53fa8580 0x00300040 // IOMUXC_SW_PAD_CTL_PAD_DRAM_SDODT0
+wm 32 0x53fa8564 0x00300040 // IOMUXC_SW_PAD_CTL_PAD_DRAM_SDODT1
+wm 32 0x53fa8720 0x00300000 // IOMUXC_SW_PAD_CTL_GRP_CTLDS
+
+//Data Strobes:
+wm 32 0x53fa86f4 0x00000000 // IOMUXC_SW_PAD_CTL_GRP_DDRMODE_CTL
+wm 32 0x53fa857c 0x00300040 // IOMUXC_SW_PAD_CTL_PAD_DRAM_SDQS0
+wm 32 0x53fa8590 0x00300040 // IOMUXC_SW_PAD_CTL_PAD_DRAM_SDQS1
+wm 32 0x53fa8568 0x00300040 // IOMUXC_SW_PAD_CTL_PAD_DRAM_SDQS2
+wm 32 0x53fa8558 0x00300040 // IOMUXC_SW_PAD_CTL_PAD_DRAM_SDQS3
+
+//Data:
+wm 32 0x53fa8714 0x00000000 // IOMUXC_SW_PAD_CTL_GRP_DDRMODE
+wm 32 0x53fa8718 0x00300000 // IOMUXC_SW_PAD_CTL_GRP_B0DS
+wm 32 0x53fa871c 0x00300000 // IOMUXC_SW_PAD_CTL_GRP_B1DS
+wm 32 0x53fa8728 0x00300000 // IOMUXC_SW_PAD_CTL_GRP_B2DS
+wm 32 0x53fa872c 0x00300000 // IOMUXC_SW_PAD_CTL_GRP_B3DS
+
+wm 32 0x53fa8584 0x00300000 // IOMUXC_SW_PAD_CTL_PAD_DRAM_DQM0
+wm 32 0x53fa8594 0x00300000 // IOMUXC_SW_PAD_CTL_PAD_DRAM_DQM1
+wm 32 0x53fa8560 0x00300000 // IOMUXC_SW_PAD_CTL_PAD_DRAM_DQM2
+wm 32 0x53fa8554 0x00300000 // IOMUXC_SW_PAD_CTL_PAD_DRAM_DQM3
+
+
+//=============================================================================
+// DDR Controller Registers
+//=============================================================================
+// Manufacturer: Micron
+// Device Part Number: MT41J128M16HA-15E
+// Clock Freq.: 400MHz
+// Density per CS in Gb: 4
+// Chip Selects used: 1
+// Number of Banks: 8
+// Row address: 14
+// Column address: 10
+// Data bus width 32
+//=============================================================================
+wm 32 0x63fd901c 0x00008000 //ESDSCR, set the Configuration request bit during MMDC set up
+
+//=============================================================================
+// Calibration setup.
+//=============================================================================
+wm 32 0x63fd9040 0x05390003 // ZQHWCTRL, enable both one-time & periodic HW ZQ calibration.
+
+// For target board, may need to run write leveling calibration to fine tune these settings.
+wm 32 0x63fd904c 0x00000000 //WLDECTRL0
+wm 32 0x63fd9050 0x00000000 //WLDECTRL1
+
+////Read DQS Gating calibration
+wm 32 0x63fd907c 0x01320135 // DGCTRL0
+wm 32 0x63fd9080 0x01370137 // DGCTRL1
+
+//Read calibration
+wm 32 0x63fd9088 0x3a413c3f // RDDLCTL
+
+//Write calibration
+wm 32 0x63fd9090 0x49434b43 // WRDLCTL
+
+// Complete calibration by forced measurement:
+wm 32 0x63fd90F8 0x00000800 // MUR
+//=============================================================================
+// Calibration setup end
+//=============================================================================
+
+//MMDC init:
+wm 32 0x63fd9004 0x0002002D // ESDPDC
+wm 32 0x63fd9008 0x00333030 // ESDOTC
+wm 32 0x63fd900c 0x3F435333 // ESDCFG0
+wm 32 0x63fd9010 0xB5058B63 // ESDCFG1
+wm 32 0x63fd9014 0x01FF00DB // ESDCFG2
+
+//MDMISC: RALAT kept to the high level of 5.
+//MDMISC: consider reducing RALAT if your 528MHz board design allow that. Lower RALAT benefits:
+//a. better operation at low frequency, for LPDDR2 freq < 100MHz, change RALAT to 3
+//b. Small performence improvment
+wm 32 0x63fd9018 0x00011740 // ESDMISC
+wm 32 0x63fd902c 0x000026D2 // ESDRWD
+wm 32 0x63fd9030 0x00430E21 // ESDOR
+wm 32 0x63fd9000 0x83190000 // ESDCTL
+
+//Mode register writes
+wm 32 0x63fd901c 0x02008032 // ESDSCR, MR2 write, CS0
+wm 32 0x63fd901c 0x00008033 // ESDSCR, MR3 write, CS0
+wm 32 0x63fd901c 0x00448031 // ESDSCR, MR1 write, CS0
+wm 32 0x63fd901c 0x15208030 // ESDSCR, MR0write, CS0
+wm 32 0x63fd901c 0x04008040 // ESDSCR, ZQ calibration command sent to device on CS0
+
+//wm 32 0x63fd901c 0x0200803A // ESDSCR, MR2 write, CS1
+//wm 32 0x63fd901c 0x0000803B // ESDSCR, MR3 write, CS1
+//wm 32 0x63fd901c 0x00448039 // ESDSCR, MR1 write, CS1
+//wm 32 0x63fd901c 0x15208038 // ESDSCR, MR0write, CS1
+//wm 32 0x63fd901c 0x04008048 // ESDSCR, ZQ calibration command sent to device on CS1
+
+wm 32 0x63fd9020 0x00001800 // ESDREF
+
+wm 32 0x63fd9058 0x00033337 // ODTCTRL
+
+wm 32 0x63fd901c 0x00000000 // MMDC0_ESDSCR, clear this register (especially the configuration bit as initialization is complete)
+
+wm 32 0x53fa8004 0x00194005 // For TO2 only, increase LDO for VDIG_PLL to 1.3V
diff --git a/arch/arm/boards/guf-vincell/lowlevel.c b/arch/arm/boards/guf-vincell/lowlevel.c
index 0d2216f265..715e8b386f 100644
--- a/arch/arm/boards/guf-vincell/lowlevel.c
+++ b/arch/arm/boards/guf-vincell/lowlevel.c
@@ -12,130 +12,14 @@
#include <asm/barebox-arm.h>
#include <asm/barebox-arm-head.h>
#include <asm/cache.h>
-#include <mach/xload.h>
-
-#define IOMUX_PADCTL_DDRI_DDR (1 << 9)
-
-#define IOMUX_PADCTL_DDRDSE(x) ((x) << 19)
-#define IOMUX_PADCTL_DDRSEL(x) ((x) << 25)
-
-#define IOMUXC_SW_PAD_CTL_PAD_DRAM_DQM3 0x554
-#define IOMUXC_SW_PAD_CTL_PAD_DRAM_SDQS3 0x558
-#define IOMUXC_SW_PAD_CTL_PAD_DRAM_DQM2 0x560
-#define IOMUXC_SW_PAD_CTL_PAD_DRAM_SDODT1 0x564
-#define IOMUXC_SW_PAD_CTL_PAD_DRAM_SDQS2 0x568
-#define IOMUXC_SW_PAD_CTL_PAD_DRAM_SDCLK_1 0x570
-#define IOMUXC_SW_PAD_CTL_PAD_DRAM_CAS 0x574
-#define IOMUXC_SW_PAD_CTL_PAD_DRAM_SDCLK_0 0x578
-#define IOMUXC_SW_PAD_CTL_PAD_DRAM_SDQS0 0x57c
-#define IOMUXC_SW_PAD_CTL_PAD_DRAM_SDODT0 0x580
-#define IOMUXC_SW_PAD_CTL_PAD_DRAM_RAS 0x588
-#define IOMUXC_SW_PAD_CTL_PAD_DRAM_SDQS1 0x590
-#define IOMUXC_SW_PAD_CTL_PAD_DRAM_DQM1 0x594
-#define IOMUXC_SW_PAD_CTL_PAD_DRAM_DQM0 0x584
-#define IOMUXC_SW_PAD_CTL_GRP_ADDDS 0x6f0
-#define IOMUXC_SW_PAD_CTL_GRP_DDRMODE_CTL 0x6f4
-#define IOMUXC_SW_PAD_CTL_GRP_DDRPKE 0x6fc
-#define IOMUXC_SW_PAD_CTL_GRP_DDRHYS 0x710
-#define IOMUXC_SW_PAD_CTL_GRP_DDRMODE 0x714
-#define IOMUXC_SW_PAD_CTL_GRP_B0DS 0x718
-#define IOMUXC_SW_PAD_CTL_GRP_B1DS 0x71c
-#define IOMUXC_SW_PAD_CTL_GRP_CTLDS 0x720
-#define IOMUXC_SW_PAD_CTL_GRP_DDR_TYPE 0x724
-#define IOMUXC_SW_PAD_CTL_GRP_B2DS 0x728
-#define IOMUXC_SW_PAD_CTL_GRP_B3DS 0x72c
-
-
-static void configure_dram_iomux(void)
-{
- void __iomem *iomux = (void *)MX53_IOMUXC_BASE_ADDR;
- u32 r1, r2, r4, r5, r6;
-
- /* define the INPUT mode for DRAM_D[31:0] */
- writel(0, iomux + IOMUXC_SW_PAD_CTL_GRP_DDRMODE);
-
- /*
- * define the INPUT mode for SDQS[3:0]
- * (Freescale's documentation suggests DDR-mode for the
- * control line, but their source actually uses CMOS)
- */
- writel(IOMUX_PADCTL_DDRI_DDR, iomux + IOMUXC_SW_PAD_CTL_GRP_DDRMODE_CTL);
-
- r1 = IOMUX_PADCTL_DDRDSE(5);
- r2 = IOMUX_PADCTL_DDRDSE(5) | PAD_CTL_PUE;
- r4 = IOMUX_PADCTL_DDRSEL(2);
- r5 = IOMUX_PADCTL_DDRDSE(5) | PAD_CTL_PKE | PAD_CTL_PUE | IOMUX_PADCTL_DDRI_DDR | PAD_CTL_PUS_47K_UP;
- r6 = IOMUX_PADCTL_DDRDSE(4);
-
- /*
- * this will adisable the Pull/Keeper for DRAM_x pins EXCEPT,
- * for DRAM_SDQS[3:0] and DRAM_SDODT[1:0]
- */
- writel(0, iomux + IOMUXC_SW_PAD_CTL_GRP_DDRPKE);
-
- /* set global drive strength for all DRAM_x pins */
- writel(r4, iomux + IOMUXC_SW_PAD_CTL_GRP_DDR_TYPE);
-
- /* set data dqs dqm drive strength */
- writel(r6, iomux + IOMUXC_SW_PAD_CTL_GRP_B0DS);
- writel(r6, iomux + IOMUXC_SW_PAD_CTL_PAD_DRAM_DQM0);
- writel(r5, iomux + IOMUXC_SW_PAD_CTL_PAD_DRAM_SDQS0);
-
- writel(r1, iomux + IOMUXC_SW_PAD_CTL_GRP_B1DS);
- writel(r1, iomux + IOMUXC_SW_PAD_CTL_PAD_DRAM_DQM1);
- writel(r5, iomux + IOMUXC_SW_PAD_CTL_PAD_DRAM_SDQS1);
-
- writel(r6, iomux + IOMUXC_SW_PAD_CTL_GRP_B2DS);
- writel(r6, iomux + IOMUXC_SW_PAD_CTL_PAD_DRAM_DQM2);
- writel(r5, iomux + IOMUXC_SW_PAD_CTL_PAD_DRAM_SDQS2);
-
- writel(r1, iomux + IOMUXC_SW_PAD_CTL_GRP_B3DS);
- writel(r1, iomux + IOMUXC_SW_PAD_CTL_PAD_DRAM_DQM3);
- writel(r5, iomux + IOMUXC_SW_PAD_CTL_PAD_DRAM_SDQS3);
-
- /* SDCLK pad drive strength control options */
- writel(r1, iomux + IOMUXC_SW_PAD_CTL_PAD_DRAM_SDCLK_0);
- writel(r1, iomux + IOMUXC_SW_PAD_CTL_PAD_DRAM_SDCLK_1);
-
- /* Control and addr bus pad drive strength control options */
- writel(r1, iomux + IOMUXC_SW_PAD_CTL_PAD_DRAM_RAS);
- writel(r1, iomux + IOMUXC_SW_PAD_CTL_PAD_DRAM_CAS);
- writel(r1, iomux + IOMUXC_SW_PAD_CTL_GRP_ADDDS);
- writel(r1, iomux + IOMUXC_SW_PAD_CTL_GRP_CTLDS);
- writel(r2, iomux + IOMUXC_SW_PAD_CTL_PAD_DRAM_SDODT0);
- writel(r2, iomux + IOMUXC_SW_PAD_CTL_PAD_DRAM_SDODT1);
-
- /*
- * enable hysteresis on input pins
- * (Freescale's documentation suggests that enable hysteresis
- * would be better, but their source-code doesn't)
- */
- writel(PAD_CTL_HYS, iomux + IOMUXC_SW_PAD_CTL_GRP_DDRHYS);
-}
-
-static void disable_watchdog(void)
-{
- /*
- * configure WDOG to generate external reset on trigger
- * and disable power down counter
- */
- writew(0x38, MX53_WDOG1_BASE_ADDR);
- writew(0x0, MX53_WDOG1_BASE_ADDR + 8);
- writew(0x38, MX53_WDOG2_BASE_ADDR);
- writew(0x0, MX53_WDOG2_BASE_ADDR + 8);
-}
extern char __dtb_imx53_guf_vincell_lt_start[];
extern char __dtb_imx53_guf_vincell_start[];
-static noinline void imx53_guf_vincell_init(int is_lt)
+static noinline void imx53_guf_vincell_init(void *fdt)
{
void __iomem *ccm = (void *)MX53_CCM_BASE_ADDR;
void __iomem *uart = IOMEM(MX53_UART2_BASE_ADDR);
- void *fdt;
- u32 r;
- enum bootsource src;
- int instance;
arm_setup_stack(MX53_IRAM_BASE_ADDR + MX53_IRAM_SIZE - 8);
@@ -151,29 +35,10 @@ static noinline void imx53_guf_vincell_init(int is_lt)
pbl_set_putc(imx_uart_putc, uart);
pr_debug("GuF Vincell\n");
- /* Skip SDRAM initialization if we run from RAM */
- r = get_pc();
- if (!(r > 0x70000000 && r < 0xf0000000)) {
- disable_watchdog();
- configure_dram_iomux();
- imx_esdctlv4_init();
-
- imx53_get_boot_source(&src, &instance);
-
- if (src == BOOTSOURCE_NAND &&
- IS_ENABLED(CONFIG_MACH_GUF_VINCELL_XLOAD))
- imx53_nand_start_image();
- }
-
- if (is_lt)
- fdt = __dtb_imx53_guf_vincell_lt_start;
- else
- fdt = __dtb_imx53_guf_vincell_start;
-
imx53_barebox_entry(fdt);
}
-static void __imx53_guf_vincell_init(int is_lt)
+static noinline void __imx53_guf_vincell_init(void *fdt)
{
arm_early_mmu_cache_invalidate();
imx5_cpu_lowlevel_init();
@@ -181,15 +46,19 @@ static void __imx53_guf_vincell_init(int is_lt)
setup_c();
barrier();
- imx53_guf_vincell_init(is_lt);
+ imx53_guf_vincell_init(fdt);
}
ENTRY_FUNCTION(start_imx53_guf_vincell_lt, r0, r1, r2)
{
- __imx53_guf_vincell_init(1);
+ void *fdt = __dtb_imx53_guf_vincell_lt_start + get_runtime_offset();
+
+ __imx53_guf_vincell_init(fdt);
}
ENTRY_FUNCTION(start_imx53_guf_vincell, r0, r1, r2)
{
- __imx53_guf_vincell_init(0);
+ void *fdt = __dtb_imx53_guf_vincell_start + get_runtime_offset();
+
+ __imx53_guf_vincell_init(fdt);
}
diff --git a/arch/arm/boards/nxp-imx8mq-evk/ddr.h b/arch/arm/boards/nxp-imx8mq-evk/ddr.h
index 2c25e3f98c..8f494ae7a2 100644
--- a/arch/arm/boards/nxp-imx8mq-evk/ddr.h
+++ b/arch/arm/boards/nxp-imx8mq-evk/ddr.h
@@ -19,6 +19,7 @@
#define ddr_cfg_phy nxp_imx8mq_evk_ddr_cfg_phy
void nxp_imx8mq_evk_ddr_init(void);
+void nxp_imx8mq_evk_ddr_cfg_phy(void);
#define FW_1D_IMAGE imx_lpddr4_pmu_train_1d_imem_bin, \
imx_lpddr4_pmu_train_1d_dmem_bin
diff --git a/arch/arm/boards/nxp-imx8mq-evk/flash-header-imx8mq-evk.imxcfg b/arch/arm/boards/nxp-imx8mq-evk/flash-header-imx8mq-evk.imxcfg
index a12c28fceb..aff8321b9a 100644
--- a/arch/arm/boards/nxp-imx8mq-evk/flash-header-imx8mq-evk.imxcfg
+++ b/arch/arm/boards/nxp-imx8mq-evk/flash-header-imx8mq-evk.imxcfg
@@ -1,4 +1,5 @@
soc imx8mq
loadaddr 0x007E1000
+max_load_size 0x3F000
dcdofs 0x400
diff --git a/arch/arm/boards/phytec-som-am335x/board.c b/arch/arm/boards/phytec-som-am335x/board.c
index 8c24f2b332..441d56348c 100644
--- a/arch/arm/boards/phytec-som-am335x/board.c
+++ b/arch/arm/boards/phytec-som-am335x/board.c
@@ -73,7 +73,7 @@ static const char *eth_names[ETH_COUNT] = {"mac0", "mac1"};
static int physom_devices_init(void)
{
struct state *state;
- u8 mac[6];
+ uint8_t mac[6];
int state_ret;
int state_i;
@@ -130,7 +130,7 @@ static int physom_devices_init(void)
for (state_i = 0; state_i < 2; state_i++) {
state_ret = state_read_mac(state,
eth_names[state_i], &mac[0]);
- if (state_ret == 6)
+ if (!state_ret && is_valid_ether_addr(&mac[0]))
eth_register_ethaddr(state_i, mac);
}
}
diff --git a/arch/arm/boards/phytec-som-imx6/board.c b/arch/arm/boards/phytec-som-imx6/board.c
index 4079bc9de1..38a2ef641e 100644
--- a/arch/arm/boards/phytec-som-imx6/board.c
+++ b/arch/arm/boards/phytec-som-imx6/board.c
@@ -99,8 +99,17 @@ static unsigned int get_module_rev(void)
static int ksz8081_phy_fixup(struct phy_device *phydev)
{
+ /*
+ * 0x8100 default
+ * 0x0080 RMII 50 MHz clock mode
+ * 0x0010 LED Mode 1
+ */
phy_write(phydev, 0x1f, 0x8190);
- phy_write(phydev, 0x16, 0x202);
+ /*
+ * 0x0002 Override strap-in for RMII mode
+ * This should be default but after reset we occasionally read 0x0001
+ */
+ phy_write(phydev, 0x16, 0x2);
return 0;
}
diff --git a/arch/arm/boards/phytec-som-imx6/lowlevel.c b/arch/arm/boards/phytec-som-imx6/lowlevel.c
index 05f918f6c9..9d81c278ca 100644
--- a/arch/arm/boards/phytec-som-imx6/lowlevel.c
+++ b/arch/arm/boards/phytec-som-imx6/lowlevel.c
@@ -116,4 +116,5 @@ PHYTEC_ENTRY(start_phytec_phycore_imx6q_som_emmc_1gib, imx6q_phytec_phycore_som_
PHYTEC_ENTRY(start_phytec_phycore_imx6q_som_emmc_2gib, imx6q_phytec_phycore_som_emmc, SZ_2G, true);
PHYTEC_ENTRY(start_phytec_phycore_imx6ul_som_512mb, imx6ul_phytec_phycore_som, SZ_512M, false);
-PHYTEC_ENTRY(start_phytec_phycore_imx6ull_som_256mb, imx6ull_phytec_phycore_som, SZ_256M, false);
+PHYTEC_ENTRY(start_phytec_phycore_imx6ull_som_lc_256mb, imx6ull_phytec_phycore_som_lc, SZ_256M, false);
+PHYTEC_ENTRY(start_phytec_phycore_imx6ull_som_512mb, imx6ull_phytec_phycore_som, SZ_512M, false);
diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c
index 3baed65255..650b26ce7d 100644
--- a/arch/arm/boards/raspberry-pi/rpi-common.c
+++ b/arch/arm/boards/raspberry-pi/rpi-common.c
@@ -176,6 +176,7 @@ const struct rpi_model rpi_models_new_scheme[] = {
RPI_MODEL(BCM2836_BOARD_REV_2_B, "2 Model B", rpi_b_plus_init),
RPI_MODEL(BCM2837_BOARD_REV_3_B, "3 Model B", rpi_b_plus_init),
RPI_MODEL(BCM2835_BOARD_REV_ZERO, "Zero", rpi_b_plus_init),
+ RPI_MODEL(BCM2835_BOARD_REV_ZERO_W, "Zero W", rpi_b_plus_init),
};
static int rpi_board_rev = 0;
@@ -290,8 +291,8 @@ static int rpi_clock_init(void)
if (IS_ERR(clk))
return PTR_ERR(clk);
- clk_register_clkdev(clk, NULL, "20300000.sdhci");
- clk_register_clkdev(clk, NULL, "3f300000.sdhci");
+ clkdev_add_physbase(clk, 0x20300000, NULL);
+ clkdev_add_physbase(clk, 0x3f300000, NULL);
return 0;
}
diff --git a/arch/arm/boards/reflex-achilles/lowlevel.c b/arch/arm/boards/reflex-achilles/lowlevel.c
index 9cedc74e07..b3da58f71f 100644
--- a/arch/arm/boards/reflex-achilles/lowlevel.c
+++ b/arch/arm/boards/reflex-achilles/lowlevel.c
@@ -74,18 +74,17 @@ static noinline void achilles_start(void)
arria10_start_image(barebox);
}
+ENTRY_FUNCTION(start_socfpga_achilles_xload, r0, r1, r2)
+{
+ arm_cpu_lowlevel_init();
+ arm_setup_stack(ARRIA10_OCRAM_ADDR + SZ_256K - 32);
+ achilles_start();
+}
+
ENTRY_FUNCTION(start_socfpga_achilles, r0, r1, r2)
{
void *fdt;
- if (get_pc() > ARRIA10_OCRAM_ADDR) {
- arm_cpu_lowlevel_init();
-
- arm_setup_stack(ARRIA10_OCRAM_ADDR + SZ_256K - 32);
-
- achilles_start();
- }
-
fdt = __dtb_socfpga_arria10_achilles_start + get_runtime_offset();
barebox_arm_entry(0x0, SZ_2G + SZ_1G, fdt);
diff --git a/arch/arm/boards/technexion-wandboard/flash-header-technexion-wandboard.imxcfg b/arch/arm/boards/technexion-wandboard/flash-header-technexion-wandboard.imxcfg
index 33621117d4..68cb08e200 100644
--- a/arch/arm/boards/technexion-wandboard/flash-header-technexion-wandboard.imxcfg
+++ b/arch/arm/boards/technexion-wandboard/flash-header-technexion-wandboard.imxcfg
@@ -1,3 +1,4 @@
loadaddr 0x00907000
soc imx6
+max_load_size 0x11000
dcdofs 0x400
diff --git a/arch/arm/boards/zii-imx6q-rdu2/flash-header-rdu2.imxcfg b/arch/arm/boards/zii-imx6q-rdu2/flash-header-rdu2.imxcfg
index 400a870154..a4abe197e4 100644
--- a/arch/arm/boards/zii-imx6q-rdu2/flash-header-rdu2.imxcfg
+++ b/arch/arm/boards/zii-imx6q-rdu2/flash-header-rdu2.imxcfg
@@ -1,3 +1,4 @@
soc imx6
loadaddr 0x00907000
+max_load_size 0x31000
dcdofs 0x400
diff --git a/arch/arm/configs/imx_v7_defconfig b/arch/arm/configs/imx_v7_defconfig
index bf84dfa9f8..64b202b9dc 100644
--- a/arch/arm/configs/imx_v7_defconfig
+++ b/arch/arm/configs/imx_v7_defconfig
@@ -7,7 +7,6 @@ CONFIG_MACH_FREESCALE_MX51_PDK=y
CONFIG_MACH_CCMX53=y
CONFIG_MACH_FREESCALE_MX53_LOCO=y
CONFIG_MACH_GUF_VINCELL=y
-CONFIG_MACH_GUF_VINCELL_XLOAD=y
CONFIG_MACH_TQMA53=y
CONFIG_MACH_FREESCALE_MX53_VMX53=y
CONFIG_MACH_TX53=y
diff --git a/arch/arm/cpu/interrupts.c b/arch/arm/cpu/interrupts.c
index 73f023bd71..b9b91f3153 100644
--- a/arch/arm/cpu/interrupts.c
+++ b/arch/arm/cpu/interrupts.c
@@ -28,6 +28,14 @@
#include <asm/unwind.h>
#include <init.h>
+/* Avoid missing prototype warning, called from assembly */
+void do_undefined_instruction (struct pt_regs *pt_regs);
+void do_software_interrupt (struct pt_regs *pt_regs);
+void do_prefetch_abort (struct pt_regs *pt_regs);
+void do_data_abort (struct pt_regs *pt_regs);
+void do_fiq (struct pt_regs *pt_regs);
+void do_irq (struct pt_regs *pt_regs);
+
/**
* Display current register set content
* @param[in] regs Guess what
diff --git a/arch/arm/cpu/interrupts_64.c b/arch/arm/cpu/interrupts_64.c
index f6f0c9d095..e8475d2e47 100644
--- a/arch/arm/cpu/interrupts_64.c
+++ b/arch/arm/cpu/interrupts_64.c
@@ -25,6 +25,16 @@
#include <asm/system.h>
#include <asm/esr.h>
+/* Avoid missing prototype warning, called from assembly */
+void do_bad_sync (struct pt_regs *pt_regs);
+void do_bad_irq (struct pt_regs *pt_regs);
+void do_bad_fiq (struct pt_regs *pt_regs);
+void do_bad_error (struct pt_regs *pt_regs);
+void do_fiq (struct pt_regs *pt_regs);
+void do_irq (struct pt_regs *pt_regs);
+void do_error (struct pt_regs *pt_regs);
+void do_sync(struct pt_regs *pt_regs, unsigned int esr, unsigned long far);
+
static const char *esr_class_str[] = {
[0 ... ESR_ELx_EC_MAX] = "UNRECOGNIZED EC",
[ESR_ELx_EC_UNKNOWN] = "Unknown/Uncategorized",
diff --git a/arch/arm/cpu/mmu_64.c b/arch/arm/cpu/mmu_64.c
index 69d1b20718..99ddd5a441 100644
--- a/arch/arm/cpu/mmu_64.c
+++ b/arch/arm/cpu/mmu_64.c
@@ -19,6 +19,7 @@
#define pr_fmt(fmt) "mmu: " fmt
#include <common.h>
+#include <dma.h>
#include <dma-dir.h>
#include <init.h>
#include <mmu.h>
diff --git a/arch/arm/cpu/psci.c b/arch/arm/cpu/psci.c
index 1c8197aa3f..c4c8c64cbe 100644
--- a/arch/arm/cpu/psci.c
+++ b/arch/arm/cpu/psci.c
@@ -156,6 +156,10 @@ static unsigned long psci_system_reset(void)
restart_machine();
}
+/* Avoid missing prototype warning, called from assembly */
+void psci_entry(u32 r0, u32 r1, u32 r2, u32 r3, u32 r4, u32 r5, u32 r6,
+ struct arm_smccc_res *res);
+
void psci_entry(u32 r0, u32 r1, u32 r2, u32 r3, u32 r4, u32 r5, u32 r6,
struct arm_smccc_res *res)
{
@@ -209,6 +213,9 @@ static int of_psci_fixup(struct device_node *root, void *unused)
return 0;
}
+/* Avoid missing prototype warning, called from assembly */
+int psci_cpu_entry_c(void);
+
int psci_cpu_entry_c(void)
{
void (*entry)(u32 context);
diff --git a/arch/arm/cpu/sections.c b/arch/arm/cpu/sections.c
index ab08ebf42e..a53236d900 100644
--- a/arch/arm/cpu/sections.c
+++ b/arch/arm/cpu/sections.c
@@ -10,4 +10,3 @@ char __bss_start[0] __attribute__((section(".__bss_start")));
char __bss_stop[0] __attribute__((section(".__bss_stop")));
char __image_start[0] __attribute__((section(".__image_start")));
char __image_end[0] __attribute__((section(".__image_end")));
-uint32_t __image_end_marker[1] __attribute__((section(".__image_end_marker"))) = { 0xdeadbeef };
diff --git a/arch/arm/cpu/sm.c b/arch/arm/cpu/sm.c
index 6fad30adab..633c9e8c83 100644
--- a/arch/arm/cpu/sm.c
+++ b/arch/arm/cpu/sm.c
@@ -94,7 +94,7 @@ static unsigned long get_gicc_base_address(void)
#define GICD_IGROUPRn 0x0080
-int armv7_init_nonsec(void)
+static int armv7_init_nonsec(void)
{
void __iomem *gicd = IOMEM(get_gicd_base_address());
unsigned itlinesnr, i;
diff --git a/arch/arm/cpu/start.c b/arch/arm/cpu/start.c
index a79d64eaa6..768fa9e1b2 100644
--- a/arch/arm/cpu/start.c
+++ b/arch/arm/cpu/start.c
@@ -34,6 +34,8 @@
#include <debug_ll.h>
+#include "entry.h"
+
unsigned long arm_stack_top;
static unsigned long arm_barebox_size;
static void *barebox_boarddata;
@@ -231,12 +233,16 @@ __noreturn void barebox_non_pbl_start(unsigned long membase,
#ifndef CONFIG_PBL_IMAGE
+void start(void);
+
void NAKED __section(.text_entry) start(void)
{
barebox_arm_head();
}
#else
+
+void start(unsigned long membase, unsigned long memsize, void *boarddata);
/*
* First function in the uncompressed image. We get here from
* the pbl. The stack already has been set up by the pbl.
diff --git a/arch/arm/cpu/uncompress.c b/arch/arm/cpu/uncompress.c
index 048bca0c95..e52716557b 100644
--- a/arch/arm/cpu/uncompress.c
+++ b/arch/arm/cpu/uncompress.c
@@ -34,9 +34,14 @@
#include <debug_ll.h>
+#include "entry.h"
+
unsigned long free_mem_ptr;
unsigned long free_mem_end_ptr;
+extern unsigned char input_data[];
+extern unsigned char input_data_end[];
+
void __noreturn barebox_multi_pbl_start(unsigned long membase,
unsigned long memsize, void *boarddata)
{
@@ -44,11 +49,11 @@ void __noreturn barebox_multi_pbl_start(unsigned long membase,
void __noreturn (*barebox)(unsigned long, unsigned long, void *);
unsigned long endmem = membase + memsize;
unsigned long barebox_base;
- uint32_t *image_end;
- void *pg_start;
+ void *pg_start, *pg_end;
unsigned long pc = get_pc();
- image_end = (void *)__image_end_marker + global_variable_offset();
+ pg_start = input_data + global_variable_offset();
+ pg_end = input_data_end + global_variable_offset();
if (IS_ENABLED(CONFIG_PBL_RELOCATABLE)) {
/*
@@ -62,14 +67,7 @@ void __noreturn barebox_multi_pbl_start(unsigned long membase,
relocate_to_adr(membase);
}
- /*
- * image_end is the image_end_marker defined above. It is the last location
- * in the executable. Right after the executable the build process adds
- * the size of the appended compressed binary followed by the compressed
- * binary itself.
- */
- pg_start = image_end + 2;
- pg_len = *(image_end + 1);
+ pg_len = pg_end - pg_start;
uncompressed_len = get_unaligned((const u32 *)(pg_start + pg_len - 4));
if (IS_ENABLED(CONFIG_RELOCATABLE))
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 503d9b18f9..c08b35a101 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -63,6 +63,7 @@ pbl-dtb-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += imx6q-phytec-pbaa03.dtb.o \
imx6dl-phytec-phycore-som-nand.dtb.o \
imx6dl-phytec-phycore-som-emmc.dtb.o \
imx6ul-phytec-phycore-som.dtb.o \
+ imx6ull-phytec-phycore-som-lc.dtb.o \
imx6ull-phytec-phycore-som.dtb.o
pbl-dtb-$(CONFIG_MACH_PHYTEC_PHYCORE_IMX7) += imx7d-phyboard-zeta.dtb.o
pbl-dtb-$(CONFIG_MACH_PLATHOME_OPENBLOCKS_AX3) += armada-xp-openblocks-ax3-4-bb.dtb.o
diff --git a/arch/arm/dts/imx6ul-phytec-phycore-som.dts b/arch/arm/dts/imx6ul-phytec-phycore-som.dts
index 73f7dbe9a6..6d1876702d 100644
--- a/arch/arm/dts/imx6ul-phytec-phycore-som.dts
+++ b/arch/arm/dts/imx6ul-phytec-phycore-som.dts
@@ -39,3 +39,11 @@
&usdhc1 {
status = "okay";
};
+
+&usbotg1 {
+ status = "okay";
+};
+
+&usbotg2 {
+ status = "okay";
+};
diff --git a/arch/arm/dts/imx6ul-phytec-phycore-som.dtsi b/arch/arm/dts/imx6ul-phytec-phycore-som.dtsi
index 2504c9729d..d829fdd6fb 100644
--- a/arch/arm/dts/imx6ul-phytec-phycore-som.dtsi
+++ b/arch/arm/dts/imx6ul-phytec-phycore-som.dtsi
@@ -89,6 +89,20 @@
status = "disabled";
};
+&usbotg1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_usb_otg1>;
+ dr_mode = "otg";
+ disable-over-current;
+ status = "disabled";
+};
+
+&usbotg2 {
+ dr_mode = "host";
+ disable-over-current;
+ status = "disabled";
+};
+
&usdhc1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usdhc1>;
@@ -163,6 +177,12 @@
>;
};
+ pinctrl_usb_otg1: usbotg1grp {
+ fsl,pins = <
+ MX6UL_PAD_GPIO1_IO00__ANATOP_OTG1_ID 0x17059
+ >;
+ };
+
pinctrl_usdhc1: usdhc1grp {
fsl,pins = <
MX6UL_PAD_SD1_CMD__USDHC1_CMD 0x17059
diff --git a/arch/arm/dts/imx6ull-phytec-phycore-som-lc.dts b/arch/arm/dts/imx6ull-phytec-phycore-som-lc.dts
new file mode 100644
index 0000000000..94a7830756
--- /dev/null
+++ b/arch/arm/dts/imx6ull-phytec-phycore-som-lc.dts
@@ -0,0 +1,39 @@
+// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT)
+/*
+ * Copyright (C) 2018 PHYTEC Messtechnik GmbH
+ * Author: Stefan Riedmueller <s.riedmueller@phytec.de>
+ */
+
+/dts-v1/;
+
+#include <arm/imx6ull.dtsi>
+#include "imx6ul-phytec-phycore-som.dtsi"
+
+/ {
+ model = "Phytec phyCORE-i.MX6 ULL SOM low-cost";
+ compatible = "phytec,imx6ul-pcl063", "fsl,imx6ull";
+};
+
+&fec1 {
+ status = "okay";
+};
+
+&gpmi {
+ status = "okay";
+};
+
+&i2c1 {
+ status = "okay";
+};
+
+&uart1 {
+ status = "okay";
+};
+
+&usdhc1 {
+ status = "okay";
+};
+
+&usbotg1 {
+ status = "okay";
+};
diff --git a/arch/arm/dts/imx6ull-phytec-phycore-som.dts b/arch/arm/dts/imx6ull-phytec-phycore-som.dts
index de04132a02..4d73010131 100644
--- a/arch/arm/dts/imx6ull-phytec-phycore-som.dts
+++ b/arch/arm/dts/imx6ull-phytec-phycore-som.dts
@@ -39,3 +39,11 @@
&usdhc1 {
status = "okay";
};
+
+&usbotg1 {
+ status = "okay";
+};
+
+&usbotg2 {
+ status = "okay";
+};
diff --git a/arch/arm/include/asm/barebox-arm.h b/arch/arm/include/asm/barebox-arm.h
index c0c749ae34..e065b479e3 100644
--- a/arch/arm/include/asm/barebox-arm.h
+++ b/arch/arm/include/asm/barebox-arm.h
@@ -85,6 +85,8 @@ static inline void boarddata_create(void *adr, u32 machine)
u32 barebox_arm_machine(void);
+unsigned long arm_mem_ramoops_get(void);
+
struct barebox_arm_boarddata_compressed_dtb {
#define BAREBOX_ARM_BOARDDATA_COMPRESSED_DTB_MAGIC 0x7b66bcbd
u32 magic;
diff --git a/arch/arm/include/asm/mmu.h b/arch/arm/include/asm/mmu.h
index 99833ac5b4..417808bfcc 100644
--- a/arch/arm/include/asm/mmu.h
+++ b/arch/arm/include/asm/mmu.h
@@ -56,5 +56,6 @@ void __dma_inv_range(unsigned long, unsigned long);
void mmu_early_enable(unsigned long membase, unsigned long memsize,
unsigned long ttb);
+void mmu_early_disable(void);
#endif /* __ASM_MMU_H */
diff --git a/arch/arm/include/asm/ptrace.h b/arch/arm/include/asm/ptrace.h
index 7fbd8d9b6f..042e0cef70 100644
--- a/arch/arm/include/asm/ptrace.h
+++ b/arch/arm/include/asm/ptrace.h
@@ -23,6 +23,8 @@ struct pt_regs {
unsigned long regs[31];
};
+void show_regs(struct pt_regs *);
+
#endif /* __ASSEMBLY__ */
#else /* CONFIG_CPU_64 */
diff --git a/arch/arm/include/asm/sections.h b/arch/arm/include/asm/sections.h
index b4659256cc..8ab01f2b71 100644
--- a/arch/arm/include/asm/sections.h
+++ b/arch/arm/include/asm/sections.h
@@ -11,7 +11,6 @@ extern char __dynsym_start[];
extern char __dynsym_end[];
extern char __exceptions_start[];
extern char __exceptions_stop[];
-extern uint32_t __image_end_marker[];
#endif
diff --git a/arch/arm/lib/pbl.lds.S b/arch/arm/lib/pbl.lds.S
index ddc65bbf45..53c9ce0fe6 100644
--- a/arch/arm/lib/pbl.lds.S
+++ b/arch/arm/lib/pbl.lds.S
@@ -36,6 +36,8 @@ SECTIONS
{
. = BASE;
+ .image_start : { *(.__image_start) }
+
PRE_IMAGE
. = ALIGN(4);
@@ -91,9 +93,7 @@ SECTIONS
}
__piggydata_end = .;
- . = ALIGN(4);
- .image_end : { *(.__image_end_marker) }
- __image_end = .;
+ .image_end : { *(.__image_end) }
_barebox_image_size = __image_end - BASE;
_barebox_pbl_size = __bss_start - BASE;
diff --git a/arch/arm/lib32/unwind.c b/arch/arm/lib32/unwind.c
index fd4b0b22cb..02fae3c253 100644
--- a/arch/arm/lib32/unwind.c
+++ b/arch/arm/lib32/unwind.c
@@ -62,9 +62,9 @@ static void dump_backtrace_entry(unsigned long where, unsigned long from,
unsigned long frame)
{
#ifdef CONFIG_KALLSYMS
- printk("[<%08lx>] (%pS) from [<%08lx>] (%pS)\n", where, (void *)where, from, (void *)from);
+ pr_warning("[<%08lx>] (%pS) from [<%08lx>] (%pS)\n", where, (void *)where, from, (void *)from);
#else
- printk("Function entered at [<%08lx>] from [<%08lx>]\n", where, from);
+ pr_warning("Function entered at [<%08lx>] from [<%08lx>]\n", where, from);
#endif
}
diff --git a/arch/arm/lib64/stacktrace.c b/arch/arm/lib64/stacktrace.c
index b8352c1454..4391188446 100644
--- a/arch/arm/lib64/stacktrace.c
+++ b/arch/arm/lib64/stacktrace.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <asm/stacktrace.h>
+#include <asm/unwind.h>
#define THREAD_SIZE 16384
@@ -45,7 +46,7 @@ int unwind_frame(struct stackframe *frame)
return 0;
}
-void dump_backtrace_entry(unsigned long where, unsigned long from)
+static void dump_backtrace_entry(unsigned long where, unsigned long from)
{
#ifdef CONFIG_KALLSYMS
printf("[<%08lx>] (%pS) from [<%08lx>] (%pS)\n", where, (void *)where, from, (void *)from);
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 7a895c2689..b101e61d22 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -538,6 +538,7 @@ config MACH_AT91SAM9X5EK
config MACH_MICROCHIP_KSZ9477_EVB
bool "Microchip EVB-KSZ9477 Evaluation Kit"
+ depends on ARCH_SAMA5D3
select OFDEVICE
select COMMON_CLK_OF_PROVIDER
help
diff --git a/arch/arm/mach-bcm283x/core.c b/arch/arm/mach-bcm283x/core.c
index 26f0996b1c..f1dcda86f7 100644
--- a/arch/arm/mach-bcm283x/core.c
+++ b/arch/arm/mach-bcm283x/core.c
@@ -40,8 +40,8 @@ static int bcm2835_clk_init(void)
clk = clk_fixed("uart0-pl0110", 3 * 1000 * 1000);
clk_register_clkdev(clk, NULL, "uart0-pl0110");
- clk_register_clkdev(clk, NULL, "20201000.serial");
- clk_register_clkdev(clk, NULL, "3f201000.serial");
+ clkdev_add_physbase(clk, 0x20201000, NULL);
+ clkdev_add_physbase(clk, 0x3f201000, NULL);
clk = clk_fixed("bcm2835-cs", 1 * 1000 * 1000);
clk_register_clkdev(clk, NULL, "bcm2835-cs");
diff --git a/arch/arm/mach-bcm283x/include/mach/mbox.h b/arch/arm/mach-bcm283x/include/mach/mbox.h
index 0d1ac074e3..76b573f85f 100644
--- a/arch/arm/mach-bcm283x/include/mach/mbox.h
+++ b/arch/arm/mach-bcm283x/include/mach/mbox.h
@@ -133,6 +133,8 @@ struct bcm2835_mbox_tag_hdr {
#define BCM2837_BOARD_REV_3_B 0x8
/* Zero */
#define BCM2835_BOARD_REV_ZERO 0x9
+/* Zero W */
+#define BCM2835_BOARD_REV_ZERO_W 0xc
/*
* 0x2..0xf from:
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index edfc851138..d9b60053db 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -190,6 +190,7 @@ config ARCH_VF610
select ARCH_HAS_FEC_IMX
select CPU_V7
select PINCTRL
+ select OFDEVICE
select OFTREE
select COMMON_CLK
select COMMON_CLK_OF_PROVIDER
@@ -284,15 +285,6 @@ config MACH_GUF_VINCELL
bool "Garz-Fricke Vincell"
select ARCH_IMX53
-config MACH_GUF_VINCELL_XLOAD
- depends on MACH_GUF_VINCELL
- bool "Garz-Fricke Vincell NAND xload support"
- help
- The Vincell initializes SDRAM from board code. This normally limits
- the image size to the size of the SoC internal SRAM. Enable this
- option to be able to use bigger images when booting from NAND. Images
- built with this option are no longer bootable from USB though.
-
config MACH_TQMA53
bool "TQ i.MX53 TQMa53"
select ARCH_IMX53
diff --git a/arch/arm/mach-imx/imx.c b/arch/arm/mach-imx/imx.c
index ad227663dd..63914d306e 100644
--- a/arch/arm/mach-imx/imx.c
+++ b/arch/arm/mach-imx/imx.c
@@ -199,12 +199,8 @@ void imx_set_reset_reason(void __iomem *srsr,
}
}
- /*
- * Report this with above default priority in order to make
- * sure we'll always override info from watchdog driver.
- */
reset_source_set_priority(type,
- RESET_SOURCE_DEFAULT_PRIORITY + 1);
+ RESET_SOURCE_DEFAULT_PRIORITY);
reset_source_set_instance(type, instance);
pr_info("i.MX reset reason %s (SRSR: 0x%08x)\n",
diff --git a/arch/arm/mach-imx/imx50.c b/arch/arm/mach-imx/imx50.c
index 4fd5481670..b76e3794e3 100644
--- a/arch/arm/mach-imx/imx50.c
+++ b/arch/arm/mach-imx/imx50.c
@@ -86,7 +86,7 @@ int imx50_devices_init(void)
return 0;
}
-void imx50_init_lowlevel_early(unsigned int cpufreq_mhz)
+static void imx50_init_lowlevel_early(unsigned int cpufreq_mhz)
{
void __iomem *ccm = IOMEM(MX50_CCM_BASE_ADDR);
u32 r;
diff --git a/arch/arm/mach-imx/include/mach/generic.h b/arch/arm/mach-imx/include/mach/generic.h
index dc537941a7..be58da4da2 100644
--- a/arch/arm/mach-imx/include/mach/generic.h
+++ b/arch/arm/mach-imx/include/mach/generic.h
@@ -19,6 +19,7 @@ void vf610_boot_save_loc(void);
void imx8_boot_save_loc(void);
void imx25_get_boot_source(enum bootsource *src, int *instance);
+void imx27_get_boot_source(enum bootsource *src, int *instance);
void imx35_get_boot_source(enum bootsource *src, int *instance);
void imx51_get_boot_source(enum bootsource *src, int *instance);
void imx53_get_boot_source(enum bootsource *src, int *instance);
diff --git a/arch/arm/mach-imx/include/mach/imx-header.h b/arch/arm/mach-imx/include/mach/imx-header.h
index 05f1669318..50584bb24b 100644
--- a/arch/arm/mach-imx/include/mach/imx-header.h
+++ b/arch/arm/mach-imx/include/mach/imx-header.h
@@ -96,6 +96,7 @@ struct config_data {
uint32_t image_load_addr;
uint32_t image_dcd_offset;
uint32_t image_size;
+ uint32_t max_load_size;
uint32_t load_size;
char *outfile;
char *srkfile;
diff --git a/arch/arm/mach-imx/nand.c b/arch/arm/mach-imx/nand.c
index f298a36046..7574fe80b2 100644
--- a/arch/arm/mach-imx/nand.c
+++ b/arch/arm/mach-imx/nand.c
@@ -17,6 +17,7 @@
#include <mach/imx25-regs.h>
#include <mach/imx27-regs.h>
#include <mach/imx35-regs.h>
+#include <mach/imx-nand.h>
#include <io.h>
#define RCSR_NFC_FMS (1 << 8)
diff --git a/arch/arm/mach-imx/usb-imx6.c b/arch/arm/mach-imx/usb-imx6.c
index 5e3df10e44..4236bcb772 100644
--- a/arch/arm/mach-imx/usb-imx6.c
+++ b/arch/arm/mach-imx/usb-imx6.c
@@ -20,6 +20,7 @@
#include <common.h>
#include <io.h>
#include <mach/imx6-regs.h>
+#include <mach/usb.h>
#define SET 0x4
#define CLR 0x8
@@ -33,7 +34,6 @@
#define USB_UH1_USBCMD 0x340
#define USB_CMD_RUNSTOP (1 << 0)
-#define USB_CMD_RESET (1 << 1)
#define USB_OVER_CUR_DIS (1 << 7)
#define USBPHY_CTRL_SFTRST (1 << 31)
diff --git a/arch/arm/mach-imx/xload-common.c b/arch/arm/mach-imx/xload-common.c
index 13cd612d3c..c5727eba38 100644
--- a/arch/arm/mach-imx/xload-common.c
+++ b/arch/arm/mach-imx/xload-common.c
@@ -5,25 +5,6 @@
int imx_image_size(void)
{
- uint32_t *image_end = (void *)__image_end;
- uint32_t payload_len, pbl_len, imx_header_len, sizep;
- void *pg_start;
-
- pg_start = image_end + 1;
-
/* i.MX header is 4k */
- imx_header_len = SZ_4K;
-
- /* The length of the PBL image */
- pbl_len = __image_end - _text;
-
- sizep = 4;
-
- /* The length of the payload is appended directly behind the PBL */
- payload_len = *(image_end);
-
- pr_debug("%s: payload_len: 0x%08x pbl_len: 0x%08x\n",
- __func__, payload_len, pbl_len);
-
- return imx_header_len + pbl_len + sizep + payload_len;
+ return barebox_image_size + SZ_4K;
}
diff --git a/arch/arm/mach-omap/am33xx_bbu_emmc.c b/arch/arm/mach-omap/am33xx_bbu_emmc.c
index 1fd7222ddc..29e13de778 100644
--- a/arch/arm/mach-omap/am33xx_bbu_emmc.c
+++ b/arch/arm/mach-omap/am33xx_bbu_emmc.c
@@ -18,6 +18,7 @@
#include <fs.h>
#include <fcntl.h>
#include <filetype.h>
+#include <mach/bbu.h>
#define PART_TABLE_SIZE 66
#define PART_TABLE_OFFSET 0x1BE
diff --git a/arch/arm/mach-omap/am33xx_bbu_nand.c b/arch/arm/mach-omap/am33xx_bbu_nand.c
index 6fc6e7e40f..4c1a28d37e 100644
--- a/arch/arm/mach-omap/am33xx_bbu_nand.c
+++ b/arch/arm/mach-omap/am33xx_bbu_nand.c
@@ -22,6 +22,7 @@
#include <fcntl.h>
#include <libfile.h>
#include <filetype.h>
+#include <mach/bbu.h>
struct nand_bbu_handler {
struct bbu_handler bbu_handler;
diff --git a/arch/arm/mach-omap/am33xx_bbu_spi_mlo.c b/arch/arm/mach-omap/am33xx_bbu_spi_mlo.c
index 03477dbaf1..7d2ef1f0f2 100644
--- a/arch/arm/mach-omap/am33xx_bbu_spi_mlo.c
+++ b/arch/arm/mach-omap/am33xx_bbu_spi_mlo.c
@@ -20,6 +20,7 @@
#include <fs.h>
#include <fcntl.h>
#include <linux/stat.h>
+#include <mach/bbu.h>
/*
* AM35xx, AM33xx chips use big endian MLO for SPI NOR flash
diff --git a/arch/arm/mach-omap/am33xx_clock.c b/arch/arm/mach-omap/am33xx_clock.c
index ad735cb216..e63e93601e 100644
--- a/arch/arm/mach-omap/am33xx_clock.c
+++ b/arch/arm/mach-omap/am33xx_clock.c
@@ -15,6 +15,7 @@
#include <common.h>
#include <asm/io.h>
#include <mach/am33xx-clock.h>
+#include <mach/am33xx-generic.h>
#include <asm-generic/div64.h>
#define PRCM_MOD_EN 0x2
diff --git a/arch/arm/mach-omap/xload.c b/arch/arm/mach-omap/xload.c
index bb58825dcf..47aa8275b9 100644
--- a/arch/arm/mach-omap/xload.c
+++ b/arch/arm/mach-omap/xload.c
@@ -257,6 +257,8 @@ static void *am33xx_net_boot(void)
dhcp_set_result(edev, dhcp_res);
+ edev->ifup = true;
+
/*
* Older tftp server don't send the file size.
* Then tftpfs needs temporary place to store the file.
diff --git a/arch/arm/mach-samsung/clocks-s3c24xx.c b/arch/arm/mach-samsung/clocks-s3c24xx.c
index 13e68678e1..34b38f345c 100644
--- a/arch/arm/mach-samsung/clocks-s3c24xx.c
+++ b/arch/arm/mach-samsung/clocks-s3c24xx.c
@@ -109,15 +109,6 @@ uint32_t s3c_get_pclk(void)
}
/**
- * Calculate the UCLK frequency used by the USB host device
- * @return Current frequency in Hz
- */
-uint32_t s3c24_get_uclk(void)
-{
- return s3c_get_upllclk();
-}
-
-/**
* Return correct UART frequency based on the UCON register
*/
unsigned s3c_get_uart_clk(unsigned src)
@@ -137,7 +128,7 @@ unsigned s3c_get_uart_clk(unsigned src)
/**
* Show the user the current clock settings
*/
-int s3c24xx_dump_clocks(void)
+static int s3c24xx_dump_clocks(void)
{
printf("refclk: %7d kHz\n", S3C24XX_CLOCK_REFERENCE / 1000);
printf("mpll: %7d kHz\n", s3c_get_mpllclk() / 1000);
diff --git a/arch/arm/mach-samsung/include/mach/s3c24xx-nand.h b/arch/arm/mach-samsung/include/mach/s3c24xx-nand.h
index f9c6d91b5b..52642ee81f 100644
--- a/arch/arm/mach-samsung/include/mach/s3c24xx-nand.h
+++ b/arch/arm/mach-samsung/include/mach/s3c24xx-nand.h
@@ -52,4 +52,6 @@ struct s3c24x0_nand_platform_data {
* @brief Basic declaration to use the s3c24x0 NAND driver
*/
+void nand_boot(void);
+
#endif /* MACH_S3C24XX_NAND_H */
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index 6233614e19..c9b5512c0a 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -64,11 +64,3 @@ config BFIN_BOOT_FLASH16
blackfin is strapped to boot from 16bit wide flash via boot ROM
endchoice
-
-source common/Kconfig
-source commands/Kconfig
-source net/Kconfig
-source drivers/Kconfig
-source fs/Kconfig
-source lib/Kconfig
-source crypto/Kconfig
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 524375a81a..7c40991cab 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -353,11 +353,3 @@ config MIPS_OPTIMIZED_STRING_FUNCTIONS
increase your binary size.
endmenu
-
-source common/Kconfig
-source commands/Kconfig
-source net/Kconfig
-source drivers/Kconfig
-source fs/Kconfig
-source lib/Kconfig
-source crypto/Kconfig
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 3342e0eafd..6338dc174d 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -12,7 +12,7 @@ endif
CPPFLAGS += -D__MIPS__ -fno-strict-aliasing -fno-merge-constants
cflags-y += -G 0 -mno-abicalls -fno-pic -pipe
-cflags-y += -Wall -Wmissing-prototypes -Wstrict-prototypes \
+cflags-y += -Wall -Wstrict-prototypes \
-Wno-uninitialized -Wno-format -Wno-main
ifdef CONFIG_32BIT
diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig
index 199540ba74..c7c13a464b 100644
--- a/arch/nios2/Kconfig
+++ b/arch/nios2/Kconfig
@@ -27,11 +27,3 @@ config EARLY_PRINTF
bool "Enable early printf functions"
endmenu
-
-source common/Kconfig
-source commands/Kconfig
-source net/Kconfig
-source drivers/Kconfig
-source fs/Kconfig
-source lib/Kconfig
-source crypto/Kconfig
diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig
index 2a8abf0ff8..32d23029d8 100644
--- a/arch/openrisc/Kconfig
+++ b/arch/openrisc/Kconfig
@@ -27,11 +27,3 @@ config GENERIC
select OPENRISC
endchoice
-
-source common/Kconfig
-source commands/Kconfig
-source net/Kconfig
-source drivers/Kconfig
-source fs/Kconfig
-source lib/Kconfig
-source crypto/Kconfig
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig
index 97e6c00689..7a45ced7cd 100644
--- a/arch/ppc/Kconfig
+++ b/arch/ppc/Kconfig
@@ -20,10 +20,3 @@ endchoice
source arch/ppc/mach-mpc5xxx/Kconfig
source arch/ppc/mach-mpc85xx/Kconfig
-source common/Kconfig
-source commands/Kconfig
-source net/Kconfig
-source drivers/Kconfig
-source fs/Kconfig
-source lib/Kconfig
-source crypto/Kconfig
diff --git a/arch/sandbox/Kconfig b/arch/sandbox/Kconfig
index 3f1cefb837..5227cb624f 100644
--- a/arch/sandbox/Kconfig
+++ b/arch/sandbox/Kconfig
@@ -15,11 +15,3 @@ config LINUX
config ARCH_LINUX
bool
-
-source common/Kconfig
-source commands/Kconfig
-source net/Kconfig
-source drivers/Kconfig
-source fs/Kconfig
-source lib/Kconfig
-source crypto/Kconfig
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 52ccf4894f..3f91585d02 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -97,11 +97,3 @@ endchoice
source arch/x86/boot/Kconfig
source arch/x86/mach-i386/Kconfig
-
-source common/Kconfig
-source commands/Kconfig
-source net/Kconfig
-source drivers/Kconfig
-source fs/Kconfig
-source lib/Kconfig
-source crypto/Kconfig
diff --git a/commands/mem.c b/commands/mem.c
index cdd7a492d0..a9e12f3e55 100644
--- a/commands/mem.c
+++ b/commands/mem.c
@@ -96,8 +96,8 @@ static int mem_probe(struct device_d *dev)
dev->priv = cdev;
cdev->name = (char*)dev->resource[0].name;
- cdev->size = min(resource_size(&dev->resource[0]),
- (unsigned long long)S64_MAX);
+ cdev->size = min_t(unsigned long long, resource_size(&dev->resource[0]),
+ S64_MAX);
cdev->ops = &memops;
cdev->dev = dev;
diff --git a/commands/mount.c b/commands/mount.c
index 834b06386b..f523f6b3b6 100644
--- a/commands/mount.c
+++ b/commands/mount.c
@@ -76,7 +76,9 @@ static int do_mount(int argc, char *argv[])
struct cdev *cdev;
const char *path;
- device_detect_by_name(devpath_to_name(devstr));
+ devstr = devpath_to_name(devstr);
+
+ device_detect_by_name(devstr);
cdev = cdev_by_name(devstr);
if (!cdev)
diff --git a/common/ddr_spd.c b/common/ddr_spd.c
index ec343ef5a5..7e2945ed96 100644
--- a/common/ddr_spd.c
+++ b/common/ddr_spd.c
@@ -166,7 +166,6 @@ static int ddr2_sdram_ctime(uint8_t byte)
void ddr_spd_print(uint8_t *record)
{
int highestCAS = 0;
- int cas[256];
int i, i_i, k, x, y;
int ddrclk, tbits, pcclk;
int trcd, trp, tras;
@@ -199,7 +198,6 @@ void ddr_spd_print(uint8_t *record)
for (i_i = 2; i_i < 7; i_i++) {
if (s->cas_lat & 1 << i_i) {
highestCAS = i_i;
- cas[highestCAS]++;
}
}
diff --git a/common/hush.c b/common/hush.c
index 792b61ac9a..d2f9cc70f5 100644
--- a/common/hush.c
+++ b/common/hush.c
@@ -106,6 +106,9 @@
* General Public License for more details.
*
*/
+
+#define pr_fmt(fmt) "hush: " fmt
+
#include <malloc.h> /* malloc, free, realloc*/
#include <xfuncs.h>
#include <linux/ctype.h> /* isalpha, isdigit */
@@ -263,8 +266,13 @@ struct in_str {
#define b_getch(input) ((input)->get(input))
#define b_peek(input) ((input)->peek(input))
+#ifdef HUSH_DEBUG
+#define hush_debug(fmt, arg...) debug(fmt, ##arg)
+#else
+#define hush_debug(fmt, arg...)
+#endif
-#define final_printf debug
+#define final_printf hush_debug
static void syntax(void)
{
@@ -349,7 +357,7 @@ static int b_check_space(o_string *o, int len)
static int b_addchr(o_string *o, int ch)
{
- debug("%s: %c %d %p\n", __func__, ch, o->length, o);
+ hush_debug("%s: %c %d %p\n", __func__, ch, o->length, o);
if (b_check_space(o, 1))
return B_NOSPAC;
@@ -504,7 +512,7 @@ static int file_get(struct in_str *i)
if (i->p && *i->p)
ch = *i->p++;
- debug("%s: got a %d\n", __func__, ch);
+ hush_debug("%s: got a %d\n", __func__, ch);
return ch;
}
@@ -756,7 +764,7 @@ static int run_pipe_real(struct p_context *ctx, struct pipe *pi)
child = &pi->progs[0];
if (child->group) {
- debug("non-subshell grouping\n");
+ hush_debug("non-subshell grouping\n");
rcode = run_list_real(ctx, child->group);
return rcode;
@@ -782,7 +790,7 @@ static int run_pipe_real(struct p_context *ctx, struct pipe *pi)
char *name, *value;
name = xstrdup(child->argv[i]);
- debug("Local environment set: %s\n", name);
+ hush_debug("Local environment set: %s\n", name);
value = strchr(name, '=');
if (value)
@@ -888,7 +896,7 @@ static int run_list_real(struct p_context *ctx, struct pipe *pi)
}
}
rmode = pi->r_mode;
- debug("rmode=%d if_code=%d next_if_code=%d skip_more=%d\n",
+ hush_debug("rmode=%d if_code=%d next_if_code=%d skip_more=%d\n",
rmode, if_code, next_if_code, skip_more_in_this_rmode);
if (rmode == skip_more_in_this_rmode && flag_skip) {
if (pi->followup == PIPE_SEQ)
@@ -959,7 +967,7 @@ static int run_list_real(struct p_context *ctx, struct pipe *pi)
continue;
rcode = run_pipe_real(ctx, pi);
- debug("run_pipe_real returned %d\n",rcode);
+ hush_debug("run_pipe_real returned %d\n",rcode);
if (rcode < -1) {
last_return_code = -rcode - 2;
@@ -1050,16 +1058,16 @@ static int xglob(o_string *dest, int flags, glob_t *pglob, int glob_needed)
if (dest->nonnull) {
/* bash man page calls this an "explicit" null */
gr = fake_glob(dest->data, flags, NULL, pglob);
- debug("globhack returned %d\n",gr);
+ hush_debug("globhack returned %d\n",gr);
} else {
return 0;
}
} else if (glob_needed) {
gr = do_glob(dest->data, flags, NULL, pglob);
- debug("glob returned %d\n",gr);
+ hush_debug("glob returned %d\n",gr);
} else {
gr = fake_glob(dest->data, flags, NULL, pglob);
- debug("globhack returned %d\n",gr);
+ hush_debug("globhack returned %d\n",gr);
}
if (gr != 0) { /* GLOB_ABORTED ? */
error_msg("glob(3) error %d",gr);
@@ -1210,12 +1218,12 @@ static int reserved_word(o_string *dest, struct p_context *ctx)
if (strcmp(dest->data, r->literal))
continue;
- debug("found reserved word %s, code %d\n",r->literal,r->code);
+ hush_debug("found reserved word %s, code %d\n",r->literal,r->code);
if (r->flag & FLAG_START) {
struct p_context *new = xmalloc(sizeof(struct p_context));
- debug("push stack\n");
+ hush_debug("push stack\n");
if (ctx->w == RES_IN || ctx->w == RES_FOR) {
syntax();
@@ -1241,7 +1249,7 @@ static int reserved_word(o_string *dest, struct p_context *ctx)
if (ctx->old_flag & FLAG_END) {
struct p_context *old;
- debug("pop stack\n");
+ hush_debug("pop stack\n");
done_pipe(ctx,PIPE_SEQ);
old = ctx->stack;
@@ -1266,9 +1274,9 @@ static int done_word(o_string *dest, struct p_context *ctx)
glob_t *glob_target;
int gr, flags = GLOB_NOCHECK;
- debug("%s: %s %p\n", __func__, dest->data, child);
+ hush_debug("%s: %s %p\n", __func__, dest->data, child);
if (dest->length == 0 && !dest->nonnull) {
- debug(" true null, ignored\n");
+ hush_debug(" true null, ignored\n");
return 0;
}
if (child->group) {
@@ -1276,7 +1284,7 @@ static int done_word(o_string *dest, struct p_context *ctx)
return 1; /* syntax error, groups and arglists don't mix */
}
if (!child->argv && (ctx->type & FLAG_PARSE_SEMICOLON)) {
- debug("checking %s for reserved-ness\n",dest->data);
+ hush_debug("checking %s for reserved-ness\n",dest->data);
if (reserved_word(dest,ctx))
return ctx->w == RES_SNTX;
}
@@ -1315,13 +1323,13 @@ static int done_command(struct p_context *ctx)
struct child_prog *prog = ctx->child;
if (prog && prog->group == NULL && prog->argv == NULL) {
- debug("%s: skipping null command\n", __func__);
+ hush_debug("%s: skipping null command\n", __func__);
return 0;
} else if (prog) {
pi->num_progs++;
- debug("%s: num_progs incremented to %d\n", __func__, pi->num_progs);
+ hush_debug("%s: num_progs incremented to %d\n", __func__, pi->num_progs);
} else {
- debug("%s: initializing\n", __func__);
+ hush_debug("%s: initializing\n", __func__);
}
pi->progs = xrealloc(pi->progs, sizeof(*pi->progs) * (pi->num_progs + 1));
@@ -1344,7 +1352,7 @@ static int done_pipe(struct p_context *ctx, pipe_style type)
done_command(ctx); /* implicit closure of previous command */
- debug("%s: type %d\n", __func__, type);
+ hush_debug("%s: type %d\n", __func__, type);
ctx->pipe->followup = type;
ctx->pipe->r_mode = ctx->w;
@@ -1405,7 +1413,7 @@ static int handle_dollar(o_string *dest, struct p_context *ctx, struct in_str *i
int advance = 0, i;
int ch = input->peek(input); /* first character after the $ */
- debug("%s: ch=%c\n", __func__, ch);
+ hush_debug("%s: ch=%c\n", __func__, ch);
if (isalpha(ch)) {
b_addchr(dest, SPECIAL_VAR_SYMBOL);
@@ -1490,7 +1498,7 @@ static int parse_stream(o_string *dest, struct p_context *ctx,
* A single-quote triggers a bypass of the main loop until its mate is
* found. When recursing, quote state is passed in via dest->quote. */
- debug("%s: end_trigger=%d\n", __func__, end_trigger);
+ hush_debug("%s: end_trigger=%d\n", __func__, end_trigger);
while ((ch = b_getch(input)) != EOF) {
m = map[ch];
@@ -1498,7 +1506,7 @@ static int parse_stream(o_string *dest, struct p_context *ctx,
return 1;
next = (ch == '\n') ? 0 : b_peek(input);
- debug("%s: ch=%c (%d) m=%d quote=%d - %c\n",
+ hush_debug("%s: ch=%c (%d) m=%d quote=%d - %c\n",
__func__,
ch >= ' ' ? ch : '.', ch, m,
dest->quote, ctx->stack == NULL ? '*' : '.');
@@ -1519,7 +1527,7 @@ static int parse_stream(o_string *dest, struct p_context *ctx,
}
if (ch == end_trigger && !dest->quote && ctx->w==RES_NONE) {
- debug("%s: leaving (triggered)\n", __func__);
+ hush_debug("%s: leaving (triggered)\n", __func__);
return 0;
}
@@ -1608,7 +1616,7 @@ static int parse_stream(o_string *dest, struct p_context *ctx,
* that is, we were really supposed to get end_trigger, and never got
* one before the EOF. Can't use the standard "syntax error" return code,
* so that parse_stream_outer can distinguish the EOF and exit smoothly. */
- debug("%s: leaving (EOF)\n", __func__);
+ hush_debug("%s: leaving (EOF)\n", __func__);
if (end_trigger != '\0')
return -1;
diff --git a/common/image-fit.c b/common/image-fit.c
index dfd1fa02c9..87a55b7e27 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -392,7 +392,9 @@ static int fit_verify_hash(struct fit_handle *handle, struct device_node *image,
ret = -EINVAL;
}
- hash = of_get_child_by_name(image, "hash@1");
+ hash = of_get_child_by_name(image, "hash-1");
+ if (!hash)
+ hash = of_get_child_by_name(image, "hash@1");
if (!hash) {
if (ret)
pr_err("image %s does not have hashes\n",
@@ -468,7 +470,9 @@ static int fit_image_verify_signature(struct fit_handle *handle,
ret = -EINVAL;
}
- sig_node = of_get_child_by_name(image, "signature@1");
+ sig_node = of_get_child_by_name(image, "signature-1");
+ if (!sig_node)
+ sig_node = of_get_child_by_name(image, "signature@1");
if (!sig_node) {
pr_err("Image %s has no signature\n", image->full_name);
return ret;
diff --git a/common/imx-bbu-nand-fcb.c b/common/imx-bbu-nand-fcb.c
index 8842ba6c58..8c276a43c0 100644
--- a/common/imx-bbu-nand-fcb.c
+++ b/common/imx-bbu-nand-fcb.c
@@ -204,7 +204,7 @@ static void encode_bch_ecc(void *buf, struct fcb_block *fcb, int eccbits)
free_bch(bch);
}
-struct fcb_block *read_fcb_bch(void *rawpage, int eccbits)
+static struct fcb_block *read_fcb_bch(void *rawpage, int eccbits)
{
int i, j, ret, errbit, m = 13;
int blocksize = 128;
@@ -308,7 +308,7 @@ static uint32_t calc_chksum(void *buf, size_t size)
return ~chksum;
}
-struct fcb_block *read_fcb_hamming_13_8(void *rawpage)
+static struct fcb_block *read_fcb_hamming_13_8(void *rawpage)
{
int i;
int bitflips = 0, bit_to_flip;
diff --git a/common/memory_display.c b/common/memory_display.c
index ea91985e5d..cd0eadf88d 100644
--- a/common/memory_display.c
+++ b/common/memory_display.c
@@ -4,10 +4,21 @@
#define DISP_LINE_LEN 16
-int memory_display(const void *addr, loff_t offs, unsigned nbytes, int size, int swab)
+
+int __pr_memory_display(int level, const void *addr, loff_t offs, unsigned nbytes,
+ int size, int swab, const char *fmt, ...)
{
unsigned long linebytes, i;
unsigned char *cp;
+ unsigned char line[sizeof("00000000: 0000 0000 0000 0000 0000 0000 0000 0000 ................")];
+ struct va_format vaf;
+ int ret;
+ va_list args;
+
+ va_start(args, fmt);
+
+ vaf.fmt = fmt;
+ vaf.va = &args;
/* Print the lines.
*
@@ -20,9 +31,9 @@ int memory_display(const void *addr, loff_t offs, unsigned nbytes, int size, int
uint32_t *uip = (uint32_t *)linebuf;
uint16_t *usp = (uint16_t *)linebuf;
uint8_t *ucp = (uint8_t *)linebuf;
- unsigned count = 52;
+ unsigned char *pos = line;
- printf("%08llx:", offs);
+ pos += sprintf(pos, "%08llx:", offs);
linebytes = (nbytes > DISP_LINE_LEN) ? DISP_LINE_LEN : nbytes;
for (i = 0; i < linebytes; i += size) {
@@ -34,9 +45,9 @@ int memory_display(const void *addr, loff_t offs, unsigned nbytes, int size, int
res = __swab64(res);
if (data_abort_unmask()) {
res = 0xffffffffffffffffULL;
- count -= printf(" xxxxxxxxxxxxxxxx");
+ pos += sprintf(pos, " xxxxxxxxxxxxxxxx");
} else {
- count -= printf(" %016llx", res);
+ pos += sprintf(pos, " %016llx", res);
}
*ullp++ = res;
} else if (size == 4) {
@@ -47,9 +58,9 @@ int memory_display(const void *addr, loff_t offs, unsigned nbytes, int size, int
res = __swab32(res);
if (data_abort_unmask()) {
res = 0xffffffff;
- count -= printf(" xxxxxxxx");
+ pos += sprintf(pos, " xxxxxxxx");
} else {
- count -= printf(" %08x", res);
+ pos += sprintf(pos, " %08x", res);
}
*uip++ = res;
} else if (size == 2) {
@@ -58,22 +69,26 @@ int memory_display(const void *addr, loff_t offs, unsigned nbytes, int size, int
res = *((uint16_t *)addr);
if (swab)
res = __swab16(res);
+ if (i > 1 && i % 8 == 0)
+ pos += sprintf(pos, " ");
if (data_abort_unmask()) {
res = 0xffff;
- count -= printf(" xxxx");
+ pos += sprintf(pos, " xxxx");
} else {
- count -= printf(" %04x", res);
+ pos += sprintf(pos, " %04x", res);
}
*usp++ = res;
} else {
uint8_t res;
data_abort_mask();
res = *((uint8_t *)addr);
+ if (i > 1 && i % 8 == 0)
+ pos += sprintf(pos, " ");
if (data_abort_unmask()) {
res = 0xff;
- count -= printf(" xx");
+ pos += sprintf(pos, " xx");
} else {
- count -= printf(" %02x", res);
+ pos += sprintf(pos, " %02x", res);
}
*ucp++ = res;
}
@@ -81,23 +96,40 @@ int memory_display(const void *addr, loff_t offs, unsigned nbytes, int size, int
offs += size;
}
- while (count--)
- putchar(' ');
+ pos += sprintf(pos, "%*s", 61 - (pos - line), "");
cp = linebuf;
for (i = 0; i < linebytes; i++) {
if ((*cp < 0x20) || (*cp > 0x7e))
- putchar('.');
+ sprintf(pos, ".");
else
- printf("%c", *cp);
+ sprintf(pos, "%c", *cp);
+ pos++;
cp++;
}
- putchar('\n');
+ if (level >= MSG_EMERG)
+ pr_print(level, "%pV%s\n", &vaf, line);
+ else
+ printf("%s\n", line);
+
nbytes -= linebytes;
- if (ctrlc())
- return -EINTR;
+ if (ctrlc()) {
+ ret = -EINTR;
+ goto out;
+ }
+
} while (nbytes > 0);
- return 0;
+ va_end(args);
+ ret = 0;
+out:
+
+ return ret;
}
+
+int memory_display(const void *addr, loff_t offs, unsigned nbytes,
+ int size, int swab)
+{
+ return pr_memory_display(-1, addr, offs, nbytes, size, swab);
+} \ No newline at end of file
diff --git a/common/misc.c b/common/misc.c
index 665f72be7e..66aba534fc 100644
--- a/common/misc.c
+++ b/common/misc.c
@@ -67,11 +67,11 @@ const char *strerror(int errnum)
case ETIMEDOUT : str = "Connection timed out"; break;
case EPROBE_DEFER : str = "Requested probe deferral"; break;
case ELOOP : str = "Too many symbolic links encountered"; break;
+ case ENODATA : str = "No data available"; break;
#if 0 /* These are probably not needed */
case ENOTBLK : str = "Block device required"; break;
case EFBIG : str = "File too large"; break;
case EBADSLT : str = "Invalid slot"; break;
- case ENODATA : str = "No data available"; break;
case ETIME : str = "Timer expired"; break;
case ENONET : str = "Machine is not on the network"; break;
case EADV : str = "Advertise error"; break;
diff --git a/common/parser.c b/common/parser.c
index 6136dbf36f..397d268da1 100644
--- a/common/parser.c
+++ b/common/parser.c
@@ -70,7 +70,7 @@ static void process_macros (const char *input, char *output)
/* 3 = waiting for ''' */
char __maybe_unused *output_start = output;
- pr_debug("[PROCESS_MACROS] INPUT len %d: \"%s\"\n", strlen (input),
+ pr_debug("[PROCESS_MACROS] INPUT len %zu: \"%s\"\n", strlen (input),
input);
prev = '\0'; /* previous character */
@@ -158,7 +158,7 @@ static void process_macros (const char *input, char *output)
if (outputcnt)
*output = 0;
- pr_debug("[PROCESS_MACROS] OUTPUT len %d: \"%s\"\n",
+ pr_debug("[PROCESS_MACROS] OUTPUT len %zu: \"%s\"\n",
strlen (output_start), output_start);
}
diff --git a/common/state/state_variables.c b/common/state/state_variables.c
index abd714ceda..269d175874 100644
--- a/common/state/state_variables.c
+++ b/common/state/state_variables.c
@@ -492,19 +492,6 @@ struct variable_type *state_find_type_by_name(const char *name)
return NULL;
}
-struct variable_type *state_find_type(const enum state_variable_type type)
-{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(types); i++) {
- if (type == types[i].type) {
- return &types[i];
- }
- }
-
- return NULL;
-}
-
struct state_variable *state_find_var(struct state *state, const char *name)
{
struct state_variable *sv;
diff --git a/common/ubiformat.c b/common/ubiformat.c
index 9fe1c7c501..0811525bd2 100644
--- a/common/ubiformat.c
+++ b/common/ubiformat.c
@@ -235,6 +235,9 @@ static int flash_image(struct ubiformat_args *args, struct mtd_info *mtd,
int err, new_len;
long long ec;
+ if (si->ec[eb] == EB_BAD)
+ continue;
+
if (!args->quiet && !args->verbose) {
if (is_timeout(lastprint, 300 * MSECOND) ||
eb == eb_cnt - 1) {
@@ -244,9 +247,6 @@ static int flash_image(struct ubiformat_args *args, struct mtd_info *mtd,
}
}
- if (si->ec[eb] == EB_BAD)
- continue;
-
if (args->verbose) {
normsg_cont("eraseblock %d: erase", eb);
}
@@ -357,6 +357,9 @@ static int format(struct ubiformat_args *args, struct mtd_info *mtd,
for (eb = start_eb; eb < eb_cnt; eb++) {
long long ec;
+ if (si->ec[eb] == EB_BAD)
+ continue;
+
if (!args->quiet && !args->verbose) {
if (is_timeout(lastprint, 300 * MSECOND) ||
eb == eb_cnt - 1) {
@@ -366,9 +369,6 @@ static int format(struct ubiformat_args *args, struct mtd_info *mtd,
}
}
- if (si->ec[eb] == EB_BAD)
- continue;
-
if (args->override_ec)
ec = args->ec;
else if (si->ec[eb] <= EC_MAX)
diff --git a/defaultenv/defaultenv-2-base/boot/bnet b/defaultenv/defaultenv-2-base/boot/bnet
new file mode 100644
index 0000000000..e378acd1e6
--- /dev/null
+++ b/defaultenv/defaultenv-2-base/boot/bnet
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# script to boot barebox over tftp
+
+path="/mnt/tftp"
+
+global.bootm.image="${path}/${global.user}-barebox-${global.hostname}"
diff --git a/drivers/aiodev/mc13xxx_adc.c b/drivers/aiodev/mc13xxx_adc.c
index 4e72048169..d445d1ec6e 100644
--- a/drivers/aiodev/mc13xxx_adc.c
+++ b/drivers/aiodev/mc13xxx_adc.c
@@ -75,8 +75,9 @@ to_mc13xx_adc_data(struct aiochannel *chan)
return container_of(chan->aiodev, struct mc13xx_adc_data, aiodev);
}
-int mc13xxx_adc_do_conversion(struct mc13xxx *mc13xxx,
- unsigned int channel, unsigned int *sample)
+static int mc13xxx_adc_do_conversion(struct mc13xxx *mc13xxx,
+ unsigned int channel,
+ unsigned int *sample)
{
int i;
int timeout = 100;
diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index 4acc4cfa1e..1fd890542e 100644
--- a/drivers/base/driver.c
+++ b/drivers/base/driver.c
@@ -177,7 +177,7 @@ int register_device(struct device_d *new_device)
new_device->id = get_free_deviceid(new_device->name);
} else {
if (get_device_by_name_id(new_device->name, new_device->id)) {
- eprintf("register_device: already registered %s\n",
+ pr_err("register_device: already registered %s\n",
dev_name(new_device));
return -EINVAL;
}
diff --git a/drivers/bus/omap-gpmc.c b/drivers/bus/omap-gpmc.c
index be9ef92851..a3fccb2182 100644
--- a/drivers/bus/omap-gpmc.c
+++ b/drivers/bus/omap-gpmc.c
@@ -187,7 +187,7 @@ static unsigned int gpmc_ns_to_ticks(unsigned int time_ns)
return (time_ns * 1000 + tick_ps - 1) / tick_ps;
}
-int gpmc_calc_divider(unsigned int sync_clk)
+static int gpmc_calc_divider(unsigned int sync_clk)
{
int div;
u32 l;
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 24759b45bb..6a2d8ad178 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -413,7 +413,7 @@ int of_clk_add_provider(struct device_node *np,
cp->get = clk_src_get;
list_add(&cp->link, &of_clk_providers);
- pr_debug("Added clock from %s\n", np->full_name);
+ pr_debug("Added clock from %s\n", np ? np->full_name : "<none>");
return 0;
}
diff --git a/drivers/clk/imx/clk-cpu.c b/drivers/clk/imx/clk-cpu.c
index 5ac0ed1789..473500131e 100644
--- a/drivers/clk/imx/clk-cpu.c
+++ b/drivers/clk/imx/clk-cpu.c
@@ -111,8 +111,10 @@ struct clk *imx_clk_cpu(const char *name, const char *parent_name,
cpu->clk.num_parents = 1;
ret = clk_register(&cpu->clk);
- if (ret)
+ if (ret) {
free(cpu);
+ return NULL;
+ }
return &cpu->clk;
}
diff --git a/drivers/clk/imx/clk-gate2.c b/drivers/clk/imx/clk-gate2.c
index f2e704cdb2..8d5ed7e05c 100644
--- a/drivers/clk/imx/clk-gate2.c
+++ b/drivers/clk/imx/clk-gate2.c
@@ -87,7 +87,7 @@ static struct clk_ops clk_gate2_ops = {
.is_enabled = clk_gate2_is_enabled,
};
-struct clk *clk_gate2_alloc(const char *name, const char *parent,
+static struct clk *clk_gate2_alloc(const char *name, const char *parent,
void __iomem *reg, u8 shift, u8 cgr_val,
unsigned long flags)
{
@@ -106,13 +106,6 @@ struct clk *clk_gate2_alloc(const char *name, const char *parent,
return &g->clk;
}
-void clk_gate2_free(struct clk *clk)
-{
- struct clk_gate2 *g = to_clk_gate2(clk);
-
- free(g);
-}
-
struct clk *clk_gate2(const char *name, const char *parent, void __iomem *reg,
u8 shift, u8 cgr_val, unsigned long flags)
{
diff --git a/drivers/clk/imx/clk-imx5.c b/drivers/clk/imx/clk-imx5.c
index ae94e07f23..f59a41b001 100644
--- a/drivers/clk/imx/clk-imx5.c
+++ b/drivers/clk/imx/clk-imx5.c
@@ -60,6 +60,7 @@
#define CCM_CMEOR 0x84
static struct clk *clks[IMX5_CLK_END];
+static struct clk_onecell_data clk_data;
/* This is used multiple times */
static const char *standard_pll_sel[] = {
@@ -411,6 +412,10 @@ static int imx51_ccm_probe(struct device_d *dev)
mx51_clocks_init(dev, regs);
+ clk_data.clks = clks;
+ clk_data.clk_num = IMX5_CLK_END;
+ of_clk_add_provider(dev->device_node, of_clk_src_onecell_get, &clk_data);
+
return 0;
}
@@ -503,6 +508,10 @@ static int imx53_ccm_probe(struct device_d *dev)
mx53_clocks_init(dev, regs);
+ clk_data.clks = clks;
+ clk_data.clk_num = IMX5_CLK_END;
+ of_clk_add_provider(dev->device_node, of_clk_src_onecell_get, &clk_data);
+
return 0;
}
diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index 3caf72503a..337a7a2e13 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -1,3 +1,5 @@
+menu "Clocksource"
+
config ARCH_HAS_IMX_GPT
bool
@@ -80,3 +82,10 @@ config CLOCKSOURCE_ARM_GLOBAL_TIMER
config CLOCKSOURCE_IMX_GPT
def_bool y
depends on ARCH_HAS_IMX_GPT
+
+config CLOCKSOURCE_DW_APB_TIMER
+ bool "DW APB timer driver"
+ help
+ Enables the support for the dw_apb timer.
+
+endmenu
diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile
index ce4d74137a..ab78f0700d 100644
--- a/drivers/clocksource/Makefile
+++ b/drivers/clocksource/Makefile
@@ -14,3 +14,4 @@ obj-$(CONFIG_CLOCKSOURCE_ATMEL_PIT) += timer-atmel-pit.o
obj-$(CONFIG_CLOCKSOURCE_ARMV8_TIMER) += armv8-timer.o
obj-$(CONFIG_CLOCKSOURCE_ARM_GLOBAL_TIMER) += arm_global_timer.o
obj-$(CONFIG_CLOCKSOURCE_IMX_GPT) += timer-imx-gpt.o
+obj-$(CONFIG_CLOCKSOURCE_DW_APB_TIMER) += dw_apb_timer.o
diff --git a/drivers/clocksource/dw_apb_timer.c b/drivers/clocksource/dw_apb_timer.c
new file mode 100644
index 0000000000..82ad6bccbc
--- /dev/null
+++ b/drivers/clocksource/dw_apb_timer.c
@@ -0,0 +1,148 @@
+/*
+ * (C) Copyright 2009 Intel Corporation
+ * Author: Jacob Pan (jacob.jun.pan@intel.com)
+ *
+ * Shared with ARM platforms, Jamie Iles, Picochip 2011
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Support for the Synopsys DesignWare APB Timers.
+ *
+ *
+ * Taken from linux-4.9 kernel and adapted to barebox.
+ */
+#include <common.h>
+#include <clock.h>
+#include <init.h>
+
+#include <linux/clk.h>
+#include <linux/err.h>
+
+#define APBT_MIN_PERIOD 4
+#define APBT_MIN_DELTA_USEC 200
+
+#define APBTMR_N_LOAD_COUNT 0x00
+#define APBTMR_N_CURRENT_VALUE 0x04
+#define APBTMR_N_CONTROL 0x08
+#define APBTMR_N_EOI 0x0c
+#define APBTMR_N_INT_STATUS 0x10
+
+#define APBTMRS_INT_STATUS 0xa0
+#define APBTMRS_EOI 0xa4
+#define APBTMRS_RAW_INT_STATUS 0xa8
+#define APBTMRS_COMP_VERSION 0xac
+
+#define APBTMR_CONTROL_ENABLE (1 << 0)
+/* 1: periodic, 0:free running. */
+#define APBTMR_CONTROL_MODE_PERIODIC (1 << 1)
+#define APBTMR_CONTROL_INT (1 << 2)
+
+#define APBTMRS_REG_SIZE 0x14
+
+struct dw_apb_timer {
+ void __iomem *base;
+ unsigned long freq;
+ int irq;
+};
+
+static struct dw_apb_timer timer;
+
+static inline u32 apbt_readl(struct dw_apb_timer *timer, unsigned long offs)
+{
+ return readl(timer->base + offs);
+}
+
+static inline void apbt_writel(struct dw_apb_timer *timer, u32 val,
+ unsigned long offs)
+{
+ writel(val, timer->base + offs);
+}
+
+/**
+ * dw_apb_clocksource_start() - start the clocksource counting.
+ *
+ * @clksrc: The clocksource to start.
+ *
+ * This is used to start the clocksource before registration and can be used
+ * to enable calibration of timers.
+ */
+static int dw_apb_clocksource_start(struct clocksource *clksrc)
+{
+ /*
+ * start count down from 0xffff_ffff. this is done by toggling the
+ * enable bit then load initial load count to ~0.
+ */
+ uint32_t ctrl = apbt_readl(&timer, APBTMR_N_CONTROL);
+
+ ctrl &= ~APBTMR_CONTROL_ENABLE;
+ apbt_writel(&timer, ctrl, APBTMR_N_CONTROL);
+ apbt_writel(&timer, ~0, APBTMR_N_LOAD_COUNT);
+
+ /* enable, mask interrupt */
+ ctrl &= ~APBTMR_CONTROL_MODE_PERIODIC;
+ ctrl |= (APBTMR_CONTROL_ENABLE | APBTMR_CONTROL_INT);
+ apbt_writel(&timer, ctrl, APBTMR_N_CONTROL);
+
+ return 0;
+}
+
+static uint64_t dw_apb_clocksource_read(void)
+{
+ return (uint64_t) ~apbt_readl(&timer, APBTMR_N_CURRENT_VALUE);
+}
+
+static struct clocksource dw_apb_clksrc = {
+ .init = dw_apb_clocksource_start,
+ .read = dw_apb_clocksource_read,
+ .mask = CLOCKSOURCE_MASK(32),
+ .shift = 0,
+};
+
+static int dw_apb_timer_probe(struct device_d *dev)
+{
+ struct device_node *np = dev->device_node;
+ struct resource *iores;
+ struct clk *clk;
+ uint32_t clk_freq;
+
+ /* use only one timer */
+ if (timer.base)
+ return -EBUSY;
+
+ iores = dev_request_mem_resource(dev, 0);
+ if (IS_ERR(iores)) {
+ dev_err(dev, "could not get memory region\n");
+ return PTR_ERR(iores);
+ }
+
+ timer.base = IOMEM(iores->start);
+
+ /* Get clock frequency */
+ clk = of_clk_get(np, 0);
+ if (IS_ERR(clk)) {
+ pr_err("Failed to get CPU clock: %ld\n", PTR_ERR(clk));
+ return PTR_ERR(clk);
+ }
+
+ clk_freq = clk_get_rate(clk);
+ clk_put(clk);
+
+ dw_apb_clksrc.mult = clocksource_hz2mult(clk_freq, dw_apb_clksrc.shift);
+
+ return init_clock(&dw_apb_clksrc);
+}
+
+static struct of_device_id dw_apb_timer_dt_ids[] = {
+ { .compatible = "snps,dw-apb-timer", },
+ { }
+};
+
+static struct driver_d dw_apb_timer_driver = {
+ .name = "dw-apb-timer",
+ .probe = dw_apb_timer_probe,
+ .of_compatible = DRV_OF_COMPAT(dw_apb_timer_dt_ids),
+};
+
+device_platform_driver(dw_apb_timer_driver);
diff --git a/drivers/crypto/caam/Kconfig b/drivers/crypto/caam/Kconfig
index 2ab509d110..56b90700b8 100644
--- a/drivers/crypto/caam/Kconfig
+++ b/drivers/crypto/caam/Kconfig
@@ -33,3 +33,27 @@ config CRYPTO_DEV_FSL_CAAM_RNG
default y
help
Selecting this will register the SEC4 hardware rng.
+
+if CRYPTO_DEV_FSL_CAAM_RNG
+
+config CRYPTO_DEV_FSL_CAAM_RNG_SELF_TEST
+ bool "Run RNG software self-test on impacted chips"
+ depends on ARCH_IMX6
+ depends on HABV4
+ default y
+ help
+ Some chips with HAB >= 4.2.3 have an incorrect implementation of the
+ RNG self-test in ROM code. In this case, a software self-test should
+ be run to ensure correctness of the RNG. By enabling this config
+ option, the software self-test is run automatically when this case
+ is detected.
+
+ Currently known impacted chips:
+ * i.MX6DQ+ silicon revision 1.1
+ * i.MX6DQ silicon revision 1.6
+ * i.MX6DLS silicon revision 1.4
+ * i.MX6SX silicon revision 1.4
+ * i.MX6UL silicon revision 1.2
+ * i.MX67SD silicon revision 1.3
+
+endif
diff --git a/drivers/crypto/caam/Makefile b/drivers/crypto/caam/Makefile
index 74d32da00e..7bd6f3e23c 100644
--- a/drivers/crypto/caam/Makefile
+++ b/drivers/crypto/caam/Makefile
@@ -3,3 +3,4 @@
#
obj-$(CONFIG_CRYPTO_DEV_FSL_CAAM) += ctrl.o error.o jr.o
obj-$(CONFIG_CRYPTO_DEV_FSL_CAAM_RNG) += caamrng.o
+obj-$(CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_SELF_TEST) += rng_self_test.o
diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c
index 9e62bd6fd6..39910131b1 100644
--- a/drivers/crypto/caam/ctrl.c
+++ b/drivers/crypto/caam/ctrl.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <clock.h>
#include <driver.h>
+#include <hab.h>
#include <init.h>
#include <linux/barebox-wrapper.h>
#include <linux/spinlock.h>
@@ -19,6 +20,7 @@
#include "desc_constr.h"
#include "error.h"
#include "ctrl.h"
+#include "rng_self_test.h"
bool caam_little_end;
EXPORT_SYMBOL(caam_little_end);
@@ -570,6 +572,24 @@ static int caam_probe(struct device_d *dev)
cha_vid_ls = rd_reg32(&ctrl->perfmon.cha_id_ls);
+ /* habv4_need_rng_software_self_test is determined by habv4_get_status() */
+ if (IS_ENABLED(CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_SELF_TEST) &&
+ habv4_need_rng_software_self_test) {
+ u8 caam_era;
+ u8 rngvid;
+ u8 rngrev;
+
+ caam_era = (rd_reg32(&ctrl->perfmon.ccb_id) & CCBVID_ERA_MASK) >> CCBVID_ERA_SHIFT;
+ rngvid = (cha_vid_ls & CHAVID_LS_RNGVID_MASK) >> CHAVID_LS_RNGVID_SHIFT;
+ rngrev = (rd_reg32(&ctrl->perfmon.cha_rev_ls) & CRNR_LS_RNGRN_MASK) >> CRNR_LS_RNGRN_SHIFT;
+
+ ret = caam_rng_self_test(ctrlpriv->jrpdev[0], caam_era, rngvid, rngrev);
+ if (ret != 0) {
+ caam_remove(dev);
+ return ret;
+ }
+ }
+
/*
* If SEC has RNG version >= 4 and RNG state handle has not been
* already instantiated, do RNG instantiation
diff --git a/drivers/crypto/caam/regs.h b/drivers/crypto/caam/regs.h
index 6c9d6d75a0..19e7d6d7e4 100644
--- a/drivers/crypto/caam/regs.h
+++ b/drivers/crypto/caam/regs.h
@@ -279,6 +279,8 @@ struct caam_perfmon {
/* CAAM Hardware Instantiation Parameters fa0-fbf */
u32 cha_rev_ms; /* CRNR - CHA Rev No. Most significant half*/
+#define CRNR_LS_RNGRN_SHIFT 16
+#define CRNR_LS_RNGRN_MASK (0xfull << CRNR_LS_RNGRN_SHIFT)
u32 cha_rev_ls; /* CRNR - CHA Rev No. Least significant half*/
#define CTPR_MS_QI_SHIFT 25
#define CTPR_MS_QI_MASK (0x1ull << CTPR_MS_QI_SHIFT)
@@ -311,6 +313,8 @@ struct caam_perfmon {
#define CCBVID_ERA_SHIFT 24
u32 ccb_id; /* CCBVID - CCB Version ID */
u32 cha_id_ms; /* CHAVID - CHA Version ID Most Significant*/
+#define CHAVID_LS_RNGVID_SHIFT 16
+#define CHAVID_LS_RNGVID_MASK (0xfull << CHAVID_LS_RNGVID_SHIFT)
u32 cha_id_ls; /* CHAVID - CHA Version ID Least Significant*/
u32 cha_num_ms; /* CHANUM - CHA Number Most Significant */
u32 cha_num_ls; /* CHANUM - CHA Number Least Significant*/
diff --git a/drivers/crypto/caam/rng_self_test.c b/drivers/crypto/caam/rng_self_test.c
new file mode 100644
index 0000000000..aab4fa2e47
--- /dev/null
+++ b/drivers/crypto/caam/rng_self_test.c
@@ -0,0 +1,206 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright 2018 NXP
+ * Copyright (C) 2018 Pengutronix, Roland Hieber <r.hieber@pengutronix.de>
+ *
+ * CAAM RNG self-test -- based on the vendor patch for U-Boot:
+ * https://portland.source.codeaurora.org/patches/external/imxsupport/uboot-imx/imx_v2016.03_4.1.15_2.0.0_ga/HAB-238-Run-RNG-self-test-for-impacted-i.MX-chips.zip
+ *
+ * | From: Utkarsh Gupta <utkarsh.gupta@nxp.com>
+ * | Subject: [PATCH] HAB-238 Run RNG self test for impacted i.MX chips
+ * |
+ * | Patch is only applicable to imx_v2016.03_4.1.15_2.0.0_ga branch of u-boot.
+ * | Please adapt the patch for your respective release version.
+ * |
+ * | Background:
+ * | Few i.MX chips which have HAB 4.2.3 or beyond, have oberserved following
+ * | warning message generated by HAB due to incorrect implementation of drng
+ * | self test in boot ROM.
+ * |
+ * | Event |0xdb|0x0024|0x42| SRCE Field: 69 30 e1 1d
+ * | | | | | STS = HAB_WARNING (0x69)
+ * | | | | | RSN = HAB_ENG_FAIL (0x30)
+ * | | | | | CTX = HAB_CTX_ENTRY (0xE1)
+ * | | | | | ENG = HAB_ENG_CAAM (0x1D)
+ * | | | | | Evt Data (hex):
+ * | | | | | 00 08 00 02 40 00 36 06 55 55 00 03 00 00 00 00
+ * | | | | | 00 00 00 00 00 00 00 00 00 00 00 01
+ * |
+ * | It is recommended to run this rng self test before any RNG related crypto
+ * | implementations are done.
+ * [...]
+ * |
+ * | Signed-off-by: Utkarsh Gupta <utkarsh.gupta@nxp.com>
+ *
+ * Known impacted chips:
+ *
+ * - i.MX6DQ+ silicon revision 1.1
+ * - i.MX6DQ silicon revision 1.6
+ * - i.MX6DLS silicon revision 1.4
+ * - i.MX6SX silicon revision 1.4
+ * - i.MX6UL silicon revision 1.2
+ * - i.MX67SD silicon revision 1.3
+ */
+
+#define pr_fmt(fmt) "rng_self_test: " fmt
+
+#include <dma.h>
+#include <common.h>
+#include <linux/kernel.h>
+
+#include "error.h"
+#include "regs.h"
+#include "jr.h"
+
+static const u32 rng_dsc1[] = {
+ 0xb0800036, 0x04800010, 0x3c85a15b, 0x50a9d0b1,
+ 0x71a09fee, 0x2eecf20b, 0x02800020, 0xb267292e,
+ 0x85bf712d, 0xe85ff43a, 0xa716b7fb, 0xc40bb528,
+ 0x27b6f564, 0x8821cb5d, 0x9b5f6c26, 0x12a00020,
+ 0x0a20de17, 0x6529357e, 0x316277ab, 0x2846254e,
+ 0x34d23ba5, 0x6f5e9c32, 0x7abdc1bb, 0x0197a385,
+ 0x82500405, 0xa2000001, 0x10880004, 0x00000005,
+ 0x12820004, 0x00000020, 0x82500001, 0xa2000001,
+ 0x10880004, 0x40000045, 0x02800020, 0x8f389cc7,
+ 0xe7f7cbb0, 0x6bf2073d, 0xfc380b6d, 0xb22e9d1a,
+ 0xee64fcb7, 0xa2b48d49, 0xdf9bc3a4, 0x82500009,
+ 0xa2000001, 0x10880004, 0x00000005, 0x82500001,
+ 0x60340020, 0xFFFFFFFF, 0xa2000001, 0x10880004,
+ 0x00000005, 0x8250000d
+};
+
+static const u8 rng_result1[] = {
+ 0x3a, 0xfe, 0x2c, 0x87, 0xcc, 0xb6, 0x44, 0x49,
+ 0x19, 0x16, 0x9a, 0x74, 0xa1, 0x31, 0x8b, 0xef,
+ 0xf4, 0x86, 0x0b, 0xb9, 0x5e, 0xee, 0xae, 0x91,
+ 0x92, 0xf4, 0xa9, 0x8f, 0xb0, 0x37, 0x18, 0xa4
+};
+
+static const u32 rng_dsc2[] = {
+ 0xb080003a, 0x04800020, 0x27b73130, 0x30b4b10f,
+ 0x7c62b1ad, 0x77abe899, 0x67452301, 0xefcdab89,
+ 0x98badcfe, 0x10325476, 0x02800020, 0x63f757cf,
+ 0xb9165584, 0xc3c1b407, 0xcc4ce8ad, 0x1ffe8a58,
+ 0xfb4fa893, 0xbb5f4af0, 0x3fb946a1, 0x12a00020,
+ 0x56cbcaa5, 0xfff3adad, 0xe804dcbf, 0x9a900c71,
+ 0xa42017e3, 0x826948e2, 0xd0cfeb3e, 0xaf1a136a,
+ 0x82500405, 0xa2000001, 0x10880004, 0x00000005,
+ 0x12820004, 0x00000020, 0x82500001, 0xa2000001,
+ 0x10880004, 0x40000045, 0x02800020, 0x2e882f8a,
+ 0xe929943e, 0x8132c0a8, 0x12037f90, 0x809fbd66,
+ 0x8684ea04, 0x00cbafa7, 0x7b82d12a, 0x82500009,
+ 0xa2000001, 0x10880004, 0x00000005, 0x82500001,
+ 0x60340020, 0xFFFFFFFF, 0xa2000001, 0x10880004,
+ 0x00000005, 0x8250000d
+};
+
+static const u8 rng_result2[] = {
+ 0x76, 0x87, 0x66, 0x4e, 0xd8, 0x1d, 0x1f, 0x43,
+ 0x76, 0x50, 0x85, 0x5d, 0x1e, 0x1d, 0x9d, 0x0f,
+ 0x93, 0x75, 0x83, 0xff, 0x9a, 0x9b, 0x61, 0xa9,
+ 0xa5, 0xeb, 0xa3, 0x28, 0x2a, 0x15, 0xc1, 0x57
+};
+
+/*
+ * construct_rng_self_test_jobdesc() - Implement destination address in RNG self test descriptors
+ * Returns zero on success, and negative on error.
+ */
+static void construct_rng_self_test_jobdesc(u32 *desc, const u32 *rng_st_dsc, u8 *res_addr, int desc_size)
+{
+ int result_addr_idx = desc_size - 5;
+ int i;
+
+ for (i = 0; i < desc_size; i++) {
+ desc[i] = rng_st_dsc[i];
+ }
+
+ /* Replace destination address in the descriptor */
+ desc[result_addr_idx] = (u32)res_addr;
+}
+
+/* rng_self_test_done() - callback for caam_jr_enqueue */
+static void rng_self_test_done(struct device_d *dev, u32 *desc, u32 err, void *arg)
+{
+ int * job_err = arg;
+ *job_err = err;
+}
+
+/*
+ * caam_rng_self_test() - Perform RNG self test
+ * Returns zero on success, and negative on error.
+ */
+int caam_rng_self_test(struct device_d *dev, const u8 caam_era, const u8 rngvid, const u8 rngrev)
+{
+ int ret, desc_size = 0, result_size = 0, job_err = 0;
+ const u32 *rng_st_dsc;
+ const u8 *exp_result;
+ u32 *desc;
+ u8 *result;
+
+ pr_debug("got CAAM ERA %d, RNG Version ID %d, RNG revision %d\n",
+ caam_era, rngvid, rngrev);
+
+ if (caam_era < 8 && rngvid == 4 && rngrev < 3) {
+ /* older affected i.MX chipsets have CAAM < 8 and have RNG4 < 4.3 */
+ rng_st_dsc = rng_dsc1;
+ desc_size = ARRAY_SIZE(rng_dsc1);
+ exp_result = rng_result1;
+ result_size = ARRAY_SIZE(rng_result1);
+ } else if (caam_era >= 8 || (rngvid >= 4 && rngrev >= 3)) {
+ /* newer affected chipsets have CAAM >= 8 or RNG4 >= 4.3 */
+ rng_st_dsc = rng_dsc2;
+ desc_size = ARRAY_SIZE(rng_dsc2);
+ exp_result = rng_result2;
+ result_size = ARRAY_SIZE(rng_result2);
+ } else {
+ pr_err("Invalid CAAM version: %d,%d,%d\n",
+ caam_era, rngvid, rngrev);
+ return -EINVAL;
+ }
+
+ result = dma_alloc(sizeof(*result) * result_size);
+ desc = dma_alloc(sizeof(*desc) * desc_size);
+
+ if (!result || !desc) {
+ ret = -ENOMEM;
+ goto err;
+ }
+
+ construct_rng_self_test_jobdesc(desc, rng_st_dsc, result, desc_size);
+
+ dma_sync_single_for_device((unsigned long)desc,
+ desc_size * sizeof(*desc), DMA_TO_DEVICE);
+ dma_sync_single_for_device((unsigned long)result,
+ result_size * sizeof(*result), DMA_FROM_DEVICE);
+
+ /* wait for job completion */
+ ret = caam_jr_enqueue(dev, desc, rng_self_test_done, &job_err);
+ if (ret) {
+ pr_err("Running RNG self-test descriptor failed: %d %s\n",
+ ret, strerror(ret));
+ goto err;
+ }
+ if (job_err) {
+ ret = -EINVAL;
+ pr_err("Job Error:\n");
+ caam_jr_strstatus(dev, job_err);
+ goto err;
+ }
+
+ dma_sync_single_for_cpu((unsigned long)result, result_size * sizeof(*result),
+ DMA_FROM_DEVICE);
+
+ if (memcmp(result, exp_result, sizeof(*result) * result_size) != 0) {
+ pr_err("RNG self-test failed with unexpected result\n");
+ ret = -ERANGE;
+ goto err;
+ }
+
+ pr_info("RNG software self-test passed\n");
+ ret = 0;
+
+err:
+ dma_free(desc);
+ dma_free(result);
+ return ret;
+}
diff --git a/drivers/crypto/caam/rng_self_test.h b/drivers/crypto/caam/rng_self_test.h
new file mode 100644
index 0000000000..1f5bf32628
--- /dev/null
+++ b/drivers/crypto/caam/rng_self_test.h
@@ -0,0 +1,24 @@
+/*
+ * CAAM RNG self test
+ *
+ * Copyright (C) 2018 Pengutronix, Roland Hieber <r.hieber@pengutronix.de>
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef RNG_SELF_TEST_H
+#define RNG_SELF_TEST_H
+
+int caam_rng_self_test(struct device_d *dev, const u8 caam_era, const u8 rngvid, const u8 rngrev);
+
+#endif /* RNG_SELF_TEST_H */
diff --git a/drivers/dma/apbh_dma.c b/drivers/dma/apbh_dma.c
index 79f25109f9..72c2f364c5 100644
--- a/drivers/dma/apbh_dma.c
+++ b/drivers/dma/apbh_dma.c
@@ -67,7 +67,7 @@ static struct apbh_dma *apbh_dma;
/*
* Test is the DMA channel is valid channel
*/
-int mxs_dma_validate_chan(int channel)
+static int mxs_dma_validate_chan(int channel)
{
struct mxs_dma_chan *pchan;
diff --git a/drivers/hab/habv3.c b/drivers/hab/habv3.c
index 82ae245f8a..47d3caf864 100644
--- a/drivers/hab/habv3.c
+++ b/drivers/hab/habv3.c
@@ -78,5 +78,9 @@ int imx_habv3_get_status(uint32_t status)
int imx25_hab_get_status(void)
{
+ if (!cpu_is_mx25())
+ return 0;
+
return imx_habv3_get_status(readl(IOMEM(0x780018d4)));
}
+postmmu_initcall(imx25_hab_get_status);
diff --git a/drivers/hab/habv4.c b/drivers/hab/habv4.c
index 28fd42ecd7..ca95c01e7b 100644
--- a/drivers/hab/habv4.c
+++ b/drivers/hab/habv4.c
@@ -20,6 +20,7 @@
#include <common.h>
#include <hab.h>
+#include <init.h>
#include <types.h>
#include <mach/generic.h>
@@ -387,6 +388,39 @@ static void habv4_display_event(uint8_t *data, uint32_t len)
habv4_display_event_record((struct hab_event_record *)data);
}
+/* Some chips with HAB >= 4.2.3 have an incorrect implementation of the RNG
+ * self-test in ROM code. In this case, an HAB event is generated, and a
+ * software self-test should be run. This variable is set to @c true by
+ * habv4_get_status() when this occurs. */
+bool habv4_need_rng_software_self_test = false;
+EXPORT_SYMBOL(habv4_need_rng_software_self_test);
+
+#define RNG_FAIL_EVENT_SIZE 36
+static uint8_t habv4_known_rng_fail_events[][RNG_FAIL_EVENT_SIZE] = {
+ { 0xdb, 0x00, 0x24, 0x42, 0x69, 0x30, 0xe1, 0x1d,
+ 0x00, 0x80, 0x00, 0x02, 0x40, 0x00, 0x36, 0x06,
+ 0x55, 0x55, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01 },
+ { 0xdb, 0x00, 0x24, 0x42, 0x69, 0x30, 0xe1, 0x1d,
+ 0x00, 0x04, 0x00, 0x02, 0x40, 0x00, 0x36, 0x06,
+ 0x55, 0x55, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01 },
+};
+
+static bool is_known_rng_fail_event(const uint8_t *data, size_t len)
+{
+ int i;
+ for (i = 0; i < ARRAY_SIZE(habv4_known_rng_fail_events); i++) {
+ if (memcmp(data, habv4_known_rng_fail_events[i],
+ min(len, (uint32_t)RNG_FAIL_EVENT_SIZE)) == 0) {
+ return true;
+ }
+ }
+ return false;
+}
+
static int habv4_get_status(const struct habv4_rvt *rvt)
{
uint8_t data[256];
@@ -413,10 +447,18 @@ static int habv4_get_status(const struct habv4_rvt *rvt)
len = sizeof(data);
while (rvt->report_event(HAB_STATUS_WARNING, index, data, &len) == HAB_STATUS_SUCCESS) {
- pr_err("-------- HAB warning Event %d --------\n", index);
- pr_err("event data:\n");
- habv4_display_event(data, len);
+ /* suppress RNG self-test fail events if they can be handled in software */
+ if (IS_ENABLED(CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_SELF_TEST) &&
+ is_known_rng_fail_event(data, len)) {
+ pr_debug("RNG self-test failure detected, will run software self-test\n");
+ habv4_need_rng_software_self_test = true;
+ } else {
+ pr_err("-------- HAB warning Event %d --------\n", index);
+ pr_err("event data:\n");
+ habv4_display_event(data, len);
+ }
+
len = sizeof(data);
index++;
}
@@ -460,9 +502,54 @@ int imx6_hab_get_status(void)
return -EINVAL;
}
+static int init_imx6_hab_get_status(void)
+{
+ int ret = 0;
+
+ if (!cpu_is_mx6())
+ /* can happen in multi-image builds and is not an error */
+ return 0;
+
+ ret = imx6_hab_get_status();
+
+ /*
+ * Nobody will check the return value if there were HAB errors, but the
+ * initcall will fail spectaculously with a strange error message.
+ */
+ if (ret == -EPERM)
+ return 0;
+ return ret;
+}
+
+/*
+ * Need to run before MMU setup because i.MX6 ROM code is mapped near 0x0,
+ * which will no longer be accessible when the MMU sets the zero page to
+ * faulting.
+ */
+postconsole_initcall(init_imx6_hab_get_status);
+
int imx28_hab_get_status(void)
{
const struct habv4_rvt *rvt = (void *)HABV4_RVT_IMX28;
return habv4_get_status(rvt);
}
+
+static int init_imx28_hab_get_status(void)
+{
+ int ret = 0;
+
+ if (!cpu_is_mx28())
+ /* can happen in multi-image builds and is not an error */
+ return 0;
+
+ ret = imx28_hab_get_status();
+
+ /* nobody will check the return value if there were HAB errors, but the
+ * initcall will fail spectaculously with a strange error message. */
+ if (ret == -EPERM)
+ return 0;
+ return ret;
+}
+/* i.MX28 ROM code can be run after MMU setup to make use of caching */
+postmmu_initcall(init_imx28_hab_get_status);
diff --git a/drivers/mfd/da9063.c b/drivers/mfd/da9063.c
index b6114a614b..a7fff2c5bf 100644
--- a/drivers/mfd/da9063.c
+++ b/drivers/mfd/da9063.c
@@ -201,7 +201,7 @@ static int da9062_device_init(struct da9063 *priv)
priv->client1 = i2c_new_dummy(priv->client->adapter,
priv->client->addr + 1);
- if (!priv) {
+ if (!priv->client1) {
dev_warn(priv->dev, "failed to create bank 1 device\n");
/* TODO: return -EINVAL; i2c api does not return more
* details */
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index 797cdc2ba6..4c1725d096 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -788,7 +788,6 @@ static int pmecc_build_galois_table(unsigned int mm, int16_t *index_of,
case 3:
case 4:
case 6:
- case 15:
p[1] = 1;
break;
case 5:
diff --git a/drivers/mtd/nand/nand_denali.c b/drivers/mtd/nand/nand_denali.c
index c530a80bde..2561966243 100644
--- a/drivers/mtd/nand/nand_denali.c
+++ b/drivers/mtd/nand/nand_denali.c
@@ -1387,7 +1387,7 @@ int denali_init(struct denali_nand_info *denali)
}
/* allocate a temporary buffer for nand_scan_ident() */
- denali->buf.buf = kzalloc(PAGE_SIZE, GFP_DMA | GFP_KERNEL);
+ denali->buf.buf = kzalloc(PAGE_SIZE, GFP_KERNEL);
if (!denali->buf.buf)
return -ENOMEM;
diff --git a/drivers/mtd/nand/nand_omap_bch_decoder.c b/drivers/mtd/nand/nand_omap_bch_decoder.c
index 64e8031785..4dd28a7704 100644
--- a/drivers/mtd/nand/nand_omap_bch_decoder.c
+++ b/drivers/mtd/nand/nand_omap_bch_decoder.c
@@ -15,6 +15,8 @@
#include <common.h>
+#include "nand_omap_bch_decoder.h"
+
#define mm 13
#define kk_shorten 4096
#define nn 8191 /* Length of codeword, n = 2**mm - 1 */
diff --git a/drivers/mtd/nand/nand_omap_bch_decoder.h b/drivers/mtd/nand/nand_omap_bch_decoder.h
new file mode 100644
index 0000000000..74d24be028
--- /dev/null
+++ b/drivers/mtd/nand/nand_omap_bch_decoder.h
@@ -0,0 +1,6 @@
+#ifndef MTD_OMAP_GPMC_DECODE_BCH_H
+#define MTD_OMAP_GPMC_DECODE_BCH_H
+
+int omap_gpmc_decode_bch(int select_4_8, unsigned char *ecc, unsigned int *err_loc);
+
+#endif /* MTD_OMAP_GPMC_DECODE_BCH_H */ \ No newline at end of file
diff --git a/drivers/mtd/nand/nand_omap_gpmc.c b/drivers/mtd/nand/nand_omap_gpmc.c
index d0b1699839..323a9c7532 100644
--- a/drivers/mtd/nand/nand_omap_gpmc.c
+++ b/drivers/mtd/nand/nand_omap_gpmc.c
@@ -71,6 +71,8 @@
#include <mach/gpmc.h>
#include <mach/gpmc_nand.h>
+#include "nand_omap_bch_decoder.h"
+
#define GPMC_ECC_CONFIG_ECCENABLE (1 << 0)
#define GPMC_ECC_CONFIG_ECCCS(x) (((x) & 0x7) << 1)
#define GPMC_ECC_CONFIG_ECCTOPSECTOR(x) (((x) & 0x7) << 4)
@@ -90,8 +92,6 @@
static const uint8_t bch8_vector[] = {0xf3, 0xdb, 0x14, 0x16, 0x8b, 0xd2,
0xbe, 0xcc, 0xac, 0x6b, 0xff, 0x99, 0x7b};
-int omap_gpmc_decode_bch(int select_4_8, unsigned char *ecc, unsigned int *err_loc);
-
static const char *ecc_mode_strings[] = {
"software",
"hamming_hw_romcode",
diff --git a/drivers/net/cpsw.c b/drivers/net/cpsw.c
index c6fc21dc54..6de9851fda 100644
--- a/drivers/net/cpsw.c
+++ b/drivers/net/cpsw.c
@@ -1093,8 +1093,8 @@ static int cpsw_probe_dt(struct cpsw_priv *priv)
if (!of_find_node_by_name(child, "fixed-link")) {
ret = of_property_read_u32_array(child, "phy_id", phy_id, 2);
- if (ret)
- return ret;
+ if (!ret)
+ dev_warn(dev, "phy_id is deprecated, use phy-handle\n");
}
slave->dev.device_node = child;
@@ -1115,7 +1115,7 @@ static int cpsw_probe_dt(struct cpsw_priv *priv)
return 0;
}
-int cpsw_probe(struct device_d *dev)
+static int cpsw_probe(struct device_d *dev)
{
struct resource *iores;
struct cpsw_platform_data *data = (struct cpsw_platform_data *)dev->platform_data;
diff --git a/drivers/net/e1000/eeprom.c b/drivers/net/e1000/eeprom.c
index 180b32ede8..c0f2db552a 100644
--- a/drivers/net/e1000/eeprom.c
+++ b/drivers/net/e1000/eeprom.c
@@ -407,7 +407,7 @@ static void e1000_eeprom_uses_microwire(struct e1000_eeprom_info *eeprom,
eeprom->read = e1000_read_eeprom_microwire;
}
-size_t e1000_igb_get_flash_size(struct e1000_hw *hw)
+static size_t e1000_igb_get_flash_size(struct e1000_hw *hw)
{
struct device_node *node =
hw->pdev->dev.device_node;
@@ -883,7 +883,7 @@ static int e1000_flash_mode_erase_chunk(struct e1000_hw *hw, loff_t offset,
ret = e1000_poll_reg(hw, E1000_FLSWCTL,
E1000_FLSWCTL_DONE | E1000_FLSWCTL_FLBUSY,
E1000_FLSWCTL_DONE,
- 10 * SECOND);
+ 40 * SECOND);
if (ret < 0) {
dev_err(hw->dev,
"Timeout waiting for FLSWCTL.DONE to be set (erase)\n");
@@ -1504,7 +1504,7 @@ static int e1000_mtd_unlock(struct mtd_info *mtd, loff_t ofs, size_t len)
return e1000_mtd_sr_rmw(mtd, SR_BPALL, 0x0);
}
-int e1000_register_invm(struct e1000_hw *hw)
+static int e1000_register_invm(struct e1000_hw *hw)
{
int ret;
u16 word;
diff --git a/drivers/net/e1000/main.c b/drivers/net/e1000/main.c
index bb6ab4eb03..caa7274a8d 100644
--- a/drivers/net/e1000/main.c
+++ b/drivers/net/e1000/main.c
@@ -1130,7 +1130,7 @@ static int32_t e1000_set_d3_lplu_state_off(struct e1000_hw *hw)
{
uint32_t phy_ctrl = 0;
int32_t ret_val;
- uint16_t phy_data;
+ uint16_t phy_data = 0;
DEBUGFUNC();
/* During driver activity LPLU should not be used or it will attain link
diff --git a/drivers/nvmem/ocotp.c b/drivers/nvmem/ocotp.c
index e689559ee3..e0cf35f0b7 100644
--- a/drivers/nvmem/ocotp.c
+++ b/drivers/nvmem/ocotp.c
@@ -70,6 +70,7 @@
#define IMX6_OTP_DATA_ERROR_VAL 0xBADABADA
#define DEF_RELAX 20
#define MAC_OFFSET_0 (0x22 * 4)
+#define IMX6UL_MAC_OFFSET_1 (0x23 * 4)
#define MAC_OFFSET_1 (0x24 * 4)
#define MAX_MAC_OFFSETS 2
#define MAC_BYTES 8
@@ -421,10 +422,14 @@ static int imx_ocotp_read_mac(const struct imx_ocotp_data *data,
int ret;
ret = regmap_bulk_read(map, offset, buf, MAC_BYTES);
+
if (ret < 0)
return ret;
- data->format_mac(mac, buf, OCOTP_HW_TO_MAC);
+ if (offset != IMX6UL_MAC_OFFSET_1)
+ data->format_mac(mac, buf, OCOTP_HW_TO_MAC);
+ else
+ data->format_mac(mac, buf + 2, OCOTP_HW_TO_MAC);
return 0;
}
@@ -639,6 +644,14 @@ static struct imx_ocotp_data imx6sl_ocotp_data = {
.format_mac = imx_ocotp_format_mac,
};
+static struct imx_ocotp_data imx6ul_ocotp_data = {
+ .num_regs = 512,
+ .addr_to_offset = imx6q_addr_to_offset,
+ .mac_offsets_num = 2,
+ .mac_offsets = { MAC_OFFSET_0, IMX6UL_MAC_OFFSET_1 },
+ .format_mac = imx_ocotp_format_mac,
+};
+
static struct imx_ocotp_data vf610_ocotp_data = {
.num_regs = 512,
.addr_to_offset = vf610_addr_to_offset,
@@ -667,7 +680,7 @@ static __maybe_unused struct of_device_id imx_ocotp_dt_ids[] = {
.data = &imx6sl_ocotp_data,
}, {
.compatible = "fsl,imx6ul-ocotp",
- .data = &imx6q_ocotp_data,
+ .data = &imx6ul_ocotp_data,
}, {
.compatible = "fsl,imx8mq-ocotp",
.data = &imx8mq_ocotp_data,
diff --git a/drivers/of/partition.c b/drivers/of/partition.c
index aa6e601b7f..2848b9636d 100644
--- a/drivers/of/partition.c
+++ b/drivers/of/partition.c
@@ -186,11 +186,11 @@ static int of_partition_fixup(struct device_node *root, void *ctx)
return ret;
}
- of_property_write_u32(partnode, "#size-cells", n_cells);
+ ret = of_property_write_u32(partnode, "#size-cells", n_cells);
if (ret)
return ret;
- of_property_write_u32(partnode, "#address-cells", n_cells);
+ ret = of_property_write_u32(partnode, "#address-cells", n_cells);
if (ret)
return ret;
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
index 3201eb9cb1..11e00833c5 100644
--- a/drivers/pinctrl/pinctrl-at91.c
+++ b/drivers/pinctrl/pinctrl-at91.c
@@ -32,6 +32,7 @@
#include <mach/at91_pio.h>
#include <mach/gpio.h>
+#include <mach/iomux.h>
#include <pinctrl.h>
@@ -46,14 +47,6 @@ struct at91_gpio_chip {
struct at91_pinctrl_mux_ops *ops; /* ops */
};
-enum at91_mux {
- AT91_MUX_GPIO = 0,
- AT91_MUX_PERIPH_A = 1,
- AT91_MUX_PERIPH_B = 2,
- AT91_MUX_PERIPH_C = 3,
- AT91_MUX_PERIPH_D = 4,
-};
-
#define MAX_GPIO_BANKS 5
#define to_at91_pinctrl(c) container_of(c, struct at91_pinctrl, pctl);
#define to_at91_gpio_chip(c) container_of(c, struct at91_gpio_chip, chip)
diff --git a/drivers/pinctrl/pinctrl-tegra30.c b/drivers/pinctrl/pinctrl-tegra30.c
index d9b49c57d9..ffb04eebbf 100644
--- a/drivers/pinctrl/pinctrl-tegra30.c
+++ b/drivers/pinctrl/pinctrl-tegra30.c
@@ -658,8 +658,8 @@ static int pinctrl_tegra30_set_drvstate(struct pinctrl_tegra30 *ctrl,
break;
}
}
- /* if no matching drivegroup is found */
- if (i == ctrl->drvdata->num_drvgrps)
+
+ if (!group)
return 0;
regaddr = ctrl->regs.ctrl + (group->reg >> 2);
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index bb597305e5..f1feee4689 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -348,10 +348,10 @@ static int ds1307_probe(struct device_d *dev)
ds1307->regs[1] &= ~DS1341_BIT_ECLK;
/*
- * Let's set additionale RTC bits to
+ * Let's set additional RTC bits to
* facilitate maximum power saving.
*/
- ds1307->regs[0] |= DS1341_BIT_DOSF;
+ ds1307->regs[1] |= DS1341_BIT_DOSF;
ds1307->regs[0] &= ~DS1341_BIT_EGFIL;
i2c_smbus_write_byte_data(client, DS1337_REG_CONTROL,
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index 8a56d39f7c..d462c11c16 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -3,6 +3,7 @@ menu "serial drivers"
config SERIAL_DEV_BUS
bool "Serial device bus"
+ select POLLER
depends on CONSOLE_FULL
help
Core support for devices connected via a serial port.
diff --git a/drivers/spi/omap3_spi.c b/drivers/spi/omap3_spi.c
index f63039718f..beea772aa9 100644
--- a/drivers/spi/omap3_spi.c
+++ b/drivers/spi/omap3_spi.c
@@ -67,7 +67,7 @@ static void spi_reset(struct spi_master *master)
writel(OMAP3_MCSPI_WAKEUPENABLE_WKEN, regs + OMAP3_MCSPI_WAKEUPENABLE);
}
-int spi_claim_bus(struct spi_device *spi)
+static int spi_claim_bus(struct spi_device *spi)
{
struct spi_master *master = spi->master;
struct omap3_spi_master *omap3_master = container_of(master, struct omap3_spi_master, master);
@@ -144,7 +144,7 @@ int spi_claim_bus(struct spi_device *spi)
return 0;
}
-int omap3_spi_write(struct spi_device *spi, unsigned int len, const u8 *txp,
+static int omap3_spi_write(struct spi_device *spi, unsigned int len, const u8 *txp,
unsigned long flags)
{
struct spi_master *master = spi->master;
@@ -198,7 +198,7 @@ int omap3_spi_write(struct spi_device *spi, unsigned int len, const u8 *txp,
return 0;
}
-int omap3_spi_read(struct spi_device *spi, unsigned int len, u8 *rxp,
+static int omap3_spi_read(struct spi_device *spi, unsigned int len, u8 *rxp,
unsigned long flags)
{
struct spi_master *master = spi->master;
@@ -245,7 +245,7 @@ int omap3_spi_read(struct spi_device *spi, unsigned int len, u8 *rxp,
return 0;
}
-int spi_xfer(struct spi_device *spi, struct spi_transfer *t, unsigned long flags)
+static int spi_xfer(struct spi_device *spi, struct spi_transfer *t, unsigned long flags)
{
struct spi_master *master = spi->master;
struct omap3_spi_master *omap3_master = container_of(master, struct omap3_spi_master, master);
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index 729f752128..243656d443 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -288,8 +288,7 @@ static int at91_ep_enable(struct usb_ep *_ep,
u16 maxpacket;
u32 tmp;
- if (!_ep || !ep
- || !desc || ep->desc
+ if (!desc || ep->desc
|| _ep->name == ep0name
|| desc->bDescriptorType != USB_DT_ENDPOINT
|| (maxpacket = le16_to_cpu(desc->wMaxPacketSize)) == 0
diff --git a/drivers/usb/musb/musb_gadget_ep0.c b/drivers/usb/musb/musb_gadget_ep0.c
index feaa856451..c8f55ac32c 100644
--- a/drivers/usb/musb/musb_gadget_ep0.c
+++ b/drivers/usb/musb/musb_gadget_ep0.c
@@ -110,6 +110,11 @@ static int service_tx_status_request(
break;
}
+ if (epnum >= MUSB_C_NUM_EPS) {
+ handled = -EINVAL;
+ break;
+ }
+
is_in = epnum & USB_DIR_IN;
if (is_in) {
epnum &= 0x0f;
@@ -119,7 +124,7 @@ static int service_tx_status_request(
}
regs = musb->endpoints[epnum].regs;
- if (epnum >= MUSB_C_NUM_EPS || !ep->desc) {
+ if (!ep->desc) {
handled = -EINVAL;
break;
}
diff --git a/drivers/usb/musb/phy-am335x-control.c b/drivers/usb/musb/phy-am335x-control.c
index 55a2ed27b7..c84525ec7e 100644
--- a/drivers/usb/musb/phy-am335x-control.c
+++ b/drivers/usb/musb/phy-am335x-control.c
@@ -4,10 +4,7 @@
#include <linux/err.h>
#include <linux/spinlock.h>
-struct phy_control {
- void (*phy_power)(struct phy_control *phy_ctrl, u32 id, bool on);
- void (*phy_wkup)(struct phy_control *phy_ctrl, u32 id, bool on);
-};
+#include "am35x-phy-control.h"
struct am335x_control_usb {
struct device_d *dev;
diff --git a/drivers/usb/musb/phy-am335x.c b/drivers/usb/musb/phy-am335x.c
index ec8c0f538b..df31255d89 100644
--- a/drivers/usb/musb/phy-am335x.c
+++ b/drivers/usb/musb/phy-am335x.c
@@ -5,6 +5,7 @@
#include <linux/err.h>
#include "am35x-phy-control.h"
#include "musb_core.h"
+#include "phy-am335x.h"
struct am335x_usbphy {
void __iomem *base;
diff --git a/drivers/video/imx-ipu-v3/imx-pd.c b/drivers/video/imx-ipu-v3/imx-pd.c
index 09d8a3ae2a..601be35880 100644
--- a/drivers/video/imx-ipu-v3/imx-pd.c
+++ b/drivers/video/imx-ipu-v3/imx-pd.c
@@ -45,7 +45,7 @@ static int imx_pd_ioctl(struct vpl *vpl, unsigned int port,
case IMX_IPU_VPL_DI_MODE:
mode = data;
- mode->di_clkflags = IPU_DI_CLKMODE_SYNC;
+ mode->di_clkflags = IPU_DI_CLKMODE_NON_FRACTIONAL;
mode->bus_format = imx_pd->bus_format;
return 0;
diff --git a/drivers/video/imx-ipu-v3/ipu-di.c b/drivers/video/imx-ipu-v3/ipu-di.c
index b6e64fe16a..b4302412e0 100644
--- a/drivers/video/imx-ipu-v3/ipu-di.c
+++ b/drivers/video/imx-ipu-v3/ipu-di.c
@@ -140,6 +140,7 @@ static int ipu_di_clk_calc_div(unsigned long inrate, unsigned long outrate)
int div;
tmp *= 16;
+ tmp += outrate / 2;
do_div(tmp, outrate);
diff --git a/drivers/video/ssd1307fb.c b/drivers/video/ssd1307fb.c
index d68f0c5056..70077e43a8 100644
--- a/drivers/video/ssd1307fb.c
+++ b/drivers/video/ssd1307fb.c
@@ -548,8 +548,10 @@ static int ssd1307fb_probe(struct device_d *dev)
/* clear display */
array = ssd1307fb_alloc_array(par->width * par->height / 8,
SSD1307FB_DATA);
- if (!array)
- return -ENOMEM;
+ if (!array) {
+ ret = -ENOMEM;
+ goto panel_init_error;
+ }
for (i = 0; i < (par->height / 8); i++) {
for (j = 0; j < par->width; j++) {
@@ -569,6 +571,7 @@ static int ssd1307fb_probe(struct device_d *dev)
panel_init_error:
reset_oled_error:
+ free(vmem);
fb_alloc_error:
regulator_disable(par->vbat);
free(info);
diff --git a/drivers/video/vpl.c b/drivers/video/vpl.c
index 99ad180eec..82ceeebada 100644
--- a/drivers/video/vpl.c
+++ b/drivers/video/vpl.c
@@ -36,7 +36,7 @@ int vpl_register(struct vpl *vpl)
return 0;
}
-struct vpl *of_find_vpl(struct device_node *node)
+static struct vpl *of_find_vpl(struct device_node *node)
{
struct vpl *vpl;
diff --git a/drivers/watchdog/imxwd.c b/drivers/watchdog/imxwd.c
index a66fae400c..8dba662392 100644
--- a/drivers/watchdog/imxwd.c
+++ b/drivers/watchdog/imxwd.c
@@ -162,19 +162,23 @@ static void __noreturn imxwd_force_soc_reset(struct restart_handler *rst)
static void imx_watchdog_detect_reset_source(struct imx_wd *priv)
{
u16 val = readw(priv->base + IMX21_WDOG_WSTR);
+ int priority = RESET_SOURCE_DEFAULT_PRIORITY;
+
+ if (reset_source_get() == RESET_WDG)
+ priority++;
if (val & WSTR_COLDSTART) {
- reset_source_set(RESET_POR);
+ reset_source_set_priority(RESET_POR, priority);
return;
}
if (val & (WSTR_HARDRESET | WSTR_WARMSTART)) {
- reset_source_set(RESET_RST);
+ reset_source_set_priority(RESET_RST, priority);
return;
}
if (val & WSTR_WDOG) {
- reset_source_set(RESET_WDG);
+ reset_source_set_priority(RESET_WDG, priority);
return;
}
diff --git a/dts/Bindings/arm/shmobile.txt b/dts/Bindings/arm/shmobile.txt
index f5e0f82fd5..58c4256d37 100644
--- a/dts/Bindings/arm/shmobile.txt
+++ b/dts/Bindings/arm/shmobile.txt
@@ -27,7 +27,7 @@ SoCs:
compatible = "renesas,r8a77470"
- RZ/G2M (R8A774A1)
compatible = "renesas,r8a774a1"
- - RZ/G2E (RA8774C0)
+ - RZ/G2E (R8A774C0)
compatible = "renesas,r8a774c0"
- R-Car M1A (R8A77781)
compatible = "renesas,r8a7778"
diff --git a/dts/Bindings/cpufreq/arm_big_little_dt.txt b/dts/Bindings/cpufreq/arm_big_little_dt.txt
deleted file mode 100644
index 2aa06ac0fa..0000000000
--- a/dts/Bindings/cpufreq/arm_big_little_dt.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-Generic ARM big LITTLE cpufreq driver's DT glue
------------------------------------------------
-
-This is DT specific glue layer for generic cpufreq driver for big LITTLE
-systems.
-
-Both required and optional properties listed below must be defined
-under node /cpus/cpu@x. Where x is the first cpu inside a cluster.
-
-FIXME: Cpus should boot in the order specified in DT and all cpus for a cluster
-must be present contiguously. Generic DT driver will check only node 'x' for
-cpu:x.
-
-Required properties:
-- operating-points: Refer to Documentation/devicetree/bindings/opp/opp.txt
- for details
-
-Optional properties:
-- clock-latency: Specify the possible maximum transition latency for clock,
- in unit of nanoseconds.
-
-Examples:
-
-cpus {
- #address-cells = <1>;
- #size-cells = <0>;
-
- cpu@0 {
- compatible = "arm,cortex-a15";
- reg = <0>;
- next-level-cache = <&L2>;
- operating-points = <
- /* kHz uV */
- 792000 1100000
- 396000 950000
- 198000 850000
- >;
- clock-latency = <61036>; /* two CLK32 periods */
- };
-
- cpu@1 {
- compatible = "arm,cortex-a15";
- reg = <1>;
- next-level-cache = <&L2>;
- };
-
- cpu@100 {
- compatible = "arm,cortex-a7";
- reg = <100>;
- next-level-cache = <&L2>;
- operating-points = <
- /* kHz uV */
- 792000 950000
- 396000 750000
- 198000 450000
- >;
- clock-latency = <61036>; /* two CLK32 periods */
- };
-
- cpu@101 {
- compatible = "arm,cortex-a7";
- reg = <101>;
- next-level-cache = <&L2>;
- };
-};
diff --git a/dts/Bindings/i2c/i2c-omap.txt b/dts/Bindings/i2c/i2c-omap.txt
index 7e49839d41..4b90ba9f31 100644
--- a/dts/Bindings/i2c/i2c-omap.txt
+++ b/dts/Bindings/i2c/i2c-omap.txt
@@ -1,8 +1,12 @@
I2C for OMAP platforms
Required properties :
-- compatible : Must be "ti,omap2420-i2c", "ti,omap2430-i2c", "ti,omap3-i2c"
- or "ti,omap4-i2c"
+- compatible : Must be
+ "ti,omap2420-i2c" for OMAP2420 SoCs
+ "ti,omap2430-i2c" for OMAP2430 SoCs
+ "ti,omap3-i2c" for OMAP3 SoCs
+ "ti,omap4-i2c" for OMAP4+ SoCs
+ "ti,am654-i2c", "ti,omap4-i2c" for AM654 SoCs
- ti,hwmods : Must be "i2c<n>", n being the instance number (1-based)
- #address-cells = <1>;
- #size-cells = <0>;
diff --git a/dts/Bindings/net/can/holt_hi311x.txt b/dts/Bindings/net/can/holt_hi311x.txt
index 903a78da65..3a9926f999 100644
--- a/dts/Bindings/net/can/holt_hi311x.txt
+++ b/dts/Bindings/net/can/holt_hi311x.txt
@@ -17,7 +17,7 @@ Example:
reg = <1>;
clocks = <&clk32m>;
interrupt-parent = <&gpio4>;
- interrupts = <13 IRQ_TYPE_EDGE_RISING>;
+ interrupts = <13 IRQ_TYPE_LEVEL_HIGH>;
vdd-supply = <&reg5v0>;
xceiver-supply = <&reg5v0>;
};
diff --git a/dts/Bindings/net/can/rcar_can.txt b/dts/Bindings/net/can/rcar_can.txt
index cc4372842b..9936b9ee67 100644
--- a/dts/Bindings/net/can/rcar_can.txt
+++ b/dts/Bindings/net/can/rcar_can.txt
@@ -5,6 +5,7 @@ Required properties:
- compatible: "renesas,can-r8a7743" if CAN controller is a part of R8A7743 SoC.
"renesas,can-r8a7744" if CAN controller is a part of R8A7744 SoC.
"renesas,can-r8a7745" if CAN controller is a part of R8A7745 SoC.
+ "renesas,can-r8a774a1" if CAN controller is a part of R8A774A1 SoC.
"renesas,can-r8a7778" if CAN controller is a part of R8A7778 SoC.
"renesas,can-r8a7779" if CAN controller is a part of R8A7779 SoC.
"renesas,can-r8a7790" if CAN controller is a part of R8A7790 SoC.
@@ -14,26 +15,32 @@ Required properties:
"renesas,can-r8a7794" if CAN controller is a part of R8A7794 SoC.
"renesas,can-r8a7795" if CAN controller is a part of R8A7795 SoC.
"renesas,can-r8a7796" if CAN controller is a part of R8A7796 SoC.
+ "renesas,can-r8a77965" if CAN controller is a part of R8A77965 SoC.
"renesas,rcar-gen1-can" for a generic R-Car Gen1 compatible device.
"renesas,rcar-gen2-can" for a generic R-Car Gen2 or RZ/G1
compatible device.
- "renesas,rcar-gen3-can" for a generic R-Car Gen3 compatible device.
+ "renesas,rcar-gen3-can" for a generic R-Car Gen3 or RZ/G2
+ compatible device.
When compatible with the generic version, nodes must list the
SoC-specific version corresponding to the platform first
followed by the generic version.
- reg: physical base address and size of the R-Car CAN register map.
- interrupts: interrupt specifier for the sole interrupt.
-- clocks: phandles and clock specifiers for 3 CAN clock inputs.
-- clock-names: 3 clock input name strings: "clkp1", "clkp2", "can_clk".
+- clocks: phandles and clock specifiers for 2 CAN clock inputs for RZ/G2
+ devices.
+ phandles and clock specifiers for 3 CAN clock inputs for every other
+ SoC.
+- clock-names: 2 clock input name strings for RZ/G2: "clkp1", "can_clk".
+ 3 clock input name strings for every other SoC: "clkp1", "clkp2",
+ "can_clk".
- pinctrl-0: pin control group to be used for this controller.
- pinctrl-names: must be "default".
-Required properties for "renesas,can-r8a7795" and "renesas,can-r8a7796"
-compatible:
-In R8A7795 and R8A7796 SoCs, "clkp2" can be CANFD clock. This is a div6 clock
-and can be used by both CAN and CAN FD controller at the same time. It needs to
-be scaled to maximum frequency if any of these controllers use it. This is done
+Required properties for R8A7795, R8A7796 and R8A77965:
+For the denoted SoCs, "clkp2" can be CANFD clock. This is a div6 clock and can
+be used by both CAN and CAN FD controller at the same time. It needs to be
+scaled to maximum frequency if any of these controllers use it. This is done
using the below properties:
- assigned-clocks: phandle of clkp2(CANFD) clock.
@@ -42,8 +49,9 @@ using the below properties:
Optional properties:
- renesas,can-clock-select: R-Car CAN Clock Source Select. Valid values are:
<0x0> (default) : Peripheral clock (clkp1)
- <0x1> : Peripheral clock (clkp2)
- <0x3> : Externally input clock
+ <0x1> : Peripheral clock (clkp2) (not supported by
+ RZ/G2 devices)
+ <0x3> : External input clock
Example
-------
diff --git a/dts/Bindings/net/dsa/dsa.txt b/dts/Bindings/net/dsa/dsa.txt
index 3ceeb8de11..35694c0c37 100644
--- a/dts/Bindings/net/dsa/dsa.txt
+++ b/dts/Bindings/net/dsa/dsa.txt
@@ -7,7 +7,7 @@ limitations.
Current Binding
---------------
-Switches are true Linux devices and can be probes by any means. Once
+Switches are true Linux devices and can be probed by any means. Once
probed, they register to the DSA framework, passing a node
pointer. This node is expected to fulfil the following binding, and
may contain additional properties as required by the device it is
diff --git a/dts/Bindings/phy/qcom-qmp-phy.txt b/dts/Bindings/phy/qcom-qmp-phy.txt
index adf20b2bdf..fbc198d5dd 100644
--- a/dts/Bindings/phy/qcom-qmp-phy.txt
+++ b/dts/Bindings/phy/qcom-qmp-phy.txt
@@ -40,24 +40,36 @@ Required properties:
"ref" for 19.2 MHz ref clk,
"com_aux" for phy common block aux clock,
"ref_aux" for phy reference aux clock,
+
+ For "qcom,ipq8074-qmp-pcie-phy": no clocks are listed.
For "qcom,msm8996-qmp-pcie-phy" must contain:
"aux", "cfg_ahb", "ref".
For "qcom,msm8996-qmp-usb3-phy" must contain:
"aux", "cfg_ahb", "ref".
- For "qcom,qmp-v3-usb3-phy" must contain:
+ For "qcom,sdm845-qmp-usb3-phy" must contain:
+ "aux", "cfg_ahb", "ref", "com_aux".
+ For "qcom,sdm845-qmp-usb3-uni-phy" must contain:
"aux", "cfg_ahb", "ref", "com_aux".
+ For "qcom,sdm845-qmp-ufs-phy" must contain:
+ "ref", "ref_aux".
- resets: a list of phandles and reset controller specifier pairs,
one for each entry in reset-names.
- reset-names: "phy" for reset of phy block,
"common" for phy common block reset,
- "cfg" for phy's ahb cfg block reset (Optional).
+ "cfg" for phy's ahb cfg block reset.
+
+ For "qcom,ipq8074-qmp-pcie-phy" must contain:
+ "phy", "common".
For "qcom,msm8996-qmp-pcie-phy" must contain:
- "phy", "common", "cfg".
+ "phy", "common", "cfg".
For "qcom,msm8996-qmp-usb3-phy" must contain
- "phy", "common".
- For "qcom,ipq8074-qmp-pcie-phy" must contain:
- "phy", "common".
+ "phy", "common".
+ For "qcom,sdm845-qmp-usb3-phy" must contain:
+ "phy", "common".
+ For "qcom,sdm845-qmp-usb3-uni-phy" must contain:
+ "phy", "common".
+ For "qcom,sdm845-qmp-ufs-phy": no resets are listed.
- vdda-phy-supply: Phandle to a regulator supply to PHY core block.
- vdda-pll-supply: Phandle to 1.8V regulator supply to PHY refclk pll block.
@@ -79,9 +91,10 @@ Required properties for child node:
- #phy-cells: must be 0
+Required properties child node of pcie and usb3 qmp phys:
- clocks: a list of phandles and clock-specifier pairs,
one for each entry in clock-names.
- - clock-names: Must contain following for pcie and usb qmp phys:
+ - clock-names: Must contain following:
"pipe<lane-number>" for pipe clock specific to each lane.
- clock-output-names: Name of the PHY clock that will be the parent for
the above pipe clock.
@@ -91,9 +104,11 @@ Required properties for child node:
(or)
"pcie20_phy1_pipe_clk"
+Required properties for child node of PHYs with lane reset, AKA:
+ "qcom,msm8996-qmp-pcie-phy"
- resets: a list of phandles and reset controller specifier pairs,
one for each entry in reset-names.
- - reset-names: Must contain following for pcie qmp phys:
+ - reset-names: Must contain following:
"lane<lane-number>" for reset specific to each lane.
Example:
diff --git a/dts/Bindings/spi/spi-uniphier.txt b/dts/Bindings/spi/spi-uniphier.txt
index 504a4ecfc7..b04e66a52d 100644
--- a/dts/Bindings/spi/spi-uniphier.txt
+++ b/dts/Bindings/spi/spi-uniphier.txt
@@ -5,18 +5,20 @@ UniPhier SoCs have SCSSI which supports SPI single channel.
Required properties:
- compatible: should be "socionext,uniphier-scssi"
- reg: address and length of the spi master registers
- - #address-cells: must be <1>, see spi-bus.txt
- - #size-cells: must be <0>, see spi-bus.txt
- - clocks: A phandle to the clock for the device.
- - resets: A phandle to the reset control for the device.
+ - interrupts: a single interrupt specifier
+ - pinctrl-names: should be "default"
+ - pinctrl-0: pin control state for the default mode
+ - clocks: a phandle to the clock for the device
+ - resets: a phandle to the reset control for the device
Example:
spi0: spi@54006000 {
compatible = "socionext,uniphier-scssi";
reg = <0x54006000 0x100>;
- #address-cells = <1>;
- #size-cells = <0>;
+ interrupts = <0 39 4>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_spi0>;
clocks = <&peri_clk 11>;
resets = <&peri_rst 11>;
};
diff --git a/dts/include/dt-bindings/input/linux-event-codes.h b/dts/include/dt-bindings/input/linux-event-codes.h
index 6d180cc60a..3eb5a4c3d6 100644
--- a/dts/include/dt-bindings/input/linux-event-codes.h
+++ b/dts/include/dt-bindings/input/linux-event-codes.h
@@ -716,7 +716,6 @@
* the situation described above.
*/
#define REL_RESERVED 0x0a
-#define REL_WHEEL_HI_RES 0x0b
#define REL_MAX 0x0f
#define REL_CNT (REL_MAX+1)
@@ -753,15 +752,6 @@
#define ABS_MISC 0x28
-/*
- * 0x2e is reserved and should not be used in input drivers.
- * It was used by HID as ABS_MISC+6 and userspace needs to detect if
- * the next ABS_* event is correct or is just ABS_MISC + n.
- * We define here ABS_RESERVED so userspace can rely on it and detect
- * the situation described above.
- */
-#define ABS_RESERVED 0x2e
-
#define ABS_MT_SLOT 0x2f /* MT slot being modified */
#define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */
#define ABS_MT_TOUCH_MINOR 0x31 /* Minor axis (omit if circular) */
diff --git a/dts/src/arm/am3517-evm.dts b/dts/src/arm/am3517-evm.dts
index d4d33cd7ad..1e2bb68231 100644
--- a/dts/src/arm/am3517-evm.dts
+++ b/dts/src/arm/am3517-evm.dts
@@ -228,7 +228,7 @@
vmmc-supply = <&vmmc_fixed>;
bus-width = <4>;
wp-gpios = <&gpio4 30 GPIO_ACTIVE_HIGH>; /* gpio_126 */
- cd-gpios = <&gpio4 31 GPIO_ACTIVE_HIGH>; /* gpio_127 */
+ cd-gpios = <&gpio4 31 GPIO_ACTIVE_LOW>; /* gpio_127 */
};
&mmc3 {
diff --git a/dts/src/arm/am3517-som.dtsi b/dts/src/arm/am3517-som.dtsi
index dae6e458e5..b1c988eed8 100644
--- a/dts/src/arm/am3517-som.dtsi
+++ b/dts/src/arm/am3517-som.dtsi
@@ -163,7 +163,7 @@
compatible = "ti,wl1271";
reg = <2>;
interrupt-parent = <&gpio6>;
- interrupts = <10 IRQ_TYPE_LEVEL_HIGH>; /* gpio_170 */
+ interrupts = <10 IRQ_TYPE_EDGE_RISING>; /* gpio_170 */
ref-clock-frequency = <26000000>;
tcxo-clock-frequency = <26000000>;
};
diff --git a/dts/src/arm/imx51-zii-rdu1.dts b/dts/src/arm/imx51-zii-rdu1.dts
index e45a15ceb9..69d753cac8 100644
--- a/dts/src/arm/imx51-zii-rdu1.dts
+++ b/dts/src/arm/imx51-zii-rdu1.dts
@@ -492,12 +492,6 @@
pinctrl-0 = <&pinctrl_i2c2>;
status = "okay";
- eeprom@50 {
- compatible = "atmel,24c04";
- pagesize = <16>;
- reg = <0x50>;
- };
-
hpa1: amp@60 {
compatible = "ti,tpa6130a2";
reg = <0x60>;
diff --git a/dts/src/arm/imx53-ppd.dts b/dts/src/arm/imx53-ppd.dts
index b560ff8845..5ff9a179c8 100644
--- a/dts/src/arm/imx53-ppd.dts
+++ b/dts/src/arm/imx53-ppd.dts
@@ -55,7 +55,7 @@
};
chosen {
- stdout-path = "&uart1:115200n8";
+ stdout-path = "serial0:115200n8";
};
memory@70000000 {
diff --git a/dts/src/arm/imx6sll.dtsi b/dts/src/arm/imx6sll.dtsi
index ed9a980bce..beefa1b204 100644
--- a/dts/src/arm/imx6sll.dtsi
+++ b/dts/src/arm/imx6sll.dtsi
@@ -740,7 +740,7 @@
i2c1: i2c@21a0000 {
#address-cells = <1>;
#size-cells = <0>;
- compatible = "fs,imx6sll-i2c", "fsl,imx21-i2c";
+ compatible = "fsl,imx6sll-i2c", "fsl,imx21-i2c";
reg = <0x021a0000 0x4000>;
interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX6SLL_CLK_I2C1>;
diff --git a/dts/src/arm/imx6sx-sdb.dtsi b/dts/src/arm/imx6sx-sdb.dtsi
index 53b3408b5f..7d7d679945 100644
--- a/dts/src/arm/imx6sx-sdb.dtsi
+++ b/dts/src/arm/imx6sx-sdb.dtsi
@@ -117,7 +117,9 @@
regulator-name = "enet_3v3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
- gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
+ gpio = <&gpio2 6 GPIO_ACTIVE_LOW>;
+ regulator-boot-on;
+ regulator-always-on;
};
reg_pcie_gpio: regulator-pcie-gpio {
@@ -180,6 +182,7 @@
phy-supply = <&reg_enet_3v3>;
phy-mode = "rgmii";
phy-handle = <&ethphy1>;
+ phy-reset-gpios = <&gpio2 7 GPIO_ACTIVE_LOW>;
status = "okay";
mdio {
@@ -373,6 +376,8 @@
MX6SX_PAD_RGMII1_RD3__ENET1_RX_DATA_3 0x3081
MX6SX_PAD_RGMII1_RX_CTL__ENET1_RX_EN 0x3081
MX6SX_PAD_ENET2_RX_CLK__ENET2_REF_CLK_25M 0x91
+ /* phy reset */
+ MX6SX_PAD_ENET2_CRS__GPIO2_IO_7 0x10b0
>;
};
diff --git a/dts/src/arm/logicpd-som-lv.dtsi b/dts/src/arm/logicpd-som-lv.dtsi
index ac343330d0..98b682a808 100644
--- a/dts/src/arm/logicpd-som-lv.dtsi
+++ b/dts/src/arm/logicpd-som-lv.dtsi
@@ -129,7 +129,7 @@
};
&mmc3 {
- interrupts-extended = <&intc 94 &omap3_pmx_core2 0x46>;
+ interrupts-extended = <&intc 94 &omap3_pmx_core 0x136>;
pinctrl-0 = <&mmc3_pins &wl127x_gpio>;
pinctrl-names = "default";
vmmc-supply = <&wl12xx_vmmc>;
diff --git a/dts/src/arm/logicpd-torpedo-37xx-devkit.dts b/dts/src/arm/logicpd-torpedo-37xx-devkit.dts
index 9d5d53fbe9..c39cf2ca54 100644
--- a/dts/src/arm/logicpd-torpedo-37xx-devkit.dts
+++ b/dts/src/arm/logicpd-torpedo-37xx-devkit.dts
@@ -35,7 +35,7 @@
* jumpering combinations for the long run.
*/
&mmc3 {
- interrupts-extended = <&intc 94 &omap3_pmx_core2 0x46>;
+ interrupts-extended = <&intc 94 &omap3_pmx_core 0x136>;
pinctrl-0 = <&mmc3_pins &mmc3_core2_pins>;
pinctrl-names = "default";
vmmc-supply = <&wl12xx_vmmc>;
diff --git a/dts/src/arm/rk3288-veyron.dtsi b/dts/src/arm/rk3288-veyron.dtsi
index 2075120cfc..d8bf939a3a 100644
--- a/dts/src/arm/rk3288-veyron.dtsi
+++ b/dts/src/arm/rk3288-veyron.dtsi
@@ -10,7 +10,11 @@
#include "rk3288.dtsi"
/ {
- memory@0 {
+ /*
+ * The default coreboot on veyron devices ignores memory@0 nodes
+ * and would instead create another memory node.
+ */
+ memory {
device_type = "memory";
reg = <0x0 0x0 0x0 0x80000000>;
};
diff --git a/dts/src/arm/sama5d2.dtsi b/dts/src/arm/sama5d2.dtsi
index 843052f14f..dd0dda6ed4 100644
--- a/dts/src/arm/sama5d2.dtsi
+++ b/dts/src/arm/sama5d2.dtsi
@@ -314,7 +314,7 @@
0x1 0x0 0x60000000 0x10000000
0x2 0x0 0x70000000 0x10000000
0x3 0x0 0x80000000 0x10000000>;
- clocks = <&mck>;
+ clocks = <&h32ck>;
status = "disabled";
nand_controller: nand-controller {
diff --git a/dts/src/arm/vf610m4-colibri.dts b/dts/src/arm/vf610m4-colibri.dts
index 41ec66a969..ca62495587 100644
--- a/dts/src/arm/vf610m4-colibri.dts
+++ b/dts/src/arm/vf610m4-colibri.dts
@@ -50,8 +50,8 @@
compatible = "fsl,vf610m4";
chosen {
- bootargs = "console=ttyLP2,115200 clk_ignore_unused init=/linuxrc rw";
- stdout-path = "&uart2";
+ bootargs = "clk_ignore_unused init=/linuxrc rw";
+ stdout-path = "serial2:115200";
};
memory@8c000000 {
diff --git a/dts/src/arm64/altera/socfpga_stratix10.dtsi b/dts/src/arm64/altera/socfpga_stratix10.dtsi
index 8253a1a9e9..fef7351e9f 100644
--- a/dts/src/arm64/altera/socfpga_stratix10.dtsi
+++ b/dts/src/arm64/altera/socfpga_stratix10.dtsi
@@ -139,6 +139,7 @@
clock-names = "stmmaceth";
tx-fifo-depth = <16384>;
rx-fifo-depth = <16384>;
+ snps,multicast-filter-bins = <256>;
status = "disabled";
};
@@ -154,6 +155,7 @@
clock-names = "stmmaceth";
tx-fifo-depth = <16384>;
rx-fifo-depth = <16384>;
+ snps,multicast-filter-bins = <256>;
status = "disabled";
};
@@ -169,6 +171,7 @@
clock-names = "stmmaceth";
tx-fifo-depth = <16384>;
rx-fifo-depth = <16384>;
+ snps,multicast-filter-bins = <256>;
status = "disabled";
};
diff --git a/dts/src/arm64/qcom/msm8998-mtp.dtsi b/dts/src/arm64/qcom/msm8998-mtp.dtsi
index b4276da1fb..11fd1fe8bd 100644
--- a/dts/src/arm64/qcom/msm8998-mtp.dtsi
+++ b/dts/src/arm64/qcom/msm8998-mtp.dtsi
@@ -241,3 +241,7 @@
};
};
};
+
+&tlmm {
+ gpio-reserved-ranges = <0 4>, <81 4>;
+};
diff --git a/dts/src/arm64/qcom/sdm845-mtp.dts b/dts/src/arm64/qcom/sdm845-mtp.dts
index eedfaf8922..d667eee4e6 100644
--- a/dts/src/arm64/qcom/sdm845-mtp.dts
+++ b/dts/src/arm64/qcom/sdm845-mtp.dts
@@ -352,6 +352,10 @@
status = "okay";
};
+&tlmm {
+ gpio-reserved-ranges = <0 4>, <81 4>;
+};
+
&uart9 {
status = "okay";
};
diff --git a/dts/src/arm64/renesas/r8a7795.dtsi b/dts/src/arm64/renesas/r8a7795.dtsi
index b5f2273cac..a79c8d369e 100644
--- a/dts/src/arm64/renesas/r8a7795.dtsi
+++ b/dts/src/arm64/renesas/r8a7795.dtsi
@@ -652,7 +652,7 @@
clock-names = "fck", "brg_int", "scif_clk";
dmas = <&dmac1 0x35>, <&dmac1 0x34>,
<&dmac2 0x35>, <&dmac2 0x34>;
- dma-names = "tx", "rx";
+ dma-names = "tx", "rx", "tx", "rx";
power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
resets = <&cpg 518>;
status = "disabled";
diff --git a/dts/src/arm64/renesas/r8a77980-condor.dts b/dts/src/arm64/renesas/r8a77980-condor.dts
index fe2e2c051c..5a7012be0d 100644
--- a/dts/src/arm64/renesas/r8a77980-condor.dts
+++ b/dts/src/arm64/renesas/r8a77980-condor.dts
@@ -15,7 +15,7 @@
aliases {
serial0 = &scif0;
- ethernet0 = &avb;
+ ethernet0 = &gether;
};
chosen {
@@ -97,23 +97,6 @@
};
};
-&avb {
- pinctrl-0 = <&avb_pins>;
- pinctrl-names = "default";
-
- phy-mode = "rgmii-id";
- phy-handle = <&phy0>;
- renesas,no-ether-link;
- status = "okay";
-
- phy0: ethernet-phy@0 {
- rxc-skew-ps = <1500>;
- reg = <0>;
- interrupt-parent = <&gpio1>;
- interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
- };
-};
-
&canfd {
pinctrl-0 = <&canfd0_pins>;
pinctrl-names = "default";
@@ -139,6 +122,23 @@
clock-frequency = <32768>;
};
+&gether {
+ pinctrl-0 = <&gether_pins>;
+ pinctrl-names = "default";
+
+ phy-mode = "rgmii-id";
+ phy-handle = <&phy0>;
+ renesas,no-ether-link;
+ status = "okay";
+
+ phy0: ethernet-phy@0 {
+ rxc-skew-ps = <1500>;
+ reg = <0>;
+ interrupt-parent = <&gpio4>;
+ interrupts = <23 IRQ_TYPE_LEVEL_LOW>;
+ };
+};
+
&i2c0 {
pinctrl-0 = <&i2c0_pins>;
pinctrl-names = "default";
@@ -236,16 +236,17 @@
};
&pfc {
- avb_pins: avb {
- groups = "avb_mdio", "avb_rgmii";
- function = "avb";
- };
-
canfd0_pins: canfd0 {
groups = "canfd0_data_a";
function = "canfd0";
};
+ gether_pins: gether {
+ groups = "gether_mdio_a", "gether_rgmii",
+ "gether_txcrefclk", "gether_txcrefclk_mega";
+ function = "gether";
+ };
+
i2c0_pins: i2c0 {
groups = "i2c0";
function = "i2c0";
diff --git a/dts/src/arm64/rockchip/rk3399-puma-haikou.dts b/dts/src/arm64/rockchip/rk3399-puma-haikou.dts
index 2dceeea29b..1e6a71066c 100644
--- a/dts/src/arm64/rockchip/rk3399-puma-haikou.dts
+++ b/dts/src/arm64/rockchip/rk3399-puma-haikou.dts
@@ -153,7 +153,7 @@
};
&pcie0 {
- ep-gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_LOW>;
+ ep-gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>;
num-lanes = <4>;
pinctrl-names = "default";
pinctrl-0 = <&pcie_clkreqn_cpm>;
diff --git a/dts/src/arm64/rockchip/rk3399-rock960.dtsi b/dts/src/arm64/rockchip/rk3399-rock960.dtsi
index 6c8c4ab044..56abbb08c1 100644
--- a/dts/src/arm64/rockchip/rk3399-rock960.dtsi
+++ b/dts/src/arm64/rockchip/rk3399-rock960.dtsi
@@ -57,18 +57,6 @@
regulator-always-on;
vin-supply = <&vcc_sys>;
};
-
- vdd_log: vdd-log {
- compatible = "pwm-regulator";
- pwms = <&pwm2 0 25000 0>;
- regulator-name = "vdd_log";
- regulator-min-microvolt = <800000>;
- regulator-max-microvolt = <1400000>;
- regulator-always-on;
- regulator-boot-on;
- vin-supply = <&vcc_sys>;
- };
-
};
&cpu_l0 {
diff --git a/dts/src/arm64/ti/k3-am65-wakeup.dtsi b/dts/src/arm64/ti/k3-am65-wakeup.dtsi
index affc3c3093..8d7b47f9df 100644
--- a/dts/src/arm64/ti/k3-am65-wakeup.dtsi
+++ b/dts/src/arm64/ti/k3-am65-wakeup.dtsi
@@ -36,7 +36,7 @@
wkup_uart0: serial@42300000 {
compatible = "ti,am654-uart";
- reg = <0x00 0x42300000 0x00 0x100>;
+ reg = <0x42300000 0x100>;
reg-shift = <2>;
reg-io-width = <4>;
interrupts = <GIC_SPI 697 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/fs/devfs.c b/fs/devfs.c
index 717e66c5dc..81ae2c25a5 100644
--- a/fs/devfs.c
+++ b/fs/devfs.c
@@ -193,7 +193,7 @@ static struct inode *devfs_alloc_inode(struct super_block *sb)
return &node->inode;
}
-int devfs_iterate(struct file *file, struct dir_context *ctx)
+static int devfs_iterate(struct file *file, struct dir_context *ctx)
{
struct cdev *cdev;
diff --git a/fs/fs.c b/fs/fs.c
index a30afa35f5..625ed10b70 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -1526,7 +1526,7 @@ static struct dentry *__lookup_hash(const struct qstr *name,
{
struct dentry *dentry;
struct dentry *old;
- struct inode *dir = base->d_inode;
+ struct inode *dir;
if (!base)
return ERR_PTR(-ENOENT);
@@ -1539,6 +1539,7 @@ static struct dentry *__lookup_hash(const struct qstr *name,
if (unlikely(!dentry))
return ERR_PTR(-ENOMEM);
+ dir = base->d_inode;
old = dir->i_op->lookup(dir, dentry, flags);
if (IS_ERR(old)) {
dput(dentry);
@@ -2527,8 +2528,6 @@ EXPORT_SYMBOL(opendir);
int closedir(DIR *dir)
{
- int ret;
-
if (!dir) {
errno = EBADF;
return -EBADF;
@@ -2536,7 +2535,7 @@ int closedir(DIR *dir)
release_dir(dir);
- return ret;
+ return 0;
}
EXPORT_SYMBOL(closedir);
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 2fe2f3f640..fd1b645f9f 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -37,14 +37,6 @@
#include "ubifs.h"
#include <mtd/ubi-user.h>
-int ubifs_iput(struct inode *inode)
-{
- list_del_init(&inode->i_sb_list);
-
- free(inode);
- return 0;
-}
-
/* from include/linux/fs.h */
static inline void i_uid_write(struct inode *inode, uid_t uid)
{
@@ -56,7 +48,7 @@ static inline void i_gid_write(struct inode *inode, gid_t gid)
inode->i_gid = gid;
}
-void unlock_new_inode(struct inode *inode)
+static void unlock_new_inode(struct inode *inode)
{
return;
}
diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
index bbe382dab0..7545dd4c9b 100644
--- a/fs/ubifs/ubifs.c
+++ b/fs/ubifs/ubifs.c
@@ -401,7 +401,7 @@ static loff_t ubifs_lseek(struct device_d *dev, FILE *f, loff_t pos)
return pos;
}
-void ubifs_set_rootarg(struct ubifs_priv *priv, struct fs_device_d *fsdev)
+static void ubifs_set_rootarg(struct ubifs_priv *priv, struct fs_device_d *fsdev)
{
struct ubi_volume_info vi = {};
struct ubi_device_info di = {};
diff --git a/images/.gitignore b/images/.gitignore
index d6e85fa853..7a74937814 100644
--- a/images/.gitignore
+++ b/images/.gitignore
@@ -1,6 +1,4 @@
*.pbl
-*.pblx.*
-*.pblx
*.pblb
*.img
*.imximg
diff --git a/images/Makefile b/images/Makefile
index 5c4d99ac5a..4c6d486f08 100644
--- a/images/Makefile
+++ b/images/Makefile
@@ -6,14 +6,12 @@
# encapsulated in SoC (or SoC boot type) specific image formats.
#
# The basic idea here is that we generate a single barebox main binary. This
-# is compressed and prepended with a self extractor, generated as barebox.x.
-# barebox.x is then prepended with different board specific pbls. The pbls
+# is compressed and included into a board specific PBL image. The PBL images
# are generally named after their entrypoints. So a pcm038 specific pbl will
# generate the following files:
#
# start_imx27_pcm038.pbl - The ELF file, linked with the entrypoint start_imx27_pcm038
# start_imx27_pcm038.pblb - The raw binary of the above.
-# start_imx27_pcm038.pblx - The pblb appended with barebox.x
# start_imx27_pcm038.pbl.map - The linker map file
# start_imx27_pcm038.pbl.s - the disassembled ELF, generated with:
# make images/start_imx27_pcm038.pbl.s
@@ -25,21 +23,21 @@
#
# For CONFIG_MACH_FREESCALE_MX51_PDK build barebox-imx51-babbage.img
#
-## FILE_barebox-imx51-babbage.img = start_imx51_babbage.pblx.imximg
+## FILE_barebox-imx51-babbage.img = start_imx51_babbage.pblb.imximg
#
# barebox-imx51-babbage.img should be generated (copied) from
-# start_imx51_babbage.pblx.imximg. This copy process is only done so that we
+# start_imx51_babbage.pblb.imximg. This copy process is only done so that we
# can generate images with a sane name. So what we really need for this
# board is a i.MX specific image, a .imximg
#
-## CFG_start_imx51_babbage.pblx.imximg = $(board)/freescale-mx51-pdk/flash-header.imxcfg
+## CFG_start_imx51_babbage.pblb.imximg = $(board)/freescale-mx51-pdk/flash-header.imxcfg
#
-# The .imximg can be generated from a .pblx using a rule specified in Makefile.imx.
+# The .imximg can be generated from a .pblb using a rule specified in Makefile.imx.
# The configfile needed for this image is specified with CFG_<filename> = <configfile>
#
-## pblx-$(CONFIG_MACH_FREESCALE_MX51_PDK) += start_imx51_babbage
+## pblb-$(CONFIG_MACH_FREESCALE_MX51_PDK) += start_imx51_babbage
#
-# For this image we need a pblx (self extracting barebox binary) with
+# For this image we need a pblb (self extracting barebox binary) with
# start_imx51_babbage as entrypoint. start_imx51_babbage will be used
# both as entrypoint and as filename
#
@@ -57,27 +55,18 @@ quiet_cmd_elf__ ?= LD $@
cmd_elf__ ?= $(LD) $(LDFLAGS_barebox) --gc-sections -pie \
-e $(2) -Map $@.map $(LDFLAGS_$(@F)) -o $@ \
-T $(pbl-lds) \
- --start-group $(barebox-pbl-common) --end-group
+ --start-group $(barebox-pbl-common) $(obj)/piggy.o --end-group
PBL_CPPFLAGS += -fdata-sections -ffunction-sections
-$(obj)/%.pbl: $(pbl-lds) $(barebox-pbl-common) FORCE
+piggy_o := piggy.$(suffix_y).o
+
+$(obj)/%.pbl: $(pbl-lds) $(barebox-pbl-common) $(obj)/piggy.o FORCE
$(call if_changed,elf__,$(*F))
$(obj)/%.pblb: $(obj)/%.pbl FORCE
$(call if_changed,objcopy_bin,$(*F))
-quiet_cmd_pblx ?= PBLX $@
- cmd_pblx ?= cat $(obj)/$(patsubst %.pblx,%.pblb,$(2)) > $@; \
- $(call size_append, $(obj)/barebox.z) >> $@; \
- cat $(obj)/barebox.z >> $@; \
- $(objtree)/scripts/fix_size -f $@
-
-$(obj)/%.pblx: $(obj)/%.pblb $(obj)/barebox.z FORCE
- $(call if_changed,pblx,$(@F))
- $(call cmd,check_file_size,$@,$(CONFIG_BAREBOX_MAX_PBLX_SIZE))
-
-
$(obj)/%.s: $(obj)/% FORCE
$(call if_changed,disasm)
@@ -87,6 +76,8 @@ suffix_$(CONFIG_IMAGE_COMPRESSION_LZ4) = lz4
suffix_$(CONFIG_IMAGE_COMPRESSION_XZKERN) = xzkern
suffix_$(CONFIG_IMAGE_COMPRESSION_NONE) = comp_copy
+$(obj)/piggy.o: $(obj)/barebox.z FORCE
+
# barebox.z - compressed barebox binary
# ----------------------------------------------------------------
$(obj)/barebox.z: $(obj)/../barebox.bin FORCE
@@ -115,10 +106,9 @@ include $(srctree)/images/Makefile.vexpress
include $(srctree)/images/Makefile.at91
targets += $(image-y) pbl.lds barebox.x barebox.z
-targets += $(patsubst %,%.pblx,$(pblx-y))
-targets += $(patsubst %,%.pblb,$(pblx-y))
-targets += $(patsubst %,%.pbl,$(pblx-y))
-targets += $(patsubst %,%.s,$(pblx-y))
+targets += $(patsubst %,%.pblb,$(pblb-y))
+targets += $(patsubst %,%.pbl,$(pblb-y))
+targets += $(patsubst %,%.s,$(pblb-y))
targets += $(foreach m, $(image-y), $(FILE_$(m)))
SECONDARY: $(addprefix $(obj)/,$(targets))
@@ -143,7 +133,7 @@ $(flash-link): $(link-dest) FORCE
$(flash-list): $(image-y-path)
@for i in $^; do echo $$i; done > $@
-clean-files := *.pbl *.pblb *.pblx *.map start_*.imximg *.img barebox.z start_*.kwbimg \
+clean-files := *.pbl *.pblb *.map start_*.imximg *.img barebox.z start_*.kwbimg \
start_*.kwbuartimg *.socfpgaimg *.mlo *.t20img *.t20img.cfg *.t30img \
*.t30img.cfg *.t124img *.t124img.cfg *.mlospi *.mlo *.mxsbs *.mxssd \
start_*.simximg start_*.usimximg *.imx-sram-img
diff --git a/images/Makefile.am33xx b/images/Makefile.am33xx
index 50fa0196cc..1de2474df5 100644
--- a/images/Makefile.am33xx
+++ b/images/Makefile.am33xx
@@ -15,124 +15,124 @@ quiet_cmd_mlo_spi_image = SPI-IMG $@
$(obj)/%.mlospi: $(obj)/% $(obj)/%.mlo FORCE
$(call if_changed,mlo_spi_image)
-pblx-$(CONFIG_MACH_AFI_GF) += start_am33xx_afi_gf_sdram
-FILE_barebox-am33xx-afi-gf.img = start_am33xx_afi_gf_sdram.pblx
+pblb-$(CONFIG_MACH_AFI_GF) += start_am33xx_afi_gf_sdram
+FILE_barebox-am33xx-afi-gf.img = start_am33xx_afi_gf_sdram.pblb
am33xx-barebox-$(CONFIG_MACH_AFI_GF) += barebox-am33xx-afi-gf.img
-pblx-$(CONFIG_MACH_AFI_GF) += start_am33xx_afi_gf_sram
-FILE_barebox-am33xx-afi-gf-mlo.img = start_am33xx_afi_gf_sram.pblx.mlo
-FILE_barebox-am33xx-afi-gf-mlo.spi.img = start_am33xx_afi_gf_sram.pblx.mlospi
+pblb-$(CONFIG_MACH_AFI_GF) += start_am33xx_afi_gf_sram
+FILE_barebox-am33xx-afi-gf-mlo.img = start_am33xx_afi_gf_sram.pblb.mlo
+FILE_barebox-am33xx-afi-gf-mlo.spi.img = start_am33xx_afi_gf_sram.pblb.mlospi
am33xx-mlo-$(CONFIG_MACH_AFI_GF) += barebox-am33xx-afi-gf-mlo.img
am33xx-mlospi-$(CONFIG_MACH_AFI_GF) += barebox-am33xx-afi-gf-mlo.spi.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phycore_nand_sdram
-FILE_barebox-am33xx-phytec-phycore.img = start_am33xx_phytec_phycore_nand_sdram.pblx
+pblb-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phycore_nand_sdram
+FILE_barebox-am33xx-phytec-phycore.img = start_am33xx_phytec_phycore_nand_sdram.pblb
am33xx-barebox-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phycore.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phycore_emmc_sdram
-FILE_barebox-am33xx-phytec-phycore-emmc.img = start_am33xx_phytec_phycore_emmc_sdram.pblx
+pblb-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phycore_emmc_sdram
+FILE_barebox-am33xx-phytec-phycore-emmc.img = start_am33xx_phytec_phycore_emmc_sdram.pblb
am33xx-barebox-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phycore-emmc.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phycore_nand_no_spi_sdram
-FILE_barebox-am33xx-phytec-phycore-no-spi.img = start_am33xx_phytec_phycore_nand_no_spi_sdram.pblx
+pblb-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phycore_nand_no_spi_sdram
+FILE_barebox-am33xx-phytec-phycore-no-spi.img = start_am33xx_phytec_phycore_nand_no_spi_sdram.pblb
am33xx-barebox-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phycore-no-spi.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phycore_nand_no_eeprom_sdram
-FILE_barebox-am33xx-phytec-phycore-no-eeprom.img = start_am33xx_phytec_phycore_nand_no_eeprom_sdram.pblx
+pblb-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phycore_nand_no_eeprom_sdram
+FILE_barebox-am33xx-phytec-phycore-no-eeprom.img = start_am33xx_phytec_phycore_nand_no_eeprom_sdram.pblb
am33xx-barebox-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phycore-no-eeprom.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phycore_nand_no_spi_no_eeprom_sdram
-FILE_barebox-am33xx-phytec-phycore-no-spi-no-eeprom.img = start_am33xx_phytec_phycore_nand_no_spi_no_eeprom_sdram.pblx
+pblb-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phycore_nand_no_spi_no_eeprom_sdram
+FILE_barebox-am33xx-phytec-phycore-no-spi-no-eeprom.img = start_am33xx_phytec_phycore_nand_no_spi_no_eeprom_sdram.pblb
am33xx-barebox-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phycore-no-spi-no-eeprom.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phycore_r2_sram
-FILE_barebox-am33xx-phytec-phycore-r2-mlo.img = start_am33xx_phytec_phycore_r2_sram.pblx.mlo
-FILE_barebox-am33xx-phytec-phycore-r2-mlo.spi.img = start_am33xx_phytec_phycore_r2_sram.pblx.mlospi
+pblb-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phycore_r2_sram
+FILE_barebox-am33xx-phytec-phycore-r2-mlo.img = start_am33xx_phytec_phycore_r2_sram.pblb.mlo
+FILE_barebox-am33xx-phytec-phycore-r2-mlo.spi.img = start_am33xx_phytec_phycore_r2_sram.pblb.mlospi
am33xx-mlo-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phycore-r2-mlo.img
am33xx-mlospi-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phycore-r2-mlo.spi.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phycore_r2_sram_1024mb
-FILE_barebox-am33xx-phytec-phycore-r2-mlo-1024mb.img = start_am33xx_phytec_phycore_r2_sram_1024mb.pblx.mlo
-FILE_barebox-am33xx-phytec-phycore-r2-mlo-1024mb.spi.img = start_am33xx_phytec_phycore_r2_sram_1024mb.pblx.mlospi
+pblb-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phycore_r2_sram_1024mb
+FILE_barebox-am33xx-phytec-phycore-r2-mlo-1024mb.img = start_am33xx_phytec_phycore_r2_sram_1024mb.pblb.mlo
+FILE_barebox-am33xx-phytec-phycore-r2-mlo-1024mb.spi.img = start_am33xx_phytec_phycore_r2_sram_1024mb.pblb.mlospi
am33xx-mlo-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phycore-r2-mlo-1024mb.img
am33xx-mlospi-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phycore-r2-mlo-1024mb.spi.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phycore_sram_256mb
-FILE_barebox-am33xx-phytec-phycore-mlo-256mb.img = start_am33xx_phytec_phycore_sram_256mb.pblx.mlo
-FILE_barebox-am33xx-phytec-phycore-mlo-256mb.spi.img = start_am33xx_phytec_phycore_sram_256mb.pblx.mlospi
+pblb-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phycore_sram_256mb
+FILE_barebox-am33xx-phytec-phycore-mlo-256mb.img = start_am33xx_phytec_phycore_sram_256mb.pblb.mlo
+FILE_barebox-am33xx-phytec-phycore-mlo-256mb.spi.img = start_am33xx_phytec_phycore_sram_256mb.pblb.mlospi
am33xx-mlo-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phycore-mlo-256mb.img
am33xx-mlospi-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phycore-mlo-256mb.spi.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phycore_sram_128mb
-FILE_barebox-am33xx-phytec-phycore-mlo-128mb.img = start_am33xx_phytec_phycore_sram_128mb.pblx.mlo
-FILE_barebox-am33xx-phytec-phycore-mlo-128mb.spi.img = start_am33xx_phytec_phycore_sram_128mb.pblx.mlospi
+pblb-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phycore_sram_128mb
+FILE_barebox-am33xx-phytec-phycore-mlo-128mb.img = start_am33xx_phytec_phycore_sram_128mb.pblb.mlo
+FILE_barebox-am33xx-phytec-phycore-mlo-128mb.spi.img = start_am33xx_phytec_phycore_sram_128mb.pblb.mlospi
am33xx-mlo-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phycore-mlo-128mb.img
am33xx-mlospi-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phycore-mlo-128mb.spi.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phycore_sram_512mb
-FILE_barebox-am33xx-phytec-phycore-mlo-512mb.img = start_am33xx_phytec_phycore_sram_512mb.pblx.mlo
-FILE_barebox-am33xx-phytec-phycore-mlo-512mb.spi.img = start_am33xx_phytec_phycore_sram_512mb.pblx.mlospi
+pblb-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phycore_sram_512mb
+FILE_barebox-am33xx-phytec-phycore-mlo-512mb.img = start_am33xx_phytec_phycore_sram_512mb.pblb.mlo
+FILE_barebox-am33xx-phytec-phycore-mlo-512mb.spi.img = start_am33xx_phytec_phycore_sram_512mb.pblb.mlospi
am33xx-mlo-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phycore-mlo-512mb.img
am33xx-mlospi-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phycore-mlo-512mb.spi.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phycore_sram_2x512mb
-FILE_barebox-am33xx-phytec-phycore-mlo-2x512mb.img = start_am33xx_phytec_phycore_sram_2x512mb.pblx.mlo
-FILE_barebox-am33xx-phytec-phycore-mlo-2x512mb.spi.img = start_am33xx_phytec_phycore_sram_2x512mb.pblx.mlospi
+pblb-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phycore_sram_2x512mb
+FILE_barebox-am33xx-phytec-phycore-mlo-2x512mb.img = start_am33xx_phytec_phycore_sram_2x512mb.pblb.mlo
+FILE_barebox-am33xx-phytec-phycore-mlo-2x512mb.spi.img = start_am33xx_phytec_phycore_sram_2x512mb.pblb.mlospi
am33xx-mlo-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phycore-mlo-2x512mb.img
am33xx-mlospi-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phycore-mlo-2x512mb.spi.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phyflex_sdram
-FILE_barebox-am33xx-phytec-phyflex.img = start_am33xx_phytec_phyflex_sdram.pblx
+pblb-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phyflex_sdram
+FILE_barebox-am33xx-phytec-phyflex.img = start_am33xx_phytec_phyflex_sdram.pblb
am33xx-barebox-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phyflex.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phyflex_no_spi_sdram
-FILE_barebox-am33xx-phytec-phyflex-no-spi.img = start_am33xx_phytec_phyflex_no_spi_sdram.pblx
+pblb-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phyflex_no_spi_sdram
+FILE_barebox-am33xx-phytec-phyflex-no-spi.img = start_am33xx_phytec_phyflex_no_spi_sdram.pblb
am33xx-barebox-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phyflex-no-spi.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phyflex_no_eeprom_sdram
-FILE_barebox-am33xx-phytec-phyflex-no-eeprom.img = start_am33xx_phytec_phyflex_no_eeprom_sdram.pblx
+pblb-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phyflex_no_eeprom_sdram
+FILE_barebox-am33xx-phytec-phyflex-no-eeprom.img = start_am33xx_phytec_phyflex_no_eeprom_sdram.pblb
am33xx-barebox-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phyflex-no-eeprom.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phyflex_no_spi_no_eeprom_sdram
-FILE_barebox-am33xx-phytec-phyflex-no-spi-no-eeprom.img = start_am33xx_phytec_phyflex_no_spi_no_eeprom_sdram.pblx
+pblb-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phyflex_no_spi_no_eeprom_sdram
+FILE_barebox-am33xx-phytec-phyflex-no-spi-no-eeprom.img = start_am33xx_phytec_phyflex_no_spi_no_eeprom_sdram.pblb
am33xx-barebox-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phyflex-no-spi-no-eeprom.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phyflex_sram_256mb
-FILE_barebox-am33xx-phytec-phyflex-mlo-256mb.img = start_am33xx_phytec_phyflex_sram_256mb.pblx.mlo
-FILE_barebox-am33xx-phytec-phyflex-mlo-256mb.spi.img = start_am33xx_phytec_phyflex_sram_256mb.pblx.mlospi
+pblb-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phyflex_sram_256mb
+FILE_barebox-am33xx-phytec-phyflex-mlo-256mb.img = start_am33xx_phytec_phyflex_sram_256mb.pblb.mlo
+FILE_barebox-am33xx-phytec-phyflex-mlo-256mb.spi.img = start_am33xx_phytec_phyflex_sram_256mb.pblb.mlospi
am33xx-mlo-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phyflex-mlo-256mb.img
am33xx-mlospi-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phyflex-mlo-256mb.spi.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phyflex_sram_512mb
-FILE_barebox-am33xx-phytec-phyflex-mlo-512mb.img = start_am33xx_phytec_phyflex_sram_512mb.pblx.mlo
-FILE_barebox-am33xx-phytec-phyflex-mlo-512mb.spi.img = start_am33xx_phytec_phyflex_sram_512mb.pblx.mlospi
+pblb-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phyflex_sram_512mb
+FILE_barebox-am33xx-phytec-phyflex-mlo-512mb.img = start_am33xx_phytec_phyflex_sram_512mb.pblb.mlo
+FILE_barebox-am33xx-phytec-phyflex-mlo-512mb.spi.img = start_am33xx_phytec_phyflex_sram_512mb.pblb.mlospi
am33xx-mlo-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phyflex-mlo-512mb.img
am33xx-mlospi-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phyflex-mlo-512mb.spi.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phycard_sdram
-FILE_barebox-am33xx-phytec-phycard.img = start_am33xx_phytec_phycard_sdram.pblx
+pblb-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phycard_sdram
+FILE_barebox-am33xx-phytec-phycard.img = start_am33xx_phytec_phycard_sdram.pblb
am33xx-barebox-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phycard.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phycard_sram_256mb
-FILE_barebox-am33xx-phytec-phycard-mlo-256mb.img = start_am33xx_phytec_phycard_sram_256mb.pblx.mlo
-FILE_barebox-am33xx-phytec-phycard-mlo-256mb.spi.img = start_am33xx_phytec_phycard_sram_256mb.pblx.mlospi
+pblb-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += start_am33xx_phytec_phycard_sram_256mb
+FILE_barebox-am33xx-phytec-phycard-mlo-256mb.img = start_am33xx_phytec_phycard_sram_256mb.pblb.mlo
+FILE_barebox-am33xx-phytec-phycard-mlo-256mb.spi.img = start_am33xx_phytec_phycard_sram_256mb.pblb.mlospi
am33xx-mlo-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phycard-mlo-256mb.img
am33xx-mlospi-$(CONFIG_MACH_PHYTEC_SOM_AM335X) += barebox-am33xx-phytec-phycard-mlo-256mb.spi.img
-pblx-$(CONFIG_MACH_BEAGLEBONE) += start_am33xx_beaglebone_sdram
-FILE_barebox-am33xx-beaglebone.img = start_am33xx_beaglebone_sdram.pblx
+pblb-$(CONFIG_MACH_BEAGLEBONE) += start_am33xx_beaglebone_sdram
+FILE_barebox-am33xx-beaglebone.img = start_am33xx_beaglebone_sdram.pblb
am33xx-barebox-$(CONFIG_MACH_BEAGLEBONE) += barebox-am33xx-beaglebone.img
-pblx-$(CONFIG_MACH_BEAGLEBONE) += start_am33xx_beaglebone_sram
-FILE_barebox-am33xx-beaglebone-mlo.img = start_am33xx_beaglebone_sram.pblx.mlo
+pblb-$(CONFIG_MACH_BEAGLEBONE) += start_am33xx_beaglebone_sram
+FILE_barebox-am33xx-beaglebone-mlo.img = start_am33xx_beaglebone_sram.pblb.mlo
am33xx-mlo-$(CONFIG_MACH_BEAGLEBONE) += barebox-am33xx-beaglebone-mlo.img
-pblx-$(CONFIG_MACH_VSCOM_BALTOS) += start_am33xx_baltos_sdram
-FILE_barebox-am33xx-baltos.img = start_am33xx_baltos_sdram.pblx
+pblb-$(CONFIG_MACH_VSCOM_BALTOS) += start_am33xx_baltos_sdram
+FILE_barebox-am33xx-baltos.img = start_am33xx_baltos_sdram.pblb
am33xx-barebox-$(CONFIG_MACH_VSCOM_BALTOS) += barebox-am33xx-baltos.img
-pblx-$(CONFIG_MACH_VSCOM_BALTOS) += start_am33xx_baltos_sram
-FILE_barebox-am33xx-baltos-mlo.img = start_am33xx_baltos_sram.pblx.mlo
+pblb-$(CONFIG_MACH_VSCOM_BALTOS) += start_am33xx_baltos_sram
+FILE_barebox-am33xx-baltos-mlo.img = start_am33xx_baltos_sram.pblb.mlo
am33xx-mlo-$(CONFIG_MACH_VSCOM_BALTOS) += barebox-am33xx-baltos-mlo.img
ifdef CONFIG_OMAP_BUILD_IFT
diff --git a/images/Makefile.at91 b/images/Makefile.at91
index 90860fcc15..acdb591d24 100644
--- a/images/Makefile.at91
+++ b/images/Makefile.at91
@@ -2,14 +2,14 @@
# barebox image generation Makefile for AT91 images
#
-pblx-$(CONFIG_MACH_AT91SAM9X5EK) += start_at91sam9x5ek
-FILE_barebox-at91sam9x5ek.img = start_at91sam9x5ek.pblx
+pblb-$(CONFIG_MACH_AT91SAM9X5EK) += start_at91sam9x5ek
+FILE_barebox-at91sam9x5ek.img = start_at91sam9x5ek.pblb
image-$(CONFIG_MACH_AT91SAM9X5EK) += barebox-at91sam9x5ek.img
-pblx-$(CONFIG_MACH_AT91SAM9263EK) += start_at91sam9263ek
-FILE_barebox-at91sam9263ek.img = start_at91sam9263ek.pblx
+pblb-$(CONFIG_MACH_AT91SAM9263EK) += start_at91sam9263ek
+FILE_barebox-at91sam9263ek.img = start_at91sam9263ek.pblb
image-$(CONFIG_MACH_AT91SAM9263EK) += barebox-at91sam9263ek.img
-pblx-$(CONFIG_MACH_MICROCHIP_KSZ9477_EVB) += start_sama5d3_xplained_ung8071
-FILE_barebox-microchip-ksz9477-evb.img = start_sama5d3_xplained_ung8071.pblx
+pblb-$(CONFIG_MACH_MICROCHIP_KSZ9477_EVB) += start_sama5d3_xplained_ung8071
+FILE_barebox-microchip-ksz9477-evb.img = start_sama5d3_xplained_ung8071.pblb
image-$(CONFIG_MACH_MICROCHIP_KSZ9477_EVB) += barebox-microchip-ksz9477-evb.img
diff --git a/images/Makefile.bcm283x b/images/Makefile.bcm283x
index d14e648926..9199f153dc 100644
--- a/images/Makefile.bcm283x
+++ b/images/Makefile.bcm283x
@@ -2,14 +2,14 @@
# barebox image generation Makefile for BCM283x images
#
-pblx-$(CONFIG_MACH_RPI) += start_raspberry_pi1
-FILE_barebox-raspberry-pi-1.img = start_raspberry_pi1.pblx
+pblb-$(CONFIG_MACH_RPI) += start_raspberry_pi1
+FILE_barebox-raspberry-pi-1.img = start_raspberry_pi1.pblb
image-$(CONFIG_MACH_RPI) += barebox-raspberry-pi-1.img
-pblx-$(CONFIG_MACH_RPI2) += start_raspberry_pi2
-FILE_barebox-raspberry-pi-2.img = start_raspberry_pi2.pblx
+pblb-$(CONFIG_MACH_RPI2) += start_raspberry_pi2
+FILE_barebox-raspberry-pi-2.img = start_raspberry_pi2.pblb
image-$(CONFIG_MACH_RPI2) += barebox-raspberry-pi-2.img
-pblx-$(CONFIG_MACH_RPI3) += start_raspberry_pi3
-FILE_barebox-raspberry-pi-3.img = start_raspberry_pi3.pblx
+pblb-$(CONFIG_MACH_RPI3) += start_raspberry_pi3
+FILE_barebox-raspberry-pi-3.img = start_raspberry_pi3.pblb
image-$(CONFIG_MACH_RPI3) += barebox-raspberry-pi-3.img \ No newline at end of file
diff --git a/images/Makefile.imx b/images/Makefile.imx
index 9b5cd577d2..8b8a5452b7 100644
--- a/images/Makefile.imx
+++ b/images/Makefile.imx
@@ -22,533 +22,521 @@ $(obj)/%.img.dek: $(obj)/$$(FILE_$$(@F))
$(Q)if [ -z $(FILE_$(@F)) ]; then echo "FILE_$(@F) empty!"; false; fi
$(call if_changed,shipped)
-quiet_cmd_imx_sram_img ?= IMX-SRAM-IMG $@
- cmd_imx_sram_img ?= cat $(obj)/$(patsubst %.imx-sram-img,%.pblb,$(2)) > $@; \
- $(call size_append, $(obj)/barebox.z) >> $@; \
- $(CPP) $(imxcfg_cpp_flags) -o $(imximg-tmp) $(CFG_$(@F)) ; \
- $(objtree)/scripts/imx/imx-image -o $@ -b -c $(imximg-tmp) -f $@; \
- cat $(obj)/barebox.z >> $@; \
- $(objtree)/scripts/fix_size -f $@
-
-$(obj)/%.imx-sram-img: $(obj)/%.pblb $(obj)/barebox.z FORCE
- $(call if_changed,imx_sram_img,$(@F))
-
# ----------------------- i.MX25 based boards ---------------------------
-pblx-$(CONFIG_MACH_TX25) += start_imx25_karo_tx25
-FILE_barebox-karo-tx25.img = start_imx25_karo_tx25.pblx
+pblb-$(CONFIG_MACH_TX25) += start_imx25_karo_tx25
+FILE_barebox-karo-tx25.img = start_imx25_karo_tx25.pblb
image-$(CONFIG_MACH_TX25) += barebox-karo-tx25.img
-pblx-$(CONFIG_MACH_TX25) += start_imx25_karo_tx25
-CFG_start_imx25_karo_tx25.pblx.imximg = $(board)/karo-tx25/flash-header-tx25.imxcfg
-FILE_barebox-karo-tx25-internal.img = start_imx25_karo_tx25.pblx.imximg
+pblb-$(CONFIG_MACH_TX25) += start_imx25_karo_tx25
+CFG_start_imx25_karo_tx25.pblb.imximg = $(board)/karo-tx25/flash-header-tx25.imxcfg
+FILE_barebox-karo-tx25-internal.img = start_imx25_karo_tx25.pblb.imximg
image-$(CONFIG_MACH_TX25) += barebox-karo-tx25-internal.img
-pblx-$(CONFIG_MACH_PCA100) += start_phytec_phycard_imx27
-FILE_barebox-phytec-phycard-imx27.img = start_phytec_phycard_imx27.pblx
+pblb-$(CONFIG_MACH_PCA100) += start_phytec_phycard_imx27
+FILE_barebox-phytec-phycard-imx27.img = start_phytec_phycard_imx27.pblb
image-$(CONFIG_MACH_PCA100) += barebox-phytec-phycard-imx27.img
-pblx-$(CONFIG_MACH_PCM038) += start_phytec_phycore_imx27
-FILE_barebox-phytec-phycore-imx27.img = start_phytec_phycore_imx27.pblx
+pblb-$(CONFIG_MACH_PCM038) += start_phytec_phycore_imx27
+FILE_barebox-phytec-phycore-imx27.img = start_phytec_phycore_imx27.pblb
image-$(CONFIG_MACH_PCM038) += barebox-phytec-phycore-imx27.img
# ----------------------- i.MX50 based boards ---------------------------
-pblx-$(CONFIG_MACH_KINDLE_MX50) += start_imx50_kindle_d01100
-CFG_start_imx50_kindle_d01100.pblx.imximg = $(board)/kindle-mx50/flash-header-kindle-lpddr1.imxcfg
-FILE_barebox-kindle-d01100.img = start_imx50_kindle_d01100.pblx.imximg
+pblb-$(CONFIG_MACH_KINDLE_MX50) += start_imx50_kindle_d01100
+CFG_start_imx50_kindle_d01100.pblb.imximg = $(board)/kindle-mx50/flash-header-kindle-lpddr1.imxcfg
+FILE_barebox-kindle-d01100.img = start_imx50_kindle_d01100.pblb.imximg
image-$(CONFIG_MACH_KINDLE_MX50) += barebox-kindle-d01100.img
-pblx-$(CONFIG_MACH_KINDLE_MX50) += start_imx50_kindle_d01200
-CFG_start_imx50_kindle_d01200.pblx.imximg = $(board)/kindle-mx50/flash-header-kindle-lpddr1.imxcfg
-FILE_barebox-kindle-d01200.img = start_imx50_kindle_d01200.pblx.imximg
+pblb-$(CONFIG_MACH_KINDLE_MX50) += start_imx50_kindle_d01200
+CFG_start_imx50_kindle_d01200.pblb.imximg = $(board)/kindle-mx50/flash-header-kindle-lpddr1.imxcfg
+FILE_barebox-kindle-d01200.img = start_imx50_kindle_d01200.pblb.imximg
image-$(CONFIG_MACH_KINDLE_MX50) += barebox-kindle-d01200.img
-pblx-$(CONFIG_MACH_KINDLE_MX50) += start_imx50_kindle_ey21
-CFG_start_imx50_kindle_ey21.pblx.imximg = $(board)/kindle-mx50/flash-header-kindle-lpddr2.imxcfg
-FILE_barebox-kindle-ey21.img = start_imx50_kindle_ey21.pblx.imximg
+pblb-$(CONFIG_MACH_KINDLE_MX50) += start_imx50_kindle_ey21
+CFG_start_imx50_kindle_ey21.pblb.imximg = $(board)/kindle-mx50/flash-header-kindle-lpddr2.imxcfg
+FILE_barebox-kindle-ey21.img = start_imx50_kindle_ey21.pblb.imximg
image-$(CONFIG_MACH_KINDLE_MX50) += barebox-kindle-ey21.img
# ----------------------- i.MX51 based boards ---------------------------
-pblx-$(CONFIG_MACH_FREESCALE_MX51_PDK) += start_imx51_babbage
-CFG_start_imx51_babbage.pblx.imximg = $(board)/freescale-mx51-babbage/flash-header-imx51-babbage.imxcfg
-FILE_barebox-freescale-imx51-babbage.img = start_imx51_babbage.pblx.imximg
+pblb-$(CONFIG_MACH_FREESCALE_MX51_PDK) += start_imx51_babbage
+CFG_start_imx51_babbage.pblb.imximg = $(board)/freescale-mx51-babbage/flash-header-imx51-babbage.imxcfg
+FILE_barebox-freescale-imx51-babbage.img = start_imx51_babbage.pblb.imximg
image-$(CONFIG_MACH_FREESCALE_MX51_PDK) += barebox-freescale-imx51-babbage.img
-pblx-$(CONFIG_MACH_ZII_RDU1) += start_imx51_zii_rdu1
-CFG_start_imx51_zii_rdu1.pblx.imximg = $(board)/zii-imx51-rdu1/flash-header-imx51-zii-rdu1.imxcfg
-FILE_barebox-zii-imx51-rdu1.img = start_imx51_zii_rdu1.pblx.imximg
+pblb-$(CONFIG_MACH_ZII_RDU1) += start_imx51_zii_rdu1
+CFG_start_imx51_zii_rdu1.pblb.imximg = $(board)/zii-imx51-rdu1/flash-header-imx51-zii-rdu1.imxcfg
+FILE_barebox-zii-imx51-rdu1.img = start_imx51_zii_rdu1.pblb.imximg
image-$(CONFIG_MACH_ZII_RDU1) += barebox-zii-imx51-rdu1.img
-pblx-$(CONFIG_MACH_EFIKA_MX_SMARTBOOK) += start_imx51_genesi_efikasb
-CFG_start_imx51_genesi_efikasb.pblx.imximg = $(board)/efika-mx-smartbook/flash-header-imx51-genesi-efikasb.imxcfg
-FILE_barebox-genesi-efikasb.img = start_imx51_genesi_efikasb.pblx.imximg
+pblb-$(CONFIG_MACH_EFIKA_MX_SMARTBOOK) += start_imx51_genesi_efikasb
+CFG_start_imx51_genesi_efikasb.pblb.imximg = $(board)/efika-mx-smartbook/flash-header-imx51-genesi-efikasb.imxcfg
+FILE_barebox-genesi-efikasb.img = start_imx51_genesi_efikasb.pblb.imximg
image-$(CONFIG_MACH_EFIKA_MX_SMARTBOOK) += barebox-genesi-efikasb.img
# ----------------------- i.MX53 based boards ---------------------------
-pblx-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += start_imx53_loco
-CFG_start_imx53_loco.pblx.imximg = $(board)/freescale-mx53-qsb/flash-header-imx53-loco.imxcfg
-FILE_barebox-freescale-imx53-loco.img = start_imx53_loco.pblx.imximg
+pblb-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += start_imx53_loco
+CFG_start_imx53_loco.pblb.imximg = $(board)/freescale-mx53-qsb/flash-header-imx53-loco.imxcfg
+FILE_barebox-freescale-imx53-loco.img = start_imx53_loco.pblb.imximg
image-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += barebox-freescale-imx53-loco.img
-pblx-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += start_imx53_loco_r
-CFG_start_imx53_loco_r.pblx.imximg = $(board)/freescale-mx53-qsb/flash-header-imx53-loco.imxcfg
-FILE_barebox-freescale-imx53-loco-r.img = start_imx53_loco_r.pblx.imximg
+pblb-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += start_imx53_loco_r
+CFG_start_imx53_loco_r.pblb.imximg = $(board)/freescale-mx53-qsb/flash-header-imx53-loco.imxcfg
+FILE_barebox-freescale-imx53-loco-r.img = start_imx53_loco_r.pblb.imximg
image-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += barebox-freescale-imx53-loco-r.img
-pblx-$(CONFIG_MACH_CCMX53) += start_ccxmx53_512mb
-CFG_start_ccxmx53_512mb.pblx.imximg = $(board)/ccxmx53/flash-header-imx53-ccxmx53_512mb.imxcfg
-FILE_barebox-imx53-ccxmx53_512mb.img = start_ccxmx53_512mb.pblx.imximg
+pblb-$(CONFIG_MACH_CCMX53) += start_ccxmx53_512mb
+CFG_start_ccxmx53_512mb.pblb.imximg = $(board)/ccxmx53/flash-header-imx53-ccxmx53_512mb.imxcfg
+FILE_barebox-imx53-ccxmx53_512mb.img = start_ccxmx53_512mb.pblb.imximg
image-$(CONFIG_MACH_CCMX53) += barebox-imx53-ccxmx53_512mb.img
-pblx-$(CONFIG_MACH_CCMX53) += start_ccxmx53_1gib
-CFG_start_ccxmx53_1gib.pblx.imximg = $(board)/ccxmx53/flash-header-imx53-ccxmx53_1gib.imxcfg
-FILE_barebox-imx53-ccxmx53_1gib.img = start_ccxmx53_1gib.pblx.imximg
+pblb-$(CONFIG_MACH_CCMX53) += start_ccxmx53_1gib
+CFG_start_ccxmx53_1gib.pblb.imximg = $(board)/ccxmx53/flash-header-imx53-ccxmx53_1gib.imxcfg
+FILE_barebox-imx53-ccxmx53_1gib.img = start_ccxmx53_1gib.pblb.imximg
image-$(CONFIG_MACH_CCMX53) += barebox-imx53-ccxmx53_1gib.img
-pblx-$(CONFIG_MACH_FREESCALE_MX53_VMX53) += start_imx53_vmx53
-CFG_start_imx53_vmx53.pblx.imximg = $(board)/freescale-mx53-vmx53/flash-header-imx53-vmx53.imxcfg
-FILE_barebox-freescale-imx53-vmx53.img = start_imx53_vmx53.pblx.imximg
+pblb-$(CONFIG_MACH_FREESCALE_MX53_VMX53) += start_imx53_vmx53
+CFG_start_imx53_vmx53.pblb.imximg = $(board)/freescale-mx53-vmx53/flash-header-imx53-vmx53.imxcfg
+FILE_barebox-freescale-imx53-vmx53.img = start_imx53_vmx53.pblb.imximg
image-$(CONFIG_MACH_FREESCALE_MX53_VMX53) += barebox-freescale-imx53-vmx53.img
-ifdef CONFIG_MACH_GUF_VINCELL_XLOAD
-VINCELL_IMAGE := imx-sram-img
-else
-VINCELL_IMAGE := pblx.imximg
-endif
-
-pblx-$(CONFIG_MACH_GUF_VINCELL) += start_imx53_guf_vincell
-CFG_start_imx53_guf_vincell.$(VINCELL_IMAGE) = $(board)/guf-vincell/flash-header.imxcfg
-FILE_barebox-guf-vincell.img = start_imx53_guf_vincell.$(VINCELL_IMAGE)
+pblb-$(CONFIG_MACH_GUF_VINCELL) += start_imx53_guf_vincell
+CFG_start_imx53_guf_vincell.pblb.imximg = $(board)/guf-vincell/flash-header.imxcfg
+FILE_barebox-guf-vincell.img = start_imx53_guf_vincell.pblb.imximg
image-$(CONFIG_MACH_GUF_VINCELL) += barebox-guf-vincell.img
-pblx-$(CONFIG_MACH_GUF_VINCELL) += start_imx53_guf_vincell_lt
-CFG_start_imx53_guf_vincell_lt.$(VINCELL_IMAGE) = $(board)/guf-vincell/flash-header.imxcfg
-FILE_barebox-guf-vincell-lt.img = start_imx53_guf_vincell_lt.$(VINCELL_IMAGE)
+pblb-$(CONFIG_MACH_GUF_VINCELL) += start_imx53_guf_vincell_lt
+CFG_start_imx53_guf_vincell_lt.pblb.imximg = $(board)/guf-vincell/flash-header.imxcfg
+FILE_barebox-guf-vincell-lt.img = start_imx53_guf_vincell_lt.pblb.imximg
image-$(CONFIG_MACH_GUF_VINCELL) += barebox-guf-vincell-lt.img
-pblx-$(CONFIG_MACH_TQMA53) += start_imx53_mba53_512mib
-CFG_start_imx53_mba53_512mib.pblx.imximg = $(board)/tqma53/flash-header-tq-tqma53-512mib.imxcfg
-FILE_barebox-tq-mba53-512mib.img = start_imx53_mba53_512mib.pblx.imximg
+pblb-$(CONFIG_MACH_TQMA53) += start_imx53_mba53_512mib
+CFG_start_imx53_mba53_512mib.pblb.imximg = $(board)/tqma53/flash-header-tq-tqma53-512mib.imxcfg
+FILE_barebox-tq-mba53-512mib.img = start_imx53_mba53_512mib.pblb.imximg
image-$(CONFIG_MACH_TQMA53) += barebox-tq-mba53-512mib.img
-pblx-$(CONFIG_MACH_TQMA53) += start_imx53_mba53_1gib
-CFG_start_imx53_mba53_1gib.pblx.imximg = $(board)/tqma53/flash-header-tq-tqma53-1gib.imxcfg
-FILE_barebox-tq-mba53-1gib.img = start_imx53_mba53_1gib.pblx.imximg
+pblb-$(CONFIG_MACH_TQMA53) += start_imx53_mba53_1gib
+CFG_start_imx53_mba53_1gib.pblb.imximg = $(board)/tqma53/flash-header-tq-tqma53-1gib.imxcfg
+FILE_barebox-tq-mba53-1gib.img = start_imx53_mba53_1gib.pblb.imximg
image-$(CONFIG_MACH_TQMA53) += barebox-tq-mba53-1gib.img
-pblx-$(CONFIG_MACH_TX53) += start_imx53_tx53_xx30_samsung
-CFG_start_imx53_tx53_xx30_samsung.pblx.imximg = $(board)/karo-tx53/flash-header-tx53-revxx30-samsung.imxcfg
-FILE_barebox-tx53-xx30-samsung.img = start_imx53_tx53_xx30_samsung.pblx.imximg
+pblb-$(CONFIG_MACH_TX53) += start_imx53_tx53_xx30_samsung
+CFG_start_imx53_tx53_xx30_samsung.pblb.imximg = $(board)/karo-tx53/flash-header-tx53-revxx30-samsung.imxcfg
+FILE_barebox-tx53-xx30-samsung.img = start_imx53_tx53_xx30_samsung.pblb.imximg
image-$(CONFIG_MACH_TX53) += barebox-tx53-xx30-samsung.img
-pblx-$(CONFIG_MACH_TX53) += start_imx53_tx53_xx30
-CFG_start_imx53_tx53_xx30.pblx.imximg = $(board)/karo-tx53/flash-header-tx53-revxx30.imxcfg
-FILE_barebox-tx53-xx30.img = start_imx53_tx53_xx30.pblx.imximg
+pblb-$(CONFIG_MACH_TX53) += start_imx53_tx53_xx30
+CFG_start_imx53_tx53_xx30.pblb.imximg = $(board)/karo-tx53/flash-header-tx53-revxx30.imxcfg
+FILE_barebox-tx53-xx30.img = start_imx53_tx53_xx30.pblb.imximg
image-$(CONFIG_MACH_TX53) += barebox-tx53-xx30.img
-pblx-$(CONFIG_MACH_TX53) += start_imx53_tx53_1011
-CFG_start_imx53_tx53_1011.pblx.imximg = $(board)/karo-tx53/flash-header-tx53-rev1011.imxcfg
-FILE_barebox-tx53-1011.img = start_imx53_tx53_1011.pblx.imximg
+pblb-$(CONFIG_MACH_TX53) += start_imx53_tx53_1011
+CFG_start_imx53_tx53_1011.pblb.imximg = $(board)/karo-tx53/flash-header-tx53-rev1011.imxcfg
+FILE_barebox-tx53-1011.img = start_imx53_tx53_1011.pblb.imximg
image-$(CONFIG_MACH_TX53) += barebox-tx53-1011.img
# ----------------------- i.MX6 based boards ---------------------------
-pblx-$(CONFIG_MACH_REALQ7) += start_imx6_realq7
-CFG_start_imx6_realq7.pblx.imximg = $(board)/datamodul-edm-qmx6/flash-header.imxcfg
-FILE_barebox-datamodul-edm-qmx6.img = start_imx6_realq7.pblx.imximg
+pblb-$(CONFIG_MACH_REALQ7) += start_imx6_realq7
+CFG_start_imx6_realq7.pblb.imximg = $(board)/datamodul-edm-qmx6/flash-header.imxcfg
+FILE_barebox-datamodul-edm-qmx6.img = start_imx6_realq7.pblb.imximg
image-$(CONFIG_MACH_REALQ7) += barebox-datamodul-edm-qmx6.img
-pblx-$(CONFIG_MACH_GUF_SANTARO) += start_imx6q_guf_santaro
-CFG_start_imx6q_guf_santaro.pblx.imximg = $(board)/guf-santaro/flash-header.imxcfg
-FILE_barebox-guf-santaro.img = start_imx6q_guf_santaro.pblx.imximg
+pblb-$(CONFIG_MACH_GUF_SANTARO) += start_imx6q_guf_santaro
+CFG_start_imx6q_guf_santaro.pblb.imximg = $(board)/guf-santaro/flash-header.imxcfg
+FILE_barebox-guf-santaro.img = start_imx6q_guf_santaro.pblb.imximg
image-$(CONFIG_MACH_GUF_SANTARO) += barebox-guf-santaro.img
-pblx-$(CONFIG_MACH_GK802) += start_imx6_gk802
-CFG_start_imx6_gk802.pblx.imximg = $(board)/gk802/flash-header.imxcfg
-FILE_barebox-gk802.img = start_imx6_gk802.pblx.imximg
+pblb-$(CONFIG_MACH_GK802) += start_imx6_gk802
+CFG_start_imx6_gk802.pblb.imximg = $(board)/gk802/flash-header.imxcfg
+FILE_barebox-gk802.img = start_imx6_gk802.pblb.imximg
image-$(CONFIG_MACH_GK802) += barebox-gk802.img
-pblx-$(CONFIG_MACH_TQMA6X) += start_imx6dl_mba6x
-CFG_start_imx6dl_mba6x.pblx.imximg = $(board)/tqma6x/flash-header-tqma6dl.imxcfg
-FILE_barebox-tq-tqma6s-mba6x.img = start_imx6dl_mba6x.pblx.imximg
+pblb-$(CONFIG_MACH_TQMA6X) += start_imx6dl_mba6x
+CFG_start_imx6dl_mba6x.pblb.imximg = $(board)/tqma6x/flash-header-tqma6dl.imxcfg
+FILE_barebox-tq-tqma6s-mba6x.img = start_imx6dl_mba6x.pblb.imximg
image-$(CONFIG_MACH_TQMA6X) += barebox-tq-tqma6s-mba6x.img
-pblx-$(CONFIG_MACH_TQMA6X) += start_imx6q_mba6x
-CFG_start_imx6q_mba6x.pblx.imximg = $(board)/tqma6x/flash-header-tqma6q.imxcfg
-FILE_barebox-tq-tqma6q-mba6x.img = start_imx6q_mba6x.pblx.imximg
+pblb-$(CONFIG_MACH_TQMA6X) += start_imx6q_mba6x
+CFG_start_imx6q_mba6x.pblb.imximg = $(board)/tqma6x/flash-header-tqma6q.imxcfg
+FILE_barebox-tq-tqma6q-mba6x.img = start_imx6q_mba6x.pblb.imximg
image-$(CONFIG_MACH_TQMA6X) += barebox-tq-tqma6q-mba6x.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_pbab01_4gib
-CFG_start_phytec_pbab01_4gib.pblx.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pfla02-4gib.imxcfg
-FILE_barebox-phytec-pbab01-4gib.img = start_phytec_pbab01_4gib.pblx.imximg
+pblb-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_pbab01_4gib
+CFG_start_phytec_pbab01_4gib.pblb.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pfla02-4gib.imxcfg
+FILE_barebox-phytec-pbab01-4gib.img = start_phytec_pbab01_4gib.pblb.imximg
image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-pbab01-4gib.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_pbab01_2gib
-CFG_start_phytec_pbab01_2gib.pblx.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pfla02-2gib.imxcfg
-FILE_barebox-phytec-pbab01-2gib.img = start_phytec_pbab01_2gib.pblx.imximg
+pblb-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_pbab01_2gib
+CFG_start_phytec_pbab01_2gib.pblb.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pfla02-2gib.imxcfg
+FILE_barebox-phytec-pbab01-2gib.img = start_phytec_pbab01_2gib.pblb.imximg
image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-pbab01-2gib.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_pbab01_1gib
-CFG_start_phytec_pbab01_1gib.pblx.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pfla02-1gib.imxcfg
-FILE_barebox-phytec-pbab01-1gib.img = start_phytec_pbab01_1gib.pblx.imximg
+pblb-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_pbab01_1gib
+CFG_start_phytec_pbab01_1gib.pblb.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pfla02-1gib.imxcfg
+FILE_barebox-phytec-pbab01-1gib.img = start_phytec_pbab01_1gib.pblb.imximg
image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-pbab01-1gib.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_pbab01_1gib_1bank
-CFG_start_phytec_pbab01_1gib_1bank.pblx.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pfla02-1gib-1bank.imxcfg
-FILE_barebox-phytec-pbab01-1gib-1bank.img = start_phytec_pbab01_1gib_1bank.pblx.imximg
+pblb-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_pbab01_1gib_1bank
+CFG_start_phytec_pbab01_1gib_1bank.pblb.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pfla02-1gib-1bank.imxcfg
+FILE_barebox-phytec-pbab01-1gib-1bank.img = start_phytec_pbab01_1gib_1bank.pblb.imximg
image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-pbab01-1gib-1bank.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_pbab01_512mb_1bank
-CFG_start_phytec_pbab01_512mb_1bank.pblx.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pfla02-512mb-1bank.imxcfg
-FILE_barebox-phytec-pbab01-512mb-1bank.img = start_phytec_pbab01_512mb_1bank.pblx.imximg
+pblb-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_pbab01_512mb_1bank
+CFG_start_phytec_pbab01_512mb_1bank.pblb.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pfla02-512mb-1bank.imxcfg
+FILE_barebox-phytec-pbab01-512mb-1bank.img = start_phytec_pbab01_512mb_1bank.pblb.imximg
image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-pbab01-512mb-1bank.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_pbab01dl_1gib
-CFG_start_phytec_pbab01dl_1gib.pblx.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pfla02dl-1gib.imxcfg
-FILE_barebox-phytec-pbab01dl-1gib.img = start_phytec_pbab01dl_1gib.pblx.imximg
+pblb-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_pbab01dl_1gib
+CFG_start_phytec_pbab01dl_1gib.pblb.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pfla02dl-1gib.imxcfg
+FILE_barebox-phytec-pbab01dl-1gib.img = start_phytec_pbab01dl_1gib.pblb.imximg
image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-pbab01dl-1gib.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_pbab01dl_1gib_1bank
-CFG_start_phytec_pbab01dl_1gib_1bank.pblx.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pfla02dl-1gib-1bank.imxcfg
-FILE_barebox-phytec-pbab01dl-1gib-1bank.img = start_phytec_pbab01dl_1gib_1bank.pblx.imximg
+pblb-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_pbab01dl_1gib_1bank
+CFG_start_phytec_pbab01dl_1gib_1bank.pblb.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pfla02dl-1gib-1bank.imxcfg
+FILE_barebox-phytec-pbab01dl-1gib-1bank.img = start_phytec_pbab01dl_1gib_1bank.pblb.imximg
image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-pbab01dl-1gib-1bank.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_pbab01s_512mb_1bank
-CFG_start_phytec_pbab01s_512mb_1bank.pblx.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pfla02s-512mb-1bank.imxcfg
-FILE_barebox-phytec-pbab01s-512mb-1bank.img = start_phytec_pbab01s_512mb_1bank.pblx.imximg
+pblb-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_pbab01s_512mb_1bank
+CFG_start_phytec_pbab01s_512mb_1bank.pblb.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pfla02s-512mb-1bank.imxcfg
+FILE_barebox-phytec-pbab01s-512mb-1bank.img = start_phytec_pbab01s_512mb_1bank.pblb.imximg
image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-pbab01s-512mb-1bank.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_pbab01s_256mb_1bank
-CFG_start_phytec_pbab01s_256mb_1bank.pblx.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pfla02s-256mb-1bank.imxcfg
-FILE_barebox-phytec-pbab01s-256mb-1bank.img = start_phytec_pbab01s_256mb_1bank.pblx.imximg
+pblb-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_pbab01s_256mb_1bank
+CFG_start_phytec_pbab01s_256mb_1bank.pblb.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pfla02s-256mb-1bank.imxcfg
+FILE_barebox-phytec-pbab01s-256mb-1bank.img = start_phytec_pbab01s_256mb_1bank.pblb.imximg
image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-pbab01s-256mb-1bank.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_pbab01s_128mb_1bank
-CFG_start_phytec_pbab01s_128mb_1bank.pblx.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pfla02s-128mb-1bank.imxcfg
-FILE_barebox-phytec-pbab01s-128mb-1bank.img = start_phytec_pbab01s_128mb_1bank.pblx.imximg
+pblb-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_pbab01s_128mb_1bank
+CFG_start_phytec_pbab01s_128mb_1bank.pblb.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pfla02s-128mb-1bank.imxcfg
+FILE_barebox-phytec-pbab01s-128mb-1bank.img = start_phytec_pbab01s_128mb_1bank.pblb.imximg
image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-pbab01s-128mb-1bank.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_phyboard_alcor_1gib
-CFG_start_phytec_phyboard_alcor_1gib.pblx.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pfla02-1gib.imxcfg
-FILE_barebox-phytec-phyboard-alcor-1gib.img = start_phytec_phyboard_alcor_1gib.pblx.imximg
+pblb-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_phyboard_alcor_1gib
+CFG_start_phytec_phyboard_alcor_1gib.pblb.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pfla02-1gib.imxcfg
+FILE_barebox-phytec-phyboard-alcor-1gib.img = start_phytec_phyboard_alcor_1gib.pblb.imximg
image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-phyboard-alcor-1gib.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_phyboard_subra_512mb_1bank
-CFG_start_phytec_phyboard_subra_512mb_1bank.pblx.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pfla02s-512mb-1bank.imxcfg
-FILE_barebox-phytec-phyboard-subra-512mb-1bank.img = start_phytec_phyboard_subra_512mb_1bank.pblx.imximg
+pblb-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_phyboard_subra_512mb_1bank
+CFG_start_phytec_phyboard_subra_512mb_1bank.pblb.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pfla02s-512mb-1bank.imxcfg
+FILE_barebox-phytec-phyboard-subra-512mb-1bank.img = start_phytec_phyboard_subra_512mb_1bank.pblb.imximg
image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-phyboard-subra-512mb-1bank.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_phyboard_subra_1gib_1bank
-CFG_start_phytec_phyboard_subra_1gib_1bank.pblx.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pfla02-1gib-1bank.imxcfg
-FILE_barebox-phytec-phyboard-subra-1gib-1bank.img = start_phytec_phyboard_subra_1gib_1bank.pblx.imximg
+pblb-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_phyboard_subra_1gib_1bank
+CFG_start_phytec_phyboard_subra_1gib_1bank.pblb.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pfla02-1gib-1bank.imxcfg
+FILE_barebox-phytec-phyboard-subra-1gib-1bank.img = start_phytec_phyboard_subra_1gib_1bank.pblb.imximg
image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-phyboard-subra-1gib-1bank.img
-pblx-$(CONFIG_MACH_DFI_FS700_M60) += start_imx6dl_dfi_fs700_m60_6s
-CFG_start_imx6dl_dfi_fs700_m60_6s.pblx.imximg = $(board)/dfi-fs700-m60/flash-header-fs700-m60-6s.imxcfg
-FILE_barebox-dfi-fs700-m60-6s.img = start_imx6dl_dfi_fs700_m60_6s.pblx.imximg
+pblb-$(CONFIG_MACH_DFI_FS700_M60) += start_imx6dl_dfi_fs700_m60_6s
+CFG_start_imx6dl_dfi_fs700_m60_6s.pblb.imximg = $(board)/dfi-fs700-m60/flash-header-fs700-m60-6s.imxcfg
+FILE_barebox-dfi-fs700-m60-6s.img = start_imx6dl_dfi_fs700_m60_6s.pblb.imximg
image-$(CONFIG_MACH_DFI_FS700_M60) += barebox-dfi-fs700-m60-6s.img
-pblx-$(CONFIG_MACH_DFI_FS700_M60) += start_imx6q_dfi_fs700_m60_6q_micron
-CFG_start_imx6q_dfi_fs700_m60_6q_micron.pblx.imximg = $(board)/dfi-fs700-m60/flash-header-fs700-m60-6q-micron.imxcfg
-FILE_barebox-dfi-fs700-m60-6q-micron.img = start_imx6q_dfi_fs700_m60_6q_micron.pblx.imximg
+pblb-$(CONFIG_MACH_DFI_FS700_M60) += start_imx6q_dfi_fs700_m60_6q_micron
+CFG_start_imx6q_dfi_fs700_m60_6q_micron.pblb.imximg = $(board)/dfi-fs700-m60/flash-header-fs700-m60-6q-micron.imxcfg
+FILE_barebox-dfi-fs700-m60-6q-micron.img = start_imx6q_dfi_fs700_m60_6q_micron.pblb.imximg
image-$(CONFIG_MACH_DFI_FS700_M60) += barebox-dfi-fs700-m60-6q-micron.img
-pblx-$(CONFIG_MACH_DFI_FS700_M60) += start_imx6q_dfi_fs700_m60_6q_nanya
-CFG_start_imx6q_dfi_fs700_m60_6q_nanya.pblx.imximg = $(board)/dfi-fs700-m60/flash-header-fs700-m60-6q-nanya.imxcfg
-FILE_barebox-dfi-fs700-m60-6q-nanya.img = start_imx6q_dfi_fs700_m60_6q_nanya.pblx.imximg
+pblb-$(CONFIG_MACH_DFI_FS700_M60) += start_imx6q_dfi_fs700_m60_6q_nanya
+CFG_start_imx6q_dfi_fs700_m60_6q_nanya.pblb.imximg = $(board)/dfi-fs700-m60/flash-header-fs700-m60-6q-nanya.imxcfg
+FILE_barebox-dfi-fs700-m60-6q-nanya.img = start_imx6q_dfi_fs700_m60_6q_nanya.pblb.imximg
image-$(CONFIG_MACH_DFI_FS700_M60) += barebox-dfi-fs700-m60-6q-nanya.img
-pblx-$(CONFIG_MACH_SABRELITE) += start_imx6q_sabrelite
-CFG_start_imx6q_sabrelite.pblx.imximg = $(board)/freescale-mx6-sabrelite/flash-header-mx6-sabrelite.imxcfg
-FILE_barebox-freescale-imx6q-sabrelite.img = start_imx6q_sabrelite.pblx.imximg
+pblb-$(CONFIG_MACH_SABRELITE) += start_imx6q_sabrelite
+CFG_start_imx6q_sabrelite.pblb.imximg = $(board)/freescale-mx6-sabrelite/flash-header-mx6-sabrelite.imxcfg
+FILE_barebox-freescale-imx6q-sabrelite.img = start_imx6q_sabrelite.pblb.imximg
image-$(CONFIG_MACH_SABRELITE) += barebox-freescale-imx6q-sabrelite.img
-pblx-$(CONFIG_MACH_SABRELITE) += start_imx6dl_sabrelite
-CFG_start_imx6dl_sabrelite.pblx.imximg = $(board)/freescale-mx6-sabrelite/flash-header-mx6-sabrelite.imxcfg
-FILE_barebox-freescale-imx6dl-sabrelite.img = start_imx6dl_sabrelite.pblx.imximg
+pblb-$(CONFIG_MACH_SABRELITE) += start_imx6dl_sabrelite
+CFG_start_imx6dl_sabrelite.pblb.imximg = $(board)/freescale-mx6-sabrelite/flash-header-mx6-sabrelite.imxcfg
+FILE_barebox-freescale-imx6dl-sabrelite.img = start_imx6dl_sabrelite.pblb.imximg
image-$(CONFIG_MACH_SABRELITE) += barebox-freescale-imx6dl-sabrelite.img
-pblx-$(CONFIG_MACH_SABRESD) += start_imx6q_sabresd
-CFG_start_imx6q_sabresd.pblx.imximg = $(board)/freescale-mx6-sabresd/flash-header-mx6-sabresd.imxcfg
-FILE_barebox-freescale-imx6q-sabresd.img = start_imx6q_sabresd.pblx.imximg
+pblb-$(CONFIG_MACH_SABRESD) += start_imx6q_sabresd
+CFG_start_imx6q_sabresd.pblb.imximg = $(board)/freescale-mx6-sabresd/flash-header-mx6-sabresd.imxcfg
+FILE_barebox-freescale-imx6q-sabresd.img = start_imx6q_sabresd.pblb.imximg
image-$(CONFIG_MACH_SABRESD) += barebox-freescale-imx6q-sabresd.img
-pblx-$(CONFIG_MACH_FREESCALE_IMX6SX_SABRESDB) += start_imx6sx_sabresdb
-CFG_start_imx6sx_sabresdb.pblx.imximg = $(board)/freescale-mx6sx-sabresdb/flash-header-mx6sx-sabresdb.imxcfg
-FILE_barebox-freescale-imx6sx-sabresdb.img = start_imx6sx_sabresdb.pblx.imximg
+pblb-$(CONFIG_MACH_FREESCALE_IMX6SX_SABRESDB) += start_imx6sx_sabresdb
+CFG_start_imx6sx_sabresdb.pblb.imximg = $(board)/freescale-mx6sx-sabresdb/flash-header-mx6sx-sabresdb.imxcfg
+FILE_barebox-freescale-imx6sx-sabresdb.img = start_imx6sx_sabresdb.pblb.imximg
image-$(CONFIG_MACH_FREESCALE_IMX6SX_SABRESDB) += barebox-freescale-imx6sx-sabresdb.img
-pblx-$(CONFIG_MACH_TECHNEXION_WANDBOARD) += start_imx6_wandboard
-CFG_start_imx6_wandboard.imx-sram-img = $(board)/technexion-wandboard/flash-header-technexion-wandboard.imxcfg
-FILE_barebox-imx6-wandboard.img = start_imx6_wandboard.imx-sram-img
+pblb-$(CONFIG_MACH_TECHNEXION_WANDBOARD) += start_imx6_wandboard
+CFG_start_imx6_wandboard.pblb.imximg = $(board)/technexion-wandboard/flash-header-technexion-wandboard.imxcfg
+FILE_barebox-imx6-wandboard.img = start_imx6_wandboard.pblb.imximg
image-$(CONFIG_MACH_TECHNEXION_WANDBOARD) += barebox-imx6-wandboard.img
-pblx-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += start_hummingboard_microsom_i1
-CFG_start_hummingboard_microsom_i1.pblx.imximg = $(board)/solidrun-microsom/flash-header-microsom-i1.imxcfg
-FILE_barebox-solidrun-hummingboard-microsom-i1.img = start_hummingboard_microsom_i1.pblx.imximg
+pblb-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += start_hummingboard_microsom_i1
+CFG_start_hummingboard_microsom_i1.pblb.imximg = $(board)/solidrun-microsom/flash-header-microsom-i1.imxcfg
+FILE_barebox-solidrun-hummingboard-microsom-i1.img = start_hummingboard_microsom_i1.pblb.imximg
image-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += barebox-solidrun-hummingboard-microsom-i1.img
-pblx-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += start_hummingboard_microsom_i2
-CFG_start_hummingboard_microsom_i2.pblx.imximg = $(board)/solidrun-microsom/flash-header-microsom-i2.imxcfg
-FILE_barebox-solidrun-hummingboard-microsom-i2.img = start_hummingboard_microsom_i2.pblx.imximg
+pblb-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += start_hummingboard_microsom_i2
+CFG_start_hummingboard_microsom_i2.pblb.imximg = $(board)/solidrun-microsom/flash-header-microsom-i2.imxcfg
+FILE_barebox-solidrun-hummingboard-microsom-i2.img = start_hummingboard_microsom_i2.pblb.imximg
image-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += barebox-solidrun-hummingboard-microsom-i2.img
-pblx-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += start_hummingboard_microsom_i2ex
-CFG_start_hummingboard_microsom_i2ex.pblx.imximg = $(board)/solidrun-microsom/flash-header-microsom-i2eX.imxcfg
-FILE_barebox-solidrun-hummingboard-microsom-i2eX.img = start_hummingboard_microsom_i2ex.pblx.imximg
+pblb-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += start_hummingboard_microsom_i2ex
+CFG_start_hummingboard_microsom_i2ex.pblb.imximg = $(board)/solidrun-microsom/flash-header-microsom-i2eX.imxcfg
+FILE_barebox-solidrun-hummingboard-microsom-i2eX.img = start_hummingboard_microsom_i2ex.pblb.imximg
image-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += barebox-solidrun-hummingboard-microsom-i2eX.img
-pblx-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += start_hummingboard_microsom_i4
-CFG_start_hummingboard_microsom_i4.pblx.imximg = $(board)/solidrun-microsom/flash-header-microsom-i4.imxcfg
-FILE_barebox-solidrun-hummingboard-microsom-i4.img = start_hummingboard_microsom_i4.pblx.imximg
+pblb-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += start_hummingboard_microsom_i4
+CFG_start_hummingboard_microsom_i4.pblb.imximg = $(board)/solidrun-microsom/flash-header-microsom-i4.imxcfg
+FILE_barebox-solidrun-hummingboard-microsom-i4.img = start_hummingboard_microsom_i4.pblb.imximg
image-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += barebox-solidrun-hummingboard-microsom-i4.img
-pblx-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += start_hummingboard2_microsom_i1
-CFG_start_hummingboard2_microsom_i1.pblx.imximg = $(board)/solidrun-microsom/flash-header-microsom-i1.imxcfg
-FILE_barebox-solidrun-hummingboard2-microsom-i1.img = start_hummingboard2_microsom_i1.pblx.imximg
+pblb-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += start_hummingboard2_microsom_i1
+CFG_start_hummingboard2_microsom_i1.pblb.imximg = $(board)/solidrun-microsom/flash-header-microsom-i1.imxcfg
+FILE_barebox-solidrun-hummingboard2-microsom-i1.img = start_hummingboard2_microsom_i1.pblb.imximg
image-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += barebox-solidrun-hummingboard2-microsom-i1.img
-pblx-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += start_hummingboard2_microsom_i2
-CFG_start_hummingboard2_microsom_i2.pblx.imximg = $(board)/solidrun-microsom/flash-header-microsom-i2.imxcfg
-FILE_barebox-solidrun-hummingboard2-microsom-i2.img = start_hummingboard2_microsom_i2.pblx.imximg
+pblb-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += start_hummingboard2_microsom_i2
+CFG_start_hummingboard2_microsom_i2.pblb.imximg = $(board)/solidrun-microsom/flash-header-microsom-i2.imxcfg
+FILE_barebox-solidrun-hummingboard2-microsom-i2.img = start_hummingboard2_microsom_i2.pblb.imximg
image-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += barebox-solidrun-hummingboard2-microsom-i2.img
-pblx-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += start_hummingboard2_microsom_i2ex
-CFG_start_hummingboard2_microsom_i2ex.pblx.imximg = $(board)/solidrun-microsom/flash-header-microsom-i2eX.imxcfg
-FILE_barebox-solidrun-hummingboard2-microsom-i2eX.img = start_hummingboard2_microsom_i2ex.pblx.imximg
+pblb-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += start_hummingboard2_microsom_i2ex
+CFG_start_hummingboard2_microsom_i2ex.pblb.imximg = $(board)/solidrun-microsom/flash-header-microsom-i2eX.imxcfg
+FILE_barebox-solidrun-hummingboard2-microsom-i2eX.img = start_hummingboard2_microsom_i2ex.pblb.imximg
image-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += barebox-solidrun-hummingboard2-microsom-i2eX.img
-pblx-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += start_hummingboard2_microsom_i4
-CFG_start_hummingboard2_microsom_i4.pblx.imximg = $(board)/solidrun-microsom/flash-header-microsom-i4.imxcfg
-FILE_barebox-solidrun-hummingboard2-microsom-i4.img = start_hummingboard2_microsom_i4.pblx.imximg
+pblb-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += start_hummingboard2_microsom_i4
+CFG_start_hummingboard2_microsom_i4.pblb.imximg = $(board)/solidrun-microsom/flash-header-microsom-i4.imxcfg
+FILE_barebox-solidrun-hummingboard2-microsom-i4.img = start_hummingboard2_microsom_i4.pblb.imximg
image-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += barebox-solidrun-hummingboard2-microsom-i4.img
-pblx-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += start_h100_microsom_i2ex
-CFG_start_h100_microsom_i2ex.pblx.imximg = $(board)/solidrun-microsom/flash-header-microsom-i2eX.imxcfg
-FILE_barebox-auvidea-h100-microsom-i2eX.img = start_h100_microsom_i2ex.pblx.imximg
+pblb-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += start_h100_microsom_i2ex
+CFG_start_h100_microsom_i2ex.pblb.imximg = $(board)/solidrun-microsom/flash-header-microsom-i2eX.imxcfg
+FILE_barebox-auvidea-h100-microsom-i2eX.img = start_h100_microsom_i2ex.pblb.imximg
image-$(CONFIG_MACH_SOLIDRUN_MICROSOM) += barebox-auvidea-h100-microsom-i2eX.img
-pblx-$(CONFIG_MACH_TECHNEXION_PICO_HOBBIT) += start_imx6ul_pico_hobbit_256mb
-CFG_start_imx6ul_pico_hobbit_256mb.pblx.imximg = $(board)/technexion-pico-hobbit/flash-header-imx6ul-pico-hobbit-256.imxcfg
-FILE_barebox-imx6ul-pico-hobbit-256mb.img = start_imx6ul_pico_hobbit_256mb.pblx.imximg
+pblb-$(CONFIG_MACH_TECHNEXION_PICO_HOBBIT) += start_imx6ul_pico_hobbit_256mb
+CFG_start_imx6ul_pico_hobbit_256mb.pblb.imximg = $(board)/technexion-pico-hobbit/flash-header-imx6ul-pico-hobbit-256.imxcfg
+FILE_barebox-imx6ul-pico-hobbit-256mb.img = start_imx6ul_pico_hobbit_256mb.pblb.imximg
image-$(CONFIG_MACH_TECHNEXION_PICO_HOBBIT) += barebox-imx6ul-pico-hobbit-256mb.img
-pblx-$(CONFIG_MACH_TECHNEXION_PICO_HOBBIT) += start_imx6ul_pico_hobbit_512mb
-CFG_start_imx6ul_pico_hobbit_512mb.pblx.imximg = $(board)/technexion-pico-hobbit/flash-header-imx6ul-pico-hobbit-512.imxcfg
-FILE_barebox-imx6ul-pico-hobbit-512mb.img = start_imx6ul_pico_hobbit_512mb.pblx.imximg
+pblb-$(CONFIG_MACH_TECHNEXION_PICO_HOBBIT) += start_imx6ul_pico_hobbit_512mb
+CFG_start_imx6ul_pico_hobbit_512mb.pblb.imximg = $(board)/technexion-pico-hobbit/flash-header-imx6ul-pico-hobbit-512.imxcfg
+FILE_barebox-imx6ul-pico-hobbit-512mb.img = start_imx6ul_pico_hobbit_512mb.pblb.imximg
image-$(CONFIG_MACH_TECHNEXION_PICO_HOBBIT) += barebox-imx6ul-pico-hobbit-512mb.img
-pblx-$(CONFIG_MACH_NXP_IMX6ULL_EVK) += start_nxp_imx6ull_evk
-CFG_start_nxp_imx6ull_evk.pblx.imximg = $(board)/nxp-imx6ull-evk/flash-header-nxp-imx6ull-evk.imxcfg
-FILE_barebox-nxp-imx6ull-evk.img = start_nxp_imx6ull_evk.pblx.imximg
+pblb-$(CONFIG_MACH_NXP_IMX6ULL_EVK) += start_nxp_imx6ull_evk
+CFG_start_nxp_imx6ull_evk.pblb.imximg = $(board)/nxp-imx6ull-evk/flash-header-nxp-imx6ull-evk.imxcfg
+FILE_barebox-nxp-imx6ull-evk.img = start_nxp_imx6ull_evk.pblb.imximg
image-$(CONFIG_MACH_NXP_IMX6ULL_EVK) += barebox-nxp-imx6ull-evk.img
-pblx-$(CONFIG_MACH_NITROGEN6) += start_imx6q_nitrogen6x_1g
-CFG_start_imx6q_nitrogen6x_1g.pblx.imximg = $(board)/boundarydevices-nitrogen6/flash-header-nitrogen6q-1g.imxcfg
-FILE_barebox-boundarydevices-imx6q-nitrogen6x-1g.img = start_imx6q_nitrogen6x_1g.pblx.imximg
+pblb-$(CONFIG_MACH_NITROGEN6) += start_imx6q_nitrogen6x_1g
+CFG_start_imx6q_nitrogen6x_1g.pblb.imximg = $(board)/boundarydevices-nitrogen6/flash-header-nitrogen6q-1g.imxcfg
+FILE_barebox-boundarydevices-imx6q-nitrogen6x-1g.img = start_imx6q_nitrogen6x_1g.pblb.imximg
image-$(CONFIG_MACH_NITROGEN6) += barebox-boundarydevices-imx6q-nitrogen6x-1g.img
-pblx-$(CONFIG_MACH_NITROGEN6) += start_imx6q_nitrogen6x_2g
-CFG_start_imx6q_nitrogen6x_2g.pblx.imximg = $(board)/boundarydevices-nitrogen6/flash-header-nitrogen6q-2g.imxcfg
-FILE_barebox-boundarydevices-imx6q-nitrogen6x-2g.img = start_imx6q_nitrogen6x_2g.pblx.imximg
+pblb-$(CONFIG_MACH_NITROGEN6) += start_imx6q_nitrogen6x_2g
+CFG_start_imx6q_nitrogen6x_2g.pblb.imximg = $(board)/boundarydevices-nitrogen6/flash-header-nitrogen6q-2g.imxcfg
+FILE_barebox-boundarydevices-imx6q-nitrogen6x-2g.img = start_imx6q_nitrogen6x_2g.pblb.imximg
image-$(CONFIG_MACH_NITROGEN6) += barebox-boundarydevices-imx6q-nitrogen6x-2g.img
-pblx-$(CONFIG_MACH_NITROGEN6) += start_imx6dl_nitrogen6x_1g
-CFG_start_imx6dl_nitrogen6x_1g.pblx.imximg = $(board)/boundarydevices-nitrogen6/flash-header-nitrogen6dl-1g.imxcfg
-FILE_barebox-boundarydevices-imx6dl-nitrogen6x-1g.img = start_imx6dl_nitrogen6x_1g.pblx.imximg
+pblb-$(CONFIG_MACH_NITROGEN6) += start_imx6dl_nitrogen6x_1g
+CFG_start_imx6dl_nitrogen6x_1g.pblb.imximg = $(board)/boundarydevices-nitrogen6/flash-header-nitrogen6dl-1g.imxcfg
+FILE_barebox-boundarydevices-imx6dl-nitrogen6x-1g.img = start_imx6dl_nitrogen6x_1g.pblb.imximg
image-$(CONFIG_MACH_NITROGEN6) += barebox-boundarydevices-imx6dl-nitrogen6x-1g.img
-pblx-$(CONFIG_MACH_NITROGEN6) += start_imx6dl_nitrogen6x_2g
-CFG_start_imx6dl_nitrogen6x_2g.pblx.imximg = $(board)/boundarydevices-nitrogen6/flash-header-nitrogen6dl-2g.imxcfg
-FILE_barebox-boundarydevices-imx6dl-nitrogen6x-2g.img = start_imx6dl_nitrogen6x_2g.pblx.imximg
+pblb-$(CONFIG_MACH_NITROGEN6) += start_imx6dl_nitrogen6x_2g
+CFG_start_imx6dl_nitrogen6x_2g.pblb.imximg = $(board)/boundarydevices-nitrogen6/flash-header-nitrogen6dl-2g.imxcfg
+FILE_barebox-boundarydevices-imx6dl-nitrogen6x-2g.img = start_imx6dl_nitrogen6x_2g.pblb.imximg
image-$(CONFIG_MACH_NITROGEN6) += barebox-boundarydevices-imx6dl-nitrogen6x-2g.img
-pblx-$(CONFIG_MACH_NITROGEN6) += start_imx6qp_nitrogen6_max
-CFG_start_imx6qp_nitrogen6_max.pblx.imximg = $(board)/boundarydevices-nitrogen6/flash-header-nitrogen6qp-max.imxcfg
-FILE_barebox-boundarydevices-imx6qp-nitrogen6_max.img = start_imx6qp_nitrogen6_max.pblx.imximg
+pblb-$(CONFIG_MACH_NITROGEN6) += start_imx6qp_nitrogen6_max
+CFG_start_imx6qp_nitrogen6_max.pblb.imximg = $(board)/boundarydevices-nitrogen6/flash-header-nitrogen6qp-max.imxcfg
+FILE_barebox-boundarydevices-imx6qp-nitrogen6_max.img = start_imx6qp_nitrogen6_max.pblb.imximg
image-$(CONFIG_MACH_NITROGEN6) += barebox-boundarydevices-imx6qp-nitrogen6_max.img
-pblx-$(CONFIG_MACH_TX6X) += start_imx6dl_tx6x_512m
-CFG_start_imx6dl_tx6x_512m.pblx.imximg = $(board)/karo-tx6x/flash-header-tx6dl-512m.imxcfg
-FILE_barebox-karo-imx6dl-tx6x-512m.img = start_imx6dl_tx6x_512m.pblx.imximg
+pblb-$(CONFIG_MACH_TX6X) += start_imx6dl_tx6x_512m
+CFG_start_imx6dl_tx6x_512m.pblb.imximg = $(board)/karo-tx6x/flash-header-tx6dl-512m.imxcfg
+FILE_barebox-karo-imx6dl-tx6x-512m.img = start_imx6dl_tx6x_512m.pblb.imximg
image-$(CONFIG_MACH_TX6X) += barebox-karo-imx6dl-tx6x-512m.img
-pblx-$(CONFIG_MACH_TX6X) += start_imx6dl_tx6x_1g
-CFG_start_imx6dl_tx6x_1g.pblx.imximg = $(board)/karo-tx6x/flash-header-tx6dl-1g.imxcfg
-FILE_barebox-karo-imx6dl-tx6x-1g.img = start_imx6dl_tx6x_1g.pblx.imximg
+pblb-$(CONFIG_MACH_TX6X) += start_imx6dl_tx6x_1g
+CFG_start_imx6dl_tx6x_1g.pblb.imximg = $(board)/karo-tx6x/flash-header-tx6dl-1g.imxcfg
+FILE_barebox-karo-imx6dl-tx6x-1g.img = start_imx6dl_tx6x_1g.pblb.imximg
image-$(CONFIG_MACH_TX6X) += barebox-karo-imx6dl-tx6x-1g.img
-pblx-$(CONFIG_MACH_TX6X) += start_imx6q_tx6x_1g
-CFG_start_imx6q_tx6x_1g.pblx.imximg = $(board)/karo-tx6x/flash-header-tx6q-1g.imxcfg
-FILE_barebox-karo-imx6q-tx6x-1g.img = start_imx6q_tx6x_1g.pblx.imximg
+pblb-$(CONFIG_MACH_TX6X) += start_imx6q_tx6x_1g
+CFG_start_imx6q_tx6x_1g.pblb.imximg = $(board)/karo-tx6x/flash-header-tx6q-1g.imxcfg
+FILE_barebox-karo-imx6q-tx6x-1g.img = start_imx6q_tx6x_1g.pblb.imximg
image-$(CONFIG_MACH_TX6X) += barebox-karo-imx6q-tx6x-1g.img
-pblx-$(CONFIG_MACH_TX6X) += start_imx6q_tx6x_2g
-CFG_start_imx6q_tx6x_2g.pblx.imximg = $(board)/karo-tx6x/flash-header-tx6qp-2g.imxcfg
-FILE_barebox-karo-imx6qp-tx6x-2g.img = start_imx6q_tx6x_2g.pblx.imximg
+pblb-$(CONFIG_MACH_TX6X) += start_imx6q_tx6x_2g
+CFG_start_imx6q_tx6x_2g.pblb.imximg = $(board)/karo-tx6x/flash-header-tx6qp-2g.imxcfg
+FILE_barebox-karo-imx6qp-tx6x-2g.img = start_imx6q_tx6x_2g.pblb.imximg
image-$(CONFIG_MACH_TX6X) += barebox-karo-imx6qp-tx6x-2g.img
-pblx-$(CONFIG_MACH_UDOO) += start_imx6_udoo
-CFG_start_imx6_udoo.pblx.imximg = $(board)/udoo/flash-header-mx6-udoo.imxcfg
-FILE_barebox-udoo-imx6q.img = start_imx6_udoo.pblx.imximg
+pblb-$(CONFIG_MACH_UDOO) += start_imx6_udoo
+CFG_start_imx6_udoo.pblb.imximg = $(board)/udoo/flash-header-mx6-udoo.imxcfg
+FILE_barebox-udoo-imx6q.img = start_imx6_udoo.pblb.imximg
image-$(CONFIG_MACH_UDOO) += barebox-udoo-imx6q.img
-pblx-$(CONFIG_MACH_CM_FX6) += start_imx6_cm_fx6
-CFG_start_imx6_cm_fx6.imx-sram-img = $(board)/cm-fx6/flash-header-mx6-cm-fx6.imxcfg
-FILE_barebox-cm-fx6.img = start_imx6_cm_fx6.imx-sram-img
+pblb-$(CONFIG_MACH_CM_FX6) += start_imx6_cm_fx6
+CFG_start_imx6_cm_fx6.pblb.imximg = $(board)/cm-fx6/flash-header-mx6-cm-fx6.imxcfg
+FILE_barebox-cm-fx6.img = start_imx6_cm_fx6.pblb.imximg
image-$(CONFIG_MACH_CM_FX6) += barebox-cm-fx6.img
-pblx-$(CONFIG_MACH_CM_FX6) += start_imx6_utilite
-CFG_start_imx6_utilite.imx-sram-img = $(board)/cm-fx6/flash-header-mx6-cm-fx6.imxcfg
-FILE_barebox-utilite.img = start_imx6_utilite.imx-sram-img
+pblb-$(CONFIG_MACH_CM_FX6) += start_imx6_utilite
+CFG_start_imx6_utilite.pblb.imximg = $(board)/cm-fx6/flash-header-mx6-cm-fx6.imxcfg
+FILE_barebox-utilite.img = start_imx6_utilite.pblb.imximg
image-$(CONFIG_MACH_CM_FX6) += barebox-utilite.img
-pblx-$(CONFIG_MACH_VARISCITE_MX6) += start_variscite_custom
-CFG_start_variscite_custom.pblx.imximg = $(board)/variscite-mx6/flash-header-variscite.imxcfg
-FILE_barebox-variscite-custom.img = start_variscite_custom.pblx.imximg
+pblb-$(CONFIG_MACH_VARISCITE_MX6) += start_variscite_custom
+CFG_start_variscite_custom.pblb.imximg = $(board)/variscite-mx6/flash-header-variscite.imxcfg
+FILE_barebox-variscite-custom.img = start_variscite_custom.pblb.imximg
image-$(CONFIG_MACH_VARISCITE_MX6) += barebox-variscite-custom.img
-pblx-$(CONFIG_MACH_EMBEDSKY_E9) += start_imx6q_embedsky_e9
-CFG_start_imx6q_embedsky_e9.pblx.imximg = $(board)/embedsky-e9/flash-header-e9.imxcfg
-FILE_barebox-embedsky-imx6q-e9.img = start_imx6q_embedsky_e9.pblx.imximg
+pblb-$(CONFIG_MACH_EMBEDSKY_E9) += start_imx6q_embedsky_e9
+CFG_start_imx6q_embedsky_e9.pblb.imximg = $(board)/embedsky-e9/flash-header-e9.imxcfg
+FILE_barebox-embedsky-imx6q-e9.img = start_imx6q_embedsky_e9.pblb.imximg
image-$(CONFIG_MACH_EMBEDSKY_E9) += barebox-embedsky-imx6q-e9.img
-pblx-$(CONFIG_MACH_EMBEST_RIOTBOARD) += start_imx6s_riotboard
-CFG_start_imx6s_riotboard.pblx.imximg = $(board)/embest-riotboard/flash-header-embest-riotboard.imxcfg
-FILE_barebox-embest-imx6s-riotboard.img = start_imx6s_riotboard.pblx.imximg
+pblb-$(CONFIG_MACH_EMBEST_RIOTBOARD) += start_imx6s_riotboard
+CFG_start_imx6s_riotboard.pblb.imximg = $(board)/embest-riotboard/flash-header-embest-riotboard.imxcfg
+FILE_barebox-embest-imx6s-riotboard.img = start_imx6s_riotboard.pblb.imximg
image-$(CONFIG_MACH_EMBEST_RIOTBOARD) += barebox-embest-imx6s-riotboard.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_pbaa03_1gib
-CFG_start_phytec_pbaa03_1gib.pblx.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pcaaxl3-1gib.imxcfg
-FILE_barebox-phytec-pbaa03-1gib.img = start_phytec_pbaa03_1gib.pblx.imximg
+pblb-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_pbaa03_1gib
+CFG_start_phytec_pbaa03_1gib.pblb.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pcaaxl3-1gib.imxcfg
+FILE_barebox-phytec-pbaa03-1gib.img = start_phytec_pbaa03_1gib.pblb.imximg
image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-pbaa03-1gib.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_pbaa03_1gib_1bank
-CFG_start_phytec_pbaa03_1gib_1bank.pblx.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pcaaxl3-1gib-1bank.imxcfg
-FILE_barebox-phytec-pbaa03-1gib-1bank.img = start_phytec_pbaa03_1gib_1bank.pblx.imximg
+pblb-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_pbaa03_1gib_1bank
+CFG_start_phytec_pbaa03_1gib_1bank.pblb.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pcaaxl3-1gib-1bank.imxcfg
+FILE_barebox-phytec-pbaa03-1gib-1bank.img = start_phytec_pbaa03_1gib_1bank.pblb.imximg
image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-pbaa03-1gib-1bank.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_pbaa03_2gib
-CFG_start_phytec_pbaa03_2gib.pblx.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pcaaxl3-2gib.imxcfg
-FILE_barebox-phytec-pbaa03-2gib.img = start_phytec_pbaa03_2gib.pblx.imximg
+pblb-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_pbaa03_2gib
+CFG_start_phytec_pbaa03_2gib.pblb.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pcaaxl3-2gib.imxcfg
+FILE_barebox-phytec-pbaa03-2gib.img = start_phytec_pbaa03_2gib.pblb.imximg
image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-pbaa03-2gib.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_phycore_imx6q_som_nand_1gib
-CFG_start_phytec_phycore_imx6q_som_nand_1gib.pblx.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pcm058-1gib.imxcfg
-FILE_barebox-phytec-phycore-imx6q-som-nand-1gib.img = start_phytec_phycore_imx6q_som_nand_1gib.pblx.imximg
+pblb-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_phycore_imx6q_som_nand_1gib
+CFG_start_phytec_phycore_imx6q_som_nand_1gib.pblb.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pcm058-1gib.imxcfg
+FILE_barebox-phytec-phycore-imx6q-som-nand-1gib.img = start_phytec_phycore_imx6q_som_nand_1gib.pblb.imximg
image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-phycore-imx6q-som-nand-1gib.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_phycore_imx6qp_som_nand_1gib
-CFG_start_phytec_phycore_imx6qp_som_nand_1gib.pblx.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pcm058qp-1gib.imxcfg
-FILE_barebox-phytec-phycore-imx6qp-som-nand-1gib.img = start_phytec_phycore_imx6qp_som_nand_1gib.pblx.imximg
+pblb-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_phycore_imx6qp_som_nand_1gib
+CFG_start_phytec_phycore_imx6qp_som_nand_1gib.pblb.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pcm058qp-1gib.imxcfg
+FILE_barebox-phytec-phycore-imx6qp-som-nand-1gib.img = start_phytec_phycore_imx6qp_som_nand_1gib.pblb.imximg
image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-phycore-imx6qp-som-nand-1gib.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_phycore_imx6q_som_emmc_1gib
-CFG_start_phytec_phycore_imx6q_som_emmc_1gib.pblx.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pcm058-1gib.imxcfg
-FILE_barebox-phytec-phycore-imx6q-som-emmc-1gib.img = start_phytec_phycore_imx6q_som_emmc_1gib.pblx.imximg
+pblb-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_phycore_imx6q_som_emmc_1gib
+CFG_start_phytec_phycore_imx6q_som_emmc_1gib.pblb.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pcm058-1gib.imxcfg
+FILE_barebox-phytec-phycore-imx6q-som-emmc-1gib.img = start_phytec_phycore_imx6q_som_emmc_1gib.pblb.imximg
image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-phycore-imx6q-som-emmc-1gib.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_phycore_imx6q_som_emmc_2gib
-CFG_start_phytec_phycore_imx6q_som_emmc_2gib.pblx.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pcm058-2gib.imxcfg
-FILE_barebox-phytec-phycore-imx6q-som-emmc-2gib.img = start_phytec_phycore_imx6q_som_emmc_2gib.pblx.imximg
+pblb-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_phycore_imx6q_som_emmc_2gib
+CFG_start_phytec_phycore_imx6q_som_emmc_2gib.pblb.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pcm058-2gib.imxcfg
+FILE_barebox-phytec-phycore-imx6q-som-emmc-2gib.img = start_phytec_phycore_imx6q_som_emmc_2gib.pblb.imximg
image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-phycore-imx6q-som-emmc-2gib.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_phycore_imx6dl_som_nand_256mb
-CFG_start_phytec_phycore_imx6dl_som_nand_256mb.pblx.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pcm058dl-256mb.imxcfg
-FILE_barebox-phytec-phycore-imx6dl-som-nand-256mb.img = start_phytec_phycore_imx6dl_som_nand_256mb.pblx.imximg
+pblb-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_phycore_imx6dl_som_nand_256mb
+CFG_start_phytec_phycore_imx6dl_som_nand_256mb.pblb.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pcm058dl-256mb.imxcfg
+FILE_barebox-phytec-phycore-imx6dl-som-nand-256mb.img = start_phytec_phycore_imx6dl_som_nand_256mb.pblb.imximg
image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-phycore-imx6dl-som-nand-256mb.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_phycore_imx6dl_som_nand_1gib
-CFG_start_phytec_phycore_imx6dl_som_nand_1gib.pblx.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pcm058dl-1gib-32bit.imxcfg
-FILE_barebox-phytec-phycore-imx6dl-som-nand-1gib.img = start_phytec_phycore_imx6dl_som_nand_1gib.pblx.imximg
+pblb-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_phycore_imx6dl_som_nand_1gib
+CFG_start_phytec_phycore_imx6dl_som_nand_1gib.pblb.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pcm058dl-1gib-32bit.imxcfg
+FILE_barebox-phytec-phycore-imx6dl-som-nand-1gib.img = start_phytec_phycore_imx6dl_som_nand_1gib.pblb.imximg
image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-phycore-imx6dl-som-nand-1gib.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_phycore_imx6dl_som_emmc_1gib
-CFG_start_phytec_phycore_imx6dl_som_emmc_1gib.pblx.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pcm058dl-1gib.imxcfg
-FILE_barebox-phytec-phycore-imx6dl-som-emmc-1gib.img = start_phytec_phycore_imx6dl_som_emmc_1gib.pblx.imximg
+pblb-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_phycore_imx6dl_som_emmc_1gib
+CFG_start_phytec_phycore_imx6dl_som_emmc_1gib.pblb.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pcm058dl-1gib.imxcfg
+FILE_barebox-phytec-phycore-imx6dl-som-emmc-1gib.img = start_phytec_phycore_imx6dl_som_emmc_1gib.pblb.imximg
image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-phycore-imx6dl-som-emmc-1gib.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_phycore_imx6ul_som_512mb
-CFG_start_phytec_phycore_imx6ul_som_512mb.pblx.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pcl063-512mb.imxcfg
-FILE_barebox-phytec-phycore-imx6ul-512mb.img = start_phytec_phycore_imx6ul_som_512mb.pblx.imximg
+pblb-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_phycore_imx6ul_som_512mb
+CFG_start_phytec_phycore_imx6ul_som_512mb.pblb.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pcl063-512mb.imxcfg
+FILE_barebox-phytec-phycore-imx6ul-512mb.img = start_phytec_phycore_imx6ul_som_512mb.pblb.imximg
image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-phycore-imx6ul-512mb.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_phycore_imx6ull_som_256mb
-CFG_start_phytec_phycore_imx6ull_som_256mb.pblx.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pcl063-256mb.imxcfg
-FILE_barebox-phytec-phycore-imx6ull-256mb.img = start_phytec_phycore_imx6ull_som_256mb.pblx.imximg
-image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-phycore-imx6ull-256mb.img
+pblb-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_phycore_imx6ull_som_lc_256mb
+CFG_start_phytec_phycore_imx6ull_som_lc_256mb.pblb.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pcl063-256mb.imxcfg
+FILE_barebox-phytec-phycore-imx6ull-lc-256mb.img = start_phytec_phycore_imx6ull_som_lc_256mb.pblb.imximg
+image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-phycore-imx6ull-lc-256mb.img
+
+pblb-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += start_phytec_phycore_imx6ull_som_512mb
+CFG_start_phytec_phycore_imx6ull_som_512mb.pblb.imximg = $(board)/phytec-som-imx6/flash-header-phytec-pcl063-512mb.imxcfg
+FILE_barebox-phytec-phycore-imx6ull-512mb.img = start_phytec_phycore_imx6ull_som_512mb.pblb.imximg
+image-$(CONFIG_MACH_PHYTEC_SOM_IMX6) += barebox-phytec-phycore-imx6ull-512mb.img
-pblx-$(CONFIG_MACH_KONTRON_SAMX6I) += start_imx6q_samx6i
-CFG_start_imx6q_samx6i.pblx.imximg = $(board)/kontron-samx6i/flash-header-samx6i-quad.imxcfg
-FILE_barebox-imx6q-samx6i.img = start_imx6q_samx6i.pblx.imximg
+pblb-$(CONFIG_MACH_KONTRON_SAMX6I) += start_imx6q_samx6i
+CFG_start_imx6q_samx6i.pblb.imximg = $(board)/kontron-samx6i/flash-header-samx6i-quad.imxcfg
+FILE_barebox-imx6q-samx6i.img = start_imx6q_samx6i.pblb.imximg
image-$(CONFIG_MACH_KONTRON_SAMX6I) += barebox-imx6q-samx6i.img
-pblx-$(CONFIG_MACH_KONTRON_SAMX6I) += start_imx6dl_samx6i
-CFG_start_imx6dl_samx6i.pblx.imximg = $(board)/kontron-samx6i/flash-header-samx6i-duallite.imxcfg
-FILE_barebox-imx6dl-samx6i.img = start_imx6dl_samx6i.pblx.imximg
+pblb-$(CONFIG_MACH_KONTRON_SAMX6I) += start_imx6dl_samx6i
+CFG_start_imx6dl_samx6i.pblb.imximg = $(board)/kontron-samx6i/flash-header-samx6i-duallite.imxcfg
+FILE_barebox-imx6dl-samx6i.img = start_imx6dl_samx6i.pblb.imximg
image-$(CONFIG_MACH_KONTRON_SAMX6I) += barebox-imx6dl-samx6i.img
-pblx-$(CONFIG_MACH_GRINN_LITEBOARD) += start_imx6ul_liteboard_256mb
-CFG_start_imx6ul_liteboard_256mb.pblx.imximg = $(board)/grinn-liteboard/flash-header-liteboard-256mb.imxcfg
-FILE_barebox-grinn-liteboard-256mb.img = start_imx6ul_liteboard_256mb.pblx.imximg
+pblb-$(CONFIG_MACH_GRINN_LITEBOARD) += start_imx6ul_liteboard_256mb
+CFG_start_imx6ul_liteboard_256mb.pblb.imximg = $(board)/grinn-liteboard/flash-header-liteboard-256mb.imxcfg
+FILE_barebox-grinn-liteboard-256mb.img = start_imx6ul_liteboard_256mb.pblb.imximg
image-$(CONFIG_MACH_GRINN_LITEBOARD) += barebox-grinn-liteboard-256mb.img
-pblx-$(CONFIG_MACH_GRINN_LITEBOARD) += start_imx6ul_liteboard_512mb
-CFG_start_imx6ul_liteboard_512mb.pblx.imximg = $(board)/grinn-liteboard/flash-header-liteboard-512mb.imxcfg
-FILE_barebox-grinn-liteboard-512mb.img = start_imx6ul_liteboard_512mb.pblx.imximg
+pblb-$(CONFIG_MACH_GRINN_LITEBOARD) += start_imx6ul_liteboard_512mb
+CFG_start_imx6ul_liteboard_512mb.pblb.imximg = $(board)/grinn-liteboard/flash-header-liteboard-512mb.imxcfg
+FILE_barebox-grinn-liteboard-512mb.img = start_imx6ul_liteboard_512mb.pblb.imximg
image-$(CONFIG_MACH_GRINN_LITEBOARD) += barebox-grinn-liteboard-512mb.img
-pblx-$(CONFIG_MACH_GW_VENTANA) += start_imx6q_gw54xx_1gx64
-CFG_start_imx6q_gw54xx_1gx64.pblx.imximg = $(board)/gateworks-ventana/flash-header-ventana-quad-1gx64.imxcfg
-FILE_barebox-gateworks-imx6q-ventana-1gx64.img = start_imx6q_gw54xx_1gx64.pblx.imximg
+pblb-$(CONFIG_MACH_GW_VENTANA) += start_imx6q_gw54xx_1gx64
+CFG_start_imx6q_gw54xx_1gx64.pblb.imximg = $(board)/gateworks-ventana/flash-header-ventana-quad-1gx64.imxcfg
+FILE_barebox-gateworks-imx6q-ventana-1gx64.img = start_imx6q_gw54xx_1gx64.pblb.imximg
image-$(CONFIG_MACH_GW_VENTANA) += barebox-gateworks-imx6q-ventana-1gx64.img
-pblx-$(CONFIG_MACH_ELTEC_HIPERCAM) += start_imx6dl_eltec_hipercam
-CFG_start_imx6dl_eltec_hipercam.pblx.imximg = $(board)/eltec-hipercam/flash-header-eltec-hipercam.imxcfg
-FILE_barebox-eltec-hipercam.img = start_imx6dl_eltec_hipercam.pblx.imximg
+pblb-$(CONFIG_MACH_ELTEC_HIPERCAM) += start_imx6dl_eltec_hipercam
+CFG_start_imx6dl_eltec_hipercam.pblb.imximg = $(board)/eltec-hipercam/flash-header-eltec-hipercam.imxcfg
+FILE_barebox-eltec-hipercam.img = start_imx6dl_eltec_hipercam.pblb.imximg
image-$(CONFIG_MACH_ELTEC_HIPERCAM) += barebox-eltec-hipercam.img
-pblx-$(CONFIG_MACH_ADVANTECH_ROM_742X) += start_advantech_imx6dl_rom_7421
-CFG_start_advantech_imx6dl_rom_7421.pblx.imximg = $(board)/advantech-mx6/flash-header-advantech-rom-7421.imxcfg
-FILE_barebox-advantech-imx6dl-rom-7421.img = start_advantech_imx6dl_rom_7421.pblx.imximg
+pblb-$(CONFIG_MACH_ADVANTECH_ROM_742X) += start_advantech_imx6dl_rom_7421
+CFG_start_advantech_imx6dl_rom_7421.pblb.imximg = $(board)/advantech-mx6/flash-header-advantech-rom-7421.imxcfg
+FILE_barebox-advantech-imx6dl-rom-7421.img = start_advantech_imx6dl_rom_7421.pblb.imximg
image-$(CONFIG_MACH_ADVANTECH_ROM_742X) += barebox-advantech-imx6dl-rom-7421.img
-pblx-$(CONFIG_MACH_WARP7) += start_imx7s_element14_warp7
-CFG_start_imx7s_element14_warp7.pblx.imximg = $(board)/element14-warp7/flash-header-mx7-warp.imxcfg
-FILE_barebox-element14-imx7s-warp7.img = start_imx7s_element14_warp7.pblx.imximg
+pblb-$(CONFIG_MACH_WARP7) += start_imx7s_element14_warp7
+CFG_start_imx7s_element14_warp7.pblb.imximg = $(board)/element14-warp7/flash-header-mx7-warp.imxcfg
+FILE_barebox-element14-imx7s-warp7.img = start_imx7s_element14_warp7.pblb.imximg
image-$(CONFIG_MACH_WARP7) += barebox-element14-imx7s-warp7.img
-pblx-$(CONFIG_MACH_PHYTEC_PHYCORE_IMX7) += start_phytec_phycore_imx7
-CFG_start_phytec_phycore_imx7.pblx.imximg = $(board)/phytec-phycore-imx7/flash-header-phytec-phycore-imx7.imxcfg
-FILE_barebox-phytec-phycore-imx7.img = start_phytec_phycore_imx7.pblx.imximg
+pblb-$(CONFIG_MACH_PHYTEC_PHYCORE_IMX7) += start_phytec_phycore_imx7
+CFG_start_phytec_phycore_imx7.pblb.imximg = $(board)/phytec-phycore-imx7/flash-header-phytec-phycore-imx7.imxcfg
+FILE_barebox-phytec-phycore-imx7.img = start_phytec_phycore_imx7.pblb.imximg
image-$(CONFIG_MACH_PHYTEC_PHYCORE_IMX7) += barebox-phytec-phycore-imx7.img
-pblx-$(CONFIG_MACH_VF610_TWR) += start_vf610_twr
-CFG_start_vf610_twr.pblx.imximg = $(board)/freescale-vf610-twr/flash-header-vf610-twr.imxcfg
-FILE_barebox-vf610-twr.img = start_vf610_twr.pblx.imximg
+pblb-$(CONFIG_MACH_VF610_TWR) += start_vf610_twr
+CFG_start_vf610_twr.pblb.imximg = $(board)/freescale-vf610-twr/flash-header-vf610-twr.imxcfg
+FILE_barebox-vf610-twr.img = start_vf610_twr.pblb.imximg
image-$(CONFIG_MACH_VF610_TWR) += barebox-vf610-twr.img
-pblx-$(CONFIG_MACH_ZII_RDU2) += start_imx6_zii_rdu2
-CFG_start_imx6_zii_rdu2.imx-sram-img = $(board)/zii-imx6q-rdu2/flash-header-rdu2.imxcfg
-FILE_barebox-zii-imx6-rdu2.img = start_imx6_zii_rdu2.imx-sram-img
+pblb-$(CONFIG_MACH_ZII_RDU2) += start_imx6_zii_rdu2
+CFG_start_imx6_zii_rdu2.pblb.imximg = $(board)/zii-imx6q-rdu2/flash-header-rdu2.imxcfg
+FILE_barebox-zii-imx6-rdu2.img = start_imx6_zii_rdu2.pblb.imximg
image-$(CONFIG_MACH_ZII_RDU2) += barebox-zii-imx6-rdu2.img
-pblx-$(CONFIG_MACH_ZII_VF610_DEV) += start_zii_vf610_dev
-CFG_start_zii_vf610_dev.pblx.imximg = $(board)/zii-vf610-dev/flash-header-zii-vf610-dev.imxcfg
-FILE_barebox-zii-vf610-dev.img = start_zii_vf610_dev.pblx.imximg
+pblb-$(CONFIG_MACH_ZII_VF610_DEV) += start_zii_vf610_dev
+CFG_start_zii_vf610_dev.pblb.imximg = $(board)/zii-vf610-dev/flash-header-zii-vf610-dev.imxcfg
+FILE_barebox-zii-vf610-dev.img = start_zii_vf610_dev.pblb.imximg
image-$(CONFIG_MACH_ZII_VF610_DEV) += barebox-zii-vf610-dev.img
# ----------------------- i.MX7 based boards ---------------------------
-pblx-$(CONFIG_MACH_FREESCALE_MX7_SABRESD) += start_imx7d_sabresd
-CFG_start_imx7d_sabresd.pblx.imximg = $(board)/freescale-mx7-sabresd/flash-header-mx7-sabresd.imxcfg
-FILE_barebox-freescale-mx7-sabresd.img = start_imx7d_sabresd.pblx.imximg
+pblb-$(CONFIG_MACH_FREESCALE_MX7_SABRESD) += start_imx7d_sabresd
+CFG_start_imx7d_sabresd.pblb.imximg = $(board)/freescale-mx7-sabresd/flash-header-mx7-sabresd.imxcfg
+FILE_barebox-freescale-mx7-sabresd.img = start_imx7d_sabresd.pblb.imximg
image-$(CONFIG_MACH_FREESCALE_MX7_SABRESD) += barebox-freescale-mx7-sabresd.img
-pblx-$(CONFIG_MACH_ZII_IMX7D_RPU2) += start_zii_imx7d_rpu2
-CFG_start_zii_imx7d_rpu2.pblx.imximg = $(board)/zii-imx7d-rpu2/flash-header-zii-imx7d-rpu2.imxcfg
-FILE_barebox-zii-imx7d-rpu2.img = start_zii_imx7d_rpu2.pblx.imximg
+pblb-$(CONFIG_MACH_ZII_IMX7D_RPU2) += start_zii_imx7d_rpu2
+CFG_start_zii_imx7d_rpu2.pblb.imximg = $(board)/zii-imx7d-rpu2/flash-header-zii-imx7d-rpu2.imxcfg
+FILE_barebox-zii-imx7d-rpu2.img = start_zii_imx7d_rpu2.pblb.imximg
image-$(CONFIG_MACH_ZII_IMX7D_RPU2) += barebox-zii-imx7d-rpu2.img
# ----------------------- i.MX8mq based boards --------------------------
-pblx-$(CONFIG_MACH_NXP_IMX8MQ_EVK) += start_nxp_imx8mq_evk
-CFG_start_nxp_imx8mq_evk.imx-sram-img = $(board)/nxp-imx8mq-evk/flash-header-imx8mq-evk.imxcfg
-FILE_barebox-nxp-imx8mq-evk.img = start_nxp_imx8mq_evk.imx-sram-img
+pblb-$(CONFIG_MACH_NXP_IMX8MQ_EVK) += start_nxp_imx8mq_evk
+CFG_start_nxp_imx8mq_evk.pblb.imximg = $(board)/nxp-imx8mq-evk/flash-header-imx8mq-evk.imxcfg
+FILE_barebox-nxp-imx8mq-evk.img = start_nxp_imx8mq_evk.pblb.imximg
image-$(CONFIG_MACH_NXP_IMX8MQ_EVK) += barebox-nxp-imx8mq-evk.img
diff --git a/images/Makefile.mvebu b/images/Makefile.mvebu
index 17fa0616b2..8d6a5bd0bb 100644
--- a/images/Makefile.mvebu
+++ b/images/Makefile.mvebu
@@ -11,92 +11,92 @@ KWBOPTS = -c -d 0x1000000 -e 0x1000000
# ----------------------- Armada 370 based boards ---------------------------
GLOBALSCALE_MIRABOX_KWBOPTS = ${KWBOPTS} -i $(board)/globalscale-mirabox/kwbimage.cfg
-OPTS_start_globalscale_mirabox.pblx.kwbimg = $(GLOBALSCALE_MIRABOX_KWBOPTS)
-FILE_barebox-globalscale-mirabox.img = start_globalscale_mirabox.pblx.kwbimg
-FILE_barebox-globalscale-mirabox-2nd.img = start_globalscale_mirabox.pblx
-pblx-$(CONFIG_MACH_GLOBALSCALE_MIRABOX) += start_globalscale_mirabox
+OPTS_start_globalscale_mirabox.pblb.kwbimg = $(GLOBALSCALE_MIRABOX_KWBOPTS)
+FILE_barebox-globalscale-mirabox.img = start_globalscale_mirabox.pblb.kwbimg
+FILE_barebox-globalscale-mirabox-2nd.img = start_globalscale_mirabox.pblb
+pblb-$(CONFIG_MACH_GLOBALSCALE_MIRABOX) += start_globalscale_mirabox
image-$(CONFIG_MACH_GLOBALSCALE_MIRABOX) += barebox-globalscale-mirabox.img
image-$(CONFIG_MACH_GLOBALSCALE_MIRABOX) += barebox-globalscale-mirabox-2nd.img
NETGEAR_RN104_KWBOPTS = ${KWBOPTS} -i $(board)/netgear-rn104/kwbimage.cfg
-OPTS_start_netgear_rn104.pblx.kwbimg = $(NETGEAR_RN104_KWBOPTS)
-FILE_barebox-netgear-rn104.img = start_netgear_rn104.pblx.kwbimg
-FILE_barebox-netgear-rn104-2nd.img = start_netgear_rn104.pblx
-pblx-$(CONFIG_MACH_NETGEAR_RN104) += start_netgear_rn104
+OPTS_start_netgear_rn104.pblb.kwbimg = $(NETGEAR_RN104_KWBOPTS)
+FILE_barebox-netgear-rn104.img = start_netgear_rn104.pblb.kwbimg
+FILE_barebox-netgear-rn104-2nd.img = start_netgear_rn104.pblb
+pblb-$(CONFIG_MACH_NETGEAR_RN104) += start_netgear_rn104
image-$(CONFIG_MACH_NETGEAR_RN104) += barebox-netgear-rn104.img
image-$(CONFIG_MACH_NETGEAR_RN104) += barebox-netgear-rn104-2nd.img
# ----------------------- Armada XP based boards ---------------------------
LENOVO_IX4_300D_KWBOPTS = ${KWBOPTS} -i $(board)/lenovo-ix4-300d/kwbimage.cfg
-OPTS_start_lenovo_ix4_300d.pblx.kwbimg = $(LENOVO_IX4_300D_KWBOPTS)
-FILE_barebox-lenovo-ix4-300d.img = start_lenovo_ix4_300d.pblx.kwbimg
-FILE_barebox-lenovo-ix4-300d-2nd.img = start_lenovo_ix4_300d.pblx
-pblx-$(CONFIG_MACH_LENOVO_IX4_300D) += start_lenovo_ix4_300d
+OPTS_start_lenovo_ix4_300d.pblb.kwbimg = $(LENOVO_IX4_300D_KWBOPTS)
+FILE_barebox-lenovo-ix4-300d.img = start_lenovo_ix4_300d.pblb.kwbimg
+FILE_barebox-lenovo-ix4-300d-2nd.img = start_lenovo_ix4_300d.pblb
+pblb-$(CONFIG_MACH_LENOVO_IX4_300D) += start_lenovo_ix4_300d
image-$(CONFIG_MACH_LENOVO_IX4_300D) += barebox-lenovo-ix4-300d.img
image-$(CONFIG_MACH_LENOVO_IX4_300D) += barebox-lenovo-ix4-300d-2nd.img
MARVELL_ARMADA_XP_GP_KWBOPTS = ${KWBOPTS} -i $(board)/marvell-armada-xp-gp/kwbimage.cfg
-OPTS_start_marvell_armada_xp_gp.pblx.kwbimg = $(MARVELL_ARMADA_XP_GP_KWBOPTS)
-FILE_barebox-marvell-armada-xp-gp.img = start_marvell_armada_xp_gp.pblx.kwbimg
-FILE_barebox-marvell-armada-xp-gp-2nd.img = start_marvell_armada_xp_gp.pblx
-pblx-$(CONFIG_MACH_MARVELL_ARMADA_XP_GP) += start_marvell_armada_xp_gp
+OPTS_start_marvell_armada_xp_gp.pblb.kwbimg = $(MARVELL_ARMADA_XP_GP_KWBOPTS)
+FILE_barebox-marvell-armada-xp-gp.img = start_marvell_armada_xp_gp.pblb.kwbimg
+FILE_barebox-marvell-armada-xp-gp-2nd.img = start_marvell_armada_xp_gp.pblb
+pblb-$(CONFIG_MACH_MARVELL_ARMADA_XP_GP) += start_marvell_armada_xp_gp
image-$(CONFIG_MACH_MARVELL_ARMADA_XP_GP) += barebox-marvell-armada-xp-gp.img
image-$(CONFIG_MACH_MARVELL_ARMADA_XP_GP) += barebox-marvell-armada-xp-gp-2nd.img
NETGEAR_RN2120_KWBOPTS = ${KWBOPTS} -i $(board)/netgear-rn2120/kwbimage.cfg
-OPTS_start_netgear_rn2120.pblx.kwbimg = $(NETGEAR_RN2120_KWBOPTS)
-FILE_barebox-netgear-rn2120.img = start_netgear_rn2120.pblx.kwbimg
-FILE_barebox-netgear-rn2120-2nd.img = start_netgear_rn2120.pblx
-pblx-$(CONFIG_MACH_NETGEAR_RN2120) += start_netgear_rn2120
+OPTS_start_netgear_rn2120.pblb.kwbimg = $(NETGEAR_RN2120_KWBOPTS)
+FILE_barebox-netgear-rn2120.img = start_netgear_rn2120.pblb.kwbimg
+FILE_barebox-netgear-rn2120-2nd.img = start_netgear_rn2120.pblb
+pblb-$(CONFIG_MACH_NETGEAR_RN2120) += start_netgear_rn2120
image-$(CONFIG_MACH_NETGEAR_RN2120) += barebox-netgear-rn2120.img
image-$(CONFIG_MACH_NETGEAR_RN2120) += barebox-netgear-rn2120-2nd.img
# ----------------------- Armada 38x based boards ---------------------------
TURRIS_OMNIA_KWBOPTS = ${KWBOPTS} -i $(board)/turris-omnia/kwbimage.cfg
-OPTS_start_turris_omnia.pblx.kwbimg = $(TURRIS_OMNIA_KWBOPTS)
-FILE_barebox-turris-omnia.img = start_turris_omnia.pblx.kwbimg
-FILE_barebox-turris-omnia-2nd.img = start_turris_omnia.pblx
-pblx-$(CONFIG_MACH_TURRIS_OMNIA) += start_turris_omnia
+OPTS_start_turris_omnia.pblb.kwbimg = $(TURRIS_OMNIA_KWBOPTS)
+FILE_barebox-turris-omnia.img = start_turris_omnia.pblb.kwbimg
+FILE_barebox-turris-omnia-2nd.img = start_turris_omnia.pblb
+pblb-$(CONFIG_MACH_TURRIS_OMNIA) += start_turris_omnia
image-$(CONFIG_MACH_TURRIS_OMNIA) += barebox-turris-omnia.img
PLATHOME_OPENBLOCKS_AX3_KWBOPTS = ${KWBOPTS} -i $(board)/plathome-openblocks-ax3/kwbimage.cfg
-OPTS_start_plathome_openblocks_ax3.pblx.kwbimg = $(PLATHOME_OPENBLOCKS_AX3_KWBOPTS)
-FILE_barebox-plathome-openblocks-ax3.img = start_plathome_openblocks_ax3.pblx.kwbimg
-FILE_barebox-plathome-openblocks-ax3-2nd.img = start_plathome_openblocks_ax3.pblx
-pblx-$(CONFIG_MACH_PLATHOME_OPENBLOCKS_AX3) += start_plathome_openblocks_ax3
+OPTS_start_plathome_openblocks_ax3.pblb.kwbimg = $(PLATHOME_OPENBLOCKS_AX3_KWBOPTS)
+FILE_barebox-plathome-openblocks-ax3.img = start_plathome_openblocks_ax3.pblb.kwbimg
+FILE_barebox-plathome-openblocks-ax3-2nd.img = start_plathome_openblocks_ax3.pblb
+pblb-$(CONFIG_MACH_PLATHOME_OPENBLOCKS_AX3) += start_plathome_openblocks_ax3
image-$(CONFIG_MACH_PLATHOME_OPENBLOCKS_AX3) += barebox-plathome-openblocks-ax3.img
image-$(CONFIG_MACH_PLATHOME_OPENBLOCKS_AX3) += barebox-plathome-openblocks-ax3-2nd.img
# ----------------------- Dove 88AP510 based boards ---------------------------
SOLIDRUN_CUBOX_KWBOPTS = ${KWBOPTS} -i $(board)/solidrun-cubox/kwbimage.cfg
-OPTS_start_solidrun_cubox.pblx.kwbimg = $(SOLIDRUN_CUBOX_KWBOPTS)
-FILE_barebox-solidrun-cubox.img = start_solidrun_cubox.pblx.kwbimg
-FILE_barebox-solidrun-cubox-2nd.img = start_solidrun_cubox.pblx
-pblx-$(CONFIG_MACH_SOLIDRUN_CUBOX) += start_solidrun_cubox
+OPTS_start_solidrun_cubox.pblb.kwbimg = $(SOLIDRUN_CUBOX_KWBOPTS)
+FILE_barebox-solidrun-cubox.img = start_solidrun_cubox.pblb.kwbimg
+FILE_barebox-solidrun-cubox-2nd.img = start_solidrun_cubox.pblb
+pblb-$(CONFIG_MACH_SOLIDRUN_CUBOX) += start_solidrun_cubox
image-$(CONFIG_MACH_SOLIDRUN_CUBOX) += barebox-solidrun-cubox.img
image-$(CONFIG_MACH_SOLIDRUN_CUBOX) += barebox-solidrun-cubox-2nd.img
# ----------------------- Kirkwood based boards ---------------------------
GLOBALSCALE_GURUPLUG_KWBOPTS = ${KWBOPTS} -i $(board)/globalscale-guruplug/kwbimage.cfg
-OPTS_start_globalscale_guruplug.pblx.kwbimg = $(GLOBALSCALE_GURUPLUG_KWBOPTS)
-FILE_barebox-globalscale-guruplug.img = start_globalscale_guruplug.pblx.kwbimg
-FILE_barebox-globalscale-guruplug-2nd.img = start_globalscale_guruplug.pblx
-pblx-$(CONFIG_MACH_GLOBALSCALE_GURUPLUG) += start_globalscale_guruplug
+OPTS_start_globalscale_guruplug.pblb.kwbimg = $(GLOBALSCALE_GURUPLUG_KWBOPTS)
+FILE_barebox-globalscale-guruplug.img = start_globalscale_guruplug.pblb.kwbimg
+FILE_barebox-globalscale-guruplug-2nd.img = start_globalscale_guruplug.pblb
+pblb-$(CONFIG_MACH_GLOBALSCALE_GURUPLUG) += start_globalscale_guruplug
image-$(CONFIG_MACH_GLOBALSCALE_GURUPLUG) += barebox-globalscale-guruplug.img
image-$(CONFIG_MACH_GLOBALSCALE_GURUPLUG) += barebox-globalscale-guruplug-2nd.img
PLATHOME_OPENBLOCKS_A6_KWBOPTS = ${KWBOPTS} -i $(board)/plathome-openblocks-a6/kwbimage.cfg
-OPTS_start_plathome_openblocks_a6.pblx.kwbimg = $(PLATHOME_OPENBLOCKS_A6_KWBOPTS)
-FILE_barebox-plathome-openblocks-a6.img = start_plathome_openblocks_a6.pblx.kwbimg
-FILE_barebox-plathome-openblocks-a6-2nd.img = start_plathome_openblocks_a6.pblx
-pblx-$(CONFIG_MACH_PLATHOME_OPENBLOCKS_A6) += start_plathome_openblocks_a6
+OPTS_start_plathome_openblocks_a6.pblb.kwbimg = $(PLATHOME_OPENBLOCKS_A6_KWBOPTS)
+FILE_barebox-plathome-openblocks-a6.img = start_plathome_openblocks_a6.pblb.kwbimg
+FILE_barebox-plathome-openblocks-a6-2nd.img = start_plathome_openblocks_a6.pblb
+pblb-$(CONFIG_MACH_PLATHOME_OPENBLOCKS_A6) += start_plathome_openblocks_a6
image-$(CONFIG_MACH_PLATHOME_OPENBLOCKS_A6) += barebox-plathome-openblocks-a6.img
image-$(CONFIG_MACH_PLATHOME_OPENBLOCKS_A6) += barebox-plathome-openblocks-a6-2nd.img
USI_TOPKICK_KWBOPTS = ${KWBOPTS} -i $(board)/usi-topkick/kwbimage.cfg
-OPTS_start_usi_topkick.pblx.kwbimg = $(USI_TOPKICK_KWBOPTS)
-FILE_barebox-usi-topkick.img = start_usi_topkick.pblx.kwbimg
-FILE_barebox-usi-topkick-2nd.img = start_usi_topkick.pblx
-pblx-$(CONFIG_MACH_USI_TOPKICK) += start_usi_topkick
+OPTS_start_usi_topkick.pblb.kwbimg = $(USI_TOPKICK_KWBOPTS)
+FILE_barebox-usi-topkick.img = start_usi_topkick.pblb.kwbimg
+FILE_barebox-usi-topkick-2nd.img = start_usi_topkick.pblb
+pblb-$(CONFIG_MACH_USI_TOPKICK) += start_usi_topkick
image-$(CONFIG_MACH_USI_TOPKICK) += barebox-usi-topkick.img
image-$(CONFIG_MACH_USI_TOPKICK) += barebox-usi-topkick-2nd.img
diff --git a/images/Makefile.mxs b/images/Makefile.mxs
index aab883202a..f93c3fddd0 100644
--- a/images/Makefile.mxs
+++ b/images/Makefile.mxs
@@ -7,7 +7,7 @@
quiet_cmd_mxs_bootstream = MXS-BOOTSTREAM $@
cmd_mxs_bootstream = $(objtree)/scripts/mxsimage -c $(CFG_$(@F)) -b $< -o $@ -p $(word 2,$^)
-$(obj)/%.mxsbs: $(obj)/%.pblx $(obj)/prep_%.pblb FORCE
+$(obj)/%.mxsbs: $(obj)/%.pblb $(obj)/prep_%.pblb FORCE
$(call if_changed,mxs_bootstream)
# %.mxsbsu - convert into unencrypted MXS BootStream image
@@ -15,7 +15,7 @@ $(obj)/%.mxsbs: $(obj)/%.pblx $(obj)/prep_%.pblb FORCE
quiet_cmd_mxs_bootstream_u = MXS-BOOTSTREAM-U $@
cmd_mxs_bootstream_u = $(objtree)/scripts/mxsimage -u -c $(CFG_$(@F)) -b $< -o $@ -p $(word 2,$^)
-$(obj)/%.mxsbsu: $(obj)/%.pblx $(obj)/prep_%.pblb FORCE
+$(obj)/%.mxsbsu: $(obj)/%.pblb $(obj)/prep_%.pblb FORCE
$(call if_changed,mxs_bootstream_u)
# %.mxssd - convert into MXS SD card image
@@ -29,38 +29,38 @@ $(obj)/%.mxssd: $(obj)/%
mxs23cfg = $(srctree)/arch/arm/mach-mxs/mxs23img.cfg
mxs28cfg = $(srctree)/arch/arm/mach-mxs/mxs28img.cfg
-pblx-$(CONFIG_MACH_DUCKBILL) += start_barebox_duckbill prep_start_barebox_duckbill
+pblb-$(CONFIG_MACH_DUCKBILL) += start_barebox_duckbill prep_start_barebox_duckbill
CFG_start_barebox_duckbill.mxsbs = $(mxs28cfg)
FILE_barebox-duckbill-bootstream.img = start_barebox_duckbill.mxsbs
image-$(CONFIG_MACH_DUCKBILL) += barebox-duckbill-bootstream.img
FILE_barebox-duckbill-sd.img = start_barebox_duckbill.mxsbs.mxssd
image-$(CONFIG_MACH_DUCKBILL) += barebox-duckbill-sd.img
-FILE_barebox-duckbill-2nd.img = start_barebox_duckbill.pblx
+FILE_barebox-duckbill-2nd.img = start_barebox_duckbill.pblb
image-$(CONFIG_MACH_DUCKBILL) += barebox-duckbill-2nd.img
-pblx-$(CONFIG_MACH_TX28) += start_barebox_karo_tx28 prep_start_barebox_karo_tx28
+pblb-$(CONFIG_MACH_TX28) += start_barebox_karo_tx28 prep_start_barebox_karo_tx28
CFG_start_barebox_karo_tx28.mxsbs = $(mxs28cfg)
FILE_barebox-karo-tx28-bootstream.img = start_barebox_karo_tx28.mxsbs
image-$(CONFIG_MACH_TX28) += barebox-karo-tx28-bootstream.img
FILE_barebox-karo-tx28-sd.img = start_barebox_karo_tx28.mxsbs.mxssd
image-$(CONFIG_MACH_TX28) += barebox-karo-tx28-sd.img
-FILE_barebox-karo-tx28-2nd.img = start_barebox_karo_tx28.pblx
+FILE_barebox-karo-tx28-2nd.img = start_barebox_karo_tx28.pblb
image-$(CONFIG_MACH_TX28) += barebox-karo-tx28-2nd.img
-pblx-$(CONFIG_MACH_MX28EVK) += start_barebox_freescale_mx28evk prep_start_barebox_freescale_mx28evk
+pblb-$(CONFIG_MACH_MX28EVK) += start_barebox_freescale_mx28evk prep_start_barebox_freescale_mx28evk
CFG_start_barebox_freescale_mx28evk.mxsbs = $(mxs28cfg)
FILE_barebox-freescale-mx28evk-bootstream.img = start_barebox_freescale_mx28evk.mxsbs
image-$(CONFIG_MACH_MX28EVK) += barebox-freescale-mx28evk-bootstream.img
FILE_barebox-freescale-mx28evk-sd.img = start_barebox_freescale_mx28evk.mxsbs.mxssd
image-$(CONFIG_MACH_MX28EVK) += barebox-freescale-mx28evk-sd.img
-FILE_barebox-freescale-mx28evk-2nd.img = start_barebox_freescale_mx28evk.pblx
+FILE_barebox-freescale-mx28evk-2nd.img = start_barebox_freescale_mx28evk.pblb
image-$(CONFIG_MACH_MX28EVK) += barebox-freescale-mx28evk-2nd.img
-pblx-$(CONFIG_MACH_IMX233_OLINUXINO) += start_barebox_olinuxino_imx23 prep_start_barebox_olinuxino_imx23
+pblb-$(CONFIG_MACH_IMX233_OLINUXINO) += start_barebox_olinuxino_imx23 prep_start_barebox_olinuxino_imx23
CFG_start_barebox_olinuxino_imx23.mxsbs = $(mxs23cfg)
FILE_barebox-olinuxino-imx23-bootstream.img = start_barebox_olinuxino_imx23.mxsbs
image-$(CONFIG_MACH_IMX233_OLINUXINO) += barebox-olinuxino-imx23-bootstream.img
FILE_barebox-olinuxino-imx23-sd.img = start_barebox_olinuxino_imx23.mxsbs.mxssd
image-$(CONFIG_MACH_IMX233_OLINUXINO) += barebox-olinuxino-imx23-sd.img
-FILE_barebox-olinuxino-imx23-2nd.img = start_barebox_olinuxino_imx23.pblx
+FILE_barebox-olinuxino-imx23-2nd.img = start_barebox_olinuxino_imx23.pblb
image-$(CONFIG_MACH_IMX233_OLINUXINO) += barebox-olinuxino-imx23-2nd.img
diff --git a/images/Makefile.omap3 b/images/Makefile.omap3
index 694ec30836..4d87b1da26 100644
--- a/images/Makefile.omap3
+++ b/images/Makefile.omap3
@@ -6,10 +6,10 @@ quiet_cmd_omap3_mlo_image = MLO $@
$(obj)/%.omap3_mlo: $(obj)/% FORCE
$(call if_changed,omap3_mlo_image)
-pblx-$(CONFIG_MACH_BEAGLE) += start_omap3_beagleboard_sdram start_omap3_beagleboard_sram
-FILE_barebox-beagleboard.img = start_omap3_beagleboard_sdram.pblx
+pblb-$(CONFIG_MACH_BEAGLE) += start_omap3_beagleboard_sdram start_omap3_beagleboard_sram
+FILE_barebox-beagleboard.img = start_omap3_beagleboard_sdram.pblb
omap3-barebox-$(CONFIG_MACH_BEAGLE) += barebox-beagleboard.img
-FILE_barebox-beagleboard-mlo.img = start_omap3_beagleboard_sram.pblx.omap3_mlo
+FILE_barebox-beagleboard-mlo.img = start_omap3_beagleboard_sram.pblb.omap3_mlo
omap3-mlo-$(CONFIG_MACH_BEAGLE) += barebox-beagleboard-mlo.img
ifdef CONFIG_OMAP_BUILD_IFT
diff --git a/images/Makefile.rockchip b/images/Makefile.rockchip
index 3f1ee57db2..16303164ae 100644
--- a/images/Makefile.rockchip
+++ b/images/Makefile.rockchip
@@ -2,10 +2,10 @@
# barebox image generation Makefile for Rockchip images
#
-pblx-$(CONFIG_MACH_RADXA_ROCK) += start_radxa_rock
-FILE_barebox-radxa-rock.img = start_radxa_rock.pblx
+pblb-$(CONFIG_MACH_RADXA_ROCK) += start_radxa_rock
+FILE_barebox-radxa-rock.img = start_radxa_rock.pblb
image-$(CONFIG_MACH_RADXA_ROCK) += barebox-radxa-rock.img
-pblx-$(CONFIG_MACH_PHYTEC_SOM_RK3288) += start_rk3288_phycore_som
-FILE_barebox-rk3288-phycore-som.img = start_rk3288_phycore_som.pblx
+pblb-$(CONFIG_MACH_PHYTEC_SOM_RK3288) += start_rk3288_phycore_som
+FILE_barebox-rk3288-phycore-som.img = start_rk3288_phycore_som.pblb
image-$(CONFIG_MACH_PHYTEC_SOM_RK3288) += barebox-rk3288-phycore-som.img
diff --git a/images/Makefile.socfpga b/images/Makefile.socfpga
index a075b36702..6b346a5f84 100644
--- a/images/Makefile.socfpga
+++ b/images/Makefile.socfpga
@@ -13,56 +13,49 @@ quiet_cmd_socfpga_image = SOCFPGA-IMG $@
$(obj)/%.socfpgaimg: $(obj)/% FORCE
$(call if_changed,socfpga_image)
-ocram-tmp = $(subst $(comma),_,$(dot-target).ocram.tmp)
-
-quiet_cmd_socfpga_ocram_img ?= SOCFPGA-OCRAM-IMG $@
- cmd_socfpga_ocram_img ?= cat $(obj)/$(patsubst %.socfpga-ocram-img,%.pblb,$(2)) > $(ocram-tmp); \
- $(call size_append, $(obj)/barebox.z) >> $(ocram-tmp); \
- $(objtree)/scripts/socfpga_mkimage -v1 -b -s -o $@ $(ocram-tmp); \
- cat $(obj)/barebox.z >> $@
-
-$(obj)/%.socfpga-ocram-img: $(obj)/%.pblb $(obj)/barebox.z FORCE
- $(call if_changed,socfpga_ocram_img,$(@F))
-
# ----------------------- Cyclone5 based boards ---------------------------
-pblx-$(CONFIG_MACH_SOCFPGA_ALTERA_SOCDK) += start_socfpga_socdk_xload
-FILE_barebox-socfpga-socdk-xload.img = start_socfpga_socdk_xload.pblx.socfpgaimg
+pblb-$(CONFIG_MACH_SOCFPGA_ALTERA_SOCDK) += start_socfpga_socdk_xload
+FILE_barebox-socfpga-socdk-xload.img = start_socfpga_socdk_xload.pblb.socfpgaimg
socfpga-xload-$(CONFIG_MACH_SOCFPGA_ALTERA_SOCDK) += barebox-socfpga-socdk-xload.img
-pblx-$(CONFIG_MACH_SOCFPGA_ALTERA_SOCDK) += start_socfpga_socdk
-FILE_barebox-socfpga-socdk.img = start_socfpga_socdk.pblx
+pblb-$(CONFIG_MACH_SOCFPGA_ALTERA_SOCDK) += start_socfpga_socdk
+FILE_barebox-socfpga-socdk.img = start_socfpga_socdk.pblb
socfpga-barebox-$(CONFIG_MACH_SOCFPGA_ALTERA_SOCDK) += barebox-socfpga-socdk.img
-pblx-$(CONFIG_MACH_SOCFPGA_TERASIC_DE0_NANO_SOC) += start_socfpga_de0_nano_soc_xload
-FILE_barebox-socfpga-de0_nano_soc-xload.img = start_socfpga_de0_nano_soc_xload.pblx.socfpgaimg
+pblb-$(CONFIG_MACH_SOCFPGA_TERASIC_DE0_NANO_SOC) += start_socfpga_de0_nano_soc_xload
+FILE_barebox-socfpga-de0_nano_soc-xload.img = start_socfpga_de0_nano_soc_xload.pblb.socfpgaimg
socfpga-xload-$(CONFIG_MACH_SOCFPGA_TERASIC_DE0_NANO_SOC) += barebox-socfpga-de0_nano_soc-xload.img
-pblx-$(CONFIG_MACH_SOCFPGA_TERASIC_DE0_NANO_SOC) += start_socfpga_de0_nano_soc
-FILE_barebox-socfpga-de0_nano_soc.img = start_socfpga_de0_nano_soc.pblx
+pblb-$(CONFIG_MACH_SOCFPGA_TERASIC_DE0_NANO_SOC) += start_socfpga_de0_nano_soc
+FILE_barebox-socfpga-de0_nano_soc.img = start_socfpga_de0_nano_soc.pblb
socfpga-barebox-$(CONFIG_MACH_SOCFPGA_TERASIC_DE0_NANO_SOC) += barebox-socfpga-de0_nano_soc.img
-pblx-$(CONFIG_MACH_SOCFPGA_REFLEX_ACHILLES) += start_socfpga_achilles
-FILE_barebox-socfpga-achilles.img = start_socfpga_achilles.socfpga-ocram-img
+pblb-$(CONFIG_MACH_SOCFPGA_REFLEX_ACHILLES) += start_socfpga_achilles_xload
+FILE_barebox-socfpga-achilles-xload.img = start_socfpga_achilles_xload.pblb.socfpgaimg
+socfpga-barebox-$(CONFIG_MACH_SOCFPGA_REFLEX_ACHILLES) += barebox-socfpga-achilles-xload.img
+
+pblb-$(CONFIG_MACH_SOCFPGA_REFLEX_ACHILLES) += start_socfpga_achilles
+FILE_barebox-socfpga-achilles.img = start_socfpga_achilles.pblb
socfpga-barebox-$(CONFIG_MACH_SOCFPGA_REFLEX_ACHILLES) += barebox-socfpga-achilles.img
-pblx-$(CONFIG_MACH_SOCFPGA_REFLEX_ACHILLES) += start_socfpga_achilles_bringup
-FILE_barebox-socfpga-achilles-bringup.img = start_socfpga_achilles_bringup.pblx
+pblb-$(CONFIG_MACH_SOCFPGA_REFLEX_ACHILLES) += start_socfpga_achilles_bringup
+FILE_barebox-socfpga-achilles-bringup.img = start_socfpga_achilles_bringup.pblb
socfpga-barebox-$(CONFIG_MACH_SOCFPGA_REFLEX_ACHILLES) += barebox-socfpga-achilles-bringup.img
-pblx-$(CONFIG_MACH_SOCFPGA_TERASIC_SOCKIT) += start_socfpga_sockit_xload
-FILE_barebox-socfpga-sockit-xload.img = start_socfpga_sockit_xload.pblx.socfpgaimg
+pblb-$(CONFIG_MACH_SOCFPGA_TERASIC_SOCKIT) += start_socfpga_sockit_xload
+FILE_barebox-socfpga-sockit-xload.img = start_socfpga_sockit_xload.pblb.socfpgaimg
socfpga-xload-$(CONFIG_MACH_SOCFPGA_TERASIC_SOCKIT) += barebox-socfpga-sockit-xload.img
-pblx-$(CONFIG_MACH_SOCFPGA_TERASIC_SOCKIT) += start_socfpga_sockit
-FILE_barebox-socfpga-sockit.img = start_socfpga_sockit.pblx
+pblb-$(CONFIG_MACH_SOCFPGA_TERASIC_SOCKIT) += start_socfpga_sockit
+FILE_barebox-socfpga-sockit.img = start_socfpga_sockit.pblb
socfpga-barebox-$(CONFIG_MACH_SOCFPGA_TERASIC_SOCKIT) += barebox-socfpga-sockit.img
-pblx-$(CONFIG_MACH_SOCFPGA_EBV_SOCRATES) += start_socfpga_socrates_xload
-FILE_barebox-socfpga-socrates-xload.img = start_socfpga_socrates_xload.pblx.socfpgaimg
+pblb-$(CONFIG_MACH_SOCFPGA_EBV_SOCRATES) += start_socfpga_socrates_xload
+FILE_barebox-socfpga-socrates-xload.img = start_socfpga_socrates_xload.pblb.socfpgaimg
socfpga-xload-$(CONFIG_MACH_SOCFPGA_EBV_SOCRATES) += barebox-socfpga-socrates-xload.img
-pblx-$(CONFIG_MACH_SOCFPGA_EBV_SOCRATES) += start_socfpga_socrates
-FILE_barebox-socfpga-socrates.img = start_socfpga_socrates.pblx
+pblb-$(CONFIG_MACH_SOCFPGA_EBV_SOCRATES) += start_socfpga_socrates
+FILE_barebox-socfpga-socrates.img = start_socfpga_socrates.pblb
socfpga-barebox-$(CONFIG_MACH_SOCFPGA_EBV_SOCRATES) += barebox-socfpga-socrates.img
ifdef CONFIG_ARCH_SOCFPGA_XLOAD
diff --git a/images/Makefile.tegra b/images/Makefile.tegra
index c1e0b20573..f5b5841e06 100644
--- a/images/Makefile.tegra
+++ b/images/Makefile.tegra
@@ -29,64 +29,64 @@ $(obj)/%.t124img: $(obj)/% FORCE
$(call if_changed,tegra124_image)
# ----------------------- Tegra20 based boards ---------------------------
-pblx-$(CONFIG_MACH_TOSHIBA_AC100) += start_toshiba_ac100
-FILE_barebox-tegra20-toshiba-ac100-usbloader.img = start_toshiba_ac100.pblx
+pblb-$(CONFIG_MACH_TOSHIBA_AC100) += start_toshiba_ac100
+FILE_barebox-tegra20-toshiba-ac100-usbloader.img = start_toshiba_ac100.pblb
image-$(CONFIG_MACH_TOSHIBA_AC100) += barebox-tegra20-toshiba-ac100-usbloader.img
-pblx-$(CONFIG_MACH_TORADEX_COLIBRI_T20) += start_colibri_t20_256_usbload
-FILE_barebox-tegra20-toradex-colibri-t20-256-usbloader-iris.img = start_colibri_t20_256_usbload.pblx
+pblb-$(CONFIG_MACH_TORADEX_COLIBRI_T20) += start_colibri_t20_256_usbload
+FILE_barebox-tegra20-toradex-colibri-t20-256-usbloader-iris.img = start_colibri_t20_256_usbload.pblb
image-$(CONFIG_MACH_TORADEX_COLIBRI_T20) += barebox-tegra20-toradex-colibri-t20-256-usbloader-iris.img
-pblx-$(CONFIG_MACH_TORADEX_COLIBRI_T20) += start_colibri_t20_256_hsmmc
-BCT_start_colibri_t20_256_hsmmc.pblx.t20img = $(objboard)/toradex-colibri-t20/colibri-t20_256_hsmmc.bct
-FILE_barebox-tegra20-toradex-colibri-t20-256-hsmmc-iris.img = start_colibri_t20_256_hsmmc.pblx.t20img
+pblb-$(CONFIG_MACH_TORADEX_COLIBRI_T20) += start_colibri_t20_256_hsmmc
+BCT_start_colibri_t20_256_hsmmc.pblb.t20img = $(objboard)/toradex-colibri-t20/colibri-t20_256_hsmmc.bct
+FILE_barebox-tegra20-toradex-colibri-t20-256-hsmmc-iris.img = start_colibri_t20_256_hsmmc.pblb.t20img
image-$(CONFIG_MACH_TORADEX_COLIBRI_T20) += barebox-tegra20-toradex-colibri-t20-256-hsmmc-iris.img
-pblx-$(CONFIG_MACH_TORADEX_COLIBRI_T20) += start_colibri_t20_256_v11_nand
-BCT_start_colibri_t20_256_v11_nand.pblx.t20img = $(objboard)/toradex-colibri-t20/colibri-t20_256_v11_nand.bct
-FILE_barebox-tegra20-toradex-colibri-t20-256-v11-nand-iris.img = start_colibri_t20_256_v11_nand.pblx.t20img
+pblb-$(CONFIG_MACH_TORADEX_COLIBRI_T20) += start_colibri_t20_256_v11_nand
+BCT_start_colibri_t20_256_v11_nand.pblb.t20img = $(objboard)/toradex-colibri-t20/colibri-t20_256_v11_nand.bct
+FILE_barebox-tegra20-toradex-colibri-t20-256-v11-nand-iris.img = start_colibri_t20_256_v11_nand.pblb.t20img
image-$(CONFIG_MACH_TORADEX_COLIBRI_T20) += barebox-tegra20-toradex-colibri-t20-256-v11-nand-iris.img
-pblx-$(CONFIG_MACH_TORADEX_COLIBRI_T20) += start_colibri_t20_256_v12_nand
-BCT_start_colibri_t20_256_v12_nand.pblx.t20img = $(objboard)/toradex-colibri-t20/colibri-t20_256_v12_nand.bct
-FILE_barebox-tegra20-toradex-colibri-t20-256-v12-nand-iris.img = start_colibri_t20_256_v12_nand.pblx.t20img
+pblb-$(CONFIG_MACH_TORADEX_COLIBRI_T20) += start_colibri_t20_256_v12_nand
+BCT_start_colibri_t20_256_v12_nand.pblb.t20img = $(objboard)/toradex-colibri-t20/colibri-t20_256_v12_nand.bct
+FILE_barebox-tegra20-toradex-colibri-t20-256-v12-nand-iris.img = start_colibri_t20_256_v12_nand.pblb.t20img
image-$(CONFIG_MACH_TORADEX_COLIBRI_T20) += barebox-tegra20-toradex-colibri-t20-256-v12-nand-iris.img
-pblx-$(CONFIG_MACH_TORADEX_COLIBRI_T20) += start_colibri_t20_512_usbload
-FILE_barebox-tegra20-toradex-colibri-t20-512-usbloader-iris.img = start_colibri_t20_512_usbload.pblx
+pblb-$(CONFIG_MACH_TORADEX_COLIBRI_T20) += start_colibri_t20_512_usbload
+FILE_barebox-tegra20-toradex-colibri-t20-512-usbloader-iris.img = start_colibri_t20_512_usbload.pblb
image-$(CONFIG_MACH_TORADEX_COLIBRI_T20) += barebox-tegra20-toradex-colibri-t20-512-usbloader-iris.img
-pblx-$(CONFIG_MACH_TORADEX_COLIBRI_T20) += start_colibri_t20_512_hsmmc
-BCT_start_colibri_t20_512_hsmmc.pblx.t20img = $(objboard)/toradex-colibri-t20/colibri-t20_512_hsmmc.bct
-FILE_barebox-tegra20-toradex-colibri-t20-512-hsmmc-iris.img = start_colibri_t20_512_hsmmc.pblx.t20img
+pblb-$(CONFIG_MACH_TORADEX_COLIBRI_T20) += start_colibri_t20_512_hsmmc
+BCT_start_colibri_t20_512_hsmmc.pblb.t20img = $(objboard)/toradex-colibri-t20/colibri-t20_512_hsmmc.bct
+FILE_barebox-tegra20-toradex-colibri-t20-512-hsmmc-iris.img = start_colibri_t20_512_hsmmc.pblb.t20img
image-$(CONFIG_MACH_TORADEX_COLIBRI_T20) += barebox-tegra20-toradex-colibri-t20-512-hsmmc-iris.img
-pblx-$(CONFIG_MACH_TORADEX_COLIBRI_T20) += start_colibri_t20_512_v11_nand
-BCT_start_colibri_t20_512_v11_nand.pblx.t20img = $(objboard)/toradex-colibri-t20/colibri-t20_512_v11_nand.bct
-FILE_barebox-tegra20-toradex-colibri-t20-512-v11-nand-iris.img = start_colibri_t20_512_v11_nand.pblx.t20img
+pblb-$(CONFIG_MACH_TORADEX_COLIBRI_T20) += start_colibri_t20_512_v11_nand
+BCT_start_colibri_t20_512_v11_nand.pblb.t20img = $(objboard)/toradex-colibri-t20/colibri-t20_512_v11_nand.bct
+FILE_barebox-tegra20-toradex-colibri-t20-512-v11-nand-iris.img = start_colibri_t20_512_v11_nand.pblb.t20img
image-$(CONFIG_MACH_TORADEX_COLIBRI_T20) += barebox-tegra20-toradex-colibri-t20-512-v11-nand-iris.img
-pblx-$(CONFIG_MACH_TORADEX_COLIBRI_T20) += start_colibri_t20_512_v12_nand
-BCT_start_colibri_t20_512_v12_nand.pblx.t20img = $(objboard)/toradex-colibri-t20/colibri-t20_512_v12_nand.bct
-FILE_barebox-tegra20-toradex-colibri-t20-512-v12-nand-iris.img = start_colibri_t20_512_v12_nand.pblx.t20img
+pblb-$(CONFIG_MACH_TORADEX_COLIBRI_T20) += start_colibri_t20_512_v12_nand
+BCT_start_colibri_t20_512_v12_nand.pblb.t20img = $(objboard)/toradex-colibri-t20/colibri-t20_512_v12_nand.bct
+FILE_barebox-tegra20-toradex-colibri-t20-512-v12-nand-iris.img = start_colibri_t20_512_v12_nand.pblb.t20img
image-$(CONFIG_MACH_TORADEX_COLIBRI_T20) += barebox-tegra20-toradex-colibri-t20-512-v12-nand-iris.img
# ----------------------- Tegra30 based boards ---------------------------
-pblx-$(CONFIG_MACH_NVIDIA_BEAVER) += start_nvidia_beaver
-FILE_barebox-tegra30-nvidia-beaver-usbloader.img = start_nvidia_beaver.pblx
+pblb-$(CONFIG_MACH_NVIDIA_BEAVER) += start_nvidia_beaver
+FILE_barebox-tegra30-nvidia-beaver-usbloader.img = start_nvidia_beaver.pblb
image-$(CONFIG_MACH_NVIDIA_BEAVER) += barebox-tegra30-nvidia-beaver-usbloader.img
-pblx-$(CONFIG_MACH_NVIDIA_BEAVER) += start_nvidia_beaver
-BCT_start_nvidia_beaver.pblx.t30img = $(objboard)/nvidia-beaver/beaver-2gb-emmc.bct
-FILE_barebox-tegra30-nvidia-beaver-emmc.img = start_nvidia_beaver.pblx.t30img
+pblb-$(CONFIG_MACH_NVIDIA_BEAVER) += start_nvidia_beaver
+BCT_start_nvidia_beaver.pblb.t30img = $(objboard)/nvidia-beaver/beaver-2gb-emmc.bct
+FILE_barebox-tegra30-nvidia-beaver-emmc.img = start_nvidia_beaver.pblb.t30img
image-$(CONFIG_MACH_NVIDIA_BEAVER) += barebox-tegra30-nvidia-beaver-emmc.img
# ----------------------- Tegra124 based boards --------------------------
-pblx-$(CONFIG_MACH_NVIDIA_JETSON) += start_nvidia_jetson
-FILE_barebox-tegra124-nvidia-jetson-tk1-usbloader.img = start_nvidia_jetson.pblx
+pblb-$(CONFIG_MACH_NVIDIA_JETSON) += start_nvidia_jetson
+FILE_barebox-tegra124-nvidia-jetson-tk1-usbloader.img = start_nvidia_jetson.pblb
image-$(CONFIG_MACH_NVIDIA_JETSON) += barebox-tegra124-nvidia-jetson-tk1-usbloader.img
-pblx-$(CONFIG_MACH_NVIDIA_JETSON) += start_nvidia_jetson
-BCT_start_nvidia_jetson.pblx.t124img = $(objboard)/nvidia-jetson-tk1/jetson-tk1-2gb-emmc.bct
-FILE_barebox-tegra124-nvidia-jetson-tk1-emmc.img = start_nvidia_jetson.pblx.t124img
+pblb-$(CONFIG_MACH_NVIDIA_JETSON) += start_nvidia_jetson
+BCT_start_nvidia_jetson.pblb.t124img = $(objboard)/nvidia-jetson-tk1/jetson-tk1-2gb-emmc.bct
+FILE_barebox-tegra124-nvidia-jetson-tk1-emmc.img = start_nvidia_jetson.pblb.t124img
image-$(CONFIG_MACH_NVIDIA_JETSON) += barebox-tegra124-nvidia-jetson-tk1-emmc.img
diff --git a/images/Makefile.vexpress b/images/Makefile.vexpress
index 0f12dc12a5..d2af191845 100644
--- a/images/Makefile.vexpress
+++ b/images/Makefile.vexpress
@@ -2,10 +2,10 @@
# barebox image generation Makefile for VExpress images
#
-pblx-$(CONFIG_MACH_VEXPRESS) += start_vexpress_ca9
-FILE_barebox-vexpress-ca9.img = start_vexpress_ca9.pblx
+pblb-$(CONFIG_MACH_VEXPRESS) += start_vexpress_ca9
+FILE_barebox-vexpress-ca9.img = start_vexpress_ca9.pblb
image-$(CONFIG_MACH_VEXPRESS) += barebox-vexpress-ca9.img
-pblx-$(CONFIG_MACH_VEXPRESS) += start_vexpress_ca15
-FILE_barebox-vexpress-ca15.img = start_vexpress_ca15.pblx
+pblb-$(CONFIG_MACH_VEXPRESS) += start_vexpress_ca15
+FILE_barebox-vexpress-ca15.img = start_vexpress_ca15.pblb
image-$(CONFIG_MACH_VEXPRESS) += barebox-vexpress-ca15.img
diff --git a/images/piggy.S b/images/piggy.S
new file mode 100644
index 0000000000..84396ae4ec
--- /dev/null
+++ b/images/piggy.S
@@ -0,0 +1,6 @@
+ .section .piggydata,#alloc
+ .globl input_data
+input_data:
+ .incbin "images/barebox.z"
+ .globl input_data_end
+input_data_end:
diff --git a/include/common.h b/include/common.h
index f52c7e430c..11d26cb3db 100644
--- a/include/common.h
+++ b/include/common.h
@@ -112,16 +112,6 @@ void shutdown_barebox(void);
#define PAGE_ALIGN(s) ALIGN(s, PAGE_SIZE)
#define PAGE_ALIGN_DOWN(x) ALIGN_DOWN(x, PAGE_SIZE)
-int memory_display(const void *addr, loff_t offs, unsigned nbytes, int size, int swab);
-
-#define DUMP_PREFIX_OFFSET 0
-static inline void print_hex_dump(const char *level, const char *prefix_str,
- int prefix_type, int rowsize, int groupsize,
- const void *buf, size_t len, bool ascii)
-{
- memory_display(buf, 0, len, 4, 0);
-}
-
int mem_parse_options(int argc, char *argv[], char *optstr, int *mode,
char **sourcefile, char **destfile, int *swab);
#define RW_BUF_SIZE (unsigned)4096
diff --git a/include/hab.h b/include/hab.h
index 78c2b865ba..abfce18736 100644
--- a/include/hab.h
+++ b/include/hab.h
@@ -21,6 +21,7 @@
#include <errno.h>
#ifdef CONFIG_HABV4
+extern bool habv4_need_rng_software_self_test;
int imx28_hab_get_status(void);
int imx6_hab_get_status(void);
#else
diff --git a/include/linux/clk.h b/include/linux/clk.h
index c6465b1c90..26da1114e8 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -325,6 +325,11 @@ struct device_node;
struct of_phandle_args;
struct of_device_id;
+struct clk_onecell_data {
+ struct clk **clks;
+ unsigned int clk_num;
+};
+
#if defined(CONFIG_COMMON_CLK_OF_PROVIDER)
#define CLK_OF_DECLARE(name, compat, fn) \
@@ -336,10 +341,6 @@ void of_clk_del_provider(struct device_node *np);
typedef int (*of_clk_init_cb_t)(struct device_node *);
-struct clk_onecell_data {
- struct clk **clks;
- unsigned int clk_num;
-};
struct clk *of_clk_src_onecell_get(struct of_phandle_args *clkspec, void *data);
struct clk *of_clk_src_simple_get(struct of_phandle_args *clkspec, void *data);
@@ -350,6 +351,10 @@ unsigned int of_clk_get_parent_count(struct device_node *np);
int of_clk_parent_fill(struct device_node *np, const char **parents,
unsigned int size);
int of_clk_init(struct device_node *root, const struct of_device_id *matches);
+int of_clk_add_provider(struct device_node *np,
+ struct clk *(*clk_src_get)(struct of_phandle_args *args,
+ void *data),
+ void *data);
#else
@@ -362,12 +367,16 @@ static const struct of_device_id __clk_of_table_##name \
__attribute__ ((unused)) = { .data = fn }
+static inline struct clk *of_clk_src_onecell_get(struct of_phandle_args *clkspec,
+ void *data)
+{
+ return ERR_PTR(-ENOENT);
+}
static inline struct clk *
of_clk_src_simple_get(struct of_phandle_args *clkspec, void *data)
{
return ERR_PTR(-ENOENT);
}
-
static inline struct clk *of_clk_get(struct device_node *np, int index)
{
return ERR_PTR(-ENOENT);
@@ -382,16 +391,19 @@ static inline int of_clk_init(struct device_node *root,
{
return 0;
}
+static inline int of_clk_add_provider(struct device_node *np,
+ struct clk *(*clk_src_get)(struct of_phandle_args *args,
+ void *data),
+ void *data)
+{
+ return 0;
+}
#endif
struct string_list;
int clk_name_complete(struct string_list *sl, char *instr);
-int of_clk_add_provider(struct device_node *np,
- struct clk *(*clk_src_get)(struct of_phandle_args *args,
- void *data),
- void *data);
char *of_clk_get_parent_name(struct device_node *np, unsigned int index);
#endif
diff --git a/include/linux/nvmem-consumer.h b/include/linux/nvmem-consumer.h
index 0ec2f05b97..32ea46e3bf 100644
--- a/include/linux/nvmem-consumer.h
+++ b/include/linux/nvmem-consumer.h
@@ -40,6 +40,10 @@ int nvmem_cell_write(struct nvmem_cell *cell, void *buf, size_t len);
/* direct nvmem device read/write interface */
struct nvmem_device *nvmem_device_get(struct device_d *dev, const char *name);
void nvmem_device_put(struct nvmem_device *nvmem);
+ssize_t nvmem_device_cell_read(struct nvmem_device *nvmem,
+ struct nvmem_cell_info *info, void *buf);
+int nvmem_device_cell_write(struct nvmem_device *nvmem,
+ struct nvmem_cell_info *info, void *buf);
#else
diff --git a/include/of_device.h b/include/of_device.h
index e84fc9c377..44c1c0f545 100644
--- a/include/of_device.h
+++ b/include/of_device.h
@@ -41,7 +41,7 @@ static inline const struct of_device_id *__of_match_device(
return NULL;
}
#define of_match_device(matches, dev) \
- __of_match_device(of_match_ptr(matches), (dev))
+ __of_match_device(matches, (dev))
#endif /* CONFIG_OF */
diff --git a/include/printk.h b/include/printk.h
index 4384fb85ea..aaad07552e 100644
--- a/include/printk.h
+++ b/include/printk.h
@@ -91,7 +91,7 @@ static inline int pr_print(int level, const char *format, ...)
#define pr_debug(fmt, arg...) __pr_printk(7, pr_fmt(fmt), ##arg)
#define debug(fmt, arg...) __pr_printk(7, pr_fmt(fmt), ##arg)
#define pr_vdebug(fmt, arg...) __pr_printk(8, pr_fmt(fmt), ##arg)
-#define pr_cont(fmt, arg...) __pr_printk(0, fmt, ##arg)
+#define pr_cont(fmt, arg...) __pr_printk(-1, fmt, ##arg)
#define printk_once(fmt, ...) \
({ \
@@ -103,6 +103,25 @@ static inline int pr_print(int level, const char *format, ...)
} \
})
+int memory_display(const void *addr, loff_t offs, unsigned nbytes, int size,
+ int swab);
+int __pr_memory_display(int level, const void *addr, loff_t offs, unsigned nbytes,
+ int size, int swab, const char *format, ...);
+
+#define pr_memory_display(level, addr, offs, nbytes, size, swab) \
+ ({ \
+ (level) <= LOGLEVEL ? __pr_memory_display((level), (addr), \
+ (offs), (nbytes), (size), (swab), pr_fmt("")) : 0; \
+ })
+
+#define DUMP_PREFIX_OFFSET 0
+static inline void print_hex_dump(const char *level, const char *prefix_str,
+ int prefix_type, int rowsize, int groupsize,
+ const void *buf, size_t len, bool ascii)
+{
+ memory_display(buf, 0, len, 4, 0);
+}
+
struct log_entry {
struct list_head list;
char *msg;
diff --git a/lib/bootstrap/disk.c b/lib/bootstrap/disk.c
index a55d5d77f4..fd016166e6 100644
--- a/lib/bootstrap/disk.c
+++ b/lib/bootstrap/disk.c
@@ -18,7 +18,7 @@ void* bootstrap_read_disk(const char *dev, const char *fstype)
{
int ret;
void *buf;
- int len;
+ size_t len;
const char *path = "/";
ret = mount(dev, fstype, path, NULL);
diff --git a/lib/getopt.c b/lib/getopt.c
index 847830c22b..55852ba133 100644
--- a/lib/getopt.c
+++ b/lib/getopt.c
@@ -13,6 +13,7 @@
* GNU General Public License for more details.
*
*/
+#define pr_fmt(fmt) "getopt: " fmt
#include <common.h>
#include <module.h>
diff --git a/lib/gui/lodepng.c b/lib/gui/lodepng.c
index ba21cd235f..78a34db473 100644
--- a/lib/gui/lodepng.c
+++ b/lib/gui/lodepng.c
@@ -74,34 +74,6 @@ static void myfree(void* ptr)
free(ptr);
}
-/*
-Declaration of the custom functions used if LODEPNG_COMPILE_ZLIB isn't defined
-or LODEPNG_CUSTOM_ZLIB_DECODER or LODEPNG_CUSTOM_ZLIB_ENCODER are enabled.
-
-In that case, you need to define these yourself (which you can do in one of your
-own source files) so that LodePNG can link to it.
-
-By default, this is not needed. If LODEPNG_COMPILE_ZLIB isn't defined, then only
-the two zlib related ones are needed.
-
-If needed, the functions must act as follows:
-*out must be NULL and *outsize must be 0 initially, and after the function is done,
-*out must point to the decompressed data, *outsize must be the size of it, and must
-be the size of the useful data in bytes, not the alloc size.
-*/
-unsigned lodepng_custom_zlib_decompress(unsigned char** out, size_t* outsize,
- const unsigned char* in, size_t insize,
- const LodePNGDecompressSettings* settings);
-unsigned lodepng_custom_zlib_compress(unsigned char** out, size_t* outsize,
- const unsigned char* in, size_t insize,
- const LodePNGCompressSettings* settings);
-unsigned lodepng_custom_inflate(unsigned char** out, size_t* outsize,
- const unsigned char* in, size_t insize,
- const LodePNGDecompressSettings* settings);
-unsigned lodepng_custom_deflate(unsigned char** out, size_t* outsize,
- const unsigned char* in, size_t insize,
- const LodePNGCompressSettings* settings);
-
/* ////////////////////////////////////////////////////////////////////////// */
/* ////////////////////////////////////////////////////////////////////////// */
/* // Tools for C, and common code for PNG and Zlib. // */
@@ -348,7 +320,7 @@ static void string_set(char** out, const char* in)
/* ////////////////////////////////////////////////////////////////////////// */
-unsigned lodepng_read32bitInt(const unsigned char* buffer)
+static unsigned lodepng_read32bitInt(const unsigned char* buffer)
{
return (buffer[0] << 24) | (buffer[1] << 16) | (buffer[2] << 8) | buffer[3];
}
@@ -1168,13 +1140,7 @@ static unsigned inflateHuffmanBlock(ucvector* out, const unsigned char* in, size
code_d = huffmanDecodeSymbol(in, bp, &tree_d, inbitlength);
if(code_d > 29)
{
- if(code_ll == (unsigned)(-1)) /*huffmanDecodeSymbol returns (unsigned)(-1) in case of error*/
- {
- /*return error code 10 or 11 depending on the situation that happened in huffmanDecodeSymbol
- (10=no endcode, 11=wrong jump outside of tree)*/
- error = (*bp) > inlength * 8 ? 10 : 11;
- }
- else error = 18; /*error: invalid distance code (30-31 are never used)*/
+ error = 18; /*error: invalid distance code (30-31 are never used)*/
break;
}
distance = DISTANCEBASE[code_d];
@@ -2668,11 +2634,6 @@ size_t lodepng_get_raw_size(unsigned w, unsigned h, const LodePNGColorMode* colo
return (w * h * lodepng_get_bpp(color) + 7) / 8;
}
-size_t lodepng_get_raw_size_lct(unsigned w, unsigned h, LodePNGColorType colortype, unsigned bitdepth)
-{
- return (w * h * lodepng_get_bpp_lct(colortype, bitdepth) + 7) / 8;
-}
-
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
static void LodePNGUnknownChunks_init(LodePNGInfo* info)
@@ -2906,13 +2867,6 @@ unsigned lodepng_info_copy(LodePNGInfo* dest, const LodePNGInfo* source)
return 0;
}
-void lodepng_info_swap(LodePNGInfo* a, LodePNGInfo* b)
-{
- LodePNGInfo temp = *a;
- *a = *b;
- *b = temp;
-}
-
/* ////////////////////////////////////////////////////////////////////////// */
/*index: bitgroup index, bits: bitgroup size(1, 2 or 4, in: bitgroup value, out: octet array to add bits to*/
diff --git a/lib/gui/lodepng.h b/lib/gui/lodepng.h
index 50d5303055..7f636f0a73 100644
--- a/lib/gui/lodepng.h
+++ b/lib/gui/lodepng.h
@@ -856,6 +856,34 @@ unsigned compress(std::vector<unsigned char>& out, const std::vector<unsigned ch
#endif /*LODEPNG_COMPILE_CPP*/
/*
+Declaration of the custom functions used if LODEPNG_COMPILE_ZLIB isn't defined
+or LODEPNG_CUSTOM_ZLIB_DECODER or LODEPNG_CUSTOM_ZLIB_ENCODER are enabled.
+
+In that case, you need to define these yourself (which you can do in one of your
+own source files) so that LodePNG can link to it.
+
+By default, this is not needed. If LODEPNG_COMPILE_ZLIB isn't defined, then only
+the two zlib related ones are needed.
+
+If needed, the functions must act as follows:
+*out must be NULL and *outsize must be 0 initially, and after the function is done,
+*out must point to the decompressed data, *outsize must be the size of it, and must
+be the size of the useful data in bytes, not the alloc size.
+*/
+unsigned lodepng_custom_zlib_decompress(unsigned char** out, size_t* outsize,
+ const unsigned char* in, size_t insize,
+ const LodePNGDecompressSettings* settings);
+unsigned lodepng_custom_zlib_compress(unsigned char** out, size_t* outsize,
+ const unsigned char* in, size_t insize,
+ const LodePNGCompressSettings* settings);
+unsigned lodepng_custom_inflate(unsigned char** out, size_t* outsize,
+ const unsigned char* in, size_t insize,
+ const LodePNGDecompressSettings* settings);
+unsigned lodepng_custom_deflate(unsigned char** out, size_t* outsize,
+ const unsigned char* in, size_t insize,
+ const LodePNGCompressSettings* settings);
+
+/*
TODO:
[.] test if there are no memory leaks or security exploits - done a lot but needs to be checked often
[.] check compatibility with vareous compilers - done but needs to be redone for every newer version
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 9a6f6e2298..4e17347a84 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1,16 +1,18 @@
#!/usr/bin/perl -w
+# SPDX-License-Identifier: GPL-2.0
+#
# (c) 2001, Dave Jones. (the file handling bit)
# (c) 2005, Joel Schopp <jschopp@austin.ibm.com> (the ugly bit)
# (c) 2007,2008, Andy Whitcroft <apw@uk.ibm.com> (new conditions, test suite)
# (c) 2008-2010 Andy Whitcroft <apw@canonical.com>
-# Licensed under the terms of the GNU GPL License version 2
+# (c) 2010-2018 Joe Perches <joe@perches.com>
use strict;
my $P = $0;
$P =~ s@.*/@@g;
-my $V = '0.31';
+my $V = '0.32';
use Getopt::Long qw(:config no_auto_abbrev);
@@ -26,9 +28,13 @@ my $check = 0;
my $summary = 1;
my $mailback = 0;
my $summary_file = 0;
+my $show_types = 0;
my $root;
my %debug;
+my %ignore_type = ();
+my @ignore = ();
my $help = 0;
+my $configuration_file = ".checkpatch.conf";
sub help {
my ($exitcode) = @_;
@@ -46,6 +52,8 @@ Options:
--terse one line per report
-f, --file treat FILE as regular source file
--subjective, --strict enable more subjective tests
+ --ignore TYPE(,TYPE2...) ignore various comma separated message types
+ --show-types show the message "types" in the output
--root=PATH PATH to the kernel tree root
--no-summary suppress the per-file summary
--mailback only produce a report in case of warnings/errors
@@ -63,6 +71,32 @@ EOM
exit($exitcode);
}
+my $conf = which_conf($configuration_file);
+if (-f $conf) {
+ my @conf_args;
+ open(my $conffile, '<', "$conf")
+ or warn "$P: Can't find a readable $configuration_file file $!\n";
+
+ while (<$conffile>) {
+ my $line = $_;
+
+ $line =~ s/\s*\n?$//g;
+ $line =~ s/^\s*//g;
+ $line =~ s/\s+/ /g;
+
+ next if ($line =~ m/^\s*#/);
+ next if ($line =~ m/^\s*$/);
+
+ my @words = split(" ", $line);
+ foreach my $word (@words) {
+ last if ($word =~ m/^#/);
+ push (@conf_args, $word);
+ }
+ }
+ close($conffile);
+ unshift(@ARGV, @conf_args) if @conf_args;
+}
+
GetOptions(
'q|quiet+' => \$quiet,
'tree!' => \$tree,
@@ -73,6 +107,8 @@ GetOptions(
'f|file!' => \$file,
'subjective!' => \$check,
'strict!' => \$check,
+ 'ignore=s' => \@ignore,
+ 'show-types!' => \$show_types,
'root=s' => \$root,
'summary!' => \$summary,
'mailback!' => \$mailback,
@@ -93,6 +129,19 @@ if ($#ARGV < 0) {
exit(1);
}
+@ignore = split(/,/, join(',',@ignore));
+foreach my $word (@ignore) {
+ $word =~ s/\s*\n?$//g;
+ $word =~ s/^\s*//g;
+ $word =~ s/\s+/ /g;
+ $word =~ tr/[a-z]/[A-Z]/;
+
+ next if ($word =~ m/^\s*#/);
+ next if ($word =~ m/^\s*$/);
+
+ $ignore_type{$word}++;
+}
+
my $dbg_values = 0;
my $dbg_possible = 0;
my $dbg_type = 0;
@@ -341,6 +390,18 @@ sub top_of_kernel_tree {
return 1;
}
+sub which_conf {
+ my ($conf) = @_;
+
+ foreach my $path (split(/:/, ".:$ENV{HOME}:.scripts")) {
+ if (-e "$path/$conf") {
+ return "$path/$conf";
+ }
+ }
+
+ return "";
+}
+
sub expand_tabs {
my ($str) = @_;
@@ -1086,12 +1147,21 @@ sub possible {
my $prefix = '';
+sub show_type {
+ return !defined $ignore_type{$_[0]};
+}
+
sub report {
- if (defined $tst_only && $_[0] !~ /\Q$tst_only\E/) {
+ if (!show_type($_[1]) ||
+ (defined $tst_only && $_[2] !~ /\Q$tst_only\E/)) {
return 0;
}
- my $line = $prefix . $_[0];
-
+ my $line;
+ if ($show_types) {
+ $line = "$prefix$_[0]:$_[1]: $_[2]\n";
+ } else {
+ $line = "$prefix$_[0]: $_[2]\n";
+ }
$line = (split('\n', $line))[0] . "\n" if ($terse);
push(our @report, $line);
@@ -1101,20 +1171,21 @@ sub report {
sub report_dump {
our @report;
}
+
sub ERROR {
- if (report("ERROR: $_[0]\n")) {
+ if (report("ERROR", $_[0], $_[1])) {
our $clean = 0;
our $cnt_error++;
}
}
sub WARN {
- if (report("WARNING: $_[0]\n")) {
+ if (report("WARNING", $_[0], $_[1])) {
our $clean = 0;
our $cnt_warn++;
}
}
sub CHK {
- if ($check && report("CHECK: $_[0]\n")) {
+ if ($check && report("CHECK", $_[0], $_[1])) {
our $clean = 0;
our $cnt_chk++;
}
@@ -1143,7 +1214,8 @@ sub check_absolute_file {
##print "prefix<$prefix>\n";
if ($prefix ne ".../") {
- WARN("use relative pathname instead of absolute in changelog text\n" . $herecurr);
+ WARN("USE_RELATIVE_PATH",
+ "use relative pathname instead of absolute in changelog text\n" . $herecurr);
}
}
@@ -1340,11 +1412,13 @@ sub process {
$p1_prefix = $1;
if (!$file && $tree && $p1_prefix ne '' &&
-e "$root/$p1_prefix") {
- WARN("patch prefix '$p1_prefix' exists, appears to be a -p0 patch\n");
+ WARN("PATCH_PREFIX",
+ "patch prefix '$p1_prefix' exists, appears to be a -p0 patch\n");
}
if ($realfile =~ m@^include/asm/@) {
- ERROR("do not modify files in include/asm, change architecture specific files in include/asm-<architecture>\n" . "$here$rawline\n");
+ ERROR("MODIFIED_INCLUDE_ASM",
+ "do not modify files in include/asm, change architecture specific files in include/asm-<architecture>\n" . "$here$rawline\n");
}
next;
}
@@ -1361,7 +1435,8 @@ sub process {
if ($line =~ /^new (file )?mode.*[7531]\d{0,2}$/) {
my $permhere = $here . "FILE: $realfile\n";
if ($realfile =~ /(Makefile|Kconfig|\.c|\.h|\.S|\.tmpl)$/) {
- ERROR("do not set execute permissions for source files\n" . $permhere);
+ ERROR("EXECUTE_PERMISSIONS",
+ "do not set execute permissions for source files\n" . $permhere);
}
}
@@ -1370,18 +1445,21 @@ sub process {
# This is a signoff, if ugly, so do not double report.
$signoff++;
if (!($line =~ /^\s*Signed-off-by:/)) {
- WARN("Signed-off-by: is the preferred form\n" .
+ WARN("BAD_SIGN_OFF",
+ "Signed-off-by: is the preferred form\n" .
$herecurr);
}
if ($line =~ /^\s*signed-off-by:\S/i) {
- WARN("space required after Signed-off-by:\n" .
+ WARN("BAD_SIGN_OFF",
+ "space required after Signed-off-by:\n" .
$herecurr);
}
}
# Check for wrappage within a valid hunk of the file
if ($realcnt != 0 && $line !~ m{^(?:\+|-| |\\ No newline|$)}) {
- ERROR("patch seems to be corrupt (line wrapped?)\n" .
+ ERROR("CORRUPTED_PATCH",
+ "patch seems to be corrupt (line wrapped?)\n" .
$herecurr) if (!$emitted_corrupt++);
}
@@ -1408,7 +1486,8 @@ sub process {
my $ptr = substr($blank, 0, length($utf8_prefix)) . "^";
my $hereptr = "$hereline$ptr\n";
- ERROR("Invalid UTF-8, patch and commit message should be encoded in UTF-8\n" . $hereptr);
+ ERROR("INVALID_UTF8",
+ "Invalid UTF-8, patch and commit message should be encoded in UTF-8\n" . $hereptr);
}
# ignore non-hunk lines and lines being removed
@@ -1417,11 +1496,13 @@ sub process {
#trailing whitespace
if ($line =~ /^\+.*\015/) {
my $herevet = "$here\n" . cat_vet($rawline) . "\n";
- ERROR("DOS line endings\n" . $herevet);
+ ERROR("DOS_LINE_ENDINGS",
+ "DOS line endings\n" . $herevet);
} elsif ($rawline =~ /^\+.*\S\s+$/ || $rawline =~ /^\+\s+$/) {
my $herevet = "$here\n" . cat_vet($rawline) . "\n";
- ERROR("trailing whitespace\n" . $herevet);
+ ERROR("TRAILING_WHITESPACE",
+ "trailing whitespace\n" . $herevet);
$rpt_cleaners = 1;
}
@@ -1462,7 +1543,8 @@ sub process {
}
$length++;
}
- WARN("please write a paragraph that describes the config symbol fully\n" . $herecurr) if ($is_end && $length < 4);
+ WARN("CONFIG_DESCRIPTION",
+ "please write a paragraph that describes the config symbol fully\n" . $herecurr) if ($is_end && $length < 4);
#print "is_end<$is_end> length<$length>\n";
}
@@ -1487,7 +1569,7 @@ sub process {
$compat3 =~ s/\,([a-z]*)[0-9]*\-/\,$1<\.\*>\-/;
`grep -Erq "$compat|$compat2|$compat3" $dt_path`;
if ( $? >> 8 ) {
- WARN(
+ WARN("UNDOCUMENTED_DT_STRING",
"DT compatible string \"$compat\" appears un-documented -- check $dt_path\n" . $herecurr);
}
@@ -1495,7 +1577,7 @@ sub process {
my $vendor = $1;
`grep -Eq "^$vendor\\b" $vp_file`;
if ( $? >> 8 ) {
- WARN(
+ WARN("UNDOCUMENTED_DT_STRING",
"DT compatible string vendor \"$vendor\" appears un-documented -- check $vp_file\n" . $herecurr);
}
}
@@ -1511,28 +1593,33 @@ sub process {
$line =~ /^\+\s*"[^"]*"\s*(?:\s*|,|\)\s*;)\s*$/) &&
$length > 80)
{
- WARN("line over 80 characters\n" . $herecurr);
+ WARN("LONG_LINE",
+ "line over 80 characters\n" . $herecurr);
}
# check for spaces before a quoted newline
if ($rawline =~ /^.*\".*\s\\n/) {
- WARN("unnecessary whitespace before a quoted newline\n" . $herecurr);
+ WARN("QUOTED_WHITESPACE_BEFORE_NEWLINE",
+ "unnecessary whitespace before a quoted newline\n" . $herecurr);
}
# check for adding lines without a newline.
if ($line =~ /^\+/ && defined $lines[$linenr] && $lines[$linenr] =~ /^\\ No newline at end of file/) {
- WARN("adding a line without newline at end of file\n" . $herecurr);
+ WARN("MISSING_EOF_NEWLINE",
+ "adding a line without newline at end of file\n" . $herecurr);
}
# Blackfin: use hi/lo macros
if ($realfile =~ m@arch/blackfin/.*\.S$@) {
if ($line =~ /\.[lL][[:space:]]*=.*&[[:space:]]*0x[fF][fF][fF][fF]/) {
my $herevet = "$here\n" . cat_vet($line) . "\n";
- ERROR("use the LO() macro, not (... & 0xFFFF)\n" . $herevet);
+ ERROR("LO_MACRO",
+ "use the LO() macro, not (... & 0xFFFF)\n" . $herevet);
}
if ($line =~ /\.[hH][[:space:]]*=.*>>[[:space:]]*16/) {
my $herevet = "$here\n" . cat_vet($line) . "\n";
- ERROR("use the HI() macro, not (... >> 16)\n" . $herevet);
+ ERROR("HI_MACRO",
+ "use the HI() macro, not (... >> 16)\n" . $herevet);
}
}
@@ -1544,14 +1631,16 @@ sub process {
if ($rawline =~ /^\+\s* \t\s*\S/ ||
$rawline =~ /^\+\s* \s*/) {
my $herevet = "$here\n" . cat_vet($rawline) . "\n";
- ERROR("code indent should use tabs where possible\n" . $herevet);
+ ERROR("CODE_INDENT",
+ "code indent should use tabs where possible\n" . $herevet);
$rpt_cleaners = 1;
}
# check for space before tabs.
if ($rawline =~ /^\+/ && $rawline =~ / \t/) {
my $herevet = "$here\n" . cat_vet($rawline) . "\n";
- WARN("please, no space before tabs\n" . $herevet);
+ WARN("SPACE_BEFORE_TAB",
+ "please, no space before tabs\n" . $herevet);
}
# check for spaces at the beginning of a line.
@@ -1561,7 +1650,8 @@ sub process {
# 3) hanging labels
if ($rawline =~ /^\+ / && $line !~ /\+ *(?:$;|#|$Ident:)/) {
my $herevet = "$here\n" . cat_vet($rawline) . "\n";
- WARN("please, no spaces at the start of a line\n" . $herevet);
+ WARN("LEADING_SPACE",
+ "please, no spaces at the start of a line\n" . $herevet);
}
# check we are in a valid C source file if not then ignore this hunk
@@ -1569,17 +1659,20 @@ sub process {
# check for RCS/CVS revision markers
if ($rawline =~ /^\+.*\$(Revision|Log|Id)(?:\$|)/) {
- WARN("CVS style keyword markers, these will _not_ be updated\n". $herecurr);
+ WARN("CVS_KEYWORD",
+ "CVS style keyword markers, these will _not_ be updated\n". $herecurr);
}
# Blackfin: don't use __builtin_bfin_[cs]sync
if ($line =~ /__builtin_bfin_csync/) {
my $herevet = "$here\n" . cat_vet($line) . "\n";
- ERROR("use the CSYNC() macro in asm/blackfin.h\n" . $herevet);
+ ERROR("CSYNC",
+ "use the CSYNC() macro in asm/blackfin.h\n" . $herevet);
}
if ($line =~ /__builtin_bfin_ssync/) {
my $herevet = "$here\n" . cat_vet($line) . "\n";
- ERROR("use the SSYNC() macro in asm/blackfin.h\n" . $herevet);
+ ERROR("SSYNC",
+ "use the SSYNC() macro in asm/blackfin.h\n" . $herevet);
}
# Check for potential 'bare' types
@@ -1668,7 +1761,8 @@ sub process {
}
}
if ($err ne '') {
- ERROR("switch and case should be at the same indent\n$hereline$err");
+ ERROR("SWITCH_CASE_INDENT_LEVEL",
+ "switch and case should be at the same indent\n$hereline$err");
}
}
@@ -1696,7 +1790,8 @@ sub process {
#print "pre<$pre_ctx>\nline<$line>\nctx<$ctx>\nnext<$lines[$ctx_ln - 1]>\n";
if ($ctx !~ /{\s*/ && defined($lines[$ctx_ln -1]) && $lines[$ctx_ln - 1] =~ /^\+\s*{/) {
- ERROR("that open brace { should be on the previous line\n" .
+ ERROR("OPEN_BRACE",
+ "that open brace { should be on the previous line\n" .
"$here\n$ctx\n$rawlines[$ctx_ln - 1]\n");
}
if ($level == 0 && $pre_ctx !~ /}\s*while\s*\($/ &&
@@ -1705,7 +1800,8 @@ sub process {
{
my ($nlength, $nindent) = line_stats($lines[$ctx_ln - 1]);
if ($nindent > $indent) {
- WARN("trailing semicolon indicates no statements, indent implies otherwise\n" .
+ WARN("TRAILING_SEMICOLON",
+ "trailing semicolon indicates no statements, indent implies otherwise\n" .
"$here\n$ctx\n$rawlines[$ctx_ln - 1]\n");
}
}
@@ -1793,7 +1889,8 @@ sub process {
if ($check && (($sindent % 8) != 0 ||
($sindent <= $indent && $s ne ''))) {
- WARN("suspect code indent for conditional statements ($indent, $sindent)\n" . $herecurr . "$stat_real\n");
+ WARN("SUSPECT_CODE_INDENT",
+ "suspect code indent for conditional statements ($indent, $sindent)\n" . $herecurr . "$stat_real\n");
}
}
@@ -1816,18 +1913,22 @@ sub process {
# TEST: allow direct testing of the type matcher.
if ($dbg_type) {
if ($line =~ /^.\s*$Declare\s*$/) {
- ERROR("TEST: is type\n" . $herecurr);
+ ERROR("TEST_TYPE",
+ "TEST: is type\n" . $herecurr);
} elsif ($dbg_type > 1 && $line =~ /^.+($Declare)/) {
- ERROR("TEST: is not type ($1 is)\n". $herecurr);
+ ERROR("TEST_NOT_TYPE",
+ "TEST: is not type ($1 is)\n". $herecurr);
}
next;
}
# TEST: allow direct testing of the attribute matcher.
if ($dbg_attr) {
if ($line =~ /^.\s*$Modifier\s*$/) {
- ERROR("TEST: is attr\n" . $herecurr);
+ ERROR("TEST_ATTR",
+ "TEST: is attr\n" . $herecurr);
} elsif ($dbg_attr > 1 && $line =~ /^.+($Modifier)/) {
- ERROR("TEST: is not attr ($1 is)\n". $herecurr);
+ ERROR("TEST_NOT_ATTR",
+ "TEST: is not attr ($1 is)\n". $herecurr);
}
next;
}
@@ -1835,7 +1936,8 @@ sub process {
# check for initialisation to aggregates open brace on the next line
if ($line =~ /^.\s*{/ &&
$prevline =~ /(?:^|[^=])=\s*$/) {
- ERROR("that open brace { should be on the previous line\n" . $hereprev);
+ ERROR("OPEN_BRACE",
+ "that open brace { should be on the previous line\n" . $hereprev);
}
#
@@ -1846,14 +1948,16 @@ sub process {
if ($rawline =~ m{^.\s*\#\s*include\s+[<"](.*)[">]}) {
my $path = $1;
if ($path =~ m{//}) {
- ERROR("malformed #include filename\n" .
+ ERROR("MALFORMED_INCLUDE",
+ "malformed #include filename\n" .
$herecurr);
}
}
# no C99 // comments
if ($line =~ m{//}) {
- ERROR("do not use C99 // comments\n" . $herecurr);
+ ERROR("C99_COMMENTS",
+ "do not use C99 // comments\n" . $herecurr);
}
# Remove C99 comments.
$line =~ s@//.*@@;
@@ -1900,35 +2004,41 @@ sub process {
}
if (defined $suppress_export{$linenr} &&
$suppress_export{$linenr} == 2) {
- WARN("EXPORT_SYMBOL(foo); should immediately follow its function/variable\n" . $herecurr);
+ WARN("EXPORT_SYMBOL",
+ "EXPORT_SYMBOL(foo); should immediately follow its function/variable\n" . $herecurr);
}
# check for global initialisers.
if ($line =~ /^.$Type\s*$Ident\s*(?:\s+$Modifier)*\s*=\s*(0|NULL|false)\s*;/) {
- ERROR("do not initialise globals to 0 or NULL\n" .
+ ERROR("GLOBAL_INITIALISERS",
+ "do not initialise globals to 0 or NULL\n" .
$herecurr);
}
# check for static initialisers.
if ($line =~ /\bstatic\s.*=\s*(0|NULL|false)\s*;/) {
- ERROR("do not initialise statics to 0 or NULL\n" .
+ ERROR("INITIALISED_STATIC",
+ "do not initialise statics to 0 or NULL\n" .
$herecurr);
}
# check for static const char * arrays.
if ($line =~ /\bstatic\s+const\s+char\s*\*\s*(\w+)\s*\[\s*\]\s*=\s*/) {
- WARN("static const char * array should probably be static const char * const\n" .
+ WARN("STATIC_CONST_CHAR_ARRAY",
+ "static const char * array should probably be static const char * const\n" .
$herecurr);
}
# check for static char foo[] = "bar" declarations.
if ($line =~ /\bstatic\s+char\s+(\w+)\s*\[\s*\]\s*=\s*"/) {
- WARN("static char array declaration should probably be static const char\n" .
+ WARN("STATIC_CONST_CHAR_ARRAY",
+ "static char array declaration should probably be static const char\n" .
$herecurr);
}
# check for declarations of struct pci_device_id
if ($line =~ /\bstruct\s+pci_device_id\s+\w+\s*\[\s*\]\s*\=\s*\{/) {
- WARN("Use DEFINE_PCI_DEVICE_TABLE for struct pci_device_id\n" . $herecurr);
+ WARN("DEFINE_PCI_DEVICE_TABLE",
+ "Use DEFINE_PCI_DEVICE_TABLE for struct pci_device_id\n" . $herecurr);
}
# check for new typedefs, only function parameters and sparse annotations
@@ -1938,7 +2048,8 @@ sub process {
$line !~ /\btypedef\s+$Type\s+$Ident\s*\(/ &&
$line !~ /\b$typeTypedefs\b/ &&
$line !~ /\b__bitwise(?:__|)\b/) {
- WARN("do not add new typedefs\n" . $herecurr);
+ WARN("NEW_TYPEDEFS",
+ "do not add new typedefs\n" . $herecurr);
}
# * goes on variable not on type
@@ -1956,7 +2067,8 @@ sub process {
#print "from<$from> to<$to>\n";
if ($from ne $to) {
- ERROR("\"(foo$from)\" should be \"(foo$to)\"\n" . $herecurr);
+ ERROR("POINTER_LOCATION",
+ "\"(foo$from)\" should be \"(foo$to)\"\n" . $herecurr);
}
} elsif ($line =~ m{\b$NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)($Ident)}) {
my ($from, $to, $ident) = ($1, $1, $2);
@@ -1973,7 +2085,8 @@ sub process {
#print "from<$from> to<$to> ident<$ident>\n";
if ($from ne $to && $ident !~ /^$Modifier$/) {
- ERROR("\"foo${from}bar\" should be \"foo${to}bar\"\n" . $herecurr);
+ ERROR("POINTER_LOCATION",
+ "\"foo${from}bar\" should be \"foo${to}bar\"\n" . $herecurr);
}
}
@@ -1985,7 +2098,8 @@ sub process {
# }
if ($line =~ /\bLINUX_VERSION_CODE\b/) {
- WARN("LINUX_VERSION_CODE should be avoided, code should be for the version to which it is merged\n" . $herecurr);
+ WARN("LINUX_VERSION_CODE",
+ "LINUX_VERSION_CODE should be avoided, code should be for the version to which it is merged\n" . $herecurr);
}
# printk should use KERN_* levels. Note that follow on printk's on the
@@ -2007,7 +2121,8 @@ sub process {
}
}
if ($ok == 0) {
- WARN("printk() should include KERN_ facility level\n" . $herecurr);
+ WARN("PRINTK_WITHOUT_KERN_LEVEL",
+ "printk() should include KERN_ facility level\n" . $herecurr);
}
}
@@ -2015,18 +2130,21 @@ sub process {
# or if closed on same line
if (($line=~/$Type\s*$Ident\(.*\).*\s\{/) and
!($line=~/\#\s*define.*do\s\{/) and !($line=~/}/)) {
- ERROR("open brace '{' following function declarations go on the next line\n" . $herecurr);
+ ERROR("OPEN_BRACE",
+ "open brace '{' following function declarations go on the next line\n" . $herecurr);
}
# open braces for enum, union and struct go on the same line.
if ($line =~ /^.\s*{/ &&
$prevline =~ /^.\s*(?:typedef\s+)?(enum|union|struct)(?:\s+$Ident)?\s*$/) {
- ERROR("open brace '{' following $1 go on the same line\n" . $hereprev);
+ ERROR("OPEN_BRACE",
+ "open brace '{' following $1 go on the same line\n" . $hereprev);
}
# missing space after union, struct or enum definition
if ($line =~ /^.\s*(?:typedef\s+)?(enum|union|struct)(?:\s+$Ident)?(?:\s+$Ident)?[=\{]/) {
- WARN("missing space after $1 definition\n" . $herecurr);
+ WARN("SPACING",
+ "missing space after $1 definition\n" . $herecurr);
}
# check for spacing round square brackets; allowed:
@@ -2038,7 +2156,8 @@ sub process {
if ($prefix !~ /$Type\s+$/ &&
($where != 0 || $prefix !~ /^.\s+$/) &&
$prefix !~ /{\s+$/) {
- ERROR("space prohibited before open square bracket '['\n" . $herecurr);
+ ERROR("BRACKET_SPACE",
+ "space prohibited before open square bracket '['\n" . $herecurr);
}
}
@@ -2069,7 +2188,8 @@ sub process {
} elsif ($ctx =~ /$Type$/) {
} else {
- WARN("space prohibited between function name and open parenthesis '('\n" . $herecurr);
+ WARN("SPACING",
+ "space prohibited between function name and open parenthesis '('\n" . $herecurr);
}
}
# Check operator spacing.
@@ -2143,7 +2263,8 @@ sub process {
} elsif ($op eq ';') {
if ($ctx !~ /.x[WEBC]/ &&
$cc !~ /^\\/ && $cc !~ /^;/) {
- ERROR("space required after that '$op' $at\n" . $hereptr);
+ ERROR("SPACING",
+ "space required after that '$op' $at\n" . $hereptr);
}
# // is a comment
@@ -2154,13 +2275,15 @@ sub process {
# : when part of a bitfield
} elsif ($op eq '->' || $opv eq ':B') {
if ($ctx =~ /Wx.|.xW/) {
- ERROR("spaces prohibited around that '$op' $at\n" . $hereptr);
+ ERROR("SPACING",
+ "spaces prohibited around that '$op' $at\n" . $hereptr);
}
# , must have a space on the right.
} elsif ($op eq ',') {
if ($ctx !~ /.x[WEC]/ && $cc !~ /^}/) {
- ERROR("space required after that '$op' $at\n" . $hereptr);
+ ERROR("SPACING",
+ "space required after that '$op' $at\n" . $hereptr);
}
# '*' as part of a type definition -- reported already.
@@ -2174,26 +2297,31 @@ sub process {
$opv eq '*U' || $opv eq '-U' ||
$opv eq '&U' || $opv eq '&&U') {
if ($ctx !~ /[WEBC]x./ && $ca !~ /(?:\)|!|~|\*|-|\&|\||\+\+|\-\-|\{)$/) {
- ERROR("space required before that '$op' $at\n" . $hereptr);
+ ERROR("SPACING",
+ "space required before that '$op' $at\n" . $hereptr);
}
if ($op eq '*' && $cc =~/\s*$Modifier\b/) {
# A unary '*' may be const
} elsif ($ctx =~ /.xW/) {
- ERROR("space prohibited after that '$op' $at\n" . $hereptr);
+ ERROR("SPACING",
+ "space prohibited after that '$op' $at\n" . $hereptr);
}
# unary ++ and unary -- are allowed no space on one side.
} elsif ($op eq '++' or $op eq '--') {
if ($ctx !~ /[WEOBC]x[^W]/ && $ctx !~ /[^W]x[WOBEC]/) {
- ERROR("space required one side of that '$op' $at\n" . $hereptr);
+ ERROR("SPACING",
+ "space required one side of that '$op' $at\n" . $hereptr);
}
if ($ctx =~ /Wx[BE]/ ||
($ctx =~ /Wx./ && $cc =~ /^;/)) {
- ERROR("space prohibited before that '$op' $at\n" . $hereptr);
+ ERROR("SPACING",
+ "space prohibited before that '$op' $at\n" . $hereptr);
}
if ($ctx =~ /ExW/) {
- ERROR("space prohibited after that '$op' $at\n" . $hereptr);
+ ERROR("SPACING",
+ "space prohibited after that '$op' $at\n" . $hereptr);
}
@@ -2205,7 +2333,8 @@ sub process {
$op eq '%')
{
if ($ctx =~ /Wx[^WCE]|[^WCE]xW/) {
- ERROR("need consistent spacing around '$op' $at\n" .
+ ERROR("SPACING",
+ "need consistent spacing around '$op' $at\n" .
$hereptr);
}
@@ -2213,7 +2342,8 @@ sub process {
# terminating a case value or a label.
} elsif ($opv eq ':C' || $opv eq ':L') {
if ($ctx =~ /Wx./) {
- ERROR("space prohibited before that '$op' $at\n" . $hereptr);
+ ERROR("SPACING",
+ "space prohibited before that '$op' $at\n" . $hereptr);
}
# All the others need spaces both sides.
@@ -2236,7 +2366,8 @@ sub process {
}
if ($ok == 0) {
- ERROR("spaces required around that '$op' $at\n" . $hereptr);
+ ERROR("SPACING",
+ "spaces required around that '$op' $at\n" . $hereptr);
}
}
$off += length($elements[$n + 1]);
@@ -2245,7 +2376,8 @@ sub process {
# check for multiple assignments
if ($line =~ /^.\s*$Lval\s*=\s*$Lval\s*=(?!=)/) {
- CHK("multiple assignments should be avoided\n" . $herecurr);
+ CHK("MULTIPLE_ASSIGNMENTS",
+ "multiple assignments should be avoided\n" . $herecurr);
}
## # check for multiple declarations, allowing for a function declaration
@@ -2259,45 +2391,53 @@ sub process {
## while ($ln =~ s/\([^\(\)]*\)//g) {
## }
## if ($ln =~ /,/) {
-## WARN("declaring multiple variables together should be avoided\n" . $herecurr);
+## WARN("MULTIPLE_DECLARATION",
+## "declaring multiple variables together should be avoided\n" . $herecurr);
## }
## }
#need space before brace following if, while, etc
if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\)\{/) ||
$line =~ /do\{/) {
- ERROR("space required before the open brace '{'\n" . $herecurr);
+ ERROR("SPACING",
+ "space required before the open brace '{'\n" . $herecurr);
}
# closing brace should have a space following it when it has anything
# on the line
if ($line =~ /}(?!(?:,|;|\)))\S/) {
- ERROR("space required after that close brace '}'\n" . $herecurr);
+ ERROR("SPACING",
+ "space required after that close brace '}'\n" . $herecurr);
}
# check spacing on square brackets
if ($line =~ /\[\s/ && $line !~ /\[\s*$/) {
- ERROR("space prohibited after that open square bracket '['\n" . $herecurr);
+ ERROR("SPACING",
+ "space prohibited after that open square bracket '['\n" . $herecurr);
}
if ($line =~ /\s\]/) {
- ERROR("space prohibited before that close square bracket ']'\n" . $herecurr);
+ ERROR("SPACING",
+ "space prohibited before that close square bracket ']'\n" . $herecurr);
}
# check spacing on parentheses
if ($line =~ /\(\s/ && $line !~ /\(\s*(?:\\)?$/ &&
$line !~ /for\s*\(\s+;/) {
- ERROR("space prohibited after that open parenthesis '('\n" . $herecurr);
+ ERROR("SPACING",
+ "space prohibited after that open parenthesis '('\n" . $herecurr);
}
if ($line =~ /(\s+)\)/ && $line !~ /^.\s*\)/ &&
$line !~ /for\s*\(.*;\s+\)/ &&
$line !~ /:\s+\)/) {
- ERROR("space prohibited before that close parenthesis ')'\n" . $herecurr);
+ ERROR("SPACING",
+ "space prohibited before that close parenthesis ')'\n" . $herecurr);
}
#goto labels aren't indented, allow a single space however
if ($line=~/^.\s+[A-Za-z\d_]+:(?![0-9]+)/ and
!($line=~/^. [A-Za-z\d_]+:/) and !($line=~/^.\s+default:/)) {
- WARN("labels should not be indented\n" . $herecurr);
+ WARN("INDENTED_LABEL",
+ "labels should not be indented\n" . $herecurr);
}
# Return is not a function.
@@ -2316,23 +2456,26 @@ sub process {
}
#print "value<$value>\n";
if ($value =~ /^\s*(?:$Ident|-?$Constant)\s*$/) {
- ERROR("return is not a function, parentheses are not required\n" . $herecurr);
+ ERROR("RETURN_PARENTHESES",
+ "return is not a function, parentheses are not required\n" . $herecurr);
} elsif ($spacing !~ /\s+/) {
- ERROR("space required before the open parenthesis '('\n" . $herecurr);
+ ERROR("SPACING",
+ "space required before the open parenthesis '('\n" . $herecurr);
}
}
# Return of what appears to be an errno should normally be -'ve
if ($line =~ /^.\s*return\s*(E[A-Z]*)\s*;/) {
my $name = $1;
if ($name ne 'EOF' && $name ne 'ERROR') {
- WARN("return of an errno should typically be -ve (return -$1)\n" . $herecurr);
+ WARN("USE_NEGATIVE_ERRNO",
+ "return of an errno should typically be -ve (return -$1)\n" . $herecurr);
}
}
# Need a space before open parenthesis after if, while etc
if ($line=~/\b(if|while|for|switch)\(/) {
- ERROR("space required before the open parenthesis '('\n" . $herecurr);
+ ERROR("SPACING", "space required before the open parenthesis '('\n" . $herecurr);
}
# Check for illegal assignment in if conditional -- and check for trailing
@@ -2360,7 +2503,8 @@ sub process {
my ($s, $c) = ($stat, $cond);
if ($c =~ /\bif\s*\(.*[^<>!=]=[^=].*/s) {
- ERROR("do not use assignment in if condition\n" . $herecurr);
+ ERROR("ASSIGN_IN_IF",
+ "do not use assignment in if condition\n" . $herecurr);
}
# Find out what is on the end of the line after the
@@ -2382,7 +2526,8 @@ sub process {
$stat_real = "[...]\n$stat_real";
}
- ERROR("trailing statements should be on next line\n" . $herecurr . $stat_real);
+ ERROR("TRAILING_STATEMENTS",
+ "trailing statements should be on next line\n" . $herecurr . $stat_real);
}
}
@@ -2398,7 +2543,8 @@ sub process {
(?:\&\&|\|\||\)|\])
)/x)
{
- WARN("boolean test with hexadecimal, perhaps just 1 \& or \|?\n" . $herecurr);
+ WARN("HEXADECIMAL_BOOLEAN_TEST",
+ "boolean test with hexadecimal, perhaps just 1 \& or \|?\n" . $herecurr);
}
# if and else should not have general statements after it
@@ -2406,12 +2552,14 @@ sub process {
my $s = $1;
$s =~ s/$;//g; # Remove any comments
if ($s !~ /^\s*(?:\sif|(?:{|)\s*\\?\s*$)/) {
- ERROR("trailing statements should be on next line\n" . $herecurr);
+ ERROR("TRAILING_STATEMENTS",
+ "trailing statements should be on next line\n" . $herecurr);
}
}
# if should not continue a brace
if ($line =~ /}\s*if\b/) {
- ERROR("trailing statements should be on next line\n" .
+ ERROR("TRAILING_STATEMENTS",
+ "trailing statements should be on next line\n" .
$herecurr);
}
# case and default should not have general statements after them
@@ -2421,14 +2569,16 @@ sub process {
\s*return\s+
)/xg)
{
- ERROR("trailing statements should be on next line\n" . $herecurr);
+ ERROR("TRAILING_STATEMENTS",
+ "trailing statements should be on next line\n" . $herecurr);
}
# Check for }<nl>else {, these must be at the same
# indent level to be relevant to each other.
if ($prevline=~/}\s*$/ and $line=~/^.\s*else\s*/ and
$previndent == $indent) {
- ERROR("else should follow close brace '}'\n" . $hereprev);
+ ERROR("ELSE_AFTER_BRACE",
+ "else should follow close brace '}'\n" . $hereprev);
}
if ($prevline=~/}\s*$/ and $line=~/^.\s*while\s*/ and
@@ -2441,7 +2591,8 @@ sub process {
$s =~ s/\n.*//g;
if ($s =~ /^\s*;/) {
- ERROR("while should follow close brace '}'\n" . $hereprev);
+ ERROR("WHILE_AFTER_BRACE",
+ "while should follow close brace '}'\n" . $hereprev);
}
}
@@ -2454,7 +2605,8 @@ sub process {
#no spaces allowed after \ in define
if ($line=~/\#\s*define.*\\\s$/) {
- WARN("Whitepspace after \\ makes next lines useless\n" . $herecurr);
+ WARN("WHITESPACE_AFTER_LINE_CONTINUATION",
+ "Whitepspace after \\ makes next lines useless\n" . $herecurr);
}
#warn if <asm/foo.h> is #included and <linux/foo.h> is available (uses RAW line)
@@ -2466,9 +2618,11 @@ sub process {
$1 !~ /$allowed_asm_includes/)
{
if ($realfile =~ m{^arch/}) {
- CHK("Consider using #include <linux/$file> instead of <asm/$file>\n" . $herecurr);
+ CHK("ARCH_INCLUDE_LINUX",
+ "Consider using #include <linux/$file> instead of <asm/$file>\n" . $herecurr);
} else {
- WARN("Use #include <linux/$file> instead of <asm/$file>\n" . $herecurr);
+ WARN("INCLUDE_LINUX",
+ "Use #include <linux/$file> instead of <asm/$file>\n" . $herecurr);
}
}
}
@@ -2552,7 +2706,8 @@ sub process {
if ($rest !~ /while\s*\(/ &&
$dstat !~ /$exceptions/)
{
- ERROR("Macros with multiple statements should be enclosed in a do - while loop\n" . "$here\n$ctx\n");
+ ERROR("MULTISTATEMENT_MACRO_USE_DO_WHILE",
+ "Macros with multiple statements should be enclosed in a do - while loop\n" . "$here\n$ctx\n");
}
} elsif ($ctx !~ /;/) {
@@ -2562,7 +2717,8 @@ sub process {
$dstat !~ /^\.$Ident\s*=/ &&
$dstat =~ /$Operators/)
{
- ERROR("Macros with complex values should be enclosed in parenthesis\n" . "$here\n$ctx\n");
+ ERROR("COMPLEX_MACRO",
+ "Macros with complex values should be enclosed in parenthesis\n" . "$here\n$ctx\n");
}
}
}
@@ -2573,7 +2729,8 @@ sub process {
# ALIGN(...)
# VMLINUX_SYMBOL(...)
if ($realfile eq 'vmlinux.lds.h' && $line =~ /(?:(?:^|\s)$Ident\s*=|=\s*$Ident(?:\s|$))/) {
- WARN("vmlinux.lds.h needs VMLINUX_SYMBOL() around C-visible symbols\n" . $herecurr);
+ WARN("MISSING_VMLINUX_SYMBOL",
+ "vmlinux.lds.h needs VMLINUX_SYMBOL() around C-visible symbols\n" . $herecurr);
}
# check for redundant bracing round if etc
@@ -2621,7 +2778,8 @@ sub process {
}
}
if ($seen && !$allowed) {
- WARN("braces {} are not necessary for any arm of this statement\n" . $herectx);
+ WARN("BRACES",
+ "braces {} are not necessary for any arm of this statement\n" . $herectx);
}
}
}
@@ -2675,53 +2833,60 @@ sub process {
$herectx .= raw_line($linenr, $n) . "\n";;
}
- WARN("braces {} are not necessary for single statement blocks\n" . $herectx);
+ WARN("BRACES",
+ "braces {} are not necessary for single statement blocks\n" . $herectx);
}
}
# don't include deprecated include files (uses RAW line)
for my $inc (@dep_includes) {
if ($rawline =~ m@^.\s*\#\s*include\s*\<$inc>@) {
- ERROR("Don't use <$inc>: see Documentation/feature-removal-schedule.txt\n" . $herecurr);
+ ERROR("DEPRECATED_INCLUDE",
+ "Don't use <$inc>: see Documentation/feature-removal-schedule.txt\n" . $herecurr);
}
}
# don't use deprecated functions
for my $func (@dep_functions) {
if ($line =~ /\b$func\b/) {
- ERROR("Don't use $func(): see Documentation/feature-removal-schedule.txt\n" . $herecurr);
+ ERROR("DEPRECATED_FUNCTION",
+ "Don't use $func(): see Documentation/feature-removal-schedule.txt\n" . $herecurr);
}
}
# no volatiles please
my $asm_volatile = qr{\b(__asm__|asm)\s+(__volatile__|volatile)\b};
if ($line =~ /\bvolatile\b/ && $line !~ /$asm_volatile/) {
- WARN("Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt\n" . $herecurr);
- }
-
-# SPIN_LOCK_UNLOCKED & RW_LOCK_UNLOCKED are deprecated
- if ($line =~ /\b(SPIN_LOCK_UNLOCKED|RW_LOCK_UNLOCKED)/) {
- ERROR("Use of $1 is deprecated: see Documentation/spinlocks.txt\n" . $herecurr);
+ WARN("VOLATILE",
+ "Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt\n" . $herecurr);
}
# warn about #if 0
if ($line =~ /^.\s*\#\s*if\s+0\b/) {
- CHK("if this code is redundant consider removing it\n" .
- $herecurr);
+ WARN("IF_0",
+ "Consider removing the code enclosed by this #if 0 and its #endif\n" . $herecurr);
+ }
+
+# warn about #if 1
+ if ($line =~ /^.\s*\#\s*if\s+1\b/) {
+ WARN("IF_1",
+ "Consider removing the #if 1 and its #endif\n" . $herecurr);
}
# check for needless kfree() checks
if ($prevline =~ /\bif\s*\(([^\)]*)\)/) {
my $expr = $1;
if ($line =~ /\bkfree\(\Q$expr\E\);/) {
- WARN("kfree(NULL) is safe this check is probably not required\n" . $hereprev);
+ WARN("NEEDLESS_KFREE",
+ "kfree(NULL) is safe this check is probably not required\n" . $hereprev);
}
}
# check for needless usb_free_urb() checks
if ($prevline =~ /\bif\s*\(([^\)]*)\)/) {
my $expr = $1;
if ($line =~ /\busb_free_urb\(\Q$expr\E\);/) {
- WARN("usb_free_urb(NULL) is safe this check is probably not required\n" . $hereprev);
+ WARN("NEEDLESS_USB_FREE_URB",
+ "usb_free_urb(NULL) is safe this check is probably not required\n" . $hereprev);
}
}
@@ -2729,14 +2894,16 @@ sub process {
if ($line =~ /\budelay\s*\(\s*(\w+)\s*\)/) {
# ignore udelay's < 10, however
if (! (($1 =~ /(\d+)/) && ($1 < 10)) ) {
- CHK("usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt\n" . $line);
+ CHK("USLEEP_RANGE",
+ "usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt\n" . $line);
}
}
# warn about unexpectedly long msleep's
if ($line =~ /\bmsleep\s*\((\d+)\);/) {
if ($1 < 20) {
- WARN("msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt\n" . $line);
+ WARN("MSLEEP",
+ "msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt\n" . $line);
}
}
@@ -2749,7 +2916,8 @@ sub process {
# warn about spacing in #ifdefs
if ($line =~ /^.\s*\#\s*(ifdef|ifndef|elif)\s\s+/) {
- ERROR("exactly one space required after that #$1\n" . $herecurr);
+ ERROR("SPACING",
+ "exactly one space required after that #$1\n" . $herecurr);
}
# check for spinlock_t definitions without a comment.
@@ -2757,40 +2925,69 @@ sub process {
$line =~ /^.\s*(DEFINE_MUTEX)\s*\(/) {
my $which = $1;
if (!ctx_has_comment($first_line, $linenr)) {
- CHK("$1 definition without comment\n" . $herecurr);
+ CHK("UNCOMMENTED_DEFINITION",
+ "$1 definition without comment\n" . $herecurr);
}
}
# check for memory barriers without a comment.
if ($line =~ /\b(mb|rmb|wmb|read_barrier_depends|smp_mb|smp_rmb|smp_wmb|smp_read_barrier_depends)\(/) {
if (!ctx_has_comment($first_line, $linenr)) {
- CHK("memory barrier without comment\n" . $herecurr);
+ CHK("MEMORY_BARRIER",
+ "memory barrier without comment\n" . $herecurr);
}
}
# check of hardware specific defines
if ($line =~ m@^.\s*\#\s*if.*\b(__i386__|__powerpc64__|__sun__|__s390x__)\b@ && $realfile !~ m@include/asm-@) {
- CHK("architecture specific defines should be avoided\n" . $herecurr);
+ CHK("ARCH_DEFINES",
+ "architecture specific defines should be avoided\n" . $herecurr);
}
# Check that the storage class is at the beginning of a declaration
if ($line =~ /\b$Storage\b/ && $line !~ /^.\s*$Storage\b/) {
- WARN("storage class should be at the beginning of the declaration\n" . $herecurr)
+ WARN("STORAGE_CLASS",
+ "storage class should be at the beginning of the declaration\n" . $herecurr)
}
# check the location of the inline attribute, that it is between
# storage class and type.
if ($line =~ /\b$Type\s+$Inline\b/ ||
$line =~ /\b$Inline\s+$Storage\b/) {
- ERROR("inline keyword should sit between storage class and type\n" . $herecurr);
+ ERROR("INLINE_LOCATION",
+ "inline keyword should sit between storage class and type\n" . $herecurr);
}
# Check for __inline__ and __inline, prefer inline
if ($line =~ /\b(__inline__|__inline)\b/) {
- WARN("plain inline is preferred over $1\n" . $herecurr);
+ WARN("INLINE",
+ "plain inline is preferred over $1\n" . $herecurr);
}
# check for sizeof(&)
if ($line =~ /\bsizeof\s*\(\s*\&/) {
- WARN("sizeof(& should be avoided\n" . $herecurr);
+ WARN("SIZEOF_ADDRESS",
+ "sizeof(& should be avoided\n" . $herecurr);
+ }
+
+# Check for misused memsets
+ if (defined $stat && $stat =~ /\bmemset\s*\((.*)\)/s) {
+ my $args = $1;
+
+ # Flatten any parentheses and braces
+ while ($args =~ s/\([^\(\)]*\)/10/s ||
+ $args =~ s/\{[^\{\}]*\}/10/s ||
+ $args =~ s/\[[^\[\]]*\]/10/s)
+ {
+ }
+ # Extract the simplified arguments.
+ my ($ms_addr, $ms_val, $ms_size) =
+ split(/\s*,\s*/, $args);
+ if ($ms_size =~ /^(0x|)0$/i) {
+ ERROR("MEMSET",
+ "memset size is 3rd argument, not the second.\n" . $herecurr);
+ } elsif ($ms_size =~ /^(0x|)1$/i) {
+ WARN("MEMSET",
+ "single byte memset is suspicious. Swapped 2nd/3rd argument?\n" . $herecurr);
+ }
}
# check for new externs in .c files.
@@ -2807,17 +3004,20 @@ sub process {
if ($s =~ /^\s*;/ &&
$function_name ne 'uninitialized_var')
{
- WARN("externs should be avoided in .c files\n" . $herecurr);
+ WARN("AVOID_EXTERNS",
+ "externs should be avoided in .c files\n" . $herecurr);
}
if ($paren_space =~ /\n/) {
- WARN("arguments for function declarations should follow identifier\n" . $herecurr);
+ WARN("FUNCTION_ARGUMENTS",
+ "arguments for function declarations should follow identifier\n" . $herecurr);
}
} elsif ($realfile =~ /\.c$/ && defined $stat &&
$stat =~ /^.\s*extern\s+/)
{
- WARN("externs should be avoided in .c files\n" . $herecurr);
+ WARN("AVOID_EXTERNS",
+ "externs should be avoided in .c files\n" . $herecurr);
}
# checks for new __setup's
@@ -2825,32 +3025,38 @@ sub process {
my $name = $1;
if (!grep(/$name/, @setup_docs)) {
- CHK("__setup appears un-documented -- check Documentation/kernel-parameters.txt\n" . $herecurr);
+ CHK("UNDOCUMENTED_SETUP",
+ "__setup appears un-documented -- check Documentation/kernel-parameters.txt\n" . $herecurr);
}
}
# check for pointless casting of kmalloc return
if ($line =~ /\*\s*\)\s*k[czm]alloc\b/) {
- WARN("unnecessary cast may hide bugs, see http://c-faq.com/malloc/mallocnocast.html\n" . $herecurr);
+ WARN("UNNECESSARY_CASTS",
+ "unnecessary cast may hide bugs, see http://c-faq.com/malloc/mallocnocast.html\n" . $herecurr);
}
# check for gcc specific __FUNCTION__
if ($line =~ /__FUNCTION__/) {
- WARN("__func__ should be used instead of gcc specific __FUNCTION__\n" . $herecurr);
+ WARN("USE_FUNC",
+ "__func__ should be used instead of gcc specific __FUNCTION__\n" . $herecurr);
}
# check for semaphores initialized locked
if ($line =~ /^.\s*sema_init.+,\W?0\W?\)/) {
- WARN("consider using a completion\n" . $herecurr);
+ WARN("CONSIDER_COMPLETION",
+ "consider using a completion\n" . $herecurr);
}
# recommend strict_strto* over simple_strto*
if ($line =~ /\bsimple_(strto.*?)\s*\(/) {
- WARN("consider using strict_$1 in preference to simple_$1\n" . $herecurr);
+ WARN("CONSIDER_KSTRTO",
+ "consider using strict_$1 in preference to simple_$1\n" . $herecurr);
}
# check for __initcall(), use device_initcall() explicitly please
if ($line =~ /^.\s*__initcall\s*\(/) {
- WARN("please use device_initcall() instead of __initcall()\n" . $herecurr);
+ WARN("USE_DEVICE_INITCALL",
+ "please use device_initcall() instead of __initcall()\n" . $herecurr);
}
# check for various ops structs, ensure they are const.
my $struct_ops = qr{acpi_dock_ops|
@@ -2892,7 +3098,8 @@ sub process {
wd_ops}x;
if ($line !~ /\bconst\b/ &&
$line =~ /\bstruct\s+($struct_ops)\b/) {
- WARN("struct $1 should normally be const\n" .
+ WARN("CONST_STRUCT",
+ "struct $1 should normally be const\n" .
$herecurr);
}
@@ -2905,7 +3112,8 @@ sub process {
$line !~ /\[[^\]]*\.\.\.[^\]]*NR_CPUS[^\]]*\]/ &&
$line !~ /\[[^\]]*NR_CPUS[^\]]*\.\.\.[^\]]*\]/)
{
- WARN("usage of NR_CPUS is often wrong - consider using cpu_possible(), num_possible_cpus(), for_each_possible_cpu(), etc\n" . $herecurr);
+ WARN("NR_CPUS",
+ "usage of NR_CPUS is often wrong - consider using cpu_possible(), num_possible_cpus(), for_each_possible_cpu(), etc\n" . $herecurr);
}
# check for %L{u,d,i} in strings
@@ -2914,7 +3122,8 @@ sub process {
$string = substr($rawline, $-[1], $+[1] - $-[1]);
$string =~ s/%%/__/g;
if ($string =~ /(?<!%)%L[udi]/) {
- WARN("\%Ld/%Lu are not-standard C, use %lld/%llu\n" . $herecurr);
+ WARN("PRINTF_L",
+ "\%Ld/%Lu are not-standard C, use %lld/%llu\n" . $herecurr);
last;
}
}
@@ -2922,9 +3131,11 @@ sub process {
# whine mightly about in_atomic
if ($line =~ /\bin_atomic\s*\(/) {
if ($realfile =~ m@^drivers/@) {
- ERROR("do not use in_atomic in drivers\n" . $herecurr);
+ ERROR("IN_ATOMIC",
+ "do not use in_atomic in drivers\n" . $herecurr);
} elsif ($realfile !~ m@^kernel/@) {
- WARN("use of in_atomic() is incorrect outside core kernel code\n" . $herecurr);
+ ERROR("IN_ATOMIC",
+ "use of in_atomic() is incorrect outside core kernel code\n" . $herecurr);
}
}
@@ -2934,7 +3145,8 @@ sub process {
if ($realfile !~ m@^kernel/lockdep@ &&
$realfile !~ m@^include/linux/lockdep@ &&
$realfile !~ m@^drivers/base/core@) {
- ERROR("lockdep_no_validate class is reserved for device->mutex.\n" . $herecurr);
+ ERROR("LOCKDEP",
+ "lockdep_no_validate class is reserved for device->mutex.\n" . $herecurr);
}
}
}
@@ -2958,10 +3170,12 @@ sub process {
}
if (!$is_patch) {
- ERROR("Does not appear to be a unified-diff format patch\n");
+ ERROR("NOT_UNIFIED_DIFF",
+ "Does not appear to be a unified-diff format patch\n");
}
if ($is_patch && $chk_signoff && $signoff == 0) {
- ERROR("Missing Signed-off-by: line(s)\n");
+ ERROR("MISSING_SIGN_OFF",
+ "Missing Signed-off-by: line(s)\n");
}
print report_dump();
@@ -2983,13 +3197,25 @@ sub process {
}
}
+ if (keys %ignore_type) {
+ print "NOTE: Ignored message types:";
+ foreach my $ignore (sort keys %ignore_type) {
+ print " $ignore";
+ }
+ print "\n";
+ print "\n" if ($quiet == 0);
+ }
+
if ($clean == 1 && $quiet == 0) {
print "$vname has no obvious style problems and is ready for submission.\n"
}
if ($clean == 0 && $quiet == 0) {
- print "$vname has style problems, please review. If any of these errors\n";
- print "are false positives report them to the maintainer, see\n";
- print "CHECKPATCH in MAINTAINERS.\n";
+ print << "EOM";
+$vname has style problems, please review.
+
+If any of these errors are false positives, please report
+them to the maintainer, see CHECKPATCH in MAINTAINERS.
+EOM
}
return $clean;
diff --git a/scripts/imx/imx-image.c b/scripts/imx/imx-image.c
index fa93e47917..34a072039d 100644
--- a/scripts/imx/imx-image.c
+++ b/scripts/imx/imx-image.c
@@ -132,6 +132,14 @@ void RSA_get0_key(const RSA *r, const BIGNUM **n,
if (d != NULL)
*d = r->d;
}
+
+RSA *EVP_PKEY_get0_RSA(EVP_PKEY *pkey)
+{
+ if (pkey->type != EVP_PKEY_RSA)
+ return NULL;
+
+ return pkey->pkey.rsa;
+}
#endif
static int extract_key(const char *certfile, uint8_t **modulus, int *modulus_len,
@@ -324,7 +332,10 @@ static size_t add_header_v2(const struct config_data *data, void *buf)
hdr->self = loadaddr + offset;
hdr->boot_data.start = loadaddr;
- hdr->boot_data.size = imagesize;
+ if (data->max_load_size && imagesize > data->max_load_size)
+ hdr->boot_data.size = data->max_load_size;
+ else
+ hdr->boot_data.size = imagesize;
if (data->csf) {
hdr->csf = loadaddr + imagesize;
@@ -797,12 +808,12 @@ int main(int argc, char *argv[])
}
/*
- * Add HEADER_LEN to the image size for the blank aera + IVT + DCD.
+ * Add HEADER_LEN to the image size for the blank area + IVT + DCD.
* Align up to a 4k boundary, because:
* - at least i.MX5 NAND boot only reads full NAND pages and misses the
* last partial NAND page.
* - i.MX6 SPI NOR boot corrupts the last few bytes of an image loaded
- * in ver funy ways when the image size is not 4 byte aligned
+ * in very funny ways when the image size is not 4 byte aligned
*/
data.load_size = roundup(data.image_size + header_len, 0x1000);
@@ -810,6 +821,11 @@ int main(int argc, char *argv[])
if (ret)
exit(1);
+ if (data.max_load_size && (sign_image || data.encrypt_image)) {
+ fprintf(stderr, "Specifying max_load_size is incompatible with HAB signing/encrypting\n");
+ exit(1);
+ }
+
if (!sign_image)
data.csf = NULL;
diff --git a/scripts/imx/imx.c b/scripts/imx/imx.c
index 43f67da288..f37f151acb 100644
--- a/scripts/imx/imx.c
+++ b/scripts/imx/imx.c
@@ -279,6 +279,16 @@ static int do_soc(struct config_data *data, int argc, char *argv[])
return -EINVAL;
}
+static int do_max_load_size(struct config_data *data, int argc, char *argv[])
+{
+ if (argc < 2)
+ return -EINVAL;
+
+ data->max_load_size = strtoul(argv[1], NULL, 0);
+
+ return 0;
+}
+
static int hab_add_str(struct config_data *data, const char *str)
{
int len = strlen(str);
@@ -590,6 +600,9 @@ struct command cmds[] = {
}, {
.name = "soc",
.parse = do_soc,
+ }, {
+ .name = "max_load_size",
+ .parse = do_max_load_size,
}, {
.name = "hab",
.parse = do_hab,