RetroBSD
http://retrobsd.org/

Building LiteBSD on *BSD
http://retrobsd.org/viewtopic.php?f=13&t=37566
Page 1 of 1

Author:  ibara [ Sat Jun 11, 2016 6:02 am ]
Post subject:  Building LiteBSD on *BSD

Hi team --

I got LiteBSD to (mostly) build on OpenBSD/amd64. I found some build problems along the way. Rather, assumptions about the machine LiteBSD is built on.

The only thing that doesn't build is share/zoneinfo. The build flags have -m32 in them, which the OpenBSD/amd64 toolchain doesn't support (I will have to try building LiteBSD with OpenBSD/i386). Then I'll try to build it on the other BSDs and hopefully make ports so people can do `pkg_add litebsd` and be able to build LiteBSD on their *BSD machine.

Author:  wiz [ Sat Jun 11, 2016 8:54 pm ]
Post subject:  Re: Building LiteBSD on *BSD

Hi Brian and all,

Getting LiteBSD to compile on LiteBSD seems a very worthwhile goal :).

Also, has anyone gotten the WIFI on the wifire board to work? And can it join a mesh such as BATMAN?

FWIW - I now have a BATMAN mesh running. The only real problem so far is when a node joining the mesh has the same identifier as another node. I am puzzled by how to 'solve' this problem. The mesh in Berlin MUST have the same problem? Do the users just cooperate?

Lots of fun :).

Wiz

Author:  ibara [ Sat Jun 11, 2016 9:56 pm ]
Post subject:  Re: Building LiteBSD on *BSD

Building LiteBSD on LiteBSD would be great. But this is about building LiteBSD on FreeBSD/OpenBSD/NetBSD. Which I think is great too.

I can't speak to the WiFi on the WiFIRE board as I do not use it.

Author:  vak [ Sun Jun 12, 2016 4:15 am ]
Post subject:  Re: Building LiteBSD on *BSD

I decided to try to build LiteBSD on FreeBSD. No success yet. Brian, which version of GCC do you use? I've found a prebuilt package mips-gcc, but it looks like it comes preconfigured for mips1 architecture only:
Code:
$ make
/usr/local/bin/mips-portbld-freebsd10.3-gcc -g -mips32r2 -EL -msoft-float -nostdinc -fno-builtin -Werror -Wall -c -O -I. -I../.. -DSDZL -DPIC32MZ -DUART_BAUD=115200 -DINET -DPROCFS -DFDESC -DKERNFS -DUNION -DFFS -DFIFO -DCONS_MINOR=1 -DCONS_MAJOR=17 -DHZ=100 -DCPU_KHZ=200000 -DBUFPAGES=18 -DNBUF=18 -DNMBCLUSTERS=64 -DNKMEMCLUSTERS=64 -DDEBUG -DDIAGNOSTIC -DDEVPAGER -DVNODEPAGER -DSWAPPAGER -DBUTTON1_PORT=TRISB -DBUTTON1_PIN=5 -DBUTTON1_INVERT -DSD_LED_PORT=TRISE -DSD_LED_PIN=7 -DKERNEL -D_KERNEL  ../../kern/init_main.c
../../kern/init_main.c:1:0: error: '-mips32r2' conflicts with the other architecture options, which specify a mips1 processor
 /*
 ^
*** Error code 1

Stop.


And I should say, the update procedure in the PC-BSD is a total crap. It took me a few hours trying to update PC-BSD 10.2 to 10.3, and when it totally ruined the filesystem, I finally had to reinstall everything from scratch. Quite a frustrating experience. I was an active FreeBSD developer in 90s, and since then I didn't use it for 15 years. I would expect the update process to enhance since then, but unfortunately, I don't see much progress here.

Author:  ibara [ Sun Jun 12, 2016 6:27 am ]
Post subject:  Re: Building LiteBSD on *BSD

Hey Serge --

I built everything on OpenBSD, though that should be a surprise to no one. I have a (currently inactive) OpenBSD account and was an active developer from 2013-2015. All the OpenBSD developers I've been spending time with here at BSDCan have been telling me I need to get my account back but I just don't have the time right now. :cry:

I did not use a prebuilt package. I built binutils-2.24 and gcc-4.8.5 myself--that is the combination I have always used to build LiteBSD (and LiteBSD packages), which I build on a Debian VM. When I get everything building, this is the binutils/gcc combination I plan on using for the litebsd port. I plan on making an OpenBSD port, a FreeBSD port, and a pkgsrc port, so that every *BSD has the same toolchain to build LiteBSD. And it should work with RetroBSD too.

I don't know anything about the PC-BSD upgrade process. I've never used PC-BSD. I wish you would have said something sooner though--Kris is here at BSDCan and we know each other so I could have said something to him ;) Supposedly the FreeBSD upgrade procedure is much easier, but I do not know it either. I only know OpenBSD.

Author:  vak [ Sun Jun 12, 2016 8:50 pm ]
Post subject:  Re: Building LiteBSD on *BSD

Well OK, I can build GCC from sources then. It would be nice to have a prebuild package though. May be a bit newer, like gcc 5.4 or something.

PC-BSD is a friendly GUI desktop built on top of FreeBSD, much like Ubuntu over Debian. Unfortunately, it's not as stable, and the update/upgrade process seems too fragile. Being an active Ubuntu user for 15 years, I've accustomed that I have to install the OS only once, and then I can continuously upgrade it for years, without any issue. Not so on PC-BSD. Few years ago I've decided to have a separate dedicated BSD notebook, bought a used ThinkPad W500 and installed a PC-BSD 10.0-RC3 on it - the latest one at that time. A few weeks later, when the 10.0-RELEASE came out, the upgrade utility failed and damaged the filesystem. OK, that was just a release candidate, I understand. I reinstalled it. Then the same happened with 10.0 -> 10.1 upgrade, and with 10.1 -> 10.2 again. Yesterday I had to reinstall it once more, this time for 10.3.

I suppose there is something inherently wrong with the BSD update procedure. May be it makes sense to learn something from Debian methodology. Next time I'm going to try GNU/kFreeBSD instead.

Author:  majenko [ Sun Jun 12, 2016 8:56 pm ]
Post subject:  Re: Building LiteBSD on *BSD

I once started building an entirely APT based FreeBSD distro. It worked really well. I even had a set of scripts that would convert all the pre-built packages to .deb files and install them into a reprepro repository.

As a proof of concept it was brilliant - I just didn't have the resources to actually run the thing (huge number of packages to convert and store), so it kind of died a death.

I still want to do it again some day though...

Author:  ibara [ Sun Jun 12, 2016 9:21 pm ]
Post subject:  Re: Building LiteBSD on *BSD

vak wrote:
Well OK, I can build GCC from sources then. It would be nice to have a prebuild package though. May be a bit newer, like gcc 5.4 or something.

Is LiteBSD c11 (gnu11) clean? gcc-5.4 defaults to that.

vak wrote:
PC-BSD is a friendly GUI desktop built on top of FreeBSD, much like Ubuntu over Debian. Unfortunately, it's not as stable, and the update/upgrade process seems too fragile. Being an active Ubuntu user for 15 years, I've accustomed that I have to install the OS only once, and then I can continuously upgrade it for years, without any issue. Not so on PC-BSD. Few years ago I've decided to have a separate dedicated BSD notebook, bought a used ThinkPad W500 and installed a PC-BSD 10.0-RC3 on it - the latest one at that time. A few weeks later, when the 10.0-RELEASE came out, the upgrade utility failed and damaged the filesystem. OK, that was just a release candidate, I understand. I reinstalled it. Then the same happened with 10.0 -> 10.1 upgrade, and with 10.1 -> 10.2 again. Yesterday I had to reinstall it once more, this time for 10.3.

Yes, I know what PC-BSD is. I know Kris (the founder and lead developer) quite well :)
I know for FreeBSD the upgrade process is something like 2 commands: one for base and one for ports. I don't know what Kris does though for PC-BSD.

vak wrote:
I suppose there is something inherently wrong with the BSD update procedure. May be it makes sense to learn something from Debian methodology. Next time I'm going to try GNU/kFreeBSD instead.

(Remember: don't lump us all together--each of the 4 major BSDs have different upgrade processes. ;) )

Author:  majenko [ Sun Jun 12, 2016 9:25 pm ]
Post subject:  Re: Building LiteBSD on *BSD

PCBSD is "odd". The whole packaging system is kind of weird. I don't know how you can do upgrades with it. What the base system's upgrade system is as well is anyone's guess.

On FreeBSD I use portsnap for upgrading all my ports normally - and of course the base system has its own update program that I have only used a couple of times.

Author:  ibara [ Sun Jun 12, 2016 9:47 pm ]
Post subject:  Re: Building LiteBSD on *BSD

PC-BSD moved away from the old PBI system and now simply uses the FreeBSD pkgng system. You shouldn't be using PBIs anymore. That much I know, because I've talked to Kris about that more than once (it is also what the PC-BSD handbook says).

Author:  majenko [ Sun Jun 12, 2016 9:48 pm ]
Post subject:  Re: Building LiteBSD on *BSD

It's been a while since I last used PC-BSD. I'm glad PBIs are gone.

Author:  ibara [ Sun Jun 12, 2016 9:51 pm ]
Post subject:  Re: Building LiteBSD on *BSD

Back on topic...
I can at least generate *BSD toolchains (FreeBSD/OpenBSD/NetBSD) as long as we have a place to host them.

Author:  majenko [ Sun Jun 12, 2016 9:59 pm ]
Post subject:  Re: Building LiteBSD on *BSD

They can go on here. Well, not here, but on this server...

Author:  ibara [ Mon Jun 13, 2016 5:08 am ]
Post subject:  Re: Building LiteBSD on *BSD

So it looks like FreeBSD/i386 can successfully build LiteBSD.
There are definitely some caveats, and I have patches to the build system to make it happen. I'll push those to an experimental branch on GitHub.
Here's a toolchain, built on FreeBSD 10.3: http://homepages.rpi.edu/~callab3/mips- ... 0.3.tar.gz
It's best to extract it to /usr/local so the LiteBSD build scripts find the toolchain binaries correctly.

Also, here's a build log from FreeBSD. It seems that clang and gcc disagree on some things, but it ultimately doesn't appear to be a showstopper: https://devio.us/~bcallah/freebsd-litebsd-build.log

FreeBSD also insists on building a single terminfo.db instead of individual terminfo entries (but maybe that's an ncurses-6.0 thing?) so I wouldn't worry about the missing terminfo file warnings at the very end during the make fs process. You still have all that info.

Author:  majenko [ Mon Jun 13, 2016 9:11 am ]
Post subject:  Re: Building LiteBSD on *BSD

Is that 64 bit or 32 bit 10.3?

Author:  majenko [ Mon Jun 13, 2016 9:38 am ]
Post subject:  Re: Building LiteBSD on *BSD

Damn, I had forgotten just how fast it is installing FreeBSD. Two VMs installed and configured in about the same time it takes just to boot the Ubuntu installer disk ;)

Author:  ibara [ Mon Jun 13, 2016 1:39 pm ]
Post subject:  Re: Building LiteBSD on *BSD

FreeBSD/i386

Author:  ibara [ Mon Jun 13, 2016 1:57 pm ]
Post subject:  Re: Building LiteBSD on *BSD

Here's a link to the pull request so everyone can see the diff:
https://github.com/sergev/LiteBSD/pull/62

Let's make sure everything still works correctly building on Linux and Mac OS X.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/