From 7791ad2d59a16b76c6a0e48797e9b0ba481b67e0 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Tue, 30 Aug 2016 21:54:21 +0200 Subject: defenv-1: remove unused variable kernelimage_type kernelimage_type is used nowwhere, remove it. Signed-off-by: Sascha Hauer --- arch/arm/boards/friendlyarm-mini6410/env/config | 4 ---- arch/arm/boards/friendlyarm-tiny6410/env/config | 4 ---- 2 files changed, 8 deletions(-) diff --git a/arch/arm/boards/friendlyarm-mini6410/env/config b/arch/arm/boards/friendlyarm-mini6410/env/config index 74beeff4fa..924d7b8cc7 100644 --- a/arch/arm/boards/friendlyarm-mini6410/env/config +++ b/arch/arm/boards/friendlyarm-mini6410/env/config @@ -24,13 +24,9 @@ rootfs_type=ubifs rootfsimage=root-${machine}.${rootfs_type} # The image type of the kernel. Can be uimage, zimage, raw, or raw_lzo -kernelimage_type=zimage kernelimage=zImage-${machine} -#kernelimage_type=uimage #kernelimage=uImage-$machine -#kernelimage_type=raw #kernelimage=Image-$machine -#kernelimage_type=raw_lzo #kernelimage=Image-$machine.lzo if [ -n $user ]; then diff --git a/arch/arm/boards/friendlyarm-tiny6410/env/config b/arch/arm/boards/friendlyarm-tiny6410/env/config index 6422e9f6a6..f38535be48 100644 --- a/arch/arm/boards/friendlyarm-tiny6410/env/config +++ b/arch/arm/boards/friendlyarm-tiny6410/env/config @@ -24,13 +24,9 @@ rootfs_type=ubifs rootfsimage=root-${machine}.${rootfs_type} # The image type of the kernel. Can be uimage, zimage, raw, or raw_lzo -kernelimage_type=zimage kernelimage=zImage-${machine} -#kernelimage_type=uimage #kernelimage=uImage-$machine -#kernelimage_type=raw #kernelimage=Image-$machine -#kernelimage_type=raw_lzo #kernelimage=Image-$machine.lzo if [ -n $user ]; then -- cgit v1.2.3 From 4d9734c8a26437838a5c1085fb3859734036e150 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Mon, 26 Sep 2016 09:50:08 +0200 Subject: defaultenv: add defaultenv-1 in boards via defaultenv_append_directory() Currently it's hardcoded for each board which defaultenv version is used. This is unfortunate since some people like the other defaultenv version better and may want to select it. This patch removes the board specific environment path CONFIG_DEFAULT_ENVIRONMENT_PATH and instead adds it via: if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) defaultenv_append_directory(defaultenv_); This way we can make sure that the defaultenv-1 board specific bits are only compiled in when defaultenv-1 is actually in use. The next step is to make the defaultenv version selection a user visible choice. Signed-off-by: Sascha Hauer --- arch/arm/boards/animeo_ip/Makefile | 1 + .../boards/animeo_ip/defaultenv-animeo_ip/config | 39 ++++++++++++++ arch/arm/boards/animeo_ip/env/config | 39 -------------- arch/arm/boards/animeo_ip/init.c | 4 ++ arch/arm/boards/at91rm9200ek/Makefile | 1 + .../defaultenv-at91rm9200ek/bin/init_board | 11 ++++ .../at91rm9200ek/defaultenv-at91rm9200ek/config | 39 ++++++++++++++ arch/arm/boards/at91rm9200ek/env/bin/init_board | 11 ---- arch/arm/boards/at91rm9200ek/env/config | 39 -------------- arch/arm/boards/at91rm9200ek/init.c | 4 ++ arch/arm/boards/at91sam9260ek/Makefile | 1 + .../defaultenv-at91sam9260ek/bin/init_board | 37 +++++++++++++ .../at91sam9260ek/defaultenv-at91sam9260ek/config | 45 ++++++++++++++++ arch/arm/boards/at91sam9260ek/env/bin/init_board | 37 ------------- arch/arm/boards/at91sam9260ek/env/config | 45 ---------------- arch/arm/boards/at91sam9260ek/init.c | 4 ++ arch/arm/boards/at91sam9261ek/Makefile | 1 + .../defaultenv-at91sam9261ek/bin/init_board | 55 +++++++++++++++++++ .../at91sam9261ek/defaultenv-at91sam9261ek/config | 51 ++++++++++++++++++ arch/arm/boards/at91sam9261ek/env/bin/init_board | 55 ------------------- arch/arm/boards/at91sam9261ek/env/config | 51 ------------------ arch/arm/boards/at91sam9261ek/init.c | 4 ++ arch/arm/boards/at91sam9263ek/Makefile | 1 + .../defaultenv-at91sam9263ek/bin/init_board | 55 +++++++++++++++++++ .../at91sam9263ek/defaultenv-at91sam9263ek/config | 42 +++++++++++++++ arch/arm/boards/at91sam9263ek/env/bin/init_board | 55 ------------------- arch/arm/boards/at91sam9263ek/env/config | 42 --------------- arch/arm/boards/at91sam9263ek/init.c | 4 ++ arch/arm/boards/at91sam9m10g45ek/Makefile | 1 + .../defaultenv-at91sam9m10g45ek/bin/boot_board | 58 ++++++++++++++++++++ .../defaultenv-at91sam9m10g45ek/bin/menu_boot | 37 +++++++++++++ .../defaultenv-at91sam9m10g45ek/config | 40 ++++++++++++++ .../arm/boards/at91sam9m10g45ek/env/bin/boot_board | 58 -------------------- arch/arm/boards/at91sam9m10g45ek/env/bin/menu_boot | 37 ------------- arch/arm/boards/at91sam9m10g45ek/env/config | 40 -------------- arch/arm/boards/at91sam9m10g45ek/init.c | 4 ++ arch/arm/boards/at91sam9n12ek/Makefile | 1 + .../defaultenv-at91sam9n12ek/bin/init_board | 54 +++++++++++++++++++ .../at91sam9n12ek/defaultenv-at91sam9n12ek/config | 41 +++++++++++++++ arch/arm/boards/at91sam9n12ek/env/bin/init_board | 54 ------------------- arch/arm/boards/at91sam9n12ek/env/config | 41 --------------- arch/arm/boards/at91sam9n12ek/init.c | 4 ++ arch/arm/boards/at91sam9x5ek/Makefile | 1 + .../defaultenv-at91sam9x5ek/bin/init_board | 15 ++++++ .../at91sam9x5ek/defaultenv-at91sam9x5ek/config | 42 +++++++++++++++ arch/arm/boards/at91sam9x5ek/env/bin/init_board | 15 ------ arch/arm/boards/at91sam9x5ek/env/config | 42 --------------- arch/arm/boards/at91sam9x5ek/init.c | 4 ++ arch/arm/boards/eukrea_cpuimx25/Makefile | 1 + .../defaultenv-eukrea_cpuimx25/bin/init_board | 41 +++++++++++++++ .../defaultenv-eukrea_cpuimx25/config | 47 +++++++++++++++++ arch/arm/boards/eukrea_cpuimx25/env/bin/init_board | 41 --------------- arch/arm/boards/eukrea_cpuimx25/env/config | 47 ----------------- arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c | 4 ++ arch/arm/boards/eukrea_cpuimx35/Makefile | 1 + .../defaultenv-eukrea_cpuimx35/bin/init_board | 41 +++++++++++++++ .../defaultenv-eukrea_cpuimx35/config | 47 +++++++++++++++++ arch/arm/boards/eukrea_cpuimx35/env/bin/init_board | 41 --------------- arch/arm/boards/eukrea_cpuimx35/env/config | 47 ----------------- arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c | 4 ++ arch/arm/boards/eukrea_cpuimx51/Makefile | 1 + .../defaultenv-eukrea_cpuimx51/bin/init_board | 20 +++++++ .../defaultenv-eukrea_cpuimx51/config | 50 ++++++++++++++++++ arch/arm/boards/eukrea_cpuimx51/env/bin/init_board | 20 ------- arch/arm/boards/eukrea_cpuimx51/env/config | 50 ------------------ arch/arm/boards/eukrea_cpuimx51/eukrea_cpuimx51.c | 4 ++ arch/arm/boards/freescale-mx25-3ds/3stack.c | 4 ++ arch/arm/boards/freescale-mx25-3ds/Makefile | 1 + .../defaultenv-freescale-mx25-3ds/bin/_update | 36 +++++++++++++ .../defaultenv-freescale-mx25-3ds/bin/boot | 47 +++++++++++++++++ .../defaultenv-freescale-mx25-3ds/bin/init | 26 +++++++++ .../bin/update_kernel | 15 ++++++ .../defaultenv-freescale-mx25-3ds/bin/update_root | 16 ++++++ .../defaultenv-freescale-mx25-3ds/config | 29 ++++++++++ arch/arm/boards/freescale-mx25-3ds/env/bin/_update | 36 ------------- arch/arm/boards/freescale-mx25-3ds/env/bin/boot | 47 ----------------- arch/arm/boards/freescale-mx25-3ds/env/bin/init | 26 --------- .../freescale-mx25-3ds/env/bin/update_kernel | 15 ------ .../boards/freescale-mx25-3ds/env/bin/update_root | 16 ------ arch/arm/boards/freescale-mx25-3ds/env/config | 29 ---------- arch/arm/boards/freescale-mx35-3ds/3stack.c | 4 ++ arch/arm/boards/freescale-mx35-3ds/Makefile | 1 + .../defaultenv-freescale-mx35-3ds/config | 51 ++++++++++++++++++ arch/arm/boards/freescale-mx35-3ds/env/config | 51 ------------------ arch/arm/boards/freescale-mx53-smd/Makefile | 1 + arch/arm/boards/freescale-mx53-smd/board.c | 4 ++ .../defaultenv-freescale-mx53-smd/config | 45 ++++++++++++++++ arch/arm/boards/freescale-mx53-smd/env/config | 45 ---------------- arch/arm/boards/friendlyarm-mini6410/Makefile | 1 + .../defaultenv-friendlyarm-mini6410/config | 52 ++++++++++++++++++ arch/arm/boards/friendlyarm-mini6410/env/config | 52 ------------------ arch/arm/boards/friendlyarm-mini6410/mini6410.c | 4 ++ arch/arm/boards/friendlyarm-tiny6410/Makefile | 1 + .../defaultenv-friendlyarm-tiny6410/config | 52 ++++++++++++++++++ arch/arm/boards/friendlyarm-tiny6410/env/config | 52 ------------------ arch/arm/boards/guf-cupid/Makefile | 1 + arch/arm/boards/guf-cupid/board.c | 4 ++ .../boards/guf-cupid/defaultenv-guf-cupid/config | 50 ++++++++++++++++++ arch/arm/boards/guf-cupid/env/config | 50 ------------------ arch/arm/boards/guf-neso/Makefile | 1 + arch/arm/boards/guf-neso/board.c | 4 ++ .../arm/boards/guf-neso/defaultenv-guf-neso/config | 47 +++++++++++++++++ arch/arm/boards/guf-neso/env/config | 47 ----------------- arch/arm/boards/haba-knx/Makefile | 1 + .../haba-knx/defaultenv-haba-knx/bin/init_board | 49 +++++++++++++++++ .../arm/boards/haba-knx/defaultenv-haba-knx/config | 40 ++++++++++++++ arch/arm/boards/haba-knx/env/bin/init_board | 49 ----------------- arch/arm/boards/haba-knx/env/config | 40 -------------- arch/arm/boards/haba-knx/init.c | 4 ++ arch/arm/boards/highbank/Makefile | 1 + .../defaultenv-highbank/boot.d/010-ahci-boot | 1 + .../highbank/defaultenv-highbank/boot.d/011-ahci | 1 + .../defaultenv-highbank/boot.d/020-mmc-boot | 1 + .../highbank/defaultenv-highbank/boot.d/021-mmc | 1 + .../highbank/defaultenv-highbank/boot.d/030-net | 1 + .../defaultenv-highbank/boot.d/031-net-eth1 | 1 + .../boards/highbank/defaultenv-highbank/boot/ahci | 16 ++++++ .../highbank/defaultenv-highbank/boot/ahci-boot | 16 ++++++ .../boards/highbank/defaultenv-highbank/boot/mmc | 16 ++++++ .../highbank/defaultenv-highbank/boot/mmc-boot | 16 ++++++ .../boards/highbank/defaultenv-highbank/boot/net | 13 +++++ .../highbank/defaultenv-highbank/boot/net-eth1 | 13 +++++ .../highbank/defaultenv-highbank/data/oftree | 4 ++ .../defaultenv-highbank/init/001-dtb-probe | 7 +++ .../highbank/defaultenv-highbank/init/automount | 27 ++++++++++ .../highbank/defaultenv-highbank/nv/boot.default | 1 + .../highbank/defaultenv-highbank/nv/bootm.oftree | 1 + .../defaultenv-highbank/nv/linux.bootargs.console | 1 + arch/arm/boards/highbank/env/boot.d/010-ahci-boot | 1 - arch/arm/boards/highbank/env/boot.d/011-ahci | 1 - arch/arm/boards/highbank/env/boot.d/020-mmc-boot | 1 - arch/arm/boards/highbank/env/boot.d/021-mmc | 1 - arch/arm/boards/highbank/env/boot.d/030-net | 1 - arch/arm/boards/highbank/env/boot.d/031-net-eth1 | 1 - arch/arm/boards/highbank/env/boot/ahci | 16 ------ arch/arm/boards/highbank/env/boot/ahci-boot | 16 ------ arch/arm/boards/highbank/env/boot/mmc | 16 ------ arch/arm/boards/highbank/env/boot/mmc-boot | 16 ------ arch/arm/boards/highbank/env/boot/net | 13 ----- arch/arm/boards/highbank/env/boot/net-eth1 | 13 ----- arch/arm/boards/highbank/env/data/oftree | 4 -- arch/arm/boards/highbank/env/init/001-dtb-probe | 7 --- arch/arm/boards/highbank/env/init/automount | 27 ---------- arch/arm/boards/highbank/env/nv/boot.default | 1 - arch/arm/boards/highbank/env/nv/bootm.oftree | 1 - .../boards/highbank/env/nv/linux.bootargs.console | 1 - arch/arm/boards/highbank/init.c | 4 ++ arch/arm/boards/nhk8815/Makefile | 1 + arch/arm/boards/nhk8815/defaultenv-nhk8815/config | 43 +++++++++++++++ arch/arm/boards/nhk8815/env/config | 43 --------------- arch/arm/boards/nhk8815/setup.c | 4 ++ arch/arm/boards/phytec-phycard-omap4/Makefile | 1 + .../bin/nand_bootstrap | 31 +++++++++++ .../defaultenv-phytec-phycard-omap4/config | 46 ++++++++++++++++ .../phytec-phycard-omap4/env/bin/nand_bootstrap | 31 ----------- arch/arm/boards/phytec-phycard-omap4/env/config | 46 ---------------- arch/arm/boards/phytec-phycore-omap4460/Makefile | 1 + arch/arm/boards/phytec-phycore-omap4460/board.c | 4 ++ .../bin/init_board | 23 ++++++++ .../bin/nand_bootstrap | 31 +++++++++++ .../defaultenv-phytec-phycore-omap4460/config | 61 ++++++++++++++++++++++ .../phytec-phycore-omap4460/env/bin/init_board | 23 -------- .../phytec-phycore-omap4460/env/bin/nand_bootstrap | 31 ----------- arch/arm/boards/phytec-phycore-omap4460/env/config | 61 ---------------------- arch/arm/boards/pm9261/Makefile | 1 + arch/arm/boards/pm9261/defaultenv-pm9261/config | 36 +++++++++++++ arch/arm/boards/pm9261/env/config | 36 ------------- arch/arm/boards/pm9261/init.c | 4 ++ arch/arm/boards/pm9g45/Makefile | 1 + arch/arm/boards/pm9g45/defaultenv-pm9g45/config | 40 ++++++++++++++ arch/arm/boards/pm9g45/env/config | 40 -------------- arch/arm/boards/pm9g45/init.c | 4 ++ arch/arm/boards/qemu-virt64/Makefile | 1 + .../qemu-virt64/defaultenv-qemu-virt64/config | 8 +++ arch/arm/boards/qemu-virt64/env/config | 8 --- arch/arm/boards/qemu-virt64/init.c | 4 ++ arch/arm/boards/qil-a926x/Makefile | 1 + .../qil-a926x/defaultenv-qil-a926x/bin/init_board | 46 ++++++++++++++++ .../boards/qil-a926x/defaultenv-qil-a926x/config | 40 ++++++++++++++ arch/arm/boards/qil-a926x/env/bin/init_board | 46 ---------------- arch/arm/boards/qil-a926x/env/config | 40 -------------- arch/arm/boards/qil-a926x/init.c | 4 ++ arch/arm/boards/sama5d3_xplained/Makefile | 1 + .../defaultenv-sama5d3_xplained/config | 42 +++++++++++++++ arch/arm/boards/sama5d3_xplained/env/config | 42 --------------- arch/arm/boards/sama5d3_xplained/init.c | 4 ++ arch/arm/boards/sama5d3xek/Makefile | 1 + .../defaultenv-sama5d3xek/bin/init_board | 15 ++++++ .../boards/sama5d3xek/defaultenv-sama5d3xek/config | 44 ++++++++++++++++ arch/arm/boards/sama5d3xek/env/bin/init_board | 15 ------ arch/arm/boards/sama5d3xek/env/config | 44 ---------------- arch/arm/boards/sama5d3xek/init.c | 4 ++ arch/arm/boards/scb9328/Makefile | 1 + arch/arm/boards/scb9328/defaultenv-scb9328/config | 50 ++++++++++++++++++ arch/arm/boards/scb9328/env/config | 50 ------------------ arch/arm/boards/scb9328/scb9328.c | 4 ++ arch/arm/boards/tny-a926x/Makefile | 1 + .../tny-a926x/defaultenv-tny-a926x/bin/init_board | 11 ++++ .../boards/tny-a926x/defaultenv-tny-a926x/config | 41 +++++++++++++++ arch/arm/boards/tny-a926x/env/bin/init_board | 11 ---- arch/arm/boards/tny-a926x/env/config | 41 --------------- arch/arm/boards/tny-a926x/init.c | 4 ++ arch/arm/boards/usb-a926x/Makefile | 1 + .../usb-a926x/defaultenv-usb-a926x/bin/init_board | 46 ++++++++++++++++ .../boards/usb-a926x/defaultenv-usb-a926x/config | 41 +++++++++++++++ arch/arm/boards/usb-a926x/env/bin/init_board | 46 ---------------- arch/arm/boards/usb-a926x/env/config | 41 --------------- arch/arm/boards/usb-a926x/init.c | 4 ++ arch/arm/boards/vexpress/Makefile | 1 + .../arm/boards/vexpress/defaultenv-vexpress/config | 38 ++++++++++++++ arch/arm/boards/vexpress/env/config | 38 -------------- arch/arm/boards/vexpress/init.c | 4 ++ arch/arm/configs/animeo_ip_defconfig | 1 - arch/arm/configs/at91rm9200ek_defconfig | 1 - arch/arm/configs/at91sam9260ek_defconfig | 1 - arch/arm/configs/at91sam9261ek_defconfig | 1 - .../configs/at91sam9261ek_first_stage_defconfig | 1 - arch/arm/configs/at91sam9263ek_defconfig | 1 - arch/arm/configs/at91sam9g10ek_defconfig | 1 - arch/arm/configs/at91sam9g20ek_defconfig | 1 - arch/arm/configs/at91sam9m10g45ek_defconfig | 1 - arch/arm/configs/at91sam9n12ek_defconfig | 1 - arch/arm/configs/at91sam9x5ek_defconfig | 1 - arch/arm/configs/cupid_defconfig | 1 - arch/arm/configs/eukrea_cpuimx25_defconfig | 1 - arch/arm/configs/eukrea_cpuimx35_defconfig | 1 - arch/arm/configs/eukrea_cpuimx51_defconfig | 1 - arch/arm/configs/freescale-mx25-3ds_defconfig | 1 - arch/arm/configs/freescale-mx35-3ds_defconfig | 1 - arch/arm/configs/freescale-mx53-smd_defconfig | 1 - arch/arm/configs/friendlyarm_mini6410_defconfig | 1 - arch/arm/configs/friendlyarm_tiny6410_defconfig | 1 - arch/arm/configs/haba_knx_lite_defconfig | 1 - arch/arm/configs/highbank_defconfig | 1 - arch/arm/configs/neso_defconfig | 1 - arch/arm/configs/nhk8815_defconfig | 1 - arch/arm/configs/phytec-phycard-omap4_defconfig | 1 - arch/arm/configs/phytec-phycore-omap4460_defconfig | 1 - arch/arm/configs/pm9261_defconfig | 1 - arch/arm/configs/pm9g45_defconfig | 1 - arch/arm/configs/qemu_virt64_defconfig | 1 - arch/arm/configs/qil_a9260_128mib_defconfig | 1 - arch/arm/configs/qil_a9260_defconfig | 1 - arch/arm/configs/qil_a9g20_128mib_defconfig | 1 - arch/arm/configs/qil_a9g20_defconfig | 1 - arch/arm/configs/sama5d3_xplained_defconfig | 1 - arch/arm/configs/sama5d3xek_defconfig | 1 - arch/arm/configs/scb9328_defconfig | 1 - arch/arm/configs/tny_a9260_defconfig | 1 - arch/arm/configs/tny_a9263_defconfig | 1 - arch/arm/configs/tny_a9g20_defconfig | 1 - arch/arm/configs/usb_a9260_defconfig | 1 - arch/arm/configs/usb_a9263_128mib_defconfig | 1 - arch/arm/configs/usb_a9263_defconfig | 1 - arch/arm/configs/usb_a9g20_128mib_defconfig | 1 - arch/arm/configs/usb_a9g20_defconfig | 1 - arch/arm/configs/vexpress_ca9_defconfig | 1 - arch/arm/configs/vexpress_defconfig | 1 - arch/nios2/boards/generic/Makefile | 1 + .../nios2/boards/generic/defaultenv-generic/config | 20 +++++++ arch/nios2/boards/generic/env/config | 20 ------- arch/nios2/boards/generic/generic.c | 4 ++ arch/nios2/configs/generic_defconfig | 1 - arch/ppc/boards/freescale-p1010rdb/Makefile | 3 +- .../defaultenv-freescale-p1010rdb/bin/init | 2 + .../defaultenv-freescale-p1010rdb/config | 2 + arch/ppc/boards/freescale-p1010rdb/env/bin/init | 2 - arch/ppc/boards/freescale-p1010rdb/env/config | 2 - arch/ppc/boards/freescale-p1010rdb/p1010rdb.c | 4 ++ arch/ppc/boards/freescale-p1022ds/Makefile | 1 + .../defaultenv-freescale-p1022ds/bin/init | 2 + .../defaultenv-freescale-p1022ds/config | 2 + arch/ppc/boards/freescale-p1022ds/env/bin/init | 2 - arch/ppc/boards/freescale-p1022ds/env/config | 2 - arch/ppc/boards/freescale-p1022ds/p1022ds.c | 4 ++ arch/ppc/boards/freescale-p2020rdb/Makefile | 1 + .../defaultenv-freescale-p2020rdb/bin/init | 2 + .../defaultenv-freescale-p2020rdb/config | 2 + arch/ppc/boards/freescale-p2020rdb/env/bin/init | 2 - arch/ppc/boards/freescale-p2020rdb/env/config | 2 - arch/ppc/boards/freescale-p2020rdb/p2020rdb.c | 4 ++ arch/ppc/boards/geip-da923rc/Makefile | 1 + arch/ppc/boards/geip-da923rc/da923rc.c | 4 ++ .../geip-da923rc/defaultenv-geip-da923rc/bin/boot | 9 ++++ .../geip-da923rc/defaultenv-geip-da923rc/bin/init | 26 +++++++++ .../geip-da923rc/defaultenv-geip-da923rc/config | 4 ++ arch/ppc/boards/geip-da923rc/env/bin/boot | 9 ---- arch/ppc/boards/geip-da923rc/env/bin/init | 26 --------- arch/ppc/boards/geip-da923rc/env/config | 4 -- arch/ppc/configs/da923rc_defconfig | 1 - arch/ppc/configs/p1010rdb_defconfig | 1 - arch/ppc/configs/p1022ds_defconfig | 1 - arch/ppc/configs/p2020rdb_defconfig | 1 - 293 files changed, 2586 insertions(+), 2455 deletions(-) create mode 100644 arch/arm/boards/animeo_ip/defaultenv-animeo_ip/config delete mode 100644 arch/arm/boards/animeo_ip/env/config create mode 100644 arch/arm/boards/at91rm9200ek/defaultenv-at91rm9200ek/bin/init_board create mode 100644 arch/arm/boards/at91rm9200ek/defaultenv-at91rm9200ek/config delete mode 100644 arch/arm/boards/at91rm9200ek/env/bin/init_board delete mode 100644 arch/arm/boards/at91rm9200ek/env/config create mode 100644 arch/arm/boards/at91sam9260ek/defaultenv-at91sam9260ek/bin/init_board create mode 100644 arch/arm/boards/at91sam9260ek/defaultenv-at91sam9260ek/config delete mode 100644 arch/arm/boards/at91sam9260ek/env/bin/init_board delete mode 100644 arch/arm/boards/at91sam9260ek/env/config create mode 100644 arch/arm/boards/at91sam9261ek/defaultenv-at91sam9261ek/bin/init_board create mode 100644 arch/arm/boards/at91sam9261ek/defaultenv-at91sam9261ek/config delete mode 100644 arch/arm/boards/at91sam9261ek/env/bin/init_board delete mode 100644 arch/arm/boards/at91sam9261ek/env/config create mode 100644 arch/arm/boards/at91sam9263ek/defaultenv-at91sam9263ek/bin/init_board create mode 100644 arch/arm/boards/at91sam9263ek/defaultenv-at91sam9263ek/config delete mode 100644 arch/arm/boards/at91sam9263ek/env/bin/init_board delete mode 100644 arch/arm/boards/at91sam9263ek/env/config create mode 100644 arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek/bin/boot_board create mode 100644 arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek/bin/menu_boot create mode 100644 arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek/config delete mode 100644 arch/arm/boards/at91sam9m10g45ek/env/bin/boot_board delete mode 100644 arch/arm/boards/at91sam9m10g45ek/env/bin/menu_boot delete mode 100644 arch/arm/boards/at91sam9m10g45ek/env/config create mode 100644 arch/arm/boards/at91sam9n12ek/defaultenv-at91sam9n12ek/bin/init_board create mode 100644 arch/arm/boards/at91sam9n12ek/defaultenv-at91sam9n12ek/config delete mode 100644 arch/arm/boards/at91sam9n12ek/env/bin/init_board delete mode 100644 arch/arm/boards/at91sam9n12ek/env/config create mode 100644 arch/arm/boards/at91sam9x5ek/defaultenv-at91sam9x5ek/bin/init_board create mode 100644 arch/arm/boards/at91sam9x5ek/defaultenv-at91sam9x5ek/config delete mode 100644 arch/arm/boards/at91sam9x5ek/env/bin/init_board delete mode 100644 arch/arm/boards/at91sam9x5ek/env/config create mode 100644 arch/arm/boards/eukrea_cpuimx25/defaultenv-eukrea_cpuimx25/bin/init_board create mode 100644 arch/arm/boards/eukrea_cpuimx25/defaultenv-eukrea_cpuimx25/config delete mode 100644 arch/arm/boards/eukrea_cpuimx25/env/bin/init_board delete mode 100644 arch/arm/boards/eukrea_cpuimx25/env/config create mode 100644 arch/arm/boards/eukrea_cpuimx35/defaultenv-eukrea_cpuimx35/bin/init_board create mode 100644 arch/arm/boards/eukrea_cpuimx35/defaultenv-eukrea_cpuimx35/config delete mode 100644 arch/arm/boards/eukrea_cpuimx35/env/bin/init_board delete mode 100644 arch/arm/boards/eukrea_cpuimx35/env/config create mode 100644 arch/arm/boards/eukrea_cpuimx51/defaultenv-eukrea_cpuimx51/bin/init_board create mode 100644 arch/arm/boards/eukrea_cpuimx51/defaultenv-eukrea_cpuimx51/config delete mode 100644 arch/arm/boards/eukrea_cpuimx51/env/bin/init_board delete mode 100644 arch/arm/boards/eukrea_cpuimx51/env/config create mode 100644 arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/_update create mode 100644 arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/boot create mode 100644 arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/init create mode 100644 arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/update_kernel create mode 100644 arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/update_root create mode 100644 arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/config delete mode 100644 arch/arm/boards/freescale-mx25-3ds/env/bin/_update delete mode 100644 arch/arm/boards/freescale-mx25-3ds/env/bin/boot delete mode 100644 arch/arm/boards/freescale-mx25-3ds/env/bin/init delete mode 100644 arch/arm/boards/freescale-mx25-3ds/env/bin/update_kernel delete mode 100644 arch/arm/boards/freescale-mx25-3ds/env/bin/update_root delete mode 100644 arch/arm/boards/freescale-mx25-3ds/env/config create mode 100644 arch/arm/boards/freescale-mx35-3ds/defaultenv-freescale-mx35-3ds/config delete mode 100644 arch/arm/boards/freescale-mx35-3ds/env/config create mode 100644 arch/arm/boards/freescale-mx53-smd/defaultenv-freescale-mx53-smd/config delete mode 100644 arch/arm/boards/freescale-mx53-smd/env/config create mode 100644 arch/arm/boards/friendlyarm-mini6410/defaultenv-friendlyarm-mini6410/config delete mode 100644 arch/arm/boards/friendlyarm-mini6410/env/config create mode 100644 arch/arm/boards/friendlyarm-tiny6410/defaultenv-friendlyarm-tiny6410/config delete mode 100644 arch/arm/boards/friendlyarm-tiny6410/env/config create mode 100644 arch/arm/boards/guf-cupid/defaultenv-guf-cupid/config delete mode 100644 arch/arm/boards/guf-cupid/env/config create mode 100644 arch/arm/boards/guf-neso/defaultenv-guf-neso/config delete mode 100644 arch/arm/boards/guf-neso/env/config create mode 100644 arch/arm/boards/haba-knx/defaultenv-haba-knx/bin/init_board create mode 100644 arch/arm/boards/haba-knx/defaultenv-haba-knx/config delete mode 100644 arch/arm/boards/haba-knx/env/bin/init_board delete mode 100644 arch/arm/boards/haba-knx/env/config create mode 120000 arch/arm/boards/highbank/defaultenv-highbank/boot.d/010-ahci-boot create mode 120000 arch/arm/boards/highbank/defaultenv-highbank/boot.d/011-ahci create mode 120000 arch/arm/boards/highbank/defaultenv-highbank/boot.d/020-mmc-boot create mode 120000 arch/arm/boards/highbank/defaultenv-highbank/boot.d/021-mmc create mode 120000 arch/arm/boards/highbank/defaultenv-highbank/boot.d/030-net create mode 120000 arch/arm/boards/highbank/defaultenv-highbank/boot.d/031-net-eth1 create mode 100644 arch/arm/boards/highbank/defaultenv-highbank/boot/ahci create mode 100644 arch/arm/boards/highbank/defaultenv-highbank/boot/ahci-boot create mode 100644 arch/arm/boards/highbank/defaultenv-highbank/boot/mmc create mode 100644 arch/arm/boards/highbank/defaultenv-highbank/boot/mmc-boot create mode 100644 arch/arm/boards/highbank/defaultenv-highbank/boot/net create mode 100644 arch/arm/boards/highbank/defaultenv-highbank/boot/net-eth1 create mode 100644 arch/arm/boards/highbank/defaultenv-highbank/data/oftree create mode 100644 arch/arm/boards/highbank/defaultenv-highbank/init/001-dtb-probe create mode 100644 arch/arm/boards/highbank/defaultenv-highbank/init/automount create mode 100644 arch/arm/boards/highbank/defaultenv-highbank/nv/boot.default create mode 100644 arch/arm/boards/highbank/defaultenv-highbank/nv/bootm.oftree create mode 100644 arch/arm/boards/highbank/defaultenv-highbank/nv/linux.bootargs.console delete mode 120000 arch/arm/boards/highbank/env/boot.d/010-ahci-boot delete mode 120000 arch/arm/boards/highbank/env/boot.d/011-ahci delete mode 120000 arch/arm/boards/highbank/env/boot.d/020-mmc-boot delete mode 120000 arch/arm/boards/highbank/env/boot.d/021-mmc delete mode 120000 arch/arm/boards/highbank/env/boot.d/030-net delete mode 120000 arch/arm/boards/highbank/env/boot.d/031-net-eth1 delete mode 100644 arch/arm/boards/highbank/env/boot/ahci delete mode 100644 arch/arm/boards/highbank/env/boot/ahci-boot delete mode 100644 arch/arm/boards/highbank/env/boot/mmc delete mode 100644 arch/arm/boards/highbank/env/boot/mmc-boot delete mode 100644 arch/arm/boards/highbank/env/boot/net delete mode 100644 arch/arm/boards/highbank/env/boot/net-eth1 delete mode 100644 arch/arm/boards/highbank/env/data/oftree delete mode 100644 arch/arm/boards/highbank/env/init/001-dtb-probe delete mode 100644 arch/arm/boards/highbank/env/init/automount delete mode 100644 arch/arm/boards/highbank/env/nv/boot.default delete mode 100644 arch/arm/boards/highbank/env/nv/bootm.oftree delete mode 100644 arch/arm/boards/highbank/env/nv/linux.bootargs.console create mode 100644 arch/arm/boards/nhk8815/defaultenv-nhk8815/config delete mode 100644 arch/arm/boards/nhk8815/env/config create mode 100644 arch/arm/boards/phytec-phycard-omap4/defaultenv-phytec-phycard-omap4/bin/nand_bootstrap create mode 100644 arch/arm/boards/phytec-phycard-omap4/defaultenv-phytec-phycard-omap4/config delete mode 100644 arch/arm/boards/phytec-phycard-omap4/env/bin/nand_bootstrap delete mode 100644 arch/arm/boards/phytec-phycard-omap4/env/config create mode 100644 arch/arm/boards/phytec-phycore-omap4460/defaultenv-phytec-phycore-omap4460/bin/init_board create mode 100644 arch/arm/boards/phytec-phycore-omap4460/defaultenv-phytec-phycore-omap4460/bin/nand_bootstrap create mode 100644 arch/arm/boards/phytec-phycore-omap4460/defaultenv-phytec-phycore-omap4460/config delete mode 100644 arch/arm/boards/phytec-phycore-omap4460/env/bin/init_board delete mode 100644 arch/arm/boards/phytec-phycore-omap4460/env/bin/nand_bootstrap delete mode 100644 arch/arm/boards/phytec-phycore-omap4460/env/config create mode 100644 arch/arm/boards/pm9261/defaultenv-pm9261/config delete mode 100644 arch/arm/boards/pm9261/env/config create mode 100644 arch/arm/boards/pm9g45/defaultenv-pm9g45/config delete mode 100644 arch/arm/boards/pm9g45/env/config create mode 100644 arch/arm/boards/qemu-virt64/defaultenv-qemu-virt64/config delete mode 100644 arch/arm/boards/qemu-virt64/env/config create mode 100644 arch/arm/boards/qil-a926x/defaultenv-qil-a926x/bin/init_board create mode 100644 arch/arm/boards/qil-a926x/defaultenv-qil-a926x/config delete mode 100644 arch/arm/boards/qil-a926x/env/bin/init_board delete mode 100644 arch/arm/boards/qil-a926x/env/config create mode 100644 arch/arm/boards/sama5d3_xplained/defaultenv-sama5d3_xplained/config delete mode 100644 arch/arm/boards/sama5d3_xplained/env/config create mode 100644 arch/arm/boards/sama5d3xek/defaultenv-sama5d3xek/bin/init_board create mode 100644 arch/arm/boards/sama5d3xek/defaultenv-sama5d3xek/config delete mode 100644 arch/arm/boards/sama5d3xek/env/bin/init_board delete mode 100644 arch/arm/boards/sama5d3xek/env/config create mode 100644 arch/arm/boards/scb9328/defaultenv-scb9328/config delete mode 100644 arch/arm/boards/scb9328/env/config create mode 100644 arch/arm/boards/tny-a926x/defaultenv-tny-a926x/bin/init_board create mode 100644 arch/arm/boards/tny-a926x/defaultenv-tny-a926x/config delete mode 100644 arch/arm/boards/tny-a926x/env/bin/init_board delete mode 100644 arch/arm/boards/tny-a926x/env/config create mode 100644 arch/arm/boards/usb-a926x/defaultenv-usb-a926x/bin/init_board create mode 100644 arch/arm/boards/usb-a926x/defaultenv-usb-a926x/config delete mode 100644 arch/arm/boards/usb-a926x/env/bin/init_board delete mode 100644 arch/arm/boards/usb-a926x/env/config create mode 100644 arch/arm/boards/vexpress/defaultenv-vexpress/config delete mode 100644 arch/arm/boards/vexpress/env/config create mode 100644 arch/nios2/boards/generic/defaultenv-generic/config delete mode 100644 arch/nios2/boards/generic/env/config create mode 100644 arch/ppc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/bin/init create mode 100644 arch/ppc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/config delete mode 100644 arch/ppc/boards/freescale-p1010rdb/env/bin/init delete mode 100644 arch/ppc/boards/freescale-p1010rdb/env/config create mode 100644 arch/ppc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/bin/init create mode 100644 arch/ppc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/config delete mode 100644 arch/ppc/boards/freescale-p1022ds/env/bin/init delete mode 100644 arch/ppc/boards/freescale-p1022ds/env/config create mode 100644 arch/ppc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/bin/init create mode 100644 arch/ppc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/config delete mode 100644 arch/ppc/boards/freescale-p2020rdb/env/bin/init delete mode 100644 arch/ppc/boards/freescale-p2020rdb/env/config create mode 100644 arch/ppc/boards/geip-da923rc/defaultenv-geip-da923rc/bin/boot create mode 100644 arch/ppc/boards/geip-da923rc/defaultenv-geip-da923rc/bin/init create mode 100644 arch/ppc/boards/geip-da923rc/defaultenv-geip-da923rc/config delete mode 100644 arch/ppc/boards/geip-da923rc/env/bin/boot delete mode 100644 arch/ppc/boards/geip-da923rc/env/bin/init delete mode 100644 arch/ppc/boards/geip-da923rc/env/config diff --git a/arch/arm/boards/animeo_ip/Makefile b/arch/arm/boards/animeo_ip/Makefile index eb072c0161..510b142ff3 100644 --- a/arch/arm/boards/animeo_ip/Makefile +++ b/arch/arm/boards/animeo_ip/Makefile @@ -1 +1,2 @@ obj-y += init.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-animeo_ip diff --git a/arch/arm/boards/animeo_ip/defaultenv-animeo_ip/config b/arch/arm/boards/animeo_ip/defaultenv-animeo_ip/config new file mode 100644 index 0000000000..7526fcfc79 --- /dev/null +++ b/arch/arm/boards/animeo_ip/defaultenv-animeo_ip/config @@ -0,0 +1,39 @@ +#!/bin/sh + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=dhcp-barebox +global.dhcp.vendor_id=barebox-animeo-ip + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.serverip=a.b.c.d + +# can be either 'nfs', 'tftp', 'nor' or 'nand' +kernel_loc=nfs +# can be either 'net', 'nor', 'nand' or 'initrd' +rootfs_loc=net +# can be either 'nfs', 'tftp', 'nor', 'nand' or empty +oftree_loc=nfs + +# can be either 'jffs2' or 'ubifs' +rootfs_type=ubifs +rootfsimage=root.$rootfs_type + +kernelimage=zImage +#kernelimage=uImage +#kernelimage=Image +#kernelimage=Image.lzo + +nand_device=atmel_nand +nand_parts="32k(at91bootstrap),320k(barebox)ro,32k(bareboxenv),-(ubi)" +rootfs_mtdblock_nand=3 + +autoboot_timeout=3 + +bootargs="console=ttyS1,38400n8 earlyprintk" + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# " diff --git a/arch/arm/boards/animeo_ip/env/config b/arch/arm/boards/animeo_ip/env/config deleted file mode 100644 index 7526fcfc79..0000000000 --- a/arch/arm/boards/animeo_ip/env/config +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=dhcp-barebox -global.dhcp.vendor_id=barebox-animeo-ip - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.netmask=a.b.c.d -#eth0.gateway=a.b.c.d -#eth0.serverip=a.b.c.d - -# can be either 'nfs', 'tftp', 'nor' or 'nand' -kernel_loc=nfs -# can be either 'net', 'nor', 'nand' or 'initrd' -rootfs_loc=net -# can be either 'nfs', 'tftp', 'nor', 'nand' or empty -oftree_loc=nfs - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root.$rootfs_type - -kernelimage=zImage -#kernelimage=uImage -#kernelimage=Image -#kernelimage=Image.lzo - -nand_device=atmel_nand -nand_parts="32k(at91bootstrap),320k(barebox)ro,32k(bareboxenv),-(ubi)" -rootfs_mtdblock_nand=3 - -autoboot_timeout=3 - -bootargs="console=ttyS1,38400n8 earlyprintk" - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# " diff --git a/arch/arm/boards/animeo_ip/init.c b/arch/arm/boards/animeo_ip/init.c index 14b33dc691..847417398a 100644 --- a/arch/arm/boards/animeo_ip/init.c +++ b/arch/arm/boards/animeo_ip/init.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -321,6 +322,9 @@ static int animeo_ip_devices_init(void) animeo_ip_add_device_eth(); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_animeo_ip); + return 0; } diff --git a/arch/arm/boards/at91rm9200ek/Makefile b/arch/arm/boards/at91rm9200ek/Makefile index eb072c0161..dec1c50455 100644 --- a/arch/arm/boards/at91rm9200ek/Makefile +++ b/arch/arm/boards/at91rm9200ek/Makefile @@ -1 +1,2 @@ obj-y += init.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-at91rm9200ek diff --git a/arch/arm/boards/at91rm9200ek/defaultenv-at91rm9200ek/bin/init_board b/arch/arm/boards/at91rm9200ek/defaultenv-at91rm9200ek/bin/init_board new file mode 100644 index 0000000000..0d40eb41a5 --- /dev/null +++ b/arch/arm/boards/at91rm9200ek/defaultenv-at91rm9200ek/bin/init_board @@ -0,0 +1,11 @@ +#!/bin/sh + +if [ $at91_udc0.vbus != 1 ] +then + echo "No USB Device cable plugged, normal boot" + exit +fi + +autoboot_timeout=16 +echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" +usbserial diff --git a/arch/arm/boards/at91rm9200ek/defaultenv-at91rm9200ek/config b/arch/arm/boards/at91rm9200ek/defaultenv-at91rm9200ek/config new file mode 100644 index 0000000000..76c180bcac --- /dev/null +++ b/arch/arm/boards/at91rm9200ek/defaultenv-at91rm9200ek/config @@ -0,0 +1,39 @@ +#!/bin/sh + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=dhcp-barebox +global.dhcp.vendor_id=barebox-at91rm9200ek + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.serverip=a.b.c.d + +# can be either 'nfs', 'tftp' or 'nor' +kernel_loc=nfs +# can be either 'net', 'nor' or 'initrd' +rootfs_loc=net +# can be either 'nfs', 'tftp', or empty +oftree_loc=nfs + +# can be either 'jffs2' or 'ubifs' +rootfs_type=ubifs +rootfsimage=root.$rootfs_type + +#kernelimage=zImage +kernelimage=uImage +#kernelimage=Image +#kernelimage=Image.lzo + +nor_parts="256k(barebox)ro,64k(bareboxenv),3M(kernel),-(root)" +rootfs_mtdblock_nor=3 + +autoboot_timeout=3 + +bootargs="console=ttyS0,115200" + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;31m[barebox@\h]:\w\e[0m\n# " + diff --git a/arch/arm/boards/at91rm9200ek/env/bin/init_board b/arch/arm/boards/at91rm9200ek/env/bin/init_board deleted file mode 100644 index 0d40eb41a5..0000000000 --- a/arch/arm/boards/at91rm9200ek/env/bin/init_board +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -if [ $at91_udc0.vbus != 1 ] -then - echo "No USB Device cable plugged, normal boot" - exit -fi - -autoboot_timeout=16 -echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" -usbserial diff --git a/arch/arm/boards/at91rm9200ek/env/config b/arch/arm/boards/at91rm9200ek/env/config deleted file mode 100644 index 76c180bcac..0000000000 --- a/arch/arm/boards/at91rm9200ek/env/config +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=dhcp-barebox -global.dhcp.vendor_id=barebox-at91rm9200ek - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.netmask=a.b.c.d -#eth0.gateway=a.b.c.d -#eth0.serverip=a.b.c.d - -# can be either 'nfs', 'tftp' or 'nor' -kernel_loc=nfs -# can be either 'net', 'nor' or 'initrd' -rootfs_loc=net -# can be either 'nfs', 'tftp', or empty -oftree_loc=nfs - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root.$rootfs_type - -#kernelimage=zImage -kernelimage=uImage -#kernelimage=Image -#kernelimage=Image.lzo - -nor_parts="256k(barebox)ro,64k(bareboxenv),3M(kernel),-(root)" -rootfs_mtdblock_nor=3 - -autoboot_timeout=3 - -bootargs="console=ttyS0,115200" - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;31m[barebox@\h]:\w\e[0m\n# " - diff --git a/arch/arm/boards/at91rm9200ek/init.c b/arch/arm/boards/at91rm9200ek/init.c index 43c8b1b055..7626786e07 100644 --- a/arch/arm/boards/at91rm9200ek/init.c +++ b/arch/arm/boards/at91rm9200ek/init.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -177,6 +178,9 @@ static int at91rm9200ek_devices_init(void) armlinux_set_architecture(MACH_TYPE_AT91RM9200EK); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_at91rm9200ek); + return 0; } device_initcall(at91rm9200ek_devices_init); diff --git a/arch/arm/boards/at91sam9260ek/Makefile b/arch/arm/boards/at91sam9260ek/Makefile index eb072c0161..6e07f189fa 100644 --- a/arch/arm/boards/at91sam9260ek/Makefile +++ b/arch/arm/boards/at91sam9260ek/Makefile @@ -1 +1,2 @@ obj-y += init.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-at91sam9260ek diff --git a/arch/arm/boards/at91sam9260ek/defaultenv-at91sam9260ek/bin/init_board b/arch/arm/boards/at91sam9260ek/defaultenv-at91sam9260ek/bin/init_board new file mode 100644 index 0000000000..f1b476d54a --- /dev/null +++ b/arch/arm/boards/at91sam9260ek/defaultenv-at91sam9260ek/bin/init_board @@ -0,0 +1,37 @@ +#!/bin/sh + +button_name="dfu_bp" +button_wait=5 + +dfu_config="/dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.rootfs.bb(rootfs)r" + +if [ $at91_udc0.vbus != 1 ]; then + echo "No USB Device cable plugged, normal boot" + exit +fi + +gpio_get_value ${dfu_button} +if [ $? = 0 ]; then + echo "${button_name} pressed detected wait ${button_wait}s" + timeout -s -a ${button_wait} + + if [ $at91_udc0.vbus != 1 ]; then + echo "No USB Device cable plugged, normal boot" + exit + fi + + gpio_get_value ${dfu_button} + if [ $? = 0 ]; then + echo "" + echo "Start DFU Mode" + echo "" + led ds5 1 + dfu ${dfu_config} + exit + fi + echo "${button_name} released, normal boot" +fi + +autoboot_timeout=16 +echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" +usbserial diff --git a/arch/arm/boards/at91sam9260ek/defaultenv-at91sam9260ek/config b/arch/arm/boards/at91sam9260ek/defaultenv-at91sam9260ek/config new file mode 100644 index 0000000000..8e88186217 --- /dev/null +++ b/arch/arm/boards/at91sam9260ek/defaultenv-at91sam9260ek/config @@ -0,0 +1,45 @@ +#!/bin/sh + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=dhcp-barebox + +if [ x$armlinux_architecture = x1099 ] +then + global.dhcp.vendor_id=barebox-at91sam9260ek +else + global.dhcp.vendor_id=barebox-at91sam9g20ek +fi + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.serverip=a.b.c.d + +# can be either 'nfs', 'tftp', 'nor' or 'nand' +kernel_loc=nfs +# can be either 'net', 'nor', 'nand' or 'initrd' +rootfs_loc=net +# can be either 'nfs', 'tftp', 'nor', 'nand' or empty +oftree_loc=nfs + +# can be either 'jffs2' or 'ubifs' +rootfs_type=ubifs +rootfsimage=root.$rootfs_type + +kernelimage=zImage +#kernelimage=uImage +#kernelimage=Image +#kernelimage=Image.lzo + +nand_device=atmel_nand +nand_parts="128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),128k(oftree),4M(kernel),120M(rootfs),-(data)" +rootfs_mtdblock_nand=6 + +autoboot_timeout=3 + +bootargs="console=ttyS0,115200" + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# " diff --git a/arch/arm/boards/at91sam9260ek/env/bin/init_board b/arch/arm/boards/at91sam9260ek/env/bin/init_board deleted file mode 100644 index f1b476d54a..0000000000 --- a/arch/arm/boards/at91sam9260ek/env/bin/init_board +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -button_name="dfu_bp" -button_wait=5 - -dfu_config="/dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.rootfs.bb(rootfs)r" - -if [ $at91_udc0.vbus != 1 ]; then - echo "No USB Device cable plugged, normal boot" - exit -fi - -gpio_get_value ${dfu_button} -if [ $? = 0 ]; then - echo "${button_name} pressed detected wait ${button_wait}s" - timeout -s -a ${button_wait} - - if [ $at91_udc0.vbus != 1 ]; then - echo "No USB Device cable plugged, normal boot" - exit - fi - - gpio_get_value ${dfu_button} - if [ $? = 0 ]; then - echo "" - echo "Start DFU Mode" - echo "" - led ds5 1 - dfu ${dfu_config} - exit - fi - echo "${button_name} released, normal boot" -fi - -autoboot_timeout=16 -echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" -usbserial diff --git a/arch/arm/boards/at91sam9260ek/env/config b/arch/arm/boards/at91sam9260ek/env/config deleted file mode 100644 index 8e88186217..0000000000 --- a/arch/arm/boards/at91sam9260ek/env/config +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=dhcp-barebox - -if [ x$armlinux_architecture = x1099 ] -then - global.dhcp.vendor_id=barebox-at91sam9260ek -else - global.dhcp.vendor_id=barebox-at91sam9g20ek -fi - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.netmask=a.b.c.d -#eth0.gateway=a.b.c.d -#eth0.serverip=a.b.c.d - -# can be either 'nfs', 'tftp', 'nor' or 'nand' -kernel_loc=nfs -# can be either 'net', 'nor', 'nand' or 'initrd' -rootfs_loc=net -# can be either 'nfs', 'tftp', 'nor', 'nand' or empty -oftree_loc=nfs - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root.$rootfs_type - -kernelimage=zImage -#kernelimage=uImage -#kernelimage=Image -#kernelimage=Image.lzo - -nand_device=atmel_nand -nand_parts="128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),128k(oftree),4M(kernel),120M(rootfs),-(data)" -rootfs_mtdblock_nand=6 - -autoboot_timeout=3 - -bootargs="console=ttyS0,115200" - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# " diff --git a/arch/arm/boards/at91sam9260ek/init.c b/arch/arm/boards/at91sam9260ek/init.c index 422feb2098..5a21ac12fe 100644 --- a/arch/arm/boards/at91sam9260ek/init.c +++ b/arch/arm/boards/at91sam9260ek/init.c @@ -14,6 +14,7 @@ #include #include +#include #include #include #include @@ -261,6 +262,9 @@ static int at91sam9260ek_devices_init(void) devfs_add_partition("nand0", SZ_512K, SZ_128K, DEVFS_PARTITION_FIXED, "env_raw1"); dev_add_bb_dev("env_raw1", "env1"); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_at91sam9260ek); + return 0; } device_initcall(at91sam9260ek_devices_init); diff --git a/arch/arm/boards/at91sam9261ek/Makefile b/arch/arm/boards/at91sam9261ek/Makefile index 1398c26a0f..1764da93f2 100644 --- a/arch/arm/boards/at91sam9261ek/Makefile +++ b/arch/arm/boards/at91sam9261ek/Makefile @@ -1,3 +1,4 @@ obj-y += init.o lwl-$(CONFIG_HAVE_AT91_LOWLEVEL_INIT) += lowlevel_init.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-at91sam9261ek diff --git a/arch/arm/boards/at91sam9261ek/defaultenv-at91sam9261ek/bin/init_board b/arch/arm/boards/at91sam9261ek/defaultenv-at91sam9261ek/bin/init_board new file mode 100644 index 0000000000..39a7f0826b --- /dev/null +++ b/arch/arm/boards/at91sam9261ek/defaultenv-at91sam9261ek/bin/init_board @@ -0,0 +1,55 @@ +#!/bin/sh + +splash=/env/splash.png + +if [ -f ${splash} -a -e /dev/fb0 ]; then + splash -o ${splash} + fb0.enable=1 +fi + +button_name="dfu_bp" +button_wait=5 + +dfu_config="/dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.rootfs.bb(rootfs)r" + +if [ $at91_udc0.vbus != 1 ] +then + echo "No USB Device cable plugged, normal boot" + exit +fi + +gpio_get_value ${dfu_button} +if [ $? != 0 ] +then + autoboot_timeout=16 + echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" + usbserial + exit +fi + +echo "${button_name} pressed detected wait ${button_wait}s" +timeout -s -a ${button_wait} + +if [ $at91_udc0.vbus != 1 ] +then + echo "No USB Device cable plugged, normal boot" + exit +fi + +gpio_get_value ${dfu_button} +if [ $? != 0 ] +then + echo "${button_name} released, normal boot" + autoboot_timeout=16 + echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" + usbserial + exit +fi + +echo "" +echo "Start DFU Mode" +echo "" + +led ds7 1 +dfu ${dfu_config} +led ds7 0 diff --git a/arch/arm/boards/at91sam9261ek/defaultenv-at91sam9261ek/config b/arch/arm/boards/at91sam9261ek/defaultenv-at91sam9261ek/config new file mode 100644 index 0000000000..cb3e847f54 --- /dev/null +++ b/arch/arm/boards/at91sam9261ek/defaultenv-at91sam9261ek/config @@ -0,0 +1,51 @@ +#!/bin/sh + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=dhcp-barebox + +if [ x$armlinux_architecture = x848 ] +then + global.dhcp.vendor_id=barebox-at91sam9261ek +else + global.dhcp.vendor_id=barebox-at91sam9g10ek +fi + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.serverip=a.b.c.d + +# can be either 'nfs', 'tftp' or 'nand' +kernel_loc=nfs +# can be either 'net', 'nand' or 'initrd' +rootfs_loc=net +# can be either 'nfs', 'tftp', 'nand' or empty +oftree_loc=nfs + +# can be either 'jffs2' or 'ubifs' +rootfs_type=ubifs +rootfsimage=root.$rootfs_type + +kernelimage=zImage +#kernelimage=uImage +#kernelimage=Image +#kernelimage=Image.lzo + +nand_device=atmel_nand +if [ x$borebox_first_stage = x1 ] +then + nand_parts="384k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),128k(oftree),4M(kernel),120M(rootfs),-(data)" + rootfs_mtdblock_nand=5 +else + nand_parts="128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),128k(oftree),4M(kernel),120M(rootfs),-(data)" + rootfs_mtdblock_nand=6 +fi + +autoboot_timeout=3 + +bootargs="console=ttyS0,115200" + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# " diff --git a/arch/arm/boards/at91sam9261ek/env/bin/init_board b/arch/arm/boards/at91sam9261ek/env/bin/init_board deleted file mode 100644 index 39a7f0826b..0000000000 --- a/arch/arm/boards/at91sam9261ek/env/bin/init_board +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/sh - -splash=/env/splash.png - -if [ -f ${splash} -a -e /dev/fb0 ]; then - splash -o ${splash} - fb0.enable=1 -fi - -button_name="dfu_bp" -button_wait=5 - -dfu_config="/dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.rootfs.bb(rootfs)r" - -if [ $at91_udc0.vbus != 1 ] -then - echo "No USB Device cable plugged, normal boot" - exit -fi - -gpio_get_value ${dfu_button} -if [ $? != 0 ] -then - autoboot_timeout=16 - echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" - usbserial - exit -fi - -echo "${button_name} pressed detected wait ${button_wait}s" -timeout -s -a ${button_wait} - -if [ $at91_udc0.vbus != 1 ] -then - echo "No USB Device cable plugged, normal boot" - exit -fi - -gpio_get_value ${dfu_button} -if [ $? != 0 ] -then - echo "${button_name} released, normal boot" - autoboot_timeout=16 - echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" - usbserial - exit -fi - -echo "" -echo "Start DFU Mode" -echo "" - -led ds7 1 -dfu ${dfu_config} -led ds7 0 diff --git a/arch/arm/boards/at91sam9261ek/env/config b/arch/arm/boards/at91sam9261ek/env/config deleted file mode 100644 index cb3e847f54..0000000000 --- a/arch/arm/boards/at91sam9261ek/env/config +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=dhcp-barebox - -if [ x$armlinux_architecture = x848 ] -then - global.dhcp.vendor_id=barebox-at91sam9261ek -else - global.dhcp.vendor_id=barebox-at91sam9g10ek -fi - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.netmask=a.b.c.d -#eth0.gateway=a.b.c.d -#eth0.serverip=a.b.c.d - -# can be either 'nfs', 'tftp' or 'nand' -kernel_loc=nfs -# can be either 'net', 'nand' or 'initrd' -rootfs_loc=net -# can be either 'nfs', 'tftp', 'nand' or empty -oftree_loc=nfs - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root.$rootfs_type - -kernelimage=zImage -#kernelimage=uImage -#kernelimage=Image -#kernelimage=Image.lzo - -nand_device=atmel_nand -if [ x$borebox_first_stage = x1 ] -then - nand_parts="384k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),128k(oftree),4M(kernel),120M(rootfs),-(data)" - rootfs_mtdblock_nand=5 -else - nand_parts="128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),128k(oftree),4M(kernel),120M(rootfs),-(data)" - rootfs_mtdblock_nand=6 -fi - -autoboot_timeout=3 - -bootargs="console=ttyS0,115200" - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# " diff --git a/arch/arm/boards/at91sam9261ek/init.c b/arch/arm/boards/at91sam9261ek/init.c index b9e4914376..72716b8186 100644 --- a/arch/arm/boards/at91sam9261ek/init.c +++ b/arch/arm/boards/at91sam9261ek/init.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -396,6 +397,9 @@ static int at91sam9261ek_devices_init(void) else armlinux_set_architecture(MACH_TYPE_AT91SAM9261EK); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_at91sam9261ek); + return 0; } diff --git a/arch/arm/boards/at91sam9263ek/Makefile b/arch/arm/boards/at91sam9263ek/Makefile index 1398c26a0f..2072cd4164 100644 --- a/arch/arm/boards/at91sam9263ek/Makefile +++ b/arch/arm/boards/at91sam9263ek/Makefile @@ -1,3 +1,4 @@ obj-y += init.o lwl-$(CONFIG_HAVE_AT91_LOWLEVEL_INIT) += lowlevel_init.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-at91sam9263ek diff --git a/arch/arm/boards/at91sam9263ek/defaultenv-at91sam9263ek/bin/init_board b/arch/arm/boards/at91sam9263ek/defaultenv-at91sam9263ek/bin/init_board new file mode 100644 index 0000000000..44972a50ec --- /dev/null +++ b/arch/arm/boards/at91sam9263ek/defaultenv-at91sam9263ek/bin/init_board @@ -0,0 +1,55 @@ +#!/bin/sh + +splash=/env/splash.png + +if [ -f ${splash} -a -e /dev/fb0 ]; then + splash -o ${splash} + fb0.enable=1 +fi + +button_name="dfu_bp" +button_wait=5 + +dfu_config="/dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.rootfs.bb(rootfs)r" + +if [ $at91_udc0.vbus != 1 ] +then + echo "No USB Device cable plugged, normal boot" + exit +fi + +gpio_get_value ${dfu_button} +if [ $? != 0 ] +then + autoboot_timeout=16 + echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" + usbserial + exit +fi + +echo "${button_name} pressed detected wait ${button_wait}s" +timeout -s -a ${button_wait} + +if [ $at91_udc0.vbus != 1 ] +then + echo "No USB Device cable plugged, normal boot" + exit +fi + +gpio_get_value ${dfu_button} +if [ $? != 0 ] +then + echo "${button_name} released, normal boot" + autoboot_timeout=16 + echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" + usbserial + exit +fi + +echo "" +echo "Start DFU Mode" +echo "" + +led ds2 1 +dfu ${dfu_config} +led ds2 0 diff --git a/arch/arm/boards/at91sam9263ek/defaultenv-at91sam9263ek/config b/arch/arm/boards/at91sam9263ek/defaultenv-at91sam9263ek/config new file mode 100644 index 0000000000..5125020a73 --- /dev/null +++ b/arch/arm/boards/at91sam9263ek/defaultenv-at91sam9263ek/config @@ -0,0 +1,42 @@ +#!/bin/sh + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=dhcp-barebox +global.dhcp.vendor_id=barebox-at91sam9263ek + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.serverip=a.b.c.d + +# can be either 'nfs', 'tftp', 'nor' or 'nand' +kernel_loc=nfs +# can be either 'net', 'nor', 'nand' or 'initrd' +rootfs_loc=net +# can be either 'nfs', 'tftp', 'nor', 'nand' or empty +oftree_loc=nfs + +# can be either 'jffs2' or 'ubifs' +rootfs_type=ubifs +rootfsimage=root.$rootfs_type + +kernelimage=zImage +#kernelimage=uImage +#kernelimage=Image +#kernelimage=Image.lzo + +nand_device=atmel_nand +nand_parts="128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),128k(oftree),4M(kernel),120M(rootfs),-(data)" +rootfs_mtdblock_nand=6 + +nor_parts="256k(barebox),64k(bareboxenv),64k(oftree)4M(kernel),-(root)" + +autoboot_timeout=3 + +bootargs="console=ttyS0,115200" + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " + diff --git a/arch/arm/boards/at91sam9263ek/env/bin/init_board b/arch/arm/boards/at91sam9263ek/env/bin/init_board deleted file mode 100644 index 44972a50ec..0000000000 --- a/arch/arm/boards/at91sam9263ek/env/bin/init_board +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/sh - -splash=/env/splash.png - -if [ -f ${splash} -a -e /dev/fb0 ]; then - splash -o ${splash} - fb0.enable=1 -fi - -button_name="dfu_bp" -button_wait=5 - -dfu_config="/dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.rootfs.bb(rootfs)r" - -if [ $at91_udc0.vbus != 1 ] -then - echo "No USB Device cable plugged, normal boot" - exit -fi - -gpio_get_value ${dfu_button} -if [ $? != 0 ] -then - autoboot_timeout=16 - echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" - usbserial - exit -fi - -echo "${button_name} pressed detected wait ${button_wait}s" -timeout -s -a ${button_wait} - -if [ $at91_udc0.vbus != 1 ] -then - echo "No USB Device cable plugged, normal boot" - exit -fi - -gpio_get_value ${dfu_button} -if [ $? != 0 ] -then - echo "${button_name} released, normal boot" - autoboot_timeout=16 - echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" - usbserial - exit -fi - -echo "" -echo "Start DFU Mode" -echo "" - -led ds2 1 -dfu ${dfu_config} -led ds2 0 diff --git a/arch/arm/boards/at91sam9263ek/env/config b/arch/arm/boards/at91sam9263ek/env/config deleted file mode 100644 index 5125020a73..0000000000 --- a/arch/arm/boards/at91sam9263ek/env/config +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=dhcp-barebox -global.dhcp.vendor_id=barebox-at91sam9263ek - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.netmask=a.b.c.d -#eth0.gateway=a.b.c.d -#eth0.serverip=a.b.c.d - -# can be either 'nfs', 'tftp', 'nor' or 'nand' -kernel_loc=nfs -# can be either 'net', 'nor', 'nand' or 'initrd' -rootfs_loc=net -# can be either 'nfs', 'tftp', 'nor', 'nand' or empty -oftree_loc=nfs - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root.$rootfs_type - -kernelimage=zImage -#kernelimage=uImage -#kernelimage=Image -#kernelimage=Image.lzo - -nand_device=atmel_nand -nand_parts="128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),128k(oftree),4M(kernel),120M(rootfs),-(data)" -rootfs_mtdblock_nand=6 - -nor_parts="256k(barebox),64k(bareboxenv),64k(oftree)4M(kernel),-(root)" - -autoboot_timeout=3 - -bootargs="console=ttyS0,115200" - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " - diff --git a/arch/arm/boards/at91sam9263ek/init.c b/arch/arm/boards/at91sam9263ek/init.c index 3bb2ddafa3..682449b7be 100644 --- a/arch/arm/boards/at91sam9263ek/init.c +++ b/arch/arm/boards/at91sam9263ek/init.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -273,6 +274,9 @@ static int at91sam9263ek_devices_init(void) armlinux_set_architecture(MACH_TYPE_AT91SAM9263EK); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_at91sam9263ek); + return 0; } diff --git a/arch/arm/boards/at91sam9m10g45ek/Makefile b/arch/arm/boards/at91sam9m10g45ek/Makefile index eb072c0161..dd8052157e 100644 --- a/arch/arm/boards/at91sam9m10g45ek/Makefile +++ b/arch/arm/boards/at91sam9m10g45ek/Makefile @@ -1 +1,2 @@ obj-y += init.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-at91sam9m10g45ek diff --git a/arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek/bin/boot_board b/arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek/bin/boot_board new file mode 100644 index 0000000000..73daecc001 --- /dev/null +++ b/arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek/bin/boot_board @@ -0,0 +1,58 @@ +#!/bin/sh + +PATH=/env/bin +export PATH + +. /env/config + +splash=/env/splash.png + +if [ -f ${splash} -a -e /dev/fb0 ]; then + splash -o ${splash} + fb0.enable=1 +fi + +menu -r -m boot +menu -a -m boot -d "\e[1;36mWelcome on Barebox Boot Sequence\e[0m" +menu -e -a -m boot -c 'menu_boot' -d "boot (default) " +menu -e -a -m boot -c 'menu_boot -m nand' -d "boot from nand " +menu -e -a -m boot -c 'menu_boot -k nfs -r net' -d "boot from nfs (kernel nfs) " +menu -e -a -m boot -c 'menu_boot -k tftp -r net' -d "boot from nfs (kernel tftp)" +menu -e -a -m boot -c 'clear' -d "\e[2;33mshell \e[0m" +menu -e -a -m boot -u update -d "update " +menu -e -a -m boot -c reset -d "\e[1;31mreset \e[0m" + +# Submenu Update +menu -r -m update +menu -a -m update -d "\e[1;36mUpdate\e[0m" +menu -e -a -m update -u update_barebox -d "\e[2;33mbarebox\e[0m" +menu -e -a -m update -u update_kernel -d "kernel" +menu -e -a -m update -u update_rootfs -d "rootfs" +menu -e -a -m update -c 'true' -d "back " + +# submenu update barebox +menu -r -m update_barebox +menu -a -m update_barebox -d "\e[2;33mBarebox Update Methode\e[0m" +menu -e -a -m update_barebox -c 'update -t barebox -d nand -m tftp -c; echo ; timeout -a 3' -d "tftp " +menu -e -a -m update_barebox -c 'update -t barebox -d nand -m xmodem -c; echo ; timeout -a 3' -d "xmodem" +menu -e -a -m update_barebox -c 'update -t barebox -d nand -m nfs -c; echo ; timeout -a 3' -d "nfs " +menu -e -a -m update_barebox -c 'true' -d "back " + +# submenu update kernel +menu -r -m update_kernel +menu -a -m update_kernel -d "\e[1;36mKernel Update Methode\e[0m" +menu -e -a -m update_kernel -c 'update -t kernel -d nand -m tftp -c; echo ; timeout -a 3' -d "tftp " +menu -e -a -m update_kernel -c 'update -t kernel -d nand -m xmodem -c; echo ; timeout -a 3' -d "xmodem" +menu -e -a -m update_kernel -c 'update -t kernel -d nand -m nfs -c; echo ; timeout -a 3' -d "nfs " +menu -e -a -m update_kernel -c 'true' -d "back " + +# submenu update barebox +menu -r -m update_rootfs +menu -a -m update_rootfs -d "\e[1;36mRootfs Update Methode\e[0m" +menu -e -a -m update_rootfs -c 'update -t rootfs -d nand -m tftp -c; echo ; timeout -a 3' -d "tftp " +menu -e -a -m update_rootfs -c 'update -t rootfs -d nand -m xmodem -c; echo ; timeout -a 3' -d "xmodem" +menu -e -a -m update_rootfs -c 'update -t rootfs -d nand -m nfs -c; echo ; timeout -a 3' -d "nfs " +menu -e -a -m update_rootfs -c 'true' -d "back " + +menu -s -m boot -A $autoboot_timeout +exit 1 diff --git a/arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek/bin/menu_boot b/arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek/bin/menu_boot new file mode 100644 index 0000000000..d0b1396de9 --- /dev/null +++ b/arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek/bin/menu_boot @@ -0,0 +1,37 @@ +#!/bin/sh + +. /env/config + +while getopt "k:r:i:m:" Option +do +if [ ${Option} = k ]; then + kernel_loc=${OPTARG} +elif [ ${Option} = r ]; then + rootfs_loc=${OPTARG} +elif [ ${Option} = i ]; then + ip=${OPTARG} +elif [ ${Option} = m ]; then + mode=${OPTARG} +else +fi +done + +boot_opt= + +if [ x$mode != x ]; then + boot_opt="-m ${mode}" +else + if [ x$kernel_loc != x ]; then + boot_opt="-k ${kernel_loc}" + fi + if [ x$kernel_loc != x ]; then + boot_opt="-r ${rootfs_loc}" + fi +fi + +boot ${boot_opt} -i ${ip} + +echo -n "boot error: Hit any key to return to the menu: " +timeout -a 3 +menu -s -m boot +exit 1 diff --git a/arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek/config b/arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek/config new file mode 100644 index 0000000000..54ed2cb9df --- /dev/null +++ b/arch/arm/boards/at91sam9m10g45ek/defaultenv-at91sam9m10g45ek/config @@ -0,0 +1,40 @@ +#!/bin/sh + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=dhcp-barebox +global.dhcp.vendor_id=barebox-at91sam9m10g45ek + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.serverip=a.b.c.d + +# can be either 'nfs', 'tftp' or 'nand' +kernel_loc=nfs +# can be either 'net', 'nand' or 'initrd' +rootfs_loc=net +# can be either 'nfs', 'tftp', 'nand' or empty +oftree_loc=nfs + +# can be either 'jffs2' or 'ubifs' +rootfs_type=ubifs +rootfsimage=root.$rootfs_type + +kernelimage=zImage +#kernelimage=uImage +#kernelimage=Image +#kernelimage=Image.lzo + +nand_device=atmel_nand +nand_parts="128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),128k(oftree),4M(kernel),120M(rootfs),-(data)" +rootfs_mtdblock_nand=6 + +autoboot_timeout=3 + +bootargs="console=ttyS0,115200 console=tty0" + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " + diff --git a/arch/arm/boards/at91sam9m10g45ek/env/bin/boot_board b/arch/arm/boards/at91sam9m10g45ek/env/bin/boot_board deleted file mode 100644 index 73daecc001..0000000000 --- a/arch/arm/boards/at91sam9m10g45ek/env/bin/boot_board +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh - -PATH=/env/bin -export PATH - -. /env/config - -splash=/env/splash.png - -if [ -f ${splash} -a -e /dev/fb0 ]; then - splash -o ${splash} - fb0.enable=1 -fi - -menu -r -m boot -menu -a -m boot -d "\e[1;36mWelcome on Barebox Boot Sequence\e[0m" -menu -e -a -m boot -c 'menu_boot' -d "boot (default) " -menu -e -a -m boot -c 'menu_boot -m nand' -d "boot from nand " -menu -e -a -m boot -c 'menu_boot -k nfs -r net' -d "boot from nfs (kernel nfs) " -menu -e -a -m boot -c 'menu_boot -k tftp -r net' -d "boot from nfs (kernel tftp)" -menu -e -a -m boot -c 'clear' -d "\e[2;33mshell \e[0m" -menu -e -a -m boot -u update -d "update " -menu -e -a -m boot -c reset -d "\e[1;31mreset \e[0m" - -# Submenu Update -menu -r -m update -menu -a -m update -d "\e[1;36mUpdate\e[0m" -menu -e -a -m update -u update_barebox -d "\e[2;33mbarebox\e[0m" -menu -e -a -m update -u update_kernel -d "kernel" -menu -e -a -m update -u update_rootfs -d "rootfs" -menu -e -a -m update -c 'true' -d "back " - -# submenu update barebox -menu -r -m update_barebox -menu -a -m update_barebox -d "\e[2;33mBarebox Update Methode\e[0m" -menu -e -a -m update_barebox -c 'update -t barebox -d nand -m tftp -c; echo ; timeout -a 3' -d "tftp " -menu -e -a -m update_barebox -c 'update -t barebox -d nand -m xmodem -c; echo ; timeout -a 3' -d "xmodem" -menu -e -a -m update_barebox -c 'update -t barebox -d nand -m nfs -c; echo ; timeout -a 3' -d "nfs " -menu -e -a -m update_barebox -c 'true' -d "back " - -# submenu update kernel -menu -r -m update_kernel -menu -a -m update_kernel -d "\e[1;36mKernel Update Methode\e[0m" -menu -e -a -m update_kernel -c 'update -t kernel -d nand -m tftp -c; echo ; timeout -a 3' -d "tftp " -menu -e -a -m update_kernel -c 'update -t kernel -d nand -m xmodem -c; echo ; timeout -a 3' -d "xmodem" -menu -e -a -m update_kernel -c 'update -t kernel -d nand -m nfs -c; echo ; timeout -a 3' -d "nfs " -menu -e -a -m update_kernel -c 'true' -d "back " - -# submenu update barebox -menu -r -m update_rootfs -menu -a -m update_rootfs -d "\e[1;36mRootfs Update Methode\e[0m" -menu -e -a -m update_rootfs -c 'update -t rootfs -d nand -m tftp -c; echo ; timeout -a 3' -d "tftp " -menu -e -a -m update_rootfs -c 'update -t rootfs -d nand -m xmodem -c; echo ; timeout -a 3' -d "xmodem" -menu -e -a -m update_rootfs -c 'update -t rootfs -d nand -m nfs -c; echo ; timeout -a 3' -d "nfs " -menu -e -a -m update_rootfs -c 'true' -d "back " - -menu -s -m boot -A $autoboot_timeout -exit 1 diff --git a/arch/arm/boards/at91sam9m10g45ek/env/bin/menu_boot b/arch/arm/boards/at91sam9m10g45ek/env/bin/menu_boot deleted file mode 100644 index d0b1396de9..0000000000 --- a/arch/arm/boards/at91sam9m10g45ek/env/bin/menu_boot +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -. /env/config - -while getopt "k:r:i:m:" Option -do -if [ ${Option} = k ]; then - kernel_loc=${OPTARG} -elif [ ${Option} = r ]; then - rootfs_loc=${OPTARG} -elif [ ${Option} = i ]; then - ip=${OPTARG} -elif [ ${Option} = m ]; then - mode=${OPTARG} -else -fi -done - -boot_opt= - -if [ x$mode != x ]; then - boot_opt="-m ${mode}" -else - if [ x$kernel_loc != x ]; then - boot_opt="-k ${kernel_loc}" - fi - if [ x$kernel_loc != x ]; then - boot_opt="-r ${rootfs_loc}" - fi -fi - -boot ${boot_opt} -i ${ip} - -echo -n "boot error: Hit any key to return to the menu: " -timeout -a 3 -menu -s -m boot -exit 1 diff --git a/arch/arm/boards/at91sam9m10g45ek/env/config b/arch/arm/boards/at91sam9m10g45ek/env/config deleted file mode 100644 index 54ed2cb9df..0000000000 --- a/arch/arm/boards/at91sam9m10g45ek/env/config +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=dhcp-barebox -global.dhcp.vendor_id=barebox-at91sam9m10g45ek - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.netmask=a.b.c.d -#eth0.gateway=a.b.c.d -#eth0.serverip=a.b.c.d - -# can be either 'nfs', 'tftp' or 'nand' -kernel_loc=nfs -# can be either 'net', 'nand' or 'initrd' -rootfs_loc=net -# can be either 'nfs', 'tftp', 'nand' or empty -oftree_loc=nfs - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root.$rootfs_type - -kernelimage=zImage -#kernelimage=uImage -#kernelimage=Image -#kernelimage=Image.lzo - -nand_device=atmel_nand -nand_parts="128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),128k(oftree),4M(kernel),120M(rootfs),-(data)" -rootfs_mtdblock_nand=6 - -autoboot_timeout=3 - -bootargs="console=ttyS0,115200 console=tty0" - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " - diff --git a/arch/arm/boards/at91sam9m10g45ek/init.c b/arch/arm/boards/at91sam9m10g45ek/init.c index fb444d820d..ee692630bf 100644 --- a/arch/arm/boards/at91sam9m10g45ek/init.c +++ b/arch/arm/boards/at91sam9m10g45ek/init.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -321,6 +322,9 @@ static int at91sam9m10g45ek_devices_init(void) armlinux_set_architecture(MACH_TYPE_AT91SAM9M10G45EK); ek_set_board_revision(); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_at91sam9m10g45ek); + return 0; } device_initcall(at91sam9m10g45ek_devices_init); diff --git a/arch/arm/boards/at91sam9n12ek/Makefile b/arch/arm/boards/at91sam9n12ek/Makefile index eb072c0161..f5d125a0e7 100644 --- a/arch/arm/boards/at91sam9n12ek/Makefile +++ b/arch/arm/boards/at91sam9n12ek/Makefile @@ -1 +1,2 @@ obj-y += init.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-at91sam9n12ek diff --git a/arch/arm/boards/at91sam9n12ek/defaultenv-at91sam9n12ek/bin/init_board b/arch/arm/boards/at91sam9n12ek/defaultenv-at91sam9n12ek/bin/init_board new file mode 100644 index 0000000000..4931342a0b --- /dev/null +++ b/arch/arm/boards/at91sam9n12ek/defaultenv-at91sam9n12ek/bin/init_board @@ -0,0 +1,54 @@ +#!/bin/sh + +splash=/env/splash.png + +if [ -f ${splash} -a -e /dev/fb0 ]; then + splash -o ${splash} + fb0.enable=1 +fi + +button_name="dfu_bp" +button_wait=5 + +dfu_config="/dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.rootfs.bb(rootfs)r" + +if [ $at91_udc.vbus != 1 ] +then + echo "No USB Device cable plugged, normal boot" + exit +fi + +gpio_get_value ${dfu_button} +if [ $? != 0 ] +then + autoboot_timeout=16 + echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" + usbserial + exit +fi + +echo "${button_name} pressed detected wait ${button_wait}s" +timeout -s -a ${button_wait} + +if [ $at91_udc.vbus != 1 ] +then + echo "No USB Device cable plugged, normal boot" + exit +fi + +gpio_get_value ${dfu_button} +if [ $? != 0 ] +then + echo "${button_name} released, normal boot" + autoboot_timeout=16 + echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" + usbserial + exit +fi + +echo "" +echo "Start DFU Mode" +echo "" + +led ds5 1 +dfu ${dfu_config} diff --git a/arch/arm/boards/at91sam9n12ek/defaultenv-at91sam9n12ek/config b/arch/arm/boards/at91sam9n12ek/defaultenv-at91sam9n12ek/config new file mode 100644 index 0000000000..f5cd1cc0f7 --- /dev/null +++ b/arch/arm/boards/at91sam9n12ek/defaultenv-at91sam9n12ek/config @@ -0,0 +1,41 @@ +#!/bin/sh + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=dhcp-barebox +global.dhcp.vendor_id=barebox-at91sam9n12ek + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.serverip=a.b.c.d + +# can be either 'nfs', 'tftp', 'nor' or 'nand' +kernel_loc=nfs +# can be either 'net', 'nor', 'nand' or 'initrd' +rootfs_loc=net +# can be either 'nfs', 'tftp', 'nand' or empty +oftree_loc=nfs + +# can be either 'jffs2' or 'ubifs' +rootfs_type=ubifs +rootfsimage=root.$rootfs_type +ubiroot=rootfs + +# The image type of the kernel. Can be uimage, zimage, raw, or raw_lzo +kernelimage=zImage +#kernelimage=uImage +#kernelimage=Image +#kernelimage=Image.lzo + +nand_device=atmel_nand +nand_parts="256k(at91bootstrap),384k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),128k(oftree),1M(free),6M(kernel),120M(rootfs),-(data)" +rootfs_mtdblock_nand=7 + +autoboot_timeout=3 + +bootargs="console=ttyS0,115200" + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# " diff --git a/arch/arm/boards/at91sam9n12ek/env/bin/init_board b/arch/arm/boards/at91sam9n12ek/env/bin/init_board deleted file mode 100644 index 4931342a0b..0000000000 --- a/arch/arm/boards/at91sam9n12ek/env/bin/init_board +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh - -splash=/env/splash.png - -if [ -f ${splash} -a -e /dev/fb0 ]; then - splash -o ${splash} - fb0.enable=1 -fi - -button_name="dfu_bp" -button_wait=5 - -dfu_config="/dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.rootfs.bb(rootfs)r" - -if [ $at91_udc.vbus != 1 ] -then - echo "No USB Device cable plugged, normal boot" - exit -fi - -gpio_get_value ${dfu_button} -if [ $? != 0 ] -then - autoboot_timeout=16 - echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" - usbserial - exit -fi - -echo "${button_name} pressed detected wait ${button_wait}s" -timeout -s -a ${button_wait} - -if [ $at91_udc.vbus != 1 ] -then - echo "No USB Device cable plugged, normal boot" - exit -fi - -gpio_get_value ${dfu_button} -if [ $? != 0 ] -then - echo "${button_name} released, normal boot" - autoboot_timeout=16 - echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" - usbserial - exit -fi - -echo "" -echo "Start DFU Mode" -echo "" - -led ds5 1 -dfu ${dfu_config} diff --git a/arch/arm/boards/at91sam9n12ek/env/config b/arch/arm/boards/at91sam9n12ek/env/config deleted file mode 100644 index f5cd1cc0f7..0000000000 --- a/arch/arm/boards/at91sam9n12ek/env/config +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=dhcp-barebox -global.dhcp.vendor_id=barebox-at91sam9n12ek - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.netmask=a.b.c.d -#eth0.gateway=a.b.c.d -#eth0.serverip=a.b.c.d - -# can be either 'nfs', 'tftp', 'nor' or 'nand' -kernel_loc=nfs -# can be either 'net', 'nor', 'nand' or 'initrd' -rootfs_loc=net -# can be either 'nfs', 'tftp', 'nand' or empty -oftree_loc=nfs - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root.$rootfs_type -ubiroot=rootfs - -# The image type of the kernel. Can be uimage, zimage, raw, or raw_lzo -kernelimage=zImage -#kernelimage=uImage -#kernelimage=Image -#kernelimage=Image.lzo - -nand_device=atmel_nand -nand_parts="256k(at91bootstrap),384k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),128k(oftree),1M(free),6M(kernel),120M(rootfs),-(data)" -rootfs_mtdblock_nand=7 - -autoboot_timeout=3 - -bootargs="console=ttyS0,115200" - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# " diff --git a/arch/arm/boards/at91sam9n12ek/init.c b/arch/arm/boards/at91sam9n12ek/init.c index 2ed58c1995..b9431b2ee1 100644 --- a/arch/arm/boards/at91sam9n12ek/init.c +++ b/arch/arm/boards/at91sam9n12ek/init.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -327,6 +328,9 @@ static int at91sam9n12ek_devices_init(void) devfs_add_partition("nand0", SZ_512K + SZ_256K, SZ_128K, DEVFS_PARTITION_FIXED, "env_raw1"); dev_add_bb_dev("env_raw1", "env1"); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_at91sam9n12ek); + return 0; } device_initcall(at91sam9n12ek_devices_init); diff --git a/arch/arm/boards/at91sam9x5ek/Makefile b/arch/arm/boards/at91sam9x5ek/Makefile index f2acf201b4..559df8f7b9 100644 --- a/arch/arm/boards/at91sam9x5ek/Makefile +++ b/arch/arm/boards/at91sam9x5ek/Makefile @@ -1,2 +1,3 @@ obj-y += init.o obj-y += hw_version.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-at91sam9x5ek diff --git a/arch/arm/boards/at91sam9x5ek/defaultenv-at91sam9x5ek/bin/init_board b/arch/arm/boards/at91sam9x5ek/defaultenv-at91sam9x5ek/bin/init_board new file mode 100644 index 0000000000..f3d417e356 --- /dev/null +++ b/arch/arm/boards/at91sam9x5ek/defaultenv-at91sam9x5ek/bin/init_board @@ -0,0 +1,15 @@ +#!/bin/sh + +PATH=/env/bin +export PATH + +. /env/config + +splash=/env/splash.png + +if [ -f ${splash} -a -e /dev/fb0 ]; then + splash -o ${splash} + fb0.enable=1 +fi + +exit 1 diff --git a/arch/arm/boards/at91sam9x5ek/defaultenv-at91sam9x5ek/config b/arch/arm/boards/at91sam9x5ek/defaultenv-at91sam9x5ek/config new file mode 100644 index 0000000000..b8cf4e3f30 --- /dev/null +++ b/arch/arm/boards/at91sam9x5ek/defaultenv-at91sam9x5ek/config @@ -0,0 +1,42 @@ +#!/bin/sh + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=dhcp-barebox +global.dhcp.vendor_id=barebox-at91sam9x5ek +global.dhcp.client_id="${at91sam9x5cm.board}-${at91sam9x5cm.vendor}" + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.serverip=a.b.c.d + +# can be either 'nfs', 'tftp', 'nor' or 'nand' +kernel_loc=nfs +# can be either 'net', 'nor', 'nand' or 'initrd' +rootfs_loc=net +# can be either 'nfs', 'tftp', 'nand' or empty +oftree_loc=nfs + +# can be either 'jffs2' or 'ubifs' +rootfs_type=ubifs +rootfsimage=root.$rootfs_type +ubiroot=rootfs + +# The image type of the kernel. Can be uimage, zimage, raw, or raw_lzo +kernelimage=zImage +#kernelimage=uImage +#kernelimage=Image +#kernelimage=Image.lzo + +nand_device=atmel_nand +nand_parts="256k(at91bootstrap),384k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),128k(oftree),1M(free),6M(kernel),120M(rootfs),-(data)" +rootfs_mtdblock_nand=7 + +autoboot_timeout=3 + +bootargs="console=ttyS0,115200" + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# " diff --git a/arch/arm/boards/at91sam9x5ek/env/bin/init_board b/arch/arm/boards/at91sam9x5ek/env/bin/init_board deleted file mode 100644 index f3d417e356..0000000000 --- a/arch/arm/boards/at91sam9x5ek/env/bin/init_board +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -PATH=/env/bin -export PATH - -. /env/config - -splash=/env/splash.png - -if [ -f ${splash} -a -e /dev/fb0 ]; then - splash -o ${splash} - fb0.enable=1 -fi - -exit 1 diff --git a/arch/arm/boards/at91sam9x5ek/env/config b/arch/arm/boards/at91sam9x5ek/env/config deleted file mode 100644 index b8cf4e3f30..0000000000 --- a/arch/arm/boards/at91sam9x5ek/env/config +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=dhcp-barebox -global.dhcp.vendor_id=barebox-at91sam9x5ek -global.dhcp.client_id="${at91sam9x5cm.board}-${at91sam9x5cm.vendor}" - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.netmask=a.b.c.d -#eth0.gateway=a.b.c.d -#eth0.serverip=a.b.c.d - -# can be either 'nfs', 'tftp', 'nor' or 'nand' -kernel_loc=nfs -# can be either 'net', 'nor', 'nand' or 'initrd' -rootfs_loc=net -# can be either 'nfs', 'tftp', 'nand' or empty -oftree_loc=nfs - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root.$rootfs_type -ubiroot=rootfs - -# The image type of the kernel. Can be uimage, zimage, raw, or raw_lzo -kernelimage=zImage -#kernelimage=uImage -#kernelimage=Image -#kernelimage=Image.lzo - -nand_device=atmel_nand -nand_parts="256k(at91bootstrap),384k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),128k(oftree),1M(free),6M(kernel),120M(rootfs),-(data)" -rootfs_mtdblock_nand=7 - -autoboot_timeout=3 - -bootargs="console=ttyS0,115200" - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# " diff --git a/arch/arm/boards/at91sam9x5ek/init.c b/arch/arm/boards/at91sam9x5ek/init.c index 1ef35803f7..9fe117c2d8 100644 --- a/arch/arm/boards/at91sam9x5ek/init.c +++ b/arch/arm/boards/at91sam9x5ek/init.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -320,6 +321,9 @@ static int at91sam9x5ek_devices_init(void) devfs_add_partition("nand0", SZ_512K + SZ_256K, SZ_128K, DEVFS_PARTITION_FIXED, "env_raw1"); dev_add_bb_dev("env_raw1", "env1"); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_at91sam9x5ek); + return 0; } device_initcall(at91sam9x5ek_devices_init); diff --git a/arch/arm/boards/eukrea_cpuimx25/Makefile b/arch/arm/boards/eukrea_cpuimx25/Makefile index 4f084760c0..159701d37a 100644 --- a/arch/arm/boards/eukrea_cpuimx25/Makefile +++ b/arch/arm/boards/eukrea_cpuimx25/Makefile @@ -18,3 +18,4 @@ obj-y += eukrea_cpuimx25.o lwl-y += lowlevel.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-eukrea_cpuimx25 diff --git a/arch/arm/boards/eukrea_cpuimx25/defaultenv-eukrea_cpuimx25/bin/init_board b/arch/arm/boards/eukrea_cpuimx25/defaultenv-eukrea_cpuimx25/bin/init_board new file mode 100644 index 0000000000..8f4151c357 --- /dev/null +++ b/arch/arm/boards/eukrea_cpuimx25/defaultenv-eukrea_cpuimx25/bin/init_board @@ -0,0 +1,41 @@ +#!/bin/sh + +if [ -f /env/logo.bmp ]; then + splash /env/logo.bmp + fb0.enable=1 +elif [ -f /env/logo.bmp.lzo ]; then + uncompress /env/logo.bmp.lzo /logo.bmp + splash /logo.bmp + fb0.enable=1 +fi + +if [ ! -z $use_dfu ]; then + gpio_get_value 82 + if [ $? -eq 0 ]; then + gpio_set_value 83 0 + usbserial + timeout -s -a 2 + gpio_get_value 82 + if [ $? -eq 0 ]; then + usbserial -d + dfu -V 0x1234 -P 0x1234 /dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.root.bb(root)r + gpio_get_value 82 + if [ $? -eq 0 ]; then + usbserial + autoboot_timeout=60 + else + reset + fi + else + autoboot_timeout=28 + fi + fi +fi + +if [ -z $eth0.ethaddr ]; then + while [ -z $eth0.ethaddr ]; do + readline "no MAC address set for eth0. please enter the one found on your board: " eth0.ethaddr + done + echo -a /env/config "eth0.ethaddr=$eth0.ethaddr" + saveenv +fi diff --git a/arch/arm/boards/eukrea_cpuimx25/defaultenv-eukrea_cpuimx25/config b/arch/arm/boards/eukrea_cpuimx25/defaultenv-eukrea_cpuimx25/config new file mode 100644 index 0000000000..da19677574 --- /dev/null +++ b/arch/arm/boards/eukrea_cpuimx25/defaultenv-eukrea_cpuimx25/config @@ -0,0 +1,47 @@ +#!/bin/sh + +# otg port mode : can be 'host' or 'device' +otg_mode="device" +# video : can be CMO-QVGA, URT-WVGA, DVI-VGA or DVI-SVGA +video="CMO-QVGA" + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=none + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.serverip=a.b.c.d + +# can be either 'nfs', 'tftp' or 'nand' +kernel_loc=nand +# can be either 'net', 'nand' or 'initrd' +rootfs_loc=nand + +# rootfs +rootfs_type=ubifs +rootfsimage=${global.hostname}/rootfs.$rootfs_type + +# kernel +kernelimage=${global.hostname}/uImage-${global.hostname}.bin + +# barebox and it's env +bareboximage=${global.hostname}/barebox-${global.hostname}.bin +bareboxenvimage=${global.hostname}/bareboxenv-${global.hostname}.bin + +nfsroot="$eth0.serverip:/srv/nfs/${global.hostname}" + +autoboot_timeout=1 + +bootargs="console=ttymxc0,115200 otg_mode=$otg_mode video=imxfb:$video" + +nand_parts="256k(barebox)ro,128k(bareboxenv),3M(kernel),-(root)" +rootfs_mtdblock_nand=3 +nand_device="mxc_nand" +ubiroot="${global.hostname}-rootfs" +device_type="nand" + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " diff --git a/arch/arm/boards/eukrea_cpuimx25/env/bin/init_board b/arch/arm/boards/eukrea_cpuimx25/env/bin/init_board deleted file mode 100644 index 8f4151c357..0000000000 --- a/arch/arm/boards/eukrea_cpuimx25/env/bin/init_board +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -if [ -f /env/logo.bmp ]; then - splash /env/logo.bmp - fb0.enable=1 -elif [ -f /env/logo.bmp.lzo ]; then - uncompress /env/logo.bmp.lzo /logo.bmp - splash /logo.bmp - fb0.enable=1 -fi - -if [ ! -z $use_dfu ]; then - gpio_get_value 82 - if [ $? -eq 0 ]; then - gpio_set_value 83 0 - usbserial - timeout -s -a 2 - gpio_get_value 82 - if [ $? -eq 0 ]; then - usbserial -d - dfu -V 0x1234 -P 0x1234 /dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.root.bb(root)r - gpio_get_value 82 - if [ $? -eq 0 ]; then - usbserial - autoboot_timeout=60 - else - reset - fi - else - autoboot_timeout=28 - fi - fi -fi - -if [ -z $eth0.ethaddr ]; then - while [ -z $eth0.ethaddr ]; do - readline "no MAC address set for eth0. please enter the one found on your board: " eth0.ethaddr - done - echo -a /env/config "eth0.ethaddr=$eth0.ethaddr" - saveenv -fi diff --git a/arch/arm/boards/eukrea_cpuimx25/env/config b/arch/arm/boards/eukrea_cpuimx25/env/config deleted file mode 100644 index da19677574..0000000000 --- a/arch/arm/boards/eukrea_cpuimx25/env/config +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh - -# otg port mode : can be 'host' or 'device' -otg_mode="device" -# video : can be CMO-QVGA, URT-WVGA, DVI-VGA or DVI-SVGA -video="CMO-QVGA" - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=none - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.netmask=a.b.c.d -#eth0.gateway=a.b.c.d -#eth0.serverip=a.b.c.d - -# can be either 'nfs', 'tftp' or 'nand' -kernel_loc=nand -# can be either 'net', 'nand' or 'initrd' -rootfs_loc=nand - -# rootfs -rootfs_type=ubifs -rootfsimage=${global.hostname}/rootfs.$rootfs_type - -# kernel -kernelimage=${global.hostname}/uImage-${global.hostname}.bin - -# barebox and it's env -bareboximage=${global.hostname}/barebox-${global.hostname}.bin -bareboxenvimage=${global.hostname}/bareboxenv-${global.hostname}.bin - -nfsroot="$eth0.serverip:/srv/nfs/${global.hostname}" - -autoboot_timeout=1 - -bootargs="console=ttymxc0,115200 otg_mode=$otg_mode video=imxfb:$video" - -nand_parts="256k(barebox)ro,128k(bareboxenv),3M(kernel),-(root)" -rootfs_mtdblock_nand=3 -nand_device="mxc_nand" -ubiroot="${global.hostname}-rootfs" -device_type="nand" - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " diff --git a/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c b/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c index 90451911e4..25bf40ce79 100644 --- a/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c +++ b/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -216,6 +217,9 @@ static int eukrea_cpuimx25_devices_init(void) armlinux_set_architecture(MACH_TYPE_EUKREA_CPUIMX25SD); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_eukrea_cpuimx25); + return 0; } diff --git a/arch/arm/boards/eukrea_cpuimx35/Makefile b/arch/arm/boards/eukrea_cpuimx35/Makefile index 060f3b107a..3ef2c4e5f5 100644 --- a/arch/arm/boards/eukrea_cpuimx35/Makefile +++ b/arch/arm/boards/eukrea_cpuimx35/Makefile @@ -18,3 +18,4 @@ obj-y += eukrea_cpuimx35.o lwl-y += lowlevel.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-eukrea_cpuimx35 diff --git a/arch/arm/boards/eukrea_cpuimx35/defaultenv-eukrea_cpuimx35/bin/init_board b/arch/arm/boards/eukrea_cpuimx35/defaultenv-eukrea_cpuimx35/bin/init_board new file mode 100644 index 0000000000..2a07a8425a --- /dev/null +++ b/arch/arm/boards/eukrea_cpuimx35/defaultenv-eukrea_cpuimx35/bin/init_board @@ -0,0 +1,41 @@ +#!/bin/sh + +if [ -f /env/logo.bmp ]; then + splash /env/logo.bmp + fb0.enable=1 + gpio_set_value 1 1 +elif [ -f /env/logo.bmp.lzo ]; then + uncompress /env/logo.bmp.lzo /logo.bmp + splash /logo.bmp + fb0.enable=1 + gpio_set_value 1 1 +fi + +gpio_get_value 89 +if [ $? -eq 0 ]; then + gpio_set_value 93 0 + usbserial + timeout -s -a 2 + gpio_get_value 89 + if [ $? -eq 0 ]; then + usbserial -d + dfu -V 0x1234 -P 0x1234 /dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.root.bb(root)r + gpio_get_value 89 + if [ $? -eq 0 ]; then + usbserial + autoboot_timeout=60 + else + reset + fi + else + autoboot_timeout=28 + fi +fi + +if [ -z $eth0.ethaddr ]; then + while [ -z $eth0.ethaddr ]; do + readline "no MAC address set for eth0. please enter the one found on your board: " eth0.ethaddr + done + echo -a /env/config "eth0.ethaddr=$eth0.ethaddr" + saveenv +fi diff --git a/arch/arm/boards/eukrea_cpuimx35/defaultenv-eukrea_cpuimx35/config b/arch/arm/boards/eukrea_cpuimx35/defaultenv-eukrea_cpuimx35/config new file mode 100644 index 0000000000..05c4391d35 --- /dev/null +++ b/arch/arm/boards/eukrea_cpuimx35/defaultenv-eukrea_cpuimx35/config @@ -0,0 +1,47 @@ +#!/bin/sh + +# otg port mode : can be 'host' or 'device' +otg_mode="device" +# video : can be CMO-QVGA, URT-WVGA, DVI-VGA or DVI-SVGA +video="CMO-QVGA" + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=none + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.serverip=a.b.c.d + +# can be either 'nfs', 'tftp' or 'nand' +kernel_loc=nand +# can be either 'net', 'nand' or 'initrd' +rootfs_loc=nand + +# rootfs +rootfs_type=ubifs +rootfsimage=${global.hostname}/rootfs.$rootfs_type + +# kernel +kernelimage=${global.hostname}/uImage-${global.hostname}.bin + +# barebox and it's env +bareboximage=${global.hostname}/barebox-${global.hostname}.bin +bareboxenvimage=${global.hostname}/bareboxenv-${global.hostname}.bin + +nfsroot="$eth0.serverip:/srv/nfs/${global.hostname}" + +autoboot_timeout=1 + +bootargs="console=ttymxc0,115200 otg_mode=$otg_mode video=mx3fb:$video" + +nand_parts="256k(barebox)ro,128k(bareboxenv),3M(kernel),-(root)" +rootfs_mtdblock_nand=3 +nand_device="mxc_nand" +ubiroot="${global.hostname}-rootfs" +device_type="nand" + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " diff --git a/arch/arm/boards/eukrea_cpuimx35/env/bin/init_board b/arch/arm/boards/eukrea_cpuimx35/env/bin/init_board deleted file mode 100644 index 2a07a8425a..0000000000 --- a/arch/arm/boards/eukrea_cpuimx35/env/bin/init_board +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -if [ -f /env/logo.bmp ]; then - splash /env/logo.bmp - fb0.enable=1 - gpio_set_value 1 1 -elif [ -f /env/logo.bmp.lzo ]; then - uncompress /env/logo.bmp.lzo /logo.bmp - splash /logo.bmp - fb0.enable=1 - gpio_set_value 1 1 -fi - -gpio_get_value 89 -if [ $? -eq 0 ]; then - gpio_set_value 93 0 - usbserial - timeout -s -a 2 - gpio_get_value 89 - if [ $? -eq 0 ]; then - usbserial -d - dfu -V 0x1234 -P 0x1234 /dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.root.bb(root)r - gpio_get_value 89 - if [ $? -eq 0 ]; then - usbserial - autoboot_timeout=60 - else - reset - fi - else - autoboot_timeout=28 - fi -fi - -if [ -z $eth0.ethaddr ]; then - while [ -z $eth0.ethaddr ]; do - readline "no MAC address set for eth0. please enter the one found on your board: " eth0.ethaddr - done - echo -a /env/config "eth0.ethaddr=$eth0.ethaddr" - saveenv -fi diff --git a/arch/arm/boards/eukrea_cpuimx35/env/config b/arch/arm/boards/eukrea_cpuimx35/env/config deleted file mode 100644 index 05c4391d35..0000000000 --- a/arch/arm/boards/eukrea_cpuimx35/env/config +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh - -# otg port mode : can be 'host' or 'device' -otg_mode="device" -# video : can be CMO-QVGA, URT-WVGA, DVI-VGA or DVI-SVGA -video="CMO-QVGA" - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=none - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.netmask=a.b.c.d -#eth0.gateway=a.b.c.d -#eth0.serverip=a.b.c.d - -# can be either 'nfs', 'tftp' or 'nand' -kernel_loc=nand -# can be either 'net', 'nand' or 'initrd' -rootfs_loc=nand - -# rootfs -rootfs_type=ubifs -rootfsimage=${global.hostname}/rootfs.$rootfs_type - -# kernel -kernelimage=${global.hostname}/uImage-${global.hostname}.bin - -# barebox and it's env -bareboximage=${global.hostname}/barebox-${global.hostname}.bin -bareboxenvimage=${global.hostname}/bareboxenv-${global.hostname}.bin - -nfsroot="$eth0.serverip:/srv/nfs/${global.hostname}" - -autoboot_timeout=1 - -bootargs="console=ttymxc0,115200 otg_mode=$otg_mode video=mx3fb:$video" - -nand_parts="256k(barebox)ro,128k(bareboxenv),3M(kernel),-(root)" -rootfs_mtdblock_nand=3 -nand_device="mxc_nand" -ubiroot="${global.hostname}-rootfs" -device_type="nand" - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " diff --git a/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c b/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c index 04ef9b2e00..a10763780e 100644 --- a/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c +++ b/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -212,6 +213,9 @@ static int eukrea_cpuimx35_devices_init(void) #endif armlinux_set_architecture(MACH_TYPE_EUKREA_CPUIMX35SD); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_eukrea_cpuimx35); + return 0; } diff --git a/arch/arm/boards/eukrea_cpuimx51/Makefile b/arch/arm/boards/eukrea_cpuimx51/Makefile index 96e26d03ef..e8c84fe17d 100644 --- a/arch/arm/boards/eukrea_cpuimx51/Makefile +++ b/arch/arm/boards/eukrea_cpuimx51/Makefile @@ -1,2 +1,3 @@ obj-y += eukrea_cpuimx51.o lwl-y += lowlevel.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-eukrea_cpuimx51 diff --git a/arch/arm/boards/eukrea_cpuimx51/defaultenv-eukrea_cpuimx51/bin/init_board b/arch/arm/boards/eukrea_cpuimx51/defaultenv-eukrea_cpuimx51/bin/init_board new file mode 100644 index 0000000000..0af65822f1 --- /dev/null +++ b/arch/arm/boards/eukrea_cpuimx51/defaultenv-eukrea_cpuimx51/bin/init_board @@ -0,0 +1,20 @@ +#!/bin/sh + +if [ -f /env/logo.bmp ]; then + splash /env/logo.bmp + fb0.enable=1 + gpio_set_value 1 1 +elif [ -f /env/logo.bmp.lzo ]; then + uncompress /env/logo.bmp.lzo /logo.bmp + splash /logo.bmp + fb0.enable=1 + gpio_set_value 1 1 +fi + +if [ -z $eth0.ethaddr ]; then + while [ -z $eth0.ethaddr ]; do + readline "no MAC address set for eth0. please enter the one found on your board: " eth0.ethaddr + done + echo -a /env/config "eth0.ethaddr=$eth0.ethaddr" + saveenv +fi diff --git a/arch/arm/boards/eukrea_cpuimx51/defaultenv-eukrea_cpuimx51/config b/arch/arm/boards/eukrea_cpuimx51/defaultenv-eukrea_cpuimx51/config new file mode 100644 index 0000000000..57abc1ee3d --- /dev/null +++ b/arch/arm/boards/eukrea_cpuimx51/defaultenv-eukrea_cpuimx51/config @@ -0,0 +1,50 @@ +#!/bin/sh + +# otg port mode : can be 'host' or 'device' +otg_mode="device" +# video mode : can be 'CMO-QVGA' or 'URT-WVGA' or any modefb mode +# ex : 640x480M-16@60 800x600M-24@60 1024x768M-16@60 +video="CMO-QVGA" +# screen type : can be 'tft' or 'dvi' +screen_type="tft" + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=none + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.serverip=a.b.c.d + +# can be either 'nfs', 'tftp' or 'nand' +kernel_loc=nand +# can be either 'net', 'nand' or 'initrd' +rootfs_loc=nand + +# rootfs +rootfs_type=ubifs +rootfsimage=${global.hostname}/rootfs.$rootfs_type + +# kernel +kernelimage=${global.hostname}/uImage-${global.hostname}.bin + +# barebox and it's env +bareboximage=${global.hostname}/barebox-${global.hostname}.bin +bareboxenvimage=${global.hostname}/bareboxenv-${global.hostname}.bin + +nfsroot="$eth0.serverip:/srv/nfs/${global.hostname}" + +autoboot_timeout=1 + +bootargs="console=ttymxc0,115200 otg_mode=$otg_mode video=$video screen_type=$screen_type" + +nand_parts="256k(barebox)ro,128k(bareboxenv),3M(kernel),-(root)" +rootfs_mtdblock_nand=3 +nand_device="mxc_nand" +ubiroot="${global.hostname}-rootfs" +device_type="nand" + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " diff --git a/arch/arm/boards/eukrea_cpuimx51/env/bin/init_board b/arch/arm/boards/eukrea_cpuimx51/env/bin/init_board deleted file mode 100644 index 0af65822f1..0000000000 --- a/arch/arm/boards/eukrea_cpuimx51/env/bin/init_board +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -if [ -f /env/logo.bmp ]; then - splash /env/logo.bmp - fb0.enable=1 - gpio_set_value 1 1 -elif [ -f /env/logo.bmp.lzo ]; then - uncompress /env/logo.bmp.lzo /logo.bmp - splash /logo.bmp - fb0.enable=1 - gpio_set_value 1 1 -fi - -if [ -z $eth0.ethaddr ]; then - while [ -z $eth0.ethaddr ]; do - readline "no MAC address set for eth0. please enter the one found on your board: " eth0.ethaddr - done - echo -a /env/config "eth0.ethaddr=$eth0.ethaddr" - saveenv -fi diff --git a/arch/arm/boards/eukrea_cpuimx51/env/config b/arch/arm/boards/eukrea_cpuimx51/env/config deleted file mode 100644 index 57abc1ee3d..0000000000 --- a/arch/arm/boards/eukrea_cpuimx51/env/config +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh - -# otg port mode : can be 'host' or 'device' -otg_mode="device" -# video mode : can be 'CMO-QVGA' or 'URT-WVGA' or any modefb mode -# ex : 640x480M-16@60 800x600M-24@60 1024x768M-16@60 -video="CMO-QVGA" -# screen type : can be 'tft' or 'dvi' -screen_type="tft" - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=none - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.netmask=a.b.c.d -#eth0.gateway=a.b.c.d -#eth0.serverip=a.b.c.d - -# can be either 'nfs', 'tftp' or 'nand' -kernel_loc=nand -# can be either 'net', 'nand' or 'initrd' -rootfs_loc=nand - -# rootfs -rootfs_type=ubifs -rootfsimage=${global.hostname}/rootfs.$rootfs_type - -# kernel -kernelimage=${global.hostname}/uImage-${global.hostname}.bin - -# barebox and it's env -bareboximage=${global.hostname}/barebox-${global.hostname}.bin -bareboxenvimage=${global.hostname}/bareboxenv-${global.hostname}.bin - -nfsroot="$eth0.serverip:/srv/nfs/${global.hostname}" - -autoboot_timeout=1 - -bootargs="console=ttymxc0,115200 otg_mode=$otg_mode video=$video screen_type=$screen_type" - -nand_parts="256k(barebox)ro,128k(bareboxenv),3M(kernel),-(root)" -rootfs_mtdblock_nand=3 -nand_device="mxc_nand" -ubiroot="${global.hostname}-rootfs" -device_type="nand" - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " diff --git a/arch/arm/boards/eukrea_cpuimx51/eukrea_cpuimx51.c b/arch/arm/boards/eukrea_cpuimx51/eukrea_cpuimx51.c index fc57f6c157..bb493d7c64 100644 --- a/arch/arm/boards/eukrea_cpuimx51/eukrea_cpuimx51.c +++ b/arch/arm/boards/eukrea_cpuimx51/eukrea_cpuimx51.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -122,6 +123,9 @@ static int eukrea_cpuimx51_devices_init(void) armlinux_set_architecture(MACH_TYPE_EUKREA_CPUIMX51SD); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_eukrea_cpuimx51); + return 0; } diff --git a/arch/arm/boards/freescale-mx25-3ds/3stack.c b/arch/arm/boards/freescale-mx25-3ds/3stack.c index 36ad591cc0..3ab8c4ad52 100644 --- a/arch/arm/boards/freescale-mx25-3ds/3stack.c +++ b/arch/arm/boards/freescale-mx25-3ds/3stack.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -156,6 +157,9 @@ static int imx25_3ds_devices_init(void) armlinux_set_architecture(MACH_TYPE_MX25_3DS); armlinux_set_serial(imx_uid()); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_freescale_mx25_3ds); + return 0; } diff --git a/arch/arm/boards/freescale-mx25-3ds/Makefile b/arch/arm/boards/freescale-mx25-3ds/Makefile index 52c416e3a5..20787efc94 100644 --- a/arch/arm/boards/freescale-mx25-3ds/Makefile +++ b/arch/arm/boards/freescale-mx25-3ds/Makefile @@ -18,3 +18,4 @@ lwl-y += lowlevel_init.o obj-y += 3stack.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-freescale-mx25-3ds diff --git a/arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/_update b/arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/_update new file mode 100644 index 0000000000..014bce3512 --- /dev/null +++ b/arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/_update @@ -0,0 +1,36 @@ +#!/bin/sh + +if [ -z "$part" -o -z "$image" ]; then + echo "define \$part and \$image" + exit 1 +fi + +if [ ! -e "$part" ]; then + echo "Partition $part does not exist" + exit 1 +fi + +if [ $# = 1 ]; then + image=$1 +fi + +if [ x$ip = xdhcp ]; then + dhcp +fi + +ping $eth0.serverip +if [ $? -ne 0 ] ; then + echo "update aborted" + exit 1 +fi + +unprotect $part + +echo +echo "erasing partition $part" +erase $part + +echo +echo "flashing $image to $part" +echo +tftp $image $part diff --git a/arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/boot b/arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/boot new file mode 100644 index 0000000000..7bbff2d1f6 --- /dev/null +++ b/arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/boot @@ -0,0 +1,47 @@ +#!/bin/sh + +. /env/config + +if [ x$1 = xnand ]; then + root=nand + kernel=nand +fi + +if [ x$1 = xnet ]; then + root=net + kernel=net +fi + +if [ x$1 = xnor ]; then + root=nor + kernel=nor +fi + +if [ x$ip = xdhcp ]; then + bootargs="$bootargs ip=dhcp" +else + bootargs="$bootargs ip=$eth0.ipaddr:$eth0.serverip:$eth0.gateway:$eth0.netmask:::" +fi + +if [ x$root = xnand ]; then + bootargs="$bootargs root=$rootpart_nand rootfstype=jffs2" +elif [ x$root = xnor ]; then + bootargs="$bootargs root=$rootpart_nor rootfstype=jffs2" +else + bootargs="$bootargs root=/dev/nfs nfsroot=$eth0.serverip:$nfsroot,v3,tcp" +fi + +bootargs="$bootargs mtdparts=physmap-flash.0:$nor_parts;mxc_nand:$nand_parts" + +if [ $kernel = net ]; then + if [ x$ip = xdhcp ]; then + dhcp + fi + tftp $uimage uImage || exit 1 + bootm uImage +elif [ $kernel = nor ]; then + bootm /dev/nor0.kernel +else + bootm /dev/nand0.kernel.bb +fi + diff --git a/arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/init b/arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/init new file mode 100644 index 0000000000..8eafa34dc8 --- /dev/null +++ b/arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/init @@ -0,0 +1,26 @@ +#!/bin/sh + +PATH=/env/bin +export PATH + +. /env/config +if [ -e /dev/nor0 ]; then + addpart /dev/nor0 $nor_parts +fi + +if [ -e /dev/nand0 ]; then + addpart /dev/nand0 $nand_parts +fi + +echo +echo -n "Hit any key to stop autoboot: " +timeout -a $autoboot_timeout +if [ $? != 0 ]; then + echo + echo "type update_kernel nand|nor [] to update kernel into flash" + echo "type update_root nand|nor [] to update rootfs into flash" + echo + exit +fi + +boot diff --git a/arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/update_kernel b/arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/update_kernel new file mode 100644 index 0000000000..05c822d860 --- /dev/null +++ b/arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/update_kernel @@ -0,0 +1,15 @@ +#!/bin/sh + +. /env/config + +image=$uimage +if [ x$1 = xnand ]; then + part=/dev/nand0.kernel.bb +elif [ x$1 = xnor ]; then + part=/dev/nor0.kernel +else + echo "usage: $0 nor|nand [imagename]" + exit 1 +fi + +. /env/bin/_update $2 diff --git a/arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/update_root b/arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/update_root new file mode 100644 index 0000000000..eaf36ebcea --- /dev/null +++ b/arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/bin/update_root @@ -0,0 +1,16 @@ +#!/bin/sh + +. /env/config + +image=$uimage +if [ x$1 = xnand ]; then + part=/dev/nand0.root.bb +elif [ x$1 = xnor ]; then + part=/dev/nor0.root +else + echo "usage: $0 nor|nand [imagename]" + exit 1 +fi + +. /env/bin/_update $2 + diff --git a/arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/config b/arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/config new file mode 100644 index 0000000000..8469935b20 --- /dev/null +++ b/arch/arm/boards/freescale-mx25-3ds/defaultenv-freescale-mx25-3ds/config @@ -0,0 +1,29 @@ +#!/bin/sh + +# can be either 'net', 'nor' or 'nand'' +kernel=net +root=net + +uimage=uImage-pcm043 +jffs2=root-pcm043.jffs2 + +autoboot_timeout=3 + +nfsroot="/ptx/work/octopus/rsc/svn/oselas/bsp/phytec/phyCORE-i.MX27/OSELAS.BSP-Phytec-phyCORE-i.MX27-trunk/root" +bootargs="console=ttymxc0,115200" + +nor_parts="256k(barebox)ro,128k(bareboxenv),2048k(kernel),-(root)" +rootpart_nor="/dev/mtdblock3" + +nand_parts="256k(barebox)ro,128k(bareboxenv),2048k(kernel),108416k(root),-(kernel1)" +rootpart_nand="/dev/mtdblock7" + +# use 'dhcp' to do dhcp in barebox and in kernel +#ip=dhcp + +# or set your networking parameters here +eth0.ipaddr=192.168.3.11 +eth0.netmask=255.255.255.0 +#eth0.gateway=a.b.c.d +eth0.serverip=192.168.3.10 +#eth0.ethaddr= diff --git a/arch/arm/boards/freescale-mx25-3ds/env/bin/_update b/arch/arm/boards/freescale-mx25-3ds/env/bin/_update deleted file mode 100644 index 014bce3512..0000000000 --- a/arch/arm/boards/freescale-mx25-3ds/env/bin/_update +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh - -if [ -z "$part" -o -z "$image" ]; then - echo "define \$part and \$image" - exit 1 -fi - -if [ ! -e "$part" ]; then - echo "Partition $part does not exist" - exit 1 -fi - -if [ $# = 1 ]; then - image=$1 -fi - -if [ x$ip = xdhcp ]; then - dhcp -fi - -ping $eth0.serverip -if [ $? -ne 0 ] ; then - echo "update aborted" - exit 1 -fi - -unprotect $part - -echo -echo "erasing partition $part" -erase $part - -echo -echo "flashing $image to $part" -echo -tftp $image $part diff --git a/arch/arm/boards/freescale-mx25-3ds/env/bin/boot b/arch/arm/boards/freescale-mx25-3ds/env/bin/boot deleted file mode 100644 index 7bbff2d1f6..0000000000 --- a/arch/arm/boards/freescale-mx25-3ds/env/bin/boot +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh - -. /env/config - -if [ x$1 = xnand ]; then - root=nand - kernel=nand -fi - -if [ x$1 = xnet ]; then - root=net - kernel=net -fi - -if [ x$1 = xnor ]; then - root=nor - kernel=nor -fi - -if [ x$ip = xdhcp ]; then - bootargs="$bootargs ip=dhcp" -else - bootargs="$bootargs ip=$eth0.ipaddr:$eth0.serverip:$eth0.gateway:$eth0.netmask:::" -fi - -if [ x$root = xnand ]; then - bootargs="$bootargs root=$rootpart_nand rootfstype=jffs2" -elif [ x$root = xnor ]; then - bootargs="$bootargs root=$rootpart_nor rootfstype=jffs2" -else - bootargs="$bootargs root=/dev/nfs nfsroot=$eth0.serverip:$nfsroot,v3,tcp" -fi - -bootargs="$bootargs mtdparts=physmap-flash.0:$nor_parts;mxc_nand:$nand_parts" - -if [ $kernel = net ]; then - if [ x$ip = xdhcp ]; then - dhcp - fi - tftp $uimage uImage || exit 1 - bootm uImage -elif [ $kernel = nor ]; then - bootm /dev/nor0.kernel -else - bootm /dev/nand0.kernel.bb -fi - diff --git a/arch/arm/boards/freescale-mx25-3ds/env/bin/init b/arch/arm/boards/freescale-mx25-3ds/env/bin/init deleted file mode 100644 index 8eafa34dc8..0000000000 --- a/arch/arm/boards/freescale-mx25-3ds/env/bin/init +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -PATH=/env/bin -export PATH - -. /env/config -if [ -e /dev/nor0 ]; then - addpart /dev/nor0 $nor_parts -fi - -if [ -e /dev/nand0 ]; then - addpart /dev/nand0 $nand_parts -fi - -echo -echo -n "Hit any key to stop autoboot: " -timeout -a $autoboot_timeout -if [ $? != 0 ]; then - echo - echo "type update_kernel nand|nor [] to update kernel into flash" - echo "type update_root nand|nor [] to update rootfs into flash" - echo - exit -fi - -boot diff --git a/arch/arm/boards/freescale-mx25-3ds/env/bin/update_kernel b/arch/arm/boards/freescale-mx25-3ds/env/bin/update_kernel deleted file mode 100644 index 05c822d860..0000000000 --- a/arch/arm/boards/freescale-mx25-3ds/env/bin/update_kernel +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -. /env/config - -image=$uimage -if [ x$1 = xnand ]; then - part=/dev/nand0.kernel.bb -elif [ x$1 = xnor ]; then - part=/dev/nor0.kernel -else - echo "usage: $0 nor|nand [imagename]" - exit 1 -fi - -. /env/bin/_update $2 diff --git a/arch/arm/boards/freescale-mx25-3ds/env/bin/update_root b/arch/arm/boards/freescale-mx25-3ds/env/bin/update_root deleted file mode 100644 index eaf36ebcea..0000000000 --- a/arch/arm/boards/freescale-mx25-3ds/env/bin/update_root +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -. /env/config - -image=$uimage -if [ x$1 = xnand ]; then - part=/dev/nand0.root.bb -elif [ x$1 = xnor ]; then - part=/dev/nor0.root -else - echo "usage: $0 nor|nand [imagename]" - exit 1 -fi - -. /env/bin/_update $2 - diff --git a/arch/arm/boards/freescale-mx25-3ds/env/config b/arch/arm/boards/freescale-mx25-3ds/env/config deleted file mode 100644 index 8469935b20..0000000000 --- a/arch/arm/boards/freescale-mx25-3ds/env/config +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -# can be either 'net', 'nor' or 'nand'' -kernel=net -root=net - -uimage=uImage-pcm043 -jffs2=root-pcm043.jffs2 - -autoboot_timeout=3 - -nfsroot="/ptx/work/octopus/rsc/svn/oselas/bsp/phytec/phyCORE-i.MX27/OSELAS.BSP-Phytec-phyCORE-i.MX27-trunk/root" -bootargs="console=ttymxc0,115200" - -nor_parts="256k(barebox)ro,128k(bareboxenv),2048k(kernel),-(root)" -rootpart_nor="/dev/mtdblock3" - -nand_parts="256k(barebox)ro,128k(bareboxenv),2048k(kernel),108416k(root),-(kernel1)" -rootpart_nand="/dev/mtdblock7" - -# use 'dhcp' to do dhcp in barebox and in kernel -#ip=dhcp - -# or set your networking parameters here -eth0.ipaddr=192.168.3.11 -eth0.netmask=255.255.255.0 -#eth0.gateway=a.b.c.d -eth0.serverip=192.168.3.10 -#eth0.ethaddr= diff --git a/arch/arm/boards/freescale-mx35-3ds/3stack.c b/arch/arm/boards/freescale-mx35-3ds/3stack.c index caeb3f75e8..97a9968706 100644 --- a/arch/arm/boards/freescale-mx35-3ds/3stack.c +++ b/arch/arm/boards/freescale-mx35-3ds/3stack.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -208,6 +209,9 @@ static int f3s_devices_init(void) armlinux_set_architecture(MACH_TYPE_MX35_3DS); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_freescale_mx35_3ds); + return 0; } diff --git a/arch/arm/boards/freescale-mx35-3ds/Makefile b/arch/arm/boards/freescale-mx35-3ds/Makefile index c0de068f2e..c192854f0b 100644 --- a/arch/arm/boards/freescale-mx35-3ds/Makefile +++ b/arch/arm/boards/freescale-mx35-3ds/Makefile @@ -1,2 +1,3 @@ obj-y += 3stack.o lwl-y += lowlevel_init.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-freescale-mx35-3ds diff --git a/arch/arm/boards/freescale-mx35-3ds/defaultenv-freescale-mx35-3ds/config b/arch/arm/boards/freescale-mx35-3ds/defaultenv-freescale-mx35-3ds/config new file mode 100644 index 0000000000..af2fb6b2bc --- /dev/null +++ b/arch/arm/boards/freescale-mx35-3ds/defaultenv-freescale-mx35-3ds/config @@ -0,0 +1,51 @@ +#!/bin/sh + +eth0.serverip= +user= + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=dhcp + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.serverip=a.b.c.d + +# can be either 'nfs', 'tftp', 'nor' or 'nand' +kernel_loc=tftp +# can be either 'net', 'nor', 'nand' or 'initrd' +rootfs_loc=net + +# can be either 'jffs2' or 'ubifs' +rootfs_type=ubifs +rootfsimage=root-${global.hostname}.$rootfs_type + +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo + +if [ -n $user ]; then + kernelimage="$user"-"$kernelimage" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" + rootfsimage="$user"-"$rootfsimage" +else + nfsroot="$eth0.serverip:/path/to/nfs/root" +fi + +autoboot_timeout=3 + +bootargs="console=ttymxc0,115200" + +nor_parts="256k(barebox)ro,512k(bareboxenv),4M(kernel),-(root)" +rootfs_mtdblock_nor=3 + +nand_parts="256k(barebox)ro,512k(bareboxenv),4M(kernel),-(root)" +rootfs_mtdblock_nand=7 +nand_device=mxc_nand + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " + diff --git a/arch/arm/boards/freescale-mx35-3ds/env/config b/arch/arm/boards/freescale-mx35-3ds/env/config deleted file mode 100644 index af2fb6b2bc..0000000000 --- a/arch/arm/boards/freescale-mx35-3ds/env/config +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh - -eth0.serverip= -user= - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=dhcp - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.netmask=a.b.c.d -#eth0.gateway=a.b.c.d -#eth0.serverip=a.b.c.d - -# can be either 'nfs', 'tftp', 'nor' or 'nand' -kernel_loc=tftp -# can be either 'net', 'nor', 'nand' or 'initrd' -rootfs_loc=net - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root-${global.hostname}.$rootfs_type - -kernelimage=zImage-${global.hostname} -#kernelimage=uImage-${global.hostname} -#kernelimage=Image-${global.hostname} -#kernelimage=Image-${global.hostname}.lzo - -if [ -n $user ]; then - kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" - rootfsimage="$user"-"$rootfsimage" -else - nfsroot="$eth0.serverip:/path/to/nfs/root" -fi - -autoboot_timeout=3 - -bootargs="console=ttymxc0,115200" - -nor_parts="256k(barebox)ro,512k(bareboxenv),4M(kernel),-(root)" -rootfs_mtdblock_nor=3 - -nand_parts="256k(barebox)ro,512k(bareboxenv),4M(kernel),-(root)" -rootfs_mtdblock_nand=7 -nand_device=mxc_nand - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " - diff --git a/arch/arm/boards/freescale-mx53-smd/Makefile b/arch/arm/boards/freescale-mx53-smd/Makefile index 01c7a259e9..98ed275396 100644 --- a/arch/arm/boards/freescale-mx53-smd/Makefile +++ b/arch/arm/boards/freescale-mx53-smd/Makefile @@ -1,2 +1,3 @@ obj-y += board.o lwl-y += lowlevel.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-freescale-mx53-smd diff --git a/arch/arm/boards/freescale-mx53-smd/board.c b/arch/arm/boards/freescale-mx53-smd/board.c index 5dbeeb1e7e..2b58f49205 100644 --- a/arch/arm/boards/freescale-mx53-smd/board.c +++ b/arch/arm/boards/freescale-mx53-smd/board.c @@ -26,6 +26,7 @@ #include #include #include +#include #include @@ -135,6 +136,9 @@ static int smd_devices_init(void) armlinux_set_architecture(MACH_TYPE_MX53_SMD); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_freescale_mx53_smd); + return 0; } device_initcall(smd_devices_init); diff --git a/arch/arm/boards/freescale-mx53-smd/defaultenv-freescale-mx53-smd/config b/arch/arm/boards/freescale-mx53-smd/defaultenv-freescale-mx53-smd/config new file mode 100644 index 0000000000..27d2663566 --- /dev/null +++ b/arch/arm/boards/freescale-mx53-smd/defaultenv-freescale-mx53-smd/config @@ -0,0 +1,45 @@ +#!/bin/sh + +eth0.serverip= +user= + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=dhcp + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.serverip=a.b.c.d + +# can be either 'nfs', 'tftp', 'nor' or 'nand' +kernel_loc=tftp +# can be either 'net', 'nor', 'nand' or 'initrd' +rootfs_loc=net + +# can be either 'jffs2' or 'ubifs' +rootfs_type=ubifs +rootfsimage=root-${global.hostname}.$rootfs_type + +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo + +if [ -n $user ]; then + kernelimage="$user"-"$kernelimage" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" + rootfsimage="$user"-"$rootfsimage" +else + nfsroot="$eth0.serverip:/path/to/nfs/root" +fi + +autoboot_timeout=3 + +bootargs="console=ttymxc0,115200" + +disk_parts="256k(barebox)ro,128k(bareboxenv),4M(kernel),-(root)" + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " diff --git a/arch/arm/boards/freescale-mx53-smd/env/config b/arch/arm/boards/freescale-mx53-smd/env/config deleted file mode 100644 index 27d2663566..0000000000 --- a/arch/arm/boards/freescale-mx53-smd/env/config +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -eth0.serverip= -user= - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=dhcp - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.netmask=a.b.c.d -#eth0.gateway=a.b.c.d -#eth0.serverip=a.b.c.d - -# can be either 'nfs', 'tftp', 'nor' or 'nand' -kernel_loc=tftp -# can be either 'net', 'nor', 'nand' or 'initrd' -rootfs_loc=net - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root-${global.hostname}.$rootfs_type - -kernelimage=zImage-${global.hostname} -#kernelimage=uImage-${global.hostname} -#kernelimage=Image-${global.hostname} -#kernelimage=Image-${global.hostname}.lzo - -if [ -n $user ]; then - kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" - rootfsimage="$user"-"$rootfsimage" -else - nfsroot="$eth0.serverip:/path/to/nfs/root" -fi - -autoboot_timeout=3 - -bootargs="console=ttymxc0,115200" - -disk_parts="256k(barebox)ro,128k(bareboxenv),4M(kernel),-(root)" - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " diff --git a/arch/arm/boards/friendlyarm-mini6410/Makefile b/arch/arm/boards/friendlyarm-mini6410/Makefile index 0710d3929a..c04150e97f 100644 --- a/arch/arm/boards/friendlyarm-mini6410/Makefile +++ b/arch/arm/boards/friendlyarm-mini6410/Makefile @@ -1,2 +1,3 @@ obj-y += mini6410.o lwl-y += lowlevel.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-friendlyarm-mini6410 diff --git a/arch/arm/boards/friendlyarm-mini6410/defaultenv-friendlyarm-mini6410/config b/arch/arm/boards/friendlyarm-mini6410/defaultenv-friendlyarm-mini6410/config new file mode 100644 index 0000000000..924d7b8cc7 --- /dev/null +++ b/arch/arm/boards/friendlyarm-mini6410/defaultenv-friendlyarm-mini6410/config @@ -0,0 +1,52 @@ +#!/bin/sh + +machine=mini6410 +eth0.serverip=a.b.c.d.e +user= + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=dhcp + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d.e +#eth0.netmask=a.b.c.d.e +#eth0.gateway=a.b.c.d.e +#eth0.ethaddr= + +# can be either 'nfs', 'tftp' or 'nand' +kernel_loc=tftp +# can be either 'net', 'nand' or 'initrd' +rootfs_loc=net + +# can be either 'jffs2' or 'ubifs' +rootfs_type=ubifs +rootfsimage=root-${machine}.${rootfs_type} + +# The image type of the kernel. Can be uimage, zimage, raw, or raw_lzo +kernelimage=zImage-${machine} +#kernelimage=uImage-$machine +#kernelimage=Image-$machine +#kernelimage=Image-$machine.lzo + +if [ -n $user ]; then + kernelimage="${user}"-"${kernelimage}" + nfsroot="${eth0.serverip}:/home/${user}/nfsroot/${machine}" + rootfsimage="${user}"-"${rootfsimage}" +else + nfsroot="${eth0.serverip}:/path/to/nfs/root" +fi + +autoboot_timeout=3 + +# +# "mini6410" kernel parameter +# 0 .. 9 = screen type +# i = touchscreen with propritary FriendlyARM protocol +# Note: can be "minit6410= " if nothing of these components are connected +# +bootargs="console=ttySAC0,115200 mini6410=0" + +nand_device="nand" +nand_parts="256k(barebox),128k(bareboxenv),1536k(kernel),-(root)" +rootfs_mtdblock_nand=3 diff --git a/arch/arm/boards/friendlyarm-mini6410/env/config b/arch/arm/boards/friendlyarm-mini6410/env/config deleted file mode 100644 index 924d7b8cc7..0000000000 --- a/arch/arm/boards/friendlyarm-mini6410/env/config +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh - -machine=mini6410 -eth0.serverip=a.b.c.d.e -user= - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=dhcp - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d.e -#eth0.netmask=a.b.c.d.e -#eth0.gateway=a.b.c.d.e -#eth0.ethaddr= - -# can be either 'nfs', 'tftp' or 'nand' -kernel_loc=tftp -# can be either 'net', 'nand' or 'initrd' -rootfs_loc=net - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root-${machine}.${rootfs_type} - -# The image type of the kernel. Can be uimage, zimage, raw, or raw_lzo -kernelimage=zImage-${machine} -#kernelimage=uImage-$machine -#kernelimage=Image-$machine -#kernelimage=Image-$machine.lzo - -if [ -n $user ]; then - kernelimage="${user}"-"${kernelimage}" - nfsroot="${eth0.serverip}:/home/${user}/nfsroot/${machine}" - rootfsimage="${user}"-"${rootfsimage}" -else - nfsroot="${eth0.serverip}:/path/to/nfs/root" -fi - -autoboot_timeout=3 - -# -# "mini6410" kernel parameter -# 0 .. 9 = screen type -# i = touchscreen with propritary FriendlyARM protocol -# Note: can be "minit6410= " if nothing of these components are connected -# -bootargs="console=ttySAC0,115200 mini6410=0" - -nand_device="nand" -nand_parts="256k(barebox),128k(bareboxenv),1536k(kernel),-(root)" -rootfs_mtdblock_nand=3 diff --git a/arch/arm/boards/friendlyarm-mini6410/mini6410.c b/arch/arm/boards/friendlyarm-mini6410/mini6410.c index a85b1bd920..90fb3f5c1e 100644 --- a/arch/arm/boards/friendlyarm-mini6410/mini6410.c +++ b/arch/arm/boards/friendlyarm-mini6410/mini6410.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -285,6 +286,9 @@ static int mini6410_devices_init(void) armlinux_set_architecture(MACH_TYPE_MINI6410); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_friendlyarm_mini6410); + return 0; } diff --git a/arch/arm/boards/friendlyarm-tiny6410/Makefile b/arch/arm/boards/friendlyarm-tiny6410/Makefile index bf17eaa2ef..ba3f3360f8 100644 --- a/arch/arm/boards/friendlyarm-tiny6410/Makefile +++ b/arch/arm/boards/friendlyarm-tiny6410/Makefile @@ -1,3 +1,4 @@ obj-y += tiny6410.o lwl-y += lowlevel.o lwl-$(CONFIG_MACH_TINY6410_FA) += development-board.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-friendlyarm-tiny6410 diff --git a/arch/arm/boards/friendlyarm-tiny6410/defaultenv-friendlyarm-tiny6410/config b/arch/arm/boards/friendlyarm-tiny6410/defaultenv-friendlyarm-tiny6410/config new file mode 100644 index 0000000000..f38535be48 --- /dev/null +++ b/arch/arm/boards/friendlyarm-tiny6410/defaultenv-friendlyarm-tiny6410/config @@ -0,0 +1,52 @@ +#!/bin/sh + +machine=tiny6410 +eth0.serverip=a.b.c.d.e +user= + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=dhcp + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d.e +#eth0.netmask=a.b.c.d.e +#eth0.gateway=a.b.c.d.e +#eth0.ethaddr= + +# can be either 'nfs', 'tftp' or 'nand' +kernel_loc=tftp +# can be either 'net', 'nand' or 'initrd' +rootfs_loc=net + +# can be either 'jffs2' or 'ubifs' +rootfs_type=ubifs +rootfsimage=root-${machine}.${rootfs_type} + +# The image type of the kernel. Can be uimage, zimage, raw, or raw_lzo +kernelimage=zImage-${machine} +#kernelimage=uImage-$machine +#kernelimage=Image-$machine +#kernelimage=Image-$machine.lzo + +if [ -n $user ]; then + kernelimage="${user}"-"${kernelimage}" + nfsroot="${eth0.serverip}:/home/${user}/nfsroot/${machine}" + rootfsimage="${user}"-"${rootfsimage}" +else + nfsroot="${eth0.serverip}:/path/to/nfs/root" +fi + +autoboot_timeout=3 + +# +# "tiny6410" kernel parameter +# 0 .. 9 = screen type +# i = touchscreen with propritary FriendlyARM protocol +# Note: can be "tiny6410= " if nothing of these components are connected +# +bootargs="console=ttySAC0,115200 tiny6410=0" + +nand_device="nand" +nand_parts="256k(barebox),128k(bareboxenv),1536k(kernel),-(root)" +rootfs_mtdblock_nand=3 diff --git a/arch/arm/boards/friendlyarm-tiny6410/env/config b/arch/arm/boards/friendlyarm-tiny6410/env/config deleted file mode 100644 index f38535be48..0000000000 --- a/arch/arm/boards/friendlyarm-tiny6410/env/config +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh - -machine=tiny6410 -eth0.serverip=a.b.c.d.e -user= - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=dhcp - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d.e -#eth0.netmask=a.b.c.d.e -#eth0.gateway=a.b.c.d.e -#eth0.ethaddr= - -# can be either 'nfs', 'tftp' or 'nand' -kernel_loc=tftp -# can be either 'net', 'nand' or 'initrd' -rootfs_loc=net - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root-${machine}.${rootfs_type} - -# The image type of the kernel. Can be uimage, zimage, raw, or raw_lzo -kernelimage=zImage-${machine} -#kernelimage=uImage-$machine -#kernelimage=Image-$machine -#kernelimage=Image-$machine.lzo - -if [ -n $user ]; then - kernelimage="${user}"-"${kernelimage}" - nfsroot="${eth0.serverip}:/home/${user}/nfsroot/${machine}" - rootfsimage="${user}"-"${rootfsimage}" -else - nfsroot="${eth0.serverip}:/path/to/nfs/root" -fi - -autoboot_timeout=3 - -# -# "tiny6410" kernel parameter -# 0 .. 9 = screen type -# i = touchscreen with propritary FriendlyARM protocol -# Note: can be "tiny6410= " if nothing of these components are connected -# -bootargs="console=ttySAC0,115200 tiny6410=0" - -nand_device="nand" -nand_parts="256k(barebox),128k(bareboxenv),1536k(kernel),-(root)" -rootfs_mtdblock_nand=3 diff --git a/arch/arm/boards/guf-cupid/Makefile b/arch/arm/boards/guf-cupid/Makefile index b33952c2b7..eaf2a4f407 100644 --- a/arch/arm/boards/guf-cupid/Makefile +++ b/arch/arm/boards/guf-cupid/Makefile @@ -18,3 +18,4 @@ lwl-y += lowlevel.o obj-y += board.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-guf-cupid diff --git a/arch/arm/boards/guf-cupid/board.c b/arch/arm/boards/guf-cupid/board.c index d1b285cfaf..a02cecf6c5 100644 --- a/arch/arm/boards/guf-cupid/board.c +++ b/arch/arm/boards/guf-cupid/board.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -128,6 +129,9 @@ static int cupid_devices_init(void) armlinux_set_architecture(MACH_TYPE_GUF_CUPID); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_guf_cupid); + return 0; } diff --git a/arch/arm/boards/guf-cupid/defaultenv-guf-cupid/config b/arch/arm/boards/guf-cupid/defaultenv-guf-cupid/config new file mode 100644 index 0000000000..dc289b39f2 --- /dev/null +++ b/arch/arm/boards/guf-cupid/defaultenv-guf-cupid/config @@ -0,0 +1,50 @@ +#!/bin/sh + +eth0.serverip= +user= + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=dhcp + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.serverip=a.b.c.d + +# can be either 'nfs', 'tftp', 'nor' or 'nand' +kernel_loc=tftp +# can be either 'net', 'nor', 'nand' or 'initrd' +rootfs_loc=net + +# can be either 'jffs2' or 'ubifs' +rootfs_type=ubifs +rootfsimage=root-${global.hostname}.$rootfs_type + +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo + +if [ -n $user ]; then + kernelimage="$user"-"$kernelimage" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" + rootfsimage="$user"-"$rootfsimage" +else + nfsroot="$eth0.serverip:/path/to/nfs/root" +fi + +autoboot_timeout=3 + +bootargs="console=ttymxc0,115200" + +bootargs="$bootargs video=mx3fb:CTP-CLAA070LC0ACW" + +nand_parts="256k(barebox)ro,512k(bareboxenv),2M(kernel),-(root)" +nand_device=mxc_nand +rootfs_mtdblock_nand=3 + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " + diff --git a/arch/arm/boards/guf-cupid/env/config b/arch/arm/boards/guf-cupid/env/config deleted file mode 100644 index dc289b39f2..0000000000 --- a/arch/arm/boards/guf-cupid/env/config +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh - -eth0.serverip= -user= - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=dhcp - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.netmask=a.b.c.d -#eth0.gateway=a.b.c.d -#eth0.serverip=a.b.c.d - -# can be either 'nfs', 'tftp', 'nor' or 'nand' -kernel_loc=tftp -# can be either 'net', 'nor', 'nand' or 'initrd' -rootfs_loc=net - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root-${global.hostname}.$rootfs_type - -kernelimage=zImage-${global.hostname} -#kernelimage=uImage-${global.hostname} -#kernelimage=Image-${global.hostname} -#kernelimage=Image-${global.hostname}.lzo - -if [ -n $user ]; then - kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" - rootfsimage="$user"-"$rootfsimage" -else - nfsroot="$eth0.serverip:/path/to/nfs/root" -fi - -autoboot_timeout=3 - -bootargs="console=ttymxc0,115200" - -bootargs="$bootargs video=mx3fb:CTP-CLAA070LC0ACW" - -nand_parts="256k(barebox)ro,512k(bareboxenv),2M(kernel),-(root)" -nand_device=mxc_nand -rootfs_mtdblock_nand=3 - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " - diff --git a/arch/arm/boards/guf-neso/Makefile b/arch/arm/boards/guf-neso/Makefile index 81263ccab0..af90c36c7e 100644 --- a/arch/arm/boards/guf-neso/Makefile +++ b/arch/arm/boards/guf-neso/Makefile @@ -1,3 +1,4 @@ lwl-y += lowlevel.o obj-y += board.o obj-y += pll_init.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-guf-neso diff --git a/arch/arm/boards/guf-neso/board.c b/arch/arm/boards/guf-neso/board.c index 176d77e7b3..e1cd9098e0 100644 --- a/arch/arm/boards/guf-neso/board.c +++ b/arch/arm/boards/guf-neso/board.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -282,6 +283,9 @@ static int neso_devices_init(void) armlinux_set_architecture(MACH_TYPE_NESO); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_guf_neso); + return 0; } diff --git a/arch/arm/boards/guf-neso/defaultenv-guf-neso/config b/arch/arm/boards/guf-neso/defaultenv-guf-neso/config new file mode 100644 index 0000000000..bd44a555d9 --- /dev/null +++ b/arch/arm/boards/guf-neso/defaultenv-guf-neso/config @@ -0,0 +1,47 @@ +#!/bin/sh + +eth0.serverip= +user= + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=dhcp + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.serverip=a.b.c.d + +# can be either 'nfs', 'tftp', 'nor' or 'nand' +kernel_loc=tftp +# can be either 'net', 'nor', 'nand' or 'initrd' +rootfs_loc=net + +# can be either 'jffs2' or 'ubifs' +rootfs_type=ubifs +rootfsimage=root-${global.hostname}.$rootfs_type + +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo + +if [ -n $user ]; then + kernelimage="$user"-"$kernelimage" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" + rootfsimage="$user"-"$rootfsimage" +else + nfsroot="$eth0.serverip:/path/to/nfs/root" +fi + +autoboot_timeout=3 + +bootargs="console=ttymxc0,115200" + +nand_parts="256k(barebox)ro,512k(bareboxenv),2M(kernel),-(root)" +rootfs_mtdblock_nand=3 + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " + diff --git a/arch/arm/boards/guf-neso/env/config b/arch/arm/boards/guf-neso/env/config deleted file mode 100644 index bd44a555d9..0000000000 --- a/arch/arm/boards/guf-neso/env/config +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh - -eth0.serverip= -user= - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=dhcp - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.netmask=a.b.c.d -#eth0.gateway=a.b.c.d -#eth0.serverip=a.b.c.d - -# can be either 'nfs', 'tftp', 'nor' or 'nand' -kernel_loc=tftp -# can be either 'net', 'nor', 'nand' or 'initrd' -rootfs_loc=net - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root-${global.hostname}.$rootfs_type - -kernelimage=zImage-${global.hostname} -#kernelimage=uImage-${global.hostname} -#kernelimage=Image-${global.hostname} -#kernelimage=Image-${global.hostname}.lzo - -if [ -n $user ]; then - kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" - rootfsimage="$user"-"$rootfsimage" -else - nfsroot="$eth0.serverip:/path/to/nfs/root" -fi - -autoboot_timeout=3 - -bootargs="console=ttymxc0,115200" - -nand_parts="256k(barebox)ro,512k(bareboxenv),2M(kernel),-(root)" -rootfs_mtdblock_nand=3 - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " - diff --git a/arch/arm/boards/haba-knx/Makefile b/arch/arm/boards/haba-knx/Makefile index eb072c0161..d9db6aba62 100644 --- a/arch/arm/boards/haba-knx/Makefile +++ b/arch/arm/boards/haba-knx/Makefile @@ -1 +1,2 @@ obj-y += init.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-haba-knx diff --git a/arch/arm/boards/haba-knx/defaultenv-haba-knx/bin/init_board b/arch/arm/boards/haba-knx/defaultenv-haba-knx/bin/init_board new file mode 100644 index 0000000000..0a6baf722b --- /dev/null +++ b/arch/arm/boards/haba-knx/defaultenv-haba-knx/bin/init_board @@ -0,0 +1,49 @@ +#!/bin/sh + +button_name="dfu_bp" +button_wait=5 + +product_id=0x1234 +vendor_id=0x4321 + +dfu_config="/dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.rootfs.bb(rootfs)r" + +if [ $at91_udc0.vbus != 1 ] +then + echo "No USB Device cable plugged, normal boot" + exit +fi + +gpio_get_value ${dfu_button} +if [ $? != 0 ] +then + autoboot_timeout=16 + echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" + usbserial + exit +fi + +echo "${button_name} pressed detected wait ${button_wait}s" +timeout -s -a ${button_wait} + +if [ $at91_udc0.vbus != 1 ] +then + echo "No USB Device cable plugged, normal boot" + exit +fi + +gpio_get_value ${dfu_button} +if [ $? != 0 ] +then + echo "${button_name} released, normal boot" + autoboot_timeout=16 + echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" + usbserial + exit +fi + +echo "" +echo "Start DFU Mode" +echo "" + +dfu ${dfu_config} -P ${product_id} -V ${vendor_id} diff --git a/arch/arm/boards/haba-knx/defaultenv-haba-knx/config b/arch/arm/boards/haba-knx/defaultenv-haba-knx/config new file mode 100644 index 0000000000..d1dca105ad --- /dev/null +++ b/arch/arm/boards/haba-knx/defaultenv-haba-knx/config @@ -0,0 +1,40 @@ +#!/bin/sh + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=none +#ip=dhcp-barebox +[ x$armlinux_architecture = x4310 ] && dhcp_vendor_id=barebox-haba-knx-lite + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.serverip=a.b.c.d + +# can be either 'nfs', 'tftp', 'nor' or 'nand' +kernel_loc=nand +# can be either 'net', 'nor', 'nand' or 'initrd' +rootfs_loc=nand +# can be either 'nfs', 'tftp', 'nor', 'nand' or empty +oftree_loc=nand + +# can be either 'jffs2' or 'ubifs' +rootfs_type=ubifs +rootfsimage=root.$rootfs_type + +kernelimage=zImage +#kernelimage=uImage +#kernelimage=Image +#kernelimage=Image.lzo + +nand_device=atmel_nand +nand_parts="128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),128k(oftree),4M(kernel),120M(rootfs),-(data)" +rootfs_mtdblock_nand=6 + +autoboot_timeout=3 + +bootargs="console=ttyS0,115200" + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# " diff --git a/arch/arm/boards/haba-knx/env/bin/init_board b/arch/arm/boards/haba-knx/env/bin/init_board deleted file mode 100644 index 0a6baf722b..0000000000 --- a/arch/arm/boards/haba-knx/env/bin/init_board +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh - -button_name="dfu_bp" -button_wait=5 - -product_id=0x1234 -vendor_id=0x4321 - -dfu_config="/dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.rootfs.bb(rootfs)r" - -if [ $at91_udc0.vbus != 1 ] -then - echo "No USB Device cable plugged, normal boot" - exit -fi - -gpio_get_value ${dfu_button} -if [ $? != 0 ] -then - autoboot_timeout=16 - echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" - usbserial - exit -fi - -echo "${button_name} pressed detected wait ${button_wait}s" -timeout -s -a ${button_wait} - -if [ $at91_udc0.vbus != 1 ] -then - echo "No USB Device cable plugged, normal boot" - exit -fi - -gpio_get_value ${dfu_button} -if [ $? != 0 ] -then - echo "${button_name} released, normal boot" - autoboot_timeout=16 - echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" - usbserial - exit -fi - -echo "" -echo "Start DFU Mode" -echo "" - -dfu ${dfu_config} -P ${product_id} -V ${vendor_id} diff --git a/arch/arm/boards/haba-knx/env/config b/arch/arm/boards/haba-knx/env/config deleted file mode 100644 index d1dca105ad..0000000000 --- a/arch/arm/boards/haba-knx/env/config +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=none -#ip=dhcp-barebox -[ x$armlinux_architecture = x4310 ] && dhcp_vendor_id=barebox-haba-knx-lite - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.netmask=a.b.c.d -#eth0.gateway=a.b.c.d -#eth0.serverip=a.b.c.d - -# can be either 'nfs', 'tftp', 'nor' or 'nand' -kernel_loc=nand -# can be either 'net', 'nor', 'nand' or 'initrd' -rootfs_loc=nand -# can be either 'nfs', 'tftp', 'nor', 'nand' or empty -oftree_loc=nand - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root.$rootfs_type - -kernelimage=zImage -#kernelimage=uImage -#kernelimage=Image -#kernelimage=Image.lzo - -nand_device=atmel_nand -nand_parts="128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),128k(oftree),4M(kernel),120M(rootfs),-(data)" -rootfs_mtdblock_nand=6 - -autoboot_timeout=3 - -bootargs="console=ttyS0,115200" - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# " diff --git a/arch/arm/boards/haba-knx/init.c b/arch/arm/boards/haba-knx/init.c index f9d8f0f903..36f1e8b741 100644 --- a/arch/arm/boards/haba-knx/init.c +++ b/arch/arm/boards/haba-knx/init.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -323,6 +324,9 @@ static int haba_knx_devices_init(void) devfs_create_partitions("nand0", haba_knx_nand0_partitions); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_haba_knx); + return 0; } device_initcall(haba_knx_devices_init); diff --git a/arch/arm/boards/highbank/Makefile b/arch/arm/boards/highbank/Makefile index e11fd5b692..e5e4536cd1 100644 --- a/arch/arm/boards/highbank/Makefile +++ b/arch/arm/boards/highbank/Makefile @@ -1,3 +1,4 @@ obj-y += init.o lwl-y += lowlevel.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-highbank diff --git a/arch/arm/boards/highbank/defaultenv-highbank/boot.d/010-ahci-boot b/arch/arm/boards/highbank/defaultenv-highbank/boot.d/010-ahci-boot new file mode 120000 index 0000000000..3672f0495e --- /dev/null +++ b/arch/arm/boards/highbank/defaultenv-highbank/boot.d/010-ahci-boot @@ -0,0 +1 @@ +../boot/ahci-boot \ No newline at end of file diff --git a/arch/arm/boards/highbank/defaultenv-highbank/boot.d/011-ahci b/arch/arm/boards/highbank/defaultenv-highbank/boot.d/011-ahci new file mode 120000 index 0000000000..36b3b2815b --- /dev/null +++ b/arch/arm/boards/highbank/defaultenv-highbank/boot.d/011-ahci @@ -0,0 +1 @@ +../boot/ahci \ No newline at end of file diff --git a/arch/arm/boards/highbank/defaultenv-highbank/boot.d/020-mmc-boot b/arch/arm/boards/highbank/defaultenv-highbank/boot.d/020-mmc-boot new file mode 120000 index 0000000000..85c19bbd66 --- /dev/null +++ b/arch/arm/boards/highbank/defaultenv-highbank/boot.d/020-mmc-boot @@ -0,0 +1 @@ +../boot/mmc-boot \ No newline at end of file diff --git a/arch/arm/boards/highbank/defaultenv-highbank/boot.d/021-mmc b/arch/arm/boards/highbank/defaultenv-highbank/boot.d/021-mmc new file mode 120000 index 0000000000..5af95d0ac7 --- /dev/null +++ b/arch/arm/boards/highbank/defaultenv-highbank/boot.d/021-mmc @@ -0,0 +1 @@ +../boot/mmc \ No newline at end of file diff --git a/arch/arm/boards/highbank/defaultenv-highbank/boot.d/030-net b/arch/arm/boards/highbank/defaultenv-highbank/boot.d/030-net new file mode 120000 index 0000000000..70b8ea3965 --- /dev/null +++ b/arch/arm/boards/highbank/defaultenv-highbank/boot.d/030-net @@ -0,0 +1 @@ +../boot/net \ No newline at end of file diff --git a/arch/arm/boards/highbank/defaultenv-highbank/boot.d/031-net-eth1 b/arch/arm/boards/highbank/defaultenv-highbank/boot.d/031-net-eth1 new file mode 120000 index 0000000000..5a30a308c7 --- /dev/null +++ b/arch/arm/boards/highbank/defaultenv-highbank/boot.d/031-net-eth1 @@ -0,0 +1 @@ +../boot/net-eth1 \ No newline at end of file diff --git a/arch/arm/boards/highbank/defaultenv-highbank/boot/ahci b/arch/arm/boards/highbank/defaultenv-highbank/boot/ahci new file mode 100644 index 0000000000..46a8c1b321 --- /dev/null +++ b/arch/arm/boards/highbank/defaultenv-highbank/boot/ahci @@ -0,0 +1,16 @@ +#!/bin/sh + +path="/mnt/ahci" + +global.bootm.image="${path}/zImage" + +. /env/data/oftree + +oftree=${path}/oftree +if [ -f $oftree ]; then + global.bootm.oftree="$oftree" +fi + +# The rootdevice may actually be mmcblk1p2 if a card +# is inserted to the back MMC slot +global.linux.bootargs.dyn.root="root=/dev/sda2" diff --git a/arch/arm/boards/highbank/defaultenv-highbank/boot/ahci-boot b/arch/arm/boards/highbank/defaultenv-highbank/boot/ahci-boot new file mode 100644 index 0000000000..919eac54a7 --- /dev/null +++ b/arch/arm/boards/highbank/defaultenv-highbank/boot/ahci-boot @@ -0,0 +1,16 @@ +#!/bin/sh + +path="/mnt/ahci-boot" + +global.bootm.image="${path}/zImage" + +. /env/data/oftree + +oftree=${path}/oftree +if [ -f $oftree ]; then + global.bootm.oftree="$oftree" +fi + +# The rootdevice may actually be mmcblk1p2 if a card +# is inserted to the back MMC slot +global.linux.bootargs.dyn.root="root=/dev/sda2" diff --git a/arch/arm/boards/highbank/defaultenv-highbank/boot/mmc b/arch/arm/boards/highbank/defaultenv-highbank/boot/mmc new file mode 100644 index 0000000000..0fff5b4a81 --- /dev/null +++ b/arch/arm/boards/highbank/defaultenv-highbank/boot/mmc @@ -0,0 +1,16 @@ +#!/bin/sh + +path="/mnt/mmc" + +global.bootm.image="${path}/zimage" + +. /env/data/oftree + +oftree=${path}/oftree +if [ -f $oftree ]; then + global.bootm.oftree="$oftree" +fi + +# The rootdevice may actually be mmcblk1p2 if a card +# is inserted to the back MMC slot +global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2" diff --git a/arch/arm/boards/highbank/defaultenv-highbank/boot/mmc-boot b/arch/arm/boards/highbank/defaultenv-highbank/boot/mmc-boot new file mode 100644 index 0000000000..f3ae301e1b --- /dev/null +++ b/arch/arm/boards/highbank/defaultenv-highbank/boot/mmc-boot @@ -0,0 +1,16 @@ +#!/bin/sh + +path="/mnt/mmc-boot" + +global.bootm.image="${path}/zimage" + +. /env/data/oftree + +oftree=${path}/oftree +if [ -f $oftree ]; then + global.bootm.oftree="$oftree" +fi + +# The rootdevice may actually be mmcblk1p2 if a card +# is inserted to the back MMC slot +global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2" diff --git a/arch/arm/boards/highbank/defaultenv-highbank/boot/net b/arch/arm/boards/highbank/defaultenv-highbank/boot/net new file mode 100644 index 0000000000..6a700087fb --- /dev/null +++ b/arch/arm/boards/highbank/defaultenv-highbank/boot/net @@ -0,0 +1,13 @@ +#!/bin/sh + +ethact eth0 + +path="/mnt/tftp" + +. /env/data/oftree + +global.bootm.image="${path}/${global.user}-linux-${global.hostname}" +#global.bootm.oftree="${path}/${global.user}-oftree-${global.hostname}" +nfsroot="/home/${global.user}/nfsroot/${global.hostname}" +bootargs-ip +global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp" diff --git a/arch/arm/boards/highbank/defaultenv-highbank/boot/net-eth1 b/arch/arm/boards/highbank/defaultenv-highbank/boot/net-eth1 new file mode 100644 index 0000000000..1c70bdf3f0 --- /dev/null +++ b/arch/arm/boards/highbank/defaultenv-highbank/boot/net-eth1 @@ -0,0 +1,13 @@ +#!/bin/sh + +ethact eth1 + +path="/mnt/tftp" + +. /env/data/oftree + +global.bootm.image="${path}/${global.user}-linux-${global.hostname}" +#global.bootm.oftree="${path}/${global.user}-oftree-${global.hostname}" +nfsroot="/home/${global.user}/nfsroot/${global.hostname}" +bootargs-ip +global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp" diff --git a/arch/arm/boards/highbank/defaultenv-highbank/data/oftree b/arch/arm/boards/highbank/defaultenv-highbank/data/oftree new file mode 100644 index 0000000000..9a94b310c3 --- /dev/null +++ b/arch/arm/boards/highbank/defaultenv-highbank/data/oftree @@ -0,0 +1,4 @@ +#!/bin/sh + +#device tree provided by the firmware +global.bootm.oftree="/dev/dtb" diff --git a/arch/arm/boards/highbank/defaultenv-highbank/init/001-dtb-probe b/arch/arm/boards/highbank/defaultenv-highbank/init/001-dtb-probe new file mode 100644 index 0000000000..610db1500e --- /dev/null +++ b/arch/arm/boards/highbank/defaultenv-highbank/init/001-dtb-probe @@ -0,0 +1,7 @@ +#!/bin/sh + +if [ -e /dev/dtb ] +then + oftree -l /dev/dtb + oftree -p +fi diff --git a/arch/arm/boards/highbank/defaultenv-highbank/init/automount b/arch/arm/boards/highbank/defaultenv-highbank/init/automount new file mode 100644 index 0000000000..2c283c6eed --- /dev/null +++ b/arch/arm/boards/highbank/defaultenv-highbank/init/automount @@ -0,0 +1,27 @@ +#!/bin/sh + +if [ "$1" = menu ]; then + init-menu-add-entry "$0" "Automountpoints" + exit +fi + +# automount tftp server based on $eth0.serverip + +mkdir -p /mnt/tftp +automount /mnt/tftp 'ifup eth0 && mount -t tftp $eth0.serverip /mnt/tftp' + +# SD card slot, boot partition +mkdir -p /mnt/mmc-boot +automount -d /mnt/mmc 'mount /dev/disk0.boot /mnt/mmc-boot' + +# SD card slot, first partition +mkdir -p /mnt/mmc +automount -d /mnt/mmc 'mount /dev/disk0.0 /mnt/mmc' + +# AHCI, boot partition +mkdir -p /mnt/ahci-boot +automount -d /mnt/ahci 'mount /dev/ata0.boot /mnt/ahci-boot' + +# AHCI, first partition +mkdir -p /mnt/ahci +automount -d /mnt/ahci 'mount /dev/ata0.0 /mnt/ahci' diff --git a/arch/arm/boards/highbank/defaultenv-highbank/nv/boot.default b/arch/arm/boards/highbank/defaultenv-highbank/nv/boot.default new file mode 100644 index 0000000000..c47e1b2bca --- /dev/null +++ b/arch/arm/boards/highbank/defaultenv-highbank/nv/boot.default @@ -0,0 +1 @@ +/env/boot.d diff --git a/arch/arm/boards/highbank/defaultenv-highbank/nv/bootm.oftree b/arch/arm/boards/highbank/defaultenv-highbank/nv/bootm.oftree new file mode 100644 index 0000000000..c373173805 --- /dev/null +++ b/arch/arm/boards/highbank/defaultenv-highbank/nv/bootm.oftree @@ -0,0 +1 @@ +/dev/dtb diff --git a/arch/arm/boards/highbank/defaultenv-highbank/nv/linux.bootargs.console b/arch/arm/boards/highbank/defaultenv-highbank/nv/linux.bootargs.console new file mode 100644 index 0000000000..826debe7c2 --- /dev/null +++ b/arch/arm/boards/highbank/defaultenv-highbank/nv/linux.bootargs.console @@ -0,0 +1 @@ +console=ttyAMA0,115200n8 CONSOLE=/dev/ttyAMA0 diff --git a/arch/arm/boards/highbank/env/boot.d/010-ahci-boot b/arch/arm/boards/highbank/env/boot.d/010-ahci-boot deleted file mode 120000 index 3672f0495e..0000000000 --- a/arch/arm/boards/highbank/env/boot.d/010-ahci-boot +++ /dev/null @@ -1 +0,0 @@ -../boot/ahci-boot \ No newline at end of file diff --git a/arch/arm/boards/highbank/env/boot.d/011-ahci b/arch/arm/boards/highbank/env/boot.d/011-ahci deleted file mode 120000 index 36b3b2815b..0000000000 --- a/arch/arm/boards/highbank/env/boot.d/011-ahci +++ /dev/null @@ -1 +0,0 @@ -../boot/ahci \ No newline at end of file diff --git a/arch/arm/boards/highbank/env/boot.d/020-mmc-boot b/arch/arm/boards/highbank/env/boot.d/020-mmc-boot deleted file mode 120000 index 85c19bbd66..0000000000 --- a/arch/arm/boards/highbank/env/boot.d/020-mmc-boot +++ /dev/null @@ -1 +0,0 @@ -../boot/mmc-boot \ No newline at end of file diff --git a/arch/arm/boards/highbank/env/boot.d/021-mmc b/arch/arm/boards/highbank/env/boot.d/021-mmc deleted file mode 120000 index 5af95d0ac7..0000000000 --- a/arch/arm/boards/highbank/env/boot.d/021-mmc +++ /dev/null @@ -1 +0,0 @@ -../boot/mmc \ No newline at end of file diff --git a/arch/arm/boards/highbank/env/boot.d/030-net b/arch/arm/boards/highbank/env/boot.d/030-net deleted file mode 120000 index 70b8ea3965..0000000000 --- a/arch/arm/boards/highbank/env/boot.d/030-net +++ /dev/null @@ -1 +0,0 @@ -../boot/net \ No newline at end of file diff --git a/arch/arm/boards/highbank/env/boot.d/031-net-eth1 b/arch/arm/boards/highbank/env/boot.d/031-net-eth1 deleted file mode 120000 index 5a30a308c7..0000000000 --- a/arch/arm/boards/highbank/env/boot.d/031-net-eth1 +++ /dev/null @@ -1 +0,0 @@ -../boot/net-eth1 \ No newline at end of file diff --git a/arch/arm/boards/highbank/env/boot/ahci b/arch/arm/boards/highbank/env/boot/ahci deleted file mode 100644 index 46a8c1b321..0000000000 --- a/arch/arm/boards/highbank/env/boot/ahci +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -path="/mnt/ahci" - -global.bootm.image="${path}/zImage" - -. /env/data/oftree - -oftree=${path}/oftree -if [ -f $oftree ]; then - global.bootm.oftree="$oftree" -fi - -# The rootdevice may actually be mmcblk1p2 if a card -# is inserted to the back MMC slot -global.linux.bootargs.dyn.root="root=/dev/sda2" diff --git a/arch/arm/boards/highbank/env/boot/ahci-boot b/arch/arm/boards/highbank/env/boot/ahci-boot deleted file mode 100644 index 919eac54a7..0000000000 --- a/arch/arm/boards/highbank/env/boot/ahci-boot +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -path="/mnt/ahci-boot" - -global.bootm.image="${path}/zImage" - -. /env/data/oftree - -oftree=${path}/oftree -if [ -f $oftree ]; then - global.bootm.oftree="$oftree" -fi - -# The rootdevice may actually be mmcblk1p2 if a card -# is inserted to the back MMC slot -global.linux.bootargs.dyn.root="root=/dev/sda2" diff --git a/arch/arm/boards/highbank/env/boot/mmc b/arch/arm/boards/highbank/env/boot/mmc deleted file mode 100644 index 0fff5b4a81..0000000000 --- a/arch/arm/boards/highbank/env/boot/mmc +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -path="/mnt/mmc" - -global.bootm.image="${path}/zimage" - -. /env/data/oftree - -oftree=${path}/oftree -if [ -f $oftree ]; then - global.bootm.oftree="$oftree" -fi - -# The rootdevice may actually be mmcblk1p2 if a card -# is inserted to the back MMC slot -global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2" diff --git a/arch/arm/boards/highbank/env/boot/mmc-boot b/arch/arm/boards/highbank/env/boot/mmc-boot deleted file mode 100644 index f3ae301e1b..0000000000 --- a/arch/arm/boards/highbank/env/boot/mmc-boot +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -path="/mnt/mmc-boot" - -global.bootm.image="${path}/zimage" - -. /env/data/oftree - -oftree=${path}/oftree -if [ -f $oftree ]; then - global.bootm.oftree="$oftree" -fi - -# The rootdevice may actually be mmcblk1p2 if a card -# is inserted to the back MMC slot -global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2" diff --git a/arch/arm/boards/highbank/env/boot/net b/arch/arm/boards/highbank/env/boot/net deleted file mode 100644 index 6a700087fb..0000000000 --- a/arch/arm/boards/highbank/env/boot/net +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -ethact eth0 - -path="/mnt/tftp" - -. /env/data/oftree - -global.bootm.image="${path}/${global.user}-linux-${global.hostname}" -#global.bootm.oftree="${path}/${global.user}-oftree-${global.hostname}" -nfsroot="/home/${global.user}/nfsroot/${global.hostname}" -bootargs-ip -global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp" diff --git a/arch/arm/boards/highbank/env/boot/net-eth1 b/arch/arm/boards/highbank/env/boot/net-eth1 deleted file mode 100644 index 1c70bdf3f0..0000000000 --- a/arch/arm/boards/highbank/env/boot/net-eth1 +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -ethact eth1 - -path="/mnt/tftp" - -. /env/data/oftree - -global.bootm.image="${path}/${global.user}-linux-${global.hostname}" -#global.bootm.oftree="${path}/${global.user}-oftree-${global.hostname}" -nfsroot="/home/${global.user}/nfsroot/${global.hostname}" -bootargs-ip -global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp" diff --git a/arch/arm/boards/highbank/env/data/oftree b/arch/arm/boards/highbank/env/data/oftree deleted file mode 100644 index 9a94b310c3..0000000000 --- a/arch/arm/boards/highbank/env/data/oftree +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -#device tree provided by the firmware -global.bootm.oftree="/dev/dtb" diff --git a/arch/arm/boards/highbank/env/init/001-dtb-probe b/arch/arm/boards/highbank/env/init/001-dtb-probe deleted file mode 100644 index 610db1500e..0000000000 --- a/arch/arm/boards/highbank/env/init/001-dtb-probe +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -if [ -e /dev/dtb ] -then - oftree -l /dev/dtb - oftree -p -fi diff --git a/arch/arm/boards/highbank/env/init/automount b/arch/arm/boards/highbank/env/init/automount deleted file mode 100644 index 2c283c6eed..0000000000 --- a/arch/arm/boards/highbank/env/init/automount +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -if [ "$1" = menu ]; then - init-menu-add-entry "$0" "Automountpoints" - exit -fi - -# automount tftp server based on $eth0.serverip - -mkdir -p /mnt/tftp -automount /mnt/tftp 'ifup eth0 && mount -t tftp $eth0.serverip /mnt/tftp' - -# SD card slot, boot partition -mkdir -p /mnt/mmc-boot -automount -d /mnt/mmc 'mount /dev/disk0.boot /mnt/mmc-boot' - -# SD card slot, first partition -mkdir -p /mnt/mmc -automount -d /mnt/mmc 'mount /dev/disk0.0 /mnt/mmc' - -# AHCI, boot partition -mkdir -p /mnt/ahci-boot -automount -d /mnt/ahci 'mount /dev/ata0.boot /mnt/ahci-boot' - -# AHCI, first partition -mkdir -p /mnt/ahci -automount -d /mnt/ahci 'mount /dev/ata0.0 /mnt/ahci' diff --git a/arch/arm/boards/highbank/env/nv/boot.default b/arch/arm/boards/highbank/env/nv/boot.default deleted file mode 100644 index c47e1b2bca..0000000000 --- a/arch/arm/boards/highbank/env/nv/boot.default +++ /dev/null @@ -1 +0,0 @@ -/env/boot.d diff --git a/arch/arm/boards/highbank/env/nv/bootm.oftree b/arch/arm/boards/highbank/env/nv/bootm.oftree deleted file mode 100644 index c373173805..0000000000 --- a/arch/arm/boards/highbank/env/nv/bootm.oftree +++ /dev/null @@ -1 +0,0 @@ -/dev/dtb diff --git a/arch/arm/boards/highbank/env/nv/linux.bootargs.console b/arch/arm/boards/highbank/env/nv/linux.bootargs.console deleted file mode 100644 index 826debe7c2..0000000000 --- a/arch/arm/boards/highbank/env/nv/linux.bootargs.console +++ /dev/null @@ -1 +0,0 @@ -console=ttyAMA0,115200n8 CONSOLE=/dev/ttyAMA0 diff --git a/arch/arm/boards/highbank/init.c b/arch/arm/boards/highbank/init.c index 1cb02e6e48..128132ad48 100644 --- a/arch/arm/boards/highbank/init.c +++ b/arch/arm/boards/highbank/init.c @@ -17,6 +17,7 @@ #include #include #include +#include #define FIRMWARE_DTB_BASE 0x1000 @@ -126,6 +127,9 @@ static int highbank_devices_init(void) devfs_add_partition("nvram", 0x00000, SZ_16K, DEVFS_PARTITION_FIXED, "env0"); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_highbank); + return 0; } device_initcall(highbank_devices_init); diff --git a/arch/arm/boards/nhk8815/Makefile b/arch/arm/boards/nhk8815/Makefile index f4298529a0..56f2013e22 100644 --- a/arch/arm/boards/nhk8815/Makefile +++ b/arch/arm/boards/nhk8815/Makefile @@ -1,2 +1,3 @@ obj-y += setup.o lwl-y += lowlevel.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-nhk8815 diff --git a/arch/arm/boards/nhk8815/defaultenv-nhk8815/config b/arch/arm/boards/nhk8815/defaultenv-nhk8815/config new file mode 100644 index 0000000000..c05ed2704e --- /dev/null +++ b/arch/arm/boards/nhk8815/defaultenv-nhk8815/config @@ -0,0 +1,43 @@ +#!/bin/sh + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=dhcp + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.serverip=a.b.c.d + +# can be either 'nfs', 'tftp' or 'nand' +kernel_loc=tftp +# can be either 'net', 'nand' or 'initrd' +rootfs_loc=net + +# can be either 'jffs2' or 'ubifs' +rootfs_type=ubifs +rootfsimage=root.$rootfs_type + +#kernelimage=zImage +kernelimage=uImage +#kernelimage=Image +#kernelimage=Image.lzo + +# Partition Size Start +# XloaderTOC + X-Loader 256KB 0x00000000 +# Memory init function 256KB 0x00040000 +# Barebox + env 2MB 0x00080000 +# Kernel Image 3MB 0x00280000 +# JFFS2 Root filesystem 22MB 0x00580000 +# JFFS2 User Data 100MB 0x01b80000 + +nand_parts="256k(xloader)ro,256k(meminit),2M(barebox),3M(kernel),22M(rootfs),100M(userfs),384k(free),128k(bareboxenv)" + +autoboot_timeout=3 + +bootargs="root=/dev/ram0 console=ttyAMA1,115200n8 init=linuxrc" + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " + diff --git a/arch/arm/boards/nhk8815/env/config b/arch/arm/boards/nhk8815/env/config deleted file mode 100644 index c05ed2704e..0000000000 --- a/arch/arm/boards/nhk8815/env/config +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=dhcp - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.netmask=a.b.c.d -#eth0.gateway=a.b.c.d -#eth0.serverip=a.b.c.d - -# can be either 'nfs', 'tftp' or 'nand' -kernel_loc=tftp -# can be either 'net', 'nand' or 'initrd' -rootfs_loc=net - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root.$rootfs_type - -#kernelimage=zImage -kernelimage=uImage -#kernelimage=Image -#kernelimage=Image.lzo - -# Partition Size Start -# XloaderTOC + X-Loader 256KB 0x00000000 -# Memory init function 256KB 0x00040000 -# Barebox + env 2MB 0x00080000 -# Kernel Image 3MB 0x00280000 -# JFFS2 Root filesystem 22MB 0x00580000 -# JFFS2 User Data 100MB 0x01b80000 - -nand_parts="256k(xloader)ro,256k(meminit),2M(barebox),3M(kernel),22M(rootfs),100M(userfs),384k(free),128k(bareboxenv)" - -autoboot_timeout=3 - -bootargs="root=/dev/ram0 console=ttyAMA1,115200n8 init=linuxrc" - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " - diff --git a/arch/arm/boards/nhk8815/setup.c b/arch/arm/boards/nhk8815/setup.c index aaf9cd7531..0b6901001a 100644 --- a/arch/arm/boards/nhk8815/setup.c +++ b/arch/arm/boards/nhk8815/setup.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -106,6 +107,9 @@ static int nhk8815_devices_init(void) devfs_add_partition("nand0", 0x7FE0000, 0x020000, DEVFS_PARTITION_FIXED, "env_raw"); dev_add_bb_dev("env_raw", "env0"); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_nhk8815); + return 0; } device_initcall(nhk8815_devices_init); diff --git a/arch/arm/boards/phytec-phycard-omap4/Makefile b/arch/arm/boards/phytec-phycard-omap4/Makefile index 64782e0fc2..0fec0c7f53 100644 --- a/arch/arm/boards/phytec-phycard-omap4/Makefile +++ b/arch/arm/boards/phytec-phycard-omap4/Makefile @@ -15,3 +15,4 @@ # obj-y += pca-a-xl2.o lwl-y += mux.o lowlevel.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-phytec-phycard-omap4 diff --git a/arch/arm/boards/phytec-phycard-omap4/defaultenv-phytec-phycard-omap4/bin/nand_bootstrap b/arch/arm/boards/phytec-phycard-omap4/defaultenv-phytec-phycard-omap4/bin/nand_bootstrap new file mode 100644 index 0000000000..f8873fabe2 --- /dev/null +++ b/arch/arm/boards/phytec-phycard-omap4/defaultenv-phytec-phycard-omap4/bin/nand_bootstrap @@ -0,0 +1,31 @@ + +echo "copying barebox to nand..." + +mci0.probe=1 +mkdir mnt + +mount /dev/disk0.0 /mnt +if [ $? != 0 ]; then + echo "failed to mount mmc card" + exit 1 +fi + +if [ ! -f /mnt/mlo-nand.bin ]; then + echo "mlo-nand.bin not found on mmc card" + exit 1 +fi + +if [ ! -f /mnt/barebox.bin ]; then + echo "barebox.bin not found on mmc card" +fi + +gpmc_nand0.eccmode=bch8_hw_romcode +erase /dev/nand0.xload.bb +cp /mnt/mlo-nand.bin /dev/nand0.xload.bb + +gpmc_nand0.eccmode=bch8_hw +erase /dev/nand0.barebox.bb +cp /mnt/barebox.bin /dev/nand0.barebox.bb + +echo "success" + diff --git a/arch/arm/boards/phytec-phycard-omap4/defaultenv-phytec-phycard-omap4/config b/arch/arm/boards/phytec-phycard-omap4/defaultenv-phytec-phycard-omap4/config new file mode 100644 index 0000000000..998f9fa0f2 --- /dev/null +++ b/arch/arm/boards/phytec-phycard-omap4/defaultenv-phytec-phycard-omap4/config @@ -0,0 +1,46 @@ +#!/bin/sh + +user= + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=dhcp + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.serverip=a.b.c.d + +# can be either 'nfs', 'tftp', 'nor' or 'nand' +kernel_loc=tftp +# can be either 'net', 'nor', 'nand' or 'initrd' +rootfs_loc=net + +# can be either 'jffs2' or 'ubifs' +rootfs_type=ubifs +rootfsimage=root-${global.hostname}.$rootfs_type + +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo + +if [ -n $user ]; then + kernelimage="$user"-"$kernelimage" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" + rootfsimage="$user"-"$rootfsimage" +else + nfsroot="$eth0.serverip:/path/to/nfs/root" +fi + +autoboot_timeout=3 + +bootargs="console=ttyO2,115200" + +nand_parts="128k(xload)ro,512k(barebox),128k(bareboxenv),4M(kernel),-(root)" +rootfs_mtdblock_nand=4 + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " + diff --git a/arch/arm/boards/phytec-phycard-omap4/env/bin/nand_bootstrap b/arch/arm/boards/phytec-phycard-omap4/env/bin/nand_bootstrap deleted file mode 100644 index f8873fabe2..0000000000 --- a/arch/arm/boards/phytec-phycard-omap4/env/bin/nand_bootstrap +++ /dev/null @@ -1,31 +0,0 @@ - -echo "copying barebox to nand..." - -mci0.probe=1 -mkdir mnt - -mount /dev/disk0.0 /mnt -if [ $? != 0 ]; then - echo "failed to mount mmc card" - exit 1 -fi - -if [ ! -f /mnt/mlo-nand.bin ]; then - echo "mlo-nand.bin not found on mmc card" - exit 1 -fi - -if [ ! -f /mnt/barebox.bin ]; then - echo "barebox.bin not found on mmc card" -fi - -gpmc_nand0.eccmode=bch8_hw_romcode -erase /dev/nand0.xload.bb -cp /mnt/mlo-nand.bin /dev/nand0.xload.bb - -gpmc_nand0.eccmode=bch8_hw -erase /dev/nand0.barebox.bb -cp /mnt/barebox.bin /dev/nand0.barebox.bb - -echo "success" - diff --git a/arch/arm/boards/phytec-phycard-omap4/env/config b/arch/arm/boards/phytec-phycard-omap4/env/config deleted file mode 100644 index 998f9fa0f2..0000000000 --- a/arch/arm/boards/phytec-phycard-omap4/env/config +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh - -user= - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=dhcp - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.netmask=a.b.c.d -#eth0.gateway=a.b.c.d -#eth0.serverip=a.b.c.d - -# can be either 'nfs', 'tftp', 'nor' or 'nand' -kernel_loc=tftp -# can be either 'net', 'nor', 'nand' or 'initrd' -rootfs_loc=net - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root-${global.hostname}.$rootfs_type - -kernelimage=zImage-${global.hostname} -#kernelimage=uImage-${global.hostname} -#kernelimage=Image-${global.hostname} -#kernelimage=Image-${global.hostname}.lzo - -if [ -n $user ]; then - kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" - rootfsimage="$user"-"$rootfsimage" -else - nfsroot="$eth0.serverip:/path/to/nfs/root" -fi - -autoboot_timeout=3 - -bootargs="console=ttyO2,115200" - -nand_parts="128k(xload)ro,512k(barebox),128k(bareboxenv),4M(kernel),-(root)" -rootfs_mtdblock_nand=4 - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " - diff --git a/arch/arm/boards/phytec-phycore-omap4460/Makefile b/arch/arm/boards/phytec-phycore-omap4460/Makefile index 5d4eb10b9b..5e78e11ec1 100644 --- a/arch/arm/boards/phytec-phycore-omap4460/Makefile +++ b/arch/arm/boards/phytec-phycore-omap4460/Makefile @@ -1,2 +1,3 @@ obj-y += board.o lwl-y += lowlevel.o mux.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-phytec-phycore-omap4460 diff --git a/arch/arm/boards/phytec-phycore-omap4460/board.c b/arch/arm/boards/phytec-phycore-omap4460/board.c index 807cdd677d..b7aeeca6df 100644 --- a/arch/arm/boards/phytec-phycore-omap4460/board.c +++ b/arch/arm/boards/phytec-phycore-omap4460/board.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -307,6 +308,9 @@ static int pcm049_devices_init(void) if (IS_ENABLED(CONFIG_DRIVER_VIDEO_OMAP)) omap_add_display(&pcm049_fb_data); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_phytec_phycore_omap4460); + return 0; } device_initcall(pcm049_devices_init); diff --git a/arch/arm/boards/phytec-phycore-omap4460/defaultenv-phytec-phycore-omap4460/bin/init_board b/arch/arm/boards/phytec-phycore-omap4460/defaultenv-phytec-phycore-omap4460/bin/init_board new file mode 100644 index 0000000000..d5142ee8d0 --- /dev/null +++ b/arch/arm/boards/phytec-phycore-omap4460/defaultenv-phytec-phycore-omap4460/bin/init_board @@ -0,0 +1,23 @@ +#!/bin/sh +global displayargs +. /env/config + +if [ -z $display ]; then + echo "no display configured" + exit 0 +fi + +if [ $display = dvi ]; then + global.displayargs="omapdss.def_disp=dvi omapfb.mode=dvi:$dvi_resolution" + exit 0 +fi + +# Display a splash screen + +if [ -e /dev/fb0 ]; then + fb0.mode_name=$display + splash /dev/nand0.splash.bb + fb0.enable=1 +fi + +global.displayargs="panel_generic_dpi.name=$display" diff --git a/arch/arm/boards/phytec-phycore-omap4460/defaultenv-phytec-phycore-omap4460/bin/nand_bootstrap b/arch/arm/boards/phytec-phycore-omap4460/defaultenv-phytec-phycore-omap4460/bin/nand_bootstrap new file mode 100644 index 0000000000..49e38dc4f0 --- /dev/null +++ b/arch/arm/boards/phytec-phycore-omap4460/defaultenv-phytec-phycore-omap4460/bin/nand_bootstrap @@ -0,0 +1,31 @@ +#!/bin/sh +echo "copying barebox to nand..." + +mci0.probe=1 +mkdir mnt + +mount /dev/disk0.0 /mnt +if [ $? != 0 ]; then + echo "failed to mount mmc card" + exit 1 +fi + +if [ ! -f /mnt/mlo-nand.bin ]; then + echo "mlo-nand.bin not found on mmc card" + exit 1 +fi + +if [ ! -f /mnt/barebox.bin ]; then + echo "barebox.bin not found on mmc card" +fi + +gpmc_nand0.eccmode=bch8_hw_romcode +erase /dev/nand0.xload.bb +cp /mnt/mlo-nand.bin /dev/nand0.xload.bb + +gpmc_nand0.eccmode=bch8_hw +erase /dev/nand0.barebox.bb +cp /mnt/barebox.bin /dev/nand0.barebox.bb + +echo "success" + diff --git a/arch/arm/boards/phytec-phycore-omap4460/defaultenv-phytec-phycore-omap4460/config b/arch/arm/boards/phytec-phycore-omap4460/defaultenv-phytec-phycore-omap4460/config new file mode 100644 index 0000000000..1a252dd9c5 --- /dev/null +++ b/arch/arm/boards/phytec-phycore-omap4460/defaultenv-phytec-phycore-omap4460/config @@ -0,0 +1,61 @@ +#!/bin/sh + +eth0.serverip= +user= + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=dhcp + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.serverip=a.b.c.d + +# can be either 'nfs', 'tftp', 'nor' or 'nand' +kernel_loc=tftp +# can be either 'net', 'nor', 'nand' or 'initrd' +rootfs_loc=net + +# can be either 'jffs2' or 'ubifs' +rootfs_type=ubifs +rootfsimage=root-${global.hostname}.$rootfs_type + +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo + +if [ -n $user ]; then + kernelimage="$user"-"$kernelimage" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" + rootfsimage="$user"-"$rootfsimage" +else + nfsroot="$eth0.serverip:/path/to/nfs/root" +fi + +autoboot_timeout=3 + +bootargs="console=ttyO2,115200" + +nand_parts="128k(xload)ro,512k(barebox),128k(bareboxenv),4M(kernel),4M(splash),-(root)" +nand_device="omap2-nand.0" +rootfs_mtdblock_nand=5 + +#Displays +# Splashscreen-Display can be either '', 'pd050vl1', 'pm070wl4', 'pd104slf', 'g104x1' +# 'edt_etm0350G0dh6', 'edt_etm0430G0dh6', 'edt_etmv570G2dhu' or 'edt_etm0700G0dh6' +# to use dvi output in kernel set 'display=dvi' and +# dvi_resolution to '640x480-60' '800x600-60' or '1024x768-60' + +display=edt_etm0700G0dh6 +#dvi_resolution=1024x768-60 + +if [ -n ${global.displayargs} ]; then + bootargs="$bootargs ${global.displayargs}" +fi + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " + diff --git a/arch/arm/boards/phytec-phycore-omap4460/env/bin/init_board b/arch/arm/boards/phytec-phycore-omap4460/env/bin/init_board deleted file mode 100644 index d5142ee8d0..0000000000 --- a/arch/arm/boards/phytec-phycore-omap4460/env/bin/init_board +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -global displayargs -. /env/config - -if [ -z $display ]; then - echo "no display configured" - exit 0 -fi - -if [ $display = dvi ]; then - global.displayargs="omapdss.def_disp=dvi omapfb.mode=dvi:$dvi_resolution" - exit 0 -fi - -# Display a splash screen - -if [ -e /dev/fb0 ]; then - fb0.mode_name=$display - splash /dev/nand0.splash.bb - fb0.enable=1 -fi - -global.displayargs="panel_generic_dpi.name=$display" diff --git a/arch/arm/boards/phytec-phycore-omap4460/env/bin/nand_bootstrap b/arch/arm/boards/phytec-phycore-omap4460/env/bin/nand_bootstrap deleted file mode 100644 index 49e38dc4f0..0000000000 --- a/arch/arm/boards/phytec-phycore-omap4460/env/bin/nand_bootstrap +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -echo "copying barebox to nand..." - -mci0.probe=1 -mkdir mnt - -mount /dev/disk0.0 /mnt -if [ $? != 0 ]; then - echo "failed to mount mmc card" - exit 1 -fi - -if [ ! -f /mnt/mlo-nand.bin ]; then - echo "mlo-nand.bin not found on mmc card" - exit 1 -fi - -if [ ! -f /mnt/barebox.bin ]; then - echo "barebox.bin not found on mmc card" -fi - -gpmc_nand0.eccmode=bch8_hw_romcode -erase /dev/nand0.xload.bb -cp /mnt/mlo-nand.bin /dev/nand0.xload.bb - -gpmc_nand0.eccmode=bch8_hw -erase /dev/nand0.barebox.bb -cp /mnt/barebox.bin /dev/nand0.barebox.bb - -echo "success" - diff --git a/arch/arm/boards/phytec-phycore-omap4460/env/config b/arch/arm/boards/phytec-phycore-omap4460/env/config deleted file mode 100644 index 1a252dd9c5..0000000000 --- a/arch/arm/boards/phytec-phycore-omap4460/env/config +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/sh - -eth0.serverip= -user= - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=dhcp - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.netmask=a.b.c.d -#eth0.gateway=a.b.c.d -#eth0.serverip=a.b.c.d - -# can be either 'nfs', 'tftp', 'nor' or 'nand' -kernel_loc=tftp -# can be either 'net', 'nor', 'nand' or 'initrd' -rootfs_loc=net - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root-${global.hostname}.$rootfs_type - -kernelimage=zImage-${global.hostname} -#kernelimage=uImage-${global.hostname} -#kernelimage=Image-${global.hostname} -#kernelimage=Image-${global.hostname}.lzo - -if [ -n $user ]; then - kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" - rootfsimage="$user"-"$rootfsimage" -else - nfsroot="$eth0.serverip:/path/to/nfs/root" -fi - -autoboot_timeout=3 - -bootargs="console=ttyO2,115200" - -nand_parts="128k(xload)ro,512k(barebox),128k(bareboxenv),4M(kernel),4M(splash),-(root)" -nand_device="omap2-nand.0" -rootfs_mtdblock_nand=5 - -#Displays -# Splashscreen-Display can be either '', 'pd050vl1', 'pm070wl4', 'pd104slf', 'g104x1' -# 'edt_etm0350G0dh6', 'edt_etm0430G0dh6', 'edt_etmv570G2dhu' or 'edt_etm0700G0dh6' -# to use dvi output in kernel set 'display=dvi' and -# dvi_resolution to '640x480-60' '800x600-60' or '1024x768-60' - -display=edt_etm0700G0dh6 -#dvi_resolution=1024x768-60 - -if [ -n ${global.displayargs} ]; then - bootargs="$bootargs ${global.displayargs}" -fi - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " - diff --git a/arch/arm/boards/pm9261/Makefile b/arch/arm/boards/pm9261/Makefile index 1398c26a0f..bff467b1dc 100644 --- a/arch/arm/boards/pm9261/Makefile +++ b/arch/arm/boards/pm9261/Makefile @@ -1,3 +1,4 @@ obj-y += init.o lwl-$(CONFIG_HAVE_AT91_LOWLEVEL_INIT) += lowlevel_init.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-pm9261 diff --git a/arch/arm/boards/pm9261/defaultenv-pm9261/config b/arch/arm/boards/pm9261/defaultenv-pm9261/config new file mode 100644 index 0000000000..bdc2d38d42 --- /dev/null +++ b/arch/arm/boards/pm9261/defaultenv-pm9261/config @@ -0,0 +1,36 @@ +#!/bin/sh + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=dhcp + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.serverip=a.b.c.d + +# can be either 'nfs', 'tftp' or 'nand' +kernel_loc=tftp +# can be either 'net', 'nand' or 'initrd' +rootfs_loc=net + +# can be either 'jffs2' or 'ubifs' +rootfs_type=ubifs +rootfsimage=root.$rootfs_type + +#kernelimage=zImage +kernelimage=uImage +#kernelimage=Image +#kernelimage=Image.lzo + +nor_parts="256k(barebox)ro,64k(bareboxenv),1536k(kernel),-(root)" +rootfs_mtdblock_nor=3 + +autoboot_timeout=3 + +bootargs="console=ttyS0,115200" + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " + diff --git a/arch/arm/boards/pm9261/env/config b/arch/arm/boards/pm9261/env/config deleted file mode 100644 index bdc2d38d42..0000000000 --- a/arch/arm/boards/pm9261/env/config +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=dhcp - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.netmask=a.b.c.d -#eth0.gateway=a.b.c.d -#eth0.serverip=a.b.c.d - -# can be either 'nfs', 'tftp' or 'nand' -kernel_loc=tftp -# can be either 'net', 'nand' or 'initrd' -rootfs_loc=net - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root.$rootfs_type - -#kernelimage=zImage -kernelimage=uImage -#kernelimage=Image -#kernelimage=Image.lzo - -nor_parts="256k(barebox)ro,64k(bareboxenv),1536k(kernel),-(root)" -rootfs_mtdblock_nor=3 - -autoboot_timeout=3 - -bootargs="console=ttyS0,115200" - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " - diff --git a/arch/arm/boards/pm9261/init.c b/arch/arm/boards/pm9261/init.c index 177355b633..b0377d063c 100644 --- a/arch/arm/boards/pm9261/init.c +++ b/arch/arm/boards/pm9261/init.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -152,6 +153,9 @@ static int pm9261_devices_init(void) armlinux_set_architecture(MACH_TYPE_PM9261); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_pm9261); + return 0; } device_initcall(pm9261_devices_init); diff --git a/arch/arm/boards/pm9g45/Makefile b/arch/arm/boards/pm9g45/Makefile index eb072c0161..d81b1881b3 100644 --- a/arch/arm/boards/pm9g45/Makefile +++ b/arch/arm/boards/pm9g45/Makefile @@ -1 +1,2 @@ obj-y += init.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-pm9g45 diff --git a/arch/arm/boards/pm9g45/defaultenv-pm9g45/config b/arch/arm/boards/pm9g45/defaultenv-pm9g45/config new file mode 100644 index 0000000000..18ac565d49 --- /dev/null +++ b/arch/arm/boards/pm9g45/defaultenv-pm9g45/config @@ -0,0 +1,40 @@ +#!/bin/sh + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=dhcp-barebox +global.dhcp.vendor_id=barebox-pm9g45 + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.serverip=a.b.c.d + +# can be either 'nfs', 'tftp' or 'nand' +kernel_loc=nfs +# can be either 'net', 'nand' or 'initrd' +rootfs_loc=net +# can be either 'nfs', 'tftp', 'nand' or empty +oftree_loc=nfs + +# can be either 'jffs2' or 'ubifs' +rootfs_type=ubifs +rootfsimage=root.$rootfs_type + +kernelimage=zImage +#kernelimage=uImage +#kernelimage=Image +#kernelimage=Image.lzo + +nand_device=atmel_nand +nand_parts="128k(bootstrap)ro,256k(barebox)ro,1664k(bareboxenv),3M(kernel),-(root)" +rootfs_mtdblock_nand=4 + +autoboot_timeout=3 + +bootargs="console=ttyS0,115200" + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " + diff --git a/arch/arm/boards/pm9g45/env/config b/arch/arm/boards/pm9g45/env/config deleted file mode 100644 index 18ac565d49..0000000000 --- a/arch/arm/boards/pm9g45/env/config +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=dhcp-barebox -global.dhcp.vendor_id=barebox-pm9g45 - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.netmask=a.b.c.d -#eth0.gateway=a.b.c.d -#eth0.serverip=a.b.c.d - -# can be either 'nfs', 'tftp' or 'nand' -kernel_loc=nfs -# can be either 'net', 'nand' or 'initrd' -rootfs_loc=net -# can be either 'nfs', 'tftp', 'nand' or empty -oftree_loc=nfs - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root.$rootfs_type - -kernelimage=zImage -#kernelimage=uImage -#kernelimage=Image -#kernelimage=Image.lzo - -nand_device=atmel_nand -nand_parts="128k(bootstrap)ro,256k(barebox)ro,1664k(bareboxenv),3M(kernel),-(root)" -rootfs_mtdblock_nand=4 - -autoboot_timeout=3 - -bootargs="console=ttyS0,115200" - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " - diff --git a/arch/arm/boards/pm9g45/init.c b/arch/arm/boards/pm9g45/init.c index 524fe5395a..efa5dc025d 100644 --- a/arch/arm/boards/pm9g45/init.c +++ b/arch/arm/boards/pm9g45/init.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -164,6 +165,9 @@ static int pm9g45_devices_init(void) armlinux_set_architecture(MACH_TYPE_PM9G45); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_pm9g45); + return 0; } device_initcall(pm9g45_devices_init); diff --git a/arch/arm/boards/qemu-virt64/Makefile b/arch/arm/boards/qemu-virt64/Makefile index 2da0494d49..e354607548 100644 --- a/arch/arm/boards/qemu-virt64/Makefile +++ b/arch/arm/boards/qemu-virt64/Makefile @@ -1,2 +1,3 @@ obj-y += init.o lwl-y += lowlevel.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-qemu-virt64 diff --git a/arch/arm/boards/qemu-virt64/defaultenv-qemu-virt64/config b/arch/arm/boards/qemu-virt64/defaultenv-qemu-virt64/config new file mode 100644 index 0000000000..781dbfefa6 --- /dev/null +++ b/arch/arm/boards/qemu-virt64/defaultenv-qemu-virt64/config @@ -0,0 +1,8 @@ +#!/bin/sh + +autoboot_timeout=3 + +bootargs="console=ttyAMA0,115200" + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;31m[barebox@\h]:\w\e[0m\n# " diff --git a/arch/arm/boards/qemu-virt64/env/config b/arch/arm/boards/qemu-virt64/env/config deleted file mode 100644 index 781dbfefa6..0000000000 --- a/arch/arm/boards/qemu-virt64/env/config +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -autoboot_timeout=3 - -bootargs="console=ttyAMA0,115200" - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;31m[barebox@\h]:\w\e[0m\n# " diff --git a/arch/arm/boards/qemu-virt64/init.c b/arch/arm/boards/qemu-virt64/init.c index 58dba0f68a..a85bd84db7 100644 --- a/arch/arm/boards/qemu-virt64/init.c +++ b/arch/arm/boards/qemu-virt64/init.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -30,6 +31,9 @@ static int virt_env_init(void) devfs_add_partition("nor0", 0x00000, 0x40000, DEVFS_PARTITION_FIXED, "self0"); devfs_add_partition("nor0", 0x40000, 0x20000, DEVFS_PARTITION_FIXED, "env0"); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_qemu_virt64); + return 0; } device_initcall(virt_env_init); diff --git a/arch/arm/boards/qil-a926x/Makefile b/arch/arm/boards/qil-a926x/Makefile index eb072c0161..0c7bc3f043 100644 --- a/arch/arm/boards/qil-a926x/Makefile +++ b/arch/arm/boards/qil-a926x/Makefile @@ -1 +1,2 @@ obj-y += init.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-qil-a926x diff --git a/arch/arm/boards/qil-a926x/defaultenv-qil-a926x/bin/init_board b/arch/arm/boards/qil-a926x/defaultenv-qil-a926x/bin/init_board new file mode 100644 index 0000000000..09ba7cc981 --- /dev/null +++ b/arch/arm/boards/qil-a926x/defaultenv-qil-a926x/bin/init_board @@ -0,0 +1,46 @@ +#!/bin/sh + +button_name="dfu_bp" +button_wait=5 + +dfu_config="/dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.rootfs.bb(rootfs)r" + +if [ $at91_udc0.vbus != 1 ] +then + echo "No USB Device cable plugged, normal boot" + exit +fi + +gpio_get_value ${dfu_button} +if [ $? != 0 ] +then + autoboot_timeout=16 + echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" + usbserial + exit +fi + +echo "${button_name} pressed detected wait ${button_wait}s" +timeout -s -a ${button_wait} + +if [ $at91_udc0.vbus != 1 ] +then + echo "No USB Device cable plugged, normal boot" + exit +fi + +gpio_get_value ${dfu_button} +if [ $? != 0 ] +then + echo "${button_name} released, normal boot" + autoboot_timeout=16 + echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" + usbserial + exit +fi + +echo "" +echo "Start DFU Mode" +echo "" + +dfu ${dfu_config} diff --git a/arch/arm/boards/qil-a926x/defaultenv-qil-a926x/config b/arch/arm/boards/qil-a926x/defaultenv-qil-a926x/config new file mode 100644 index 0000000000..793a73f11e --- /dev/null +++ b/arch/arm/boards/qil-a926x/defaultenv-qil-a926x/config @@ -0,0 +1,40 @@ +#!/bin/sh + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=dhcp-barebox +[ x$armlinux_architecture = x1711 ] && global.dhcp.vendor_id=barebox-qil-a9260 +[ x$armlinux_architecture = x1844 ] && global.dhcp.vendor_id=barebox-qil-a9g20 + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.serverip=a.b.c.d + +# can be either 'nfs', 'tftp', 'nor' or 'nand' +kernel_loc=nfs +# can be either 'net', 'nor', 'nand' or 'initrd' +rootfs_loc=net +# can be either 'nfs', 'tftp', 'nor', 'nand' or empty +oftree_loc=none + +# can be either 'jffs2' or 'ubifs' +rootfs_type=ubifs +rootfsimage=root.$rootfs_type + +kernelimage=zImage +#kernelimage=uImage +#kernelimage=Image +#kernelimage=Image.lzo + +nand_device=atmel_nand +nand_parts="128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),128k(oftree),4M(kernel),120M(rootfs),-(data)" +rootfs_mtdblock_nand=6 + +autoboot_timeout=3 + +bootargs="console=ttyS1,115200" + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# " diff --git a/arch/arm/boards/qil-a926x/env/bin/init_board b/arch/arm/boards/qil-a926x/env/bin/init_board deleted file mode 100644 index 09ba7cc981..0000000000 --- a/arch/arm/boards/qil-a926x/env/bin/init_board +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh - -button_name="dfu_bp" -button_wait=5 - -dfu_config="/dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.rootfs.bb(rootfs)r" - -if [ $at91_udc0.vbus != 1 ] -then - echo "No USB Device cable plugged, normal boot" - exit -fi - -gpio_get_value ${dfu_button} -if [ $? != 0 ] -then - autoboot_timeout=16 - echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" - usbserial - exit -fi - -echo "${button_name} pressed detected wait ${button_wait}s" -timeout -s -a ${button_wait} - -if [ $at91_udc0.vbus != 1 ] -then - echo "No USB Device cable plugged, normal boot" - exit -fi - -gpio_get_value ${dfu_button} -if [ $? != 0 ] -then - echo "${button_name} released, normal boot" - autoboot_timeout=16 - echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" - usbserial - exit -fi - -echo "" -echo "Start DFU Mode" -echo "" - -dfu ${dfu_config} diff --git a/arch/arm/boards/qil-a926x/env/config b/arch/arm/boards/qil-a926x/env/config deleted file mode 100644 index 793a73f11e..0000000000 --- a/arch/arm/boards/qil-a926x/env/config +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=dhcp-barebox -[ x$armlinux_architecture = x1711 ] && global.dhcp.vendor_id=barebox-qil-a9260 -[ x$armlinux_architecture = x1844 ] && global.dhcp.vendor_id=barebox-qil-a9g20 - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.netmask=a.b.c.d -#eth0.gateway=a.b.c.d -#eth0.serverip=a.b.c.d - -# can be either 'nfs', 'tftp', 'nor' or 'nand' -kernel_loc=nfs -# can be either 'net', 'nor', 'nand' or 'initrd' -rootfs_loc=net -# can be either 'nfs', 'tftp', 'nor', 'nand' or empty -oftree_loc=none - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root.$rootfs_type - -kernelimage=zImage -#kernelimage=uImage -#kernelimage=Image -#kernelimage=Image.lzo - -nand_device=atmel_nand -nand_parts="128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),128k(oftree),4M(kernel),120M(rootfs),-(data)" -rootfs_mtdblock_nand=6 - -autoboot_timeout=3 - -bootargs="console=ttyS1,115200" - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# " diff --git a/arch/arm/boards/qil-a926x/init.c b/arch/arm/boards/qil-a926x/init.c index 872743775f..3ef9872797 100644 --- a/arch/arm/boards/qil-a926x/init.c +++ b/arch/arm/boards/qil-a926x/init.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -215,6 +216,9 @@ static int qil_a9260_devices_init(void) devfs_add_partition("nand0", SZ_512K, SZ_128K, DEVFS_PARTITION_FIXED, "env_raw1"); dev_add_bb_dev("env_raw1", "env1"); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_qil_a926x); + return 0; } device_initcall(qil_a9260_devices_init); diff --git a/arch/arm/boards/sama5d3_xplained/Makefile b/arch/arm/boards/sama5d3_xplained/Makefile index eb072c0161..3c301cb0cd 100644 --- a/arch/arm/boards/sama5d3_xplained/Makefile +++ b/arch/arm/boards/sama5d3_xplained/Makefile @@ -1 +1,2 @@ obj-y += init.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-sama5d3_xplained diff --git a/arch/arm/boards/sama5d3_xplained/defaultenv-sama5d3_xplained/config b/arch/arm/boards/sama5d3_xplained/defaultenv-sama5d3_xplained/config new file mode 100644 index 0000000000..5464f642c1 --- /dev/null +++ b/arch/arm/boards/sama5d3_xplained/defaultenv-sama5d3_xplained/config @@ -0,0 +1,42 @@ +#!/bin/sh + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=dhcp-barebox + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.serverip=a.b.c.d + +# can be either 'nfs', 'tftp', 'nor' or 'nand' +kernel_loc=nfs +# can be either 'net', 'nor', 'nand' or 'initrd' +rootfs_loc=net +# can be either 'nfs', 'tftp', 'nand' or empty +oftree_loc=nfs + +# can be either 'jffs2' or 'ubifs' +rootfs_type=ubifs +rootfsimage=root.$rootfs_type +ubiroot=rootfs + +# The image type of the kernel. Can be uimage, zimage, raw, or raw_lzo +kernelimage=zImage +#kernelimage=uImage +#kernelimage=Image +#kernelimage=Image.lzo + +nand_device=atmel_nand +nand_parts="256k(at91bootstrap),384k(barebox)ro,256k@768k(bareboxenv),256k(bareboxenv2),128k@1536k(oftree),5M@2M(kernel),-@8M(rootfs)" +rootfs_mtdblock_nand=6 + +m25p80_parts="64k(bootstrap),384k(barebox),256k(bareboxenv),256k(bareboxenv2),128k(oftree),-(updater)" + +autoboot_timeout=3 + +bootargs="console=ttyS0,115200" + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# " diff --git a/arch/arm/boards/sama5d3_xplained/env/config b/arch/arm/boards/sama5d3_xplained/env/config deleted file mode 100644 index 5464f642c1..0000000000 --- a/arch/arm/boards/sama5d3_xplained/env/config +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=dhcp-barebox - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.netmask=a.b.c.d -#eth0.gateway=a.b.c.d -#eth0.serverip=a.b.c.d - -# can be either 'nfs', 'tftp', 'nor' or 'nand' -kernel_loc=nfs -# can be either 'net', 'nor', 'nand' or 'initrd' -rootfs_loc=net -# can be either 'nfs', 'tftp', 'nand' or empty -oftree_loc=nfs - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root.$rootfs_type -ubiroot=rootfs - -# The image type of the kernel. Can be uimage, zimage, raw, or raw_lzo -kernelimage=zImage -#kernelimage=uImage -#kernelimage=Image -#kernelimage=Image.lzo - -nand_device=atmel_nand -nand_parts="256k(at91bootstrap),384k(barebox)ro,256k@768k(bareboxenv),256k(bareboxenv2),128k@1536k(oftree),5M@2M(kernel),-@8M(rootfs)" -rootfs_mtdblock_nand=6 - -m25p80_parts="64k(bootstrap),384k(barebox),256k(bareboxenv),256k(bareboxenv2),128k(oftree),-(updater)" - -autoboot_timeout=3 - -bootargs="console=ttyS0,115200" - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# " diff --git a/arch/arm/boards/sama5d3_xplained/init.c b/arch/arm/boards/sama5d3_xplained/init.c index 373ab814d1..fda4c56c6c 100644 --- a/arch/arm/boards/sama5d3_xplained/init.c +++ b/arch/arm/boards/sama5d3_xplained/init.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -224,6 +225,9 @@ static int sama5d3_xplained_devices_init(void) devfs_create_partitions("nand0", sama5d3_xplained_nand0_partitions); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_sama5d3_xplained); + return 0; } device_initcall(sama5d3_xplained_devices_init); diff --git a/arch/arm/boards/sama5d3xek/Makefile b/arch/arm/boards/sama5d3xek/Makefile index db021eeb77..32dcb4283c 100644 --- a/arch/arm/boards/sama5d3xek/Makefile +++ b/arch/arm/boards/sama5d3xek/Makefile @@ -1,2 +1,3 @@ obj-y += init.o obj-$(CONFIG_W1) += hw_version.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-sama5d3xek diff --git a/arch/arm/boards/sama5d3xek/defaultenv-sama5d3xek/bin/init_board b/arch/arm/boards/sama5d3xek/defaultenv-sama5d3xek/bin/init_board new file mode 100644 index 0000000000..f3d417e356 --- /dev/null +++ b/arch/arm/boards/sama5d3xek/defaultenv-sama5d3xek/bin/init_board @@ -0,0 +1,15 @@ +#!/bin/sh + +PATH=/env/bin +export PATH + +. /env/config + +splash=/env/splash.png + +if [ -f ${splash} -a -e /dev/fb0 ]; then + splash -o ${splash} + fb0.enable=1 +fi + +exit 1 diff --git a/arch/arm/boards/sama5d3xek/defaultenv-sama5d3xek/config b/arch/arm/boards/sama5d3xek/defaultenv-sama5d3xek/config new file mode 100644 index 0000000000..a7fd930ed1 --- /dev/null +++ b/arch/arm/boards/sama5d3xek/defaultenv-sama5d3xek/config @@ -0,0 +1,44 @@ +#!/bin/sh + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=dhcp-barebox +global.dhcp.vendor_id=barebox-sama5d3xek +global.dhcp.client_id="${sama5d3xcm.board}-${sama5d3xcm.vendor}" + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.serverip=a.b.c.d + +# can be either 'nfs', 'tftp', 'nor' or 'nand' +kernel_loc=nfs +# can be either 'net', 'nor', 'nand' or 'initrd' +rootfs_loc=net +# can be either 'nfs', 'tftp', 'nand' or empty +oftree_loc=nfs + +# can be either 'jffs2' or 'ubifs' +rootfs_type=ubifs +rootfsimage=root.$rootfs_type +ubiroot=rootfs + +# The image type of the kernel. Can be uimage, zimage, raw, or raw_lzo +kernelimage=zImage +#kernelimage=uImage +#kernelimage=Image +#kernelimage=Image.lzo + +nand_device=atmel_nand +nand_parts="256k(at91bootstrap),384k(barebox)ro,256k@768k(bareboxenv),256k(bareboxenv2),128k@1536k(oftree),5M@2M(kernel),-@8M(rootfs)" +rootfs_mtdblock_nand=6 + +m25p80_parts="64k(bootstrap),384k(barebox),256k(bareboxenv),256k(bareboxenv2),128k(oftree),-(updater)" + +autoboot_timeout=3 + +bootargs="console=ttyS0,115200" + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# " diff --git a/arch/arm/boards/sama5d3xek/env/bin/init_board b/arch/arm/boards/sama5d3xek/env/bin/init_board deleted file mode 100644 index f3d417e356..0000000000 --- a/arch/arm/boards/sama5d3xek/env/bin/init_board +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -PATH=/env/bin -export PATH - -. /env/config - -splash=/env/splash.png - -if [ -f ${splash} -a -e /dev/fb0 ]; then - splash -o ${splash} - fb0.enable=1 -fi - -exit 1 diff --git a/arch/arm/boards/sama5d3xek/env/config b/arch/arm/boards/sama5d3xek/env/config deleted file mode 100644 index a7fd930ed1..0000000000 --- a/arch/arm/boards/sama5d3xek/env/config +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=dhcp-barebox -global.dhcp.vendor_id=barebox-sama5d3xek -global.dhcp.client_id="${sama5d3xcm.board}-${sama5d3xcm.vendor}" - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.netmask=a.b.c.d -#eth0.gateway=a.b.c.d -#eth0.serverip=a.b.c.d - -# can be either 'nfs', 'tftp', 'nor' or 'nand' -kernel_loc=nfs -# can be either 'net', 'nor', 'nand' or 'initrd' -rootfs_loc=net -# can be either 'nfs', 'tftp', 'nand' or empty -oftree_loc=nfs - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root.$rootfs_type -ubiroot=rootfs - -# The image type of the kernel. Can be uimage, zimage, raw, or raw_lzo -kernelimage=zImage -#kernelimage=uImage -#kernelimage=Image -#kernelimage=Image.lzo - -nand_device=atmel_nand -nand_parts="256k(at91bootstrap),384k(barebox)ro,256k@768k(bareboxenv),256k(bareboxenv2),128k@1536k(oftree),5M@2M(kernel),-@8M(rootfs)" -rootfs_mtdblock_nand=6 - -m25p80_parts="64k(bootstrap),384k(barebox),256k(bareboxenv),256k(bareboxenv2),128k(oftree),-(updater)" - -autoboot_timeout=3 - -bootargs="console=ttyS0,115200" - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# " diff --git a/arch/arm/boards/sama5d3xek/init.c b/arch/arm/boards/sama5d3xek/init.c index 7504bf83b0..b35bdb5b05 100644 --- a/arch/arm/boards/sama5d3xek/init.c +++ b/arch/arm/boards/sama5d3xek/init.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -463,6 +464,9 @@ static int at91sama5d3xek_devices_init(void) devfs_create_partitions("nand0", at91sama5d3xek_nand0_partitions); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_sama5d3xek); + return 0; } device_initcall(at91sama5d3xek_devices_init); diff --git a/arch/arm/boards/scb9328/Makefile b/arch/arm/boards/scb9328/Makefile index 002f218391..7ef6c3fe62 100644 --- a/arch/arm/boards/scb9328/Makefile +++ b/arch/arm/boards/scb9328/Makefile @@ -1,3 +1,4 @@ lwl-y += lowlevel_init.o obj-y += scb9328.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-scb9328 diff --git a/arch/arm/boards/scb9328/defaultenv-scb9328/config b/arch/arm/boards/scb9328/defaultenv-scb9328/config new file mode 100644 index 0000000000..c3cbce57d4 --- /dev/null +++ b/arch/arm/boards/scb9328/defaultenv-scb9328/config @@ -0,0 +1,50 @@ +#!/bin/sh + +eth0.serverip= +user= + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=dhcp + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.serverip=a.b.c.d + +# can be either 'net', 'nor' or 'nand' +kernel_loc=net +# can be either 'net', 'nor', 'nand' or 'initrd' +rootfs_loc=net + +# can be either 'jffs2' or 'ubifs' +rootfs_type=ubifs +rootfsimage=root-${global.hostname}.$rootfs_type + +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo + +if [ -n $user ]; then + kernelimage="$user"-"$kernelimage" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" + rootfsimage="$user"-"$rootfsimage" +else + nfsroot="$eth0.serverip:/path/to/nfs/root" +fi + +autoboot_timeout=3 + +bootargs="console=ttymxc0,115200" + +nor_parts="256k(barebox)ro,128k(bareboxenv),2M(kernel),-(root)" +rootfs_mtdblock_nor=3 + +nand_parts="256k(barebox)ro,128k(bareboxenv),2M(kernel),-(root)" +rootfs_mtdblock_nand=7 + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " + diff --git a/arch/arm/boards/scb9328/env/config b/arch/arm/boards/scb9328/env/config deleted file mode 100644 index c3cbce57d4..0000000000 --- a/arch/arm/boards/scb9328/env/config +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh - -eth0.serverip= -user= - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=dhcp - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.netmask=a.b.c.d -#eth0.gateway=a.b.c.d -#eth0.serverip=a.b.c.d - -# can be either 'net', 'nor' or 'nand' -kernel_loc=net -# can be either 'net', 'nor', 'nand' or 'initrd' -rootfs_loc=net - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root-${global.hostname}.$rootfs_type - -kernelimage=zImage-${global.hostname} -#kernelimage=uImage-${global.hostname} -#kernelimage=Image-${global.hostname} -#kernelimage=Image-${global.hostname}.lzo - -if [ -n $user ]; then - kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" - rootfsimage="$user"-"$rootfsimage" -else - nfsroot="$eth0.serverip:/path/to/nfs/root" -fi - -autoboot_timeout=3 - -bootargs="console=ttymxc0,115200" - -nor_parts="256k(barebox)ro,128k(bareboxenv),2M(kernel),-(root)" -rootfs_mtdblock_nor=3 - -nand_parts="256k(barebox)ro,128k(bareboxenv),2M(kernel),-(root)" -rootfs_mtdblock_nand=7 - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " - diff --git a/arch/arm/boards/scb9328/scb9328.c b/arch/arm/boards/scb9328/scb9328.c index fda3b1432c..697ed4b401 100644 --- a/arch/arm/boards/scb9328/scb9328.c +++ b/arch/arm/boards/scb9328/scb9328.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -79,6 +80,9 @@ static int scb9328_devices_init(void) armlinux_set_architecture(MACH_TYPE_SCB9328); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_scb9328); + return 0; } diff --git a/arch/arm/boards/tny-a926x/Makefile b/arch/arm/boards/tny-a926x/Makefile index 45b10ec63f..dba2f8cfcf 100644 --- a/arch/arm/boards/tny-a926x/Makefile +++ b/arch/arm/boards/tny-a926x/Makefile @@ -6,3 +6,4 @@ obj-$(CONFIG_AT91_BOOTSTRAP) += $(bootstrap-y) lowlevel_init-$(CONFIG_MACH_TNY_A9263) = tny_a9263_lowlevel_init.o lwl-$(CONFIG_HAVE_AT91_LOWLEVEL_INIT) += $(lowlevel_init-y) +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-tny-a926x diff --git a/arch/arm/boards/tny-a926x/defaultenv-tny-a926x/bin/init_board b/arch/arm/boards/tny-a926x/defaultenv-tny-a926x/bin/init_board new file mode 100644 index 0000000000..0d40eb41a5 --- /dev/null +++ b/arch/arm/boards/tny-a926x/defaultenv-tny-a926x/bin/init_board @@ -0,0 +1,11 @@ +#!/bin/sh + +if [ $at91_udc0.vbus != 1 ] +then + echo "No USB Device cable plugged, normal boot" + exit +fi + +autoboot_timeout=16 +echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" +usbserial diff --git a/arch/arm/boards/tny-a926x/defaultenv-tny-a926x/config b/arch/arm/boards/tny-a926x/defaultenv-tny-a926x/config new file mode 100644 index 0000000000..c19ec4fd61 --- /dev/null +++ b/arch/arm/boards/tny-a926x/defaultenv-tny-a926x/config @@ -0,0 +1,41 @@ +#!/bin/sh + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=dhcp-barebox +[ x$armlinux_architecture = x2058 ] && global.dhcp.vendor_id=barebox-tny-a9260 +[ x$armlinux_architecture = x2059 ] && global.dhcp.vendor_id=barebox-tny-a9g20 +[ x$armlinux_architecture = x2140 ] && global.dhcp.vendor_id=barebox-tny-a9263 + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.serverip=a.b.c.d + +# can be either 'nfs', 'tftp', 'nor' or 'nand' +kernel_loc=nand +# can be either 'net', 'nor', 'nand' or 'initrd' +rootfs_loc=nand +# can be either 'nfs', 'tftp', 'nor', 'nand' or empty +oftree_loc=nand + +# can be either 'jffs2' or 'ubifs' +rootfs_type=ubifs +rootfsimage=root.$rootfs_type + +kernelimage=zImage +#kernelimage=uImage +#kernelimage=Image +#kernelimage=Image.lzo + +nand_device=atmel_nand +nand_parts="128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),128k(oftree),4M(kernel),120M(rootfs),-(data)" +rootfs_mtdblock_nand=6 + +autoboot_timeout=3 + +bootargs="console=ttyS0,115200" + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# " diff --git a/arch/arm/boards/tny-a926x/env/bin/init_board b/arch/arm/boards/tny-a926x/env/bin/init_board deleted file mode 100644 index 0d40eb41a5..0000000000 --- a/arch/arm/boards/tny-a926x/env/bin/init_board +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -if [ $at91_udc0.vbus != 1 ] -then - echo "No USB Device cable plugged, normal boot" - exit -fi - -autoboot_timeout=16 -echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" -usbserial diff --git a/arch/arm/boards/tny-a926x/env/config b/arch/arm/boards/tny-a926x/env/config deleted file mode 100644 index c19ec4fd61..0000000000 --- a/arch/arm/boards/tny-a926x/env/config +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=dhcp-barebox -[ x$armlinux_architecture = x2058 ] && global.dhcp.vendor_id=barebox-tny-a9260 -[ x$armlinux_architecture = x2059 ] && global.dhcp.vendor_id=barebox-tny-a9g20 -[ x$armlinux_architecture = x2140 ] && global.dhcp.vendor_id=barebox-tny-a9263 - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.netmask=a.b.c.d -#eth0.gateway=a.b.c.d -#eth0.serverip=a.b.c.d - -# can be either 'nfs', 'tftp', 'nor' or 'nand' -kernel_loc=nand -# can be either 'net', 'nor', 'nand' or 'initrd' -rootfs_loc=nand -# can be either 'nfs', 'tftp', 'nor', 'nand' or empty -oftree_loc=nand - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root.$rootfs_type - -kernelimage=zImage -#kernelimage=uImage -#kernelimage=Image -#kernelimage=Image.lzo - -nand_device=atmel_nand -nand_parts="128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),128k(oftree),4M(kernel),120M(rootfs),-(data)" -rootfs_mtdblock_nand=6 - -autoboot_timeout=3 - -bootargs="console=ttyS0,115200" - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# " diff --git a/arch/arm/boards/tny-a926x/init.c b/arch/arm/boards/tny-a926x/init.c index 3ebd8aae02..3b83c9f222 100644 --- a/arch/arm/boards/tny-a926x/init.c +++ b/arch/arm/boards/tny-a926x/init.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -241,6 +242,9 @@ static int tny_a9260_devices_init(void) devfs_add_partition("nand0", SZ_512K, SZ_128K, DEVFS_PARTITION_FIXED, "env_raw1"); dev_add_bb_dev("env_raw1", "env1"); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_tny_a926x); + return 0; } device_initcall(tny_a9260_devices_init); diff --git a/arch/arm/boards/usb-a926x/Makefile b/arch/arm/boards/usb-a926x/Makefile index f1370a4df0..4f09581e33 100644 --- a/arch/arm/boards/usb-a926x/Makefile +++ b/arch/arm/boards/usb-a926x/Makefile @@ -6,3 +6,4 @@ obj-$(CONFIG_AT91_BOOTSTRAP) += $(bootstrap-y) lowlevel_init-$(CONFIG_MACH_USB_A9263) = usb_a9263_lowlevel_init.o lwl-$(CONFIG_HAVE_AT91_LOWLEVEL_INIT) += $(lowlevel_init-y) +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-usb-a926x diff --git a/arch/arm/boards/usb-a926x/defaultenv-usb-a926x/bin/init_board b/arch/arm/boards/usb-a926x/defaultenv-usb-a926x/bin/init_board new file mode 100644 index 0000000000..09ba7cc981 --- /dev/null +++ b/arch/arm/boards/usb-a926x/defaultenv-usb-a926x/bin/init_board @@ -0,0 +1,46 @@ +#!/bin/sh + +button_name="dfu_bp" +button_wait=5 + +dfu_config="/dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.rootfs.bb(rootfs)r" + +if [ $at91_udc0.vbus != 1 ] +then + echo "No USB Device cable plugged, normal boot" + exit +fi + +gpio_get_value ${dfu_button} +if [ $? != 0 ] +then + autoboot_timeout=16 + echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" + usbserial + exit +fi + +echo "${button_name} pressed detected wait ${button_wait}s" +timeout -s -a ${button_wait} + +if [ $at91_udc0.vbus != 1 ] +then + echo "No USB Device cable plugged, normal boot" + exit +fi + +gpio_get_value ${dfu_button} +if [ $? != 0 ] +then + echo "${button_name} released, normal boot" + autoboot_timeout=16 + echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" + usbserial + exit +fi + +echo "" +echo "Start DFU Mode" +echo "" + +dfu ${dfu_config} diff --git a/arch/arm/boards/usb-a926x/defaultenv-usb-a926x/config b/arch/arm/boards/usb-a926x/defaultenv-usb-a926x/config new file mode 100644 index 0000000000..49199ba391 --- /dev/null +++ b/arch/arm/boards/usb-a926x/defaultenv-usb-a926x/config @@ -0,0 +1,41 @@ +#!/bin/sh + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=dhcp-barebox +[ x$armlinux_architecture = x1709 ] && global.dhcp.vendor_id=barebox-usb-a9260 +[ x$armlinux_architecture = x1710 ] && global.dhcp.vendor_id=barebox-usb-a9263 +[ x$armlinux_architecture = x1841 ] && global.dhcp.vendor_id=barebox-usb-a9g20 + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.serverip=a.b.c.d + +# can be either 'nfs', 'tftp', 'nor' or 'nand' +kernel_loc=nfs +# can be either 'net', 'nor', 'nand' or 'initrd' +rootfs_loc=net +# can be either 'nfs', 'tftp', 'nor', 'nand' or empty +oftree_loc=nfs + +# can be either 'jffs2' or 'ubifs' +rootfs_type=ubifs +rootfsimage=root.$rootfs_type + +kernelimage=zImage +#kernelimage=uImage +#kernelimage=Image +#kernelimage=Image.lzo + +nand_device=atmel_nand +nand_parts="128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),128k(oftree),4M(kernel),120M(rootfs),-(data)" +rootfs_mtdblock_nand=6 + +autoboot_timeout=3 + +bootargs="console=ttyS0,115200" + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# " diff --git a/arch/arm/boards/usb-a926x/env/bin/init_board b/arch/arm/boards/usb-a926x/env/bin/init_board deleted file mode 100644 index 09ba7cc981..0000000000 --- a/arch/arm/boards/usb-a926x/env/bin/init_board +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh - -button_name="dfu_bp" -button_wait=5 - -dfu_config="/dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.rootfs.bb(rootfs)r" - -if [ $at91_udc0.vbus != 1 ] -then - echo "No USB Device cable plugged, normal boot" - exit -fi - -gpio_get_value ${dfu_button} -if [ $? != 0 ] -then - autoboot_timeout=16 - echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" - usbserial - exit -fi - -echo "${button_name} pressed detected wait ${button_wait}s" -timeout -s -a ${button_wait} - -if [ $at91_udc0.vbus != 1 ] -then - echo "No USB Device cable plugged, normal boot" - exit -fi - -gpio_get_value ${dfu_button} -if [ $? != 0 ] -then - echo "${button_name} released, normal boot" - autoboot_timeout=16 - echo "enable tty over USB Device, increase the boot delay to ${autoboot_timeout}s" - usbserial - exit -fi - -echo "" -echo "Start DFU Mode" -echo "" - -dfu ${dfu_config} diff --git a/arch/arm/boards/usb-a926x/env/config b/arch/arm/boards/usb-a926x/env/config deleted file mode 100644 index 49199ba391..0000000000 --- a/arch/arm/boards/usb-a926x/env/config +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=dhcp-barebox -[ x$armlinux_architecture = x1709 ] && global.dhcp.vendor_id=barebox-usb-a9260 -[ x$armlinux_architecture = x1710 ] && global.dhcp.vendor_id=barebox-usb-a9263 -[ x$armlinux_architecture = x1841 ] && global.dhcp.vendor_id=barebox-usb-a9g20 - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.netmask=a.b.c.d -#eth0.gateway=a.b.c.d -#eth0.serverip=a.b.c.d - -# can be either 'nfs', 'tftp', 'nor' or 'nand' -kernel_loc=nfs -# can be either 'net', 'nor', 'nand' or 'initrd' -rootfs_loc=net -# can be either 'nfs', 'tftp', 'nor', 'nand' or empty -oftree_loc=nfs - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root.$rootfs_type - -kernelimage=zImage -#kernelimage=uImage -#kernelimage=Image -#kernelimage=Image.lzo - -nand_device=atmel_nand -nand_parts="128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),128k(oftree),4M(kernel),120M(rootfs),-(data)" -rootfs_mtdblock_nand=6 - -autoboot_timeout=3 - -bootargs="console=ttyS0,115200" - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# " diff --git a/arch/arm/boards/usb-a926x/init.c b/arch/arm/boards/usb-a926x/init.c index a9a0549adf..12e8f4e0d6 100644 --- a/arch/arm/boards/usb-a926x/init.c +++ b/arch/arm/boards/usb-a926x/init.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -416,6 +417,9 @@ static int usb_a9260_devices_init(void) devfs_add_partition("nand0", SZ_512K, SZ_128K, DEVFS_PARTITION_FIXED, "env_raw1"); dev_add_bb_dev("env_raw1", "env1"); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_usb_a926x); + return 0; } device_initcall(usb_a9260_devices_init); diff --git a/arch/arm/boards/vexpress/Makefile b/arch/arm/boards/vexpress/Makefile index e11fd5b692..c89d7bf182 100644 --- a/arch/arm/boards/vexpress/Makefile +++ b/arch/arm/boards/vexpress/Makefile @@ -1,3 +1,4 @@ obj-y += init.o lwl-y += lowlevel.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-vexpress diff --git a/arch/arm/boards/vexpress/defaultenv-vexpress/config b/arch/arm/boards/vexpress/defaultenv-vexpress/config new file mode 100644 index 0000000000..6c0abda40c --- /dev/null +++ b/arch/arm/boards/vexpress/defaultenv-vexpress/config @@ -0,0 +1,38 @@ +#!/bin/sh + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=dhcp +global.dhcp.vendor_id=barebox-${global.hostname} + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.serverip=a.b.c.d + +# can be either 'nfs', 'tftp' or 'nor' +kernel_loc=tftp +# can be either 'net', 'nor' or 'initrd' +rootfs_loc=initrd + +# can be either 'jffs2' or 'ubifs' +rootfs_type=ubifs +rootfsimage=root.$rootfs_type + +kernelimage=zImage +#kernelimage=uImage +#kernelimage=Image +#kernelimage=Image.lzo + +nfsroot="$eth0.serverip:/opt/work/busybox/arm9/rootfs_arm" + +nor_parts="256k(barebox)ro,64k(bareboxenv),1536k(kernel),-(root)" +rootfs_mtdblock_nor=3 + +autoboot_timeout=3 + +bootargs="console=ttyAMA0,115200n8 CONSOLE=/dev/ttyAMA0" + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;31m[barebox@\h]:\w\e[0m\n# " diff --git a/arch/arm/boards/vexpress/env/config b/arch/arm/boards/vexpress/env/config deleted file mode 100644 index 6c0abda40c..0000000000 --- a/arch/arm/boards/vexpress/env/config +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh - -# use 'dhcp' to do dhcp in barebox and in kernel -# use 'none' if you want to skip kernel ip autoconfiguration -ip=dhcp -global.dhcp.vendor_id=barebox-${global.hostname} - -# or set your networking parameters here -#eth0.ipaddr=a.b.c.d -#eth0.netmask=a.b.c.d -#eth0.gateway=a.b.c.d -#eth0.serverip=a.b.c.d - -# can be either 'nfs', 'tftp' or 'nor' -kernel_loc=tftp -# can be either 'net', 'nor' or 'initrd' -rootfs_loc=initrd - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root.$rootfs_type - -kernelimage=zImage -#kernelimage=uImage -#kernelimage=Image -#kernelimage=Image.lzo - -nfsroot="$eth0.serverip:/opt/work/busybox/arm9/rootfs_arm" - -nor_parts="256k(barebox)ro,64k(bareboxenv),1536k(kernel),-(root)" -rootfs_mtdblock_nor=3 - -autoboot_timeout=3 - -bootargs="console=ttyAMA0,115200n8 CONSOLE=/dev/ttyAMA0" - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;31m[barebox@\h]:\w\e[0m\n# " diff --git a/arch/arm/boards/vexpress/init.c b/arch/arm/boards/vexpress/init.c index 5b2035bd36..f89dff9392 100644 --- a/arch/arm/boards/vexpress/init.c +++ b/arch/arm/boards/vexpress/init.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -109,6 +110,9 @@ static int vexpress_devices_init(void) devfs_add_partition("nor0", 0x00000, 0x40000, DEVFS_PARTITION_FIXED, "self"); devfs_add_partition("nor0", 0x40000, 0x20000, DEVFS_PARTITION_FIXED, "env0"); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_vexpress); + return 0; } device_initcall(vexpress_devices_init); diff --git a/arch/arm/configs/animeo_ip_defconfig b/arch/arm/configs/animeo_ip_defconfig index d4fbfefd00..0f2e3a07aa 100644 --- a/arch/arm/configs/animeo_ip_defconfig +++ b/arch/arm/configs/animeo_ip_defconfig @@ -17,7 +17,6 @@ CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/animeo_ip/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/at91rm9200ek_defconfig b/arch/arm/configs/at91rm9200ek_defconfig index cca69b8d4e..c82fe09ac9 100644 --- a/arch/arm/configs/at91rm9200ek_defconfig +++ b/arch/arm/configs/at91rm9200ek_defconfig @@ -13,7 +13,6 @@ CONFIG_MENU=y # CONFIG_CONSOLE_ACTIVATE_FIRST is not set CONFIG_CONSOLE_ACTIVATE_ALL=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/at91rm9200ek/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/at91sam9260ek_defconfig b/arch/arm/configs/at91sam9260ek_defconfig index 5190b19493..10a735d565 100644 --- a/arch/arm/configs/at91sam9260ek_defconfig +++ b/arch/arm/configs/at91sam9260ek_defconfig @@ -17,7 +17,6 @@ CONFIG_AUTO_COMPLETE=y # CONFIG_CONSOLE_ACTIVATE_FIRST is not set CONFIG_CONSOLE_ACTIVATE_ALL=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/at91sam9260ek/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/at91sam9261ek_defconfig b/arch/arm/configs/at91sam9261ek_defconfig index 2febff07d9..ad262e913e 100644 --- a/arch/arm/configs/at91sam9261ek_defconfig +++ b/arch/arm/configs/at91sam9261ek_defconfig @@ -17,7 +17,6 @@ CONFIG_MENU=y # CONFIG_CONSOLE_ACTIVATE_FIRST is not set CONFIG_CONSOLE_ACTIVATE_ALL=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/at91sam9261ek/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/at91sam9261ek_first_stage_defconfig b/arch/arm/configs/at91sam9261ek_first_stage_defconfig index 36b2dad07c..e3b6e5fdd3 100644 --- a/arch/arm/configs/at91sam9261ek_first_stage_defconfig +++ b/arch/arm/configs/at91sam9261ek_first_stage_defconfig @@ -18,7 +18,6 @@ CONFIG_AUTO_COMPLETE=y CONFIG_MENU=y CONFIG_CONSOLE_ACTIVATE_ALL=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/at91sam9261ek/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/at91sam9263ek_defconfig b/arch/arm/configs/at91sam9263ek_defconfig index 5154c78360..5f98cd694e 100644 --- a/arch/arm/configs/at91sam9263ek_defconfig +++ b/arch/arm/configs/at91sam9263ek_defconfig @@ -15,7 +15,6 @@ CONFIG_AUTO_COMPLETE=y # CONFIG_CONSOLE_ACTIVATE_FIRST is not set CONFIG_CONSOLE_ACTIVATE_ALL=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/at91sam9263ek/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/at91sam9g10ek_defconfig b/arch/arm/configs/at91sam9g10ek_defconfig index 1c913c04ab..40b4b9accb 100644 --- a/arch/arm/configs/at91sam9g10ek_defconfig +++ b/arch/arm/configs/at91sam9g10ek_defconfig @@ -17,7 +17,6 @@ CONFIG_MENU=y # CONFIG_CONSOLE_ACTIVATE_FIRST is not set CONFIG_CONSOLE_ACTIVATE_ALL=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/at91sam9261ek/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/at91sam9g20ek_defconfig b/arch/arm/configs/at91sam9g20ek_defconfig index 2f2232825c..a501ec53d7 100644 --- a/arch/arm/configs/at91sam9g20ek_defconfig +++ b/arch/arm/configs/at91sam9g20ek_defconfig @@ -17,7 +17,6 @@ CONFIG_AUTO_COMPLETE=y # CONFIG_CONSOLE_ACTIVATE_FIRST is not set CONFIG_CONSOLE_ACTIVATE_ALL=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/at91sam9260ek/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/at91sam9m10g45ek_defconfig b/arch/arm/configs/at91sam9m10g45ek_defconfig index 1ba7a9c72b..39850723c3 100644 --- a/arch/arm/configs/at91sam9m10g45ek_defconfig +++ b/arch/arm/configs/at91sam9m10g45ek_defconfig @@ -18,7 +18,6 @@ CONFIG_AUTO_COMPLETE=y CONFIG_MENU=y CONFIG_PASSWD_SUM_SHA1=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/at91sam9m10g45ek/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/at91sam9n12ek_defconfig b/arch/arm/configs/at91sam9n12ek_defconfig index 8d1216ed7a..e73e383182 100644 --- a/arch/arm/configs/at91sam9n12ek_defconfig +++ b/arch/arm/configs/at91sam9n12ek_defconfig @@ -18,7 +18,6 @@ CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y CONFIG_CONSOLE_ACTIVATE_ALL=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/at91sam9n12ek/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/at91sam9x5ek_defconfig b/arch/arm/configs/at91sam9x5ek_defconfig index 22ad72f969..1af5ec6294 100644 --- a/arch/arm/configs/at91sam9x5ek_defconfig +++ b/arch/arm/configs/at91sam9x5ek_defconfig @@ -18,7 +18,6 @@ CONFIG_AUTO_COMPLETE=y # CONFIG_CONSOLE_ACTIVATE_FIRST is not set CONFIG_CONSOLE_ACTIVATE_ALL=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/at91sam9x5ek/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/cupid_defconfig b/arch/arm/configs/cupid_defconfig index 4b9055627f..a1776d2d56 100644 --- a/arch/arm/configs/cupid_defconfig +++ b/arch/arm/configs/cupid_defconfig @@ -18,7 +18,6 @@ CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y CONFIG_MENU=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/guf-cupid/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/eukrea_cpuimx25_defconfig b/arch/arm/configs/eukrea_cpuimx25_defconfig index 0080dcfbe3..feebb13fb4 100644 --- a/arch/arm/configs/eukrea_cpuimx25_defconfig +++ b/arch/arm/configs/eukrea_cpuimx25_defconfig @@ -19,7 +19,6 @@ CONFIG_AUTO_COMPLETE=y CONFIG_CONSOLE_ACTIVATE_ALL=y CONFIG_DEFAULT_COMPRESSION_LZO=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/eukrea_cpuimx25/env" CONFIG_LONGHELP=y CONFIG_CMD_IOMEM=y CONFIG_CMD_MEMINFO=y diff --git a/arch/arm/configs/eukrea_cpuimx35_defconfig b/arch/arm/configs/eukrea_cpuimx35_defconfig index 588253002d..edc5b9c21f 100644 --- a/arch/arm/configs/eukrea_cpuimx35_defconfig +++ b/arch/arm/configs/eukrea_cpuimx35_defconfig @@ -19,7 +19,6 @@ CONFIG_AUTO_COMPLETE=y CONFIG_CONSOLE_ACTIVATE_ALL=y CONFIG_DEFAULT_COMPRESSION_LZO=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/eukrea_cpuimx35/env" CONFIG_LONGHELP=y CONFIG_CMD_IOMEM=y CONFIG_CMD_IMD=y diff --git a/arch/arm/configs/eukrea_cpuimx51_defconfig b/arch/arm/configs/eukrea_cpuimx51_defconfig index 8e8fd94fb2..e1b011ba89 100644 --- a/arch/arm/configs/eukrea_cpuimx51_defconfig +++ b/arch/arm/configs/eukrea_cpuimx51_defconfig @@ -14,7 +14,6 @@ CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/eukrea_cpuimx51/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/freescale-mx25-3ds_defconfig b/arch/arm/configs/freescale-mx25-3ds_defconfig index 8d2a200d06..1fd8be2783 100644 --- a/arch/arm/configs/freescale-mx25-3ds_defconfig +++ b/arch/arm/configs/freescale-mx25-3ds_defconfig @@ -17,7 +17,6 @@ CONFIG_AUTO_COMPLETE=y # CONFIG_ERRNO_MESSAGES is not set CONFIG_PARTITION=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/freescale-mx25-3ds/env/" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/freescale-mx35-3ds_defconfig b/arch/arm/configs/freescale-mx35-3ds_defconfig index f45750fc81..816dc7872b 100644 --- a/arch/arm/configs/freescale-mx35-3ds_defconfig +++ b/arch/arm/configs/freescale-mx35-3ds_defconfig @@ -15,7 +15,6 @@ CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y CONFIG_PARTITION=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/freescale-mx35-3ds/env/" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/freescale-mx53-smd_defconfig b/arch/arm/configs/freescale-mx53-smd_defconfig index b055dc807f..c7f2191a0d 100644 --- a/arch/arm/configs/freescale-mx53-smd_defconfig +++ b/arch/arm/configs/freescale-mx53-smd_defconfig @@ -17,7 +17,6 @@ CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/freescale-mx53-smd/env/" CONFIG_DEBUG_INFO=y CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y diff --git a/arch/arm/configs/friendlyarm_mini6410_defconfig b/arch/arm/configs/friendlyarm_mini6410_defconfig index 7d216333df..1789374452 100644 --- a/arch/arm/configs/friendlyarm_mini6410_defconfig +++ b/arch/arm/configs/friendlyarm_mini6410_defconfig @@ -10,7 +10,6 @@ CONFIG_AUTO_COMPLETE=y CONFIG_PARTITION=y CONFIG_PARTITION_DISK=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/friendlyarm-mini6410/env" CONFIG_DEBUG_INFO=y CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y diff --git a/arch/arm/configs/friendlyarm_tiny6410_defconfig b/arch/arm/configs/friendlyarm_tiny6410_defconfig index 3342cf8ed3..90208c3762 100644 --- a/arch/arm/configs/friendlyarm_tiny6410_defconfig +++ b/arch/arm/configs/friendlyarm_tiny6410_defconfig @@ -11,7 +11,6 @@ CONFIG_AUTO_COMPLETE=y CONFIG_PARTITION=y CONFIG_PARTITION_DISK=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/friendlyarm-tiny6410/env" CONFIG_DEBUG_INFO=y CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y diff --git a/arch/arm/configs/haba_knx_lite_defconfig b/arch/arm/configs/haba_knx_lite_defconfig index d33d440b09..d01c412388 100644 --- a/arch/arm/configs/haba_knx_lite_defconfig +++ b/arch/arm/configs/haba_knx_lite_defconfig @@ -17,7 +17,6 @@ CONFIG_AUTO_COMPLETE=y CONFIG_MENU=y CONFIG_CONSOLE_ACTIVATE_ALL=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/haba-knx/env" # CONFIG_CMD_ARM_CPUINFO is not set CONFIG_LONGHELP=y CONFIG_CMD_MEMINFO=y diff --git a/arch/arm/configs/highbank_defconfig b/arch/arm/configs/highbank_defconfig index 3e3619d4e3..01b17bc3d8 100644 --- a/arch/arm/configs/highbank_defconfig +++ b/arch/arm/configs/highbank_defconfig @@ -13,7 +13,6 @@ CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y CONFIG_MENU=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/highbank/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/neso_defconfig b/arch/arm/configs/neso_defconfig index 209396e9c9..30156632fd 100644 --- a/arch/arm/configs/neso_defconfig +++ b/arch/arm/configs/neso_defconfig @@ -17,7 +17,6 @@ CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y CONFIG_PARTITION=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/guf-neso/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/nhk8815_defconfig b/arch/arm/configs/nhk8815_defconfig index 02eddcc668..1526d79856 100644 --- a/arch/arm/configs/nhk8815_defconfig +++ b/arch/arm/configs/nhk8815_defconfig @@ -11,7 +11,6 @@ CONFIG_MENU=y CONFIG_PASSWD_SUM_SHA1=y CONFIG_PARTITION=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/nhk8815/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/phytec-phycard-omap4_defconfig b/arch/arm/configs/phytec-phycard-omap4_defconfig index cd9310ebd7..d9c89bbdd3 100644 --- a/arch/arm/configs/phytec-phycard-omap4_defconfig +++ b/arch/arm/configs/phytec-phycard-omap4_defconfig @@ -17,7 +17,6 @@ CONFIG_AUTO_COMPLETE=y # CONFIG_TIMESTAMP is not set CONFIG_PARTITION=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/phytec-phycard-omap4/env/" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/phytec-phycore-omap4460_defconfig b/arch/arm/configs/phytec-phycore-omap4460_defconfig index ce5d75df41..54d7722f59 100644 --- a/arch/arm/configs/phytec-phycore-omap4460_defconfig +++ b/arch/arm/configs/phytec-phycore-omap4460_defconfig @@ -16,7 +16,6 @@ CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y # CONFIG_TIMESTAMP is not set CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/phytec-phycore-omap4460/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/pm9261_defconfig b/arch/arm/configs/pm9261_defconfig index c3cecb2506..4455d9c31b 100644 --- a/arch/arm/configs/pm9261_defconfig +++ b/arch/arm/configs/pm9261_defconfig @@ -10,7 +10,6 @@ CONFIG_AUTO_COMPLETE=y CONFIG_MENU=y CONFIG_PARTITION=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/pm9261/env/" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/pm9g45_defconfig b/arch/arm/configs/pm9g45_defconfig index a5b54ff32d..7bb3b9eccf 100644 --- a/arch/arm/configs/pm9g45_defconfig +++ b/arch/arm/configs/pm9g45_defconfig @@ -14,7 +14,6 @@ CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/pm9g45/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SAVEENV=y CONFIG_CMD_EXPORT=y diff --git a/arch/arm/configs/qemu_virt64_defconfig b/arch/arm/configs/qemu_virt64_defconfig index ed5abef195..f8128aac08 100644 --- a/arch/arm/configs/qemu_virt64_defconfig +++ b/arch/arm/configs/qemu_virt64_defconfig @@ -14,7 +14,6 @@ CONFIG_AUTO_COMPLETE=y CONFIG_MENU=y CONFIG_PARTITION=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/qemu-virt64/env" CONFIG_DEBUG_INFO=y CONFIG_LONGHELP=y CONFIG_CMD_MEMINFO=y diff --git a/arch/arm/configs/qil_a9260_128mib_defconfig b/arch/arm/configs/qil_a9260_128mib_defconfig index b92847f34d..7b6c352ec4 100644 --- a/arch/arm/configs/qil_a9260_128mib_defconfig +++ b/arch/arm/configs/qil_a9260_128mib_defconfig @@ -19,7 +19,6 @@ CONFIG_AUTO_COMPLETE=y CONFIG_MENU=y CONFIG_CONSOLE_ACTIVATE_ALL=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/qil-a926x/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/qil_a9260_defconfig b/arch/arm/configs/qil_a9260_defconfig index 72db60b444..6918abba33 100644 --- a/arch/arm/configs/qil_a9260_defconfig +++ b/arch/arm/configs/qil_a9260_defconfig @@ -18,7 +18,6 @@ CONFIG_AUTO_COMPLETE=y CONFIG_MENU=y CONFIG_CONSOLE_ACTIVATE_ALL=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/qil-a926x/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/qil_a9g20_128mib_defconfig b/arch/arm/configs/qil_a9g20_128mib_defconfig index 3e30a07a2e..7546a5b9eb 100644 --- a/arch/arm/configs/qil_a9g20_128mib_defconfig +++ b/arch/arm/configs/qil_a9g20_128mib_defconfig @@ -19,7 +19,6 @@ CONFIG_AUTO_COMPLETE=y CONFIG_MENU=y CONFIG_CONSOLE_ACTIVATE_ALL=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/qil-a926x/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/qil_a9g20_defconfig b/arch/arm/configs/qil_a9g20_defconfig index 6294692c4f..bf9e8bb81f 100644 --- a/arch/arm/configs/qil_a9g20_defconfig +++ b/arch/arm/configs/qil_a9g20_defconfig @@ -18,7 +18,6 @@ CONFIG_AUTO_COMPLETE=y CONFIG_MENU=y CONFIG_CONSOLE_ACTIVATE_ALL=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/qil-a926x/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/sama5d3_xplained_defconfig b/arch/arm/configs/sama5d3_xplained_defconfig index 156f0326e7..773223e04a 100644 --- a/arch/arm/configs/sama5d3_xplained_defconfig +++ b/arch/arm/configs/sama5d3_xplained_defconfig @@ -19,7 +19,6 @@ CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y CONFIG_CONSOLE_ACTIVATE_ALL=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/sama5d3_xplained/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/sama5d3xek_defconfig b/arch/arm/configs/sama5d3xek_defconfig index 9e2d41e601..48535e5f61 100644 --- a/arch/arm/configs/sama5d3xek_defconfig +++ b/arch/arm/configs/sama5d3xek_defconfig @@ -18,7 +18,6 @@ CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y CONFIG_CONSOLE_ACTIVATE_ALL=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/sama5d3xek/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/scb9328_defconfig b/arch/arm/configs/scb9328_defconfig index 09767aaecc..a707732614 100644 --- a/arch/arm/configs/scb9328_defconfig +++ b/arch/arm/configs/scb9328_defconfig @@ -12,7 +12,6 @@ CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y CONFIG_PARTITION=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/scb9328/env/" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/tny_a9260_defconfig b/arch/arm/configs/tny_a9260_defconfig index d9395fa7b3..f288387bbe 100644 --- a/arch/arm/configs/tny_a9260_defconfig +++ b/arch/arm/configs/tny_a9260_defconfig @@ -20,7 +20,6 @@ CONFIG_MENU=y # CONFIG_CONSOLE_ACTIVATE_FIRST is not set CONFIG_CONSOLE_ACTIVATE_ALL=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/tny-a926x/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/tny_a9263_defconfig b/arch/arm/configs/tny_a9263_defconfig index e250ab3440..cd955f73d2 100644 --- a/arch/arm/configs/tny_a9263_defconfig +++ b/arch/arm/configs/tny_a9263_defconfig @@ -20,7 +20,6 @@ CONFIG_MENU=y # CONFIG_CONSOLE_ACTIVATE_FIRST is not set CONFIG_CONSOLE_ACTIVATE_ALL=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/tny-a926x/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/tny_a9g20_defconfig b/arch/arm/configs/tny_a9g20_defconfig index 4a8da59450..dc3c13ae7f 100644 --- a/arch/arm/configs/tny_a9g20_defconfig +++ b/arch/arm/configs/tny_a9g20_defconfig @@ -20,7 +20,6 @@ CONFIG_MENU=y # CONFIG_CONSOLE_ACTIVATE_FIRST is not set CONFIG_CONSOLE_ACTIVATE_ALL=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/tny-a926x/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/usb_a9260_defconfig b/arch/arm/configs/usb_a9260_defconfig index a5785aaa1b..2a8d1a63c5 100644 --- a/arch/arm/configs/usb_a9260_defconfig +++ b/arch/arm/configs/usb_a9260_defconfig @@ -20,7 +20,6 @@ CONFIG_MENU=y CONFIG_CONSOLE_ACTIVATE_ALL=y CONFIG_PARTITION=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/usb-a926x/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/usb_a9263_128mib_defconfig b/arch/arm/configs/usb_a9263_128mib_defconfig index f84743bd2f..c091a97053 100644 --- a/arch/arm/configs/usb_a9263_128mib_defconfig +++ b/arch/arm/configs/usb_a9263_128mib_defconfig @@ -21,7 +21,6 @@ CONFIG_MENU=y CONFIG_CONSOLE_ACTIVATE_ALL=y CONFIG_PARTITION=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/usb-a926x/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/usb_a9263_defconfig b/arch/arm/configs/usb_a9263_defconfig index 41d82841ef..51234cd7d9 100644 --- a/arch/arm/configs/usb_a9263_defconfig +++ b/arch/arm/configs/usb_a9263_defconfig @@ -20,7 +20,6 @@ CONFIG_MENU=y CONFIG_CONSOLE_ACTIVATE_ALL=y CONFIG_PARTITION=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/usb-a926x/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/usb_a9g20_128mib_defconfig b/arch/arm/configs/usb_a9g20_128mib_defconfig index d5e8e5e857..7890776ddb 100644 --- a/arch/arm/configs/usb_a9g20_128mib_defconfig +++ b/arch/arm/configs/usb_a9g20_128mib_defconfig @@ -21,7 +21,6 @@ CONFIG_MENU=y CONFIG_CONSOLE_ACTIVATE_ALL=y CONFIG_PARTITION=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/usb-a926x/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/usb_a9g20_defconfig b/arch/arm/configs/usb_a9g20_defconfig index 6e59cf5cf2..0953aaf0a9 100644 --- a/arch/arm/configs/usb_a9g20_defconfig +++ b/arch/arm/configs/usb_a9g20_defconfig @@ -20,7 +20,6 @@ CONFIG_MENU=y CONFIG_CONSOLE_ACTIVATE_ALL=y CONFIG_PARTITION=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/usb-a926x/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/vexpress_ca9_defconfig b/arch/arm/configs/vexpress_ca9_defconfig index c24c0ea03b..fb40567199 100644 --- a/arch/arm/configs/vexpress_ca9_defconfig +++ b/arch/arm/configs/vexpress_ca9_defconfig @@ -13,7 +13,6 @@ CONFIG_AUTO_COMPLETE=y CONFIG_MENU=y CONFIG_PARTITION=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/vexpress/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/arm/configs/vexpress_defconfig b/arch/arm/configs/vexpress_defconfig index 241889b3b2..9e74bb4450 100644 --- a/arch/arm/configs/vexpress_defconfig +++ b/arch/arm/configs/vexpress_defconfig @@ -12,7 +12,6 @@ CONFIG_AUTO_COMPLETE=y CONFIG_MENU=y CONFIG_PARTITION=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/vexpress/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/nios2/boards/generic/Makefile b/arch/nios2/boards/generic/Makefile index d8a3d7f2cc..f26283832a 100644 --- a/arch/nios2/boards/generic/Makefile +++ b/arch/nios2/boards/generic/Makefile @@ -1 +1,2 @@ obj-y += generic.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-generic diff --git a/arch/nios2/boards/generic/defaultenv-generic/config b/arch/nios2/boards/generic/defaultenv-generic/config new file mode 100644 index 0000000000..16adc49f1c --- /dev/null +++ b/arch/nios2/boards/generic/defaultenv-generic/config @@ -0,0 +1,20 @@ +#!/bin/sh + +# can be either 'net' or 'flash' +kernel=flash +root=flash + +kernel_loc=nor + +# use 'dhcp' todo dhcp in barebox and in kernel +ip=none + +autoboot_timeout=3 + +nor_parts="256k(barebox),128k(env),4M(kernel),-(rootfs)" + +bootargs="console=ttyS0,9600" + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;33mbarebox@\e[1;32mgeneric:\w\e[0m " + diff --git a/arch/nios2/boards/generic/env/config b/arch/nios2/boards/generic/env/config deleted file mode 100644 index 16adc49f1c..0000000000 --- a/arch/nios2/boards/generic/env/config +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -# can be either 'net' or 'flash' -kernel=flash -root=flash - -kernel_loc=nor - -# use 'dhcp' todo dhcp in barebox and in kernel -ip=none - -autoboot_timeout=3 - -nor_parts="256k(barebox),128k(env),4M(kernel),-(rootfs)" - -bootargs="console=ttyS0,9600" - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;33mbarebox@\e[1;32mgeneric:\w\e[0m " - diff --git a/arch/nios2/boards/generic/generic.c b/arch/nios2/boards/generic/generic.c index 61b60b6fd9..0c2c67c567 100644 --- a/arch/nios2/boards/generic/generic.c +++ b/arch/nios2/boards/generic/generic.c @@ -4,6 +4,7 @@ #include #include #include +#include static int phy_address = 1; @@ -52,6 +53,9 @@ static int generic_devices_init(void) protect_file("/dev/env0", 1); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_generic); + return 0; } diff --git a/arch/nios2/configs/generic_defconfig b/arch/nios2/configs/generic_defconfig index 39f41dd25d..91d364f8eb 100644 --- a/arch/nios2/configs/generic_defconfig +++ b/arch/nios2/configs/generic_defconfig @@ -6,7 +6,6 @@ CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y CONFIG_PARTITION=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/nios2/boards/generic/env" CONFIG_CMD_EDIT=y CONFIG_CMD_SLEEP=y CONFIG_CMD_SAVEENV=y diff --git a/arch/ppc/boards/freescale-p1010rdb/Makefile b/arch/ppc/boards/freescale-p1010rdb/Makefile index 2a51091e14..a7b64eef4d 100644 --- a/arch/ppc/boards/freescale-p1010rdb/Makefile +++ b/arch/ppc/boards/freescale-p1010rdb/Makefile @@ -1,4 +1,5 @@ obj-y += p1010rdb.o obj-y += law.o obj-y += tlb.o -obj-y += ddr.o \ No newline at end of file +obj-y += ddr.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-freescale-p1010rdb diff --git a/arch/ppc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/bin/init b/arch/ppc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/bin/init new file mode 100644 index 0000000000..c0e04c1f2d --- /dev/null +++ b/arch/ppc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/bin/init @@ -0,0 +1,2 @@ +#!/bin/sh +source /env/config diff --git a/arch/ppc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/config b/arch/ppc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/config new file mode 100644 index 0000000000..bffd86882e --- /dev/null +++ b/arch/ppc/boards/freescale-p1010rdb/defaultenv-freescale-p1010rdb/config @@ -0,0 +1,2 @@ +#!/bin/sh +export bootargs="root=/dev/nfs rw ip=bootp console=ttyS0,115200" \ No newline at end of file diff --git a/arch/ppc/boards/freescale-p1010rdb/env/bin/init b/arch/ppc/boards/freescale-p1010rdb/env/bin/init deleted file mode 100644 index c0e04c1f2d..0000000000 --- a/arch/ppc/boards/freescale-p1010rdb/env/bin/init +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -source /env/config diff --git a/arch/ppc/boards/freescale-p1010rdb/env/config b/arch/ppc/boards/freescale-p1010rdb/env/config deleted file mode 100644 index bffd86882e..0000000000 --- a/arch/ppc/boards/freescale-p1010rdb/env/config +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -export bootargs="root=/dev/nfs rw ip=bootp console=ttyS0,115200" \ No newline at end of file diff --git a/arch/ppc/boards/freescale-p1010rdb/p1010rdb.c b/arch/ppc/boards/freescale-p1010rdb/p1010rdb.c index eab3abac70..b163327597 100644 --- a/arch/ppc/boards/freescale-p1010rdb/p1010rdb.c +++ b/arch/ppc/boards/freescale-p1010rdb/p1010rdb.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -121,6 +122,9 @@ static int p1010rdb_devices_init(void) IORESOURCE_MEM, &i2cplat[1]); board_eth_init(); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_freescale_p1010rdb); + return 0; } diff --git a/arch/ppc/boards/freescale-p1022ds/Makefile b/arch/ppc/boards/freescale-p1022ds/Makefile index e9b59d5ccb..48867fa851 100644 --- a/arch/ppc/boards/freescale-p1022ds/Makefile +++ b/arch/ppc/boards/freescale-p1022ds/Makefile @@ -3,3 +3,4 @@ obj-y += law.o obj-y += tlb.o obj-y += ddr.o obj-y += ics307_clk.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-freescale-p1022ds diff --git a/arch/ppc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/bin/init b/arch/ppc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/bin/init new file mode 100644 index 0000000000..c0e04c1f2d --- /dev/null +++ b/arch/ppc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/bin/init @@ -0,0 +1,2 @@ +#!/bin/sh +source /env/config diff --git a/arch/ppc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/config b/arch/ppc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/config new file mode 100644 index 0000000000..bffd86882e --- /dev/null +++ b/arch/ppc/boards/freescale-p1022ds/defaultenv-freescale-p1022ds/config @@ -0,0 +1,2 @@ +#!/bin/sh +export bootargs="root=/dev/nfs rw ip=bootp console=ttyS0,115200" \ No newline at end of file diff --git a/arch/ppc/boards/freescale-p1022ds/env/bin/init b/arch/ppc/boards/freescale-p1022ds/env/bin/init deleted file mode 100644 index c0e04c1f2d..0000000000 --- a/arch/ppc/boards/freescale-p1022ds/env/bin/init +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -source /env/config diff --git a/arch/ppc/boards/freescale-p1022ds/env/config b/arch/ppc/boards/freescale-p1022ds/env/config deleted file mode 100644 index bffd86882e..0000000000 --- a/arch/ppc/boards/freescale-p1022ds/env/config +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -export bootargs="root=/dev/nfs rw ip=bootp console=ttyS0,115200" \ No newline at end of file diff --git a/arch/ppc/boards/freescale-p1022ds/p1022ds.c b/arch/ppc/boards/freescale-p1022ds/p1022ds.c index 95a7234d4b..d80c234ea9 100644 --- a/arch/ppc/boards/freescale-p1022ds/p1022ds.c +++ b/arch/ppc/boards/freescale-p1022ds/p1022ds.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -113,6 +114,9 @@ static int p1022ds_devices_init(void) board_eth_init(); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_freescale_p1022ds); + return 0; } diff --git a/arch/ppc/boards/freescale-p2020rdb/Makefile b/arch/ppc/boards/freescale-p2020rdb/Makefile index dbd2af6dae..b2497f695c 100644 --- a/arch/ppc/boards/freescale-p2020rdb/Makefile +++ b/arch/ppc/boards/freescale-p2020rdb/Makefile @@ -1,3 +1,4 @@ obj-y += p2020rdb.o obj-y += law.o obj-y += tlb.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-freescale-p2020rdb diff --git a/arch/ppc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/bin/init b/arch/ppc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/bin/init new file mode 100644 index 0000000000..4d7b03e26d --- /dev/null +++ b/arch/ppc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/bin/init @@ -0,0 +1,2 @@ +#!/bin/sh +source /env/config \ No newline at end of file diff --git a/arch/ppc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/config b/arch/ppc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/config new file mode 100644 index 0000000000..23e0ba2a5d --- /dev/null +++ b/arch/ppc/boards/freescale-p2020rdb/defaultenv-freescale-p2020rdb/config @@ -0,0 +1,2 @@ +#!/bin/sh +export bootargs="root=/dev/nfs rw ip=bootp" \ No newline at end of file diff --git a/arch/ppc/boards/freescale-p2020rdb/env/bin/init b/arch/ppc/boards/freescale-p2020rdb/env/bin/init deleted file mode 100644 index 4d7b03e26d..0000000000 --- a/arch/ppc/boards/freescale-p2020rdb/env/bin/init +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -source /env/config \ No newline at end of file diff --git a/arch/ppc/boards/freescale-p2020rdb/env/config b/arch/ppc/boards/freescale-p2020rdb/env/config deleted file mode 100644 index 23e0ba2a5d..0000000000 --- a/arch/ppc/boards/freescale-p2020rdb/env/config +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -export bootargs="root=/dev/nfs rw ip=bootp" \ No newline at end of file diff --git a/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c b/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c index b03d791eb1..555976578e 100644 --- a/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c +++ b/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -95,6 +96,9 @@ static int devices_init(void) fsl_eth_init(2, &gfar_info[0]); fsl_eth_init(3, &gfar_info[1]); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_freescale_p2020rdb); + return 0; } diff --git a/arch/ppc/boards/geip-da923rc/Makefile b/arch/ppc/boards/geip-da923rc/Makefile index 3abc6c6c6b..7177bfac2c 100644 --- a/arch/ppc/boards/geip-da923rc/Makefile +++ b/arch/ppc/boards/geip-da923rc/Makefile @@ -4,3 +4,4 @@ obj-y += law.o obj-y += ddr.o obj-y += nand.o obj-y += product_data.o +bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-geip-da923rc diff --git a/arch/ppc/boards/geip-da923rc/da923rc.c b/arch/ppc/boards/geip-da923rc/da923rc.c index 85c974780d..6ec4ee2b6c 100644 --- a/arch/ppc/boards/geip-da923rc/da923rc.c +++ b/arch/ppc/boards/geip-da923rc/da923rc.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -96,6 +97,9 @@ static int da923rc_devices_init(void) board_eth_init(); + if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC)) + defaultenv_append_directory(defaultenv_geip_da923rc); + return 0; } diff --git a/arch/ppc/boards/geip-da923rc/defaultenv-geip-da923rc/bin/boot b/arch/ppc/boards/geip-da923rc/defaultenv-geip-da923rc/bin/boot new file mode 100644 index 0000000000..ce7da18e63 --- /dev/null +++ b/arch/ppc/boards/geip-da923rc/defaultenv-geip-da923rc/bin/boot @@ -0,0 +1,9 @@ +#!/bin/sh +#Load the firmware images from the NOR UBIFS file system and boot + +readlink /mnt/active symlink + +bootargs="ubi.mtd=nand root=ubi0:fs-active rootfstype=ubifs rw panic=25" +cp /mnt/$symlink/uImage / +cp /mnt/$symlink/dtb / +bootm -o /dtb /uImage \ No newline at end of file diff --git a/arch/ppc/boards/geip-da923rc/defaultenv-geip-da923rc/bin/init b/arch/ppc/boards/geip-da923rc/defaultenv-geip-da923rc/bin/init new file mode 100644 index 0000000000..80cc2cffb3 --- /dev/null +++ b/arch/ppc/boards/geip-da923rc/defaultenv-geip-da923rc/bin/init @@ -0,0 +1,26 @@ +#!/bin/sh +export PATH=/env/bin + +source /env/config + +#Define a 26MB partition in flash starting at offset 0x20000 +addpart -n /dev/nor0 0x1a00000@0x20000(boot) +ubiattach /dev/boot + +if [ $? -ne 0 ]; then + echo "Fail to attach UBI device" + exit 1; +fi + +mkdir /mnt +mount -t ubifs /dev/ubi0.boot /mnt + +echo +echo -n "Hit ctrl-c to stop autoboot: " +timeout -c 5 + +if [ $? -ne 0 ]; then + exit 0 +fi + +boot diff --git a/arch/ppc/boards/geip-da923rc/defaultenv-geip-da923rc/config b/arch/ppc/boards/geip-da923rc/defaultenv-geip-da923rc/config new file mode 100644 index 0000000000..79e2606a71 --- /dev/null +++ b/arch/ppc/boards/geip-da923rc/defaultenv-geip-da923rc/config @@ -0,0 +1,4 @@ +#!/bin/sh +export bootargs="root=/dev/nfs rw ip=bootp" +eth0.ipaddr=192.168.0.136 +eth0.serverip=192.168.0.102 diff --git a/arch/ppc/boards/geip-da923rc/env/bin/boot b/arch/ppc/boards/geip-da923rc/env/bin/boot deleted file mode 100644 index ce7da18e63..0000000000 --- a/arch/ppc/boards/geip-da923rc/env/bin/boot +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -#Load the firmware images from the NOR UBIFS file system and boot - -readlink /mnt/active symlink - -bootargs="ubi.mtd=nand root=ubi0:fs-active rootfstype=ubifs rw panic=25" -cp /mnt/$symlink/uImage / -cp /mnt/$symlink/dtb / -bootm -o /dtb /uImage \ No newline at end of file diff --git a/arch/ppc/boards/geip-da923rc/env/bin/init b/arch/ppc/boards/geip-da923rc/env/bin/init deleted file mode 100644 index 80cc2cffb3..0000000000 --- a/arch/ppc/boards/geip-da923rc/env/bin/init +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -export PATH=/env/bin - -source /env/config - -#Define a 26MB partition in flash starting at offset 0x20000 -addpart -n /dev/nor0 0x1a00000@0x20000(boot) -ubiattach /dev/boot - -if [ $? -ne 0 ]; then - echo "Fail to attach UBI device" - exit 1; -fi - -mkdir /mnt -mount -t ubifs /dev/ubi0.boot /mnt - -echo -echo -n "Hit ctrl-c to stop autoboot: " -timeout -c 5 - -if [ $? -ne 0 ]; then - exit 0 -fi - -boot diff --git a/arch/ppc/boards/geip-da923rc/env/config b/arch/ppc/boards/geip-da923rc/env/config deleted file mode 100644 index 79e2606a71..0000000000 --- a/arch/ppc/boards/geip-da923rc/env/config +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -export bootargs="root=/dev/nfs rw ip=bootp" -eth0.ipaddr=192.168.0.136 -eth0.serverip=192.168.0.102 diff --git a/arch/ppc/configs/da923rc_defconfig b/arch/ppc/configs/da923rc_defconfig index a6d38fd6f0..f873eb54a5 100644 --- a/arch/ppc/configs/da923rc_defconfig +++ b/arch/ppc/configs/da923rc_defconfig @@ -18,7 +18,6 @@ CONFIG_CMD_EXPORT=y CONFIG_CMD_FLASH=y CONFIG_CMD_GO=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=n -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/ppc/boards/geip-da923rc/env/" CONFIG_CMD_LOADENV=y CONFIG_CMD_PRINTENV=y CONFIG_CMD_SAVEENV=y diff --git a/arch/ppc/configs/p1010rdb_defconfig b/arch/ppc/configs/p1010rdb_defconfig index a891a6c4af..b1f1002d96 100644 --- a/arch/ppc/configs/p1010rdb_defconfig +++ b/arch/ppc/configs/p1010rdb_defconfig @@ -18,7 +18,6 @@ CONFIG_CMD_RESET=y CONFIG_CMD_TIMEOUT=y CONFIG_CMD_GO=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=n -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/ppc/boards/freescale-p1010rdb/env/" CONFIG_CMD_LOADENV=y CONFIG_CMD_PRINTENV=y CONFIG_CMD_SAVEENV=y diff --git a/arch/ppc/configs/p1022ds_defconfig b/arch/ppc/configs/p1022ds_defconfig index 4d0fe991ab..f517708178 100644 --- a/arch/ppc/configs/p1022ds_defconfig +++ b/arch/ppc/configs/p1022ds_defconfig @@ -16,7 +16,6 @@ CONFIG_CMD_FLASH=y CONFIG_CMD_RESET=y CONFIG_CMD_GO=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=n -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/ppc/boards/freescale-p1022ds/env/" CONFIG_CMD_LOADENV=y CONFIG_CMD_PRINTENV=y CONFIG_CMD_SAVEENV=y diff --git a/arch/ppc/configs/p2020rdb_defconfig b/arch/ppc/configs/p2020rdb_defconfig index 817c9a0e65..d0b11b47a8 100644 --- a/arch/ppc/configs/p2020rdb_defconfig +++ b/arch/ppc/configs/p2020rdb_defconfig @@ -17,7 +17,6 @@ CONFIG_CMD_FLASH=y CONFIG_CMD_RESET=y CONFIG_CMD_GO=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC=n -CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/ppc/boards/freescale-p2020rdb/env/" CONFIG_CMD_LOADENV=y CONFIG_CMD_PRINTENV=y CONFIG_CMD_SAVEENV=y -- cgit v1.2.3 From 790980bf18af13f5d72a31b49febd7086cf307af Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Tue, 27 Sep 2016 08:09:42 +0200 Subject: Make generic default environment type a use choice So far it was hardcoded for each board if defenv-1 or defenv-2 is used. Make this a user choice so that a particular board no longer enforces a defenv type. Signed-off-by: Sascha Hauer --- arch/arm/Kconfig | 1 - arch/arm/mach-at91/Kconfig | 3 --- arch/arm/mach-clps711x/Kconfig | 1 - arch/arm/mach-davinci/Kconfig | 1 - arch/arm/mach-highbank/Kconfig | 1 - arch/arm/mach-imx/Kconfig | 9 --------- arch/arm/mach-mxs/Kconfig | 5 ----- arch/arm/mach-omap/Kconfig | 3 --- arch/arm/mach-samsung/Kconfig | 1 - arch/arm/mach-socfpga/Kconfig | 4 ---- arch/arm/mach-uemd/Kconfig | 1 - arch/arm/mach-versatile/Kconfig | 1 - arch/efi/Kconfig | 1 - arch/openrisc/Kconfig | 1 - common/Kconfig | 36 +++++++++++++++--------------------- 15 files changed, 15 insertions(+), 54 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 150320c6af..f13cc1d25e 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -232,7 +232,6 @@ config ARCH_TEGRA select CLKDEV_LOOKUP select GPIOLIB select GPIO_TEGRA - select HAVE_DEFAULT_ENVIRONMENT_NEW select HAVE_PBL_MULTI_IMAGES select OFDEVICE select OFTREE diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 4166fa5d07..c45fc4d6b8 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig @@ -255,7 +255,6 @@ config MACH_USB_A9260 config MACH_GE863 bool "Telit EVK-PRO3" - select HAVE_DEFAULT_ENVIRONMENT_NEW help Say y here if you are using Telit EVK-PRO3 with GE863-PRO3 @@ -494,13 +493,11 @@ choice config MACH_SAMA5D4EK bool "Atmel SAMA5D4 Evaluation Kit" - select HAVE_DEFAULT_ENVIRONMENT_NEW help Select this if you are using Atmel's SAMA5D4-EK Evaluation Kit. config MACH_SAMA5D4_XPLAINED bool "Atmel SAMA5D4 XPLAINED ULTRA Evaluation Kit" - select HAVE_DEFAULT_ENVIRONMENT_NEW help Select this if you are using Atmel's SAMA5D4_XPLAINED ULTRA Evaluation Kit. diff --git a/arch/arm/mach-clps711x/Kconfig b/arch/arm/mach-clps711x/Kconfig index 92dd51ac9b..0853ce2e62 100644 --- a/arch/arm/mach-clps711x/Kconfig +++ b/arch/arm/mach-clps711x/Kconfig @@ -5,7 +5,6 @@ choice config MACH_CLEP7212 bool "Cirrus Logic CLEP7212" - select HAVE_DEFAULT_ENVIRONMENT_NEW help Boards based on the Cirrus Logic 7212/7312 CPU. diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig index 3165d5086d..66d3d7a5f7 100644 --- a/arch/arm/mach-davinci/Kconfig +++ b/arch/arm/mach-davinci/Kconfig @@ -9,7 +9,6 @@ choice config MACH_VIRT2REAL bool "Virt2Real" - select HAVE_DEFAULT_ENVIRONMENT_NEW endchoice diff --git a/arch/arm/mach-highbank/Kconfig b/arch/arm/mach-highbank/Kconfig index 8af480861c..8a22348798 100644 --- a/arch/arm/mach-highbank/Kconfig +++ b/arch/arm/mach-highbank/Kconfig @@ -10,7 +10,6 @@ choice config MACH_HIGHBANK bool "Calxeda Highbank" select OFTREE - select HAVE_DEFAULT_ENVIRONMENT_NEW endchoice diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 82fc945d5b..b017944a90 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -145,7 +145,6 @@ config ARCH_IMX6SX config IMX_MULTI_BOARDS bool "Allow multiple boards to be selected" - select HAVE_DEFAULT_ENVIRONMENT_NEW select HAVE_PBL_MULTI_IMAGES if IMX_MULTI_BOARDS @@ -160,7 +159,6 @@ config MACH_TX25 config MACH_PCA100 bool "phyCard-i.MX27" select ARCH_IMX27 - select HAVE_DEFAULT_ENVIRONMENT_NEW select ARCH_IMX_EXTERNAL_BOOT_NAND help Say Y here if you are using Phytec's phyCard-i.MX27 (pca100) equipped @@ -172,7 +170,6 @@ config MACH_PCM038 select SPI select DRIVER_SPI_IMX select MFD_MC13XXX - select HAVE_DEFAULT_ENVIRONMENT_NEW select ARCH_IMX_EXTERNAL_BOOT_NAND help Say Y here if you are using Phytec's phyCORE-i.MX27 (pcm038) equipped @@ -266,7 +263,6 @@ config MACH_TX6X config MACH_SABRELITE bool "Freescale i.MX6 Sabre Lite" select ARCH_IMX6 - select HAVE_DEFAULT_ENVIRONMENT_NEW select HAVE_PBL_MULTI_IMAGES config MACH_SABRESD @@ -398,7 +394,6 @@ config MACH_PCM037 bool "phyCORE-i.MX31" select ARCH_IMX31 select USB_ULPI if USB - select HAVE_DEFAULT_ENVIRONMENT_NEW select ARCH_HAS_L2X0 help Say Y here if you are using Phytec's phyCORE-i.MX31 (pcm037) equipped @@ -408,7 +403,6 @@ config MACH_MX31MOBOARD bool "mx31moboard-i.MX31" select ARCH_IMX31 select USB_ULPI if USB - select HAVE_DEFAULT_ENVIRONMENT_NEW select ARCH_HAS_L2X0 help Say Y here if you are using EPFL mx31moboard board equipped @@ -441,7 +435,6 @@ config MACH_PCM043 bool "phyCORE-i.MX35" select ARCH_IMX35 select ARCH_HAS_L2X0 - select HAVE_DEFAULT_ENVIRONMENT_NEW help Say Y here if you are using Phytec's phyCORE-i.MX35 (pcm043) equipped with a Freescale i.MX35 Processor @@ -458,7 +451,6 @@ config MACH_KINDLE3 bool "Amazon Kindle3" select ARCH_IMX35 select ARCH_HAS_L2X0 - select HAVE_DEFAULT_ENVIRONMENT_NEW help Say Y here if you are using the Amazon Model No. D00901 Kindle @@ -509,7 +501,6 @@ config MACH_FREESCALE_MX53_SMD config MACH_TX53 bool "Ka-Ro TX53" select ARCH_IMX53 - select HAVE_DEFAULT_ENVIRONMENT_NEW help Say Y here if you are using the Ka-Ro tx53 board diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig index ea0fa5a62b..facab9c251 100644 --- a/arch/arm/mach-mxs/Kconfig +++ b/arch/arm/mach-mxs/Kconfig @@ -45,7 +45,6 @@ config MACH_CHUMBY config MACH_IMX233_OLINUXINO bool "Olimex.ltd imx223-olinuxino" - select HAVE_DEFAULT_ENVIRONMENT_NEW select HAVE_PBL_MULTI_IMAGES help Say Y here if you are using the imx233-olinuxino @@ -61,14 +60,12 @@ choice config MACH_TX28 bool "KARO tx28" - select HAVE_DEFAULT_ENVIRONMENT_NEW select HAVE_PBL_MULTI_IMAGES help Say Y here if you are using the KARO TX28 CPU module. config MACH_MX28EVK bool "mx28-evk" - select HAVE_DEFAULT_ENVIRONMENT_NEW select MXS_OCOTP select HAVE_PBL_MULTI_IMAGES help @@ -76,7 +73,6 @@ config MACH_MX28EVK config MACH_DUCKBILL bool "Duckbill" - select HAVE_DEFAULT_ENVIRONMENT_NEW select MXS_OCOTP select HAVE_PBL_MULTI_IMAGES help @@ -84,7 +80,6 @@ config MACH_DUCKBILL config MACH_CFA10036 bool "cfa-10036" - select HAVE_DEFAULT_ENVIRONMENT_NEW select MXS_OCOTP select I2C_GPIO select EEPROM_AT24 diff --git a/arch/arm/mach-omap/Kconfig b/arch/arm/mach-omap/Kconfig index d7c863ca12..f8ec195742 100644 --- a/arch/arm/mach-omap/Kconfig +++ b/arch/arm/mach-omap/Kconfig @@ -155,7 +155,6 @@ config OMAP_SERIALBOOT config OMAP_MULTI_BOARDS bool "Allow multiple boards to be selected" - select HAVE_DEFAULT_ENVIRONMENT_NEW select HAVE_PBL_MULTI_IMAGES if OMAP_MULTI_BOARDS @@ -168,7 +167,6 @@ config MACH_AFI_GF config MACH_BEAGLE bool "Texas Instrument's Beagle Board" - select HAVE_DEFAULT_ENVIRONMENT_NEW select ARCH_OMAP3 help Say Y here if you are using Beagle Board @@ -204,7 +202,6 @@ config MACH_OMAP3EVM config MACH_PANDA bool "Texas Instrument's Panda Board" - select HAVE_DEFAULT_ENVIRONMENT_NEW select ARCH_OMAP4 help Say Y here if you are using OMAP4 Panda board diff --git a/arch/arm/mach-samsung/Kconfig b/arch/arm/mach-samsung/Kconfig index 8f421bb839..a2ddabf589 100644 --- a/arch/arm/mach-samsung/Kconfig +++ b/arch/arm/mach-samsung/Kconfig @@ -52,7 +52,6 @@ config MACH_MINI2440 select S3C_PLL_INIT select S3C_SDRAM_INIT select HAS_DM9000 - select HAVE_DEFAULT_ENVIRONMENT_NEW help Say Y here if you are using Mini 2440 dev board equipped with a Samsung S3C2440 Processor diff --git a/arch/arm/mach-socfpga/Kconfig b/arch/arm/mach-socfpga/Kconfig index 94689e3ecd..04b5416b64 100644 --- a/arch/arm/mach-socfpga/Kconfig +++ b/arch/arm/mach-socfpga/Kconfig @@ -13,19 +13,15 @@ config ARCH_TEXT_BASE default 0x00100000 if MACH_SOCFPGA_CYCLONE5 config MACH_SOCFPGA_ALTERA_SOCDK - select HAVE_DEFAULT_ENVIRONMENT_NEW bool "Altera SoCFPGA Development Kit" config MACH_SOCFPGA_EBV_SOCRATES - select HAVE_DEFAULT_ENVIRONMENT_NEW bool "EBV Socrates" config MACH_SOCFPGA_TERASIC_DE0_NANO_SOC - select HAVE_DEFAULT_ENVIRONMENT_NEW bool "Terasic DE0-NANO-SoC aka Atlas" config MACH_SOCFPGA_TERASIC_SOCKIT - select HAVE_DEFAULT_ENVIRONMENT_NEW bool "Terasic SoCKit" endif diff --git a/arch/arm/mach-uemd/Kconfig b/arch/arm/mach-uemd/Kconfig index aedd7574ac..2bcdd320c9 100644 --- a/arch/arm/mach-uemd/Kconfig +++ b/arch/arm/mach-uemd/Kconfig @@ -9,7 +9,6 @@ choice config MACH_MB7707 bool "MB7707" - select HAVE_DEFAULT_ENVIRONMENT_NEW endchoice diff --git a/arch/arm/mach-versatile/Kconfig b/arch/arm/mach-versatile/Kconfig index 755fdc168a..3c5cced455 100644 --- a/arch/arm/mach-versatile/Kconfig +++ b/arch/arm/mach-versatile/Kconfig @@ -9,7 +9,6 @@ config MACH_VERSATILEPB default y select ARM_AMBA select CLKDEV_LOOKUP - select HAVE_DEFAULT_ENVIRONMENT_NEW choice prompt "ARM Board type" diff --git a/arch/efi/Kconfig b/arch/efi/Kconfig index 26fecaa392..d8d0592e51 100644 --- a/arch/efi/Kconfig +++ b/arch/efi/Kconfig @@ -3,7 +3,6 @@ config ARCH_EFI default y select HAS_DEBUG_LL select HAS_KALLSYMS - select HAVE_DEFAULT_ENVIRONMENT_NEW select EFI_GUID select EFI_DEVICEPATH select PRINTF_UUID diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig index 483ae6db4a..2a8abf0ff8 100644 --- a/arch/openrisc/Kconfig +++ b/arch/openrisc/Kconfig @@ -3,7 +3,6 @@ config OPENRISC select OFTREE select HAS_CACHE select HAVE_CONFIGURABLE_MEMORY_LAYOUT - select HAVE_DEFAULT_ENVIRONMENT_NEW select GENERIC_FIND_NEXT_BIT default y diff --git a/common/Kconfig b/common/Kconfig index 38225ebe63..3b86c79252 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -826,11 +826,8 @@ config DEFAULT_COMPRESSION_NONE endchoice -config HAVE_DEFAULT_ENVIRONMENT_NEW - bool - config DEFAULT_ENVIRONMENT_GENERIC_NEW - bool + bool "Generic environment template" depends on DEFAULT_ENVIRONMENT depends on SHELL_HUSH select BOOTM @@ -849,31 +846,16 @@ config DEFAULT_ENVIRONMENT_GENERIC_NEW select FLEXIBLE_BOOTARGS select CMD_BOOT select NET_CMD_IFUP if NET - prompt "Generic environment template" - -config DEFAULT_ENVIRONMENT_GENERIC_NEW_MENU - bool - depends on DEFAULT_ENVIRONMENT_GENERIC_NEW - depends on CMD_MENUTREE - default y - -config DEFAULT_ENVIRONMENT_GENERIC_NEW_DFU - bool - depends on DEFAULT_ENVIRONMENT_GENERIC_NEW - depends on USB_GADGET_DFU - default y config DEFAULT_ENVIRONMENT_GENERIC - bool - depends on !HAVE_DEFAULT_ENVIRONMENT_NEW + bool "Generic environment template (old version)" depends on DEFAULT_ENVIRONMENT + depends on !DEFAULT_ENVIRONMENT_GENERIC_NEW depends on SHELL_HUSH select CMD_GETOPT select CMD_CRC select CMD_CRC_CMP - select CMD_AUTOMOUNT if HAVE_DEFAULT_ENVIRONMENT_NEW select CMD_GLOBAL - prompt "Default environment generic" help With this option barebox will use the generic default environment found under defaultenv/ in the src tree. @@ -882,6 +864,18 @@ config DEFAULT_ENVIRONMENT_GENERIC at least contain a /env/config file. This will be able to overwrite the files from defaultenv. +config DEFAULT_ENVIRONMENT_GENERIC_NEW_MENU + bool + depends on DEFAULT_ENVIRONMENT_GENERIC_NEW + depends on CMD_MENUTREE + default y + +config DEFAULT_ENVIRONMENT_GENERIC_NEW_DFU + bool + depends on DEFAULT_ENVIRONMENT_GENERIC_NEW + depends on USB_GADGET_DFU + default y + config DEFAULT_ENVIRONMENT_PATH string depends on DEFAULT_ENVIRONMENT -- cgit v1.2.3