6701 add installboot to i386 platform (loader project)

Review Request #161 — Created March 1, 2016 and submitted

tsoome
illumos-gate
6701
general

6701 add installboot to i386 platform (loader project)



  • 0
  • 0
  • 5
  • 1
  • 6
Description From Last Updated
yuripv
  1. Before looking at the actual code, is the difference between i386 and sparc code really that big that you now have two installboot.c?

    1. Even if actually both loader installboot and grub installgrub are both based on sparc installboot, there platform differences are quite large - starting from partition handling (MBR+VTOC/MBR logical partitions+VTOC/GPT) ending with stage1 management, bootblock on sparc is split, handle the bootblock locations in case of zfs/ufs/pcfs on different partitioning schemes, I just felt a lot safer to have separate copy. I guess it is possible to merge the installboot.[ch] into one file, but the result will be preprocessor #if #else #endif spaghetti and im not sure if the result will be worth it. Also consider if we have single source and need to update, the result has to be tested on both platforms or we have really unhappy sparc people... I think, it is better to keep separation here.

    2. I'm not talking about one installboot.[ch], but there are surely a lot of duplicate code, which could live in common/something.[ch].

    3. Ah i see. Well, I did trivial check with vim -d, and it was not too promising really. Actually even thinking about it - current sparc installboot is only supporting VTOC, just splitting bootblk at 7.5k and writing it down to two location - there really is not too much to share.

  2. 
      
yuripv
  1. I've converted the man page - http://www.xvoid.org/illumos/stuff/installboot.1m, let's not add any more ugliness to the gate. Please use the format of commands in SYNOPSIS for usage messages, making arguments look like <arg>, eg, <raw-device>.

    1. oh, great stuff, many thanks! I updated this review request accordingly. However, something got confused, browsing diff 1 to 2 is broken, at least full diff from 0 to 2 seems to be correct. Just in case I did set up webrev as well at http://cr.illumos.org/~webrev/tsoome/6701/ Guess I need to poke LeftWing a bit.

  2. 
      
tsoome
richlowe
  1. 
      
  2. use C99_ENABLE and such.

  3. Is this a false positive? Even if it is, I'd rather see it "fixed" than the warning gagged.

    1. The code in usr/src/cmd/boot/common will get warnings without it. Would need separate issue, I guess.

    2. going to be fixed in 7242

  4. Just include this directly, instead, if you don't need your own Makefile.targ

  5. same comment re: C99_ENABLE and such.

  6. explicit != NULL again.

  7. usr/src/man/man1m/installboot.1m (Diff revision 2)
     
     

    That doesn't look like what -F does?

    1. The sparc and x86 have different meanings for -F, inherited from installgrub as I wrote installboot based on installgrub source. This is not ideal choise, but...

  8. 
      
tsoome
tsoome
tsoome
tsoome
richlowe
  1. Ship It!
  2. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...