mirror of
https://github.com/RROrg/rr.git
synced 2025-06-21 05:51:05 +08:00
mod grub
This commit is contained in:
parent
214ff935c2
commit
021c7b238f
62
.github/workflows/grub.yml
vendored
Normal file
62
.github/workflows/grub.yml
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
#
|
||||
# Copyright (C) 2022 Ing <https://github.com/wjz304>
|
||||
#
|
||||
# This is free software, licensed under the MIT License.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
name: Grub
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
push:
|
||||
description: 'push'
|
||||
default: false
|
||||
type: boolean
|
||||
jobs:
|
||||
grub:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@main
|
||||
|
||||
- name: Initialization environment
|
||||
run : |
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --global user.name "github-actions[bot]"
|
||||
sudo timedatectl set-timezone "Asia/Shanghai"
|
||||
|
||||
sudo apt update
|
||||
sudo apt install -y build-essential bison flex dosfstools
|
||||
|
||||
- name: Make Grub
|
||||
run: |
|
||||
. scripts/grub.sh "grub-2.06" "i386-pc i386-efi x86_64-efi"
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: grub
|
||||
path: |
|
||||
grub.img.gz
|
||||
|
||||
- name: Check and Push
|
||||
if: success() && inputs.push == true
|
||||
run: |
|
||||
if [ -f "grub.img.gz" ]; then
|
||||
echo "Copy img ..."
|
||||
mv -f grub.img.gz files/board/arpl/grub.img.gz
|
||||
|
||||
echo "Git push ..."
|
||||
git pull
|
||||
status=$(git status -s | grep -E 'grub.img.gz' | awk '{printf " %s", $2}')
|
||||
if [ -n "${status}" ]; then
|
||||
git add ${status}
|
||||
git commit -m "update $(date +%Y-%m-%d" "%H:%M:%S)"
|
||||
git push -f
|
||||
fi
|
||||
else
|
||||
echo "No change ..."
|
||||
fi
|
||||
|
@ -14,24 +14,14 @@ IMAGE_FILE="${MY_ROOT}/arpl.img"
|
||||
BOARD_PATH="${CONFIG_DIR}/board/arpl"
|
||||
|
||||
echo "Creating image file"
|
||||
# Create image zeroed
|
||||
dd if="/dev/zero" of="${IMAGE_FILE}" bs=1M count=1024 conv=sync 2>/dev/null
|
||||
# Copy grub stage1 to image
|
||||
dd if="${BOARD_PATH}/grub.bin" of="${IMAGE_FILE}" conv=notrunc,sync 2>/dev/null
|
||||
# Create partitions on image
|
||||
echo -e "n\np\n\n\n+50M\na\nt\n\n0b\nn\np\n\n\n+50M\nn\np\n\n\n\nw" | fdisk "${IMAGE_FILE}" >/dev/null
|
||||
|
||||
# Force umount, ignore errors
|
||||
sudo umount "${BINARIES_DIR}/p1" 2>/dev/null || true
|
||||
sudo umount "${BINARIES_DIR}/p3" 2>/dev/null || true
|
||||
# Force unsetup of loop device
|
||||
# unzip base image
|
||||
gzip -dc "${BOARD_PATH}/grub.img.gz" > "${IMAGE_FILE}"
|
||||
# fdisk
|
||||
fdisk -l "${IMAGE_FILE}"
|
||||
# Find idle of loop device
|
||||
LOOPX=`sudo losetup -f`
|
||||
# Setup the ${LOOPX} loop device
|
||||
sudo losetup -P "${LOOPX}" "${IMAGE_FILE}"
|
||||
# Format partitions
|
||||
sudo mkdosfs -F32 -n ARPL1 "${LOOPX}p1" >/dev/null 2>&1
|
||||
sudo mkfs.ext2 -F -L ARPL2 "${LOOPX}p2" >/dev/null 2>&1
|
||||
sudo mkfs.ext4 -F -L ARPL3 "${LOOPX}p3" >/dev/null 2>&1
|
||||
|
||||
echo "Mounting image file"
|
||||
mkdir -p "${BINARIES_DIR}/p1"
|
||||
|
@ -9,7 +9,7 @@ RAMDISK_PATH="${TMP_PATH}/ramdisk"
|
||||
LOG_FILE="${TMP_PATH}/log.txt"
|
||||
|
||||
USER_CONFIG_FILE="${BOOTLOADER_PATH}/user-config.yml"
|
||||
GRUB_PATH="${BOOTLOADER_PATH}/grub"
|
||||
GRUB_PATH="${BOOTLOADER_PATH}/boot/grub"
|
||||
|
||||
ORI_ZIMAGE_FILE="${SLPART_PATH}/zImage"
|
||||
ORI_RDGZ_FILE="${SLPART_PATH}/rd.gz"
|
||||
|
@ -8,5 +8,5 @@ function use() {
|
||||
[ -z "${1}" ] && use
|
||||
[ "${1}" != "junior" -a "${1}" != "config" ] && use
|
||||
echo "Rebooting to ${1} mode"
|
||||
grub-editenv /mnt/p1/grub/grubenv set next_entry="${1}"
|
||||
grub-editenv /mnt/p1/boot/grub/grubenv set next_entry="${1}"
|
||||
reboot
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,2 +0,0 @@
|
||||
# GRUB Environment Block
|
||||
#######################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,194 +0,0 @@
|
||||
*acpi: acpi
|
||||
*all_functional_test: functional_test
|
||||
*background_image: gfxterm_background
|
||||
*cat: cat
|
||||
*cpuid: cpuid
|
||||
*crc: hashsum
|
||||
*cryptomount: cryptodisk
|
||||
*echo: echo
|
||||
*extract_syslinux_entries_configfile: syslinuxcfg
|
||||
*extract_syslinux_entries_source: syslinuxcfg
|
||||
*file: file
|
||||
*functional_test: functional_test
|
||||
*gettext: gettext
|
||||
*hashsum: hashsum
|
||||
*hdparm: hdparm
|
||||
*hello: hello
|
||||
*help: help
|
||||
*hexdump: hexdump
|
||||
*inb: iorw
|
||||
*inl: iorw
|
||||
*inw: iorw
|
||||
*keystatus: keystatus
|
||||
*kfreebsd: bsd
|
||||
*knetbsd: bsd
|
||||
*kopenbsd: bsd
|
||||
*list_env: loadenv
|
||||
*load_env: loadenv
|
||||
*loopback: loopback
|
||||
*ls: ls
|
||||
*lsacpi: lsacpi
|
||||
*lspci: lspci
|
||||
*md5sum: hashsum
|
||||
*menuentry: normal
|
||||
*pcidump: pcidump
|
||||
*probe: probe
|
||||
*rdmsr: rdmsr
|
||||
*read_byte: memrw
|
||||
*read_dword: memrw
|
||||
*read_word: memrw
|
||||
*regexp: regexp
|
||||
*save_env: loadenv
|
||||
*search: search
|
||||
*serial: serial
|
||||
*setpci: setpci
|
||||
*sha1sum: hashsum
|
||||
*sha256sum: hashsum
|
||||
*sha512sum: hashsum
|
||||
*sleep: sleep
|
||||
*smbios: smbios
|
||||
*submenu: normal
|
||||
*syslinux_configfile: syslinuxcfg
|
||||
*syslinux_source: syslinuxcfg
|
||||
*terminfo: terminfo
|
||||
*test_blockarg: test_blockarg
|
||||
*testspeed: testspeed
|
||||
*tr: tr
|
||||
*trust: pgp
|
||||
*verify_detached: pgp
|
||||
*xnu_splash: xnu
|
||||
*zfskey: zfscrypt
|
||||
.: configfile
|
||||
[: test
|
||||
appleloader: appleldr
|
||||
authenticate: normal
|
||||
background_color: gfxterm_background
|
||||
backtrace: backtrace
|
||||
badram: mmap
|
||||
blocklist: blocklist
|
||||
boot: boot
|
||||
break: normal
|
||||
cat: minicmd
|
||||
cbmemc: cbmemc
|
||||
chainloader: chain
|
||||
clear: normal
|
||||
cmp: cmp
|
||||
configfile: configfile
|
||||
continue: normal
|
||||
coreboot_boottime: cbtime
|
||||
cutmem: mmap
|
||||
date: date
|
||||
distrust: pgp
|
||||
dump: minicmd
|
||||
eval: eval
|
||||
exit: minicmd
|
||||
export: normal
|
||||
extract_entries_configfile: configfile
|
||||
extract_entries_source: configfile
|
||||
extract_legacy_entries_configfile: legacycfg
|
||||
extract_legacy_entries_source: legacycfg
|
||||
fakebios: loadbios
|
||||
false: true
|
||||
fix_video: fixvideo
|
||||
fwsetup: efifwsetup
|
||||
gdbstub: gdb
|
||||
gdbstub_break: gdb
|
||||
gdbstub_stop: gdb
|
||||
gptsync: gptsync
|
||||
halt: halt
|
||||
help: minicmd
|
||||
hexdump_random: random
|
||||
initrd16: linux16
|
||||
initrd: linux
|
||||
keymap: keylayouts
|
||||
kfreebsd_loadenv: bsd
|
||||
kfreebsd_module: bsd
|
||||
kfreebsd_module_elf: bsd
|
||||
knetbsd_module: bsd
|
||||
knetbsd_module_elf: bsd
|
||||
kopenbsd_ramdisk: bsd
|
||||
legacy_check_password: legacycfg
|
||||
legacy_configfile: legacycfg
|
||||
legacy_initrd: legacycfg
|
||||
legacy_initrd_nounzip: legacycfg
|
||||
legacy_kernel: legacycfg
|
||||
legacy_password: legacycfg
|
||||
legacy_source: legacycfg
|
||||
linux16: linux16
|
||||
linux: linux
|
||||
list_trusted: pgp
|
||||
loadbios: loadbios
|
||||
loadfont: font
|
||||
lscoreboot: cbls
|
||||
lsefi: lsefi
|
||||
lsefimmap: lsefimmap
|
||||
lsefisystab: lsefisystab
|
||||
lsfonts: font
|
||||
lsmmap: lsmmap
|
||||
lsmod: minicmd
|
||||
lssal: lssal
|
||||
macppcbless: macbless
|
||||
mactelbless: macbless
|
||||
module2: multiboot2
|
||||
module: multiboot
|
||||
multiboot2: multiboot2
|
||||
multiboot: multiboot
|
||||
nativedisk: nativedisk
|
||||
net_add_addr: net
|
||||
net_add_dns: net
|
||||
net_add_route: net
|
||||
net_bootp: net
|
||||
net_del_addr: net
|
||||
net_del_dns: net
|
||||
net_del_route: net
|
||||
net_dhcp: net
|
||||
net_get_dhcp_option: net
|
||||
net_ipv6_autoconf: net
|
||||
net_ls_addr: net
|
||||
net_ls_cards: net
|
||||
net_ls_dns: net
|
||||
net_ls_routes: net
|
||||
net_nslookup: net
|
||||
normal: normal
|
||||
normal_exit: normal
|
||||
outb: iorw
|
||||
outl: iorw
|
||||
outw: iorw
|
||||
parttool: parttool
|
||||
password: password
|
||||
password_pbkdf2: password_pbkdf2
|
||||
play: play
|
||||
read: read
|
||||
reboot: reboot
|
||||
return: normal
|
||||
rmmod: minicmd
|
||||
search.file: search_fs_file
|
||||
search.fs_label: search_label
|
||||
search.fs_uuid: search_fs_uuid
|
||||
setparams: normal
|
||||
shift: normal
|
||||
source: configfile
|
||||
terminal_input: terminal
|
||||
terminal_output: terminal
|
||||
test: test
|
||||
testload: testload
|
||||
time: time
|
||||
true: true
|
||||
usb: usbtest
|
||||
videoinfo: videoinfo
|
||||
videotest: videotest
|
||||
write_byte: memrw
|
||||
write_dword: memrw
|
||||
write_word: memrw
|
||||
wrmsr: wrmsr
|
||||
xnu_devprop_load: xnu
|
||||
xnu_kernel64: xnu
|
||||
xnu_kernel: xnu
|
||||
xnu_kext: xnu
|
||||
xnu_kextdir: xnu
|
||||
xnu_mkext: xnu
|
||||
xnu_ramdisk: xnu
|
||||
xnu_resume: xnu
|
||||
xnu_uuid: xnu_uuid
|
||||
zfs-bootfs: zfsinfo
|
||||
zfsinfo: zfsinfo
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,45 +0,0 @@
|
||||
RIJNDAEL: gcry_rijndael
|
||||
RIJNDAEL192: gcry_rijndael
|
||||
RIJNDAEL256: gcry_rijndael
|
||||
AES128: gcry_rijndael
|
||||
AES-128: gcry_rijndael
|
||||
AES-192: gcry_rijndael
|
||||
AES-256: gcry_rijndael
|
||||
ADLER32: adler32
|
||||
CRC64: crc64
|
||||
ARCFOUR: gcry_arcfour
|
||||
BLOWFISH: gcry_blowfish
|
||||
CAMELLIA128: gcry_camellia
|
||||
CAMELLIA192: gcry_camellia
|
||||
CAMELLIA256: gcry_camellia
|
||||
CAST5: gcry_cast5
|
||||
CRC32: gcry_crc
|
||||
CRC32RFC1510: gcry_crc
|
||||
CRC24RFC2440: gcry_crc
|
||||
DES: gcry_des
|
||||
3DES: gcry_des
|
||||
DSA: gcry_dsa
|
||||
IDEA: gcry_idea
|
||||
MD4: gcry_md4
|
||||
MD5: gcry_md5
|
||||
RFC2268_40: gcry_rfc2268
|
||||
AES: gcry_rijndael
|
||||
AES192: gcry_rijndael
|
||||
AES256: gcry_rijndael
|
||||
RIPEMD160: gcry_rmd160
|
||||
RSA: gcry_rsa
|
||||
SEED: gcry_seed
|
||||
SERPENT128: gcry_serpent
|
||||
SERPENT192: gcry_serpent
|
||||
SERPENT256: gcry_serpent
|
||||
SHA1: gcry_sha1
|
||||
SHA224: gcry_sha256
|
||||
SHA256: gcry_sha256
|
||||
SHA512: gcry_sha512
|
||||
SHA384: gcry_sha512
|
||||
TIGER192: gcry_tiger
|
||||
TIGER: gcry_tiger
|
||||
TIGER2: gcry_tiger
|
||||
TWOFISH: gcry_twofish
|
||||
TWOFISH128: gcry_twofish
|
||||
WHIRLPOOL: gcry_whirlpool
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,37 +0,0 @@
|
||||
affs
|
||||
afs
|
||||
bfs
|
||||
btrfs
|
||||
cbfs
|
||||
cpio
|
||||
cpio_be
|
||||
exfat
|
||||
ext2
|
||||
f2fs
|
||||
fat
|
||||
hfs
|
||||
hfsplus
|
||||
iso9660
|
||||
jfs
|
||||
minix
|
||||
minix2
|
||||
minix2_be
|
||||
minix3
|
||||
minix3_be
|
||||
minix_be
|
||||
newc
|
||||
nilfs2
|
||||
ntfs
|
||||
odc
|
||||
procfs
|
||||
reiserfs
|
||||
romfs
|
||||
sfs
|
||||
squash4
|
||||
tar
|
||||
udf
|
||||
ufs1
|
||||
ufs1_be
|
||||
ufs2
|
||||
xfs
|
||||
zfs
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user