Compare commits

...

47 Commits

Author SHA1 Message Date
PartialVolume
f5c1da45a9 Merge pull request #468 from desertwitch/upstream-fixes2
Nwipe versioning fixes & add 32-bit EFI to 64-bit builds
2026-02-18 11:57:09 +00:00
desertwitch
b7dcf284c9 chore(board): copy over 32-bit EFI for IMG 2026-02-18 10:58:13 +01:00
desertwitch
95872d0744 fix(nwipe): use less generic variable name 2026-02-18 10:45:23 +01:00
desertwitch
9b9c569e66 fix(nwipe): use sanitized variable 2026-02-18 10:35:40 +01:00
desertwitch
63ad758ad5 fix(nwipe): sanitize global arch variable 2026-02-18 10:33:35 +01:00
desertwitch
68710cedf1 chore(board): add 32-bit EFI to IMG 2026-02-18 10:26:09 +01:00
desertwitch
e2d8217ff8 fix(nwipe): evaluate variables on use 2026-02-18 10:22:40 +01:00
PartialVolume
58399ade5a Merge pull request #467 from desertwitch/smartdmt-readme
Smartdmt documentation
2026-02-18 09:16:48 +00:00
desertwitch
fcd4a17e44 chore(smartdmt): bump default version 2026-02-18 09:30:13 +01:00
desertwitch
5b710a81a6 chore(docs): add smartdmt documentation 2026-02-18 09:30:01 +01:00
desertwitch
6f212156fb chore(nwipe): print out case 2026-02-18 08:51:07 +01:00
desertwitch
03ba568178 chore(nwipe): print out commands 2026-02-18 08:49:33 +01:00
desertwitch
c8f737eb0a chore(nwipe): revert arch dependencies in config
A build may otherwise silently omit building nwipe, and we already check the architecture requirement as part of the pre-configure hook.
2026-02-18 08:13:33 +01:00
desertwitch
e6e4a2bab3 chore(nwipe): add arch dependencies 2026-02-18 08:12:02 +01:00
desertwitch
39d2a25c74 chore(nwipe): rename definition 2026-02-18 08:07:35 +01:00
desertwitch
e1f99a053d chore(nwipe): refactor config 2026-02-18 07:57:39 +01:00
desertwitch
3abe570540 chore(build): always rebuild nwipe for versioning 2026-02-18 07:56:02 +01:00
desertwitch
ecea0be3bd fix(nwipe): version replacement 2026-02-18 07:55:35 +01:00
desertwitch
3200381771 chore(board): add default 32-bit EFI 2026-02-18 07:10:01 +01:00
desertwitch
caf93d8106 chore(iso9660): add 32-bit EFI to 64-bit builds 2026-02-18 07:03:51 +01:00
PartialVolume
2ac8113e93 Merge pull request #465 from desertwitch/ssmart
feat: add SMART monitoring terminal
2026-02-17 23:07:41 +00:00
PartialVolume
54e7f83122 Merge pull request #466 from desertwitch/upstream-fixes2
QoL improvements
2026-02-17 22:32:38 +00:00
desertwitch
3cd5ee3f1e chore(iso9660): combine definitions 2026-02-17 20:28:48 +01:00
desertwitch
e7b2317d05 chore(board): rename iso arch to i686 2026-02-17 18:10:47 +01:00
desertwitch
59ec5813c6 chore(docs): update build targets 2026-02-17 18:10:45 +01:00
desertwitch
b4316be330 chore(board): rename arch to i686 2026-02-17 18:10:39 +01:00
desertwitch
8aeffd36d6 chore(iso9660): refactor for i686 2026-02-17 18:10:35 +01:00
desertwitch
e87c0f7a49 feat: add SMART monitoring terminal 2026-02-17 13:39:15 +01:00
PartialVolume
fd8eb7b898 Merge pull request #462 from PartialVolume/add-memtest86
Added memtest86+ to ShredOS boot menus
2026-02-11 10:36:14 +00:00
PartialVolume
e17537311c Added memtest86+ to both isolinux and grub2 boot menus, included the memtest package in all defconfigs 2026-02-11 10:33:54 +00:00
PartialVolume
92d50b61fd Merge pull request #458 from PartialVolume/update_nwipe_stable_release_selection
Simplify selection of git commit hash or revision tag v0.40 in menuconfig
2026-02-05 01:47:46 +00:00
PartialVolume
fad7da67a1 Simplify selection of git commit hash or revision tag v0.40 etc. by removing the hard coded references to the stable release and have just a single selection in menuconfig where you enter a commit hash or a version tag. This means for future updates I won't need to manually update the hard coded version or comments in nwipe.mk and Config.in that mention v0.40 to keep it relevent, I simply update the version in menuconfig to v0.41. Updated all defconfigs with the new revision string BR2_PACKAGE_NWIPE_GIT_REVISION="v0.40" 2026-02-05 01:42:19 +00:00
PartialVolume
df55edb486 Update README.md
Simplify maintenance of README.md by removing multiple links to latest and previous releases. Just have a single link to the latest release.
2026-02-04 21:31:24 +00:00
PartialVolume
d54617f898 Merge pull request #456 from desertwitch/patch-1
Build script minor clarification/quoting fix
2026-02-04 19:59:55 +00:00
Rysz
1989d7ab13 Fix quoting in directory change command 2026-02-04 14:16:15 +01:00
Rysz
9ae389d461 Clarification in building table comment
Make it clear for future readers that preclean runs a clean before step 0 of the building.
2026-02-04 14:14:52 +01:00
PartialVolume
af01857818 Merge pull request #454 from PartialVolume/update-stable-nwipe-release-to-0.40
Update the nwipe.mk, Config.in and defconfigs from 0.39 to 0.40.
2026-02-04 00:37:59 +00:00
PartialVolume
07f2d5057f Update the nwipe.mk and Config.in from 0.39 to 0.40. Update all defconfigs to stable release (0.40) 2026-02-04 00:36:03 +00:00
PartialVolume
6ab4b901b0 Merge pull request #453 from PartialVolume/ISO9660-volume-name
Make ISO9660 volume name upper case for maximum compatibility.
2026-02-01 00:59:24 +00:00
PartialVolume
ec2bee0a92 Make ISO9660 volume name upper case for maximum compatibility with older bootloaders 2026-02-01 00:57:12 +00:00
PartialVolume
6fd11b61ce Merge pull request #452 from PartialVolume/create-shredos_lite_defconfig
Add a new x86-64 light defconfig for 64bit systems with minimum 512MB RAM
2026-02-01 00:49:01 +00:00
PartialVolume
24e1f872d1 Add a new x86-64 light defconfig for systems manufactured between 2000-2010 with a minimum of 512MB of RAM 2026-02-01 00:45:50 +00:00
PartialVolume
20bdda24af Merge pull request #451 from PartialVolume/rename_and_checksum_images
Add creation of sha1 checksum files and add additional info to image filenames
2026-01-31 23:44:54 +00:00
PartialVolume
e06ba53380 Updated the script build_all_shredos.sh so that if the defconfig is lite or extra then lite and plus-partitionare inserted into the filename immediately prior to the extension. The placing of this extra information at the end of the version information is important. In this position it doesn't interfere with the search that is conducted in the script find_shredos_boot_script.sh in relation to the search for the shredos boot disc. The sha1 checksum is calculated and placed in a file with the same name as the image but with the addition of the extension.sha1. These .sha1 files are also copied to the folder dist/ along with the corresponding .iso or .img file. The addition of this extra information in the filenames makes the files unique amongst the group of build files. This is required when the .iso and .img files are uploaded when a ShredOS release is published 2026-01-31 23:35:15 +00:00
PartialVolume
6ede7ef074 Merge pull request #450 from PartialVolume/sync-shredos_i686_lite_defconfig
Sync i686 defconfigs and update build all script
2026-01-30 21:21:20 +00:00
PartialVolume
e962210590 Sync i686 defconfigs and update build all script 2026-01-30 21:16:31 +00:00
PartialVolume
4d30569cde Merge pull request #449 from PartialVolume/fix_img_build_error
Fix build error
2026-01-30 14:53:06 +00:00
24 changed files with 484 additions and 160 deletions

View File

@@ -19,29 +19,15 @@
#### For those that just want to get on with using ShredOS, you can download the pre-built .img or .iso images and burn them straight to USB flash drive or CD/DVD. Boot from the USB flash drive or CD/DVD and nwipe will appear ready for you to select your preferred wipe options.
[![GitHub all releases](https://img.shields.io/github/downloads/PartialVolume/shredos.x86_64/total?label=Total%20downloads%20x86_64%20all%20releases,%2064%20and%2032bit%20code,%20.iso%20and%20.img%20&style=plastic)](https://github.com/PartialVolume/shredos.x86_64/releases)
### ShredOS version v2025.11_28_x86-64_0.40 [(Latest release - Release notes and downloads)](https://github.com/PartialVolume/shredos.x86_64/releases/tag/v2025.11_28_x86-64_0.40)
## Download the Latest ShredOS .img and .iso files for burning to USB flash drives and CD-R/DVD-R.
NOTE! There may be pre-release versions that are newer than the latest versions listed below, To see all versions, [pre-release & latest](https://github.com/PartialVolume/shredos.x86_64/releases) The latest versions contain a full set of .img & .iso images in 32bit & 64bit while the pre-releases generally only contain a 64bit .img. Which should you use? Well, unless you need either 32 bit images or .iso images I would tend to download the very latest pre-release. Even the pre-releases are subjected to a fair amount of testing before they become a pre-release.
### ShredOS version v2024.11_27_x86-64_0.38 [(Latest Release - Details)](https://github.com/PartialVolume/shredos.x86_64/releases/tag/v2024.11_27_x86-64_0.38)
| Nwipe Version | File to download |
| -- | -- |
| v0.38 | [ShredOS .img x86_64bit for USB Vanilla](https://github.com/PartialVolume/shredos.x86_64/releases/download/v2024.11_27_x86-64_0.38/shredos-2024.11_27_x86-64_0.38_20250123.img) |
| v0.38 | [ShredOS .iso x86_64bit for CD/DVD/Ventoy, Vanilla](https://github.com/PartialVolume/shredos.x86_64/releases/download/v2024.11_27_x86-64_0.38/shredos-2024.11_27_x86-64_0.38_20250125_vanilla.iso) |
| v0.38 | [ShredOS .iso x86_64bit for CD/DVD/Ventoy nomodeset ](https://github.com/PartialVolume/shredos.x86_64/releases/download/v2024.11_27_x86-64_0.38/shredos-2024.11_27_x86-64_0.38_20250125_nomodeset.iso) |
| v0.38 | [ShredOS .img i586_32bit for USB vanilla ](https://github.com/PartialVolume/shredos.x86_64/releases/download/v2024.11_27_x86-64_0.38/shredos-2024.11_27_i586_32bit_0.38_20250127_vanilla.img) |
| v0.38 | [ShredOS .iso i586_32bit for CD/DVD/Ventoy vanilla ](https://github.com/PartialVolume/shredos.x86_64/releases/download/v2024.11_27_x86-64_0.38/shredos-2024.11_27_i586_32bit_0.38_20250128_vanilla.iso) |
### ShredOS version v2024.02.2_26.0_x86-64_0.37 [(Previous Release - Details)](https://github.com/PartialVolume/shredos.x86_64/releases/tag/v2024.02.2_26.0_x86-64_0.37)
| Nwipe Version | File to download |
| -- | -- |
| v0.37 | [ShredOS .img x86_64bit for USB Vanilla](https://github.com/PartialVolume/shredos.x86_64/releases/download/v2024.02.2_26.0_x86-64_0.37/shredos-2024.02.2_26.0_x86-64_0.37_20240610.img) |
| v0.37 | [ShredOS .iso x86_64bit for CD/DVD/Ventoy, Vanilla](https://github.com/PartialVolume/shredos.x86_64/releases/download/v2024.02.2_26.0_x86-64_0.37/shredos-2024.02.2_26.0_x86-64_0.37_20240611.iso) |
| v0.37 | [ShredOS .iso x86_64bit for CD/DVD/Ventoy nomodeset ](https://github.com/PartialVolume/shredos.x86_64/releases/download/v2024.02.2_26.0_x86-64_0.37/shredos-2024.02.2_26.0_x86-64_0.37-nomodeset_20240611.iso) |
### For all releases including latest and more recent pre-releases [releases](https://github.com/PartialVolume/shredos.x86_64/releases)
Note for versions **after** _v2024.11_27_x86-64_0.38_: The .img files for burning to USB flash drives support both BIOS/UEFI booting, as well as saving of generated PDF reports to the USB flash drive. The .iso image also supports both BIOS/UEFI booting, burning to USB flash drives and CD/DVD-ROM, but not (yet) saving of generated PDF reports to the USB flash drive (unless being written in "ISO-Mode" with some tools, such as Rufus). Use the .img file whenever needing these generated PDF reports or planning to customize ShredOS (`autonuke` setups, kernel parameters, ...). The .img file also allows direct interaction with the filesystem and modification of the GRUB boot menu, e.g. appending of kernel parameters, which the .iso file does not support due to filesystem constraints.
Note for versions **after** _v2024.11_27_x86-64_0.38_: The .img files for burning to USB flash drives support both BIOS/UEFI booting, as well as saving of generated PDF reports to the USB flash drive. The .iso image also supports both BIOS/UEFI booting, burning to USB flash drives and CD/DVD-ROM and if you use the `partion-plus` iso, saving of generated PDF reports to the USB flash drive. Use the .img file whenever planning to customize ShredOS (`autonuke` setups, kernel parameters, ...). The .img file also allows direct interaction with the filesystem and modification of the GRUB boot menu, e.g. appending of kernel parameters, which the .iso file does not support due to filesystem constraints.
Note for versions **until** _v2024.11_27_x86-64_0.38_: The .img files for burning to USB flash drives support both BIOS/UEFI booting. The .iso image supports legacy BIOS booting only and not UEFI, however, a BIOS/UEFI version of the .iso is available in newer ShredOS versions.
You can also consider [VENTOY (Open Source tool to create bootable USB drive for ISO/WIM/IMG/VHD(x)/EFI files)](https://github.com/ventoy/Ventoy) as a workaround to avoid BIOS/UEFI issues.
@@ -240,7 +226,7 @@ Create the new ShredOS .img file
Copy shredos_with_mods.img to the root of the Ventoy USB stick and boot the Ventoy USB stick. You can confirm your changes to the kernel commmand line by booting ShredOS, switching to a virtual terminal ALT F2, and type `more /proc/cmdline`
## Virtual Terminals
ShredOS has three tty terminals, ALT-F1 (Where nwipe is initially launched), ALT-F2 (A virtual terminal), ALT-F3 (console log, login required which is root with no password). Typical use of a virtual terminal might be to run other disk related tools such as hdparm to remove hidden sectors or hexedit to display the contents of the disk as hexadecimal values.
ShredOS has four tty terminals, ALT-F1 (Where nwipe is initially launched), ALT-F2 (A virtual terminal), ALT-F3 (console log, login required which is root with no password), ALT-F4 ([SMART Monitoring Terminal](#smartdmt)). Typical use of a virtual terminal might be to run other disk related tools such as hdparm to remove hidden sectors or hexedit to display the contents of the disk as hexadecimal values.
## How to exclude the FAT formatted ShredOS Boot drive from Nwipe, interactive and autonuke modes
There are two methods that can be used to exclude the FAT formatted ShredOS boot drive from appearing in nwipe's interactive mode or autonuke modes.
@@ -591,7 +577,13 @@ After running the setfont command.
## Included Packages
#### smartmontools
Nwipes ability to detect serial numbers on USB devices now works on USB bridges who's chipset supports that functionality. Smartmontools provides nwipe with that capability. Smartmontools can be used in the second or third virtual terminal. ALT-F2 and ALT-F3.
Nwipes ability to detect serial numbers on USB devices now works on USB bridges who's chipset supports that functionality. Smartmontools provides nwipe with that capability. Smartmontools can be used in the second or third virtual terminal (ALT-F2 and ALT-F3).
#### smartdmt
For convenience a SMART Monitoring Terminal is available in the fourth virtual terminal (ALT-F4).
It allows to observe all SMART information on one screen and without interacting with the command-line.
![smartdmt](/images/smartdmt.gif)
#### hdparm
hdparm has many uses and is a powerfull tool. Although Nwipe will be adding ATA secure erase capability, i.e using the hard disk own firmware to initiate an erase, nwipe currently wipes drives using the traditional method of writing to every block. If you want to initiate a ATA secure erase using the drives firmware then hdparm will be of use.
@@ -821,18 +813,13 @@ $ dd if=shredos-20200412.img of=/dev/sdx (20200412 will be the day you compiled,
#### The following configurations are available to build different targets:
- `make shredos_defconfig` - build USB image and hybrid ISO (64-bit)
- `make shredos_i586_defconfig` - build USB image and hybrid ISO (32-bit)
- `make shredos_img_defconfig` - build USB image only (64-bit)
- `make shredos_img_i586_defconfig` - build USB image only (32-bit)
- `make shredos_iso_defconfig` - build hybrid ISO only (64-bit)
- `make shredos_iso_i586_defconfig` - build hybrid ISO only (32-bit)
- `make shredos_iso_legacy_defconfig` - build legacy ISO only (64-bit)
- `make shredos_iso_legacy_i586_defconfig` - build legacy ISO only (32-bit)
- `make shredos_lite_defconfig` - build lighter USB image and hybrid ISO (64-bit)
- `make shredos_i686_lite_defconfig` - build lighter USB image and hybrid ISO (32-bit)
#### The following experimental configurations are available for testing:
- `make shredos_iso_extra_defconfig` - build hybrid ISO with appended writeable partition (64-bit)
- `make shredos_iso_extra_i586_defconfig` - build hybrid ISO with appended writeable partition (32-bit)
- `make shredos_iso_extra_i686_lite_defconfig` - build lighter hybrid ISO with appended writeable partition (32-bit)
Do note that loading a configuration should typically be the last step before `make`.
@@ -847,8 +834,6 @@ Do note that loading a configuration should typically be the last step before `m
> partition at burn-time, which then also allows customization of the GRUB
> configuration.
>
>The **extra** ISOs (experimental) have an "extra" write partition appended.
>The **legacy** ISOs work in BIOS and UEFI, but only as burned to CD/DVD-ROM.
#### Building multiple configurations:

BIN
board/shredos/bootia32.efi Normal file

Binary file not shown.

View File

@@ -16,6 +16,8 @@ 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
# tty3 is reserved for the regular console
4:3:respawn:/sbin/getty 38400 tty4 -n -l /usr/bin/smartdmt_launcher
# Stuff to do for the 3-finger salute
#ca::ctrlaltdel:/sbin/reboot

View File

@@ -0,0 +1,18 @@
#!/bin/sh
trap "echo" INT
sleep 2
if [ -x /usr/bin/smartdmt ]; then
while true; do
/usr/bin/smartdmt
echo "Press ENTER to restart SMART Device Monitoring Terminal..."
read dummy
clear
done
else
while true; do
echo "SMART Device Monitoring Terminal is not available in this version of ShredOS."
read dummy
clear
done
fi

View File

@@ -5,14 +5,17 @@ image boot.vfat {
file boot/grub/grub.cfg { image = 'grub.cfg' }
file boot/version.txt { image = 'version.txt' }
file boot/shredos.id { image = '/dev/null' }
file boot/memtest { image = 'memtest.bin' }
file EFI/BOOT/bootia32.efi { image = 'bootia32.efi' }
file EFI/BOOT/bootx64.efi { image = 'bootx64.efi' }
file EFI/BOOT/grub.cfg { image = 'grub.cfg' }
file EFI/BOOT/memtest.efi { image = 'memtest.efi' }
file shredos.ico { image = 'shredos.ico' }
file README.txt { image = 'README.txt' }
file autorun.inf { image = 'autorun.inf' }
}
size = 372809984
size = 119873792
}
image shredos.img {

View File

@@ -5,15 +5,17 @@ image boot.vfat {
file boot/grub/grub.cfg { image = 'grub.cfg' }
file boot/version.txt { image = 'version.txt' }
file boot/shredos.id { image = '/dev/null' }
file boot/memtest { image = 'memtest.bin' }
file EFI/BOOT/bootia32.efi { image = 'bootia32.efi' }
file EFI/BOOT/bootx64.efi { image = 'bootx64.efi'}
file EFI/BOOT/grub.cfg { image = 'grub.cfg' }
file EFI/BOOT/memtest.efi { image = 'memtest.efi' }
file shredos.ico { image = 'shredos.ico' }
file README.txt { image = 'README.txt' }
file autorun.inf { image = 'autorun.inf' }
}
size = 92344064
size = 115277568
}
image shredos.img {

View File

@@ -5,6 +5,35 @@ menuentry "ShredOS" {
linux /boot/bzImage console=tty3 loglevel=3
}
menuentry "ShredOS (nomodeset)" {
menuentry "ShredOS (nomodeset - display issues? try this)" {
linux /boot/bzImage console=tty3 loglevel=3 nomodeset
}
if [ "${grub_platform}" = "efi" ]; then
menuentry "Memtest86+ (BIOS legacy emulation for USB keyboard)" {
linux /EFI/BOOT/memtest.efi keyboard=legacy
}
menuentry "Memtest86+ (USB keyboards)" {
linux /EFI/BOOT/memtest.efi keyboard=both
}
menuentry "Memtest86+ (Disable SMP and memory identification)" {
linux /EFI/BOOT/memtest.efi nosmp nosm nobench
}
fi
if [ "${grub_platform}" = "pc" ]; then
menuentry "Memtest86+ (Use BIOS legacy emulation for USB keyboards)" {
linux /boot/memtest keyboard=legacy
}
menuentry "Memtest86+ (USB keyboards)" {
linux /boot/memtest keyboard=both
}
menuentry "Memtest86+ (Disable SMP and memory identification)" {
linux /boot/memtest nosmp nosm nobench
}
menuentry "Memtest86+ (Serial line RS232, ttyS0,115200)" {
linux /boot/memtest console=ttyS0,115200
}
fi

View File

@@ -6,7 +6,34 @@ menuentry "ShredOS" {
initrd __INITRD_PATH__
}
menuentry "ShredOS (nomodeset)" {
menuentry "ShredOS (nomodeset - display issues? try this)" {
linux __KERNEL_PATH__ console=tty3 loglevel=3 nomodeset
initrd __INITRD_PATH__
}
if [ "${grub_platform}" = "efi" ]; then
menuentry "Memtest86+ (BIOS legacy emulation for USB keyboard)" {
linux /EFI/BOOT/memtest.efi keyboard=legacy
}
menuentry "Memtest86+ (USB keyboards)" {
linux /EFI/BOOT/memtest.efi keyboard=both
}
menuentry "Memtest86+ (Disable SMP and memory identification)" {
linux /EFI/BOOT/memtest.efi nosmp nosm nobench
}
fi
if [ "${grub_platform}" = "pc" ]; then
menuentry "Memtest86+ (BIOS legacy emulation for USB keyboard)" {
linux /boot/memtest keyboard=legacy
}
menuentry "Memtest86+ (USB keyboards)" {
linux /boot/memtest keyboard=both
}
menuentry "Memtest86+ (Disable SMP and memory identification)" {
linux /boot/memtest nosmp nosm nobench
}
menuentry "Memtest86+ (Serial line RS232, ttyS0,115200)" {
linux /boot/memtest console=ttyS0,115200
}
fi

View File

@@ -10,6 +10,21 @@ label shredos
append initrd=__INITRD_PATH__ console=tty3 loglevel=3
label shredos-nomodeset
menu label ShredOS (nomodeset)
menu label ShredOS (nomodeset - display issues? try this)
kernel __KERNEL_PATH__
append initrd=__INITRD_PATH__ console=tty3 loglevel=3 nomodeset
label memtest86-bios-legacy-emulation-usb-keyboards
menu label Memtest86+ (use BIOS legacy emulation for USB keyboards)
kernel /boot/memtest
append keyboard=legacy
label memtest86-usb-keyboards
menu label Memtest86+ (USB Keyboards)
kernel /boot/memtest
append keyboard=both
label memtest86-serial
menu label Memtest86+ (Serial line RS232, ttyS0,115200 )
kernel /boot/memtest
append console=ttyS0,115200

View File

@@ -1,20 +1,18 @@
#!/bin/bash -e
if grep -Eq "^BR2_ARCH_IS_64=y$" "${BR2_CONFIG}"; then
MKIMAGE_ARCH=x86_64
MKIMAGE_EFI=bootx64.efi
MKIMAGE_ARCH=x86-64
MKIMAGE_CFG=genimage.cfg
else
MKIMAGE_ARCH=i586
MKIMAGE_EFI=bootia32.efi
MKIMAGE_CFG=genimage_i586.cfg
MKIMAGE_ARCH=i686
MKIMAGE_CFG=genimage_i686.cfg
fi
version=$(cat board/shredos/fsoverlay/etc/shredos/version.txt)
cp "board/shredos/grub.cfg" "${BINARIES_DIR}/grub.cfg" || exit 1
cp "output/target/lib/grub/i386-pc/boot.img" "${BINARIES_DIR}/boot.img" || exit 1
cp "${BINARIES_DIR}/efi-part/EFI/BOOT/${MKIMAGE_EFI}" "${BINARIES_DIR}/${MKIMAGE_EFI}" || exit 1
cp "${BINARIES_DIR}/efi-part/EFI/BOOT/bootia32.efi" "${BINARIES_DIR}/bootia32.efi" || exit 1
cp "${BINARIES_DIR}/efi-part/EFI/BOOT/bootx64.efi" "${BINARIES_DIR}/bootx64.efi" || exit 1
cp "board/shredos/autorun.inf" "${BINARIES_DIR}/autorun.inf" || exit 1

View File

@@ -1,9 +1,9 @@
#!/bin/bash -e
if grep -Eq "^BR2_ARCH_IS_64=y$" "${BR2_CONFIG}"; then
MKIMAGE_ARCH=x86_64
MKIMAGE_ARCH=x86-64
else
MKIMAGE_ARCH=i386
MKIMAGE_ARCH=i686
fi
version=$(cat board/shredos/fsoverlay/etc/shredos/version.txt)

View File

@@ -29,21 +29,21 @@ VERSION_FILE="board/shredos/fsoverlay/etc/shredos/version.txt"
# 64-bit configurations to build:
X64_CONFIGS=(
"shredos_defconfig"
"shredos_iso_legacy_defconfig"
"shredos_iso_extra_defconfig" # experimental
"shredos_lite_defconfig"
"shredos_iso_extra_defconfig"
)
# 32-bit configurations to build:
X32_CONFIGS=(
"shredos_i686_lite_defconfig"
"shredos_iso_legacy_i686_defconfig"
"shredos_iso_extra_i686_defconfig" # experimental
"shredos_iso_extra_i686_lite_defconfig"
)
# Packages always needing rebuild between runs, even for the same architecture.
# This only applies when QUICK_BUILD is enabled, otherwise rebuilds everything.
ALWAYS_REBUILD_PKGS=(
"grub2"
"nwipe" # For specific version/banner patching
"grub2" # For specific bootloader generation
)
################################################################################
@@ -274,11 +274,13 @@ build_config() {
# Build | QuickBuild=1, PreClean=1 | QuickBuild=0, PreClean=1 | QuickBuild=1, PreClean=0 | QuickBuild=0, PreClean=0
# -------|---------------------------|---------------------------|---------------------------|---------------------------
# x64 #0 | config -> make | config -> make | config -> rebuild -> make | config -> rebuild -> make
# x64 #0 | clean* -> config -> make | clean* -> config -> make | config -> rebuild -> make | config -> rebuild -> make
# x64 #1 | config -> rebuild -> make | clean -> config -> make | config -> rebuild -> make | clean -> config -> make
# x64 #2+| config -> rebuild -> make | clean -> config -> make | config -> rebuild -> make | clean -> config -> make
# x32 #0 | clean -> config -> make | clean -> config -> make | clean -> config -> make | clean -> config -> make
# x32 #1+| config -> rebuild -> make | clean -> config -> make | config -> rebuild -> make | clean -> config -> make
# -------|---------------------------|---------------------------|---------------------------|---------------------------
# *: This clean is ensured in another part of the script before reaching this point.
if [ "$index" -ne 0 ] && [ "$QUICK_BUILD" -eq 1 ] && [ "$FORCE_CLEAN" -ne 1 ]; then
# If it's not the first configuration, and quick-build is enabled,
@@ -411,9 +413,12 @@ build_config_success() {
run_cmd mv "$log_file" "dist/${config}-SUCCESS.log"
fi
rename_and_checksum_images "$config"
run_cmd mkdir -p "dist/$config"
run_cmd mv output/images/shredos*.iso "dist/$config/" 2>/dev/null || true
run_cmd mv output/images/shredos*.img "dist/$config/" 2>/dev/null || true
run_cmd mv output/images/shredos*.sha1 "dist/$config/" 2>/dev/null || true
printf "%b" "$GREEN"
echo
@@ -465,6 +470,79 @@ build_config_failed() {
fi
}
# Function to handle suffix insertion before the extension
insert_suffix() {
local fname="$1"
local suffix="$2"
local base="${fname%.*}"
local ext="${fname##*.}"
echo "${base}${suffix}.${ext}"
}
rename_and_checksum_images() {
local config="$1"
target_dir="output/images"
# If the defconfig contains the string `lite`, i.e a reduced size
# so it will boot on systems with only 512MB of RAM then insert
# into the .iso or .img filename the string _lite prior to the extension.
if [[ "$config" == *"lite"* ]]; then
shopt -s nullglob
for file in "$target_dir"/shredos*.{iso,img}; do
filename=$(basename "$file")
if [[ "$filename" != *"_lite"* ]]; then
new_name=$(insert_suffix "$filename" "_lite")
mv -v "$file" "$target_dir/$new_name"
fi
done
shopt -u nullglob
else
echo "Condition not met: 'lite' not in $config, rename not necessary."
fi
# If the defconfig contains the string `extra`, i.e an extra partition
# then insert into the .iso or .img filename the string _plus-partition
if [[ "$config" == *"extra"* ]]; then
shopt -s nullglob
for file in "$target_dir"/shredos*.{iso,img}; do
filename=$(basename "$file")
if [[ "$filename" != *"_plus-partition"* ]]; then
new_name=$(insert_suffix "$filename" "_plus-partition")
mv -v "$file" "$target_dir/$new_name"
fi
done
shopt -u nullglob
else
echo "Condition not met: 'extra' not in $config, rename not necessary."
fi
# Clean up orphaned .sha1 files (that don't match any existing image)
echo "Cleaning up orphaned .sha1 files..."
shopt -s nullglob
for sha_file in "$target_dir"/shredos*.sha1; do
# Strip .sha1 to find the base image name
corresponding_image="${sha_file%.sha1}"
if [[ ! -f "$corresponding_image" ]]; then
rm -v "$sha_file"
fi
done
shopt -u nullglob
# Calculate SHA1 for all final files
echo "Calculating SHA1 checksums..."
current_dir=$(pwd)
cd "$target_dir" || exit
shopt -s nullglob
for file in shredos*.{iso,img}; do
sha1sum "$file" > "$file.sha1"
done
shopt -u nullglob
cd "$current_dir" || exit
echo "[DONE]"
}
################################################################################
if [ -f "build_all_shredos.log" ]; then

View File

@@ -45,6 +45,7 @@ BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT=y
BR2_PACKAGE_E2FSPROGS=y
BR2_PACKAGE_EXFATPROGS=y
BR2_PACKAGE_NTFS_3G=y
BR2_PACKAGE_SMARTDMT=y
BR2_PACKAGE_ASCII_INVADERS=y
BR2_PACKAGE_FBDUMP=y
BR2_PACKAGE_FBGRAB=y
@@ -92,6 +93,7 @@ BR2_PACKAGE_KBD=y
BR2_PACKAGE_LM_SENSORS=y
BR2_PACKAGE_LSHW=y
BR2_PACKAGE_LSSCSI=y
BR2_PACKAGE_MEMTEST86=y
BR2_PACKAGE_MINICOM=y
BR2_PACKAGE_NVME=y
BR2_PACKAGE_READ_EDID=y
@@ -117,8 +119,7 @@ BR2_PACKAGE_LIBCAP=y
BR2_PACKAGE_LIBCAP_NG=y
BR2_PACKAGE_LIBSECCOMP=y
BR2_PACKAGE_NWIPE=y
BR2_PACKAGE_NWIPE_VERSION_GIT_REVISION=y
BR2_PACKAGE_NWIPE_GIT_REVISION="26ece7a0525370f6ba39cddc5e73000b3cd867d6"
BR2_PACKAGE_NWIPE_GIT_REVISION="v0.40"
BR2_PACKAGE_LIBFRIBIDI=y
BR2_PACKAGE_NCURSES_WCHAR=y
BR2_PACKAGE_NCURSES_TARGET_PROGS=y
@@ -169,7 +170,7 @@ BR2_TARGET_ROOTFS_CPIO_LZMA=y
BR2_TARGET_ROOTFS_INITRAMFS=y
BR2_TARGET_ROOTFS_ISO9660=y
BR2_TARGET_ROOTFS_ISO9660_BOTH=y
BR2_TARGET_ROOTFS_ISO9660_VOLUME_NAME="ShredOS"
BR2_TARGET_ROOTFS_ISO9660_VOLUME_NAME="SHREDOS"
BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_BOOT_MENU="board/shredos/iso/isolinux.cfg"
BR2_TARGET_ROOTFS_ISO9660_GRUB2_BOOT_MENU="board/shredos/iso/grub.cfg"
BR2_TARGET_ROOTFS_ISO9660_GRUB2_EFI_BOOT_MENU="board/shredos/iso/efigrub.cfg"

View File

@@ -9,6 +9,8 @@ BR2_ROOTFS_MERGED_USR=y
BR2_SYSTEM_BIN_SH_BASH=y
BR2_SYSTEM_DEFAULT_PATH="/bin:/sbin:/usr/bin:/usr/sbin"
# BR2_ENABLE_LOCALE_PURGE is not set
BR2_GENERATE_LOCALE="en_US.UTF-8"
BR2_TARGET_TZ_INFO=y
BR2_ROOTFS_OVERLAY="board/shredos/fsoverlay"
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/shredos/make_iso_file.sh board/shredos/make_img_file.sh"
BR2_LINUX_KERNEL=y
@@ -22,36 +24,48 @@ BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=y
BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT=y
BR2_PACKAGE_E2FSPROGS=y
BR2_PACKAGE_NTFS_3G=y
BR2_PACKAGE_SMARTDMT=y
BR2_PACKAGE_LINUX_FIRMWARE=y
BR2_PACKAGE_LINUX_FIRMWARE_I915=y
BR2_PACKAGE_LINUX_FIRMWARE_XE=y
BR2_PACKAGE_LINUX_FIRMWARE_RADEON=y
BR2_PACKAGE_LINUX_FIRMWARE_BNX2X=y
BR2_PACKAGE_LINUX_FIRMWARE_CXGB4_T4=y
BR2_PACKAGE_LINUX_FIRMWARE_CXGB4_T5=y
BR2_PACKAGE_LINUX_FIRMWARE_INTEL_E100=y
BR2_PACKAGE_LINUX_FIRMWARE_INTEL_ICE=y
BR2_PACKAGE_LINUX_FIRMWARE_QLOGIC_4X=y
BR2_PACKAGE_LINUX_FIRMWARE_RTL_815X=y
BR2_PACKAGE_LINUX_FIRMWARE_RTL_8169=y
BR2_PACKAGE_EDID_DECODE=y
BR2_PACKAGE_HDPARM=y
BR2_PACKAGE_KBD=y
BR2_PACKAGE_LM_SENSORS=y
BR2_PACKAGE_MEMTEST86=y
BR2_PACKAGE_NVME=y
BR2_PACKAGE_READ_EDID=y
BR2_PACKAGE_PCIUTILS=y
BR2_PACKAGE_SG3_UTILS=y
BR2_PACKAGE_SG3_UTILS_PROGS=y
BR2_PACKAGE_SMARTMONTOOLS=y
BR2_PACKAGE_TRIGGERHAPPY=y
BR2_PACKAGE_LZ4=y
BR2_PACKAGE_KERNEL_CMDLINE_EXTRACTOR=y
BR2_PACKAGE_NWIPE=y
BR2_PACKAGE_NWIPE_VERSION_GIT_REVISION=y
BR2_PACKAGE_NWIPE_GIT_REVISION="26ece7a0525370f6ba39cddc5e73000b3cd867d6"
BR2_PACKAGE_NWIPE_GIT_REVISION="v0.40"
BR2_PACKAGE_NCURSES_WCHAR=y
BR2_PACKAGE_UTF8PROC=y
BR2_PACKAGE_XUTIL_UTIL_MACROS=y
BR2_PACKAGE_IPTABLES=y
BR2_PACKAGE_LFTP=y
BR2_PACKAGE_LFTP_PROTO_SFTP=y
BR2_PACKAGE_NTP=y
BR2_PACKAGE_NTP_NTPDATE=y
BR2_PACKAGE_NTP_NTPTIME=y
BR2_PACKAGE_OPENSSH=y
BR2_PACKAGE_TFTPD=y
BR2_PACKAGE_TMUX=y
BR2_PACKAGE_OPENSEACHEST=y
BR2_PACKAGE_UTIL_LINUX_BINARIES=y
BR2_PACKAGE_UTIL_LINUX_AGETTY=y
BR2_PACKAGE_UTIL_LINUX_FSCK=y

View File

@@ -46,6 +46,7 @@ BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT=y
BR2_PACKAGE_E2FSPROGS=y
BR2_PACKAGE_EXFATPROGS=y
BR2_PACKAGE_NTFS_3G=y
BR2_PACKAGE_SMARTDMT=y
BR2_PACKAGE_ASCII_INVADERS=y
BR2_PACKAGE_FBDUMP=y
BR2_PACKAGE_FBGRAB=y
@@ -93,6 +94,7 @@ BR2_PACKAGE_KBD=y
BR2_PACKAGE_LM_SENSORS=y
BR2_PACKAGE_LSHW=y
BR2_PACKAGE_LSSCSI=y
BR2_PACKAGE_MEMTEST86=y
BR2_PACKAGE_MINICOM=y
BR2_PACKAGE_NVME=y
BR2_PACKAGE_READ_EDID=y
@@ -118,8 +120,7 @@ BR2_PACKAGE_LIBCAP=y
BR2_PACKAGE_LIBCAP_NG=y
BR2_PACKAGE_LIBSECCOMP=y
BR2_PACKAGE_NWIPE=y
BR2_PACKAGE_NWIPE_VERSION_GIT_REVISION=y
BR2_PACKAGE_NWIPE_GIT_REVISION="26ece7a0525370f6ba39cddc5e73000b3cd867d6"
BR2_PACKAGE_NWIPE_GIT_REVISION="v0.40"
BR2_PACKAGE_LIBFRIBIDI=y
BR2_PACKAGE_NCURSES_WCHAR=y
BR2_PACKAGE_NCURSES_TARGET_PROGS=y
@@ -170,7 +171,7 @@ BR2_TARGET_ROOTFS_CPIO_LZMA=y
BR2_TARGET_ROOTFS_INITRAMFS=y
BR2_TARGET_ROOTFS_ISO9660=y
BR2_TARGET_ROOTFS_ISO9660_BOTH=y
BR2_TARGET_ROOTFS_ISO9660_VOLUME_NAME="ShredOS"
BR2_TARGET_ROOTFS_ISO9660_VOLUME_NAME="SHREDOS"
BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_BOOT_MENU="board/shredos/iso/isolinux.cfg"
BR2_TARGET_ROOTFS_ISO9660_GRUB2_BOOT_MENU="board/shredos/iso/grub.cfg"
BR2_TARGET_ROOTFS_ISO9660_GRUB2_EFI_BOOT_MENU="board/shredos/iso/efigrub.cfg"

View File

@@ -24,8 +24,11 @@ BR2_PACKAGE_DOSFSTOOLS=y
BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=y
BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT=y
BR2_PACKAGE_E2FSPROGS=y
BR2_PACKAGE_NTFS_3G=y
BR2_PACKAGE_SMARTDMT=y
BR2_PACKAGE_LINUX_FIRMWARE=y
BR2_PACKAGE_LINUX_FIRMWARE_I915=y
BR2_PACKAGE_LINUX_FIRMWARE_XE=y
BR2_PACKAGE_LINUX_FIRMWARE_RADEON=y
BR2_PACKAGE_LINUX_FIRMWARE_BNX2X=y
BR2_PACKAGE_LINUX_FIRMWARE_CXGB4_T4=y
@@ -35,11 +38,14 @@ BR2_PACKAGE_LINUX_FIRMWARE_INTEL_ICE=y
BR2_PACKAGE_LINUX_FIRMWARE_QLOGIC_4X=y
BR2_PACKAGE_LINUX_FIRMWARE_RTL_815X=y
BR2_PACKAGE_LINUX_FIRMWARE_RTL_8169=y
BR2_PACKAGE_LINUX_FIRMWARE_QLOGIC_2XXX=y
BR2_PACKAGE_EDID_DECODE=y
BR2_PACKAGE_HDPARM=y
BR2_PACKAGE_KBD=y
BR2_PACKAGE_LM_SENSORS=y
BR2_PACKAGE_MEMTEST86=y
BR2_PACKAGE_NVME=y
BR2_PACKAGE_PCIUTILS=y
BR2_PACKAGE_READ_EDID=y
BR2_PACKAGE_SG3_UTILS=y
BR2_PACKAGE_SG3_UTILS_PROGS=y
@@ -48,8 +54,7 @@ BR2_PACKAGE_TRIGGERHAPPY=y
BR2_PACKAGE_LZ4=y
BR2_PACKAGE_KERNEL_CMDLINE_EXTRACTOR=y
BR2_PACKAGE_NWIPE=y
BR2_PACKAGE_NWIPE_VERSION_GIT_REVISION=y
BR2_PACKAGE_NWIPE_GIT_REVISION="26ece7a0525370f6ba39cddc5e73000b3cd867d6"
BR2_PACKAGE_NWIPE_GIT_REVISION="v0.40"
BR2_PACKAGE_NCURSES_WCHAR=y
BR2_PACKAGE_UTF8PROC=y
BR2_PACKAGE_XUTIL_UTIL_MACROS=y
@@ -93,3 +98,6 @@ BR2_TARGET_GRUB2_INSTALL_TOOLS=y
BR2_TARGET_SYSLINUX=y
BR2_PACKAGE_HOST_E2FSPROGS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_PYTHON3=y
BR2_PACKAGE_HOST_PYTHON3_BZIP2=y
BR2_PACKAGE_HOST_PYTHON3_SSL=y

View File

@@ -0,0 +1,101 @@
BR2_x86_64=y
BR2_x86_nocona=y
BR2_PACKAGE_GLIBC_UTILS=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY=y
BR2_TARGET_GENERIC_HOSTNAME="shredos"
BR2_TARGET_GENERIC_ISSUE="Welcome to ShredOS https://github.com/PartialVolume/shredos.x86_64"
BR2_INIT_SYSV=y
BR2_ROOTFS_MERGED_USR=y
BR2_SYSTEM_BIN_SH_BASH=y
BR2_SYSTEM_DEFAULT_PATH="/bin:/sbin:/usr/bin:/usr/sbin"
# BR2_ENABLE_LOCALE_PURGE is not set
BR2_GENERATE_LOCALE="en_US.UTF-8"
BR2_TARGET_TZ_INFO=y
BR2_ROOTFS_OVERLAY="board/shredos/fsoverlay"
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/shredos/make_iso_file.sh board/shredos/make_img_file.sh"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/shredos/kernel-defconfig"
BR2_PACKAGE_GZIP=y
BR2_PACKAGE_XZ=y
BR2_PACKAGE_HEXEDIT=y
BR2_PACKAGE_DOSFSTOOLS=y
BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=y
BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT=y
BR2_PACKAGE_E2FSPROGS=y
BR2_PACKAGE_NTFS_3G=y
BR2_PACKAGE_SMARTDMT=y
BR2_PACKAGE_LINUX_FIRMWARE=y
BR2_PACKAGE_LINUX_FIRMWARE_I915=y
BR2_PACKAGE_LINUX_FIRMWARE_XE=y
BR2_PACKAGE_LINUX_FIRMWARE_RADEON=y
BR2_PACKAGE_LINUX_FIRMWARE_BNX2X=y
BR2_PACKAGE_LINUX_FIRMWARE_CXGB4_T4=y
BR2_PACKAGE_LINUX_FIRMWARE_CXGB4_T5=y
BR2_PACKAGE_LINUX_FIRMWARE_INTEL_E100=y
BR2_PACKAGE_LINUX_FIRMWARE_INTEL_ICE=y
BR2_PACKAGE_LINUX_FIRMWARE_QLOGIC_4X=y
BR2_PACKAGE_LINUX_FIRMWARE_RTL_815X=y
BR2_PACKAGE_LINUX_FIRMWARE_RTL_8169=y
BR2_PACKAGE_LINUX_FIRMWARE_QLOGIC_2XXX=y
BR2_PACKAGE_EDID_DECODE=y
BR2_PACKAGE_HDPARM=y
BR2_PACKAGE_KBD=y
BR2_PACKAGE_LM_SENSORS=y
BR2_PACKAGE_MEMTEST86=y
BR2_PACKAGE_NVME=y
BR2_PACKAGE_READ_EDID=y
BR2_PACKAGE_PCIUTILS=y
BR2_PACKAGE_SG3_UTILS=y
BR2_PACKAGE_SG3_UTILS_PROGS=y
BR2_PACKAGE_SMARTMONTOOLS=y
BR2_PACKAGE_TRIGGERHAPPY=y
BR2_PACKAGE_LZ4=y
BR2_PACKAGE_KERNEL_CMDLINE_EXTRACTOR=y
BR2_PACKAGE_NWIPE=y
BR2_PACKAGE_NWIPE_GIT_REVISION="v0.40"
BR2_PACKAGE_NCURSES_WCHAR=y
BR2_PACKAGE_UTF8PROC=y
BR2_PACKAGE_XUTIL_UTIL_MACROS=y
BR2_PACKAGE_IPTABLES=y
BR2_PACKAGE_LFTP=y
BR2_PACKAGE_LFTP_PROTO_SFTP=y
BR2_PACKAGE_NTP=y
BR2_PACKAGE_NTP_NTPDATE=y
BR2_PACKAGE_NTP_NTPTIME=y
BR2_PACKAGE_OPENSSH=y
BR2_PACKAGE_TFTPD=y
BR2_PACKAGE_TMUX=y
BR2_PACKAGE_OPENSEACHEST=y
BR2_PACKAGE_UTIL_LINUX_BINARIES=y
BR2_PACKAGE_UTIL_LINUX_AGETTY=y
BR2_PACKAGE_UTIL_LINUX_FSCK=y
BR2_PACKAGE_UTIL_LINUX_MOUNT=y
BR2_PACKAGE_UTIL_LINUX_MOUNTPOINT=y
BR2_PACKAGE_UTIL_LINUX_PIVOT_ROOT=y
BR2_PACKAGE_UTIL_LINUX_SETTERM=y
BR2_TARGET_ROOTFS_CPIO_LZMA=y
BR2_TARGET_ROOTFS_INITRAMFS=y
BR2_TARGET_ROOTFS_ISO9660=y
BR2_TARGET_ROOTFS_ISO9660_BOTH=y
BR2_TARGET_ROOTFS_ISO9660_VOLUME_NAME="SHREDOS"
BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_BOOT_MENU="board/shredos/iso/isolinux.cfg"
BR2_TARGET_ROOTFS_ISO9660_GRUB2_BOOT_MENU="board/shredos/iso/grub.cfg"
BR2_TARGET_ROOTFS_ISO9660_GRUB2_EFI_BOOT_MENU="board/shredos/iso/efigrub.cfg"
BR2_TARGET_ROOTFS_ISO9660_GRUB2_EFI_IDENT_FILE="/boot/shredos.id"
BR2_TARGET_ROOTFS_ISO9660_HYBRID=y
# BR2_TARGET_ROOTFS_TAR is not set
BR2_TARGET_GRUB2=y
BR2_TARGET_GRUB2_I386_PC=y
BR2_TARGET_GRUB2_X86_64_EFI=y
BR2_TARGET_GRUB2_BUILTIN_MODULES_PC="boot linux ext2 fat squash4 part_msdos part_gpt normal progress biosdisk video video_fb all_video video_cirrus video_bochs net tftp gzio test eval read true gfxterm gfxterm_menu gfxmenu gfxterm_background png usb usb_keyboard search configfile"
BR2_TARGET_GRUB2_BUILTIN_CONFIG_PC="board/shredos/embed/grub.cfg"
BR2_TARGET_GRUB2_BUILTIN_MODULES_EFI="boot linux ext2 fat squash4 part_msdos part_gpt normal progress efi_gop efi_uga video video_fb all_video video_cirrus video_bochs net efinet tftp gzio test eval read true gfxterm gfxterm_menu gfxmenu gfxterm_background png usb usb_keyboard search configfile iso9660"
BR2_TARGET_GRUB2_BUILTIN_CONFIG_EFI="board/shredos/embed/grub.cfg"
BR2_TARGET_GRUB2_INSTALL_TOOLS=y
BR2_TARGET_SYSLINUX=y
BR2_PACKAGE_HOST_E2FSPROGS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_PYTHON3_BZIP2=y
BR2_PACKAGE_HOST_PYTHON3_SSL=y

View File

@@ -44,11 +44,9 @@ ROOTFS_ISO9660_HYBRID_APPEND_PARTITION_TYPE = $(call qstrip,$(BR2_TARGET_ROOTFS_
ifeq ($(BR2_ARCH_IS_64),y)
ROOTFS_ISO9660_EFI_NAME = bootx64.efi
ROOTFS_ISO9660_EFI_NOTNAME = bootia32.efi
ROOTFS_ISO9660_GRUB2_EFI_PREFIX = $(call qstrip,$(GRUB2_PREFIX_x86_64-efi))
else
ROOTFS_ISO9660_EFI_NAME = bootia32.efi
ROOTFS_ISO9660_EFI_NOTNAME = bootx64.efi
ROOTFS_ISO9660_GRUB2_EFI_PREFIX = $(call qstrip,$(GRUB2_PREFIX_i386-efi))
endif
@@ -95,6 +93,17 @@ else
ROOTFS_ISO9660_TMP_TARGET_DIR = $(TARGET_DIR)
endif
################################################################################
# Memtest
################################################################################
define ROOTFS_ISO9660_COPY_MEMTEST_BINARIES
$(INSTALL) -D -m 0644 $(BINARIES_DIR)/memtest.efi \
$(ROOTFS_ISO9660_TMP_TARGET_DIR)/$(ROOTFS_ISO9660_GRUB2_EFI_PREFIX)/memtest.efi
$(INSTALL) -D -m 0644 $(BINARIES_DIR)/memtest.bin \
$(ROOTFS_ISO9660_TMP_TARGET_DIR)/boot/memtest
endef
################################################################################
# Reproducible build support
################################################################################
@@ -140,26 +149,39 @@ ROOTFS_ISO9660_EFI_PARTITION_CONTENT = $(BINARIES_DIR)/efi-part
ROOTFS_ISO9660_GRUB2_CONFIG_PATH = $(ROOTFS_ISO9660_TMP_TARGET_DIR)/boot/grub/grub.cfg
ROOTFS_ISO9660_GRUB2_EFI_CONFIG_PATH = $(ROOTFS_ISO9660_TMP_TARGET_DIR)/$(ROOTFS_ISO9660_GRUB2_EFI_PREFIX)/grub.cfg
ifeq ($(BR2_ARCH_IS_64),y)
# Include also the 32-bit bootloader for 64-bit builds
define ROOTFS_ISO9660_EFI_OTHER_ARCH
$(INSTALL) -D -m 0644 $(ROOTFS_ISO9660_EFI_PARTITION_CONTENT)/$(ROOTFS_ISO9660_GRUB2_EFI_PREFIX)/bootx64.efi \
$(TOPDIR)/board/shredos/bootx64.efi
$(INSTALL) -D -m 0644 $(TOPDIR)/board/shredos/bootia32.efi \
$(ROOTFS_ISO9660_EFI_PARTITION_CONTENT)/$(ROOTFS_ISO9660_GRUB2_EFI_PREFIX)/bootia32.efi
$(INSTALL) -D -m 0644 $(ROOTFS_ISO9660_EFI_PARTITION_CONTENT)/$(ROOTFS_ISO9660_GRUB2_EFI_PREFIX)/bootia32.efi \
$(ROOTFS_ISO9660_TMP_TARGET_DIR)/$(ROOTFS_ISO9660_GRUB2_EFI_PREFIX)/bootia32.efi
endef
else
# Include also the 64-bit bootloader for 32-bit builds
define ROOTFS_ISO9660_EFI_OTHER_ARCH
$(INSTALL) -D -m 0644 $(ROOTFS_ISO9660_EFI_PARTITION_CONTENT)/$(ROOTFS_ISO9660_GRUB2_EFI_PREFIX)/bootia32.efi \
$(TOPDIR)/board/shredos/bootia32.efi
$(INSTALL) -D -m 0644 $(TOPDIR)/board/shredos/bootx64.efi \
$(ROOTFS_ISO9660_EFI_PARTITION_CONTENT)/$(ROOTFS_ISO9660_GRUB2_EFI_PREFIX)/bootx64.efi
$(INSTALL) -D -m 0644 $(ROOTFS_ISO9660_EFI_PARTITION_CONTENT)/$(ROOTFS_ISO9660_GRUB2_EFI_PREFIX)/bootx64.efi \
$(ROOTFS_ISO9660_TMP_TARGET_DIR)/$(ROOTFS_ISO9660_GRUB2_EFI_PREFIX)/bootx64.efi
endef
endif
define ROOTFS_ISO9660_INSTALL_GRUB2_EFI
# If 32bit build also copy the bootx64.efi from board/shredos/ so 32bit shredos will boot on a 64 EFI system
if [ "$(BR2_i386)" = "y" ]; then \
$(INSTALL) -D -m 0644 $(TOPDIR)/board/shredos/bootx64.efi $(BINARIES_DIR)/efi-part/EFI/BOOT/bootx64.efi; \
fi
# Install memtest binaries to ISO9660 filesystem
$(ROOTFS_ISO9660_COPY_MEMTEST_BINARIES)
# Include also the other achitecture bootloader
$(ROOTFS_ISO9660_EFI_OTHER_ARCH)
# Create file to better find ISO9660 filesystem
$(INSTALL) -D -m 0644 /dev/null \
$(ROOTFS_ISO9660_TMP_TARGET_DIR)/$(ROOTFS_ISO9660_GRUB2_EFI_IDENT_FILE)
# Copy EFI bootloader also to ISO9660 filesystem
$(INSTALL) -D -m 0644 $(ROOTFS_ISO9660_EFI_PARTITION_CONTENT)/$(ROOTFS_ISO9660_GRUB2_EFI_PREFIX)/$(ROOTFS_ISO9660_EFI_NAME) \
$(ROOTFS_ISO9660_TMP_TARGET_DIR)/$(ROOTFS_ISO9660_GRUB2_EFI_PREFIX)/$(ROOTFS_ISO9660_EFI_NAME)
# If 32 bit build we also want the 64 bit EFI installed
if [ "$(BR2_i386)" = "y" ]; then \
$(INSTALL) -D -m 0644 $(ROOTFS_ISO9660_EFI_PARTITION_CONTENT)/$(ROOTFS_ISO9660_GRUB2_EFI_PREFIX)/$(ROOTFS_ISO9660_EFI_NOTNAME) \
$(ROOTFS_ISO9660_TMP_TARGET_DIR)/$(ROOTFS_ISO9660_GRUB2_EFI_PREFIX)/$(ROOTFS_ISO9660_EFI_NOTNAME)
fi
# If 64bit build copy the bootx64.efi to board/shredos/ as this will be used when building 32bit build
if [ "$(BR2_x86_64)" = "y" ]; then \
$(INSTALL) -D -m 0644 $(BINARIES_DIR)/efi-part/EFI/BOOT/bootx64.efi $(TOPDIR)/board/shredos/bootx64.efi; \
fi
# Create EFI FAT partition
$(RM) -rf $(ROOTFS_ISO9660_EFI_PARTITION_PATH)
mkdir -p $(dir $(ROOTFS_ISO9660_EFI_PARTITION_PATH))
@@ -257,26 +279,39 @@ define ROOTFS_ISO9660_INSTALL_ISOLINUX_CONFIG
$(ROOTFS_ISO9660_ISOLINUX_CONFIG_PATH)
endef
ifeq ($(BR2_ARCH_IS_64),y)
# Include also the 32-bit bootloader for 64-bit builds
define ROOTFS_ISO9660_EFI_OTHER_ARCH
$(INSTALL) -D -m 0644 $(ROOTFS_ISO9660_EFI_PARTITION_CONTENT)/$(ROOTFS_ISO9660_GRUB2_EFI_PREFIX)/bootx64.efi \
$(TOPDIR)/board/shredos/bootx64.efi
$(INSTALL) -D -m 0644 $(TOPDIR)/board/shredos/bootia32.efi \
$(ROOTFS_ISO9660_EFI_PARTITION_CONTENT)/$(ROOTFS_ISO9660_GRUB2_EFI_PREFIX)/bootia32.efi
$(INSTALL) -D -m 0644 $(ROOTFS_ISO9660_EFI_PARTITION_CONTENT)/$(ROOTFS_ISO9660_GRUB2_EFI_PREFIX)/bootia32.efi \
$(ROOTFS_ISO9660_TMP_TARGET_DIR)/$(ROOTFS_ISO9660_GRUB2_EFI_PREFIX)/bootia32.efi
endef
else
# Include also the 64-bit bootloader for 32-bit builds
define ROOTFS_ISO9660_EFI_OTHER_ARCH
$(INSTALL) -D -m 0644 $(ROOTFS_ISO9660_EFI_PARTITION_CONTENT)/$(ROOTFS_ISO9660_GRUB2_EFI_PREFIX)/bootia32.efi \
$(TOPDIR)/board/shredos/bootia32.efi
$(INSTALL) -D -m 0644 $(TOPDIR)/board/shredos/bootx64.efi \
$(ROOTFS_ISO9660_EFI_PARTITION_CONTENT)/$(ROOTFS_ISO9660_GRUB2_EFI_PREFIX)/bootx64.efi
$(INSTALL) -D -m 0644 $(ROOTFS_ISO9660_EFI_PARTITION_CONTENT)/$(ROOTFS_ISO9660_GRUB2_EFI_PREFIX)/bootx64.efi \
$(ROOTFS_ISO9660_TMP_TARGET_DIR)/$(ROOTFS_ISO9660_GRUB2_EFI_PREFIX)/bootx64.efi
endef
endif
define ROOTFS_ISO9660_INSTALL_GRUB2_EFI
# If 32bit build also copy the bootx64.efi from board/shredos/ so 32bit shredos will boot on a 64 EFI system
if [ "$(BR2_i386)" = "y" ]; then \
$(INSTALL) -D -m 0644 $(TOPDIR)/board/shredos/bootx64.efi $(BINARIES_DIR)/efi-part/EFI/BOOT/bootx64.efi; \
fi
# Install memtest binaries to ISO9660 filesystem
$(ROOTFS_ISO9660_COPY_MEMTEST_BINARIES)
# Include also the other achitecture bootloader
$(ROOTFS_ISO9660_EFI_OTHER_ARCH)
# Create file to better find ISO9660 filesystem
$(INSTALL) -D -m 0644 /dev/null \
$(ROOTFS_ISO9660_TMP_TARGET_DIR)/$(ROOTFS_ISO9660_GRUB2_EFI_IDENT_FILE)
# Copy EFI bootloader also to ISO9660 filesystem
$(INSTALL) -D -m 0644 $(ROOTFS_ISO9660_EFI_PARTITION_CONTENT)/$(ROOTFS_ISO9660_GRUB2_EFI_PREFIX)/$(ROOTFS_ISO9660_EFI_NAME) \
$(ROOTFS_ISO9660_TMP_TARGET_DIR)/$(ROOTFS_ISO9660_GRUB2_EFI_PREFIX)/$(ROOTFS_ISO9660_EFI_NAME)
# If 32 bit build we also want the 64 bit EFI installed
if [ "$(BR2_i386)" = "y" ]; then \
$(INSTALL) -D -m 0644 $(ROOTFS_ISO9660_EFI_PARTITION_CONTENT)/$(ROOTFS_ISO9660_GRUB2_EFI_PREFIX)/$(ROOTFS_ISO9660_EFI_NOTNAME) \
$(ROOTFS_ISO9660_TMP_TARGET_DIR)/$(ROOTFS_ISO9660_GRUB2_EFI_PREFIX)/$(ROOTFS_ISO9660_EFI_NOTNAME)
fi
# If 64bit build copy the bootx64.efi to board/shredos/ as this will be used when building 32bit build
if [ "$(BR2_x86_64)" = "y" ]; then \
$(INSTALL) -D -m 0644 $(BINARIES_DIR)/efi-part/EFI/BOOT/bootx64.efi $(TOPDIR)/board/shredos/bootx64.efi; \
fi
# Create EFI FAT partition
$(RM) -rf $(ROOTFS_ISO9660_EFI_PARTITION_PATH)
mkdir -p $(dir $(ROOTFS_ISO9660_EFI_PARTITION_PATH))

BIN
images/smartdmt.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 940 KiB

View File

@@ -245,6 +245,7 @@ menu "Filesystem and flash utilities"
source "package/sp-oops-extract/Config.in"
source "package/squashfs/Config.in"
source "package/sshfs/Config.in"
source "package/smartdmt/Config.in"
source "package/sunxi-tools/Config.in"
source "package/udftools/Config.in"
source "package/ufs-utils/Config.in"

View File

@@ -8,10 +8,9 @@ config BR2_PACKAGE_NWIPE
help
NWipe secure disk wiping tool (fork of Darik's Boot and Nuke).
if BR2_PACKAGE_NWIPE
config BR2_PACKAGE_NWIPE_SITE
string "nwipe Git repository URL"
depends on BR2_PACKAGE_NWIPE
default "https://github.com/martijnvanbrummelen/nwipe.git"
help
Git repository used to fetch the nwipe sources.
@@ -19,32 +18,12 @@ config BR2_PACKAGE_NWIPE_SITE
- https://github.com/youruser/nwipe.git
- git@github.com:youruser/nwipe.git
choice
prompt "nwipe version"
default BR2_PACKAGE_NWIPE_VERSION_STABLE
help
Select which nwipe version (Git ref) should be built.
config BR2_PACKAGE_NWIPE_VERSION_STABLE
bool "Stable tag (v0.39)"
help
Use the previously hard-coded tag (v0.39) as a stable baseline.
config BR2_PACKAGE_NWIPE_VERSION_GIT_REVISION
bool "Git revision"
help
Use a user-specified Git revision (full commit SHA-1 or tag).
endchoice
config BR2_PACKAGE_NWIPE_GIT_REVISION
string "Git revision (full commit SHA-1 or tag)"
depends on BR2_PACKAGE_NWIPE_VERSION_GIT_REVISION
string "Git revision (full commit SHA-1 or tag v0.25-v0.40 ..)"
depends on BR2_PACKAGE_NWIPE
default "v0.40"
help
When 'Git revision' is selected above, this string is passed as the
Git ref to check out. Examples:
- 051e1aa0c9572b26301a33d40689adb544927d11 (full commit SHA-1)
- v0.39 (tag)
endif
- v0.40 (tag)

View File

@@ -4,31 +4,29 @@
#
################################################################################
# 'NWIPE_TAG' version that will be compiled, nwipe tags are of the form v0.40
# if BR2_PACKAGE_NWIPE_VERSION_STABLE is y else the git commit version will
# be installed as defined in Target Packages>libaries>other>nwipe
NWIPE_TAG = v0.39
# Select the Git reference based on the Kconfig choice.
ifeq ($(BR2_PACKAGE_NWIPE_VERSION_STABLE),y)
NWIPE_VERSION = $(NWIPE_TAG)
else ifeq ($(BR2_PACKAGE_NWIPE_VERSION_GIT_REVISION),y)
NWIPE_BUILD_ARCH = $(call qstrip,$(BR2_ARCH))
NWIPE_VERSION = $(call qstrip,$(BR2_PACKAGE_NWIPE_GIT_REVISION))
else
# Fallback should not happen because the choice enforces exactly one option
NWIPE_VERSION = $(NWIPE_TAG)
endif
# Default Git repository URL (never empty).
NWIPE_SITE = https://github.com/martijnvanbrummelen/nwipe.git
ifneq ($(call qstrip,$(BR2_PACKAGE_NWIPE_SITE)),)
NWIPE_SITE = $(call qstrip,$(BR2_PACKAGE_NWIPE_SITE))
endif
NWIPE_DEPENDENCIES = ncurses parted dmidecode coreutils libconfig
NWIPE_SITE_METHOD = git
NWIPE_DEPENDENCIES = ncurses parted dmidecode coreutils libconfig
ifneq ($(call qstrip,$(BR2_PACKAGE_NWIPE_SITE)),)
NWIPE_SITE = $(call qstrip,$(BR2_PACKAGE_NWIPE_SITE))
else
NWIPE_SITE = https://github.com/martijnvanbrummelen/nwipe.git
endif
################################################################################
# Architecture safeguard
################################################################################
define NWIPE_CHECK_ARCH
case "$(NWIPE_BUILD_ARCH)" in \
i686|x86_64) ;; \
*) echo "Unsupported architecture: $(NWIPE_BUILD_ARCH)"; exit 1 ;; \
esac
endef
NWIPE_PRE_CONFIGURE_HOOKS += NWIPE_CHECK_ARCH
################################################################################
# SHREDOS version.txt and banner updater. Updates the nwipe version which
@@ -39,44 +37,32 @@ NWIPE_DEPENDENCIES = ncurses parted dmidecode coreutils libconfig
SHREDOS_VERSION_FILE = board/shredos/fsoverlay/etc/shredos/version.txt
ifeq ($(BR2_PACKAGE_NWIPE),y)
ifeq ($(BR2_PACKAGE_NWIPE_VERSION_GIT_REVISION),y)
# Take first 7 characters of the git revision and append suffix
NWIPE_VERSION_BANNER := $(shell printf "%.7s-commit-dev" "$(BR2_PACKAGE_NWIPE_GIT_REVISION)")
# If version contains a dot, treat it as a release tag
ifneq ($(findstring .,$(NWIPE_VERSION)),)
NWIPE_VERSION_BANNER = $(NWIPE_VERSION)
else
NWIPE_VERSION_BANNER := $(NWIPE_VERSION)
# Otherwise assume it is a development version by hash
NWIPE_VERSION_BANNER = $(shell printf "%.7s-commit-dev" "$(NWIPE_VERSION)")
endif
endif
# Normalize x86_64 to x86-64 for version
NWIPE_VERSION_ARCH = $(if $(filter x86_64,$(NWIPE_BUILD_ARCH)),x86-64,$(NWIPE_BUILD_ARCH))
define NWIPE_UPDATE_VERSION_TXT
@if [ -n "$(NWIPE_VERSION_BANNER)" ]; then \
echo "Updating version.txt and nwipe banner with Nwipe version: $(NWIPE_VERSION_BANNER)"; \
sed -i 's/\(.*_\)[^_]*$$/\1$(NWIPE_VERSION_BANNER)/' $(SHREDOS_VERSION_FILE); \
fi
echo "Updating version.txt: arch=$(NWIPE_VERSION_ARCH) banner=$(NWIPE_VERSION_BANNER)"
sed -i "s/\(.*_\)\(x86-64\|i686\)_.*$$/\1$(NWIPE_VERSION_ARCH)_$(NWIPE_VERSION_BANNER)/" \
$(SHREDOS_VERSION_FILE)
grep -q "$(NWIPE_VERSION_ARCH)_$(NWIPE_VERSION_BANNER)" $(SHREDOS_VERSION_FILE) || \
{ echo "ERROR: Failed to update version.txt - unexpected format in file?"; exit 1; }
endef
NWIPE_PRE_CONFIGURE_HOOKS += NWIPE_UPDATE_VERSION_TXT
######
################################################################################
# Version architecture nwipe banner updater (pre-build)
################################################################################
define NWIPE_INITSH
@echo "Updating version.txt and nwipe banner with architecture: $(BR2_ARCH)"
@if [ "$(BR2_ARCH)" = "i686" ]; then \
sed -i 's/\(^.*_\)\(x86-64\|i686\)\(_.*\)/\1i686\3/' $(SHREDOS_VERSION_FILE); \
elif [ "$(BR2_ARCH)" = "x86_64" ]; then \
sed -i 's/\(^.*_\)\(x86-64\|i686\)\(_.*\)/\1x86-64\3/' $(SHREDOS_VERSION_FILE); \
else \
echo "Unsupported architecture: $(BR2_ARCH)"; \
exit 1; \
fi
define NWIPE_INIT_BUILD
(cd $(@D) && \
cp ../../../package/nwipe/002-nwipe-banner-patch.sh . && \
./002-nwipe-banner-patch.sh && \
@@ -86,7 +72,7 @@ endef
# Pre-configure hook, as a post-patch hook would not get triggered on a package
# reconfigure, and possibly also taint the sources directory with the generated
# autogen files (which should not be there).
NWIPE_PRE_CONFIGURE_HOOKS += NWIPE_INITSH
NWIPE_PRE_CONFIGURE_HOOKS += NWIPE_INIT_BUILD
$(eval $(autotools-package))

View File

@@ -0,0 +1,18 @@
config BR2_PACKAGE_SMARTDMT
bool "smartdmt"
depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
select BR2_PACKAGE_HOST_GO
help
SMART Device Monitoring Terminal
https://github.com/desertwitch/smartdmt
config BR2_PACKAGE_SMARTDMT_GIT_REVISION
string "Git revision (full commit SHA-1 or tag v0.25-v0.40 ..)"
depends on BR2_PACKAGE_SMARTDMT
default "v0.1.5"
help
When 'Git revision' is selected above, this string is passed as the
Git ref to check out. Examples:
- 051e1aa0c9572b26301a33d40689adb544927d11 (full commit SHA-1)
- v0.40 (tag)

View File

@@ -0,0 +1,23 @@
################################################################################
#
# smartdmt
#
################################################################################
SMARTDMT_VERSION = $(call qstrip,$(BR2_PACKAGE_SMARTDMT_GIT_REVISION))
SMARTDMT_SITE = https://github.com/desertwitch/smartdmt.git
SMARTDMT_SITE_METHOD = git
SMARTDMT_LICENSE = MIT
SMARTDMT_LICENSE_FILES = LICENSE
SMARTDMT_GOMOD = github.com/desertwitch/smartdmt
SMARTDMT_GO_ENV = CGO_ENABLED=0
SMARTDMT_LDFLAGS = \
-X main.Version=$(shell echo $(SMARTDMT_VERSION) | sed 's/^v//' | cut -c1-7)
SMARTDMT_BUILD_TARGETS = ./cmd/smartdmt
$(eval $(golang-package))