tangrs / nspire-linux-loader2

A Linux bootloader for Nspire. Supports ATAG and DTB booting.
https://hackspire.unsads.com/index.php/Linux
GNU General Public License v3.0
67 stars 8 forks source link

Initrd too large! #10

Open ylluminarious opened 6 years ago

ylluminarious commented 6 years ago

I'm trying to boot a very small Debian installation onto my calculator. I made it much more small than it ordinarily would be by removing documentation, certain programs, and other unnecessary data for a non-networked calculator. However, I consistently get an error when I try to boot Linux via my initrd. My initrd's size is 39849984 bytes (equivalent to 38 MiB or 39.85 MB), which should be well under the limit of 40 MB according to the README. The only thing I can think is that my initrd is too large, but this seems like it should not be the case because of the guarantee in the README.

Here's what the error says (transcribed from my calculator screen):

Linux in-place bootloader v2 (ba0d0fa)
Build date: Sun, 23 Feb 2014 19:18:37 +0100
Allocated memory:
    DTB/ATAGS:      16128 bytes
    Kernel and initrd:  22675456 bytes
Machine number: 4443
Detected a CX
Physical memory at: 0x10000000-0x14000000
Serial number: 4461523260 rev0 (Non-CAS)
# rdsize 87030000
kernel linux/zImage.tns
Kernel successfully loaded
initrd linux/initrd.tns
Initrd too large!
Tried to load initrd needing 39852792 bytes into 20646872 bytes of free space
Original initrd size was 39849984 bytes
dtb linux/nspire-cx.dtb.tns
DTB successfully loaded
cmdline root=/dev/ram
Kernel command line: "root=/dev/ram"
boot

Is the problem really that my initrd is too large? If so, exactly how small does it need to be?

zaoqi-unsafe commented 5 years ago

initrd of Archlinux works

ylluminarious commented 5 years ago

@zaoqi-unsafe Where can I get it?

jojomoore2007 commented 4 years ago

@ylluminarious The total size of the ramdisk (initrd) + kernel needs to be smaller than the available RAM, and, on top of that, some distros (for example, Debian) require a certain free amount of RAM to boot. Find a smaller set of kernel + ramdisk, the smaller, the better.

jojomoore2007 commented 4 years ago

The TI-Nspire CX SDRAM is 64MB, so it's probably not gonna be enough to run Debian, even with an optimized initrd. Arch works, though, since it's super lightweight.

jojomoore2007 commented 4 years ago

Also, the base TI-Nspire OS is somewhat large, so it takes up a lot of the free space