-
-
Save Maxdamantus/949e81b445ffaa068449 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
F="$(mktemp)" | |
./boot.scr.py >"$F" | |
mkimage -A arm -O linux -T script -C none -n boot -d "$F" boot.scr | |
rm "$F" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
entries = 0 | |
def esc(str): | |
o = "" | |
for c in str: | |
o += "'\\" + c + "'" if c in "\\'" else c | |
return "'" + o + "'" | |
def entry(name, cmd): | |
global entries | |
print "setenv bootmenu_" + str(entries) + " " + name + "=" + esc(cmd) | |
entries += 1 | |
def kernel_(name, kern, cmdline): | |
entry(name, "setenv setup_omap_atag 1; setenv bootcmd " + esc("ext2load mmc 1:1 0x86008000 /k/" + kern + ".u; setenv bootargs " + esc(cmdline) + "; bootm 0x86008000") + "; boot") | |
def kernelnoc(kern): | |
entry(kern, "setenv setup_omap_atag 1; setenv bootcmd " + esc("ext2load mmc 1:1 0x86008000 /k/" + kern + ".u; bootm 0x86008000") + "; boot") | |
def kernel(kern, cmdline): | |
kernel_(kern, kern, cmdline) | |
cmdline = "init=/sbin/preinit ubi.mtd=rootfs root=ubi0:rootfs rootfstype=ubifs rootflags=bulk_read,no_chk_data_crc rw console=ttyMTD,log console=tty0 snd-soc-rx51.hp_lim=42 snd-soc-tlv320aic3x.hp_dac_lim=6" | |
#cmdline = "cmdline" | |
kernelnoc("kernel_2.6.28.10-power53") | |
kernel("zImage-2.6.28.10-cssu1", cmdline) | |
kernel("kernel_2.6.28.10-power53", cmdline) | |
kernel("314", "init=/bin/bash ubi.mtd=rootfs root=ubi0:rootfs rootfstype=ubifs rootflags=bulk_read,no_chk_data_crc rw console=ttyMTD,log console=tty0 snd-soc-rx51.hp_lim=42 snd-soc-tlv320aic3x.hp_dac_lim=6") | |
kernelnoc("zImage-2.6.28.10-cssu1") | |
kernelnoc("grubi") | |
kernelnoc("grube") | |
print "bootmenu" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment