On Wed, 10 Jun 2009 15:49:14 -0700 Santwona.Behera at Sun.COM wrote: > As part of the debug process of a new hardware, a Sun partner is trying > to change the source code in the Opensolaris kernel and building the > kernel at their site on an x86 system. They are running into some > issues. Can anyone who has experience in building a debug kernel please > help? > > ===================================================================== > > According to the SUN documentation for creating the OpenSolaris kernel > I did the following steps: > > 1 My home directory is : /export/home/testws > > 2 Installation of source tree: /export/home/testws/usr/src/uts ... > > 3 Installation of compiler (SUNWspro) and on-closed-bins-nd.i386.tar .. done > > 4 Setting up build environment as: > > PATH=/opt/SUNWspro/bin:/opt/onbld/bin:/usr/sbin:/usr/bin:/usr/openwin/bin > export PATH > SRC=/export/home/testws/usr/src > export SRC > > bldenv ./opensolaris.sh > > says: > > Build type is non-DEBUG > RELEASE is > VERSION is home/testws > RELEASE_DATE is > > The top-level 'setup' target is available to build headers and tools. > > Using /sbin/sh as shell. > > ... this seems to be ok ... > > 5 HERE THE KERNEL COMPILATION BEGINS: > > uname -a > SunOS tv889 5.11 snv_112 i86pc i386 i86pc > > cd /export/home/testws/usr/src/uts/i86pc > make all -> ok finishes
The kernel consists of more than just a build of i86pc or intel or sun4u or sun4v. What you need to do is build in $SRC/uts $ cd $SRC $ dmake setup $ cd $SRC/uts $ dmake install > 6 Install -k i86pc -G my-kernel > > First problem ???? : > > cp: cannot access > /export/home/testws/usr/src/uts/intel/ncall/debug64/ncall > can't create > /tmp/Install.root/i86pc/platform/i86pc/my-kernel/drv/amd64/ncall > > Question: how to solve this ... ? You haven't built everything that you need. See above > ... may ignore the problem since a subdirectory has been created in: > /tmp/Install.root/i86pc/platform/i86pc/my-kernel/ > > 7 cd / > > tar xf /tmp/Install.root/Install.i86pc.tar > > Second problem ???? : > > Install did not create a tar - ball as assumed but a directory !? That's because you used the extract command option, not the create command option. man tar(1) $ cd /tmp/Install.root $ tar cf /var/tmp/glomkernel.tar * note the differences! > 8 I manually added an entry to the /boot/grub/menu.lst : > > #---------------------------------------------------- > title Solaris Express Community Edition snv_112 X86 TEST > findroot (rootfs0,0,a) > kernel$ /platform/my-kernel/kernel/$ISADIR/unix > module$ /platform/my-kernel/$ISADIR/boot_archive > #---------------------------------------------------- > > Q: what has to be done to be able to boot from the > menu.lst entry above beginning at step 7 above ? > > Q: How do I create the corresponding boot_archive file for the > new kernel (bootadm ...) ? > . > . > . > > additionally to my previous mail I got the following problem when I try > to reboot from a new kernel (menu.lst entry), which is referred as : > > Bug#: 2789 (Michal Vranek) > > Reboot into the new boot environment. > -- After selecting opensolaris-1 entry from GRUB menu a module > loading > problem appears: > krtld: bind_primary(): no relocation information found for module > /platform/i86pc/kernel/amd64/unix > krtld: error during initial load/link phase > > This happens in case of having a boot_archive build with bootadm command > .... > > The "no relocation" - message applies to my new kernel . > Do I need a patch for this .... ? No, no patch required. You've missed a few steps, which means that you don't have a bootable kernel. Please see above for how to make a bootable kernel. James C. McPherson -- Senior Kernel Software Engineer, Solaris Sun Microsystems http://blogs.sun.com/jmcp http://www.jmcp.homeunix.com/blog Kernel Conference Australia - http://au.sun.com/sunnews/events/2009/kernel
