Skip to content

Instantly share code, notes, and snippets.

@dileks
dileks / FU-ed clang
Created April 23, 2011 11:07
llvm/clang
[ 97%] Built target clang-3.0
Scanning dependencies of target clang++-3.0-symlink
Scanning dependencies of target clang++-symlink
[ 97%] [ 97%] Built target clang++-3.0-symlink
Built target clang++-symlink
Scanning dependencies of target clang-symlink
[ 97%] Built target clang-symlink
Scanning dependencies of target cxx
[ 97%] [ 97%] Building CXX object tools/clang/runtime/libcxx/lib/CMakeFiles/cxx.dir/__/src/regex.cpp.o
Building CXX object tools/clang/runtime/libcxx/lib/CMakeFiles/cxx.dir/__/src/locale.cpp.o
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dbac294..82f8378 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,7 +26,7 @@ set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_RPATH} "${CMAKE_INSTALL_PREFIX}/lib")
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
-set(PACKAGE_VERSION "2.9")
+set(PACKAGE_VERSION "3.0")
@dileks
dileks / dmesg_hooray.txt
Created April 19, 2011 18:31
HOORAY! First successful startup of a clang-built lll-kernel here!
$ cat dmesg_hooray.txt
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 2.6.38.2-lll+ (sd@tbox) (clang: error: argument unused during compilation: '-g') #1 SMP Tue Apr 19 19:50:28 CEST 2011
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: 0000000000000000 - 000000000009f000 (usable)
[ 0.000000] BIOS-e820: 000000000009f000 - 00000000000a0000 (reserved)
[ 0.000000] BIOS-e820: 00000000000d2000 - 00000000000d4000 (reserved)
[ 0.000000] BIOS-e820: 00000000000dc000 - 0000000000100000 (reserved)
[ 0.000000] BIOS-e820: 0000000000100000 - 000000003ff60000 (usable)
@dileks
dileks / qemu
Created April 19, 2011 16:44
File: Documentation/kernel-parameters.txt
loglevel= All Kernel Messages with a loglevel smaller than the
console loglevel will be printed to the console. It can
also be changed with klogd or other programs. The
loglevels are defined as follows:
0 (KERN_EMERG) system is unusable
1 (KERN_ALERT) action must be taken immediately
2 (KERN_CRIT) critical conditions
3 (KERN_ERR) error conditions
4 (KERN_WARNING) warning conditions
@dileks
dileks / qemu
Created April 18, 2011 19:43
(gdb) x/17i 0xc10206ad
(gdb) x/x 0xc146fd50
0xc146fd50: 0xc10206ad
(gdb) x/17i 0xc10206ad
0xc10206ad <_paravirt_ident_32>: ret
0xc10206ae <_paravirt_ident_64>: ret
0xc10206af <paravirt_patch_nop>: xor %eax,%eax
0xc10206b1 <paravirt_patch_nop+2>: ret
0xc10206b2 <paravirt_patch_ignore>: ret
0xc10206b3 <paravirt_patch_call>: push %esi
0xc10206b4 <paravirt_patch_call+1>: movzwl 0xc(%esp),%esi
@dileks
dileks / dmidecode
Created April 18, 2011 19:41
dmidecode
# dmidecode
# dmidecode 2.9
SMBIOS 2.33 present.
61 structures occupying 2127 bytes.
Table at 0x000E0010.
Handle 0x0000, DMI type 0, 20 bytes
BIOS Information
Vendor: IBM
Version: 1RETDRWW (3.23 )
@dileks
dileks / qemu
Created April 18, 2011 19:34
(gdb) x/33i early_ioremap_init (plus next-page)
(gdb) x/33i early_ioremap_init
0xc14b476d <early_ioremap_init>: push %ebp
0xc14b476e <early_ioremap_init+1>: mov %esp,%ebp
0xc14b4770 <early_ioremap_init+3>: push %ebx
0xc14b4771 <early_ioremap_init+4>: push %edi
0xc14b4772 <early_ioremap_init+5>: push %esi
0xc14b4773 <early_ioremap_init+6>: sub $0xc,%esp
0xc14b4776 <early_ioremap_init+9>: mov 0xc1523f28,%al
0xc14b477b <early_ioremap_init+14>: cmp $0x1,%al
0xc14b477d <early_ioremap_init+16>: jne 0xc14b478b <early_ioremap_init+30>
@dileks
dileks / qemu
Created April 18, 2011 19:30
(gdb) x/33i early_ioremap_init
(gdb) x/33i early_ioremap_init
0xc14b476d <early_ioremap_init>: push %ebp
0xc14b476e <early_ioremap_init+1>: mov %esp,%ebp
0xc14b4770 <early_ioremap_init+3>: push %ebx
0xc14b4771 <early_ioremap_init+4>: push %edi
0xc14b4772 <early_ioremap_init+5>: push %esi
0xc14b4773 <early_ioremap_init+6>: sub $0xc,%esp
0xc14b4776 <early_ioremap_init+9>: mov 0xc1523f28,%al
0xc14b477b <early_ioremap_init+14>: cmp $0x1,%al
0xc14b477d <early_ioremap_init+16>: jne 0xc14b478b <early_ioremap_init+30>
@dileks
dileks / kernel
Created April 18, 2011 19:27
$ LANG=C grep bm_pte -rn arch/x86/
$ LANG=C grep bm_pte -rn arch/x86/
Binary file arch/x86/built-in.o matches
Binary file arch/x86/mm/built-in.o matches
arch/x86/mm/ioremap.c:347:static pte_t bm_pte[PAGE_SIZE/sizeof(pte_t)] __page_aligned_bss;
arch/x86/mm/ioremap.c:362: return &bm_pte[pte_index(addr)];
arch/x86/mm/ioremap.c:367: return ptep >= &bm_pte[0] && ptep < &bm_pte[PAGE_SIZE/sizeof(pte_t)];
arch/x86/mm/ioremap.c:384: memset(bm_pte, 0, sizeof(bm_pte));
arch/x86/mm/ioremap.c:385: pmd_populate_kernel(&init_mm, pmd, bm_pte);
Binary file arch/x86/mm/ioremap.o matches
@dileks
dileks / qemu
Created April 18, 2011 19:22
$ qemu-system-i386 -kernel bzImage -m 128 -append "root=/dev/ram console=ttyS0 earlyprintk=ttyS0 early_ioremap_debug loglevel=8" -serial stdio
$ qemu-system-i386 -kernel bzImage -m 128 -append "root=/dev/ram console=ttyS0 earlyprintk=ttyS0 early_ioremap_debug loglevel=8" -serial stdio
Decompressing Linux... Parsing ELF... done.
Booting the kernel.
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 2.6.38.2-lll+ (sd@tbox) (clang: error: argument unused during compilation: '-g') #2 SMP Mon Apr 18 15:48:03 CEST 2011
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: 0000000000000000 - 000000000009f400 (usable)
[ 0.000000] BIOS-e820: 000000000009f400 - 00000000000a0000 (reserved)