forked from dan/liminix
1
0
Fork 0

and entryPoint

This commit is contained in:
Daniel Barlow 2023-11-12 18:50:47 +00:00
parent 315907de98
commit abfb35a231
8 changed files with 10 additions and 10 deletions

View File

@ -181,7 +181,7 @@
# image and DTB underneath, but maybe this is a terrible waste of # image and DTB underneath, but maybe this is a terrible waste of
# RAM unless the kernel is able to reuse it later. Oh well # RAM unless the kernel is able to reuse it later. Oh well
loadAddress = lim.parseInt "0x42000000"; loadAddress = lim.parseInt "0x42000000";
entryPoint = "0x42000000"; entryPoint = lim.parseInt "0x42000000";
rootDevice = "ubi0:liminix"; rootDevice = "ubi0:liminix";
dts = { dts = {
src = "${openwrt.src}/target/linux/mediatek/dts/mt7622-linksys-e8450-ubi.dts"; src = "${openwrt.src}/target/linux/mediatek/dts/mt7622-linksys-e8450-ubi.dts";

View File

@ -104,7 +104,7 @@
hardware = { hardware = {
defaultOutput = "flashimage"; defaultOutput = "flashimage";
loadAddress = lim.parseInt "0x80060000"; loadAddress = lim.parseInt "0x80060000";
entryPoint = "0x80060000"; entryPoint = lim.parseInt "0x80060000";
flash = { flash = {
address = "0x9F060000"; address = "0x9F060000";
size ="0xfa0000"; size ="0xfa0000";

View File

@ -55,8 +55,8 @@
imports = [ ../../modules/arch/mipsel.nix ]; imports = [ ../../modules/arch/mipsel.nix ];
hardware = { hardware = {
defaultOutput = "flashimage"; defaultOutput = "flashimage";
loadAddress = lim.parseInt "0x80000000"; loadAddress = lim.parseInt "0x80000000";
entryPoint = "0x80000000"; entryPoint = lim.parseInt "0x80000000";
# Creating 5 MTD partitions on "spi0.0": # Creating 5 MTD partitions on "spi0.0":
# 0x000000000000-0x000000030000 : "u-boot" # 0x000000000000-0x000000030000 : "u-boot"

View File

@ -63,7 +63,7 @@
hardware = { hardware = {
defaultOutput = "flashimage"; defaultOutput = "flashimage";
loadAddress = lim.parseInt "0x80000000"; loadAddress = lim.parseInt "0x80000000";
entryPoint = "0x80000000"; entryPoint = lim.parseInt "0x80000000";
flash = { flash = {
address = "0xbc050000"; address = "0xbc050000";

View File

@ -66,7 +66,7 @@
in { in {
defaultOutput = "vmroot"; defaultOutput = "vmroot";
loadAddress = lim.parseInt "0x0"; loadAddress = lim.parseInt "0x0";
entryPoint = "0x0"; entryPoint = lim.parseInt "0x0";
rootDevice = "/dev/mtdblock0"; rootDevice = "/dev/mtdblock0";
flash.eraseBlockSize = "65536"; # c.f. pkgs/mips-vm/mips-vm.sh flash.eraseBlockSize = "65536"; # c.f. pkgs/mips-vm/mips-vm.sh

View File

@ -68,7 +68,7 @@
in { in {
defaultOutput = "vmroot"; defaultOutput = "vmroot";
loadAddress = lim.parseInt "0x00010000"; loadAddress = lim.parseInt "0x00010000";
entryPoint = "0x00010000"; entryPoint = lim.parseInt "0x00010000";
rootDevice = "/dev/mtdblock0"; rootDevice = "/dev/mtdblock0";
flash.eraseBlockSize = "65536"; # c.f. pkgs/mips-vm/mips-vm.sh flash.eraseBlockSize = "65536"; # c.f. pkgs/mips-vm/mips-vm.sh

View File

@ -60,7 +60,7 @@ in {
}; };
}; };
loadAddress = mkOption { type = types.ints.unsigned; default = null; }; loadAddress = mkOption { type = types.ints.unsigned; default = null; };
entryPoint = mkOption { }; entryPoint = mkOption { type = types.ints.unsigned; };
radios = mkOption { radios = mkOption {
description = '' description = ''
Kernel modules (from mac80211 package) required for the Kernel modules (from mac80211 package) required for the

View File

@ -46,7 +46,7 @@ in {
buildPhaseUImage = '' buildPhaseUImage = ''
test -f tmp.dtb && ${objcopy} --update-section .appended_dtb=tmp.dtb vmlinux.elf || ${objcopy} --add-section .appended_dtb=tmp.dtb vmlinux.elf test -f tmp.dtb && ${objcopy} --update-section .appended_dtb=tmp.dtb vmlinux.elf || ${objcopy} --add-section .appended_dtb=tmp.dtb vmlinux.elf
${stripAndZip} ${stripAndZip}
mkimage -A ${arch} -O linux -T kernel -C lzma -a 0x${lib.toHexString loadAddress} -e ${entryPoint} -n '${lib.toUpper arch} Liminix Linux ${extraName}' -d vmlinux.bin.lzma kernel.uimage mkimage -A ${arch} -O linux -T kernel -C lzma -a 0x${lib.toHexString loadAddress} -e 0x${lib.tohexString entryPoint} -n '${lib.toUpper arch} Liminix Linux ${extraName}' -d vmlinux.bin.lzma kernel.uimage
''; '';
buildPhaseFIT = '' buildPhaseFIT = ''
@ -58,7 +58,7 @@ in {
kernel { kernel {
data = /incbin/("./vmlinux.bin.lzma"); data = /incbin/("./vmlinux.bin.lzma");
load = <0x${lib.toHexString loadAddress}>; load = <0x${lib.toHexString loadAddress}>;
entry = <${entryPoint}>; entry = <0x${lib.toHexString entryPoint}>;
arch = "${arch}"; arch = "${arch}";
compression = "lzma"; compression = "lzma";
}; };