s4-3b1-pc7300-efe55b

#### Supplemental Linux® From Scratch - Version 13.0

### Chapter 20. Computer Emulators

- Prev

  FreeBee-b72776

- Next

  p20-emu-d75a83

- Up
- Home

# s4-3b1-pc7300-efe55b

## Introduction to s4-3b1-pc7300

The s4-3b1-pc7300 package contains a kernel module and various tools to support reading and and writing to and from CTIX and AT&T 3B1 UNIX System Software hard disks.

- Download: https://github.com/dgesswein/s4-3b1-pc7300/archive/efe55b8cc917e3e27bcae9786c5b5dec0469be45/s4-3b1-pc7300-efe55b8cc917e3e27bcae9786c5b5dec0469be45.tar.gz

- Supported kernel version: 6.18.x

### Additional Downloads

- Required patch: https://www.linuxfromscratch.org/slfs/view/13.0/download/s4-3b1-pc7300/s4-3b1-pc7300-efe55b-build_fixes-1.patch

## Installation of s4-3b1-pc7300

Apply a patch to make the library be built as shared instead of static, build the kernel module unconditionally, and makes the module use up-to-date interfaces and expected operations dictated by the kernel, GCC, and glibc:

    patch -Np1 -i ../s4-3b1-pc7300-efe55b-build_fixes-1.patch

Compile the kernel module:

    cd sysv &&
    make -f Makefile.daveb running

### Tip

Be sure to compile this kernel module booted into your LFS system, or if in a chroot, have the same kernel version you built for the target as on the host. Otherwise, directories that are assumed to exist will not be found and the build process will fail.

Now install the kernel module as the `root` user:

    make -f Makefile.daveb run_install

### Important

When you update the kernel, you will also need to reinstall this kernel module.

This is because there is glue when kernel modules are built. This glue doesn't matter too much with first party modules (modules in the kernel source tree) as the modules are updated at the same time the kernel is. At that point, there is new glue holding them together. However, when it comes to third party modules, they aren't updated when the kernel updates, so this glue the third party modules had on the kernel breaks. This leads to broken kernel modules. This also applies if you stay on the same kernel version but change some options, this can also break the glue.

Be sure that when you reinstall the driver, make sure you are using the new kernel and have the kernel source you built from. Otherwise the driver will fail to install.

Now install the s4-3b1-pc7300 userland tools by running the following commands:

    cd .. &&
    make CC="cc -std=gnu17"

Now, as the `root` user:

    install -vDm755 s4date s4disk s4dump s4export s4fs s4fsck \
                    s4import s4merge s4mkfs s4test s4vol      \
                                    -t /usr/bin/             &&
    install -vDm644 s4d.h s4fixed.h -t /usr/include/         &&
    install -vDm755 libs4.so        -t /usr/lib/             &&
    ln -svf         libs4.so           /usr/lib/libs4.so.0   &&
    ln -svf         libs4.so.0         /usr/lib/libs4.so.0.0

## Contents

Installed Programs: s4date, s4disk, s4dump, s4export, s4fs, s4fsck, s4import, s4merge, s4mkfs, s4test, and s4vol
Installed Libraries: libs4
Installed Directories: None

### Short Descriptions

s4date | is an SVR2 date that starts in 2000 instead of 1900
s4disk | is a tool to inspect volume images
s4dump | is a hex/ascii dumper tuned for dumping volume and FS files
s4export | exports FSes from volumes into a mountable image file
s4fs | is a tool for exploring FS image files
s4fsck | is an SVR2 fsck modified to work on a possibly byte-swapped FS image
s4import | merges an FS image into a volume file
s4merge | merges multiple volume images into one, block by block
s4mkfs | is an SVR2 mkfs, modified to generate a file and handle byte-swapping
s4test | is a filesystem information tool and a test app for libs4
s4vol | is a tool for advanced manipulation of 3B1 volume images
`libs4` | provides functions for accessing AT&T 3B1 UNIX PC/PC-7300 hard drives, hard drive images and their filesystems

- Prev

  FreeBee-b72776

- Next

  p20-emu-d75a83

- Up
- Home