Re: [Bsdrp-devel] PATCH: Cross compile BSDRP for EdgeRouter Lite mips64
Router distribution based on FreeBSD with FFRouting and Bird
Brought to you by:
cochard
From: Cesar F. <ces...@gm...> - 2014-05-27 14:18:48
|
I can try a better implementation if you want to integrate it. With arm/mips the scripts may need a SUB_ARCH since they can have some vendor specific info. About the labels on a x86 to big endian makefs -B big -o label=XXX then dd to a md the label get lost ... no clue why. If I just copy the makefs image to a partition and mount it on mips labels are ok. As for the loader I was able to do almost all I needed without it. mount.conf can be changed to tell which image to boot. nvram2env worked great as a simple replacement for loader.conf read only tunable. On Tue, May 27, 2014 at 12:56 AM, Olivier Cochard-Labbé <ol...@co...>wrote: > On Thu, May 22, 2014 at 9:02 PM, Cesar Fazan <ces...@gm...>wrote: > >> This is a dirty and intrusive patch to cross compile BSDRP for the >> EdgeRouter Lite >> > > Wow... Thanks for this big patch ! > Now I just add to think how to "cleanly" include it :-) > > >> >> TODO >> Find someone willing to port ubldr to mips so we can get a freebsdloader when using >> uboot >> - http://kernelnomicon.org/?p=351 >> - http://svnweb.freebsd.org/base/stable/10/sys/boot/arm/uboot/ >> - http://svnweb.freebsd.org/base/head/sys/boot/mips/ >> Organize and clean up changes to not break build for other plataforms >> Patch BSDRP upgrade so it can work with this disk layout >> newfs, geom labels are a mess when creating big endian fs on little >> endian ... so labels are removed >> > > It's mandatory to use geom label on x86 for being "storage device > agnostic". If BSDRP start from an USB flash key, the drive will be > /dev/da0, but from a mSATA flash it will be /dev/ada0. > I need to check if makefs(8) or mkimg(1) supports to set a correct label > on this case. > > About the UPGRADE tool on MIPS: > I had to "emulate" the concept of "MBR active partition" on sparc64 > architecture. Because there is no concept of "MBR active" partition, I had > to use a new method (directly re-configuring the Sun OBP for booting on the > other partition). > How, from the userland on a MIPS platform, how to configure the boot > loader for booting to a new partition ? > > I didn't have an edgerouter anymore for testing the image, but I will play > with qemu for testing the integration of your patch. > > Thanks a lot's. > > Olivier > |