[opensuse-arm] omap fatless boot
Hi list, Dirk had an idea a while back. On OMAP we have this pretty sad situation where we need to have /boot be a FAT partition so we can store MLO and u-boot.bin on there. But why do we need FAT there? Let's take a look at the boot process: - built-in ROM boots - built-in ROM searches for MLO in first active FAT partition - built-in ROM starts MLO - MLO searches for u-boot.bin in first(!) FAT partition - MLO boots u-boot So both components have FAT hardcoded in them. Or do they? The built-in ROM actually has an alternative boot mode which is called "raw". If it finds a small header at certain locations of the SD card (offset 0, offset 128kb) it loads MLO from there instead of FAT. Since we always align our partitions on 1MB boundaries, we have 1MB of free space below the first partition! MLO may only be up to 64kb big, so it fits there pretty well. Now to the next problem. MLO uses FAT. But MLO really is x-loader which is a modified version of u-boot. And u-boot can do ext2. So why don't we just take u-boot's ext2 support and throw it into our MLO binary? Well, this whole thing turned out a bit trickier than I anticipated, but eventually I got it rolling. Here's the patch: https://build.opensuse.org/package/view_file?file=0001-add-ext2-support.patch&package=x-loader-omap3beagle&project=openSUSE%3AFactory%3AARM&rev=448d4888035214046c77af9d11af742d I also verified that it works at least in an emulator. Since I don't have a beagle board, I couldn't verify if it works on real hardware. But to me the beagle target is mostly important for the emulation bit anyway :). The next target is x-loader for omap4 (panda) which hopefully will be easier to deal with. And once that's ext2'ified, we can remove the whole FAT dependency from our shiny ARM target! Yay! Happy hacking, and see you at fosdem! Alex PS: I also had to fix qemu's raw booting mode, since it wasn't behaving according to spec. So don't try this on qemu-linaro just yet :).-- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
participants (1)
-
Alexander Graf