Merge the patch to latest -Current.
Integrate lua with uboot
Add build script support for other platforms (not tested, ppc, mips, etc)
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 1634 Build 1640: arc lint + arc unit
Event Timeline
A couple of questions:
Are you planning on importing sys/contrib/lua into vendor somewhere and then copying to sys/contrib/lua and then applying local changes (if any)?
I've looked at a smattering of the makefiles, and they perpetuate the mess. They both include a Makefile.inc
and include a lot of junk inline. Can't we include Makefile.inc for conf, forth and lua unconditionally and move
the conditionals there (as well as the CFLAGS adjustments). This would make the changes mostly the same
for all the Makefiles and cutdown the duplication. I think you can even move the .PATH statements into
these as well.
The MK_FORTH changes seem to be unrelated. Or at least orthogonal and can be done in a commit. That likely
can be done ASAP as well, before lua may be ready.
Is this code in the svn projects/lua-boot branch? If so, I can start to cherry pick stupid things like this
into the base to reduce the diff.
sys/boot/powerpc/ofw/Makefile | ||
---|---|---|
122 | Here, and elsewhere, make MK_FORTH optional. I suspect that would be a better separate change for bisectability. | |
sys/boot/sparc64/loader/Makefile | ||
68 | Why have both BOOT_LUA and MK_LUA? Seems redundant to me. |
I should make the change more readable and clean to submit code review. I think we should do that. And we may want to import latest LUA as well.
I've looked at a smattering of the makefiles, and they perpetuate the mess. They both include a Makefile.inc
and include a lot of junk inline. Can't we include Makefile.inc for conf, forth and lua unconditionally and move
the conditionals there (as well as the CFLAGS adjustments). This would make the changes mostly the same
for all the Makefiles and cutdown the duplication. I think you can even move the .PATH statements into
these as well.
I agree. I didn't do big change. My main goal for last two days is getting this change from projects/lua-bootloader branch to HEAD,
and make it build. this is result.
my mainly change besides the change in that branch:
- Some Makefile change to make it build, some recent change in boot break diff.
- Create a folder called conf to put loader.rc as shared between FORTH and LUA
- Make uboot/arm work with LUA
The MK_FORTH changes seem to be unrelated. Or at least orthogonal and can be done in a commit. That likely
can be done ASAP as well, before lua may be ready.Is this code in the svn projects/lua-boot branch? If so, I can start to cherry pick stupid things like this
into the base to reduce the diff.
yes. it is. Feel free to go ahead.
Some additional notes when I work on this:
- missing features, like ACPI, PCI stuffs are interesting for PNP support are missing in LUA. loader only exposed a very small set of functions to lua.
- LUA needs float support, which is pretty painful for ARM. i looked at a LUA fork called eLUA, which has feature to disable float at all. Need more time to dig it out.
- LUA needs float support, which is pretty painful for ARM. i looked at a LUA fork called eLUA, which has feature to disable float at all. Need more time to dig it out.
How much float? I know a really good soft-float library that we can easily integrate, I think. It should only be an issue, however, for armv4/5 systems. But it will also be an issue for MIPS, so we need a unified plan.
LUA don't have type of INT or FLOAT. Instead, it uses Number as universe type for both float and int. Internally, it support use float, double and long double to represent number, which I don't think it is good design. So if we want have LUA, we either use a soft float or we need hack quite a bit code to work around. I would prefer integrate a soft-float lib. what's the license of the lib you mentioned?
sys/boot/sparc64/loader/Makefile | ||
---|---|---|
68 | BOOT_LUA is just a code #define. It probably doesn't need to be set in the Makefile. |