mirror of
https://github.com/PartialVolume/shredos.x86_64.git
synced 2026-02-20 09:35:26 +00:00
Initial Commit - Shredos with Nwipe
This commit is contained in:
BIN
board/shredos/bootx64.efi
Executable file
BIN
board/shredos/bootx64.efi
Executable file
Binary file not shown.
6
board/shredos/busybox.custom.config
Normal file
6
board/shredos/busybox.custom.config
Normal file
@@ -0,0 +1,6 @@
|
||||
# usb mounts
|
||||
CONFIG_FEATURE_BLKID_TYPE=y
|
||||
CONFIG_FEATURE_VOLUMEID_NTFS=y
|
||||
|
||||
# x86 to mount sd partitions by label
|
||||
CONFIG_FEATURE_MOUNT_LABEL=y
|
||||
16
board/shredos/doimg.sh
Executable file
16
board/shredos/doimg.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
cp "board/shredos/grub.cfg" "${BINARIES_DIR}/grub.cfg" || exit 1
|
||||
cp "board/shredos/bootx64.efi" "${BINARIES_DIR}/bootx64.efi" || exit 1
|
||||
cp "${HOST_DIR}/lib/grub/i386-pc/boot.img" "${BINARIES_DIR}/boot.img" || exit 1
|
||||
rm -rf "${BUILD_DIR}/genimage.tmp" || exit 1
|
||||
genimage --rootpath="${TARGET_DIR}" --inputpath="${BINARIES_DIR}" --outputpath="${BINARIES_DIR}" --config="board/shredos/genimage.cfg" --tmppath="${BUILD_DIR}/genimage.tmp" || exit 1
|
||||
|
||||
# renaming
|
||||
SUFFIXIMG=$(date +%Y%m%d)
|
||||
FINAL_IMAGE_PATH="${BINARIES_DIR}/shredos-${SUFFIXIMG}.img"
|
||||
mv "${BINARIES_DIR}/shredos.img" "${FINAL_IMAGE_PATH}" || exit 1
|
||||
|
||||
echo "File ${FINAL_IMAGE_PATH} created successfully"
|
||||
|
||||
exit 0
|
||||
40
board/shredos/fsoverlay/etc/init.d/S10triggerhappy
Executable file
40
board/shredos/fsoverlay/etc/init.d/S10triggerhappy
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
|
||||
NAME=thd
|
||||
DAEMON=/usr/sbin/$NAME
|
||||
PIDFILE=/var/run/$NAME.pid
|
||||
DAEMON_ARGS="--daemon --triggers /etc/triggerhappy/triggers.d --socket /var/run/thd.socket --pidfile $PIDFILE /dev/input/event*"
|
||||
|
||||
# Sanity checks
|
||||
test -x $DAEMON || exit 0
|
||||
|
||||
[ -r /etc/default/triggerhappy ] && . /etc/default/triggerhappy
|
||||
|
||||
start() {
|
||||
printf "Starting $NAME: "
|
||||
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS \
|
||||
&& echo "OK" || echo "FAIL"
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf "Stopping $NAME: "
|
||||
start-stop-daemon --stop --quiet --pidfile $PIDFILE \
|
||||
&& echo "OK" || echo "FAIL"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart)
|
||||
stop
|
||||
sleep 1
|
||||
start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
29
board/shredos/fsoverlay/etc/inittab
Normal file
29
board/shredos/fsoverlay/etc/inittab
Normal file
@@ -0,0 +1,29 @@
|
||||
# /etc/inittab
|
||||
#
|
||||
# This inittab is a basic inittab sample for sysvinit, which mimics
|
||||
# Buildroot's default inittab for BusyBox.
|
||||
id:3:initdefault:
|
||||
|
||||
si0::sysinit:/bin/mount -t proc proc /proc
|
||||
#si1::sysinit:/bin/mount -o remount,rw /
|
||||
si2::sysinit:/bin/mkdir -p /dev/pts
|
||||
si3::sysinit:/bin/mkdir -p /dev/shm
|
||||
si4::sysinit:/bin/mount -a
|
||||
si5::sysinit:/bin/hostname -F /etc/hostname
|
||||
rcS:12345:wait:/etc/init.d/rcS
|
||||
|
||||
sole::respawn:/sbin/getty -L console 0 vt100 # GENERIC_SERIAL
|
||||
1:3:respawn:/sbin/getty 38400 tty1 -n -l /usr/bin/nwipe_launcher
|
||||
2:3:respawn:/sbin/getty 38400 tty2 -n -l /bin/sh
|
||||
|
||||
# Stuff to do for the 3-finger salute
|
||||
#ca::ctrlaltdel:/sbin/reboot
|
||||
|
||||
# Stuff to do before rebooting
|
||||
shd0:06:wait:/etc/init.d/rcK
|
||||
shd1:06:wait:/sbin/swapoff -a
|
||||
shd2:06:wait:/bin/umount -a -r
|
||||
|
||||
# The usual halt or reboot actions
|
||||
hlt0:0:wait:/sbin/halt -dhp
|
||||
reb0:6:wait:/sbin/reboot
|
||||
@@ -0,0 +1 @@
|
||||
KEY_POWER 1 /sbin/shutdown -h now
|
||||
9
board/shredos/fsoverlay/usr/bin/nwipe_launcher
Executable file
9
board/shredos/fsoverlay/usr/bin/nwipe_launcher
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
# trap the ctrl+c signal
|
||||
trap "echo" INT
|
||||
|
||||
while true
|
||||
do
|
||||
/usr/bin/nwipe
|
||||
done
|
||||
35
board/shredos/genimage.cfg
Normal file
35
board/shredos/genimage.cfg
Normal file
@@ -0,0 +1,35 @@
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
extraargs = "-F 32 -n SHREDOS"
|
||||
file boot/grub/grub.cfg { image = 'grub.cfg' }
|
||||
file boot/shredos { image = 'bzImage' }
|
||||
file EFI/BOOT/bootx64.efi { image = 'bootx64.efi' }
|
||||
file EFI/BOOT/grub.cfg { image = 'grub.cfg' }
|
||||
}
|
||||
|
||||
size = 37748736
|
||||
}
|
||||
|
||||
image shredos.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition boot {
|
||||
in-partition-table = "no"
|
||||
image = "boot.img"
|
||||
offset = 0
|
||||
size = 512
|
||||
}
|
||||
|
||||
partition grub {
|
||||
in-partition-table = "no"
|
||||
image = "grub.img"
|
||||
offset = 512
|
||||
}
|
||||
|
||||
partition vfat {
|
||||
partition-type = 0xC
|
||||
image = "boot.vfat"
|
||||
offset = 646656
|
||||
}
|
||||
}
|
||||
6
board/shredos/grub.cfg
Normal file
6
board/shredos/grub.cfg
Normal file
@@ -0,0 +1,6 @@
|
||||
set default="0"
|
||||
set timeout="0"
|
||||
|
||||
menuentry "shredos" {
|
||||
linux /boot/shredos console=tty3 loglevel=3 acpi=off
|
||||
}
|
||||
4430
board/shredos/kernel-4.14-defconfig.config
Normal file
4430
board/shredos/kernel-4.14-defconfig.config
Normal file
File diff suppressed because it is too large
Load Diff
4431
board/shredos/kernel-5.6-defconfig.config
Normal file
4431
board/shredos/kernel-5.6-defconfig.config
Normal file
File diff suppressed because it is too large
Load Diff
32
board/shredos/patches/grub2/001-remove-messages.patch
Normal file
32
board/shredos/patches/grub2/001-remove-messages.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
diff --git a/grub-core/kern/main.c b/grub-core/kern/main.c
|
||||
index 3262444..3e37133 100644
|
||||
--- a/grub-core/kern/main.c
|
||||
+++ b/grub-core/kern/main.c
|
||||
@@ -211,8 +211,8 @@ grub_main (void)
|
||||
grub_machine_init ();
|
||||
|
||||
/* Hello. */
|
||||
- grub_setcolorstate (GRUB_TERM_COLOR_HIGHLIGHT);
|
||||
- grub_printf ("Welcome to GRUB!\n\n");
|
||||
+ //grub_setcolorstate (GRUB_TERM_COLOR_HIGHLIGHT);
|
||||
+ //grub_printf ("Welcome to GRUB!\n\n");
|
||||
grub_setcolorstate (GRUB_TERM_COLOR_STANDARD);
|
||||
|
||||
/* Load pre-loaded modules and free the space. */
|
||||
diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c
|
||||
index 7e0a158..255db71 100644
|
||||
--- a/grub-core/normal/menu.c
|
||||
+++ b/grub-core/normal/menu.c
|
||||
@@ -672,9 +672,9 @@ static void
|
||||
notify_booting (grub_menu_entry_t entry,
|
||||
void *userdata __attribute__((unused)))
|
||||
{
|
||||
- grub_printf (" ");
|
||||
- grub_printf_ (N_("Booting `%s'"), entry->title);
|
||||
- grub_printf ("\n\n");
|
||||
+ //grub_printf (" ");
|
||||
+ //grub_printf_ (N_("Booting `%s'"), entry->title);
|
||||
+ grub_printf ("\nShred OS - booting...\n");
|
||||
}
|
||||
|
||||
/* Callback invoked when a default menu entry executed because of a timeout
|
||||
37
configs/shredos_defconfig
Normal file
37
configs/shredos_defconfig
Normal file
@@ -0,0 +1,37 @@
|
||||
BR2_x86_64=y
|
||||
BR2_GLOBAL_PATCH_DIR="board/shredos/patches"
|
||||
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_CXX=y
|
||||
BR2_TARGET_GENERIC_HOSTNAME="shredos"
|
||||
BR2_TARGET_GENERIC_ISSUE="ShredOS"
|
||||
BR2_INIT_SYSV=y
|
||||
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
|
||||
# BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set
|
||||
# BR2_ENABLE_LOCALE_PURGE is not set
|
||||
BR2_ROOTFS_OVERLAY="board/shredos/fsoverlay"
|
||||
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/shredos/doimg.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/shredos/kernel-5.6-defconfig.config"
|
||||
BR2_PACKAGE_BINUTILS=y
|
||||
BR2_PACKAGE_DMIDECODE=y
|
||||
BR2_PACKAGE_HDPARM=y
|
||||
BR2_PACKAGE_KBD=y
|
||||
BR2_PACKAGE_PARTED=y
|
||||
BR2_PACKAGE_SMARTMONTOOLS=y
|
||||
BR2_PACKAGE_TRIGGERHAPPY=y
|
||||
BR2_PACKAGE_LIBATASMART=y
|
||||
BR2_PACKAGE_ELFUTILS=y
|
||||
BR2_PACKAGE_NCURSES=y
|
||||
BR2_PACKAGE_COREUTILS=y
|
||||
BR2_PACKAGE_UTIL_LINUX_BINARIES=y
|
||||
BR2_PACKAGE_UTIL_LINUX_MOUNT=y
|
||||
BR2_TARGET_ROOTFS_CPIO_LZMA=y
|
||||
BR2_TARGET_ROOTFS_EXT2=y
|
||||
BR2_TARGET_ROOTFS_EXT2_SIZE="512M"
|
||||
BR2_TARGET_ROOTFS_INITRAMFS=y
|
||||
# BR2_TARGET_ROOTFS_TAR is not set
|
||||
BR2_TARGET_GRUB2=y
|
||||
BR2_TARGET_GRUB2_X86_64_EFI=y
|
||||
BR2_TARGET_GRUB2_BUILTIN_MODULES="boot linux ext2 fat squash4 part_msdos part_gpt normal biosdisk"
|
||||
BR2_PACKAGE_HOST_GENIMAGE=y
|
||||
22
defconfig
Normal file
22
defconfig
Normal file
@@ -0,0 +1,22 @@
|
||||
BR2_x86_64=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_CXX=y
|
||||
BR2_TARGET_GENERIC_HOSTNAME="shredos"
|
||||
BR2_TARGET_GENERIC_ISSUE="Welcome To ShredOS"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="buildroot"
|
||||
BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
|
||||
BR2_PACKAGE_BUSYBOX_INDIVIDUAL_BINARIES=y
|
||||
BR2_PACKAGE_DMIDECODE=y
|
||||
BR2_PACKAGE_HDPARM=y
|
||||
BR2_PACKAGE_KBD=y
|
||||
BR2_PACKAGE_NVME=y
|
||||
BR2_PACKAGE_SMARTMONTOOLS=y
|
||||
BR2_PACKAGE_TRIGGERHAPPY=y
|
||||
BR2_PACKAGE_COREUTILS=y
|
||||
BR2_PACKAGE_COREUTILS_INDIVIDUAL_BINARIES=y
|
||||
BR2_PACKAGE_VIM=y
|
||||
BR2_TARGET_ROOTFS_CPIO=y
|
||||
BR2_TARGET_ROOTFS_EXT2=y
|
||||
BR2_TARGET_ROOTFS_EXT2_SIZE="512M"
|
||||
BR2_TARGET_GRUB2=y
|
||||
6
package/hexedit/Config.in
Normal file
6
package/hexedit/Config.in
Normal file
@@ -0,0 +1,6 @@
|
||||
config BR2_PACKAGE_HEXEDIT
|
||||
bool "hexedit"
|
||||
help
|
||||
Hexedit
|
||||
|
||||
comment "hexedit"
|
||||
2
package/hexedit/hexedit.hash
Normal file
2
package/hexedit/hexedit.hash
Normal file
@@ -0,0 +1,2 @@
|
||||
sha1 4389a1866e7a5cac213131431e5ce757568ef693 hexedit-1.4.2.tar.gz
|
||||
|
||||
18
package/hexedit/hexedit.mk
Normal file
18
package/hexedit/hexedit.mk
Normal file
@@ -0,0 +1,18 @@
|
||||
################################################################################
|
||||
#
|
||||
# hexedit
|
||||
#
|
||||
################################################################################
|
||||
|
||||
HEXEDIT_VERSION = 1.4.2
|
||||
HEXEDIT_SITE = $(call github,pixel,hexedit,$(HEXEDIT_VERSION))
|
||||
HEXEDIT_DEPENDENCIES = ncurses parted
|
||||
|
||||
define HEXEDIT_INITSH
|
||||
(cd $(@D) && ./autogen.sh);
|
||||
endef
|
||||
|
||||
HEXEDIT_POST_PATCH_HOOKS += HEXEDIT_INITSH
|
||||
|
||||
|
||||
$(eval $(autotools-package))
|
||||
10
package/nwipe/Config.in
Normal file
10
package/nwipe/Config.in
Normal file
@@ -0,0 +1,10 @@
|
||||
config BR2_PACKAGE_NWIPE
|
||||
bool "nwipe"
|
||||
select BR2_PACKAGE_NCURSES
|
||||
select BR2_PACKAGE_PARTED
|
||||
select BR2_PACKAGE_COREUTILS
|
||||
select BR2_PACKAGE_DMIDECODE
|
||||
help
|
||||
NWipe
|
||||
|
||||
comment "nwipe"
|
||||
1
package/nwipe/nwipe.hash
Normal file
1
package/nwipe/nwipe.hash
Normal file
@@ -0,0 +1 @@
|
||||
sha1 243af172e79cc4fd7d0c52abaf2ef258ae606371 nwipe-v0.29.001.tar.gz
|
||||
18
package/nwipe/nwipe.mk
Normal file
18
package/nwipe/nwipe.mk
Normal file
@@ -0,0 +1,18 @@
|
||||
################################################################################
|
||||
#
|
||||
# nwipe
|
||||
#
|
||||
################################################################################
|
||||
|
||||
NWIPE_VERSION = v0.29.001
|
||||
NWIPE_SITE = $(call github,PartialVolume,nwipe,$(NWIPE_VERSION))
|
||||
NWIPE_DEPENDENCIES = ncurses parted dmidecode coreutils
|
||||
|
||||
define NWIPE_INITSH
|
||||
(cd $(@D) && ./init.sh);
|
||||
endef
|
||||
|
||||
NWIPE_POST_PATCH_HOOKS += NWIPE_INITSH
|
||||
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user