From Fedora Project Wiki
No edit summary |
No edit summary |
||
Line 44: | Line 44: | ||
* download the f20 minimal image | * download the f20 minimal image | ||
<pre> | |||
wget http://download.fedoraproject.org/pub/fedora/linux/releases/20/Images/armhfp/Fedora-Minimal-VFAT-armhfp-20-1-sda.raw.xz | |||
</pre> | |||
* Decompress | * Decompress | ||
<pre> | |||
unxz -v Fedora-Minimal-VFAT-armhfp-20-1-sda.raw.xz | |||
</pre> | |||
* Map the partitions | |||
<pre> | |||
kpartx -avp _fedora_ Fedora-Minimal-VFAT-armhfp-20-1-sda.raw | |||
</pre> | |||
* Extract the rootfs | * Extract the rootfs | ||
<pre> | <pre> | ||
dd if= | dd if=/dev/mapper/loop0_fedora_3 \ | ||
of=f20-minimal-rootfs.ext4 | of=f20-minimal-rootfs.ext4 \ | ||
conv=fsync | |||
</pre> | </pre> | ||
* Shrink the rootfs image file | * Shrink the rootfs image file | ||
<pre> | <pre> | ||
e2fsck -f f20-minimal-rootfs.ext4 &> /dev/null | e2fsck -f f20-minimal-rootfs.ext4 &> /dev/null | ||
resize2fs -M f20-minimal-rootfs.ext4 | resize2fs -M f20-minimal-rootfs.ext4 | ||
</pre> | </pre> | ||
* Create a new f20 disk image file | * Create a new f20 disk image file | ||
Line 65: | Line 79: | ||
truncate -s 4G f20-minimal.disk | truncate -s 4G f20-minimal.disk | ||
</pre> | </pre> | ||
* Partition the newly created disk image | * Partition the newly created disk image | ||
<pre> | <pre> | ||
parted -a optimal --script -- f20-minimal.disk unit MiB mklabel msdos mkpart primary 4 24 mkpart primary 24 152 mkpart primary 152 1552 print | parted -a optimal --script -- f20-minimal.disk unit MiB mklabel msdos mkpart primary 4 24 mkpart primary 24 152 mkpart primary 152 1552 print | ||
</pre> | </pre> | ||
* Map the partitions to loop devices | * Map the partitions to loop devices | ||
Line 76: | Line 91: | ||
kpartx -avp _remix_ f20-minimal.disk | kpartx -avp _remix_ f20-minimal.disk | ||
</pre> | </pre> | ||
* Format the partitions accordingly to the output of the previous kpartx cmd. | * Format the partitions accordingly to the output of the previous kpartx cmd. | ||
Line 85: | Line 101: | ||
#mkfs.ext4 -L rootfs -U $(uuidgen) -m0 /dev/mapper/loop0_remix_3 | #mkfs.ext4 -L rootfs -U $(uuidgen) -m0 /dev/mapper/loop0_remix_3 | ||
</pre> | </pre> | ||
* Copy the Fedora-20 minimal rootfs to the appropriate partition | * Copy the Fedora-20 minimal rootfs to the appropriate partition | ||
Line 92: | Line 109: | ||
bs=4M conv=fsync | bs=4M conv=fsync | ||
</pre> | </pre> | ||
* Unmap the partition loops devs | * Unmap the partition loops devs |
Revision as of 02:46, 14 July 2014
OMAP5 uEVM notes
Fedora 20 uENV.txt:
setenv bootm_size 0x20000000 setenv bootargs console=${console} vram=${vram} root=LABEL=_/ ro rootwait rhgb ext4load mmc 0:3 0x82000000 /boot/vmlinuz-3.14.0-0.rc6.git4.1.fc21.armv7hl ext4load mmc 0:3 0x88080000 /boot/uInitrd-3.14.0-0.rc6.git4.1.fc21.armv7hl ext4load mmc 0:3 0x88000000 /boot/dtb-3.14.0-0.rc6.git4.1.fc21.armv7hl/omap5-uevm.dtb bootz 0x82000000 0x88080000 0x88000000
Fedora 21/rawhide notes
Install MLO and u-boot on non-vfat image: WARNING: BETA NOTES
sudo dd if=MLO \ of=/dev/sdz \ conv=fsync,notrunc \ seek=128k sudo dd if=u-boot.img \ of=/dev/sdz \ count=2 \ seek=1 \ conv=notrunc,fsync \ bs=384k
F20 notes
- download the f20 minimal image
wget http://download.fedoraproject.org/pub/fedora/linux/releases/20/Images/armhfp/Fedora-Minimal-VFAT-armhfp-20-1-sda.raw.xz
- Decompress
unxz -v Fedora-Minimal-VFAT-armhfp-20-1-sda.raw.xz
- Map the partitions
kpartx -avp _fedora_ Fedora-Minimal-VFAT-armhfp-20-1-sda.raw
- Extract the rootfs
dd if=/dev/mapper/loop0_fedora_3 \ of=f20-minimal-rootfs.ext4 \ conv=fsync
- Shrink the rootfs image file
e2fsck -f f20-minimal-rootfs.ext4 &> /dev/null resize2fs -M f20-minimal-rootfs.ext4
- Create a new f20 disk image file
truncate -s 4G f20-minimal.disk
- Partition the newly created disk image
parted -a optimal --script -- f20-minimal.disk unit MiB mklabel msdos mkpart primary 4 24 mkpart primary 24 152 mkpart primary 152 1552 print
- Map the partitions to loop devices
kpartx -avp _remix_ f20-minimal.disk
- Format the partitions accordingly to the output of the previous kpartx cmd.
mkfs.vfat -n uboot -F 16 /dev/mapper/loop0_remix_1 mkswap -L swap -U $(uuidgen) /dev/mapper/loop0_remix_2 #mkfs.ext4 -L rootfs -U $(uuidgen) -m0 /dev/mapper/loop0_remix_3
- Copy the Fedora-20 minimal rootfs to the appropriate partition
dd if=f20-minimal-rootfs.ext4 \ of=/dev/mapper/loop0_remix_3 \ bs=4M conv=fsync
- Unmap the partition loops devs
kpartx -dvp _remix_ f20-minimal.disk
Tips & Tricks
You can monitor the DD command in an easy one liner.
dd if=/dev/sdc3 of=f20-minimal-rootfs.ext4-ORIG & while ps -p $! ; do kill -USR1 $! ; sleep 5 ; done
This signals the DD process to spew progress info every five seconds. Especially useful on very slow sdcard, or large data transfers.