小编Sam*_*ton的帖子

Grub 2 未检测到内核中的 Multiboot 标头

我遇到了 Grub 2(和 QEMU 的-kernel)的问题,无法在我的内核中检测到 Multiboot v1 标头。我在之前的单独部分中有标题.text。

linker.ld:

SECTIONS
{
    . = 1M;

    .multiboot ALIGN(4K) :
    {
        *(.multiboot)
    }

    .text ALIGN(4K) :
    {
        *(.text)
    }

    [snip]
Run Code Online (Sandbox Code Playgroud)

boot.s (GNU 作为语法):

.set MAGIC, 0x1badb002
.set FLAGS, (1<<0 | 1<<1) # align, provide mem map
.set CHECKSUM, -(MAGIC + FLAGS)

.section .multiboot
    .long MAGIC
    .long FLAGS
    .long CHECKSUM

.section .text
    [snip]
Run Code Online (Sandbox Code Playgroud)

我已经验证标题部分是按照幻数指定的方式添加的:

kernel.bin:     file format elf32-i386

Contents of section .multiboot:
 101000 02b0ad1b 03000000 fb4f52e4           .........OR.    
Contents of …
Run Code Online (Sandbox Code Playgroud)

kernel grub multiboot

5
推荐指数
1
解决办法
3779
查看次数

使用pisa/xhtml2pdf在第一页和连续页面上显示不同的页脚

我在将一个页脚显示为比萨文档的第一页上的一个框架时,以及在每个其他页面上显示为另一个框架时遇到了一些麻烦.我试图从这里调整lastPage的想法,但没有运气.

是否有可能做到这一点?<pdf:nextpage />这似乎不是正确的事情,因为文档有一个可能(或可能不)流过多个页面的长表.<pdf:nextframe />加上只有第一页的框架看起来很有希望,但我不确定如何使用它.

目前我(为了简洁起见):

<style type="text/css">
  @page {
    margin: 1cm;
    margin-bottom: 2.5cm;
    @frame footer {
      -pdf-frame-content: footerFirst;
      -pdf-frame-border: 1;
      bottom: 2cm;
      margin-left: 1cm;
      margin-right: 1cm;
      height: 1cm;
   }
   @frame footer {
      -pdf-frame-content: footerOther;
      bottom: 2cm;
      margin-left: 1cm;
      margin-right: 1cm;
      height: 1cm;
}
</style>
Run Code Online (Sandbox Code Playgroud)
<body>
  <table repeat="1">
    <!-- extra long table here -->
  </table>
  <div id="footerContent">This is a footer</div>
  <!-- what goes here to switch frames after the first page? -->
  <div id="footerOther"></div>
</body> …
Run Code Online (Sandbox Code Playgroud)

footer pisa xhtml2pdf

4
推荐指数
1
解决办法
3459
查看次数

标签 统计

footer ×1

grub ×1

kernel ×1

multiboot ×1

pisa ×1

xhtml2pdf ×1