<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kmi/scripts/makefile, branch master</title>
<subtitle>ACTIVE - Kernel with migrating threads as IPC</subtitle>
<id>https://metanimi.dy.fi/cgit/kmi/atom?h=master</id>
<link rel='self' href='https://metanimi.dy.fi/cgit/kmi/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/'/>
<updated>2024-07-17T19:02:47Z</updated>
<entry>
<title>make tests a bit more sensible</title>
<updated>2024-07-17T19:02:47Z</updated>
<author>
<name>Kimplul</name>
<email>kimi.h.kuparinen@gmail.com</email>
</author>
<published>2024-07-17T19:02:47Z</published>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/commit/?id=1a0d61b33c2365cf413bf584289058d0d9097377'/>
<id>urn:sha1:1a0d61b33c2365cf413bf584289058d0d9097377</id>
<content type='text'>
+ At least by my standards. Some amount of scripting going on, but
  should still be fine.

  Effectively, source.mk contains information to build the test,
  check.mk checks the generated log from running the test. As a results,
  check.mk should output OK into reports/$TEST/OK if everything went
  well, and anything else otherwise. The user can then look at
  reports/$TEST/log to see what went wrong.

  I expect to add some more features, such as starting QEMU with gdb and
  running a single test a bit easier than right now (same limitation as
  in the top level makefile, i.e. you have to specify

	make -f scripts/makefile $TEST

  from within `tests` and you must have ran `make check` at that point
  so that `tests.mk` is fully generated. Not huge issues, but slightly
  annoying, somewhat unsure how to work around them properly but we'll
  see.
</content>
</entry>
<entry>
<title>make compilation more robust on *BSD</title>
<updated>2024-07-17T16:29:37Z</updated>
<author>
<name>Kimplul</name>
<email>kimi.h.kuparinen@gmail.com</email>
</author>
<published>2024-07-17T16:29:37Z</published>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/commit/?id=be82edec47b20164c0e8a9917fa2c9b8b9999fdf'/>
<id>urn:sha1:be82edec47b20164c0e8a9917fa2c9b8b9999fdf</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix LLVM</title>
<updated>2024-07-08T15:04:03Z</updated>
<author>
<name>Kimplul</name>
<email>kimi.h.kuparinen@gmail.com</email>
</author>
<published>2024-07-08T14:43:59Z</published>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/commit/?id=e134202611a50b358c147c92bfb8a7f443030b8b'/>
<id>urn:sha1:e134202611a50b358c147c92bfb8a7f443030b8b</id>
<content type='text'>
+ Anything extern is right out as LLVM doesn't produce correct code for
  them. Maybe if I added some extra attributes but I'm skeptical.
  Replaced with static variables and getters/setters.

+ Inline ASM is apparently a bit buggy, so use an assembly stub when jumping to init.

+ Minimize work done in main() to minimize chance of LLVM doing something silly.
  Still not 100% certain that I shouldn't just write the main() as an assembly stub
  in arch/riscv64 to be absolutely sure everything works as intended.

+ Make .kernel.start section SHF_ALLOC, otherwise lld complains about
  pc-relative addressing

Probably some other stuff as well that I'm forgetting right now. But at least with
LLVM14 LTO seems to work, which is pretty cool?
</content>
</entry>
<entry>
<title>allow booting with Qemu's -kernel flag directly</title>
<updated>2024-07-05T16:38:11Z</updated>
<author>
<name>Kimplul</name>
<email>kimi.h.kuparinen@gmail.com</email>
</author>
<published>2024-07-05T16:38:11Z</published>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/commit/?id=e09edb5d54e39bd9509a1dc450df5ab320759f97'/>
<id>urn:sha1:e09edb5d54e39bd9509a1dc450df5ab320759f97</id>
<content type='text'>
+ Took some fairly significant changes, for one the kernel is no longer
  relocated at the start of a boot, instead it sits wherever the user
  decides the kernel should sit. Similarly, the initial kernel stack and
  page table are stored within the binary, slightly bloating the size
  but making it much safer to boot since there's really no chance of us
  overwriting the fdt or initrd in memory.
</content>
</entry>
<entry>
<title>fix some small build issues</title>
<updated>2024-07-04T21:03:59Z</updated>
<author>
<name>Kimplul</name>
<email>kimi.h.kuparinen@gmail.com</email>
</author>
<published>2024-07-04T21:02:53Z</published>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/commit/?id=98f21e694a6b0964d6d08196cb6bfbc1c2ae2ff4'/>
<id>urn:sha1:98f21e694a6b0964d6d08196cb6bfbc1c2ae2ff4</id>
<content type='text'>
+ Compiling for size emits memcpy() calls after they've already been
  removed by LTO, so add __used attribute to counteract this.

  Newer versions of GCC seem to prefer `-flto=auto` to just `-flto`, so
  use that.

  printf format %d -&gt; %ld
</content>
</entry>
<entry>
<title>split makefile into two parts</title>
<updated>2023-07-24T16:26:07Z</updated>
<author>
<name>Kimplul</name>
<email>kimi.h.kuparinen@gmail.com</email>
</author>
<published>2023-07-24T16:23:50Z</published>
<link rel='alternate' type='text/html' href='https://metanimi.dy.fi/cgit/kmi/commit/?id=fdfdd03e3341d3b7d5e6a22a11a755a2c56eda1b'/>
<id>urn:sha1:fdfdd03e3341d3b7d5e6a22a11a755a2c56eda1b</id>
<content type='text'>
+ First part generates deps.mk, second part reads it.
  Allows us to use both bmake and gmake with the same makefiles.
  Only drawback seems to be that the first makefile considers all
  individual files as 'finished' targets, meaning that it's more
  difficult to do something like

  make kernel.elf

  though I haven't found this to be an issue.
</content>
</entry>
</feed>
