Closed DieterReuter closed 8 years ago
Not only that, but I am quite sure the first (boot) partition has to be a FAT32 one. So we need to have two partitions. I am currently trying to get this working.
Maybe we should check the disk partition layout of an ODROID Ubuntu image. I already checked the ArchLinuxARM layout and this just uses a single EXT4 partition only.
Ah, you're right (and I forgot). It should work with a single EXT4 partition as well.
We are also thinking about using a small FAT32 partition of 64M on all devices. This is the default for the Raspi and we are able to use this partition for additional configuration files and maybe a Readme and some other stuff. Then it's easier to handle the different device images and flashing is more convenient.
I just checked an Ubuntu image for C1:
fdisk -l ubuntu-14.04.3lts-lubuntu-odroid-c1-20151020.img
Disk ubuntu-14.04.3lts-lubuntu-odroid-c1-20151020.img: 5505 MB, 5505024000 bytes
4 heads, 16 sectors/track, 168000 cylinders, total 10752000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000cde21
Device Boot Start End Blocks Id System
ubuntu-14.04.3lts-lubuntu-odroid-c1-20151020.img1 3072 266239 131584 6 FAT16
ubuntu-14.04.3lts-lubuntu-odroid-c1-20151020.img2 266240 10751999 5242880 83 Linux
And here is another Ubuntu image for XU3 with a different partition layout:
fdisk -l ubuntu-14.04lts-server-odroid-xu3-20150725.img
Disk ubuntu-14.04lts-server-odroid-xu3-20150725.img: 3384 MB, 3384803328 bytes
255 heads, 63 sectors/track, 411 cylinders, total 6610944 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0003f9f7
Device Boot Start End Blocks Id System
ubuntu-14.04lts-server-odroid-xu3-20150725.img1 4096 208895 102400 c W95 FAT32 (LBA)
ubuntu-14.04lts-server-odroid-xu3-20150725.img2 208896 6610943 3201024 83 Linux
There is no strict technical requirement for loading the kernel image, device tree, boot script, etc. from a fat partition since most u-boot implementations support ext2load (which is sufficient to load a file from an ext4 partition). The necessity for a fat partition only relates to the level of compatibility you want to retain (some people prefer to change the boot settings with the help of their Windows or Mac computer). I personally prefer a single ext4 partition layout which makes it easier to have several co-existing OS installed on the same media without interfering each other. But this may break compatibility to existing tools and processes, see here.
I'm about to consolidate the various ways how u-boot is used among different ARM boards, I hope I'll publish this work soon.
Since we installed the ODROID kernel in a chroot env, the u-boot isn't flashed into the SD image sectors. This has to be done as soon as we have the image file created, but can be also done as the very last step as well.
One example how to do this can be found here https://github.com/archlinuxarm/PKGBUILDs/blob/master/alarm/uboot-odroid-c1/uboot-odroid-c1.install.