On 05/29/2012 05:24 PM, Mardy Marshall wrote: > > On May 29, 2012, at 12:12 PM, Gordan Bobic wrote: > >> On 05/29/2012 05:02 PM, Mardy Marshall wrote: >>> Hi All, >>> >>> I know that this is not for the faint of heart, but >>> I'm interested in rebuilding the rootfs from the SRPM's. >> >> You cannot rebuild the rootfs itself from source. You >> can rebuild it from the binary RPMs, if that's what you >> actually mean - have a look here: >> >> http://lists.redsleeve.org/pipermail/users/2012-May/000027.html >> >> Specifically, the par that says: >> In a nutshell, I build it on an existing, working ARM machine in a >> chroot, using: >> >> yum --installroot=/path/to/chroot install<list of basic rpms> >> >> Then, force-re-install (rpm -Uvh --force --root=/path/to/chroot): >> - initscripts (or shutdown will hang due to one of the init scripts >> missing, haven't figured out why yet) >> - MAKEDEV (or you'll get start time complaints about vcsa user missing, >> again, don't know why the initial install doesn't add it) >> >> If you really DO mean from source, you'll have to rebuild most of >> the distribution binary rpms from src.rpms, and then install those >> binary rpms using yum as described above. >> >>> Are there any scripts or how-to notes that the RedSleeve team can share? >> >> No scripts worth sharing. Since you can start from the existing >> RedSleeve repository, you can use that to rebuild all the src.rpms in >> mock. Simply iterate through all the packages until they are all built >> (this takes about a month on a SheevaPlugs or two) and after each build >> copy the resulting rpms from the mock/<chroot>/results directory >> somewhere out of the way. When you are done, use createrepo to create >> the manifest, point the yum repository path to your newly built folder, >> and use the above yum line. >> >> Just out of interest, what's wrong with the RedSleeve rootfs as is? >> Any particular reason why it doesn't work for you? >> > > Unfortunately, yes, I am looking to rebuild the binary RPM's from > their corresponding source RPM's and then build a new rootfs. The > reason for doing this is that for my particular target, I need to > modify some of the ARM specific compilation options that the > packages were originally compiled with.
Well, you can edit the rpmrc file for your target and take it from there, but bear in mind the following: 1) All the compile parameters for all the architectures are pretty standardised. This also means they are the only ones actually tested. 1.1) In some cases the package itself overrides the build paramters, and in a few cases the distro parameters are completely ignored. You may need to identify those packages and change them manually. 2) RedSleeve (6) is based on RHEL6, which is in turn based on Fedora ~12. When F12 was released, only armv5tel target was supported and tested in any way shape or form. If you try to build for something else you are likely to find that some packages may fail to build. Others might build OK but fail to run or produce broken results. 3) If you are in fact planning to make a hard-float build, you will have to bootstrap it from scratch. That means cross-compiling stage 1 packages (gcc, glibc and the other toolchain basics), and use that to build stage2 packages and then rebuild everything again with itself properly. This is a LOT of work, and may not work - toolchain package versions are sufficiently old that there are likely to be bugs that cause a lot of things to break. There is a reason why Fedora hasn't had a hard-float release until F17. > To speed things up, I was also hoping to be able to cross-compile > everything on an X86 host. That's fine for stage 1 bootstrap, but you will find that this greatly increases the degree of complication for proper package rebuilds later. Mock and rpm aren't designed for it. Also note that this can yield additional other bugs to manifest. There is a very good reason why Fedora has a requirement that all final stage packages are built on the native platform rather than cross-compiled. Cross-compiling is purely for bootstraping the build from scratch. Good luck. If you succeed, please post the details. Gordan
