SAMA5D4EK - Now mostly supports booting Android from NAND.
PATCH 1/2 SAMA5D4EK - Now mostly supports booting Android from NAND.
--- arch/arm/boards/sama5d4ek/env/config | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
arch/arm/boards/sama5d4ek/env/config +7 -7
@@ -11,16 +11,16 @@ ip=dhcp #eth0.serverip=a.b.c.d # can be either 'nfs', 'tftp', 'nor' or 'nand' -kernel_loc=nfs +kernel_loc=nand # can be either 'net', 'nor', 'nand' or 'initrd' -rootfs_loc=net +rootfs_loc=nand # can be either 'nfs', 'tftp', 'nand' or empty -oftree_loc=nfs +oftree_loc=nand # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs rootfsimage=root.$rootfs_type -ubiroot=rootfs +ubiroot=system # The image type of the kernel. Can be uimage, zimage, raw, or raw_lzo kernelimage=zImage
@@ -29,14 +29,14 @@ kernelimage=zImage #kernelimage=Image.lzo nand_device=atmel_nand -nand_parts="256k(at91bootstrap),512k(barebox)ro,256k(bareboxenv),256k(bareboxenv2),256k(spare),512k(oftree),6M(kernel),-(rootfs)" -rootfs_mtdblock_nand=7 +nand_parts="256k(at91bootstrap),512k(barebox)ro,256k(bareboxenv),256k(bareboxenv2),256k(spare),512k(oftree),6M(kernel),8M(recovery),176M(system),304M(userdata),-(cache)" +rootfs_mtdblock_nand=10 m25p80_parts="64k(bootstrap),384k(barebox),256k(bareboxenv),256k(bareboxenv2),128k(oftree),-(updater)" autoboot_timeout=3 -bootargs="console=ttyS0,115200" +bootargs="console=ttyS0,115200 ubi.mtd=8 ubi.mtd=9 init=/init androidboot.hardware=sama5-pda androidboot.lcd=wvga" # set a fancy prompt (if support is compiled in) PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# "
Signature · 7 lines
2.3.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 2/2 Switched SAMA5D4EK development board to the newer environment method.
--- arch/arm/boards/sama5d4ek/env/bin/init_board | 15 -------- arch/arm/boards/sama5d4ek/env/boot/nand-ubi | 8 +++++ arch/arm/boards/sama5d4ek/env/config | 42 ---------------------- arch/arm/boards/sama5d4ek/env/init/mtdparts-nand | 6 ++++ arch/arm/boards/sama5d4ek/env/init/ps1 | 7 ++++ arch/arm/boards/sama5d4ek/env/init/splash | 10 ++++++ arch/arm/boards/sama5d4ek/env/nv/boot.default | 1 + arch/arm/boards/sama5d4ek/env/nv/bootargs.base | 1 + arch/arm/boards/sama5d4ek/env/nv/hostname | 1 + .../boards/sama5d4ek/env/nv/linux.bootargs.console | 1 + arch/arm/configs/sama5d4ek_defconfig | 5 +-- arch/arm/mach-at91/Kconfig | 1 + 12 files changed, 39 insertions(+), 59 deletions(-) delete mode 100644 arch/arm/boards/sama5d4ek/env/bin/init_board create mode 100644 arch/arm/boards/sama5d4ek/env/boot/nand-ubi delete mode 100644 arch/arm/boards/sama5d4ek/env/config create mode 100644 arch/arm/boards/sama5d4ek/env/init/mtdparts-nand create mode 100644 arch/arm/boards/sama5d4ek/env/init/ps1 create mode 100644 arch/arm/boards/sama5d4ek/env/init/splash create mode 100644 arch/arm/boards/sama5d4ek/env/nv/boot.default create mode 100644 arch/arm/boards/sama5d4ek/env/nv/bootargs.base create mode 100644 arch/arm/boards/sama5d4ek/env/nv/hostname create mode 100644 arch/arm/boards/sama5d4ek/env/nv/linux.bootargs.console
arch/arm/boards/sama5d4ek/env/bin/init_board deleted +0 -15
@@ -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
arch/arm/boards/sama5d4ek/env/boot/nand-ubi new file +8 -0
@@ -0,0 +1,8 @@ +#!/bin/sh + +global.bootm.image="/dev/nand0.kernel.bb" +global.bootm.oftree="/dev/nand0.oftree.bb" + +bootargs-ip + +global.linux.bootargs.dyn.root="root=ubi0:nand0.rootfs ubi.mtd=nand0.rootfs rootfstype=ubifs noinitrd"
arch/arm/boards/sama5d4ek/env/config deleted +0 -42
42 lines not on this page · raw message
arch/arm/boards/sama5d4ek/env/init/mtdparts-nand new file +6 -0
@@ -0,0 +1,6 @@ +#!/bin/sh + +mtdparts="256k(nand0.at91bootstrap),512k(nand0.barebox)ro,256k(nand0.bareboxenv),256k(nand0.bareboxenv2),256k(nand0.spare),512k(nand0.oftree),6M(nand0.kernel),-(nand0.rootfs)" +kernelname="atmel_nand" + +mtdparts-add -b -d nand0 -k ${kernelname} -p ${mtdparts}
arch/arm/boards/sama5d4ek/env/init/ps1 new file +7 -0
@@ -0,0 +1,7 @@ +#!/bin/sh + +if [ ${global.allow_color} = "true" ]; then + export PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# " +else + export PS1="barebox@\h:\w " +fi
arch/arm/boards/sama5d4ek/env/init/splash new file +10 -0
@@ -0,0 +1,10 @@ +#!/bin/sh + +splash=/env/splash.png + +if [ -f ${splash} -a -e /dev/fb0 ]; then + splash -o ${splash} + fb0.enable=1 +fi + +exit 1
arch/arm/boards/sama5d4ek/env/nv/boot.default new file +1 -0
@@ -0,0 +1 @@ +nand-ubi
arch/arm/boards/sama5d4ek/env/nv/bootargs.base new file +1 -0
@@ -0,0 +1 @@ +console=ttyS0,115200
arch/arm/boards/sama5d4ek/env/nv/hostname new file +1 -0
@@ -0,0 +1 @@ +sama5d4ek
arch/arm/boards/sama5d4ek/env/nv/linux.bootargs.console new file +1 -0
@@ -0,0 +1 @@ +console=ttyS0,115200
arch/arm/configs/sama5d4ek_defconfig +3 -2
@@ -9,13 +9,12 @@ CONFIG_MALLOC_SIZE=0xA00000 CONFIG_EXPERIMENTAL=y CONFIG_MALLOC_TLSF=y CONFIG_PROMPT="A5D4EK:" -CONFIG_GLOB=y CONFIG_PROMPT_HUSH_PS2="y" CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y CONFIG_CONSOLE_ACTIVATE_ALL=y -CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y +CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/sama5d4ek/env" CONFIG_DEBUG_INFO=y # CONFIG_CMD_ARM_CPUINFO is not set
@@ -35,6 +34,8 @@ CONFIG_CMD_PARTITION=y CONFIG_CMD_EXPORT=y CONFIG_CMD_LOADENV=y CONFIG_CMD_PRINTENV=y +CONFIG_CMD_MAGICVAR=y +CONFIG_CMD_MAGICVAR_HELP=y CONFIG_CMD_SAVEENV=y CONFIG_CMD_FILETYPE=y CONFIG_CMD_SLEEP=y
arch/arm/mach-at91/Kconfig +1 -0
@@ -489,6 +489,7 @@ choice config MACH_SAMA5D4EK bool "Atmel SAMA5D4 Evaluation Kit" + select HAVE_DEFAULT_ENVIRONMENT_NEW help Select this if you are using Atmel's SAMA5D4-EK Evaluation Kit.
Signature · 7 lines
2.3.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Hi Doug Brainard,
Quoted 3 lines · Doug Brainard
--- arch/arm/boards/sama5d4ek/env/config | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
As this file will be totally discard in patch 2/2. So, I think no need to add this patch. And also it change the default boot setting to Android only.
Quoted 34 lines
arch/arm/boards/sama5d4ek/env/config +6
-6@@ -11,16 +11,16 @@ ip=dhcp #eth0.serverip=a.b.c.d # can be either 'nfs', 'tftp', 'nor' or 'nand' -kernel_loc=nfs +kernel_loc=nand # can be either 'net', 'nor', 'nand' or 'initrd' -rootfs_loc=net +rootfs_loc=nand # can be either 'nfs', 'tftp', 'nand' or empty -oftree_loc=nfs +oftree_loc=nand # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs rootfsimage=root.$rootfs_type -ubiroot=rootfs +ubiroot=system # The image type of the kernel. Can be uimage, zimage, raw, or raw_lzo kernelimage=zImage@@ -29,14 +29,14 @@ kernelimage=zImage #kernelimage=Image.lzo nand_device=atmel_nand -nand_parts="256k(at91bootstrap),512k(barebox)ro,256k(bareboxenv),256k(bareboxenv2),256k(spare),512k(oftree),6M(kernel),-(rootfs)" -rootfs_mtdblock_nand=7 +nand_parts="256k(at91bootstrap),512k(barebox)ro,256k(bareboxenv),256k(bareboxenv2),256k(spare),512k(oftree),6M(kernel),8M(recovery),176M(system),304M(userdata),-(cache)" +rootfs_mtdblock_nand=10
arch/arm/boards/sama5d4ek/env/config kernelimage=zImage · line 42
Quoted 10 lines
arch/arm/boards/sama5d4ek/env/config +1
-1m25p80_parts="64k(bootstrap),384k(barebox),256k(bareboxenv),256k(bareboxenv2),128k(oftree),-(updater)" autoboot_timeout=3 -bootargs="console=ttyS0,115200" +bootargs="console=ttyS0,115200 ubi.mtd=8 ubi.mtd=9 init=/init androidboot.hardware=sama5-pda androidboot.lcd=wvga" # set a fancy prompt (if support is compiled in) PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# "
Best Regards,
Bo Shen
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 2/2] Switched SAMA5D4EK development board to the newer environment method.
In reply to Doug BrainardHi Doug Brainard,
Quoted 114 lines · Doug Brainard
--- arch/arm/boards/sama5d4ek/env/bin/init_board | 15 -------- arch/arm/boards/sama5d4ek/env/boot/nand-ubi | 8 +++++ arch/arm/boards/sama5d4ek/env/config | 42 ---------------------- arch/arm/boards/sama5d4ek/env/init/mtdparts-nand | 6 ++++ arch/arm/boards/sama5d4ek/env/init/ps1 | 7 ++++ arch/arm/boards/sama5d4ek/env/init/splash | 10 ++++++ arch/arm/boards/sama5d4ek/env/nv/boot.default | 1 + arch/arm/boards/sama5d4ek/env/nv/bootargs.base | 1 + arch/arm/boards/sama5d4ek/env/nv/hostname | 1 + .../boards/sama5d4ek/env/nv/linux.bootargs.console | 1 + arch/arm/configs/sama5d4ek_defconfig | 5 +-- arch/arm/mach-at91/Kconfig | 1 + 12 files changed, 39 insertions(+), 59 deletions(-)delete mode 100644
arch/arm/boards/sama5d4ek/env/bin/init_boardcreate mode 100644arch/arm/boards/sama5d4ek/env/boot/nand-ubidelete mode 100644arch/arm/boards/sama5d4ek/env/config
create mode 100644arch/arm/boards/sama5d4ek/env/init/mtdparts-nandcreate mode 100644arch/arm/boards/sama5d4ek/env/init/ps1create mode 100644arch/arm/boards/sama5d4ek/env/init/splashcreate mode 100644arch/arm/boards/sama5d4ek/env/nv/boot.defaultcreate mode 100644arch/arm/boards/sama5d4ek/env/nv/bootargs.basecreate mode 100644arch/arm/boards/sama5d4ek/env/nv/hostnamecreate mode 100644arch/arm/boards/sama5d4ek/env/nv/linux.bootargs.consolearch/arm/boards/sama5d4ek/env/bin/init_board deleted +0
-15@@ -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 1arch/arm/boards/sama5d4ek/env/boot/nand-ubi new file +8
-0@@ -0,0 +1,8 @@ +#!/bin/sh + +global.bootm.image="/dev/nand0.kernel.bb" +global.bootm.oftree="/dev/nand0.oftree.bb" + +bootargs-ip + +global.linux.bootargs.dyn.root="root=ubi0:nand0.rootfs ubi.mtd=nand0.rootfs rootfstype=ubifs noinitrd"arch/arm/boards/sama5d4ek/env/config deleted +0
-42@@ -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 - -# 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', 'nand' or empty -oftree_loc=nand - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root.$rootfs_type -ubiroot=system - -# 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),512k(barebox)ro,256k(bareboxenv),256k(bareboxenv2),256k(spare),512k(oftree),6M(kernel),8M(recovery),176M(system),304M(userdata),-(cache)" -rootfs_mtdblock_nand=10 - -m25p80_parts="64k(bootstrap),384k(barebox),256k(bareboxenv),256k(bareboxenv2),128k(oftree),-(updater)" - -autoboot_timeout=3 - -bootargs="console=ttyS0,115200 ubi.mtd=8 ubi.mtd=9 init=/init androidboot.hardware=sama5-pda androidboot.lcd=wvga" - -# set a fancy prompt (if support is compiled in) -PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# "arch/arm/boards/sama5d4ek/env/init/mtdparts-nand new file +0
-0
arch/arm/boards/sama5d4ek/env/init/mtdparts-nand line 6
Quoted 6 lines
arch/arm/boards/sama5d4ek/env/init/mtdparts-nand new file +6
-0@@ -0,0 +1,6 @@ +#!/bin/sh + +mtdparts="256k(nand0.at91bootstrap),512k(nand0.barebox)ro,256k(nand0.bareboxenv),256k(nand0.bareboxenv2),256k(nand0.spare),512k(nand0.oftree),6M(nand0.kernel),-(nand0.rootfs)" +kernelname="atmel_nand" + +mtdparts-add -b -d nand0 -k ${kernelname} -p ${mtdparts}
Using this type of partition table make the file system can not mount successfully.
I remove the "nand0." for partition name, then it is OK. After this change, it won't keep consistent with the partition table name.
Now boot up the barebox, the partition for nand is: "/dev/barebox", "/dev/barebox.bb" while not "/dev/nand0.barebox", /dev/nand0.barebox.bb". I am thinking would it be possible to keep the consistent?
Quoted 42 lines
arch/arm/boards/sama5d4ek/env/init/ps1 new file +7
-0@@ -0,0 +1,7 @@ +#!/bin/sh + +if [ ${global.allow_color} = "true" ]; then + export PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# " +else + export PS1="barebox@\h:\w " +fiarch/arm/boards/sama5d4ek/env/init/splash new file +10
-0@@ -0,0 +1,10 @@ +#!/bin/sh + +splash=/env/splash.png + +if [ -f ${splash} -a -e /dev/fb0 ]; then + splash -o ${splash} + fb0.enable=1 +fi + +exit 1arch/arm/boards/sama5d4ek/env/nv/boot.default new file +1
-0@@ -0,0 +1 @@ +nand-ubiarch/arm/boards/sama5d4ek/env/nv/bootargs.base new file +0
-0
arch/arm/boards/sama5d4ek/env/nv/bootargs.base line 1
Quoted 1 line
arch/arm/boards/sama5d4ek/env/nv/bootargs.base new file +1
-0@@ -0,0 +1 @@ +console=ttyS0,115200
Till now, I don't know the difference between "bootargs.base" (here maybe linux.bootargs.base (?)) and "linux.bootargs.console"
Quoted 48 lines
arch/arm/boards/sama5d4ek/env/nv/hostname new file +1
-0@@ -0,0 +1 @@ +sama5d4ekarch/arm/boards/sama5d4ek/env/nv/linux.bootargs.console new file +1
-0@@ -0,0 +1 @@ +console=ttyS0,115200arch/arm/configs/sama5d4ek_defconfig +3
-2@@ -9,13 +9,12 @@ CONFIG_MALLOC_SIZE=0xA00000 CONFIG_EXPERIMENTAL=y CONFIG_MALLOC_TLSF=y CONFIG_PROMPT="A5D4EK:" -CONFIG_GLOB=y CONFIG_PROMPT_HUSH_PS2="y" CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y CONFIG_CONSOLE_ACTIVATE_ALL=y -CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y +CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/sama5d4ek/env" CONFIG_DEBUG_INFO=y # CONFIG_CMD_ARM_CPUINFO is not set@@ -35,6 +34,8 @@ CONFIG_CMD_PARTITION=y CONFIG_CMD_EXPORT=y CONFIG_CMD_LOADENV=y CONFIG_CMD_PRINTENV=y +CONFIG_CMD_MAGICVAR=y +CONFIG_CMD_MAGICVAR_HELP=y CONFIG_CMD_SAVEENV=y CONFIG_CMD_FILETYPE=y CONFIG_CMD_SLEEP=yarch/arm/mach-at91/Kconfig +0
-0
arch/arm/mach-at91/Kconfig choice · line 495
Quoted 7 lines
arch/arm/mach-at91/Kconfig +1
-0@@ -489,6 +489,7 @@ choice config MACH_SAMA5D4EK bool "Atmel SAMA5D4 Evaluation Kit" + select HAVE_DEFAULT_ENVIRONMENT_NEW help Select this if you are using Atmel's SAMA5D4-EK Evaluation Kit.
Best Regards,
Bo Shen
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 2/2] Switched SAMA5D4EK development board to the newer environment method.
Bo,
What error are you seeing? It was booting into Linux for me with what I submitted.
However, I was unable to get things working without the "nand0." piece for each partition due to what you are seeing. I based that change on what I saw in mtdparts-nand file in the telit-evk-pro3 board directory. Any idea what would be causing that not to add the "nand0." automatically? I'd prefer to remove it.
"bootargs.base" seems to be setting the console for barebox only. I had to add "linux.bootargs.console" to have the kernel command include the console and output the boot information. If I've misunderstood something, let me know, and I'll modify it.
Thanks,
Doug
Quoted 253 lines · Bo Shen
Hi Doug Brainard,
Quoted 125 lines · Doug Brainard
--- arch/arm/boards/sama5d4ek/env/bin/init_board | 15 -------- arch/arm/boards/sama5d4ek/env/boot/nand-ubi | 8 +++++ arch/arm/boards/sama5d4ek/env/config | 42 ---------------------- arch/arm/boards/sama5d4ek/env/init/mtdparts-nand | 6 ++++ arch/arm/boards/sama5d4ek/env/init/ps1 | 7 ++++ arch/arm/boards/sama5d4ek/env/init/splash | 10 ++++++ arch/arm/boards/sama5d4ek/env/nv/boot.default | 1 + arch/arm/boards/sama5d4ek/env/nv/bootargs.base | 1 + arch/arm/boards/sama5d4ek/env/nv/hostname | 1 + .../boards/sama5d4ek/env/nv/linux.bootargs.console | 1 + arch/arm/configs/sama5d4ek_defconfig | 5 +-- arch/arm/mach-at91/Kconfig | 1 + 12 files changed, 39 insertions(+), 59 deletions(-)delete mode 100644
arch/arm/boards/sama5d4ek/env/bin/init_boardcreate mode 100644arch/arm/boards/sama5d4ek/env/boot/nand-ubidelete mode 100644arch/arm/boards/sama5d4ek/env/configcreate mode 100644arch/arm/boards/sama5d4ek/env/init/mtdparts-nandcreate mode 100644arch/arm/boards/sama5d4ek/env/init/ps1create mode 100644arch/arm/boards/sama5d4ek/env/init/splashcreate mode 100644arch/arm/boards/sama5d4ek/env/nv/boot.defaultcreate mode 100644arch/arm/boards/sama5d4ek/env/nv/bootargs.basecreate mode 100644arch/arm/boards/sama5d4ek/env/nv/hostnamecreate mode 100644arch/arm/boards/sama5d4ek/env/nv/linux.bootargs.consolearch/arm/boards/sama5d4ek/env/bin/init_board deleted +0
-15@@ -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 1arch/arm/boards/sama5d4ek/env/boot/nand-ubi new file +8
-0@@ -0,0 +1,8 @@ +#!/bin/sh + +global.bootm.image="/dev/nand0.kernel.bb" +global.bootm.oftree="/dev/nand0.oftree.bb" + +bootargs-ip + +global.linux.bootargs.dyn.root="root=ubi0:nand0.rootfsubi.mtd=nand0.rootfs rootfstype=ubifs noinitrd"
arch/arm/boards/sama5d4ek/env/config deleted +0
-39@@ -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 - -# 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', 'nand' or empty -oftree_loc=nand - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root.$rootfs_type -ubiroot=system - -# 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),512k(barebox)ro,256k(bareboxenv),256k(bareboxenv2),256k(spare),512k(oftree),6M(kernel),8M(recovery),176M(system),304M(userdata),-(cache)" -rootfs_mtdblock_nand=10 - -m25p80_parts="64k(bootstrap),384k(barebox),256k(bareboxenv),256k(bareboxenv2),128k(oftree),-(updater)" - -autoboot_timeout=3 - -bootargs="console=ttyS0,115200 ubi.mtd=8 ubi.mtd=9 init=/initandroidboot.hardware=sama5-pda androidboot.lcd=wvga"
arch/arm/boards/sama5d4ek/env/config deleted +0
-3- -# set a fancy prompt (if support is compiled in) -PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# "arch/arm/boards/sama5d4ek/env/init/mtdparts-nand new file +0
-0arch/arm/boards/sama5d4ek/env/init/mtdparts-nand line 6
Quoted 7 lines
arch/arm/boards/sama5d4ek/env/init/mtdparts-nand new file +6
-0@@ -0,0 +1,6 @@ +#!/bin/sh + +mtdparts="256k(nand0.at91bootstrap),512k(nand0.barebox)ro,256k(nand0.bareboxenv),256k(nand0.bareboxenv2),256k(nand0.spare),512k(nand0.oftree),6M(nand0.kernel),-(nand0.rootfs)" +kernelname="atmel_nand" + +mtdparts-add -b -d nand0 -k ${kernelname} -p ${mtdparts}Using this type of partition table make the file system can not mount successfully.
I remove the "nand0." for partition name, then it is OK. After this change, it won't keep consistent with the partition table name.
Now boot up the barebox, the partition for nand is: "
/dev/barebox", "/dev/barebox.bb" while not "/dev/nand0.barebox",/dev/nand0.barebox.bb". I am thinking would it be possible to keep the consistent?Quoted 46 lines
arch/arm/boards/sama5d4ek/env/init/ps1 new file +7
-0@@ -0,0 +1,7 @@ +#!/bin/sh + +if [ ${global.allow_color} = "true" ]; then + export PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# " +else + export PS1="barebox@\h:\w " +fiarch/arm/boards/sama5d4ek/env/init/splash new file +10
-0@@ -0,0 +1,10 @@ +#!/bin/sh + +splash=/env/splash.png + +if [ -f ${splash} -a -e /dev/fb0 ]; then + splash -o ${splash} + fb0.enable=1 +fi + +exit 1arch/arm/boards/sama5d4ek/env/nv/boot.default new file +1
-0@@ -0,0 +1 @@ +nand-ubiarch/arm/boards/sama5d4ek/env/nv/bootargs.base new file +0
-0arch/arm/boards/sama5d4ek/env/nv/bootargs.base line 1
Quoted 1 line
arch/arm/boards/sama5d4ek/env/nv/bootargs.base new file +1
-0@@ -0,0 +1 @@ +console=ttyS0,115200Till now, I don't know the difference between "bootargs.base" (here maybe linux.bootargs.base (?)) and "linux.bootargs.console"
Quoted 51 lines
arch/arm/boards/sama5d4ek/env/nv/hostname new file +1
-0@@ -0,0 +1 @@ +sama5d4ekarch/arm/boards/sama5d4ek/env/nv/linux.bootargs.console new file +1
-0@@ -0,0 +1 @@ +console=ttyS0,115200arch/arm/configs/sama5d4ek_defconfig +3
-2@@ -9,13 +9,12 @@ CONFIG_MALLOC_SIZE=0xA00000 CONFIG_EXPERIMENTAL=y CONFIG_MALLOC_TLSF=y CONFIG_PROMPT="A5D4EK:" -CONFIG_GLOB=y CONFIG_PROMPT_HUSH_PS2="y" CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y CONFIG_CONSOLE_ACTIVATE_ALL=y -CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y +CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/sama5d4ek/env" CONFIG_DEBUG_INFO=y # CONFIG_CMD_ARM_CPUINFO is not set@@ -35,6 +34,8 @@ CONFIG_CMD_PARTITION=y CONFIG_CMD_EXPORT=y CONFIG_CMD_LOADENV=y CONFIG_CMD_PRINTENV=y +CONFIG_CMD_MAGICVAR=y +CONFIG_CMD_MAGICVAR_HELP=y CONFIG_CMD_SAVEENV=y CONFIG_CMD_FILETYPE=y CONFIG_CMD_SLEEP=yarch/arm/mach-at91/Kconfig +0
-0@@ -489,6 +489,7 @@ choice
Quoted 10 lines
arch/arm/mach-at91/Kconfig choice · line 495
Quoted 7 lines
arch/arm/mach-at91/Kconfig +1
-0config 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.Best Regards,
Bo Shen
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Sorry, this was more me not understanding "git send-email" the first time and how to keep it only sending the latest commit.
Doug
Quoted 59 lines · Bo Shen
Hi Doug Brainard,
Quoted 4 lines · Doug Brainard
--- arch/arm/boards/sama5d4ek/env/config | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)As this file will be totally discard in patch 2/2. So, I think no need to add this patch. And also it change the default boot setting to Android only.
Quoted 46 lines
arch/arm/boards/sama5d4ek/env/config +6
-6@@ -11,16 +11,16 @@ ip=dhcp #eth0.serverip=a.b.c.d # can be either 'nfs', 'tftp', 'nor' or 'nand' -kernel_loc=nfs +kernel_loc=nand # can be either 'net', 'nor', 'nand' or 'initrd' -rootfs_loc=net +rootfs_loc=nand # can be either 'nfs', 'tftp', 'nand' or empty -oftree_loc=nfs +oftree_loc=nand # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs rootfsimage=root.$rootfs_type -ubiroot=rootfs +ubiroot=system # The image type of the kernel. Can be uimage, zimage, raw, or raw_lzo kernelimage=zImage@@ -29,14 +29,14 @@ kernelimage=zImage #kernelimage=Image.lzo nand_device=atmel_nand -nand_parts="256k(at91bootstrap),512k(barebox)ro,256k(bareboxenv),256k(bareboxenv2),256k(spare),512k(oftree),6M(kernel),-(rootfs)" -rootfs_mtdblock_nand=7 +nand_parts="256k(at91bootstrap),512k(barebox)ro,256k(bareboxenv),256k(bareboxenv2),256k(spare),512k(oftree),6M(kernel),8M(recovery),176M(system),304M(userdata),-(cache)" +rootfs_mtdblock_nand=10m25p80_parts="64k(bootstrap),384k(barebox),256k(bareboxenv),256k(bareboxenv2),128k(oftree),-(updater)"
autoboot_timeout=3
arch/arm/boards/sama5d4ek/env/config +1
-1-bootargs="console=ttyS0,115200" +bootargs="console=ttyS0,115200 ubi.mtd=8 ubi.mtd=9 init=/initandroidboot.hardware=sama5-pda androidboot.lcd=wvga"
Quoted 6 lines
Quoted 3 lines
# set a fancy prompt (if support is compiled in) PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# "Best Regards,
Bo Shen
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Nack
I use those board everyday on nfs boot
the boot choice is user specific
Best Regards,
J.
Quoted 47 lines · Doug Brainard
---
arch/arm/boards/sama5d4ek/env/config| 14 +++++++-------1 file changed, 7 insertions(+), 7 deletions(-)arch/arm/boards/sama5d4ek/env/config +3
-3@@ -11,16 +11,16 @@ ip=dhcp #eth0.serverip=a.b.c.d # can be either 'nfs', 'tftp', 'nor' or 'nand' -kernel_loc=nfs +kernel_loc=nand # can be either 'net', 'nor', 'nand' or 'initrd' -rootfs_loc=net +rootfs_loc=nand # can be either 'nfs', 'tftp', 'nand' or empty -oftree_loc=nfs +oftree_loc=nand # can be either 'jffs2' or 'ubifs'rootfs_type=ubifs
rootfsimage=root.$rootfs_typearch/arm/boards/sama5d4ek/env/config +1
-1-ubiroot=rootfs +ubiroot=system# The image type of the kernel. Can be uimage, zimage, raw, or
raw_lzokernelimage=zImagearch/arm/boards/sama5d4ek/env/config +0
-0@@ -29,14 +29,14 @@ kernelimage=zImage #kernelimage=Image.lzonand_device=atmel_nand
arch/arm/boards/sama5d4ek/env/config +2
-2-nand_parts="256k(at91bootstrap),512k(barebox)ro,256k(bareboxenv),256k(bareboxenv2),256k(spare),512k(oftree),6M(kernel),-(rootfs)" -rootfs_mtdblock_nand=7 +nand_parts="256k(at91bootstrap),512k(barebox)ro,256k(bareboxenv),256k(bareboxenv2),256k(spare),512k(oftree),6M(kernel),8M(recovery),176M(system),304M(userdata),-(cache)" +rootfs_mtdblock_nand=10m25p80_parts="64k(bootstrap),384k(barebox),256k(bareboxenv),256k(bareboxenv2),128k(oftree),-(updater)"
autoboot_timeout=3
arch/arm/boards/sama5d4ek/env/config +1
-1-bootargs="console=ttyS0,115200" +bootargs="console=ttyS0,115200 ubi.mtd=8 ubi.mtd=9 init=/init androidboot.hardware=sama5-pda androidboot.lcd=wvga"
Quoted 10 lines
# set a fancy prompt (if support is compiled in) PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# "Signature · 7 lines
2.3.0 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 2/2] Switched SAMA5D4EK development board to the newer environment method.
In reply to Doug BrainardHi,
as state before I use the atmel board for bootp everyday as the defaultenv-2 does not support this Nack until it’s fixed
I did send patch for this in the past but they did not hit the mainline
Best Regards,
J.
Quoted 288 lines · Doug Brainard
Bo,
What error are you seeing? It was booting into Linux for me with what I submitted.
However, I was unable to get things working without the "nand0." piece for each partition due to what you are seeing. I based that change on what I saw in mtdparts-nand file in the telit-evk-pro3 board directory. Any idea what would be causing that not to add the "nand0." automatically? I'd prefer to remove it.
"bootargs.base" seems to be setting the console for barebox only. I had to add "linux.bootargs.console" to have the kernel command include the console and output the boot information. If I've misunderstood something, let me know, and I'll modify it.
Thanks,
Doug
Quoted 253 lines · Bo Shen
Hi Doug Brainard,
Quoted 125 lines · Doug Brainard
--- arch/arm/boards/sama5d4ek/env/bin/init_board | 15 -------- arch/arm/boards/sama5d4ek/env/boot/nand-ubi | 8 +++++ arch/arm/boards/sama5d4ek/env/config | 42 ---------------------- arch/arm/boards/sama5d4ek/env/init/mtdparts-nand | 6 ++++ arch/arm/boards/sama5d4ek/env/init/ps1 | 7 ++++ arch/arm/boards/sama5d4ek/env/init/splash | 10 ++++++ arch/arm/boards/sama5d4ek/env/nv/boot.default | 1 + arch/arm/boards/sama5d4ek/env/nv/bootargs.base | 1 + arch/arm/boards/sama5d4ek/env/nv/hostname | 1 + .../boards/sama5d4ek/env/nv/linux.bootargs.console | 1 + arch/arm/configs/sama5d4ek_defconfig | 5 +-- arch/arm/mach-at91/Kconfig | 1 + 12 files changed, 39 insertions(+), 59 deletions(-) delete mode 100644 arch/arm/boards/sama5d4ek/env/bin/init_board create mode 100644 arch/arm/boards/sama5d4ek/env/boot/nand-ubi delete mode 100644 arch/arm/boards/sama5d4ek/env/config create mode 100644 arch/arm/boards/sama5d4ek/env/init/mtdparts-nand create mode 100644 arch/arm/boards/sama5d4ek/env/init/ps1 create mode 100644 arch/arm/boards/sama5d4ek/env/init/splash create mode 100644 arch/arm/boards/sama5d4ek/env/nv/boot.default create mode 100644 arch/arm/boards/sama5d4ek/env/nv/bootargs.base create mode 100644 arch/arm/boards/sama5d4ek/env/nv/hostname create mode 100644
arch/arm/boards/sama5d4ek/env/nv/linux.bootargs.consolearch/arm/boards/sama5d4ek/env/bin/init_board deleted +0
-15@@ -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 1arch/arm/boards/sama5d4ek/env/boot/nand-ubi new file +8
-0@@ -0,0 +1,8 @@ +#!/bin/sh + +global.bootm.image="/dev/nand0.kernel.bb" +global.bootm.oftree="/dev/nand0.oftree.bb" + +bootargs-ip + +global.linux.bootargs.dyn.root="root=ubi0:nand0.rootfsubi.mtd=nand0.rootfs rootfstype=ubifs noinitrd"
arch/arm/boards/sama5d4ek/env/config deleted +0
-39@@ -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 - -# 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', 'nand' or empty -oftree_loc=nand - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root.$rootfs_type -ubiroot=system - -# 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),512k(barebox)ro,256k(bareboxenv),256k(bareboxenv2),256k(spare),512k(oftree),6M(kernel),8M(recovery),176M(system),304M(userdata),-(cache)" -rootfs_mtdblock_nand=10 - -m25p80_parts="64k(bootstrap),384k(barebox),256k(bareboxenv),256k(bareboxenv2),128k(oftree),-(updater)" - -autoboot_timeout=3 - -bootargs="console=ttyS0,115200 ubi.mtd=8 ubi.mtd=9 init=/initandroidboot.hardware=sama5-pda androidboot.lcd=wvga"
arch/arm/boards/sama5d4ek/env/config deleted +0
-3- -# set a fancy prompt (if support is compiled in) -PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# "arch/arm/boards/sama5d4ek/env/init/mtdparts-nand new file +0
-0arch/arm/boards/sama5d4ek/env/init/mtdparts-nand line 6
Quoted 7 lines
arch/arm/boards/sama5d4ek/env/init/mtdparts-nand new file +6
-0@@ -0,0 +1,6 @@ +#!/bin/sh + +mtdparts="256k(nand0.at91bootstrap),512k(nand0.barebox)ro,256k(nand0.bareboxenv),256k(nand0.bareboxenv2),256k(nand0.spare),512k(nand0.oftree),6M(nand0.kernel),-(nand0.rootfs)" +kernelname="atmel_nand" + +mtdparts-add -b -d nand0 -k ${kernelname} -p ${mtdparts}Using this type of partition table make the file system can not mount successfully.
I remove the "nand0." for partition name, then it is OK. After this change, it won't keep consistent with the partition table name.
Now boot up the barebox, the partition for nand is: "
/dev/barebox", "/dev/barebox.bb" while not "/dev/nand0.barebox",/dev/nand0.barebox.bb". I am thinking would it be possible to keep the consistent?Quoted 46 lines
arch/arm/boards/sama5d4ek/env/init/ps1 new file +7
-0@@ -0,0 +1,7 @@ +#!/bin/sh + +if [ ${global.allow_color} = "true" ]; then + export PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# " +else + export PS1="barebox@\h:\w " +fiarch/arm/boards/sama5d4ek/env/init/splash new file +10
-0@@ -0,0 +1,10 @@ +#!/bin/sh + +splash=/env/splash.png + +if [ -f ${splash} -a -e /dev/fb0 ]; then + splash -o ${splash} + fb0.enable=1 +fi + +exit 1arch/arm/boards/sama5d4ek/env/nv/boot.default new file +1
-0@@ -0,0 +1 @@ +nand-ubiarch/arm/boards/sama5d4ek/env/nv/bootargs.base new file +0
-0arch/arm/boards/sama5d4ek/env/nv/bootargs.base line 1
Quoted 1 line
arch/arm/boards/sama5d4ek/env/nv/bootargs.base new file +1
-0@@ -0,0 +1 @@ +console=ttyS0,115200Till now, I don't know the difference between "bootargs.base" (here maybe linux.bootargs.base (?)) and "linux.bootargs.console"
Quoted 51 lines
arch/arm/boards/sama5d4ek/env/nv/hostname new file +1
-0@@ -0,0 +1 @@ +sama5d4ekarch/arm/boards/sama5d4ek/env/nv/linux.bootargs.console new file +1
-0@@ -0,0 +1 @@ +console=ttyS0,115200arch/arm/configs/sama5d4ek_defconfig +3
-2@@ -9,13 +9,12 @@ CONFIG_MALLOC_SIZE=0xA00000 CONFIG_EXPERIMENTAL=y CONFIG_MALLOC_TLSF=y CONFIG_PROMPT="A5D4EK:" -CONFIG_GLOB=y CONFIG_PROMPT_HUSH_PS2="y" CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y CONFIG_CONSOLE_ACTIVATE_ALL=y -CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y +CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/sama5d4ek/env" CONFIG_DEBUG_INFO=y # CONFIG_CMD_ARM_CPUINFO is not set@@ -35,6 +34,8 @@ CONFIG_CMD_PARTITION=y CONFIG_CMD_EXPORT=y CONFIG_CMD_LOADENV=y CONFIG_CMD_PRINTENV=y +CONFIG_CMD_MAGICVAR=y +CONFIG_CMD_MAGICVAR_HELP=y CONFIG_CMD_SAVEENV=y CONFIG_CMD_FILETYPE=y CONFIG_CMD_SLEEP=yarch/arm/mach-at91/Kconfig +0
-0@@ -489,6 +489,7 @@ choiceQuoted 10 lines
arch/arm/mach-at91/Kconfig choice · line 495
Quoted 7 lines
arch/arm/mach-at91/Kconfig +1
-0config 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.Best Regards,
Bo Shen
Quoted 4 lines
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Hi Doug,
Quoted 1 line · Doug Brainard
Sorry, this was more me not understanding "git send-email" the first
It's OK, won't worry.
Quoted 1 line
time and how to keep it only sending the latest commit.
We normally do it in steps
1. format patch
$ git format-patch -s -n (n is the number of patch you plan to send, from top to bottom.) 2. check the patch $ ./scripts/checkpatch.pl <your patches> 3. send the patch $ git send-email --to=.. --cc=.. <patch files>
More details, please reference the documentation in kernel: https://www.kernel.org/doc/Documentation/SubmittingPatches
Quoted 1 line
Doug
Best Regards,
Bo Shen
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 2/2] Switched SAMA5D4EK development board to the newer environment method.
In reply to Jean-Christophe PLAGNIOL-VILLARDHi J,
Quoted 4 lines · Jean-Christophe PLAGNIOL-VILLARD
Hi,
as state before I use the atmel board for bootp everyday as the defaultenv-2 does not support this Nack until it’s fixed
Do you mean the defaultenv-2 doesn't support the bootp feature or do you mean let Doug to keep the default boot from net?
Quoted 1 line
I did send patch for this in the past but they did not hit the mainline
Can you point us this? Thanks.
Quoted 2 lines
Best Regards,
J.
Best Regards,
Bo Shen
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Quoted 5 lines · Jean-Christophe PLAGNIOL-VILLARD
Nack
I use those board everyday on nfs boot
the boot choice is user specific
This file is removed anyway in the next patch, so this patch shouldn't exist at all.
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 2/2] Switched SAMA5D4EK development board to the newer environment method.
In reply to Bo ShenQuoted 8 lines · Bo Shen
Hi J,
Quoted 4 lines · Jean-Christophe PLAGNIOL-VILLARD
Hi,
as state before I use the atmel board for bootp everyday as the defaultenv-2 does not support this Nack until it’s fixed
Quoted 6 lines
Do you mean the defaultenv-2 doesn't support the bootp feature or do you mean let Doug to keep the default boot from net?
Quoted 1 line
I did send patch for this in the past but they did not hit the mainline
Can you point us this? Thanks.
He meant this patch:
http://lists.infradead.org/pipermail/barebox/2012-September/thread.html#9304
Reading this discussion again I still have mostly the same opinion:
an /env/boot/* script should be simple, it should be adjustable.
We should resolve this now.
So Jean-Christophe, What you want is to boot your board with informations provided by the dhcp server. Looking again at your patch back then the following should do it:
/env/boot/bootp:
| #!/bin/sh
|
| path="/mnt/tftp"
|
| ifup eth0
|
| # Set variables based on information provided by the dhcp request
| nfsroot="${global.dhcp.rootpath}"
| global.bootm.image="${path}/${global.dhcp.bootfile}"
| global.bootm.oftree="${path}/${global.dhcp.oftree_file}"
|
| bootargs-ip
| global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp"Since you reject changes to the default boot source for this board your other issue seems to be that you want your board to execute this bootscript without further adjusting the environment. This is something we cannot do. The default bootsource can only ever fit your personal or someone elses use. We cannot make everyone happy with the default boot source, so I suggest you either control your board via some expect script (which sucks, I know) or you just save your adjusted environment on your test board.
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 2/2] Switched SAMA5D4EK development board to the newer environment method.
In reply to Bo ShenQuoted 10 lines · Bo Shen
arch/arm/boards/sama5d4ek/env/nv/bootargs.base line 1
Quoted 7 lines
arch/arm/boards/sama5d4ek/env/nv/bootargs.base new file +1
-0@@ -0,0 +1 @@ +console=ttyS0,115200Till now, I don't know the difference between "bootargs.base" (here maybe linux.bootargs.base (?)) and "linux.bootargs.console"
bootargs.base is unused, this file should be removed.
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 2/2] Switched SAMA5D4EK development board to the newer environment method.
In reply to Sascha HauerQuoted 34 lines · Sascha Hauer
Quoted 8 lines · Bo Shen
Hi J,
Quoted 4 lines · Jean-Christophe PLAGNIOL-VILLARD
Hi,
as state before I use the atmel board for bootp everyday as the defaultenv-2 does not support this Nack until it’s fixed
Quoted 6 lines
Do you mean the defaultenv-2 doesn't support the bootp feature or do you mean let Doug to keep the default boot from net?
Quoted 1 line
I did send patch for this in the past but they did not hit the mainline
Can you point us this? Thanks.
He meant this patch:
http://lists.infradead.org/pipermail/barebox/2012-September/thread.html#9304
Reading this discussion again I still have mostly the same opinion:
an /env/boot/* script should be simple, it should be adjustable.We should resolve this now.
So Jean-Christophe, What you want is to boot your board with informations provided by the dhcp server. Looking again at your patch back then the following should do it:
/env/boot/bootp:
Quoted 10 lines
| #!/bin/sh
|
| path="/mnt/tftp"
|
| ifup eth0
|
| # Set variables based on information provided by the dhcp request
| nfsroot="${global.dhcp.rootpath}"
| global.bootm.image="${path}/${global.dhcp.bootfile}"
| global.bootm.oftree="${path}/${global.dhcp.oftree_file}”this is not possible unfortunately
As if you use symlink the nfs will not work
it was work on defaultenv as it’s use the nfs commande and not FS The nfs command handle symlink;w
that why in my patch I had to mount the fs first then remount it if it’s a symlink
so today the defaultenv-2 break the bootp support
Quoted 4 lines
| | bootargs-ip | global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp"
Quoted 8 lines
Since you reject changes to the default boot source for this board your other issue seems to be that you want your board to execute this bootscript without further adjusting the environment. This is something we cannot do. The default bootsource can only ever fit your personal or someone elses use. We cannot make everyone happy with the default boot source, so I suggest you either control your board via some expect script (which sucks, I know) or you just save your adjusted environment on your test board.
When the defaultenv-2 will support bootp I’ll be the first to get rid of the old defaultenv but today I have automatic test system that depends on it to test linux on at91 and others
Best Regards,
J.
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 2/2] Switched SAMA5D4EK development board to the newer environment method.
Hi Jean Christophe,
Quoted 3 lines · Jean-Christophe PLAGNIOL-VILLARD
When the defaultenv-2 will support bootp I’ll be the first to get rid of the old defaultenv but today I have automatic test system that depends on it to test linux on at91 and others
and why don't you have your custom environment for your use case instead of forcing everyone to use your environment by default (which is far from being a user friendly environment for the standard use case which is booting on the internal flash) ?
Best regards,
Eric
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 2/2] Switched SAMA5D4EK development board to the newer environment method.
In reply to Jean-Christophe PLAGNIOL-VILLARDQuoted 45 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 34 lines · Sascha Hauer
Quoted 8 lines · Bo Shen
Hi J,
Quoted 4 lines · Jean-Christophe PLAGNIOL-VILLARD
Hi,
as state before I use the atmel board for bootp everyday as the defaultenv-2 does not support this Nack until it’s fixed
Quoted 6 lines
Do you mean the defaultenv-2 doesn't support the bootp feature or do you mean let Doug to keep the default boot from net?
Quoted 1 line
I did send patch for this in the past but they did not hit the mainline
Can you point us this? Thanks.
He meant this patch:
http://lists.infradead.org/pipermail/barebox/2012-September/thread.html#9304
Reading this discussion again I still have mostly the same opinion:
an /env/boot/* script should be simple, it should be adjustable.We should resolve this now.
So Jean-Christophe, What you want is to boot your board with informations provided by the dhcp server. Looking again at your patch back then the following should do it:
/env/boot/bootp:
Quoted 10 lines
| #!/bin/sh | | path="/mnt/tftp" | | ifup eth0 | | # Set variables based on information provided by the dhcp request | nfsroot="${global.dhcp.rootpath}" | global.bootm.image="${path}/${global.dhcp.bootfile}" | global.bootm.oftree="${path}/${global.dhcp.oftree_file}”
Quoted 5 lines
this is not possible unfortunately
As if you use symlink the nfs will not work
it was work on defaultenv as it’s use the nfs commande and not FS The nfs command handle symlink;
Let me recap: On the host you have some directory exported as NFS. It contains a link to some other position:
/export/somelink -> /some/other/file
Now if I mount /export on barebox 'somelink' points to /some/other/file, a path that doesn't exist in barebox, some the file cannot be read. The NFS command implementation now mounts '/some/other' from the NFS server and reads 'file' from that location.
This is really a misfeature is something that we shouldn't support at all.
Can't you just make your link a relative one inside the exported directory? That works just fine and as expected.
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 2/2] Switched SAMA5D4EK development board to the newer environment method.
Quoted 65 lines · Sascha Hauer
Quoted 45 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 34 lines · Sascha Hauer
Quoted 8 lines · Bo Shen
Hi J,
Quoted 4 lines · Jean-Christophe PLAGNIOL-VILLARD
Hi,
as state before I use the atmel board for bootp everyday as the defaultenv-2 does not support this Nack until it’s fixed
Quoted 6 lines
Do you mean the defaultenv-2 doesn't support the bootp feature or do you mean let Doug to keep the default boot from net?
Quoted 1 line
I did send patch for this in the past but they did not hit the mainline
Can you point us this? Thanks.
He meant this patch:
http://lists.infradead.org/pipermail/barebox/2012-September/thread.html#9304
Reading this discussion again I still have mostly the same opinion:
an /env/boot/* script should be simple, it should be adjustable.We should resolve this now.
So Jean-Christophe, What you want is to boot your board with informations provided by the dhcp server. Looking again at your patch back then the following should do it:
/env/boot/bootp:
Quoted 10 lines
| #!/bin/sh | | path="/mnt/tftp" | | ifup eth0 | | # Set variables based on information provided by the dhcp request | nfsroot="${global.dhcp.rootpath}" | global.bootm.image="${path}/${global.dhcp.bootfile}" | global.bootm.oftree="${path}/${global.dhcp.oftree_file}”Quoted 5 lines
this is not possible unfortunately
As if you use symlink the nfs will not work
it was work on defaultenv as it’s use the nfs commande and not FS The nfs command handle symlink;Let me recap: On the host you have some directory exported as NFS. It contains a link to some other position:
/export/somelink -> /some/other/file
Now if I mount /export on barebox 'somelink' points to /some/other/file, a path that doesn't exist in barebox, some the file cannot be read. The NFS command implementation now mounts '/some/other' from the NFS server and reads 'file' from that location.
Quoted 5 lines
This is really a misfeature is something that we shouldn't support at all.
Can't you just make your link a relative one inside the exported directory? That works just fine and as expected.
unfortunately no can’t do so why not just add my old patch that work in all case
Best Regards,
J.
Quoted 9 lines
Sascha
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 2/2] Switched SAMA5D4EK development board to the newer environment method.
Quoted 14 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 14 lines
Quoted 3 lines
As if you use symlink the nfs will not work
it was work on defaultenv as it’s use the nfs commande and not FS The nfs command handle symlink;Let me recap: On the host you have some directory exported as NFS. It contains a link to some other position:
/export/somelink -> /some/other/file
Now if I mount /export on barebox 'somelink' points to /some/other/file, a path that doesn't exist in barebox, some the file cannot be read. The NFS command implementation now mounts '/some/other' from the NFS server and reads 'file' from that location.
Quoted 7 lines
Quoted 5 lines
This is really a misfeature is something that we shouldn't support at all.
Can't you just make your link a relative one inside the exported directory? That works just fine and as expected.
unfortunately no can’t do so why not just add my old patch that work in all case
Because symbolic links are to be interpreted on the client, not on the server. You are depending on some misfeature that went into a 2004 U-Boot supposedly by accident.
Anyway, your patch back then proved that it's possible to do what you want with defaultenv-2. It shouldn't be a problem to put this script you created on your board. If you don't want to depend on the environment on stored on the board you could also cherry-pick a patch which adjusts the defaultenv to your needs before compiling barebox.
As said, there can be only one defaultenv per board and this won't match everyones needs. I fail to see why this should be an exotic setup for your personal testing needs.
We also do automated testing here and have to deal with the fact that the boards defaultenvironment doesn't fit out needs for this.
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 2/2] Switched SAMA5D4EK development board to the newer environment method.
In reply to Bo ShenSascha,
Any idea why the old environment didn't need the "nand0.", but the new one does for the partitions to be named correctly?
Quoted 3 lines
Quoted 3 lines
I remove the "nand0." for partition name, then it is OK. After this change, it won't keep consistent with the partition >> table name.
Now boot up the barebox, the partition for nand is: "
/dev/barebox", "/dev/barebox.bb" while not "/dev/nand0.barebox", >>/dev/nand0.barebox.bb". I am thinking would it be possible to keep the consistent?
Like Bo, I would prefer to not have to call it out specifically in the mtdparts-nand.
Thanks,
Doug
Quoted 253 lines · Bo Shen
Hi Doug Brainard,
Quoted 125 lines · Doug Brainard
--- arch/arm/boards/sama5d4ek/env/bin/init_board | 15 -------- arch/arm/boards/sama5d4ek/env/boot/nand-ubi | 8 +++++ arch/arm/boards/sama5d4ek/env/config | 42 ---------------------- arch/arm/boards/sama5d4ek/env/init/mtdparts-nand | 6 ++++ arch/arm/boards/sama5d4ek/env/init/ps1 | 7 ++++ arch/arm/boards/sama5d4ek/env/init/splash | 10 ++++++ arch/arm/boards/sama5d4ek/env/nv/boot.default | 1 + arch/arm/boards/sama5d4ek/env/nv/bootargs.base | 1 + arch/arm/boards/sama5d4ek/env/nv/hostname | 1 + .../boards/sama5d4ek/env/nv/linux.bootargs.console | 1 + arch/arm/configs/sama5d4ek_defconfig | 5 +-- arch/arm/mach-at91/Kconfig | 1 + 12 files changed, 39 insertions(+), 59 deletions(-)delete mode 100644
arch/arm/boards/sama5d4ek/env/bin/init_boardcreate mode 100644arch/arm/boards/sama5d4ek/env/boot/nand-ubidelete mode 100644arch/arm/boards/sama5d4ek/env/configcreate mode 100644arch/arm/boards/sama5d4ek/env/init/mtdparts-nandcreate mode 100644arch/arm/boards/sama5d4ek/env/init/ps1create mode 100644arch/arm/boards/sama5d4ek/env/init/splashcreate mode 100644arch/arm/boards/sama5d4ek/env/nv/boot.defaultcreate mode 100644arch/arm/boards/sama5d4ek/env/nv/bootargs.basecreate mode 100644arch/arm/boards/sama5d4ek/env/nv/hostnamecreate mode 100644arch/arm/boards/sama5d4ek/env/nv/linux.bootargs.consolearch/arm/boards/sama5d4ek/env/bin/init_board deleted +0
-15@@ -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 1arch/arm/boards/sama5d4ek/env/boot/nand-ubi new file +8
-0@@ -0,0 +1,8 @@ +#!/bin/sh + +global.bootm.image="/dev/nand0.kernel.bb" +global.bootm.oftree="/dev/nand0.oftree.bb" + +bootargs-ip + +global.linux.bootargs.dyn.root="root=ubi0:nand0.rootfsubi.mtd=nand0.rootfs rootfstype=ubifs noinitrd"
arch/arm/boards/sama5d4ek/env/config deleted +0
-39@@ -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 - -# 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', 'nand' or empty -oftree_loc=nand - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root.$rootfs_type -ubiroot=system - -# 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),512k(barebox)ro,256k(bareboxenv),256k(bareboxenv2),256k(spare),512k(oftree),6M(kernel),8M(recovery),176M(system),304M(userdata),-(cache)" -rootfs_mtdblock_nand=10 - -m25p80_parts="64k(bootstrap),384k(barebox),256k(bareboxenv),256k(bareboxenv2),128k(oftree),-(updater)" - -autoboot_timeout=3 - -bootargs="console=ttyS0,115200 ubi.mtd=8 ubi.mtd=9 init=/initandroidboot.hardware=sama5-pda androidboot.lcd=wvga"
arch/arm/boards/sama5d4ek/env/config deleted +0
-3- -# set a fancy prompt (if support is compiled in) -PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# "arch/arm/boards/sama5d4ek/env/init/mtdparts-nand new file +0
-0arch/arm/boards/sama5d4ek/env/init/mtdparts-nand line 6
Quoted 7 lines
arch/arm/boards/sama5d4ek/env/init/mtdparts-nand new file +6
-0@@ -0,0 +1,6 @@ +#!/bin/sh + +mtdparts="256k(nand0.at91bootstrap),512k(nand0.barebox)ro,256k(nand0.bareboxenv),256k(nand0.bareboxenv2),256k(nand0.spare),512k(nand0.oftree),6M(nand0.kernel),-(nand0.rootfs)" +kernelname="atmel_nand" + +mtdparts-add -b -d nand0 -k ${kernelname} -p ${mtdparts}Using this type of partition table make the file system can not mount successfully.
I remove the "nand0." for partition name, then it is OK. After this change, it won't keep consistent with the partition table name.
Now boot up the barebox, the partition for nand is: "
/dev/barebox", "/dev/barebox.bb" while not "/dev/nand0.barebox",/dev/nand0.barebox.bb". I am thinking would it be possible to keep the consistent?Quoted 46 lines
arch/arm/boards/sama5d4ek/env/init/ps1 new file +7
-0@@ -0,0 +1,7 @@ +#!/bin/sh + +if [ ${global.allow_color} = "true" ]; then + export PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# " +else + export PS1="barebox@\h:\w " +fiarch/arm/boards/sama5d4ek/env/init/splash new file +10
-0@@ -0,0 +1,10 @@ +#!/bin/sh + +splash=/env/splash.png + +if [ -f ${splash} -a -e /dev/fb0 ]; then + splash -o ${splash} + fb0.enable=1 +fi + +exit 1arch/arm/boards/sama5d4ek/env/nv/boot.default new file +1
-0@@ -0,0 +1 @@ +nand-ubiarch/arm/boards/sama5d4ek/env/nv/bootargs.base new file +0
-0arch/arm/boards/sama5d4ek/env/nv/bootargs.base line 1
Quoted 1 line
arch/arm/boards/sama5d4ek/env/nv/bootargs.base new file +1
-0@@ -0,0 +1 @@ +console=ttyS0,115200Till now, I don't know the difference between "bootargs.base" (here maybe linux.bootargs.base (?)) and "linux.bootargs.console"
Quoted 51 lines
arch/arm/boards/sama5d4ek/env/nv/hostname new file +1
-0@@ -0,0 +1 @@ +sama5d4ekarch/arm/boards/sama5d4ek/env/nv/linux.bootargs.console new file +1
-0@@ -0,0 +1 @@ +console=ttyS0,115200arch/arm/configs/sama5d4ek_defconfig +3
-2@@ -9,13 +9,12 @@ CONFIG_MALLOC_SIZE=0xA00000 CONFIG_EXPERIMENTAL=y CONFIG_MALLOC_TLSF=y CONFIG_PROMPT="A5D4EK:" -CONFIG_GLOB=y CONFIG_PROMPT_HUSH_PS2="y" CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y CONFIG_CONSOLE_ACTIVATE_ALL=y -CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y +CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/sama5d4ek/env" CONFIG_DEBUG_INFO=y # CONFIG_CMD_ARM_CPUINFO is not set@@ -35,6 +34,8 @@ CONFIG_CMD_PARTITION=y CONFIG_CMD_EXPORT=y CONFIG_CMD_LOADENV=y CONFIG_CMD_PRINTENV=y +CONFIG_CMD_MAGICVAR=y +CONFIG_CMD_MAGICVAR_HELP=y CONFIG_CMD_SAVEENV=y CONFIG_CMD_FILETYPE=y CONFIG_CMD_SLEEP=yarch/arm/mach-at91/Kconfig +0
-0@@ -489,6 +489,7 @@ choice
Quoted 10 lines
arch/arm/mach-at91/Kconfig choice · line 495
Quoted 7 lines
arch/arm/mach-at91/Kconfig +1
-0config 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.Best Regards,
Bo Shen
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 2/2] Switched SAMA5D4EK development board to the newer environment method.
In reply to Sascha HauerSascha,
Quoted 1 line
Quoted 1 line
bootargs.base is unused, this file should be removed.
My next patch attempt will have "bootargs.base" removed, and it will attempt to boot from "nand" and then fall back to "net" if the nand is not programmed.
Just waiting on clarification on the "nand0." question when you get in tomorrow.
Thanks,
Doug
Quoted 14 lines · Sascha Hauer
Quoted 10 lines · Bo Shen
arch/arm/boards/sama5d4ek/env/nv/bootargs.base line 1
Quoted 7 lines
arch/arm/boards/sama5d4ek/env/nv/bootargs.base new file +1
-0@@ -0,0 +1 @@ +console=ttyS0,115200Till now, I don't know the difference between "bootargs.base" (here maybe linux.bootargs.base (?)) and "linux.bootargs.console"
bootargs.base is unused, this file should be removed.
Quoted 7 lines
Sascha
--
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 2/2] Switched SAMA5D4EK development board to the newer environment method.
In reply to Doug BrainardSo it looks like the following line in mtdparts-add is causing the "nand0." issue:
addpart -n /dev/${device} "$parts" || exit
The old environment didn't use the "-n". Removing the "-n" fixes the issue and gives it the same functionality as the old environment did.
So the question is how should I fix this? I could remove it in the default environment, but that would require all other boards using the new environment to update.
Or, I can add my own env/bin/mtdparts-add script for the board and remove the "-n" from there instead which would leave the other projects alone. I'm assuming I should use this option as the fix, but I wanted to confirm that with you.
Thanks,
Doug
Quoted 9 lines · Doug Brainard
Sascha,
Any idea why the old environment didn't need the "nand0.", but the new one does for the partitions to be named correctly?
Quoted 3 lines
Quoted 3 lines
I remove the "nand0." for partition name, then it is OK. After this change, it won't keep consistent with the partition >> table name.
Now boot up the barebox, the partition for nand is: "
/dev/barebox", "/dev/barebox.bb" while not "/dev/nand0.barebox", >>/dev/nand0.barebox.bb". I am thinking would it be possible to keep the consistent?
Quoted 271 lines
Like Bo, I would prefer to not have to call it out specifically in the mtdparts-nand.
Thanks,
Doug
Quoted 263 lines · Bo Shen
Hi Doug Brainard,
Quoted 125 lines · Doug Brainard
--- arch/arm/boards/sama5d4ek/env/bin/init_board | 15 -------- arch/arm/boards/sama5d4ek/env/boot/nand-ubi | 8 +++++ arch/arm/boards/sama5d4ek/env/config | 42 ---------------------- arch/arm/boards/sama5d4ek/env/init/mtdparts-nand | 6 ++++ arch/arm/boards/sama5d4ek/env/init/ps1 | 7 ++++ arch/arm/boards/sama5d4ek/env/init/splash | 10 ++++++ arch/arm/boards/sama5d4ek/env/nv/boot.default | 1 + arch/arm/boards/sama5d4ek/env/nv/bootargs.base | 1 + arch/arm/boards/sama5d4ek/env/nv/hostname | 1 + .../boards/sama5d4ek/env/nv/linux.bootargs.console | 1 + arch/arm/configs/sama5d4ek_defconfig | 5 +-- arch/arm/mach-at91/Kconfig | 1 + 12 files changed, 39 insertions(+), 59 deletions(-)delete mode 100644
arch/arm/boards/sama5d4ek/env/bin/init_boardcreate mode 100644arch/arm/boards/sama5d4ek/env/boot/nand-ubidelete mode 100644arch/arm/boards/sama5d4ek/env/configcreate mode 100644arch/arm/boards/sama5d4ek/env/init/mtdparts-nandcreate mode 100644arch/arm/boards/sama5d4ek/env/init/ps1create mode 100644arch/arm/boards/sama5d4ek/env/init/splashcreate mode 100644arch/arm/boards/sama5d4ek/env/nv/boot.defaultcreate mode 100644arch/arm/boards/sama5d4ek/env/nv/bootargs.basecreate mode 100644arch/arm/boards/sama5d4ek/env/nv/hostnamecreate mode 100644arch/arm/boards/sama5d4ek/env/nv/linux.bootargs.consolearch/arm/boards/sama5d4ek/env/bin/init_board deleted +0
-15@@ -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 1arch/arm/boards/sama5d4ek/env/boot/nand-ubi new file +8
-0@@ -0,0 +1,8 @@ +#!/bin/sh + +global.bootm.image="/dev/nand0.kernel.bb" +global.bootm.oftree="/dev/nand0.oftree.bb" + +bootargs-ip + +global.linux.bootargs.dyn.root="root=ubi0:nand0.rootfsubi.mtd=nand0.rootfs rootfstype=ubifs noinitrd"
arch/arm/boards/sama5d4ek/env/config deleted +0
-39@@ -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 - -# 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', 'nand' or empty -oftree_loc=nand - -# can be either 'jffs2' or 'ubifs' -rootfs_type=ubifs -rootfsimage=root.$rootfs_type -ubiroot=system - -# 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),512k(barebox)ro,256k(bareboxenv),256k(bareboxenv2),256k(spare),512k(oftree),6M(kernel),8M(recovery),176M(system),304M(userdata),-(cache)" -rootfs_mtdblock_nand=10 - -m25p80_parts="64k(bootstrap),384k(barebox),256k(bareboxenv),256k(bareboxenv2),128k(oftree),-(updater)" - -autoboot_timeout=3 - -bootargs="console=ttyS0,115200 ubi.mtd=8 ubi.mtd=9 init=/initandroidboot.hardware=sama5-pda androidboot.lcd=wvga"
arch/arm/boards/sama5d4ek/env/config deleted +0
-3- -# set a fancy prompt (if support is compiled in) -PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# "arch/arm/boards/sama5d4ek/env/init/mtdparts-nand new file +0
-0arch/arm/boards/sama5d4ek/env/init/mtdparts-nand line 6
Quoted 7 lines
arch/arm/boards/sama5d4ek/env/init/mtdparts-nand new file +6
-0@@ -0,0 +1,6 @@ +#!/bin/sh + +mtdparts="256k(nand0.at91bootstrap),512k(nand0.barebox)ro,256k(nand0.bareboxenv),256k(nand0.bareboxenv2),256k(nand0.spare),512k(nand0.oftree),6M(nand0.kernel),-(nand0.rootfs)" +kernelname="atmel_nand" + +mtdparts-add -b -d nand0 -k ${kernelname} -p ${mtdparts}Using this type of partition table make the file system can not mount successfully.
I remove the "nand0." for partition name, then it is OK. After this change, it won't keep consistent with the partition table name.
Now boot up the barebox, the partition for nand is: "
/dev/barebox", "/dev/barebox.bb" while not "/dev/nand0.barebox",/dev/nand0.barebox.bb". I am thinking would it be possible to keep the consistent?Quoted 46 lines
arch/arm/boards/sama5d4ek/env/init/ps1 new file +7
-0@@ -0,0 +1,7 @@ +#!/bin/sh + +if [ ${global.allow_color} = "true" ]; then + export PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# " +else + export PS1="barebox@\h:\w " +fiarch/arm/boards/sama5d4ek/env/init/splash new file +10
-0@@ -0,0 +1,10 @@ +#!/bin/sh + +splash=/env/splash.png + +if [ -f ${splash} -a -e /dev/fb0 ]; then + splash -o ${splash} + fb0.enable=1 +fi + +exit 1arch/arm/boards/sama5d4ek/env/nv/boot.default new file +1
-0@@ -0,0 +1 @@ +nand-ubiarch/arm/boards/sama5d4ek/env/nv/bootargs.base new file +0
-0arch/arm/boards/sama5d4ek/env/nv/bootargs.base line 1
Quoted 1 line
arch/arm/boards/sama5d4ek/env/nv/bootargs.base new file +1
-0@@ -0,0 +1 @@ +console=ttyS0,115200Till now, I don't know the difference between "bootargs.base" (here maybe linux.bootargs.base (?)) and "linux.bootargs.console"
Quoted 51 lines
arch/arm/boards/sama5d4ek/env/nv/hostname new file +1
-0@@ -0,0 +1 @@ +sama5d4ekarch/arm/boards/sama5d4ek/env/nv/linux.bootargs.console new file +1
-0@@ -0,0 +1 @@ +console=ttyS0,115200arch/arm/configs/sama5d4ek_defconfig +3
-2@@ -9,13 +9,12 @@ CONFIG_MALLOC_SIZE=0xA00000 CONFIG_EXPERIMENTAL=y CONFIG_MALLOC_TLSF=y CONFIG_PROMPT="A5D4EK:" -CONFIG_GLOB=y CONFIG_PROMPT_HUSH_PS2="y" CONFIG_HUSH_FANCY_PROMPT=y CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y CONFIG_CONSOLE_ACTIVATE_ALL=y -CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y +CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/sama5d4ek/env" CONFIG_DEBUG_INFO=y # CONFIG_CMD_ARM_CPUINFO is not set@@ -35,6 +34,8 @@ CONFIG_CMD_PARTITION=y CONFIG_CMD_EXPORT=y CONFIG_CMD_LOADENV=y CONFIG_CMD_PRINTENV=y +CONFIG_CMD_MAGICVAR=y +CONFIG_CMD_MAGICVAR_HELP=y CONFIG_CMD_SAVEENV=y CONFIG_CMD_FILETYPE=y CONFIG_CMD_SLEEP=yarch/arm/mach-at91/Kconfig +0
-0arch/arm/mach-at91/Kconfig choice · line 495
Quoted 7 lines
arch/arm/mach-at91/Kconfig +1
-0@@ -489,6 +489,7 @@ choice config MACH_SAMA5D4EK bool "Atmel SAMA5D4 Evaluation Kit" + select HAVE_DEFAULT_ENVIRONMENT_NEW help Select this if you are using Atmel's SAMA5D4-EK Evaluation Kit.Best Regards,
Bo Shen
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 2/2] Switched SAMA5D4EK development board to the newer environment method.
Quoted 8 lines · Doug Brainard
So it looks like the following line in mtdparts-add is causing the "nand0." issue:
addpart -n
/dev/${device}"$parts" || exitThe old environment didn't use the "-n". Removing the "-n" fixes the issue and gives it the same functionality as the old environment did.
Quoted 8 lines
So the question is how should I fix this? I could remove it in the default environment, but that would require all other boards using the new environment to update.
Or, I can add my own env/bin/mtdparts-add script for the board and remove the "-n" from there instead which would leave the other projects alone. I'm assuming I should use this option as the fix, but I wanted to confirm that with you.
I would rather add a '-n' option to the mtdparts-add script. Anyway, I just sent a series updating the partition handling. Among other things I hope that this fixes the naming issue.
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 2/2] Switched SAMA5D4EK development board to the newer environment method.
Okay, looking at some the patches you sent, I think it will resolve the issue. I'm still too new to this git patch concept to be sure how to grab it to try it out, so I'll just wait until it gets committed and then modify my changes to work well with it.
If it's a quick command I need to call, let me know and I'll try out the patch.
Thanks,
Doug
Quoted 22 lines · Sascha Hauer
Quoted 8 lines · Doug Brainard
So it looks like the following line in mtdparts-add is causing the "nand0." issue:
addpart -n
/dev/${device}"$parts" || exitThe old environment didn't use the "-n". Removing the "-n" fixes the issue and gives it the same functionality as the old environment did.
Quoted 8 lines
So the question is how should I fix this? I could remove it in the default environment, but that would require all other boards using the new environment to update.
Or, I can add my own env/bin/mtdparts-add script for the board and remove the "-n" from there instead which would leave the other projects alone. I'm assuming I should use this option as the fix, but I wanted to confirm that with you.
I would rather add a '-n' option to the mtdparts-add script. Anyway, I just sent a series updating the partition handling. Among other things I hope that this fixes the naming issue.
Quoted 8 lines
Sascha
--
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 2/2] Switched SAMA5D4EK development board to the newer environment method.
In reply to Sascha HauerSascha,
I got the patching thing figured out and they seem to be working well for me. I sent out a patch for the SAMA5D4EK new environment requiring the patches you sent (fixing the naming issue).
Thanks,
Doug
Quoted 22 lines · Sascha Hauer
Quoted 8 lines · Doug Brainard
So it looks like the following line in mtdparts-add is causing the "nand0." issue:
addpart -n
/dev/${device}"$parts" || exitThe old environment didn't use the "-n". Removing the "-n" fixes the issue and gives it the same functionality as the old environment did.
Quoted 8 lines
So the question is how should I fix this? I could remove it in the default environment, but that would require all other boards using the new environment to update.
Or, I can add my own env/bin/mtdparts-add script for the board and remove the "-n" from there instead which would leave the other projects alone. I'm assuming I should use this option as the fix, but I wanted to confirm that with you.
I would rather add a '-n' option to the mtdparts-add script. Anyway, I just sent a series updating the partition handling. Among other things I hope that this fixes the naming issue.
Quoted 8 lines
Sascha
--
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox