Giter VIP home page Giter VIP logo

xnu's People

Contributors

akemin-dayo avatar b-man avatar sfan5 avatar steventroughtonsmith avatar tearsofphoenix avatar winocm avatar x56 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xnu's Issues

'Giant' list of current issues

Currently, the kernel seems to suck and not suck a lot.

Current issues are:

  • pmap is bad (I'm working on fixing this.)
  • etimer doesn't have a real sense of time, it runs too fast.
  • nothing is synchronized properly.
  • the abort handlers need to handle more cases (like the real iOS kernel) including user faults. The same thing goes for sleh_undef.
  • forking causes the kernel to die.
  • weird weird race conditions need to be fixed.
  • 4.3.5 dyld has issues with vfs, random files appear to be read as null bytes.

If you find anything else, put it in this list and hopefully we can get it fixed.

OS X: bcopyinout.s immediate expression requires a # prefix

I'm on OS X 10.11.6 beta with Xcode 7.3.1 (not beta, App Store version). Upon compiling XNU, I get the following:

> cd xnu; make TARGET_CONFIGS="debug arm armpba8" NO_DTRACE_SYMS=YES; cd ..
/Users/me/Projects/DarwinARM/Work/xnu/osfmk/arm/bcopyinout.s:67:immediate expression requires a # prefix -- `str r12,[r10,TH_RECOVER]'
/Users/me/Projects/DarwinARM/Work/xnu/osfmk/arm/bcopyinout.s:70:immediate expression requires a # prefix -- `str r11,[r10,TH_RECOVER]'
/Users/me/Projects/DarwinARM/Work/xnu/osfmk/arm/bcopyinout.s:76:immediate expression requires a # prefix -- `str r11,[r10,TH_RECOVER]'
/Users/me/Projects/DarwinARM/Work/xnu/osfmk/arm/bcopyinout.s:486:immediate expression requires a # prefix -- `ldr r11,[r10,TH_RECOVER]'
/Users/me/Projects/DarwinARM/Work/xnu/osfmk/arm/bcopyinout.s:487:immediate expression requires a # prefix -- `str r12,[r10,TH_RECOVER]'
/Users/me/Projects/DarwinARM/Work/xnu/osfmk/arm/bcopyinout.s:490:immediate expression requires a # prefix -- `str r11,[r10,TH_RECOVER]'
/Users/me/Projects/DarwinARM/Work/xnu/osfmk/arm/bcopyinout.s:496:immediate expression requires a # prefix -- `str r11,[r10,TH_RECOVER]'
/Users/me/Projects/DarwinARM/Work/xnu/osfmk/arm/bcopyinout.s:950:immediate expression requires a # prefix -- `str r5,[r4,TH_RECOVER]'
/Users/me/Projects/DarwinARM/Work/xnu/osfmk/arm/bcopyinout.s:960:immediate expression requires a # prefix -- `str r0,[r4,TH_RECOVER]'
/Users/me/Projects/DarwinARM/Work/xnu/osfmk/arm/bcopyinout.s:991:immediate expression requires a # prefix -- `str r5,[r4,TH_RECOVER]'
/Users/me/Projects/DarwinARM/Work/xnu/osfmk/arm/bcopyinout.s:1001:immediate expression requires a # prefix -- `str r0,[r4,TH_RECOVER]'
/Users/me/Projects/DarwinARM/Work/xnu/osfmk/arm/bcopyinout.s:1016:immediate expression requires a # prefix -- `str r1,[r4,TH_RECOVER]'
/Users/me/Projects/DarwinARM/Work/xnu/osfmk/arm/bcopyinout.s:1061:immediate expression requires a # prefix -- `ldr r4,[r12,TH_RECOVER]'
/Users/me/Projects/DarwinARM/Work/xnu/osfmk/arm/bcopyinout.s:1062:immediate expression requires a # prefix -- `str r3,[r12,TH_RECOVER]'
clang: error: assembler command failed with exit code 1 (use -v to see invocation)
make[6]: *** [bcopyinout.o] Error 1
make[5]: *** [build_all] Error 2
make[4]: *** [do_all] Error 2
make[3]: *** [build_all] Error 2
make[2]: *** [build_all_conf] Error 2
make[1]: *** [build_all_osfmk] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [all] Error 2

I have also tried changing TARGET_CONFIGS="debug arm armpba8" to TARGET_CONFIGS="debug arm s5l8930x" with no avail.

Is this a bug, or did I miss steps while setting up?

Cant build xnu du to multiple errors(expected register, soft-float-abi)

clang: error: assembler command failed with exit code 1 (use -v to see invocation)
Makefile:1475: recipe for target 'bcopyinout.o' failed
make[6]: *** [bcopyinout.o] Error 1
make[6]: *** Waiting for unfinished jobs....
'+soft-float-abi' is not a recognized feature for this target (ignoring feature)
/home/castelo/Projekte/DarwinARM/xnu/osfmk/arm/cswitch.s:46:19: error: register expected
ldr sp, [r12, TH_PCB_ISS]
^
/home/castelo/Projekte/DarwinARM/xnu/osfmk/arm/cswitch.s:73:20: error: register expected
strne r1, [r0', TH_+soft-float-abi' is not a recognized feature for this targetCO (ignoring feature)
NTINUATION]
^
/home/castelo/Projekte/DarwinARM/xnu/osfmk/arm/cswitch.s:76:20: error: register expected
ldreq r3, [r0, TH_PCB_make[3]: Nothing to be done for 'do_build_all'.
make[3]: Leaving directory '/home/castelo/Projekte/DarwinARM/xnu/BUILD/obj/DEBUG_ARM_ARMPBA8/security'
make[2]: Leaving directory '/home/castelo/Projekte/DarwinARM/xnu/BUILD/obj/DEBUG_ARM_ARMPBA8/security'
ISS]
/home/castelo/Projekte/DarwinARM/xnu/osfmk/arm/hw_lock.s^
:69:19: error: register expected
ldr r2, [r12, MACHINE_THREAD_PREEMPT_COUNT] ; adds r2, r2, #1 ; str r2, [/home/castelo/Projekte/DarwinARM/xnu/osfmk/arm/cswitch.sr:1872:,18 : MACerror: HINregister expectedE
_T HR E A Dl_dPrR ErE3M,P T[_rC2O,U NMTA]C H;I
NE _ T H R E A D _ C T H R E A D _ S^E
LF/home/castelo/Projekte/DarwinARM/xnu/osfmk/arm/hw_lock.s:69:83: error: register expected
ldr r2, [r12, MACHI]
^
/home/castelo/Projekte/DarwinARM/xnu/osfmk/arm/cswitch.s:91:18: error: register expected
ldr r3, [r2, TH_PCB_ISS]
NE_THREAD_PREEMPT ^
/home/castelo/Projekte/DarwinARM/xnu/osfmk/arm/cswitch.s:118:18: error: register expected
_COUNT] ; adds r2, r2, #1 ; str r2, [r12, MACHINE_THREAD_PREEMPT_COUNT] ;
ldr r1, [r0, MA ^
/home/castelo/Projekte/DarwinARM/xnu/osfmk/arm/hw_lock.s:111:19: error: register expected
ldr r2, [r1CHINE_THREAD_CTHREAD_SELF]
^
/home/castelo/Projekte/DarwinARM/xnu/osfmk/arm/cswitch.s:122:18: error: register expected
ldr r3, [r0, TH_PCB_ISS]
^
/home/castelo/Projekte/DarwinARM/xnu/osfmk/arm/cswitch.s:135:19: error: register expected
ldr r4, [r12, MACHINE_THREAD_PREEMPT_COUNT] ; adds r2, r2, #1 ; str r2, [r12, MACHINE_2, TH_PCB_USS]
THREAD_PREEMPT_COUNT] ; ^
/home/castelo/Projekte/DarwinARM/xnu/osfmk/arm/cswitch.s:153:
^
/home/castelo/Projekte/DarwinARM/xnu/osfmk/arm/hw_lock.s:111:83: error: register expected
19: error: register expected
ldr r8, ldr r2, [r12, MACHINE_THREAD_PREEM[r12, MACHINE_THREAD_CPPT_COUNT] ; adds r2, r2, #1 ; str r2, [r12, MAU_DATA]
^
/home/castelo/Projekte/DarwinARM/xnu/osfmk/arm/cswitch.s:154:18: error: register expected
ldr r5, [CHINE_THREAD_PREEMPT_COUNT] ;
r8, CPU_PENDING_AST]
^
/home/castelo/Projekte/DarwinARM/xnu/osfmk/arm/cswitch.s:170:19: error: register expected
ldr sp, [r12, TH_PC ^
/home/castelo/Projekte/DarwinARM/xnu/osfmk/arm/hw_lock.s:125:19: error: register expected
ldr r2, [r12, MACHINEB_USS]
^
_THREAD_PREEMPT_COUNT] ; adds r2, r2, #1 ; str r2, [r12, MACHINE_THREAD_PREEMPT_COUNT] ;
^
/home/castelo/Projekte/DarwinARM/xnu/osfmk/arm/hw_lock.s:125:83: error: register expected
ldr r2, [r12, MACHINE_THREAD_PREEMPT_COUNT] ; adds r2, r2, #1 ; str r2, [r12, MACHINE_THREAD_PREEMPT_COUNT] ;
^
/home/castelo/Projekte/DarwinARM/xnu/osfmk/arm/hw_lock.s:386:19: error: register expected
ldr r2, [r12, MACHINE_THREAD_PREEMPT_COUNT] ; adds r2, r2, #1 ; str r2, [r12, MACHINE_THREAD_PREEMPT_COUNT] ;
^
/home/castelo/Projekte/DarwinARM/xnu/osfmk/arm/hw_lock.s:386:83: error: register expected
ldr r2, [r12, MACHINE_THREAD_PREEMPT_COUNT] ; adds r2, r2, #1 ; str r2, [r12, MACHINE_THREAD_PREEMPT_COUNT] ;
^
/home/castelo/Projekte/DarwinARM/xnu/osfmk/arm/hw_lock.s:440:19: error: register expected
ldr r2, [r12, MACHINE_THREAD_PREEMPT_COUNT] ; adds r2, r2, #1 ; str r2, [r12, MACHINE_THREAD_PREEMPT_COUNT] ;
^
/home/castelo/Projekte/DarwinARM/xnu/osfmk/arm/hw_lock.s:440:83: error: register expected
ldr r2, [r12, MACHINE_THREAD_PREEMPT_COUNT] ; adds r2, r2, #1 ; str r2, [r12, MACHINE_THREAD_PREEMPT_COUNT] ;
^
/home/castelo/Projekte/DarwinARM/xnu/osfmk/arm/hw_lock.s:502:19: error: register expected
ldr r2, [r12, MACHINE_THREAD_PREEMPT_COUNT] ; adds r2, r2, #1 ; str r2, [r12, MACHINE_THREAD_PREEMPT_COUNT] ;
^
/home/castelo/Projekte/DarwinARM/xnu/osfmk/arm/hw_lock.s:502:83: error: register expected
ldr r2, [r12, MACHINE_THREAD_PREEMPT_COUNT] ; adds r2, r2, #1 ; str r2, [r12, MACHINE_THREAD_PREEMPT_COUNT] ;
^
/home/castelo/Projekte/DarwinARM/xnu/osfmk/arm/hw_lock.s:657:18: error: register expected
ldr r2, [r9, MACHINE_THREAD_PREEMPT_COUNT] ; adds r2, r2, #1 ; str r2, [r9, MACHINE_THREAD_PREEMPT_COUNT] ;
^
/home/castelo/Projekte/DarwinARM/xnu/osfmk/arm/hw_lock.s:657:81: error: register expected
ldr r2, [r9, MACHINE_THREAD_PREEMPT_COUNT] ; adds r2, r2, #1 ; str r2, [r9, MACHINE_THREAD_PREEMPT_COUNT] ;
^
Makefile:1490: recipe for target 'cswitch.o' failed
make[6]: *** [cswitch.o] Error 1
Makefile:1505: recipe for target 'hw_lock.o' failed
make[6]: *** [hw_lock.o] Error 1

cann't boot

hi,all:
i use the newest version in repo to boot up, and there is some problem:

  1. it's a kernel pain after startup, and i comment out OSKextRemoveKextBootstrap() , ok there error is gone
  2. but use the ramdisk on repo, i cann't boot to the login shell. after some debug, because lanuchd always has problem, and call sleh_undef.

anybody, could help me?

BTW: https://www.dropbox.com/s/j5id402t2er59vh/ramdisk_new.dmg?dl=0, this ramdisk is 404,could somebody share a copy?

iPhone 3GS and iPod Touch 4G fails to boot with ramdisk

I have an issue and several questions with this kernel. My issue is that my iPod Touch and iPhone 3GS hangs at "AppleARMIO::start: Publishing device tree entries to IOService plane"I have tried passing the boot arguments "kextlog=0xffffffff io=0xffff" and it gets passed this point but kernel panics. My current boot arguments are "-no-cache rd=md0 debug=0x14e -v serial=3". One of my questions is can you upload this image to an iPhone with arch Linux instead of redsn0w. Secondly is it possible to load your kernel through openiboot command line. thanks
img_0742

Compiling error

xnu/osfmk/i386/genassym.c:441:26: error: no member named
'cpu_hi_iss' in 'struct cpu_data'
offsetof(cpu_data_t *, cpu_hi_iss));
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~

getting this ^ while trying to run "make" (Mac OS Mountain Lion)

OSX-on-arm

Hello, I would like to ask if this could be possible:

Could be possible to run OSX on an arm device??
Understand some problems such as that all the closed source software is compiled for different cpu architecture but I was thinking we could implement a qemu based module in the kernel to do cpu virtualisation.

Also we could write the drivers for graphics, sound etc!!!

Could it be possible???

How to start!

Hello!!
I would really like to contribute to this project but I have no such knowledge!!! Please could you please provide me with some books to study and learn???

Thank you very much in advance!!!

Undefined symbols for architecture armv7?

I didn't encounter these errors on earlier versions:
...
Undefined symbols for architecture armv7:
"___divsi3189", referenced from:
IOService::notifyControllingDriverDone() in IOServicePM.cpo
"__udivsi3190", referenced from:
IOService::tellClientsWithResponse(int) in IOServicePM.cpo
"udivsi3281", referenced from:
IOPMrootDomain::sysPowerDownHandler(void
, void
, unsigned long, IOService
, void
, unsigned int) in IOPMrootDomain.cpo
"___udivsi3282", referenced from:
IOPMrootDomain::handleAggressivesRequests() in IOPMrootDomain.cpo
"___udivsi3283", referenced from:
IOPMrootDomain::handleAggressivesRequests() in IOPMrootDomain.cpo
"__udivsi3284", referenced from:
IOPMrootDomain::getAggressiveness(unsigned long, unsigned long
) in IOPMrootDomain.cpo
"__udivsi362", referenced from:
IOGeneralMemoryDescriptor::dmaCommandOperation(unsigned long, void
, unsigned int) const in IOMemoryDescriptor.cpo
"___udivsi363", referenced from:
IOGeneralMemoryDescriptor::wireVirtual(IODirection) in IOMemoryDescriptor.cpo
"___udivsi364", referenced from:
IOGeneralMemoryDescriptor::complete(IODirection) in IOMemoryDescriptor.cpo
"___udivsi392", referenced from:
_hibernate_write_image in IOHibernateIO.cpo
"_udivsi394", referenced from:
ProgressUpdate(hibernate_graphics_t
, unsigned char
, int, int) in IOHibernateIO.cpo
"___udivsi395", referenced from:
_hibernate_machine_init in IOHibernateIO.cpo
"_umodsi310", referenced from:
OSSymbolPool::removeSymbol(OSSymbol
) in OSSymbol.cpo
"umodsi39", referenced from:
OSSymbolPool::findSymbol(char const
) const in OSSymbol.cpo
"memcpy2", referenced from:
IODataQueue::setNotificationPort(ipc_port
) in IODataQueue.cpo
"memcpy417", referenced from:
OSKext::getKmodInfo(kmod_info
, unsigned int
) in OSKext.cpo
"memcpy91", referenced from:
IOHibernateSystemSleep in IOHibernateIO.cpo
"memset13", referenced from:
IOMemoryCursor::genPhysicalSegments(IOMemoryDescriptor
, unsigned long, void
, unsigned long, unsigned long, unsigned long
) in IOMemoryCursor.cpo
"memset188", referenced from:
IOService::addPowerChild(IOService
) in IOServicePM.cpo
"memset93", referenced from:
ProgressUpdate(hibernate_graphics_t
, unsigned char
, int, int) in IOHibernateIO.cpo
ld: symbol(s) not found for architecture armv7
...
I am trying to compile it for S5L8930 (Apple A4). I have Xcode 6.0.1 installed.

Raspberry Pi 3b Support?

This Darwin ARM Build Supports Raspberry Pi 3b?

because I'm working on a project to port darwin and other components like X11 to build a Custom Darwin system for my use and my test target and a raspberry pi 3b board

Debug XNU in Linux, how?

@b-man Hi!
How did you debug the kernel on Linux? noticed that dSYM creation is prohibited in your build system... is it really impossible to use them in Linux? I tried to enable them, but LLDB for some reason refuses to see the source files (source list), even though the "__DWARF" sections are quite visible in the "image dump" listing

Open-source bootloader needs to be made

XNU on ARM needs a custom bootloader. Optimally this bootloader will map the kernel into the beginning of DRAM so that the virtual sections specified in the Mach-O file match what's in memory, as in:

0x80001000 (__TEXT) -> 0x40001000 (__TEXT in physical RAM)

This bootloader will follow the "boot_args_t" structure defined in pexpert/pexpert/arm/boot.h. The deviceTreeP member needs to contain the flattened device tree's virtual address.

The device tree's memory-map member should also contain the ranges of the RAMDisk for rooting if necessary.

VirtBase should be 0x80000000 and physBase should be the beginning of eDRAM on the target board. This is because the entire kernel is section mapped linearly.

Kernel entry should be done with MMU off for the most part.

The device-tree compatible member for the root node should also include "AppleARM" so that the IOKit platform expert driver can match configuration. Look at "iokit/KernelConfigTables.cpp" for more information.

TopOfKernelData should be page aligned. It is the end of all kernel data entered by the bootloader; this includes kernel, devicetree and ramdisk.

fatal error: 'stdio.h' file not found

First off, I am running on a Macbook with Xcode 6 Beta 3 installed if that matters. When executing the 'make' command, I run into one main issue. It begins to run into errors and one of the main errors that I run into is one that is talking about the stdio.h file. The others are in this screenshot:
screen shot 2014-07-15 at 4 13 56 pm

Kernel not start

Compiled a uImage image from the wiki, from the "master" branch. GenericBooter starts but the kernel does not load (it says that ramDisk and the kernel is loaded at such and such addresses, and that's all ...) Build for "armpba8", launched in qemu. libraries and crosscompiler took the same ones that were indicated in the Wiki. Without specific kext's, the kernel seems to have to show at least some signs of life? how do you debug the kernel?

Can't boot with u-boot on Raspberry Pi 3 (arm64)

I compiled XNU and U-BOOT for raspberry pi 3,
but when I run the command >fatload mmc 0 0x84000000 /uImage
he say:

reading /uImage
"Synchronous Abort" handler, esr 0x96000045
ERL: 3b370440
LR: 3Bb370440
x0: 0000000056190527 x1: 0000000000000020
x2: 000000003b370928 x3: 000000003b370a68
x4: 000000003af488f0 x5: 000000000000000d
x6: ....
Resetting CPU

And when I run this command

fatload mmc 0 0x0000800 /uImage

with

setenv

and

bootm

he said:

"## Booting kernel from Legacy Image at 00000800 ..."
Image Name: GenericBooter
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 35087584 Bytes = 33,5 MiB
Load address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
Starting Kernel ...
And he said :
"Synchronous Abort" handler, esr 0x02000000
ERL: 8004
LR: 3B34edf0
x0: 0000000000000000 x1: 0000000000000000
x2: 0000000000000000 x3: 0000000000000000
x4: 0000000000000000 x5: 0000000000000000
x6: .....
Resetting CPU
Resetting ....
Anyone can help me please ?

Missing ARMv7 architecture in file libclang_rt.cc_kext.a

I'm having this compiling error:

LD mach_kernel.sys
ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/lib/darwin/libclang_rt.cc_kext.a, missing required architecture armv7 in file /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/lib/darwin/libclang_rt.cc_kext.a (3 slices)
ld: no supported runtime hi16 relocation in ___cxx_global_var_init from /Users/mac/xnu/xnu-arm/BUILD/obj//DEBUG_ARM_OMAP3530/libkern/DEBUG/OSDebug.cpo to ___stack_chk_guard for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [/Users/mac/xnu/xnu-arm/BUILD/obj/DEBUG_ARM_OMAP3530/./mach_kernel] Error 1
make[1]: *** [build_all] Error 2
make: *** [all] Error 2

[Debian] Compiler bug: genassym.c -> assym.S

I have a this problem on debian:
when i compile the assym.S is totally empty.
looks like the compiler removes the macro when it expands it.
file: https://github.com/darwin-on-arm/xnu/blob/master/osfmk/arm/genassym.c#L111

#define DECLARE(SYM,VAL) \
    __asm("#DEFINITION##define " SYM "\t%0" : : "n" ((u_int)(VAL)))
#endif

i fixed it in this way:
on that file it becomes:

#define DECLARE(SYM,VAL) \
    __asm(".file \"#DEFINITION##define " SYM "       %0####\"" : : "n" ((u_int)(VAL)))
#endif

and i changed the makefile template:
File: https://github.com/darwin-on-arm/xnu/blob/master/osfmk/conf/Makefile.template#L123

$(_v)sed -e '/#DEFINITION#/!d' -e 's/^.*#DEFINITION#//' -e 's/\$$//' -e 'p' -e 's/#//2' -e 's/[^A-Za-z0-9_]*\([A-Za-z0-9_]*\)/ \1_NUM/2' genassym.o > ${@}

to

$(_v)sed -e '/.file\s*\"#DEFINITION#/!d' -e 's/^.*#DEFINITION#//' -e 's/####\"//' -e 's/\$$//' -e 'p' -e 's/#//2' -e 's/[^A-Za-z0-9_]*\([A-Za-z0-9_]*\)/ \1_NUM/2' genassym.o > ${@}

Anybody knows a better why to fix this?

xnu can't find c library

This is strange. I can compile the xnu from open source apple site.
But I can't compile the xnu from winocm.

I am compiling winocm-xnu in x86_64, with Xcode 5.0.2, Mavericks,
make TARGET_CONFIGS="debug arm OMAP3530"

In file included from
/Developer/xnu/xnu/xnu//SETUP//config/externs.c:26:
/Developer/xnu/xnu/xnu//SETUP//config/config.h:57:10: fatal error: 'stdio.h' file not found
/Developer/xnu/xnu/xnu//SETUP//decomment/decomment.c:31:10: fatal error: 'stdio.h' file not found
/Developer/xnu/xnu/xnu//SETUP//kextsymboltool/kextsymboltool.c:24:10: fatal error: 'stdio.h' file not
found
/Developer/xnu/xnu/xnu//SETUP//config/openp.c:53:10: fatal error: 'stdio.h' file not found
/Developer/xnu/xnu/xnu//SETUP//setsegname/setsegname.c:24:10: fatal error: 'libc.h' file not found
/Developer/xnu/xnu/xnu//SETUP//md/md.c:76:10: fatal error: 'sys/types.h' file not found

include <sys/types.h>

     ^

include <stdio.h>

     ^

include <stdio.h>#include <stdio.h>

     ^

     ^

include <stdio.h>

     ^

include <libc.h>

     ^

In file included from /Developer/xnu/xnu/xnu//SETUP//config/mkswapconf.c:56:
/Developer/xnu/xnu/xnu//SETUP//config/config.h:57:10: fatal error: 'stdio.h' file not found

include <stdio.h>

     ^

1 error1 error generated.
generated.

can't find C library

I can't compile xnu on Mavericks, Xcode 5.0.2. But I can compile the xnu from Apple Open Source just perfectly fine.

For some wired reason winocm-xnu can't find the C library.

/Developer/xnu/xnu/xnu//SETUP//config/externs.c:26:
/Developer/xnu/xnu/xnu//SETUP//config/config.h:57:10: fatal error: 'stdio.h' file not found
/Developer/xnu/xnu/xnu//SETUP//decomment/decomment.c:31:10: fatal error: 'stdio.h' file not found
/Developer/xnu/xnu/xnu//SETUP//kextsymboltool/kextsymboltool.c:24:10: fatal error: 'stdio.h' file not
found
/Developer/xnu/xnu/xnu//SETUP//config/openp.c:53:10: fatal error: 'stdio.h' file not found
/Developer/xnu/xnu/xnu//SETUP//setsegname/setsegname.c:24:10: fatal error: 'libc.h' file not found
/Developer/xnu/xnu/xnu//SETUP//md/md.c:76:10: fatal error: 'sys/types.h' file not found

include <sys/types.h>

     ^

include <stdio.h>

     ^

include <stdio.h>#include <stdio.h>

     ^

     ^

include <stdio.h>

     ^

include <libc.h>

     ^

In file included from /Developer/xnu/xnu/xnu//SETUP//config/mkswapconf.c:56:
/Developer/xnu/xnu/xnu//SETUP//config/config.h:57:10: fatal error: 'stdio.h' file not found

include <stdio.h>

     ^

1 error1 error generated.
generated.

GenericBooter won't build on OS X (10.10.3)

There is no area to report an issue in the GenericBooter project, so I am raising it here.

Following the (partially Linux) instructions from the Wiki, GenericBooter won't build on OS X as the linker cannot find many of the necessary symbols (most relating to ncurses).

# Reproduction steps. Latest Xcode command line tools installed. Homebrew installed.
# pwd: ~/Project/
brew install qemu
git clone https://github.com/darwin-on-arm/image3maker.git
cd image3maker; make
sudo install -s -m 755 image3maker /usr/bin/image3maker

git clone https://github.com/darwin-on-arm/xnu.git
git clone https://github.com/darwin-on-arm/GenericBooter.git

# -- This fails too, but that is a separate issue
cd xnu; make TARGET_CONFIGS="debug arm armpba8" NO_DTRACE_SYMS=YES; cd ..
# --

cd GenericBooter
make menuconfig # Fails (Does partially complete though, unlike xnu).
# See below for full output

I suspect there may be an implicit linking option missing somewhere, although I may have just missed something obvious... I'd really like to get involved in this project :).

Full Make Output:

  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
scripts/kconfig/conf.c:77:10: warning: format string is not a string literal (potentially insecure)
      [-Wformat-security]
                printf(_("aborted!\n\n"));
                       ^~~~~~~~~~~~~~~~~
scripts/kconfig/lkc.h:36:17: note: expanded from macro '_'
#define _(text) gettext(text)
                ^~~~~~~~~~~~~
< ... Snip (All similar warnings) ...>
10 warnings generated.
  HOSTCC  scripts/kconfig/lxdialog/checklist.o
  HOSTCC  scripts/kconfig/lxdialog/inputbox.o
  HOSTCC  scripts/kconfig/lxdialog/menubox.o
  HOSTCC  scripts/kconfig/lxdialog/textbox.o
  HOSTCC  scripts/kconfig/lxdialog/util.o
  HOSTCC  scripts/kconfig/lxdialog/yesno.o
  HOSTCC  scripts/kconfig/mconf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/mconf
Undefined symbols for architecture x86_64:
  "_acs_map", referenced from:
      _dialog_checklist in checklist.o
      _print_arrows in checklist.o
      _dialog_clear in util.o
      _draw_box in util.o
      _dialog_inputbox in inputbox.o
      _dialog_textbox in textbox.o
      _dialog_yesno in yesno.o
      ...
  "_cbreak", referenced from:
      _init_dialog in util.o
  "_delwin", referenced from:
      _dialog_checklist in checklist.o
      _dialog_inputbox in inputbox.o
      _dialog_textbox in textbox.o
      _dialog_yesno in yesno.o
      _dialog_menu in menubox.o
  "_doupdate", referenced from:
      _dialog_checklist in checklist.o
  "_endwin", referenced from:
      _init_dialog in util.o
      _end_dialog in util.o
  "_flash", referenced from:
      _dialog_inputbox in inputbox.o
  "_getcurx", referenced from:
      _init_dialog in util.o
      _print_autowrap in util.o
      _dialog_inputbox in inputbox.o
      _dialog_textbox in textbox.o
      _print_arrows in menubox.o
  "_getcury", referenced from:
      _init_dialog in util.o
      _print_autowrap in util.o
      _dialog_inputbox in inputbox.o
      _dialog_textbox in textbox.o
      _print_arrows in menubox.o
  "_getmaxx", referenced from:
      _conf in mconf.o
      _dialog_checklist in checklist.o
      _dialog_clear in util.o
      _init_dialog in util.o
      _dialog_inputbox in inputbox.o
      _dialog_textbox in textbox.o
      _refresh_text_box in textbox.o
      ...
  "_getmaxy", referenced from:
      _dialog_checklist in checklist.o
      _attr_clear in util.o
      _dialog_clear in util.o
      _init_dialog in util.o
      _dialog_inputbox in inputbox.o
      _dialog_textbox in textbox.o
      _refresh_text_box in textbox.o
      ...
  "_has_colors", referenced from:
      _init_dialog in util.o
      _draw_shadow in util.o
  "_init_pair", referenced from:
      _init_dialog in util.o
  "_initscr", referenced from:
      _init_dialog in util.o
  "_keypad", referenced from:
      _dialog_checklist in checklist.o
      _init_dialog in util.o
      _on_key_esc in util.o
      _dialog_inputbox in inputbox.o
      _dialog_textbox in textbox.o
      _dialog_yesno in yesno.o
      _dialog_menu in menubox.o
      ...
  "_newwin", referenced from:
      _dialog_checklist in checklist.o
      _dialog_inputbox in inputbox.o
      _dialog_textbox in textbox.o
      _dialog_yesno in yesno.o
      _dialog_menu in menubox.o
  "_nodelay", referenced from:
      _on_key_esc in util.o
  "_noecho", referenced from:
      _init_dialog in util.o
  "_scrollok", referenced from:
      _dialog_checklist in checklist.o
      _dialog_menu in menubox.o
  "_start_color", referenced from:
      _init_dialog in util.o
  "_stdscr", referenced from:
      _conf in mconf.o
      _dialog_checklist in checklist.o
      _dialog_clear in util.o
      _init_dialog in util.o
      _end_dialog in util.o
      _dialog_inputbox in inputbox.o
      _dialog_textbox in textbox.o
      ...
  "_subwin", referenced from:
      _dialog_checklist in checklist.o
      _dialog_textbox in textbox.o
      _dialog_menu in menubox.o
  "_ungetch", referenced from:
      _on_key_esc in util.o
  "_waddch", referenced from:
      _dialog_checklist in checklist.o
      _print_item in checklist.o
      _print_arrows in checklist.o
      _attr_clear in util.o
      _dialog_clear in util.o
      _print_title in util.o
      _print_button in util.o
      ...
  "_waddnstr", referenced from:
      _print_item in checklist.o
      _print_arrows in checklist.o
      _dialog_clear in util.o
      _print_title in util.o
      _print_autowrap in util.o
      _print_button in util.o
      _dialog_inputbox in inputbox.o
      ...
  "_wattrset", referenced from:
      _dialog_checklist in checklist.o
      _print_item in checklist.o
      _print_arrows in checklist.o
      _attr_clear in util.o
      _dialog_clear in util.o
      _print_title in util.o
      _print_button in util.o
      ...
  "_wbkgdset", referenced from:
      _dialog_textbox in textbox.o
      _refresh_text_box in textbox.o
      _dialog_menu in menubox.o
  "_wclrtoeol", referenced from:
      _refresh_text_box in textbox.o
      _do_print_item in menubox.o
  "_wgetch", referenced from:
      _dialog_checklist in checklist.o
      _on_key_esc in util.o
      _dialog_inputbox in inputbox.o
      _dialog_textbox in textbox.o
      _dialog_yesno in yesno.o
      _dialog_menu in menubox.o
  "_winch", referenced from:
      _draw_shadow in util.o
  "_wmove", referenced from:
      _dialog_checklist in checklist.o
      _print_item in checklist.o
      _print_arrows in checklist.o
      _attr_clear in util.o
      _dialog_clear in util.o
      _end_dialog in util.o
      _print_title in util.o
      ...
  "_wnoutrefresh", referenced from:
      _dialog_checklist in checklist.o
      _dialog_clear in util.o
      _draw_shadow in util.o
      _dialog_textbox in textbox.o
      _refresh_text_box in textbox.o
      _dialog_menu in menubox.o
  "_wprintw", referenced from:
      _print_item in checklist.o
      _refresh_text_box in textbox.o
  "_wrefresh", referenced from:
      _dialog_checklist in checklist.o
      _print_item in checklist.o
      _end_dialog in util.o
      _dialog_inputbox in inputbox.o
      _refresh_text_box in textbox.o
      _dialog_yesno in yesno.o
      _dialog_menu in menubox.o
      ...
  "_wscrl", referenced from:
      _dialog_checklist in checklist.o
      _dialog_menu in menubox.o
  "_wtouchln", referenced from:
      _attr_clear in util.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [scripts/kconfig/mconf] Error 1
make: *** [menuconfig] Error 2

Undefined symbols for armv7

LD mach_kernel.sys
ld: warning: ignoring file /Applications/Xcode8.3.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.cc_kext.a, missing required architecture armv7 in file /Applications/Xcode8.3.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.cc_kext.a (3 slices)
Undefined symbols for architecture armv7:
  "___divsi3.189", referenced from:
      IOService::notifyControllingDriverDone() in IOServicePM.cpo
  "___udivsi3.190", referenced from:
      IOService::tellClientsWithResponse(int) in IOServicePM.cpo
  "___udivsi3.281", referenced from:
      IOPMrootDomain::sysPowerDownHandler(void*, void*, unsigned long, IOService*, void*, unsigned int) in IOPMrootDomain.cpo
  "___udivsi3.282", referenced from:
      IOPMrootDomain::handleAggressivesRequests() in IOPMrootDomain.cpo
  "___udivsi3.283", referenced from:
      IOPMrootDomain::handleAggressivesRequests() in IOPMrootDomain.cpo
  "___udivsi3.284", referenced from:
      IOPMrootDomain::getAggressiveness(unsigned long, unsigned long*) in IOPMrootDomain.cpo
  "___udivsi3.62", referenced from:
      IOGeneralMemoryDescriptor::dmaCommandOperation(unsigned long, void*, unsigned int) const in IOMemoryDescriptor.cpo
  "___udivsi3.63", referenced from:
      IOGeneralMemoryDescriptor::wireVirtual(IODirection) in IOMemoryDescriptor.cpo
  "___udivsi3.64", referenced from:
      IOGeneralMemoryDescriptor::complete(IODirection) in IOMemoryDescriptor.cpo
  "___udivsi3.92", referenced from:
      _hibernate_write_image in IOHibernateIO.cpo
  "___udivsi3.94", referenced from:
      ProgressUpdate(hibernate_graphics_t*, unsigned char*, int, int) in IOHibernateIO.cpo
  "___udivsi3.95", referenced from:
      _hibernate_machine_init in IOHibernateIO.cpo
  "___umodsi3.10", referenced from:
  OSSymbolPool::removeSymbol(OSSymbol*) in OSSymbol.cpo
  "___umodsi3.9", referenced from:
      OSSymbolPool::findSymbol(char const*) const in OSSymbol.cpo
  "_memcpy.2", referenced from:
      IODataQueue::setNotificationPort(ipc_port*) in IODataQueue.cpo
  "_memcpy.417", referenced from:
      OSKext::getKmodInfo(kmod_info**, unsigned int*) in OSKext.cpo
  "_memcpy.91", referenced from:
      _IOHibernateSystemSleep in IOHibernateIO.cpo
  "_memset.13", referenced from:
      IOMemoryCursor::genPhysicalSegments(IOMemoryDescriptor*, unsigned long, void*, unsigned long, unsigned long, unsigned long*) in IOMemoryCursor.cpo
  "_memset.188", referenced from:
      IOService::addPowerChild(IOService*) in IOServicePM.cpo
  "_memset.93", referenced from:
      ProgressUpdate(hibernate_graphics_t*, unsigned char*, int, int) in IOHibernateIO.cpo
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [/Users/mac/xnu/xnu-arm/BUILD/obj//DEBUG_ARM_OMAP3530/./mach_kernel] Error 1
make[1]: *** [build_all] Error 2
make: *** [all] Error 2

This is similar to bug number #38
Using Xcode 9.0, Apple LLVM version 9.0.0 (clang-900.0.39.2)

Error while building xnu on Linux machine (32bit)

Hey,
I tried to "make TARGET_CONFIGS="debug arm armpba8"" but when it's trying to leave the directory "xnu/BUILD/obj/DEBUG_ARM/ARMPBA8" it throws an error called [exporthdrs_mi] Error 2. How can I fix this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.