[SOLVED] Wandboard Quad: Installing romfs on f2fs partition

This forum is for supported devices using an ARMv7 Freescale SoC.

[SOLVED] Wandboard Quad: Installing romfs on f2fs partition

Postby Peedy » Fri Jan 02, 2015 3:55 pm

Hi,
after googling a while I have no clue about to install / with f2fs

Now, I made two partitions:
1st with ext2 100M thought as mounted /boot
2nd with f2fs by using rest of the SD-Card (16G)

unpacked the rootfs to [sdcard2]/
Moved [sdcard2]/boot/* to [sdcard1]/

Additionally I edited the fstab by following:
# <file system> <dir> <type> <options> <dump><pass>
/dev/mmcblk0p2 / f2fs defaults,noatime,discard 0 0
/dev/mmcblk0p1 /boot ext2 rw 0 2

But the next Step is to tell the Bootloader where to find the /-partition.
For now ... I have no idea how to do it, because uEnv.txt is not existing.

After telling the booloader where to find/bind the partitions I have to chroot the rootfs and install the f2fs-package, right?

Please help me to do the next steps ...

Cheers ... Peedy
Last edited by Peedy on Mon Jan 05, 2015 5:19 pm, edited 1 time in total.
Peedy
 
Posts: 12
Joined: Fri Jan 02, 2015 3:39 pm

Re: Wandboard Quad: Installing romfs on f2fs partition

Postby Peedy » Mon Jan 05, 2015 5:19 pm

Success!

I found out the solution by myself and it works now perfectly!

For those they want to run the system on the same way, now the the work to be done:

create two partitions:
1.st size 100M formatted as ext2
2.nd size rest formatted as ext4

[EDIT] don't forget to let the first 8192Bytes free for UBoot ;-)

mount both partitions in your system like
$this->bbcode_second_pass_code('', 'mount /dev/sdc1 /mnt/sd1
mount /dev/sdc2 /mnt/sd2')
#sdcX in this case are my partitions. Check out the right path to your drives!

now, unpack the rootfs to /mnt/sd2 and copy /boot to /mnt/sd1


$this->bbcode_second_pass_code('', 'bsdtar -xpf ArchLinuxARM-wand-latest.tar.gz -C /mnt/sd2/
cp -R /mnt/sd2/boot /mnt/sd1')

create /mnt/sd1/boot/uEnv.txt with following content:

$this->bbcode_second_pass_code('', '
initrd_high=0xffffffff
fdt_high=0xffffffff
dtb_file=imx6q-wandboard.dtb

console=ttymxc0,115200

mmcroot=/dev/mmcblk0p2 rw
mmcrootfstype=ext4 rootwait fixrtc

optargs=console=tty0
video=mxcdi1fb:1280x720M@60

mmc_load_image=load mmc ${mmcdev}:${mmcpart} 0x10000000 zImage
mmc_load_initrd=load mmc ${mmcdev}:${mmcpart} 0x12000000 uInitrd; setenv
initrd_size ${filesize}
mmc_load_dtb=load mmc ${mmcdev}:${mmcpart} 0x11ff0000 /dtbs/${dtb_file}

mmcargs=setenv bootargs console=${console} ${optargs} root=${mmcroot}
rootfstype=${mmcrootfstype} ${video}

#Just: zImage
xyz_mmcboot=run mmc_load_image; run mmc_load_dtb; echo Booting from mmc ...
loaduimage=run xyz_mmcboot; run mmcargs; bootz 0x10000000 - 0x11ff0000

#zImage and initrd
#xyz_mmcboot=run mmc_load_image; run mmc_load_initrd; run mmc_load_dtb; echo
#Booting from mmc ...
#loaduimage=run xyz_mmcboot; run mmcargs; bootz 0x10000000')

next, sync and unmount all partitions.

let's boot the first time ...

Install f2fs and update the system:

$this->bbcode_second_pass_code('', 'pacman -Syu f2fs-tools')

O.K. shutdown the system and put your microSD in your PC again.

be root; f2fs-tools must be installed in your system
mount both partitions, again

save your rootfs to local like: $this->bbcode_second_pass_code('', 'cp -a /mnt/sd2/* ~/arch-backup/
')

unmount the 2.d partition
$this->bbcode_second_pass_code('', 'unmount /mnt/sd2
')

format the 2nd partition with f2fs
$this->bbcode_second_pass_code('', 'mkfs.f2fs /dev/sdc2')

... and mount it, again
$this->bbcode_second_pass_code('', 'mount /dev/sdc2 /mnt/sd2 ')
now, it's mounted as f2fs ...

write back the whole system from backup
$this->bbcode_second_pass_code('', 'cp -a ~/arch-backup/* /mnt/sd2/')

change var in /sd1/mnt/uEnv.txt
from $this->bbcode_second_pass_code('', 'mmcrootfstype=ext4 rootwait fixrtc')
to $this->bbcode_second_pass_code('', 'mmcrootfstype=f2fs rootwait fixrtc')

add following line in /mnt/sd2/etc/fstab:
$this->bbcode_second_pass_code('', '/dev/mmcblk0p2 / f2fs defaults,noatime,discard 0 0
')
sync, unmount all and fire the SDcard up in your wandborad, again!

et voila! Your system will boot into a f2fs-system! :-))))


Cheers ... Peedy
Last edited by Peedy on Wed Feb 18, 2015 12:50 pm, edited 1 time in total.
Peedy
 
Posts: 12
Joined: Fri Jan 02, 2015 3:39 pm

Re: [SOLVED] Wandboard Quad: Installing romfs on f2fs partit

Postby beerhoof » Tue Jan 06, 2015 7:50 pm

Thanks for writing this up Peedy!

I'm going to be trying this soon on a cubox-i4 in hopes of a longer lasting install
beerhoof
 
Posts: 1
Joined: Tue Jan 06, 2015 7:47 pm


Return to Freescale

Who is online

Users browsing this forum: No registered users and 4 guests