diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 07c5e2d..632037f 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -230,7 +230,6 @@ 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/boards/animeo_ip/Makefile b/arch/arm/boards/animeo_ip/Makefile index eb072c0..510b142 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 0000000..7526fcf --- /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 7526fcf..0000000 --- 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 14b33dc..8474173 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 @@ 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 eb072c0..dec1c50 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 0000000..0d40eb4 --- /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 0000000..76c180b --- /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 0d40eb4..0000000 --- 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 76c180b..0000000 --- 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 43c8b1b..7626786 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 @@ 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 eb072c0..6e07f18 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 0000000..f1b476d --- /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 0000000..8e88186 --- /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 f1b476d..0000000 --- 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 8e88186..0000000 --- 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 422feb2..5a21ac1 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 @@ 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 1398c26..1764da9 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 0000000..39a7f08 --- /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 0000000..cb3e847 --- /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 39a7f08..0000000 --- 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 cb3e847..0000000 --- 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 b9e4914..72716b8 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 @@ 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 1398c26..2072cd4 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 0000000..44972a5 --- /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 0000000..5125020 --- /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 44972a5..0000000 --- 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 5125020..0000000 --- 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 3bb2dda..682449b 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 @@ 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 eb072c0..dd80521 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 0000000..73daecc --- /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 0000000..d0b1396 --- /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 0000000..54ed2cb --- /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 73daecc..0000000 --- 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 d0b1396..0000000 --- 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 54ed2cb..0000000 --- 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 fb444d8..ee69263 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 @@ 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 eb072c0..f5d125a 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 0000000..4931342 --- /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 0000000..f5cd1cc --- /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 4931342..0000000 --- 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 f5cd1cc..0000000 --- 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 2ed58c1..b9431b2 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 @@ 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 f2acf20..559df8f 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 0000000..f3d417e --- /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 0000000..b8cf4e3 --- /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 f3d417e..0000000 --- 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 b8cf4e3..0000000 --- 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 1ef3580..9fe117c 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 @@ 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 4f08476..159701d 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 0000000..8f4151c --- /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 0000000..da19677 --- /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 8f4151c..0000000 --- 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 da19677..0000000 --- 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 9045191..25bf40c 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 @@ 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 060f3b1..3ef2c4e 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 0000000..2a07a84 --- /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 0000000..05c4391 --- /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 2a07a84..0000000 --- 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 05c4391..0000000 --- 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 04ef9b2..a107637 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 @@ #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 96e26d0..e8c84fe 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 0000000..0af6582 --- /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 0000000..57abc1e --- /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 0af6582..0000000 --- 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 57abc1e..0000000 --- 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 fc57f6c..bb493d7 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 @@ 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 36ad591..3ab8c4a 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 @@ 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 52c416e..20787ef 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 0000000..014bce3 --- /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 0000000..7bbff2d --- /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 0000000..8eafa34 --- /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 0000000..05c822d --- /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 0000000..eaf36eb --- /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 0000000..8469935 --- /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 014bce3..0000000 --- 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 7bbff2d..0000000 --- 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 8eafa34..0000000 --- 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 05c822d..0000000 --- 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 eaf36eb..0000000 --- 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 8469935..0000000 --- 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 caeb3f7..97a9968 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 @@ 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 c0de068..c192854 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 0000000..af2fb6b --- /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 af2fb6b..0000000 --- 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 01c7a25..98ed275 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 5dbeeb1..2b58f49 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 @@ 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 0000000..27d2663 --- /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 27d2663..0000000 --- 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 0710d39..c04150e 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 0000000..924d7b8 --- /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 74beeff..0000000 --- a/arch/arm/boards/friendlyarm-mini6410/env/config +++ /dev/null @@ -1,56 +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_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 - 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 a85b1bd..90fb3f5 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 @@ 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 bf17eaa..ba3f336 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 0000000..f38535b --- /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 6422e9f..0000000 --- a/arch/arm/boards/friendlyarm-tiny6410/env/config +++ /dev/null @@ -1,56 +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_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 - 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 b33952c..eaf2a4f 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 d1b285c..a02cecf 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 @@ 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 0000000..dc289b3 --- /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 dc289b3..0000000 --- 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 81263cc..af90c36 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 176d77e..e1cd909 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 @@ 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 0000000..bd44a55 --- /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 bd44a55..0000000 --- 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 eb072c0..d9db6ab 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 0000000..0a6baf7 --- /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 0000000..d1dca10 --- /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 0a6baf7..0000000 --- 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 d1dca10..0000000 --- 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 f9d8f0f..36f1e8b 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 @@ 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 e11fd5b..e5e4536 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 0000000..3672f04 --- /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 0000000..36b3b28 --- /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 0000000..85c19bb --- /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 0000000..5af95d0 --- /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 0000000..70b8ea3 --- /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 0000000..5a30a30 --- /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 0000000..46a8c1b --- /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 0000000..919eac5 --- /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 0000000..0fff5b4 --- /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 0000000..f3ae301 --- /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 0000000..6a70008 --- /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 0000000..1c70bdf --- /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 0000000..9a94b31 --- /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 0000000..610db15 --- /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 0000000..eb5c07a --- /dev/null +++ b/arch/arm/boards/highbank/defaultenv-highbank/init/automount @@ -0,0 +1,22 @@ +#!/bin/sh + +# 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 0000000..c47e1b2 --- /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 0000000..c373173 --- /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 0000000..826debe --- /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 3672f04..0000000 --- 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 36b3b28..0000000 --- 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 85c19bb..0000000 --- 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 5af95d0..0000000 --- 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 70b8ea3..0000000 --- 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 5a30a30..0000000 --- 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 46a8c1b..0000000 --- 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 919eac5..0000000 --- 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 0fff5b4..0000000 --- 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 f3ae301..0000000 --- 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 6a70008..0000000 --- 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 1c70bdf..0000000 --- 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 9a94b31..0000000 --- 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 610db15..0000000 --- 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 eb5c07a..0000000 --- a/arch/arm/boards/highbank/env/init/automount +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -# 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 c47e1b2..0000000 --- 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 c373173..0000000 --- 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 826debe..0000000 --- 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 295d475..577ccc0 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 @@ 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 f429852..56f2013 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 0000000..c05ed27 --- /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 c05ed27..0000000 --- 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 aaf9cd7..0b69010 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 @@ 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 64782e0..0fec0c7 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 0000000..f8873fa --- /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 0000000..998f9fa --- /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 f8873fa..0000000 --- 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 998f9fa..0000000 --- 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 5d4eb10..5e78e11 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 807cdd6..b7aeeca 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 @@ 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 0000000..d5142ee --- /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 0000000..49e38dc --- /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 0000000..1a252dd --- /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 d5142ee..0000000 --- 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 49e38dc..0000000 --- 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 1a252dd..0000000 --- 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 1398c26..bff467b 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 0000000..bdc2d38 --- /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 bdc2d38..0000000 --- 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 177355b..b0377d0 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 @@ 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 eb072c0..d81b188 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 0000000..18ac565 --- /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 18ac565..0000000 --- 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 524fe53..efa5dc0 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 @@ 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 2da0494..e354607 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 0000000..781dbfe --- /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 781dbfe..0000000 --- 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 58dba0f..a85bd84 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 @@ 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 eb072c0..0c7bc3f 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 0000000..09ba7cc --- /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 0000000..793a73f --- /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 09ba7cc..0000000 --- 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 793a73f..0000000 --- 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 8727437..3ef9872 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 @@ 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 eb072c0..3c301cb 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 0000000..5464f64 --- /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 5464f64..0000000 --- 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 373ab81..fda4c56 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 @@ 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 db021ee..32dcb42 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 0000000..f3d417e --- /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 0000000..a7fd930 --- /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 f3d417e..0000000 --- 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 a7fd930..0000000 --- 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 7504bf8..b35bdb5 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 @@ 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 002f218..7ef6c3f 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 0000000..c3cbce5 --- /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 c3cbce5..0000000 --- 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 fda3b14..697ed4b 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 @@ 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 45b10ec..dba2f8c 100644 --- a/arch/arm/boards/tny-a926x/Makefile +++ b/arch/arm/boards/tny-a926x/Makefile @@ -6,3 +6,4 @@ 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 0000000..0d40eb4 --- /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 0000000..c19ec4f --- /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 0d40eb4..0000000 --- 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 c19ec4f..0000000 --- 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 3ebd8aa..3b83c9f 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 @@ 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 f1370a4..4f09581 100644 --- a/arch/arm/boards/usb-a926x/Makefile +++ b/arch/arm/boards/usb-a926x/Makefile @@ -6,3 +6,4 @@ 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 0000000..09ba7cc --- /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 0000000..49199ba --- /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 09ba7cc..0000000 --- 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 49199ba..0000000 --- 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 a9a0549..12e8f4e 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 @@ 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 e11fd5b..c89d7bf 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 0000000..6c0abda --- /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 6c0abda..0000000 --- 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 5b2035b..f89dff9 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 @@ 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 d4fbfef..0f2e3a0 100644 --- a/arch/arm/configs/animeo_ip_defconfig +++ b/arch/arm/configs/animeo_ip_defconfig @@ -17,7 +17,6 @@ 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 cca69b8..c82fe09 100644 --- a/arch/arm/configs/at91rm9200ek_defconfig +++ b/arch/arm/configs/at91rm9200ek_defconfig @@ -13,7 +13,6 @@ # 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 5190b19..10a735d 100644 --- a/arch/arm/configs/at91sam9260ek_defconfig +++ b/arch/arm/configs/at91sam9260ek_defconfig @@ -17,7 +17,6 @@ # 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 2febff0..ad262e9 100644 --- a/arch/arm/configs/at91sam9261ek_defconfig +++ b/arch/arm/configs/at91sam9261ek_defconfig @@ -17,7 +17,6 @@ # 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 36b2dad..e3b6e5f 100644 --- a/arch/arm/configs/at91sam9261ek_first_stage_defconfig +++ b/arch/arm/configs/at91sam9261ek_first_stage_defconfig @@ -18,7 +18,6 @@ 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 5154c78..5f98cd6 100644 --- a/arch/arm/configs/at91sam9263ek_defconfig +++ b/arch/arm/configs/at91sam9263ek_defconfig @@ -15,7 +15,6 @@ # 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 1c913c0..40b4b9a 100644 --- a/arch/arm/configs/at91sam9g10ek_defconfig +++ b/arch/arm/configs/at91sam9g10ek_defconfig @@ -17,7 +17,6 @@ # 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 2f22328..a501ec5 100644 --- a/arch/arm/configs/at91sam9g20ek_defconfig +++ b/arch/arm/configs/at91sam9g20ek_defconfig @@ -17,7 +17,6 @@ # 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 1ba7a9c..3985072 100644 --- a/arch/arm/configs/at91sam9m10g45ek_defconfig +++ b/arch/arm/configs/at91sam9m10g45ek_defconfig @@ -18,7 +18,6 @@ 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 8d1216e..e73e383 100644 --- a/arch/arm/configs/at91sam9n12ek_defconfig +++ b/arch/arm/configs/at91sam9n12ek_defconfig @@ -18,7 +18,6 @@ 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 22ad72f..1af5ec6 100644 --- a/arch/arm/configs/at91sam9x5ek_defconfig +++ b/arch/arm/configs/at91sam9x5ek_defconfig @@ -18,7 +18,6 @@ # 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 4b90556..a1776d2 100644 --- a/arch/arm/configs/cupid_defconfig +++ b/arch/arm/configs/cupid_defconfig @@ -18,7 +18,6 @@ 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 0080dcf..feebb13 100644 --- a/arch/arm/configs/eukrea_cpuimx25_defconfig +++ b/arch/arm/configs/eukrea_cpuimx25_defconfig @@ -19,7 +19,6 @@ 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 5882530..edc5b9c 100644 --- a/arch/arm/configs/eukrea_cpuimx35_defconfig +++ b/arch/arm/configs/eukrea_cpuimx35_defconfig @@ -19,7 +19,6 @@ 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 8e8fd94..e1b011b 100644 --- a/arch/arm/configs/eukrea_cpuimx51_defconfig +++ b/arch/arm/configs/eukrea_cpuimx51_defconfig @@ -14,7 +14,6 @@ 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 8d2a200..1fd8be2 100644 --- a/arch/arm/configs/freescale-mx25-3ds_defconfig +++ b/arch/arm/configs/freescale-mx25-3ds_defconfig @@ -17,7 +17,6 @@ # 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 f45750f..816dc78 100644 --- a/arch/arm/configs/freescale-mx35-3ds_defconfig +++ b/arch/arm/configs/freescale-mx35-3ds_defconfig @@ -15,7 +15,6 @@ 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 b055dc8..c7f2191 100644 --- a/arch/arm/configs/freescale-mx53-smd_defconfig +++ b/arch/arm/configs/freescale-mx53-smd_defconfig @@ -17,7 +17,6 @@ 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 7d21633..1789374 100644 --- a/arch/arm/configs/friendlyarm_mini6410_defconfig +++ b/arch/arm/configs/friendlyarm_mini6410_defconfig @@ -10,7 +10,6 @@ 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 3342cf8..90208c3 100644 --- a/arch/arm/configs/friendlyarm_tiny6410_defconfig +++ b/arch/arm/configs/friendlyarm_tiny6410_defconfig @@ -11,7 +11,6 @@ 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 d33d440..d01c412 100644 --- a/arch/arm/configs/haba_knx_lite_defconfig +++ b/arch/arm/configs/haba_knx_lite_defconfig @@ -17,7 +17,6 @@ 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 3e3619d..01b17bc 100644 --- a/arch/arm/configs/highbank_defconfig +++ b/arch/arm/configs/highbank_defconfig @@ -13,7 +13,6 @@ 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 209396e..3015663 100644 --- a/arch/arm/configs/neso_defconfig +++ b/arch/arm/configs/neso_defconfig @@ -17,7 +17,6 @@ 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 02eddcc..1526d79 100644 --- a/arch/arm/configs/nhk8815_defconfig +++ b/arch/arm/configs/nhk8815_defconfig @@ -11,7 +11,6 @@ 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 cd9310e..d9c89bb 100644 --- a/arch/arm/configs/phytec-phycard-omap4_defconfig +++ b/arch/arm/configs/phytec-phycard-omap4_defconfig @@ -17,7 +17,6 @@ # 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 ce5d75d..54d7722 100644 --- a/arch/arm/configs/phytec-phycore-omap4460_defconfig +++ b/arch/arm/configs/phytec-phycore-omap4460_defconfig @@ -16,7 +16,6 @@ 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 c3cecb2..4455d9c 100644 --- a/arch/arm/configs/pm9261_defconfig +++ b/arch/arm/configs/pm9261_defconfig @@ -10,7 +10,6 @@ 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 a5b54ff..7bb3b9e 100644 --- a/arch/arm/configs/pm9g45_defconfig +++ b/arch/arm/configs/pm9g45_defconfig @@ -14,7 +14,6 @@ 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 ed5abef..f8128aa 100644 --- a/arch/arm/configs/qemu_virt64_defconfig +++ b/arch/arm/configs/qemu_virt64_defconfig @@ -14,7 +14,6 @@ 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 b92847f..7b6c352 100644 --- a/arch/arm/configs/qil_a9260_128mib_defconfig +++ b/arch/arm/configs/qil_a9260_128mib_defconfig @@ -19,7 +19,6 @@ 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 72db60b..6918abb 100644 --- a/arch/arm/configs/qil_a9260_defconfig +++ b/arch/arm/configs/qil_a9260_defconfig @@ -18,7 +18,6 @@ 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 3e30a07..7546a5b 100644 --- a/arch/arm/configs/qil_a9g20_128mib_defconfig +++ b/arch/arm/configs/qil_a9g20_128mib_defconfig @@ -19,7 +19,6 @@ 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 6294692..bf9e8bb 100644 --- a/arch/arm/configs/qil_a9g20_defconfig +++ b/arch/arm/configs/qil_a9g20_defconfig @@ -18,7 +18,6 @@ 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 156f032..773223e 100644 --- a/arch/arm/configs/sama5d3_xplained_defconfig +++ b/arch/arm/configs/sama5d3_xplained_defconfig @@ -19,7 +19,6 @@ 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 9e2d41e..48535e5 100644 --- a/arch/arm/configs/sama5d3xek_defconfig +++ b/arch/arm/configs/sama5d3xek_defconfig @@ -18,7 +18,6 @@ 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 09767aa..a707732 100644 --- a/arch/arm/configs/scb9328_defconfig +++ b/arch/arm/configs/scb9328_defconfig @@ -12,7 +12,6 @@ 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 d9395fa..f288387 100644 --- a/arch/arm/configs/tny_a9260_defconfig +++ b/arch/arm/configs/tny_a9260_defconfig @@ -20,7 +20,6 @@ # 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 e250ab3..cd955f7 100644 --- a/arch/arm/configs/tny_a9263_defconfig +++ b/arch/arm/configs/tny_a9263_defconfig @@ -20,7 +20,6 @@ # 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 4a8da59..dc3c13a 100644 --- a/arch/arm/configs/tny_a9g20_defconfig +++ b/arch/arm/configs/tny_a9g20_defconfig @@ -20,7 +20,6 @@ # 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 a5785aa..2a8d1a6 100644 --- a/arch/arm/configs/usb_a9260_defconfig +++ b/arch/arm/configs/usb_a9260_defconfig @@ -20,7 +20,6 @@ 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 f84743b..c091a97 100644 --- a/arch/arm/configs/usb_a9263_128mib_defconfig +++ b/arch/arm/configs/usb_a9263_128mib_defconfig @@ -21,7 +21,6 @@ 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 41d8284..51234cd 100644 --- a/arch/arm/configs/usb_a9263_defconfig +++ b/arch/arm/configs/usb_a9263_defconfig @@ -20,7 +20,6 @@ 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 d5e8e5e..7890776 100644 --- a/arch/arm/configs/usb_a9g20_128mib_defconfig +++ b/arch/arm/configs/usb_a9g20_128mib_defconfig @@ -21,7 +21,6 @@ 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 6e59cf5..0953aaf 100644 --- a/arch/arm/configs/usb_a9g20_defconfig +++ b/arch/arm/configs/usb_a9g20_defconfig @@ -20,7 +20,6 @@ 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 c24c0ea..fb40567 100644 --- a/arch/arm/configs/vexpress_ca9_defconfig +++ b/arch/arm/configs/vexpress_ca9_defconfig @@ -13,7 +13,6 @@ 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 241889b..9e74bb4 100644 --- a/arch/arm/configs/vexpress_defconfig +++ b/arch/arm/configs/vexpress_defconfig @@ -12,7 +12,6 @@ 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/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 4166fa5..c45fc4d 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig @@ -255,7 +255,6 @@ 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 @@ 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 92dd51a..0853ce2 100644 --- a/arch/arm/mach-clps711x/Kconfig +++ b/arch/arm/mach-clps711x/Kconfig @@ -5,7 +5,6 @@ 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 3165d50..66d3d7a 100644 --- a/arch/arm/mach-davinci/Kconfig +++ b/arch/arm/mach-davinci/Kconfig @@ -9,7 +9,6 @@ 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 8af4808..8a22348 100644 --- a/arch/arm/mach-highbank/Kconfig +++ b/arch/arm/mach-highbank/Kconfig @@ -10,7 +10,6 @@ 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 a80bc6b..ae35aaa 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -151,7 +151,6 @@ 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 @@ -166,7 +165,6 @@ 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 @@ -178,7 +176,6 @@ 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 @@ -272,7 +269,6 @@ 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 @@ -404,7 +400,6 @@ 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 @@ -414,7 +409,6 @@ 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 @@ -447,7 +441,6 @@ 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 @@ -464,7 +457,6 @@ 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 @@ -515,7 +507,6 @@ 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 ea0fa5a..facab9c 100644 --- a/arch/arm/mach-mxs/Kconfig +++ b/arch/arm/mach-mxs/Kconfig @@ -45,7 +45,6 @@ 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 @@ 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_DUCKBILL bool "Duckbill" - select HAVE_DEFAULT_ENVIRONMENT_NEW select MXS_OCOTP select HAVE_PBL_MULTI_IMAGES help @@ -84,7 +80,6 @@ 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 a1bb8f0..93fa35a 100644 --- a/arch/arm/mach-omap/Kconfig +++ b/arch/arm/mach-omap/Kconfig @@ -155,7 +155,6 @@ 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_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 @@ -211,7 +209,6 @@ 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 8f421bb..a2ddabf 100644 --- a/arch/arm/mach-samsung/Kconfig +++ b/arch/arm/mach-samsung/Kconfig @@ -52,7 +52,6 @@ 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 94689e3..04b5416 100644 --- a/arch/arm/mach-socfpga/Kconfig +++ b/arch/arm/mach-socfpga/Kconfig @@ -13,19 +13,15 @@ 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 aedd757..2bcdd32 100644 --- a/arch/arm/mach-uemd/Kconfig +++ b/arch/arm/mach-uemd/Kconfig @@ -9,7 +9,6 @@ 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 755fdc1..3c5cced 100644 --- a/arch/arm/mach-versatile/Kconfig +++ b/arch/arm/mach-versatile/Kconfig @@ -9,7 +9,6 @@ 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 26fecaa..d8d0592 100644 --- a/arch/efi/Kconfig +++ b/arch/efi/Kconfig @@ -3,7 +3,6 @@ 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/nios2/boards/generic/Makefile b/arch/nios2/boards/generic/Makefile index d8a3d7f..f262838 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 0000000..16adc49 --- /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 16adc49..0000000 --- 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 61b60b6..0c2c67c 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 @@ 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 39f41dd..91d364f 100644 --- a/arch/nios2/configs/generic_defconfig +++ b/arch/nios2/configs/generic_defconfig @@ -6,7 +6,6 @@ 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/openrisc/Kconfig b/arch/openrisc/Kconfig index 483ae6d..2a8abf0 100644 --- a/arch/openrisc/Kconfig +++ b/arch/openrisc/Kconfig @@ -3,7 +3,6 @@ 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/arch/ppc/boards/freescale-p1010rdb/Makefile b/arch/ppc/boards/freescale-p1010rdb/Makefile index 2a51091..a7b64ee 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 0000000..c0e04c1 --- /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 0000000..bffd868 --- /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 c0e04c1..0000000 --- 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 bffd868..0000000 --- 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 eab3aba..b163327 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 @@ 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 e9b59d5..48867fa 100644 --- a/arch/ppc/boards/freescale-p1022ds/Makefile +++ b/arch/ppc/boards/freescale-p1022ds/Makefile @@ -3,3 +3,4 @@ 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 0000000..c0e04c1 --- /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 0000000..bffd868 --- /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 c0e04c1..0000000 --- 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 bffd868..0000000 --- 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 95a7234..d80c234 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 @@ 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 dbd2af6..b2497f6 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 0000000..4d7b03e --- /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 0000000..23e0ba2 --- /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 4d7b03e..0000000 --- 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 23e0ba2..0000000 --- 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 b03d791..5559765 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 @@ 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 3abc6c6..7177bfa 100644 --- a/arch/ppc/boards/geip-da923rc/Makefile +++ b/arch/ppc/boards/geip-da923rc/Makefile @@ -4,3 +4,4 @@ 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 85c9747..6ec4ee2 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 @@ 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 0000000..ce7da18 --- /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 0000000..80cc2cf --- /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 0000000..79e2606 --- /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 ce7da18..0000000 --- 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 80cc2cf..0000000 --- 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 79e2606..0000000 --- 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 a6d38fd..f873eb5 100644 --- a/arch/ppc/configs/da923rc_defconfig +++ b/arch/ppc/configs/da923rc_defconfig @@ -18,7 +18,6 @@ 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 a891a6c..b1f1002 100644 --- a/arch/ppc/configs/p1010rdb_defconfig +++ b/arch/ppc/configs/p1010rdb_defconfig @@ -18,7 +18,6 @@ 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 4d0fe99..f517708 100644 --- a/arch/ppc/configs/p1022ds_defconfig +++ b/arch/ppc/configs/p1022ds_defconfig @@ -16,7 +16,6 @@ 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 817c9a0..d0b11b4 100644 --- a/arch/ppc/configs/p2020rdb_defconfig +++ b/arch/ppc/configs/p2020rdb_defconfig @@ -17,7 +17,6 @@ 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 diff --git a/common/Kconfig b/common/Kconfig index 5974249..efd1949 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -826,11 +826,8 @@ 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 @@ -850,7 +847,23 @@ select FLEXIBLE_BOOTARGS select CMD_BOOT select NET_CMD_IFUP if NET - prompt "Generic environment template" + +config DEFAULT_ENVIRONMENT_GENERIC + 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_GLOBAL + help + With this option barebox will use the generic default + environment found under defaultenv/ in the src tree. + The Directory given with DEFAULT_ENVIRONMENT_PATH + will be added to the default environment. This should + at least contain a /env/config file. + This will be able to overwrite the files from defaultenv. config DEFAULT_ENVIRONMENT_GENERIC_NEW_MENU bool @@ -864,25 +877,6 @@ depends on USB_GADGET_DFU default y -config DEFAULT_ENVIRONMENT_GENERIC - bool - depends on !HAVE_DEFAULT_ENVIRONMENT_NEW - depends on DEFAULT_ENVIRONMENT - 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. - The Directory given with DEFAULT_ENVIRONMENT_PATH - will be added to the default environment. This should - at least contain a /env/config file. - This will be able to overwrite the files from defaultenv. - config DEFAULT_ENVIRONMENT_PATH string depends on DEFAULT_ENVIRONMENT