Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 38733e7

Browse files
committed
update urls
The URLS for busybox binaries, as well as some init scripts had moved. Note that the busybox binary for ppc64 and i386 is old as Fedora does not maintain those architectures anymore.
1 parent df46891 commit 38733e7

2 files changed

Lines changed: 39 additions & 12 deletions

File tree

README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
This uses Busybox static binary from Fedora's RPM to create a simple initramfs.
22

33
```bash
4-
./create_initramfs.sh --help
4+
$ ./create_initramfs.sh --help
5+
6+
Usage: ./create_initramfs.sh --arch <string> [options]
7+
8+
Required options:
9+
--arch <string> architecture, e.g. aarch64, arm, ppc64, ppc64le, i386, x86_64
10+
11+
Options:
12+
--dir <dir> directory to use for building and output of initramfs
13+
--debug enable set -x
14+
--noclean don't clean the build directory (we clean by default)
15+
--noinit don't use busybox init system, boot to /bin/sh instead
16+
--overlay <dir> files to copy over top of initramfs filesystem
17+
--overlay-dst <dir> dir to copy overlay files into on initramfs, defaults to /
18+
--printk enable printk on console
19+
--tty <string> the tty(s) to run getting on, defaults to "tty0 hvc0"
20+
--help show this help message
21+
22+
Short Options:
23+
-a <string> Same as --arch
24+
-d <dir> Same as --dir
25+
-o <dir> Same as --overlay
26+
-O <dir> Same as --overlay-dst
27+
-t <string> Same as --tty
28+
-h Same as --help
529
```

create_initramfs.sh

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ WGET="wget -q"
2828
rcS_url="https://raw.githubusercontent.com/buildroot/buildroot/master/package/initscripts/init.d/rcS"
2929
rcK_url="https://raw.githubusercontent.com/buildroot/buildroot/master/package/initscripts/init.d/rcK"
3030
network_url="https://raw.githubusercontent.com/buildroot/buildroot/master/package/ifupdown-scripts/S40network"
31-
urandom_url="https://raw.githubusercontent.com/buildroot/buildroot/master/package/initscripts/init.d/S20urandom"
31+
urandom_url="https://raw.githubusercontent.com/buildroot/buildroot/master/package/urandom-scripts/S20urandom"
3232
passwd_url="https://raw.githubusercontent.com/buildroot/buildroot/master/system/skeleton/etc/passwd"
3333
shadow_url="https://raw.githubusercontent.com/buildroot/buildroot/master/system/skeleton/etc/shadow"
3434
group_url="https://raw.githubusercontent.com/buildroot/buildroot/master/system/skeleton/etc/group"
@@ -49,7 +49,7 @@ usage() {
4949
Usage: $0 --arch <string> [options]
5050
5151
Required options:
52-
--arch <string> architecture, e.g. arm, ppc64, ppc64le, i386, x86_64
52+
--arch <string> architecture, e.g. aarch64, arm, ppc64, ppc64le, i386, x86_64
5353
5454
Options:
5555
--dir <dir> directory to use for building and output of initramfs
@@ -137,19 +137,22 @@ done
137137
# Get a busybox RPM from Fedora
138138
if [[ "${ARCH}" == "ppc64" ]] ; then
139139
pkg=busybox-1.26.2-3.fc27.ppc64.rpm
140-
pkgurl=${pkgurl:-https://dl.fedoraproject.org/pub/fedora-secondary/releases/28/Everything/ppc64/os/Packages/b/}${pkg}
140+
pkgurl=${pkgurl:-https://dl.fedoraproject.org/pub/archive/fedora-secondary/releases/28/Everything/ppc64/os/Packages/b/}${pkg}
141141
elif [[ "${ARCH}" == "ppc64le" ]] ; then
142-
pkg=busybox-1.28.3-2.fc29.ppc64le.rpm
143-
pkgurl=https://dl.fedoraproject.org/pub/fedora-secondary/releases/29/Everything/ppc64le/os/Packages/b/$pkg
142+
pkg=busybox-1.32.0-2.fc33.ppc64le.rpm
143+
pkgurl=https://dl.fedoraproject.org/pub/fedora-secondary/releases/33/Everything/ppc64le/os/Packages/b/$pkg
144144
elif [[ "${ARCH}" == "i386" ]] ; then
145-
pkg=busybox-1.28.3-2.fc29.i686.rpm
146-
pkgurl=https://dl.fedoraproject.org/pub/fedora-secondary/releases/29/Everything/i386/os/Packages/b/$pkg
145+
pkg=busybox-1.28.3-3.fc30.i686.rpm
146+
pkgurl=https://dl.fedoraproject.org/pub/fedora-secondary/releases/30/Everything/i386/os/Packages/b/$pkg
147147
elif [[ "${ARCH}" == "x86_64" ]] ; then
148-
pkg=busybox-1.28.3-2.fc29.x86_64.rpm
149-
pkgurl=https://dl.fedoraproject.org/pub/fedora/linux/releases/29/Everything/x86_64/os/Packages/b/${pkg}
148+
pkg=busybox-1.32.0-2.fc33.x86_64.rpm
149+
pkgurl=https://dl.fedoraproject.org/pub/fedora/linux/releases/33/Everything/x86_64/os/Packages/b/${pkg}
150150
elif [[ "${ARCH}" == "arm" ]] ; then
151-
pkg=busybox-1.28.3-2.fc29.armv7hl.rpm
152-
pkgurl=https://dl.fedoraproject.org/pub/fedora/linux/releases/29/Everything/armhfp/os/Packages/b/${pkg}
151+
pkg=busybox-1.32.0-2.fc33.armv7hl.rpm
152+
pkgurl=https://dl.fedoraproject.org/pub/fedora/linux/releases/33/Everything/armhfp/os/Packages/b/${pkg}
153+
elif [[ "${ARCH}" == "arm64" || "${ARCH}" == aarch64 ]] ; then
154+
pkg=busybox-1.32.0-2.fc33.aarch64.rpm
155+
pkgurl=https://dl.fedoraproject.org/pub/fedora/linux/releases/33/Everything/aarch64/os/Packages/b/${pkg}
153156
else
154157
usage
155158
fi

0 commit comments

Comments
 (0)