meta-yocto-bsp: enable the jffs2 for mpc8315e-rdb board
v2 cover meta-yocto-bsp: enable the jffs2 for mpc8315e-rdb board
Hi,
v2:
Add the example about booting from jffs2 root in README.hardware
v1:
This tries to enable the jffs2 support for the mpc8315e-rdb board. I have tested the jffs2 with the following steps and it worked perfectly.
1. root@mpc8315e-rdb:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00800000 00010000 "fe000000.flash"
mtd1: 00100000 00004000 "u-boot"
mtd2: 00300000 00004000 "kernel"
mtd3: 01c00000 00004000 "fs"
2. root@mpc8315e-rdb:~# flash_eraseall /dev/mtd3flash_eraseall has been replaced by flash_erase <mtddev> 0 0; please use it Erasing 16 Kibyte @ 1bec000 -- 99 % complete flash_erase: Skipping bad block at 01bf0000flash_erase: Skipping bad block at 01bf4000flash_erase: Skipping bad block at 01bf8000flash_erase: Skipping bad block at 01bfc000
Erasing 16 Kibyte @ 1bfc000 -- 100 % complete
3. root@mpc8315e-rdb:~# flashcp core-image-minimal-mpc8315e-rdb.jffs2 /dev/mtd3
4. Then boot with a jffs2 rootfs
5. root@mpc8315e-rdb:~# cat /proc/cmdline root=/dev/mtdblock3 rootfstype=jffs2 console=ttyS0,115200 root@mpc8315e-rdb:~#
root@mpc8315e-rdb:~# mount rootfs on / type rootfs (rw) /dev/root on / type jffs2 (rw,relatime) devtmpfs on /dev type devtmpfs (rw,relatime,size=59136k,nr_inodes=14784,mode=755) proc on /proc type proc (rw,relatime) sysfs on /sys type sysfs (rw,relatime) debugfs on /sys/kernel/debug type debugfs (rw,relatime) tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755) tmpfs on /var/volatile type tmpfs (rw,relatime) devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
The following changes since commit 8e0c54cd0e82ffe120f84f495101cd29e6fd06bf:
bitbake: bb/utils: fix contains_any() (2014-06-12 17:47:59 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib hao/master
for you to fetch changes up to 05ef8967ff189b16485e1a462c8de1ed74a08a32:
mpc8315e-rdb: add the example about booting from jffs2 root (2014-06-14 09:24:26 +0800)
----------------------------------------------------------------
Kevin Hao (3):
mpc8315e-rdb: bump to linux-yocto 3.14
mpc8315e-rdb: add the jffs2 image support
mpc8315e-rdb: add the example about booting from jffs2 root
README.hardware | 16 ++++++++++++++++ meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf | 5 ++++- .../recipes-kernel/linux/linux-yocto_3.14.bbappend | 3 +++ 3 files changed, 23 insertions(+), 1 deletion(-)
PATCH v2 1/3 mpc8315e-rdb: bump to linux-yocto 3.14
---
v2: No change.
meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf | 2 +- meta-yocto-bsp/recipes-kernel/linux/linux-yocto_3.14.bbappend | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-)
meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf +1 -1
@@ -14,7 +14,7 @@ SERIAL_CONSOLE = "115200 ttyS0" MACHINE_FEATURES = "keyboard pci ext2 ext3 serial" -PREFERRED_VERSION_linux-yocto ?= "3.10%" +PREFERRED_VERSION_linux-yocto ?= "3.14%" PREFERRED_PROVIDER_virtual/kernel = "linux-yocto" PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
meta-yocto-bsp/recipes-kernel/linux/linux-yocto_3.14.bbappend +3 -0
@@ -2,6 +2,7 @@ KBRANCH_genericx86 = "standard/common-pc/base" KBRANCH_genericx86-64 = "standard/common-pc-64/base" KBRANCH_edgerouter = "standard/edgerouter" KBRANCH_beaglebone = "standard/beaglebone" +KBRANCH_mpc8315e-rdb = "standard/fsl-mpc8315e-rdb" KMACHINE_genericx86 ?= "common-pc" KMACHINE_genericx86-64 ?= "common-pc-64"
@@ -10,8 +11,10 @@ SRCREV_machine_genericx86 ?= "0143c6ebb4a2d63b241df5f608b19f483f7eb9e0" SRCREV_machine_genericx86-64 ?= "0143c6ebb4a2d63b241df5f608b19f483f7eb9e0" SRCREV_machine_edgerouter ?= "0143c6ebb4a2d63b241df5f608b19f483f7eb9e0" SRCREV_machine_beaglebone ?= "0143c6ebb4a2d63b241df5f608b19f483f7eb9e0" +SRCREV_machine_mpc8315e-rdb ?= "0143c6ebb4a2d63b241df5f608b19f483f7eb9e0" COMPATIBLE_MACHINE_genericx86 = "genericx86" COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64" COMPATIBLE_MACHINE_edgerouter = "edgerouter" COMPATIBLE_MACHINE_beaglebone = "beaglebone" +COMPATIBLE_MACHINE_mpc8315e-rdb = "mpc8315e-rdb"
Signature · 1 line
1.9.3
PATCH v2 2/3 mpc8315e-rdb: add the jffs2 image support
In reply to Kevin HaoThere is a 32M NAND flash on this board, so it would be convenient that a jffs2 image is created by default. Also change the default image type from "tar.gz" to "tar.bz2" in order to be compatible with the beaglebone black and edgerouter BSP.
---
v2: No change.
meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf | 3 +++ 1 file changed, 3 insertions(+)
meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf +3 -0
@@ -28,3 +28,6 @@ UBOOT_ENTRYPOINT = "0x00000000" KERNEL_DEVICETREE = "${S}/arch/powerpc/boot/dts/mpc8315erdb.dts" MACHINE_EXTRA_RRECOMMENDS = " kernel-modules" + +IMAGE_FSTYPES ?= "jffs2 tar.bz2" +JFFS2_ERASEBLOCK = "0x4000"
Signature · 1 line
1.9.3
PATCH v2 3/3 mpc8315e-rdb: add the example about booting from jffs2 root
In reply to Kevin Hao---
v2: A new patch introduced in v2.
README.hardware | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
README.hardware +16 -0
@@ -324,6 +324,22 @@ Load the kernel and dtb (device tree blob), and boot the system as follows: => tftp 2000000 uImage-mpc8315e-rdb.dtb => bootm 1000000 - 2000000 +--- Booting from JFFS2 root --- + + 1. First boot the board with NFS root. + + 2. Erase the MTD partition which will be used as root: + + $ flash_eraseall /dev/mtd3 + + 3. Copy the JFFS2 image to the MTD partition: + + $ flashcp core-image-minimal-mpc8315e-rdb.jffs2 /dev/mtd3 + + 4. Then reboot the board and set up the environment in U-Boot: + + => setenv bootargs root=/dev/mtdblock3 rootfstype=jffs2 console=ttyS0,115200 + Ubiquiti Networks EdgeRouter Lite (edgerouter) ==============================================
Signature · 1 line
1.9.3
Quoted 5 lines · Kevin Hao
Hi,
v2:
Add the example about booting from jffs2 root in README.hardware
Looks good to me.
As promised, I stacked these on top of my kernel update for NAND support on the board.
If all goes well, I'll send the merge pull request tomorrow.
Bruce
Quoted 60 lines
v1:
This tries to enable the jffs2 support for the mpc8315e-rdb board. I have tested the jffs2 with the following steps and it worked perfectly.1. root@mpc8315e-rdb:~# cat
/proc/mtd
dev: size erasesize name
mtd0: 00800000 00010000 "fe000000.flash"
mtd1: 00100000 00004000 "u-boot"
mtd2: 00300000 00004000 "kernel"
mtd3:01c0000000004000 "fs"2. root@mpc8315e-rdb:~#
flash_eraseall/dev/mtd3flash_eraseallhas been replaced byflash_erase <mtddev> 0 0; please use it Erasing 16 Kibyte @ 1bec000 -- 99 % completeflash_erase: Skipping bad block at01bf0000flash_erase: Skipping bad block at01bf4000flash_erase: Skipping bad block at01bf8000flash_erase: Skipping bad block at01bfc000
Erasing 16 Kibyte @ 1bfc000 -- 100 % complete3. root@mpc8315e-rdb:~# flashcp core-image-minimal-mpc8315e-rdb.jffs2
/dev/mtd34. Then boot with a jffs2 rootfs
5. root@mpc8315e-rdb:~# cat
/proc/cmdlineroot=/dev/mtdblock3 rootfstype=jffs2 console=ttyS0,115200 root@mpc8315e-rdb:~#root@mpc8315e-rdb:~# mount rootfs on / type rootfs (rw) /dev/root on / type jffs2 (rw,relatime) devtmpfs on /dev type devtmpfs (rw,relatime,size=59136k,nr_inodes=14784,mode=755) proc on /proc type proc (rw,relatime) sysfs on /sys type sysfs (rw,relatime) debugfs on /sys/kernel/debug type debugfs (rw,relatime) tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755) tmpfs on /var/volatile type tmpfs (rw,relatime) devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)The following changes since commit
8e0c54cd0e82ffe120f84f495101cd29e6fd06bf:bitbake: bb/utils: fix contains_any() (2014-06-12 17:47:59 +0100)are available in the git repository at:
git://git.yoctoproject.org/poky-contribhao/masterfor you to fetch changes up to
05ef8967ff189b16485e1a462c8de1ed74a08a32:mpc8315e-rdb: add the example about booting from jffs2 root (2014-06-14 09:24:26 +0800)----------------------------------------------------------------
Kevin Hao (3):
mpc8315e-rdb: bump to linux-yocto 3.14
mpc8315e-rdb: add the jffs2 image support
mpc8315e-rdb: add the example about booting from jffs2 rootREADME.hardware | 16 ++++++++++++++++ meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf | 5 ++++- .../recipes-kernel/linux/linux-yocto_3.14.bbappend | 3 +++ 3 files changed, 23 insertions(+), 1 deletion(-)